survey-creator-core 1.9.98 → 1.9.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fonts.fontless.css +1 -1
- package/fonts.fontless.min.css +1 -1
- package/package.json +7 -2
- package/survey-creator-core.css +47 -40
- package/survey-creator-core.fontless.css +46 -39
- package/survey-creator-core.fontless.css.map +1 -1
- package/survey-creator-core.fontless.min.css +5 -5
- package/survey-creator-core.i18n.js +1 -1
- package/survey-creator-core.i18n.min.js +1 -1
- package/survey-creator-core.js +228 -92
- package/survey-creator-core.js.map +1 -1
- package/survey-creator-core.min.css +6 -6
- package/survey-creator-core.min.js +2 -2
- package/typings/components/tabs/theme.d.ts +2 -1
- package/typings/creator-base.d.ts +32 -2
- package/typings/creator-settings.d.ts +3 -0
- package/typings/custom-questions/question-color.d.ts +1 -0
- package/typings/custom-questions/question-file.d.ts +1 -0
- package/typings/property-grid/condition-survey.d.ts +1 -0
- package/typings/property-grid-theme/property-grid.d.ts +2 -0
- package/typings/utils/utils.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator v1.9.
|
|
2
|
+
* SurveyJS Creator v1.9.99
|
|
3
3
|
* (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* Github: https://github.com/surveyjs/survey-creator
|
|
5
5
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
@@ -10,4 +10,4 @@ Papa Parse
|
|
|
10
10
|
v5.4.1
|
|
11
11
|
https://github.com/mholt/PapaParse
|
|
12
12
|
License: MIT
|
|
13
|
-
*/n=[],void 0===(r="function"==typeof(i=function e(){"use strict";var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},o=!t.document&&!!t.postMessage,i=t.IS_PAPA_WORKER||!1,n={},r=0,a={parse:function(o,i){var s=(i=i||{}).dynamicTyping||!1;if(C(s)&&(i.dynamicTypingFunction=s,s={}),i.dynamicTyping=s,i.transform=!!C(i.transform)&&i.transform,i.worker&&a.WORKERS_SUPPORTED){var l=function(){if(!a.WORKERS_SUPPORTED)return!1;var o,i,s=(o=t.URL||t.webkitURL||null,i=e.toString(),a.BLOB_URL||(a.BLOB_URL=o.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",i,")();"],{type:"text/javascript"})))),l=new t.Worker(s);return l.onmessage=f,l.id=r++,n[l.id]=l}();return l.userStep=i.step,l.userChunk=i.chunk,l.userComplete=i.complete,l.userError=i.error,i.step=C(i.step),i.chunk=C(i.chunk),i.complete=C(i.complete),i.error=C(i.error),delete i.worker,void l.postMessage({input:o,config:i,workerId:l.id})}var h=null;return a.NODE_STREAM_INPUT,"string"==typeof o?(o=function(e){return 65279===e.charCodeAt(0)?e.slice(1):e}(o),h=i.download?new u(i):new p(i)):!0===o.readable&&C(o.read)&&C(o.on)?h=new d(i):(t.File&&o instanceof File||o instanceof Object)&&(h=new c(i)),h.stream(o)},unparse:function(e,t){var o=!1,i=!0,n=",",r="\r\n",s='"',l=s+s,u=!1,c=null,p=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||a.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(n=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(o=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(u=t.skipEmptyLines),"string"==typeof t.newline&&(r=t.newline),"string"==typeof t.quoteChar&&(s=t.quoteChar),"boolean"==typeof t.header&&(i=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");c=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+s),("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(p=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/)}}();var d=new RegExp(g(s),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return h(null,e,u);if("object"==typeof e[0])return h(c||Object.keys(e[0]),e,u)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||c),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),h(e.fields||[],e.data||[],u);throw new Error("Unable to serialize unrecognized input");function h(e,t,o){var a="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var s=Array.isArray(e)&&0<e.length,l=!Array.isArray(t[0]);if(s&&i){for(var u=0;u<e.length;u++)0<u&&(a+=n),a+=m(e[u],u);0<t.length&&(a+=r)}for(var c=0;c<t.length;c++){var p=s?e.length:t[c].length,d=!1,h=s?0===Object.keys(t[c]).length:0===t[c].length;if(o&&!s&&(d="greedy"===o?""===t[c].join("").trim():1===t[c].length&&0===t[c][0].length),"greedy"===o&&s){for(var g=[],f=0;f<p;f++){var y=l?e[f]:f;g.push(t[c][y])}d=""===g.join("").trim()}if(!d){for(var v=0;v<p;v++){0<v&&!h&&(a+=n);var b=s&&l?e[v]:v;a+=m(t[c][b],v)}c<t.length-1&&(!o||0<p&&!h)&&(a+=r)}}return a}function m(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);var i=!1;p&&"string"==typeof e&&p.test(e)&&(e="'"+e,i=!0);var r=e.toString().replace(d,l);return(i=i||!0===o||"function"==typeof o&&o(e,t)||Array.isArray(o)&&o[t]||function(e,t){for(var o=0;o<t.length;o++)if(-1<e.indexOf(t[o]))return!0;return!1}(r,a.BAD_DELIMITERS)||-1<r.indexOf(n)||" "===r.charAt(0)||" "===r.charAt(r.length-1))?s+r+s:r}}};if(a.RECORD_SEP=String.fromCharCode(30),a.UNIT_SEP=String.fromCharCode(31),a.BYTE_ORDER_MARK="\ufeff",a.BAD_DELIMITERS=["\r","\n",'"',a.BYTE_ORDER_MARK],a.WORKERS_SUPPORTED=!o&&!!t.Worker,a.NODE_STREAM_INPUT=1,a.LocalChunkSize=10485760,a.RemoteChunkSize=5242880,a.DefaultDelimiter=",",a.Parser=m,a.ParserHandle=h,a.NetworkStreamer=u,a.FileStreamer=c,a.StringStreamer=p,a.ReadableStreamStreamer=d,t.jQuery){var s=t.jQuery;s.fn.parse=function(e){var o=e.config||{},i=[];return this.each((function(e){if("INPUT"!==s(this).prop("tagName").toUpperCase()||"file"!==s(this).attr("type").toLowerCase()||!t.FileReader||!this.files||0===this.files.length)return!0;for(var n=0;n<this.files.length;n++)i.push({file:this.files[n],inputElem:this,instanceConfig:s.extend({},o)})})),n(),this;function n(){if(0!==i.length){var t,o,n,l=i[0];if(C(e.before)){var u=e.before(l.file,l.inputElem);if("object"==typeof u){if("abort"===u.action)return t=l.file,o=l.inputElem,n=u.reason,void(C(e.error)&&e.error({name:"AbortError"},t,o,n));if("skip"===u.action)return void r();"object"==typeof u.config&&(l.instanceConfig=s.extend(l.instanceConfig,u.config))}else if("skip"===u)return void r()}var c=l.instanceConfig.complete;l.instanceConfig.complete=function(e){C(c)&&c(e,l.file,l.inputElem),r()},a.parse(l.file,l.instanceConfig)}else C(e.complete)&&e.complete()}function r(){i.splice(0,1),n()}}}function l(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=b(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new h(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,o){if(this.isFirstChunk&&C(this._config.beforeFirstChunk)){var n=this._config.beforeFirstChunk(e);void 0!==n&&(e=n)}this.isFirstChunk=!1,this._halted=!1;var r=this._partialLine+e;this._partialLine="";var s=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var l=s.meta.cursor;this._finished||(this._partialLine=r.substring(l-this._baseIndex),this._baseIndex=l),s&&s.data&&(this._rowCount+=s.data.length);var u=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(i)t.postMessage({results:s,workerId:a.WORKER_ID,finished:u});else if(C(this._config.chunk)&&!o){if(this._config.chunk(s,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);s=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(s.data),this._completeResults.errors=this._completeResults.errors.concat(s.errors),this._completeResults.meta=s.meta),this._completed||!u||!C(this._config.complete)||s&&s.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),u||s&&s.meta.paused||this._nextChunk(),s}this._halted=!0},this._sendError=function(e){C(this._config.error)?this._config.error(e):i&&this._config.error&&t.postMessage({workerId:a.WORKER_ID,error:e,finished:!1})}}function u(e){var t;(e=e||{}).chunkSize||(e.chunkSize=a.RemoteChunkSize),l.call(this,e),this._nextChunk=o?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),o||(t.onload=w(this._chunkLoaded,this),t.onerror=w(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!o),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var i in e)t.setRequestHeader(i,e[i])}if(this._config.chunkSize){var n=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+n)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}o&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var o=t.statusText||e;this._sendError(new Error(o))}}function c(e){var t,o;(e=e||{}).chunkSize||(e.chunkSize=a.LocalChunkSize),l.call(this,e);var i="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,o=e.slice||e.webkitSlice||e.mozSlice,i?((t=new FileReader).onload=w(this._chunkLoaded,this),t.onerror=w(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var n=Math.min(this._start+this._config.chunkSize,this._input.size);e=o.call(e,this._start,n)}var r=t.readAsText(e,this._config.encoding);i||this._chunkLoaded({target:{result:r}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function p(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,o=this._config.chunkSize;return o?(e=t.substring(0,o),t=t.substring(o)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function d(e){l.call(this,e=e||{});var t=[],o=!0,i=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){i&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):o=!0},this._streamData=w((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),o&&(o=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=w((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=w((function(){this._streamCleanUp(),i=!0,this._streamData("")}),this),this._streamCleanUp=w((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function h(e){var t,o,i,n=Math.pow(2,53),r=-n,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,l=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,u=this,c=0,p=0,d=!1,h=!1,f=[],y={data:[],errors:[],meta:{}};if(C(e.step)){var v=e.step;e.step=function(t){if(y=t,T())x();else{if(x(),0===y.data.length)return;c+=t.data.length,e.preview&&c>e.preview?o.abort():(y.data=y.data[0],v(y,u))}}}function w(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function x(){return y&&i&&(P("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),i=!1),e.skipEmptyLines&&(y.data=y.data.filter((function(e){return!w(e)}))),T()&&function(){if(y)if(Array.isArray(y.data[0])){for(var t=0;T()&&t<y.data.length;t++)y.data[t].forEach(o);y.data.splice(0,1)}else y.data.forEach(o);function o(t,o){C(e.transformHeader)&&(t=e.transformHeader(t,o)),f.push(t)}}(),function(){if(!y||!e.header&&!e.dynamicTyping&&!e.transform)return y;function t(t,o){var i,n=e.header?{}:[];for(i=0;i<t.length;i++){var r=i,a=t[i];e.header&&(r=i>=f.length?"__parsed_extra":f[i]),e.transform&&(a=e.transform(a,r)),a=S(r,a),"__parsed_extra"===r?(n[r]=n[r]||[],n[r].push(a)):n[r]=a}return e.header&&(i>f.length?P("FieldMismatch","TooManyFields","Too many fields: expected "+f.length+" fields but parsed "+i,p+o):i<f.length&&P("FieldMismatch","TooFewFields","Too few fields: expected "+f.length+" fields but parsed "+i,p+o)),n}var o=1;return!y.data.length||Array.isArray(y.data[0])?(y.data=y.data.map(t),o=y.data.length):y.data=t(y.data,0),e.header&&y.meta&&(y.meta.fields=f),p+=o,y}()}function T(){return e.header&&0===f.length}function S(t,o){return i=t,e.dynamicTypingFunction&&void 0===e.dynamicTyping[i]&&(e.dynamicTyping[i]=e.dynamicTypingFunction(i)),!0===(e.dynamicTyping[i]||e.dynamicTyping)?"true"===o||"TRUE"===o||"false"!==o&&"FALSE"!==o&&(function(e){if(s.test(e)){var t=parseFloat(e);if(r<t&&t<n)return!0}return!1}(o)?parseFloat(o):l.test(o)?new Date(o):""===o?null:o):o;var i}function P(e,t,o,i){var n={type:e,code:t,message:o};void 0!==i&&(n.row=i),y.errors.push(n)}this.parse=function(n,r,s){var l=e.quoteChar||'"';if(e.newline||(e.newline=function(e,t){e=e.substring(0,1048576);var o=new RegExp(g(t)+"([^]*?)"+g(t),"gm"),i=(e=e.replace(o,"")).split("\r"),n=e.split("\n"),r=1<n.length&&n[0].length<i[0].length;if(1===i.length||r)return"\n";for(var a=0,s=0;s<i.length;s++)"\n"===i[s][0]&&a++;return a>=i.length/2?"\r\n":"\r"}(n,l)),i=!1,e.delimiter)C(e.delimiter)&&(e.delimiter=e.delimiter(n),y.meta.delimiter=e.delimiter);else{var u=function(t,o,i,n,r){var s,l,u,c;r=r||[",","\t","|",";",a.RECORD_SEP,a.UNIT_SEP];for(var p=0;p<r.length;p++){var d=r[p],h=0,g=0,f=0;u=void 0;for(var y=new m({comments:n,delimiter:d,newline:o,preview:10}).parse(t),v=0;v<y.data.length;v++)if(i&&w(y.data[v]))f++;else{var b=y.data[v].length;g+=b,void 0!==u?0<b&&(h+=Math.abs(b-u),u=b):u=b}0<y.data.length&&(g/=y.data.length-f),(void 0===l||h<=l)&&(void 0===c||c<g)&&1.99<g&&(l=h,s=d,c=g)}return{successful:!!(e.delimiter=s),bestDelimiter:s}}(n,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);u.successful?e.delimiter=u.bestDelimiter:(i=!0,e.delimiter=a.DefaultDelimiter),y.meta.delimiter=e.delimiter}var c=b(e);return e.preview&&e.header&&c.preview++,t=n,o=new m(c),y=o.parse(t,r,s),x(),d?{meta:{paused:!0}}:y||{meta:{paused:!1}}},this.paused=function(){return d},this.pause=function(){d=!0,o.abort(),t=C(e.chunk)?"":t.substring(o.getCharIndex())},this.resume=function(){u.streamer._halted?(d=!1,u.streamer.parseChunk(t,!0)):setTimeout(u.resume,3)},this.aborted=function(){return h},this.abort=function(){h=!0,o.abort(),y.meta.aborted=!0,C(e.complete)&&e.complete(y),t=""}}function g(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(e){var t,o=(e=e||{}).delimiter,i=e.newline,n=e.comments,r=e.step,s=e.preview,l=e.fastMode,u=t=void 0===e.quoteChar||null===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(u=e.escapeChar),("string"!=typeof o||-1<a.BAD_DELIMITERS.indexOf(o))&&(o=","),n===o)throw new Error("Comment character same as delimiter");!0===n?n="#":("string"!=typeof n||-1<a.BAD_DELIMITERS.indexOf(n))&&(n=!1),"\n"!==i&&"\r"!==i&&"\r\n"!==i&&(i="\n");var c=0,p=!1;this.parse=function(a,d,h){if("string"!=typeof a)throw new Error("Input must be a string");var m=a.length,f=o.length,y=i.length,v=n.length,b=C(r),w=[],x=[],T=[],S=c=0;if(!a)return z();if(e.header&&!d){var P=a.split(i)[0].split(o),E=[],O={},I=!1;for(var V in P){var N=P[V];C(e.transformHeader)&&(N=e.transformHeader(N,V));var A=N,_=O[N]||0;for(0<_&&(I=!0,A=N+"_"+_),O[N]=_+1;E.includes(A);)A=A+"_"+_;E.push(A)}if(I){var L=a.split(i);L[0]=E.join(o),a=L.join(i)}}if(l||!1!==l&&-1===a.indexOf(t)){for(var j=a.split(i),k=0;k<j.length;k++){if(T=j[k],c+=T.length,k!==j.length-1)c+=i.length;else if(h)return z();if(!n||T.substring(0,v)!==n){if(b){if(w=[],Q(T.split(o)),Z(),p)return z()}else Q(T.split(o));if(s&&s<=k)return w=w.slice(0,s),z(!0)}}return z()}for(var M=a.indexOf(o,c),D=a.indexOf(i,c),R=new RegExp(g(u)+g(t),"g"),B=a.indexOf(t,c);;)if(a[c]!==t)if(n&&0===T.length&&a.substring(c,c+v)===n){if(-1===D)return z();c=D+y,D=a.indexOf(i,c),M=a.indexOf(o,c)}else if(-1!==M&&(M<D||-1===D))T.push(a.substring(c,M)),c=M+f,M=a.indexOf(o,c);else{if(-1===D)break;if(T.push(a.substring(c,D)),G(D+y),b&&(Z(),p))return z();if(s&&w.length>=s)return z(!0)}else for(B=c,c++;;){if(-1===(B=a.indexOf(t,B+1)))return h||x.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:w.length,index:c}),U();if(B===m-1)return U(a.substring(c,B).replace(R,t));if(t!==u||a[B+1]!==u){if(t===u||0===B||a[B-1]!==u){-1!==M&&M<B+1&&(M=a.indexOf(o,B+1)),-1!==D&&D<B+1&&(D=a.indexOf(i,B+1));var q=F(-1===D?M:Math.min(M,D));if(a.substr(B+1+q,f)===o){T.push(a.substring(c,B).replace(R,t)),a[c=B+1+q+f]!==t&&(B=a.indexOf(t,c)),M=a.indexOf(o,c),D=a.indexOf(i,c);break}var H=F(D);if(a.substring(B+1+H,B+1+H+y)===i){if(T.push(a.substring(c,B).replace(R,t)),G(B+1+H+y),M=a.indexOf(o,c),B=a.indexOf(t,c),b&&(Z(),p))return z();if(s&&w.length>=s)return z(!0);break}x.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:w.length,index:c}),B++}}else B++}return U();function Q(e){w.push(e),S=c}function F(e){var t=0;if(-1!==e){var o=a.substring(B+1,e);o&&""===o.trim()&&(t=o.length)}return t}function U(e){return h||(void 0===e&&(e=a.substring(c)),T.push(e),c=m,Q(T),b&&Z()),z()}function G(e){c=e,Q(T),T=[],D=a.indexOf(i,c)}function z(e){return{data:w,errors:x,meta:{delimiter:o,linebreak:i,aborted:p,truncated:!!e,cursor:S+(d||0)}}}function Z(){r(z()),w=[],x=[]}},this.abort=function(){p=!0},this.getCharIndex=function(){return c}}function f(e){var t=e.data,o=n[t.workerId],i=!1;if(t.error)o.userError(t.error,t.file);else if(t.results&&t.results.data){var r={abort:function(){i=!0,y(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:v,resume:v};if(C(o.userStep)){for(var a=0;a<t.results.data.length&&(o.userStep({data:t.results.data[a],errors:t.results.errors,meta:t.results.meta},r),!i);a++);delete t.results}else C(o.userChunk)&&(o.userChunk(t.results,r,t.file),delete t.results)}t.finished&&!i&&y(t.workerId,t.results)}function y(e,t){var o=n[e];C(o.userComplete)&&o.userComplete(t),o.terminate(),delete n[e]}function v(){throw new Error("Not implemented.")}function b(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var o in e)t[o]=b(e[o]);return t}function w(e,t){return function(){e.apply(t,arguments)}}function C(e){return"function"==typeof e}return i&&(t.onmessage=function(e){var o=e.data;if(void 0===a.WORKER_ID&&o&&(a.WORKER_ID=o.workerId),"string"==typeof o.input)t.postMessage({workerId:a.WORKER_ID,results:a.parse(o.input,o.config),finished:!0});else if(t.File&&o.input instanceof File||o.input instanceof Object){var i=a.parse(o.input,o.config);i&&t.postMessage({workerId:a.WORKER_ID,results:i,finished:!0})}}),(u.prototype=Object.create(l.prototype)).constructor=u,(c.prototype=Object.create(l.prototype)).constructor=c,(p.prototype=Object.create(p.prototype)).constructor=p,(d.prototype=Object.create(l.prototype)).constructor=d,a})?i.apply(t,n):i)||(e.exports=r)},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e){e.exports=JSON.parse('{"default":{"--sjs-general-backcolor":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dark":"rgba(248, 248, 248, 1)","--sjs-general-backcolor-dim":"rgba(243, 243, 243, 1)","--sjs-general-backcolor-dim-light":"rgba(249, 249, 249, 1)","--sjs-general-backcolor-dim-dark":"rgba(243, 243, 243, 1)","--sjs-general-forecolor":"rgba(0, 0, 0, 0.91)","--sjs-general-forecolor-light":"rgba(0, 0, 0, 0.45)","--sjs-general-dim-forecolor":"rgba(0, 0, 0, 0.91)","--sjs-general-dim-forecolor-light":"rgba(0, 0, 0, 0.45)","--sjs-primary-backcolor":"rgba(25, 179, 148, 1)","--sjs-primary-backcolor-light":"rgba(25, 179, 148, 0.1)","--sjs-primary-backcolor-dark":"rgba(20, 164, 139, 1)","--sjs-primary-forecolor":"rgba(255, 255, 255, 1)","--sjs-primary-forecolor-light":"rgba(255, 255, 255, 0.25)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-secondary-backcolor":"rgba(255, 152, 20, 1)","--sjs-secondary-backcolor-light":"rgba(255, 152, 20, 0.1)","--sjs-secondary-backcolor-semi-light":"rgba(255, 152, 20, 0.25)","--sjs-secondary-forecolor":"rgba(255, 255, 255, 1)","--sjs-secondary-forecolor-light":"rgba(255, 255, 255, 0.25)","--sjs-shadow-small":"0px 1px 2px 0px rgba(0, 0, 0, 0.15)","--sjs-shadow-medium":"0px 2px 6px 0px rgba(0, 0, 0, 0.1)","--sjs-shadow-large":"0px 8px 16px 0px rgba(0, 0, 0, 0.1)","--sjs-shadow-inner":"inset 0px 1px 2px 0px rgba(0, 0, 0, 0.15)","--sjs-border-light":"rgba(0, 0, 0, 0.09)","--sjs-border-default":"rgba(0, 0, 0, 0.16)","--sjs-border-inside":"rgba(0, 0, 0, 0.16)","--sjs-special-red":"rgba(229, 10, 62, 1)","--sjs-special-red-light":"rgba(229, 10, 62, 0.1)","--sjs-special-red-forecolor":"rgba(255, 255, 255, 1)","--sjs-special-green":"rgba(25, 179, 148, 1)","--sjs-special-green-light":"rgba(25, 179, 148, 0.1)","--sjs-special-green-forecolor":"rgba(255, 255, 255, 1)","--sjs-special-blue":"rgba(67, 127, 217, 1)","--sjs-special-blue-light":"rgba(67, 127, 217, 0.1)","--sjs-special-blue-forecolor":"rgba(255, 255, 255, 1)","--sjs-special-yellow":"rgba(255, 152, 20, 1)","--sjs-special-yellow-light":"rgba(255, 152, 20, 0.1)","--sjs-special-yellow-forecolor":"rgba(255, 255, 255, 1)"},"contrast":{"--sjs-general-backcolor-dark":"rgba(228, 228, 228, 1)","--sjs-general-backcolor-dim":"rgba(224, 224, 224, 1)","--sjs-general-backcolor-dim-light":"rgba(238, 238, 238, 1)","--sjs-general-backcolor-dim-dark":"rgba(220, 220, 220, 1)","--sjs-general-forecolor-light":"rgba(0, 0, 0, 0.6)","--sjs-general-dim-forecolor-light":"rgba(0, 0, 0, 0.6)","--sjs-primary-backcolor":"rgba(103, 58, 176, 1)","--sjs-primary-backcolor-light":"rgba(103, 58, 176, 0.1)","--sjs-primary-backcolor-dark":"rgba(69, 24, 142, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 1px rgba(0, 0, 0, 0.2)","--sjs-shadow-inner":"0px 0px 0px 1px rgba(0, 0, 0, 0.25)","--sjs-border-light":"rgba(0, 0, 0, 0.25)","--sjs-border-default":"rgba(0, 0, 0, 0.25)"},"plain":{"--sjs-general-backcolor-dark":"rgba(241, 246, 255, 1)","--sjs-general-backcolor-dim":"rgba(231, 240, 255, 1)","--sjs-general-backcolor-dim-light":"rgba(238, 245, 255, 1)","--sjs-general-backcolor-dim-dark":"rgba(223, 233, 250, 1)","--sjs-general-forecolor-light":"rgba(133, 154, 186, 1)","--sjs-general-dim-forecolor-light":"rgba(133, 154, 186, 1)","--sjs-primary-backcolor":"rgba(35, 101, 200, 1)","--sjs-primary-backcolor-light":"rgba(35, 101, 200, 0.1)","--sjs-primary-backcolor-dark":"rgba(26, 86, 175, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 0px rgba(0, 0, 0, 0.15)","--sjs-shadow-inner":"inset 0px 0px 0px 0px rgba(0, 0, 0, 0.15)","--sjs-border-light":"rgba(220, 229, 241, 1)","--sjs-border-default":"rgba(179, 200, 229, 1)"},"simple":{"--sjs-general-backcolor":"rgba(246, 246, 246, 1)","--sjs-general-backcolor-dark":"rgba(235, 235, 235, 1)","--sjs-general-backcolor-dim":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim-light":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim-dark":"rgba(235, 235, 235, 1)","--sjs-primary-backcolor":"rgba(85, 181, 52, 1)","--sjs-primary-backcolor-light":"rgba(85, 181, 52, 0.1)","--sjs-primary-backcolor-dark":"rgba(64, 159, 31, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 1px rgba(0, 0, 0, 0.15)","--sjs-shadow-medium":"0px 2px 6px 0px rgba(0, 0, 0, 0.1),0px 0px 0px 1px rgba(0, 0, 0, 0.1)","--sjs-shadow-inner":"0px 0px 0px 1px rgba(0, 0, 0, 0.12)","--sjs-border-light":"rgba(0, 0, 0, 0.12)","--sjs-border-default":"rgba(0, 0, 0, 0.12)"},"blank":{"--sjs-general-backcolor":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim-light":"rgba(255, 255, 255, 1)","--sjs-primary-backcolor":"rgba(37, 137, 229, 1)","--sjs-primary-backcolor-light":"rgba(37, 137, 229, 0.1)","--sjs-primary-backcolor-dark":"rgba(21, 119, 209, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 1px rgba(0, 0, 0, 0.15)","--sjs-shadow-medium":"0px 0px 0px 1px rgba(0, 0, 0, 0.1)","--sjs-shadow-large":"0px 8px 16px 0px rgba(0, 0, 0, 0.05)","--sjs-shadow-inner":"0px 0px 0px 1px rgba(0, 0, 0, 0.15)","--sjs-border-light":"rgba(0, 0, 0, 0.15)","--sjs-border-default":"rgba(0, 0, 0, 0.15)"},"double":{"--sjs-general-backcolor":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dark":"rgba(239, 239, 239, 1)","--sjs-general-backcolor-dim":"rgba(245, 245, 245, 1)","--sjs-general-backcolor-dim-light":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim-dark":"rgba(237, 237, 237, 1)","--sjs-primary-backcolor":"rgba(76, 100, 137, 1)","--sjs-primary-backcolor-light":"rgba(76, 100, 137, 0.1)","--sjs-primary-backcolor-dark":"rgba(62, 83, 115, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 2px rgba(0, 0, 0, 0.07)","--sjs-shadow-medium":"0px 2px 6px 0px rgba(0, 0, 0, 0.04),0px 0px 0px 2px rgba(0, 0, 0, 0.08)","--sjs-shadow-large":"0px 8px 16px 0px rgba(0, 0, 0, 0.08)","--sjs-shadow-inner":"0px 0px 0px 2px rgba(0, 0, 0, 0.1)","--sjs-border-light":"rgba(0, 0, 0, 0.1)","--sjs-border-default":"rgba(0, 0, 0, 0.1)"},"bulk":{"--sjs-general-backcolor":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dark":"rgba(244, 244, 244, 1)","--sjs-general-backcolor-dim":"rgba(216, 207, 236, 1)","--sjs-general-backcolor-dim-light":"rgba(241, 237, 248, 1)","--sjs-general-backcolor-dim-dark":"rgba(225, 220, 233, 1)","--sjs-general-dim-forecolor-light":"rgba(0, 0, 0, 0.5)","--sjs-primary-backcolor":"rgba(122, 100, 168, 1)","--sjs-primary-backcolor-light":"rgba(122, 100, 168, 0.1)","--sjs-primary-backcolor-dark":"rgba(105, 84, 152, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 2px 4px 0px rgba(0, 0, 0, 0.1),0px 8px 16px 0px rgba(0, 0, 0, 0.1),0px 0px 0px 1px rgba(0, 0, 0, 0.05)","--sjs-shadow-inner":"inset 0px 1px 4px 0px rgba(0, 0, 0, 0.1),inset 0px 0px 0px 1px rgba(0, 0, 0, 0.05)"},"pseudo-3d":{"--sjs-general-backcolor":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dark":"rgba(243, 243, 243, 1)","--sjs-general-backcolor-dim":"rgba(46, 172, 180, 1)","--sjs-general-backcolor-dim-light":"rgba(245, 245, 245, 1)","--sjs-general-backcolor-dim-dark":"rgba(234, 234, 234, 1)","--sjs-general-forecolor-light":"rgba(0, 0, 0, 0.43)","--sjs-general-dim-forecolor":"rgba(255, 255, 255, 1)","--sjs-general-dim-forecolor-light":"rgba(255, 255, 255, 0.8)","--sjs-primary-backcolor":"rgba(46, 172, 180, 1)","--sjs-primary-backcolor-light":"rgba(46, 172, 180, 0.1)","--sjs-primary-backcolor-dark":"rgba(23, 156, 165, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 2px 0px 0px rgba(0, 0, 0, 0.2)","--sjs-shadow-inner":"inset 0px 2px 0px 0px rgba(0, 0, 0, 0.1)","--sjs-border-light":"rgba(0, 0, 0, 0.09)","--sjs-border-default":"rgba(0, 0, 0, 0.16)"},"playful":{"--sjs-general-backcolor":"rgba(248, 248, 248, 1)","--sjs-general-backcolor-dark":"rgba(242, 242, 242, 1)","--sjs-general-backcolor-dim":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim-light":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim-dark":"rgba(242, 242, 242, 1)","--sjs-primary-backcolor":"rgba(217, 74, 100, 1)","--sjs-primary-backcolor-light":"rgba(217, 74, 100, 0.1)","--sjs-primary-backcolor-dark":"rgba(189, 61, 84, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 2px rgba(228, 228, 228, 1),0px 2px 0px 2px rgba(228, 228, 228, 1)","--sjs-shadow-medium":"0px 8px 0px 2px rgba(228, 228, 228, 1),0px 0px 0px 2px rgba(228, 228, 228, 1)","--sjs-shadow-large":"0px 0px 0px 0px rgba(0, 0, 0, 0.1)","--sjs-shadow-inner":"0px -2px 0px 2px rgba(228, 228, 228, 1),0px 0px 0px 2px rgba(228, 228, 228, 1)","--sjs-border-light":"rgba(0, 0, 0, 0.08)","--sjs-border-default":"rgba(0, 0, 0, 0.08)"},"ultra":{"--sjs-general-backcolor":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dark":"rgba(255, 216, 77, 1)","--sjs-general-backcolor-dim":"rgba(255, 216, 77, 1)","--sjs-general-backcolor-dim-light":"rgba(255, 216, 77, 1)","--sjs-general-backcolor-dim-dark":"rgba(255, 216, 77, 1)","--sjs-general-forecolor":"rgba(0, 0, 0, 1)","--sjs-general-forecolor-light":"rgba(0, 0, 0, 1)","--sjs-general-dim-forecolor":"rgba(0, 0, 0, 1)","--sjs-general-dim-forecolor-light":"rgba(0, 0, 0, 1)","--sjs-primary-backcolor":"rgba(0, 0, 0, 1)","--sjs-primary-backcolor-light":"rgba(255, 216, 77, 1)","--sjs-primary-backcolor-dark":"rgba(83, 83, 83, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 2px rgba(0, 0, 0, 1)","--sjs-shadow-medium":"0px 0px 0px 2px rgba(0, 0, 0, 1)","--sjs-shadow-large":"0px 6px 0px 0px rgba(0, 0, 0, 1)","--sjs-shadow-inner":"0px -2px 0px 2px rgba(0, 0, 0, 1),0px 0px 0px 2px rgba(0, 0, 0, 1)","--sjs-border-light":"rgba(0, 0, 0, 0.2)","--sjs-border-default":"rgba(0, 0, 0, 1)"},"default-dark":{"--sjs-general-backcolor":"rgba(48, 48, 48, 1)","--sjs-general-backcolor-dark":"rgba(52, 52, 52, 1)","--sjs-general-backcolor-dim":"rgba(36, 36, 36, 1)","--sjs-general-backcolor-dim-light":"rgba(43, 43, 43, 1)","--sjs-general-backcolor-dim-dark":"rgba(46, 46, 46, 1)","--sjs-general-forecolor":"rgba(255, 255, 255, 0.78)","--sjs-general-forecolor-light":"rgba(255, 255, 255, 0.42)","--sjs-general-dim-forecolor":"rgba(255, 255, 255, 0.79)","--sjs-general-dim-forecolor-light":"rgba(255, 255, 255, 0.45)","--sjs-primary-backcolor":"rgba(255, 152, 20, 1)","--sjs-primary-backcolor-light":"rgba(255, 255, 255, 0.07)","--sjs-primary-backcolor-dark":"rgba(255, 170, 24, 1)","--sjs-primary-forecolor":"rgba(32, 32, 32, 1)","--sjs-primary-forecolor-light":"rgba(32, 32, 32, 0.25)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-secondary-backcolor":"rgba(255, 152, 20, 1)","--sjs-secondary-backcolor-light":"rgba(255, 152, 20, 0.1)","--sjs-secondary-backcolor-semi-light":"rgba(255, 152, 20, 0.25)","--sjs-secondary-forecolor":"rgba(48, 48, 48, 1)","--sjs-secondary-forecolor-light":"rgba(48, 48, 48, 0.25)","--sjs-shadow-small":"0px 1px 2px 0px rgba(0, 0, 0, 0.35)","--sjs-shadow-medium":"0px 2px 6px 0px rgba(0, 0, 0, 0.2)","--sjs-shadow-large":"0px 8px 16px 0px rgba(0, 0, 0, 0.2)","--sjs-shadow-inner":"inset 0px 1px 2px 0px rgba(0, 0, 0, 0.2)","--sjs-border-light":"rgba(255, 255, 255, 0.08)","--sjs-border-default":"rgba(255, 255, 255, 0.12)","--sjs-border-inside":"rgba(255, 255, 255, 0.08)","--sjs-special-red":"rgba(254, 76, 108, 1)","--sjs-special-red-light":"rgba(254, 76, 108, 0.1)","--sjs-special-red-forecolor":"rgba(48, 48, 48, 1)","--sjs-special-green":"rgba(36, 197, 164, 1)","--sjs-special-green-light":"rgba(36, 197, 164, 0.1)","--sjs-special-green-forecolor":"rgba(48, 48, 48, 1)","--sjs-special-blue":"rgba(91, 151, 242, 1)","--sjs-special-blue-light":"rgba(91, 151, 242, 0.1)","--sjs-special-blue-forecolor":"rgba(48, 48, 48, 1)","--sjs-special-yellow":"rgba(255, 152, 20, 1)","--sjs-special-yellow-light":"rgba(255, 152, 20, 0.1)","--sjs-special-yellow-forecolor":"rgba(48, 48, 48, 1)"},"contrast-dark":{"--sjs-general-backcolor-dark":"rgba(58, 58, 58, 1)","--sjs-general-backcolor-dim":"rgba(27, 27, 27, 1)","--sjs-general-backcolor-dim-light":"rgba(33, 33, 33, 1)","--sjs-general-backcolor-dim-dark":"rgba(47, 47, 47, 1)","--sjs-general-forecolor":"rgba(255, 255, 255, 0.78)","--sjs-general-forecolor-light":"rgba(255, 255, 255, 0.5)","--sjs-general-dim-forecolor":"rgba(255, 255, 255, 0.8)","--sjs-general-dim-forecolor-light":"rgba(255, 255, 255, 0.55)","--sjs-primary-backcolor":"rgba(16, 226, 255, 1)","--sjs-primary-backcolor-light":"rgba(0, 0, 0, 0.35)","--sjs-primary-backcolor-dark":"rgba(129, 240, 255, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 1px rgba(255, 255, 255, 0.28)","--sjs-shadow-medium":"0px 2px 6px 0px rgba(0, 0, 0, 0.2),0px 0px 0px 1px rgba(255, 255, 255, 0.25)","--sjs-shadow-inner":"0px 0px 0px 1px rgba(255, 255, 255, 0.22)","--sjs-border-light":"rgba(255, 255, 255, 0.22)","--sjs-border-default":"rgba(255, 255, 255, 0.22)"},"plain-dark":{"--sjs-general-backcolor":"rgba(43, 48, 63, 1)","--sjs-general-backcolor-dark":"rgba(50, 55, 72, 1)","--sjs-general-backcolor-dim":"rgba(33, 37, 51, 1)","--sjs-general-backcolor-dim-light":"rgba(36, 41, 55, 1)","--sjs-general-backcolor-dim-dark":"rgba(40, 46, 61, 1)","--sjs-general-forecolor-light":"rgba(114, 120, 137, 1)","--sjs-general-dim-forecolor-light":"rgba(114, 120, 137, 1)","--sjs-primary-backcolor":"rgba(114, 187, 255, 1)","--sjs-primary-backcolor-light":"rgba(114, 187, 255, 0.1)","--sjs-primary-backcolor-dark":"rgba(151, 205, 255, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 0px rgba(0, 0, 0, 0.35)","--sjs-shadow-inner":"inset 0px 0px 0px 0px rgba(0, 0, 0, 0.2)","--sjs-border-light":"rgba(55, 62, 79, 1)","--sjs-border-default":"rgba(65, 72, 90, 1)"},"simple-dark":{"--sjs-general-backcolor":"rgba(48, 48, 48, 1)","--sjs-general-backcolor-dark":"rgba(56, 56, 56, 1)","--sjs-general-backcolor-dim":"rgba(36, 36, 36, 1)","--sjs-general-backcolor-dim-light":"rgba(43, 43, 43, 1)","--sjs-general-backcolor-dim-dark":"rgba(52, 52, 52, 1)","--sjs-primary-backcolor":"rgba(92, 214, 49, 1)","--sjs-primary-backcolor-light":"rgba(255, 255, 255, 0.07)","--sjs-primary-backcolor-dark":"rgba(130, 237, 92, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 1px rgba(255, 255, 255, 0.09)","--sjs-shadow-medium":"0px 2px 6px 0px rgba(0, 0, 0, 0.2),0px 0px 0px 1px rgba(255, 255, 255, 0.12)","--sjs-shadow-inner":"0px 0px 0px 1px rgba(255, 255, 255, 0.07)","--sjs-border-light":"rgba(255, 255, 255, 0.07)","--sjs-border-default":"rgba(255, 255, 255, 0.07)"},"blank-dark":{"--sjs-general-backcolor":"rgba(36, 36, 36, 1)","--sjs-general-backcolor-dark":"rgba(47, 47, 47, 1)","--sjs-general-backcolor-dim":"rgba(36, 36, 36, 1)","--sjs-general-backcolor-dim-light":"rgba(36, 36, 36, 1)","--sjs-general-backcolor-dim-dark":"rgba(47, 47, 47, 1)","--sjs-primary-backcolor":"rgba(85, 171, 250, 1)","--sjs-primary-backcolor-light":"rgba(255, 255, 255, 0.12)","--sjs-primary-backcolor-dark":"rgba(126, 193, 255, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 1px rgba(255, 255, 255, 0.12)","--sjs-shadow-medium":"0px 2px 6px 0px rgba(0, 0, 0, 0.2),0px 0px 0px 1px rgba(255, 255, 255, 0.12)","--sjs-shadow-inner":"0px 0px 0px 1px rgba(255, 255, 255, 0.12)","--sjs-border-light":"rgba(255, 255, 255, 0.12)","--sjs-border-default":"rgba(255, 255, 255, 0.12)"},"double-dark":{"--sjs-general-backcolor":"rgba(52, 52, 52, 1)","--sjs-general-backcolor-dark":"rgba(58, 58, 58, 1)","--sjs-general-backcolor-dim":"rgba(47, 47, 47, 1)","--sjs-general-backcolor-dim-light":"rgba(47, 47, 47, 1)","--sjs-general-backcolor-dim-dark":"rgba(53, 53, 53, 1)","--sjs-primary-backcolor":"rgba(120, 156, 210, 1)","--sjs-primary-backcolor-light":"rgba(255, 255, 255, 0.1)","--sjs-primary-backcolor-dark":"rgba(146, 181, 235, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 2px rgba(255, 255, 255, 0.12)","--sjs-shadow-medium":"0px 0px 0px 2px rgba(255, 255, 255, 0.1)","--sjs-shadow-large":"0px 8px 16px 0px rgba(0, 0, 0, 0.1)","--sjs-shadow-inner":"0px 0px 0px 2px rgba(255, 255, 255, 0.1)","--sjs-border-light":"rgba(255, 255, 255, 0.1)","--sjs-border-default":"rgba(255, 255, 255, 0.1)"},"bulk-dark":{"--sjs-general-backcolor":"rgba(39, 40, 50, 1)","--sjs-general-backcolor-dark":"rgba(46, 47, 58, 1)","--sjs-general-backcolor-dim":"rgba(30, 31, 40, 1)","--sjs-general-backcolor-dim-light":"rgba(32, 33, 43, 1)","--sjs-general-backcolor-dim-dark":"rgba(37, 38, 48, 1)","--sjs-general-forecolor":"rgba(213, 215, 238, 1)","--sjs-general-forecolor-light":"rgba(117, 120, 140, 1)","--sjs-general-dim-forecolor":"rgba(213, 215, 238, 1)","--sjs-general-dim-forecolor-light":"rgba(117, 119, 141, 1)","--sjs-primary-backcolor":"rgba(164, 127, 243, 1)","--sjs-primary-backcolor-light":"rgba(164, 127, 243, 0.1)","--sjs-primary-backcolor-dark":"rgba(192, 165, 251, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 2px 4px 0px rgba(0, 0, 0, 0.2),0px 8px 16px 0px rgba(0, 0, 0, 0.15),0px 0px 0px 1px rgba(255, 255, 255, 0.1)","--sjs-shadow-medium":"0px 2px 6px 0px rgba(0, 0, 0, 0.2),inset 0px 0px 0px 1px rgba(255, 255, 255, 0.05)","--sjs-shadow-inner":"inset 0px 1px 4px 0px rgba(0, 0, 0, 0.2),0px 0px 0px 1px rgba(255, 255, 255, 0.03)","--sjs-border-light":"rgba(54, 56, 69, 1)","--sjs-border-default":"rgba(67, 69, 85, 1)"},"pseudo-3d-dark":{"--sjs-general-backcolor":"rgba(53, 55, 63, 1)","--sjs-general-backcolor-dark":"rgba(60, 63, 74, 1)","--sjs-general-backcolor-dim":"rgba(38, 40, 47, 1)","--sjs-general-backcolor-dim-light":"rgba(46, 48, 55, 1)","--sjs-general-backcolor-dim-dark":"rgba(51, 53, 61, 1)","--sjs-general-forecolor-light":"rgba(125, 129, 143, 1)","--sjs-general-dim-forecolor-light":"rgba(125, 130, 148, 1)","--sjs-primary-backcolor":"rgba(58, 202, 211, 1)","--sjs-primary-backcolor-light":"rgba(67, 70, 80, 1)","--sjs-primary-backcolor-dark":"rgba(92, 224, 233, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 2px 0px 0px rgba(33, 35, 43, 1)","--sjs-shadow-inner":"0px -2px 0px 0px rgba(33, 35, 43, 1)","--sjs-border-light":"rgba(65, 69, 83, 1)","--sjs-border-default":"rgba(97, 101, 118, 1)"},"playful-dark":{"--sjs-general-backcolor":"rgba(38, 38, 38, 1)","--sjs-general-backcolor-dark":"rgba(48, 48, 48, 1)","--sjs-general-backcolor-dim":"rgba(28, 28, 28, 1)","--sjs-general-backcolor-dim-light":"rgba(48, 48, 48, 1)","--sjs-general-backcolor-dim-dark":"rgba(58, 58, 58, 1)","--sjs-primary-backcolor":"rgba(243, 87, 134, 1)","--sjs-primary-backcolor-light":"rgba(255, 255, 255, 0.05)","--sjs-primary-backcolor-dark":"rgba(250, 118, 157, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 2px rgba(64, 64, 64, 1),0px 2px 0px 2px rgba(64, 64, 64, 1)","--sjs-shadow-medium":"0px 8px 0px 2px rgba(64, 64, 64, 1),0px 0px 0px 2px rgba(64, 64, 64, 1)","--sjs-shadow-large":"0px 0px 0px 0px rgba(0, 0, 0, 0.1)","--sjs-shadow-inner":"0px 2px 0px 2px rgba(64, 64, 64, 1),0px 0px 0px 2px rgba(64, 64, 64, 1)","--sjs-border-light":"rgba(255, 255, 255, 0.12)","--sjs-border-default":"rgba(255, 255, 255, 0.12)"},"ultra-dark":{"--sjs-general-backcolor":"rgba(255, 216, 77, 1)","--sjs-general-backcolor-dark":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim":"rgba(0, 0, 0, 1)","--sjs-general-backcolor-dim-light":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim-dark":"rgba(255, 255, 255, 1)","--sjs-general-forecolor":"rgba(0, 0, 0, 1)","--sjs-general-forecolor-light":"rgba(0, 0, 0, 1)","--sjs-general-dim-forecolor":"rgba(255, 255, 255, 1)","--sjs-general-dim-forecolor-light":"rgba(255, 255, 255, 1)","--sjs-primary-backcolor":"rgba(0, 0, 0, 1)","--sjs-primary-backcolor-light":"rgba(255, 255, 255, 1)","--sjs-primary-backcolor-dark":"rgba(53, 53, 53, 1)","--sjs-primary-forecolor":"rgba(255, 255, 255, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 2px rgba(0, 0, 0, 1)","--sjs-shadow-medium":"0px 0px 0px 2px rgba(0, 0, 0, 1)","--sjs-shadow-large":"0px 6px 0px 0px rgba(0, 0, 0, 1)","--sjs-shadow-inner":"0px -2px 0px 2px rgba(0, 0, 0, 1),0px 0px 0px 2px rgba(0, 0, 0, 1)","--sjs-border-light":"rgba(232, 192, 51, 1)","--sjs-border-default":"rgba(0, 0, 0, 1)"},"default-lw":{"--sjs-general-backcolor-dim":"rgba(255, 255, 255, 1)"},"contrast-lw":{"--sjs-general-backcolor-dim":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim-light":"rgba(238, 238, 238, 1)"},"plain-lw":{"--sjs-general-backcolor":"rgba(231, 240, 255, 1)","--sjs-general-backcolor-dark":"rgba(220, 232, 252, 1)","--sjs-general-backcolor-dim":"rgba(231, 240, 255, 1)","--sjs-general-backcolor-dim-light":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim-dark":"rgba(220, 232, 252, 1)"},"simple-lw":{"--sjs-general-backcolor-dim":"rgba(246, 246, 246, 1)"},"double-lw":{"--sjs-general-backcolor-dim":"rgba(245, 245, 245, 1)"},"bulk-lw":{"--sjs-general-backcolor-dim":"rgba(255, 255, 255, 1)"},"pseudo-3d-lw":{"--sjs-general-backcolor-dim":"rgba(255, 255, 255, 1)","--sjs-general-dim-forecolor":"rgba(0, 0, 0, 0.91)","--sjs-general-dim-forecolor-light":"rgba(0, 0, 0, 0.45)"},"playful-lw":{"--sjs-general-backcolor-dim":"rgba(248, 248, 248, 1)"},"ultra-lw":{"--sjs-general-backcolor-dim":"rgba(255, 255, 255, 1)"},"default-dark-lw":{"--sjs-general-backcolor-dim":"rgba(48, 48, 48, 1)"},"contrast-dark-lw":{"--sjs-general-backcolor-dim":"rgba(48, 48, 48, 1)","--sjs-general-backcolor-dim-light":"rgba(33, 33, 33, 1)"},"plain-dark-lw":{"--sjs-general-backcolor-dim":"rgba(43, 48, 63, 1)"},"simple-dark-lw":{"--sjs-general-backcolor-dim":"rgba(48, 48, 48, 1)"},"double-dark-lw":{"--sjs-general-backcolor-dim":"rgba(52, 52, 52, 1)"},"bulk-dark-lw":{"--sjs-general-backcolor-dim":"rgba(39, 40, 50, 1)"},"pseudo-3d-dark-lw":{"--sjs-general-backcolor-dim":"rgba(53, 55, 63, 1)"},"ultra-dark-lw":{"--sjs-general-backcolor-dim":"rgba(255, 216, 77, 1)","--sjs-general-dim-forecolor":"rgba(0, 0, 0, 1)","--sjs-general-dim-forecolor-light":"rgba(0, 0, 0, 1)"},"dark-designer":{"--sjs-primary-backcolor":"rgba(36, 197, 164, 1)","--sjs-primary-backcolor-light":"rgba(36, 197, 164, 0.1)","--sjs-primary-backcolor-dark":"rgba(44, 206, 173, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px"}}')},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){var i={"./add-lg.svg":33,"./add.svg":34,"./add_16x16.svg":35,"./apply.svg":36,"./arrow-down.svg":37,"./arrow-left.svg":38,"./arrow-left_16x16.svg":39,"./arrow-right.svg":40,"./arrow-right_16x16.svg":41,"./arrow-up.svg":42,"./boolean.svg":43,"./change-question-type_16x16.svg":44,"./checkbox.svg":45,"./checked.svg":46,"./clear.svg":47,"./clear_16x16.svg":48,"./collapse-detail-light_16x16.svg":49,"./collapse-detail_16x16.svg":50,"./collapse-panel.svg":51,"./collapse_16x16.svg":52,"./color-picker.svg":53,"./comment.svg":54,"./default.svg":55,"./delete_16x16.svg":56,"./description-hide.svg":57,"./description.svg":58,"./device-desktop.svg":59,"./device-phone.svg":60,"./device-rotate.svg":61,"./device-tablet.svg":62,"./download.svg":63,"./drag-area-indicator.svg":64,"./drag-area-indicator_24x16.svg":65,"./drop-down-arrow.svg":66,"./drop-down-arrow_16x16.svg":67,"./dropdown.svg":68,"./duplicate_16x16.svg":69,"./edit.svg":70,"./edit_16x16.svg":71,"./editing-finish.svg":72,"./expand-detail-light_16x16.svg":73,"./expand-detail_16x16.svg":74,"./expand-panel.svg":75,"./expand_16x16.svg":76,"./export.svg":77,"./expression.svg":78,"./fast-entry.svg":79,"./file.svg":80,"./html.svg":81,"./image.svg":82,"./imagepicker.svg":83,"./import.svg":84,"./invisible-items.svg":85,"./keyboard-dragging.svg":86,"./language.svg":87,"./load.svg":88,"./logic-collapse.svg":89,"./logic-expand.svg":90,"./logo.svg":91,"./matrix.svg":92,"./matrixdropdown.svg":93,"./matrixdynamic.svg":94,"./multipletext.svg":95,"./next_16x16.svg":96,"./panel.svg":97,"./paneldynamic.svg":98,"./preview.svg":99,"./previous_16x16.svg":100,"./radiogroup.svg":101,"./ranking.svg":102,"./rating.svg":103,"./redo.svg":104,"./remove_16x16.svg":105,"./reset.svg":106,"./save.svg":107,"./select-page.svg":108,"./settings.svg":109,"./settings_16x16.svg":110,"./signaturepad.svg":111,"./switch-active_16x16.svg":112,"./switch-inactive_16x16.svg":113,"./tagbox.svg":114,"./text.svg":115,"./theme.svg":116,"./toolbox.svg":117,"./undo.svg":118,"./visible.svg":119,"./wizard.svg":120};function n(e){var t=r(e);return o(t)}function r(e){if(!o.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}n.keys=function(){return Object.keys(i)},n.resolve=r,e.exports=n,n.id=32},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13 11H17V13H13V17H11V13H7V11H11V7H13V11ZM24 12C24 18.6 18.6 24 12 24C5.4 24 0 18.6 0 12C0 5.4 5.4 0 12 0C18.6 0 24 5.4 24 12ZM22 12C22 6.5 17.5 2 12 2C6.5 2 2 6.5 2 12C2 17.5 6.5 22 12 22C17.5 22 22 17.5 22 12Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13 11H17V13H13V17H11V13H7V11H11V7H13V11ZM23 12C23 18.1 18.1 23 12 23C5.9 23 1 18.1 1 12C1 5.9 5.9 1 12 1C18.1 1 23 5.9 23 12ZM21 12C21 7 17 3 12 3C7 3 3 7 3 12C3 17 7 21 12 21C17 21 21 17 21 12Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M9 7H12V9H9V12H7V9H4V7H7V4H9V7ZM16 8C16 12.4 12.4 16 8 16C3.6 16 0 12.4 0 8C0 3.6 3.6 0 8 0C12.4 0 16 3.6 16 8ZM14 8C14 4.7 11.3 2 8 2C4.7 2 2 4.7 2 8C2 11.3 4.7 14 8 14C11.3 14 14 11.3 14 8Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 1C5.9 1 1 5.9 1 12C1 18.1 5.9 23 12 23C18.1 23 23 18.1 23 12C23 5.9 18.1 1 12 1ZM12 21C7 21 3 17 3 12C3 7 7 3 12 3C17 3 21 7 21 12C21 17 17 21 12 21ZM16.3 8L17.7 9.4L10 17.1L6.3 13.4L7.7 12L10 14.3L16.3 8Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17.01 11.59L13.01 15.59V6H11.01V15.59L7.00998 11.59L5.59998 13L12.01 19.41L18.43 13L17.01 11.59Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M10.4 2.60001L11.8 4.00001L4.8 11H22V13H4.8L11.8 20L10.4 21.4L1 12L10.4 2.60001Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M15 8.99999H4.39998L8.69998 13.3L7.29998 14.7L0.599976 7.99999L7.29998 1.29999L8.69998 2.69999L4.39998 6.99999H15V8.99999V8.99999Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13.6 2.60001L12.2 4.00001L19.2 11H2V13H19.2L12.2 20L13.6 21.4L23 12L13.6 2.60001Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M1 6.99999H11.6L7.3 2.69999L8.7 1.29999L15.4 7.99999L8.7 14.7L7.3 13.3L11.6 8.99999H1V6.99999Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M18.43 11.01L12.01 4.60001L5.59998 11.01L7.00998 12.43L11.01 8.43001V18.01H13.01V8.43001L17.01 12.43L18.43 11.01Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 11H17C19.8 11 22 8.8 22 6C22 3.2 19.8 1 17 1H7C4.2 1 2 3.2 2 6C2 8.8 4.2 11 7 11ZM7 3H17C18.7 3 20 4.3 20 6C20 7.7 18.7 9 17 9H7C5.3 9 4 7.7 4 6C4 4.3 5.3 3 7 3ZM5 6C5 4.9 5.9 4 7 4C8.1 4 9 4.9 9 6C9 7.1 8.1 8 7 8C5.9 8 5 7.1 5 6ZM19 18C19 19.1 18.1 20 17 20C15.9 20 15 19.1 15 18C15 16.9 15.9 16 17 16C18.1 16 19 16.9 19 18ZM17 13H7C4.2 13 2 15.2 2 18C2 20.8 4.2 23 7 23H17C19.8 23 22 20.8 22 18C22 15.2 19.8 13 17 13ZM17 21H7C5.3 21 4 19.7 4 18C4 16.3 5.3 15 7 15H17C18.7 15 20 16.3 20 18C20 19.7 18.7 21 17 21Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M15 2V7H10L12 5C11.1 3.8 9.6 3 8 3C5.2 3 3 5.2 3 8H1C1 4.1 4.1 1 8 1C10.2 1 12.1 2 13.4 3.6L15 2ZM8 13C6.4 13 4.9 12.2 4 11L6 9H1V14L2.6 12.4C3.9 14 5.8 15 8 15C11.9 15 15 11.9 15 8H13C13 10.8 10.8 13 8 13Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M19 8.90001L21 6.10001V19C21 20.1 20.1 21 19 21H5C3.9 21 3 20.1 3 19V5.00001C3 3.90001 3.9 3.00001 5 3.00001H19C19 3.00001 19 3.00001 19.1 3.00001L20.8 0.600006L22.4 1.80001L11.1 17.5L6.6 13L8 11.6L10.9 14.5L17.7 5.00001H5V19H19V8.90001Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9 20.1L1 12L3.1 9.9L9 15.9L20.9 4L23 6.1L9 20.1Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22.6 8.6L16.4 2.4C16 2 15.5 1.8 15 1.8C14.5 1.8 14 2 13.6 2.4L1.4 14.6C0.600003 15.4 0.600003 16.6 1.4 17.4L6 22H12L22.6 11.4C23.3 10.6 23.3 9.3 22.6 8.6ZM11.1 20H6.8L2.8 16L6.2 12.6L12.4 18.8L11.1 20ZM13.8 17.4L7.6 11.2L15 3.8L21.2 10L13.8 17.4ZM16 20H23V22H14L16 20Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13.35 3.34999L12.65 2.64999L8.05002 7.24999L3.35002 2.64999L2.65002 3.34999L7.25002 8.04999L2.65002 12.65L3.35002 13.35L8.05002 8.74999L12.65 13.35L13.35 12.65L8.75002 8.04999L13.35 3.34999Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13 7H3V9H13V7Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M12 9H4V7H12V9ZM16 0V16H0V0H16ZM14 2H2V14H14V2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13 5.6L19.4 12L13 18.4L11.6 17L15.6 13H2V11H15.6L11.6 7L13 5.6ZM20 2V22H22V2H20Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M2 6L3 5L8 10L13 5L14 6L8 12L2 6Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M3.31 15.0002C2.69 15.0002 2.11 14.7602 1.68 14.3202C0.780005 13.4202 0.780005 11.9502 1.68 11.0502L2.45 10.2802C2.45 10.1802 2.44 10.0802 2.44 9.98023C2.44 9.02023 2.81 8.12023 3.49 7.44023L5.6 5.33023C5.37 5.04023 5.25 4.68023 5.25 4.31023C5.25 3.86023 5.42 3.44023 5.74 3.12023C6.06 2.80023 6.48 2.63023 6.92 2.63023C7.29 2.63023 7.65 2.75023 7.94 2.98023L8.88 2.04023C9.56 1.36023 10.46 0.990234 11.41 0.990234C12.36 0.990234 13.27 1.36023 13.95 2.04023C14.63 2.72023 15 3.62023 15 4.58023C15 5.54023 14.63 6.44023 13.95 7.12023L12.94 8.13023C13.04 8.34023 13.09 8.58023 13.09 8.82023C13.09 9.27023 12.92 9.69023 12.6 10.0002C12.28 10.3102 11.86 10.4902 11.42 10.4902C11.18 10.4902 10.94 10.4402 10.73 10.3402L8.56 12.5102C7.88 13.1902 6.98 13.5602 6.03 13.5602C5.93 13.5602 5.83 13.5602 5.73 13.5402L4.97 14.3002C4.53 14.7402 3.95 14.9802 3.34 14.9802L3.31 15.0002Z" fill="black" fill-opacity="0.15"></path><path d="M14.0001 4.57969C14.0001 3.88969 13.7301 3.23969 13.2401 2.74969C12.2301 1.73969 10.5901 1.73969 9.58006 2.74969L7.94006 4.38969L7.39006 3.83969C7.13006 3.57969 6.70006 3.57969 6.44006 3.83969C6.18006 4.09969 6.18006 4.52969 6.44006 4.78969L6.99006 5.33969L4.18006 8.14969C3.69006 8.63969 3.42006 9.28969 3.42006 9.97969C3.42006 10.1997 3.46006 10.4097 3.51006 10.6197L2.38006 11.7497C1.87006 12.2597 1.87006 13.0897 2.38006 13.6097C2.64006 13.8697 2.97006 13.9897 3.31006 13.9897C3.65006 13.9897 3.98006 13.8597 4.24006 13.6097L5.37006 12.4797C5.58006 12.5297 5.79006 12.5697 6.01006 12.5697C6.70006 12.5697 7.35006 12.2997 7.84006 11.8097L10.6501 8.99969L10.9401 9.28969C11.0701 9.41969 11.2401 9.48969 11.4201 9.48969C11.6001 9.48969 11.7701 9.41969 11.9001 9.28969C12.1601 9.02969 12.1601 8.59969 11.9001 8.33969L11.6101 8.04969L13.2501 6.40969C13.7401 5.91969 14.0101 5.26969 14.0101 4.57969H14.0001ZM6.89006 10.8597C6.42006 11.3297 5.61006 11.3297 5.14006 10.8597C4.91006 10.6297 4.78006 10.3197 4.78006 9.98969C4.78006 9.65969 4.91006 9.34969 5.14006 9.11969L7.95006 6.30969L9.70006 8.05969L6.89006 10.8697V10.8597Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 3H4C2.9 3 2 3.9 2 5V19C2 20.1 2.9 21 4 21H20C21.1 21 22 20.1 22 19V5C22 3.9 21.1 3 20 3ZM20 19H4V5H20V19ZM18 9H6V7H18V9ZM18 13H6V11H18V13ZM12 17H6V15H12V17Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 4C16.41 4 20 7.14 20 11C19.9901 11.928 19.7826 12.8433 19.3911 13.6847C18.9997 14.5262 18.4334 15.2746 17.73 15.88C17.5103 16.0801 17.338 16.3266 17.2256 16.6017C17.1132 16.8767 17.0634 17.1733 17.08 17.47C16.7752 17.2972 16.4304 17.2076 16.08 17.21C15.8237 17.212 15.5698 17.2594 15.33 17.35C14.2722 17.7789 13.1415 17.9996 12 18C7.59 18 4 14.86 4 11C4 7.14 7.59 4 12 4ZM12 2C6.48 2 2 6 2 11C2 16 6.48 20 12 20C13.4012 19.9996 14.7894 19.7314 16.09 19.21L20 22L19.07 17.36C19.9796 16.5667 20.711 15.5899 21.216 14.4937C21.721 13.3975 21.9882 12.2069 22 11C22 6 17.52 2 12 2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M15 2H14H11V1C11 0.4 10.6 0 10 0H7C6.4 0 6 0.4 6 1V2H3H2V4H3V14C3 15.1 3.9 16 5 16H12C13.1 16 14 15.1 14 14V4H15V2ZM7 1H10V2H7V1ZM12 14H5V4H12V14ZM7 13H6V5H7V13ZM9 13H8V5H9V13ZM11 13H10V5H11V13Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2.3 3.7L3.6 5C2 6.9 1 9.3 1 12C1 18.1 5.9 23 12 23C14.7 23 17.1 22 19 20.4L20.3 21.7L21.7 20.3L3.7 2.3L2.3 3.7ZM12 21C7 21 3 17 3 12C3 9.9 3.7 7.9 5 6.4L10.8 12.2C10.7 12.3 10.6 12.4 10.6 12.5C10.5 12.7 10.4 13 10.4 13.3C10.4 13.6 10.5 13.9 10.6 14.1C10.7 14.3 10.8 14.5 10.9 14.8C11 15 11.2 15.1 11.4 15.1C11.5 15.1 11.5 15.1 11.6 15.1H11.7C11.8 15.1 11.9 15.1 12.1 15C12.4 14.9 12.6 14.7 12.6 14.5V14.4V14.1L17.5 19C16.1 20.3 14.1 21 12 21ZM7.8 4.1L6.3 2.6C8 1.6 9.9 1 12 1C18.1 1 23 5.9 23 12C23 14.1 22.4 16 21.4 17.7L19.9 16.2C20.6 15 21 13.5 21 12C21 7 17 3 12 3C10.5 3 9 3.4 7.8 4.1ZM13.5 9.8C13.5 9.7 13.6 9.6 13.6 9.4C13.6 9 13.5 8.6 13.2 8.4C12.8 8 12.4 7.9 12 7.9C11.9 7.9 11.8 7.9 11.6 7.9L10.1 6.4C10.2 6.4 10.2 6.3 10.3 6.3C11.5 5.9 12.7 5.9 13.6 6.1C14.1 6.2 14.5 6.4 14.9 6.6C15.6 7.3 16 8.1 16 9.3C16 10.1 15.7 10.8 15.2 11.4L13.5 9.8ZM11.8 15.9C12.5 15.9 13 16.2 13.3 16.8C13.4 17 13.4 17.2 13.4 17.4C13.4 17.8 13.2 18.2 13 18.5C12.7 18.8 12.3 18.9 11.9 18.9C11.5 18.9 11.1 18.7 10.8 18.5C10.5 18.2 10.4 17.8 10.4 17.4C10.4 17 10.6 16.6 10.8 16.3C11 16 11.4 15.9 11.8 15.9Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 1C5.9 1 1 5.9 1 12C1 18.1 5.9 23 12 23C18.1 23 23 18.1 23 12C23 5.9 18.1 1 12 1ZM12 21C7 21 3 17 3 12C3 7 7 3 12 3C17 3 21 7 21 12C21 17 17 21 12 21ZM13.3 16.8C13.4 17 13.4 17.2 13.4 17.4C13.4 17.8 13.2 18.2 13 18.5C12.7 18.8 12.3 18.9 11.9 18.9C11.5 18.9 11.1 18.7 10.8 18.5C10.5 18.2 10.4 17.8 10.4 17.4C10.4 17 10.6 16.6 10.8 16.3C11.1 16 11.5 15.8 11.9 15.8C12.5 15.9 13 16.2 13.3 16.8ZM16 9.3C16 10.4 15.5 11.2 14.6 11.9C14.4 12.1 14.1 12.2 13.9 12.4L13.3 12.8C13 13 12.9 13.1 12.9 13.1C12.8 13.2 12.8 13.3 12.8 13.4C12.8 13.6 12.7 13.8 12.7 14.1V14.4V14.5C12.6 14.7 12.4 14.9 12.2 15C12 15.1 11.9 15.1 11.8 15.1H11.7C11.6 15.1 11.6 15.1 11.5 15.1C11.3 15 11.1 14.9 11 14.8C10.9 14.6 10.7 14.4 10.7 14.1C10.6 13.8 10.5 13.6 10.5 13.3C10.5 13 10.6 12.7 10.7 12.5C10.8 12.3 11 12.1 11.2 11.9C11.4 11.7 11.6 11.6 11.8 11.5L12.4 11.2C13 10.9 13.2 10.7 13.3 10.6C13.6 10.3 13.7 9.9 13.7 9.5C13.7 9.1 13.6 8.7 13.3 8.5C12.8 8 12.4 7.9 12 7.9C10.9 7.9 10.6 8.4 10.6 8.8C10.4 9.3 10.4 9.4 10.4 9.4V9.6C10.4 9.7 10.4 9.7 10.4 9.8L10.5 10.2L10.2 10.3C9.6 10.6 9.1 10.6 8.7 10.4C8.6 10.3 8.4 10.1 8.3 10C8.1 9.7 8 9.4 8 9C8 8.6 8.1 8.3 8.2 8C8.3 7.7 8.5 7.5 8.7 7.3C8.9 7.1 9.1 6.9 9.4 6.7C9.7 6.6 10 6.4 10.3 6.3C11.5 5.9 12.7 5.9 13.6 6.1C14.1 6.2 14.5 6.4 14.9 6.6C15.6 7.3 16 8.1 16 9.3Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22 17V2H2V17H10V19C10 19.7956 9.68393 20.5587 9.12132 21.1213C8.55871 21.6839 7.79565 22 7 22H17C16.2044 22 15.4413 21.6839 14.8787 21.1213C14.3161 20.5587 14 19.7956 14 19V17H22ZM4 4H20V15H4V4Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M16 18H8V6H16V18ZM16 2H8C7.46957 2 6.96086 2.21071 6.58579 2.58579C6.21071 2.96086 6 3.46957 6 4V20C6 20.5304 6.21071 21.0391 6.58579 21.4142C6.96086 21.7893 7.46957 22 8 22H16C16.5304 22 17.0391 21.7893 17.4142 21.4142C17.7893 21.0391 18 20.5304 18 20V4C18 3.46957 17.7893 2.96086 17.4142 2.58579C17.0391 2.21071 16.5304 2 16 2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M23.41 5.99591L18 11.4059L16.59 9.99591L19.59 6.99591H17C13.5522 6.99591 10.2456 8.36555 7.80761 10.8035C5.36964 13.2415 4 16.5481 4 19.9959V21.9959H2V19.9959C2 16.0177 3.58035 12.2024 6.3934 9.38931C9.20644 6.57626 13.0218 4.99591 17 4.99591H19.59L16.59 1.99591L18 0.585907L23.41 5.99591Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 18H4V6H20V18ZM21 4H3C2.46957 4 1.96086 4.21071 1.58579 4.58579C1.21071 4.96086 1 5.46957 1 6V18C1 18.5304 1.21071 19.0391 1.58579 19.4142C1.96086 19.7893 2.46957 20 3 20H21C21.5304 20 22.0391 19.7893 22.4142 19.4142C22.7893 19.0391 23 18.5304 23 18V6C23 5.46957 22.7893 4.96086 22.4142 4.58579C22.0391 4.21071 21.5304 4 21 4Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 18.41L4.59 11L6 9.59L11 14.59V2H13V14.59L18 9.59L19.41 11L12 18.41ZM2 20V22H22V20H2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13 6C13 4.9 13.9 4 15 4C16.1 4 17 4.9 17 6C17 7.1 16.1 8 15 8C13.9 8 13 7.1 13 6ZM9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM9 10C7.9 10 7 10.9 7 12C7 13.1 7.9 14 9 14C10.1 14 11 13.1 11 12C11 10.9 10.1 10 9 10ZM15 16C13.9 16 13 16.9 13 18C13 19.1 13.9 20 15 20C16.1 20 17 19.1 17 18C17 16.9 16.1 16 15 16ZM9 16C7.9 16 7 16.9 7 18C7 19.1 7.9 20 9 20C10.1 20 11 19.1 11 18C11 16.9 10.1 16 9 16Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 16" xmlns="http://www.w3.org/2000/svg"><path d="M18 9C19.1 9 20 9.9 20 11C20 12.1 19.1 13 18 13C16.9 13 16 12.1 16 11C16 9.9 16.9 9 18 9ZM20 5C20 3.9 19.1 3 18 3C16.9 3 16 3.9 16 5C16 6.1 16.9 7 18 7C19.1 7 20 6.1 20 5ZM14 11C14 9.9 13.1 9 12 9C10.9 9 10 9.9 10 11C10 12.1 10.9 13 12 13C13.1 13 14 12.1 14 11ZM14 5C14 3.9 13.1 3 12 3C10.9 3 10 3.9 10 5C10 6.1 10.9 7 12 7C13.1 7 14 6.1 14 5ZM8 11C8 9.9 7.1 9 6 9C4.9 9 4 9.9 4 11C4 12.1 4.9 13 6 13C7.1 13 8 12.1 8 11ZM8 5C8 3.9 7.1 3 6 3C4.9 3 4 3.9 4 5C4 6.1 4.9 7 6 7C7.1 7 8 6.1 8 5Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 15L17 10H7L12 15Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8 11L13 6H3L8 11Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 2H4C2.9 2 2 2.9 2 4V6C2 7.1 2.9 8 4 8V20C4 21.1 4.9 22 6 22H20C21.1 22 22 21.1 22 20V8V6V4C22 2.9 21.1 2 20 2ZM20 20H6V8H20V20ZM4 6V4H20V6H4ZM18 12H8V10H18V12ZM18 16H8V14H18V16Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_9500_71113)"><path d="M14 0H6C5.46957 0 4.96086 0.210714 4.58579 0.585786C4.21071 0.960859 4 1.46957 4 2V4H2C1.46957 4 0.960859 4.21071 0.585786 4.58579C0.210714 4.96086 0 5.46957 0 6L0 14C0 14.5304 0.210714 15.0391 0.585786 15.4142C0.960859 15.7893 1.46957 16 2 16H10C10.5304 16 11.0391 15.7893 11.4142 15.4142C11.7893 15.0391 12 14.5304 12 14V12H14C14.5304 12 15.0391 11.7893 15.4142 11.4142C15.7893 11.0391 16 10.5304 16 10V2C16 1.46957 15.7893 0.960859 15.4142 0.585786C15.0391 0.210714 14.5304 0 14 0V0ZM10 14H2V6H10V14ZM14 10H12V6C12 5.46957 11.7893 4.96086 11.4142 4.58579C11.0391 4.21071 10.5304 4 10 4H6V2H14V10Z"></path></g><defs><clipPath id="clip0_9500_71113"><rect width="16" height="16"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M21.9 4.8L19.1 2C18.5 1.5 17.8 1.2 17 1.2C16.2 1.2 15.5 1.5 14.9 2.1L4.6 12.3C2.9 14 2 16.3 2 18.7V21C2 21.6 2.4 22 3 22H5.3C7.7 22 10 21.1 11.7 19.4L21.9 9.1C23.1 7.9 23.1 6 21.9 4.8ZM10.2 17.9C8.9 19.2 7.1 20 5.3 20H4V18.7C4 16.8 4.7 15.1 6.1 13.8L12.3 7.6L16.5 11.8L10.2 17.9ZM20.5 7.7L17.8 10.4L13.6 6.2L16.3 3.5C16.5 3.2 16.8 3.2 17 3.2C17.2 3.2 17.5 3.2 17.7 3.5L20.5 6.3C20.9 6.6 20.9 7.3 20.5 7.7Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_2693_58208)"><path d="M15.3 2.8L13.2 0.7C12.7 0.2 12.2 0 11.6 0C11 0 10.4 0.2 10 0.7L2 8.6C0.7 9.9 0 11.7 0 13.5V15.3C0 15.7 0.3 16 0.8 16H2.6C4.4 16 6.2 15.3 7.5 14L15.4 6.1C16.2 5.2 16.2 3.7 15.3 2.8ZM6 12.6C5.1 13.5 3.8 14 2.5 14H2V13.5C2 12.2 2.5 10.9 3.4 10L8 5.4L10.6 8L6 12.6ZM13.9 4.7L12 6.6L9.4 4L11.3 2.1C11.4 2 11.5 2 11.6 2C11.7 2 11.7 2 11.8 2.1L13.9 4.2C14 4.3 14 4.5 13.9 4.7Z"></path></g><defs><clipPath id="clip0_2693_58208"><rect width="16" height="16"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2.3 3.7L7.8 9.2L4.6 12.4C2.9 14.1 2 16.4 2 18.8V21.1C2 21.7 2.4 22.1 3 22.1H5.3C7.7 22.1 10 21.2 11.7 19.5L14.9 16.3L20.4 21.8L21.8 20.4L3.8 2.4L2.3 3.7ZM10.2 17.9C8.9 19.2 7.1 20 5.3 20H4V18.7C4 16.8 4.7 15.1 6.1 13.8L9.3 10.6L13.5 14.8L10.2 17.9ZM21.9 9.1L17.2 13.8L15.8 12.4L20.5 7.7C20.9 7.3 20.9 6.7 20.5 6.3L17.7 3.5C17.5 3.2 17.2 3.2 17 3.2C16.8 3.2 16.5 3.2 16.3 3.5L11.6 8.2L10.2 6.8L14.9 2.1C15.5 1.5 16.2 1.2 17 1.2C17.8 1.2 18.5 1.5 19.1 2.1L21.9 4.9C23.1 6 23.1 7.9 21.9 9.1Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13 7H9V3H7V7H3V9H7V13H9V9H13V7Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M7 9H4V7H7V4H9V7H12V9H9V12H7V9ZM16 0V16H0V0H16ZM14 2H2V14H14V2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M19.9959 2H14.9959V22H21.9959V2H19.9959ZM19.9959 20H16.9959V4H19.9959V20ZM4.40588 11H12.9959V13H4.40588L8.40588 17L6.99588 18.41L0.585876 12L6.99588 5.59L8.40588 7L4.40588 11Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M6 14L5 13L10 8L5 3L6 2L12 8L6 14Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 10.4059L4.59 8.99591L12 1.58591L19.41 8.99591L18 10.4059L13 5.40591V17.9959H11V5.40591L6 10.4059ZM2 19.9959V21.9959H22V19.9959H2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 0.5C19.4 0.2 18.7 0 17.8 0C15.9 0 14.3 0.8 13 2.3C11.5 4.1 10.1 7.1 9 11.5H6.2L5.8 13H8.5L8.3 14C8.2 14.4 8.1 14.9 7.9 15.7C7.7 16.4 7.6 17.1 7.5 17.6C6.8 20.6 6.1 21.9 5.6 22.4C5.6 22.1 5.5 21.8 5.2 21.6C4.7 21.3 3.8 21.2 3.3 21.8C3.1 22 3 22.4 3 22.7C3 23.1 3.1 23.4 3.4 23.6C3.7 23.9 4.2 24 4.8 24C5.4 24 6 23.9 6.5 23.6C7.9 23 9 21.7 9.8 19.6C10.2 18.5 10.8 16.7 11.4 14.1L11.7 12.9H15.1L15.5 11.4H12.1C13.1 7.2 14.2 4.2 15.3 2.7C15.6 2.3 15.9 2 16.2 1.8C16.6 1.5 16.8 1.5 17 1.5C17.2 1.5 17.4 1.5 17.7 1.6C17.5 1.9 17.5 2.2 17.5 2.5C17.5 2.9 17.7 3.3 18 3.6C18.7 4.1 19.8 4.1 20.5 3.6C20.8 3.2 21 2.8 21 2.3C21 1.5 20.7 0.9 20 0.5Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13 5H2V3H13V5ZM10 7H2V9H10V7ZM2 17H10V15H2V17ZM13 11H2V13H13V11ZM23.4 14.9L17 21.3C16 22.4 14.5 23 13 23H11.6C11.3 23 11 22.7 11 22.4V21C11 19.5 11.6 18.1 12.7 17L19.1 10.6C19.4 10.2 19.9 10 20.4 10C20.9 10 21.4 10.2 21.7 10.6L23.4 12.3C24.2 13 24.2 14.2 23.4 14.9ZM21.9 13.6L20.3 12L14 18.3C13.4 19.1 13 20 13 21C14 21 14.9 20.6 15.6 19.9L21.9 13.6Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22 9V7C22 5.9 21.1 5 20 5H12L10 3H4C2.9 3 2 3.9 2 5V9V10V21H22L24 9H22ZM4 5H9.2L10.6 6.4L11.2 7H12H20V9H4V5ZM20.3 19H4V11H21.6L20.3 19Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7.85 6.64999L3.35 11.95L7.85 17.35L6.25 18.65L0.75 11.95L6.25 5.34999L7.85 6.64999ZM17.85 5.34999L16.25 6.64999L20.75 11.95L16.25 17.35L17.75 18.65L23.25 12.05L17.85 5.34999ZM8.15 20.65L10.05 21.25L16.05 3.24999L14.15 2.64999L8.15 20.65Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 2H4C2.9 2 2 2.9 2 4V20C2 21.1 2.9 22 4 22H20C21.1 22 22 21.1 22 20V4C22 2.9 21.1 2 20 2ZM20 20H4V4H20V20ZM7 8C7 6.9 7.9 6 9 6C10.1 6 11 6.9 11 8C11 9.1 10.1 10 9 10C7.9 10 7 9.1 7 8ZM19 19H5L9 14L11 15L14 12L19 19Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17 5H4C2.9 5 2 5.9 2 7V20C2 21.1 2.9 22 4 22H17C18.1 22 19 21.1 19 20V7C19 5.9 18.1 5 17 5ZM17 20H4V7H17V20ZM6 11C6 9.9 6.9 9 8 9C9.1 9 10 9.9 10 11C10 12.1 9.1 13 8 13C6.9 13 6 12.1 6 11ZM16 19H5L16 14V19ZM22 4V17C22 18.1 21.1 19 20 19V17V4H7H5C5 2.9 5.9 2 7 2H20C21.1 2 22 2.9 22 4Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 18.41L4.59 11L6 9.59L11 14.59V2H13V14.59L18 9.59L19.41 11L12 18.41ZM2 20V22H22V20H2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 7.003C12.4641 7.01107 12.9249 7.08171 13.37 7.213L11.54 9.053C10.9155 9.15262 10.3384 9.44704 9.89125 9.89423C9.44406 10.3414 9.14964 10.9185 9.05002 11.543L7.21002 13.373C7.07873 12.9279 7.00809 12.467 7.00002 12.003C7.00002 10.6769 7.5268 9.40515 8.46449 8.46747C9.40217 7.52978 10.6739 7.003 12 7.003ZM5.40002 15.183C4.39516 14.2466 3.52369 13.1766 2.81002 12.003C5.10002 8.223 8.47002 6.003 12 6.003C12.765 6.0082 13.5255 6.11925 14.26 6.333L15.86 4.733C14.6291 4.25486 13.3206 4.0074 12 4.003C7.24002 4.003 3.05002 7.173 0.52002 12.003C1.41557 13.7255 2.59165 15.2868 4.00002 16.623L5.40002 15.183ZM23.48 12.003C21 16.833 16.76 20.003 12 20.003C10.1707 19.9916 8.37315 19.5242 6.77002 18.643L2.71002 22.713L1.29002 21.293L21.29 1.293L22.71 2.713L18.94 6.473C20.8367 7.96509 22.3858 9.8521 23.48 12.003ZM14.7 10.723L10.7 14.723C11.1058 14.9158 11.5508 15.0116 12 15.003C12.7957 15.003 13.5587 14.6869 14.1213 14.1243C14.6839 13.5617 15 12.7986 15 12.003C14.9993 11.559 14.8967 11.1211 14.7 10.723ZM21.19 12.003C20.243 10.4087 18.9887 9.01851 17.5 7.913L16.16 9.263C16.7052 10.073 16.9975 11.0266 17 12.003C17 13.3291 16.4732 14.6009 15.5356 15.5385C14.5979 16.4762 13.3261 17.003 12 17.003C11.0237 17.0005 10.07 16.7081 9.26002 16.163L8.26002 17.163C9.43056 17.7122 10.707 17.9989 12 18.003C15.53 18.003 18.9 15.783 21.19 12.003Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17 5L12 0L7 5H11V9H13V5H17Z"></path><path d="M13 19V15H11V19H7L12 24L17 19H13Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17.75 8H15.25L13.35 13.08C12.2029 12.2588 11.2439 11.2027 10.537 9.98187C9.83 8.76107 9.39127 7.40364 9.25 6H14V4H9V2H7V4H2V6H6.91C6.73189 7.75797 6.09115 9.43736 5.05302 10.8672C4.01489 12.2971 2.61643 13.4263 1 14.14C1.32315 14.7296 1.69441 15.2915 2.11 15.82C4.82764 14.5445 6.96846 12.2966 8.11 9.52C9.02641 11.7596 10.5985 13.6698 12.62 15L10 22H12.42L13.79 18.13H19.16L20.56 22H23L17.75 8ZM14.46 16.16L15.73 12.53C16.0406 11.7049 16.2945 10.8596 16.49 10C16.55 10.26 16.67 10.66 16.84 11.21C17.01 11.76 17.14 12.15 17.24 12.41L18.55 16.2L14.46 16.16Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M21.93 9H21V7C21 6.46957 20.7893 5.96086 20.4142 5.58579C20.0391 5.21071 19.5304 5 19 5H10L8 3H4C3.46957 3 2.96086 3.21071 2.58579 3.58579C2.21071 3.96086 2 4.46957 2 5L2 21H21L23.89 11.63C23.9916 11.3244 24.0179 10.9988 23.9667 10.6809C23.9155 10.363 23.7882 10.0621 23.5958 9.80392C23.4034 9.54571 23.1514 9.33779 22.8614 9.19782C22.5714 9.05786 22.2519 8.99 21.93 9ZM4 5H7.17L8.59 6.41L9.17 7H19V9H6L4 15V5ZM22 11L19.54 19H4.77L7.44 11H22Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_252_57732)"><path d="M19 29.2996L20.4 30.6996L22.7 28.3996V33.9996H24.7V28.3996L27 30.6996L28.4 29.2996L23.7 24.5996L19 29.2996Z"></path><path d="M24.7 19.6V14H22.7V19.6L20.4 17.3L19 18.7L23.7 23.4L28.4 18.7L27 17.3L24.7 19.6Z"></path></g><defs><clipPath id="clip0_252_57732"><rect width="9.4" height="20" fill="white" transform="translate(19 14)"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_252_57727)"><path d="M19 17.7L20.4 19.1L22.7 16.8V22.4H24.7V16.8L27 19.1L28.4 17.7L23.7 13L19 17.7Z"></path><path d="M24.7 32.0004V26.4004H22.7V32.0004L20.4 29.7004L19 31.1004L23.7 35.8004L28.4 31.1004L27 29.7004L24.7 32.0004Z"></path></g><defs><clipPath id="clip0_252_57727"><rect width="9.4" height="22.8" fill="white" transform="translate(19 13)"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M28 0H4C1.79 0 0 1.79 0 4V28C0 30.21 1.79 32 4 32H28C30.21 32 32 30.21 32 28V4C32 1.79 30.21 0 28 0ZM30 28C30 29.1 29.1 30 28 30H4C2.9 30 2 29.1 2 28V4C2 2.9 2.9 2 4 2H28C29.1 2 30 2.9 30 4V28ZM6 9C6 7.34 7.34 6 9 6C10.66 6 12 7.34 12 9C12 10.66 10.66 12 9 12C7.34 12 6 10.66 6 9ZM19 16L28 28H4L11 19L15 21L19 16Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 1C3.2 1 1 3.2 1 6C1 8.8 3.2 11 6 11C8.8 11 11 8.8 11 6C11 3.2 8.8 1 6 1ZM6 9C4.3 9 3 7.7 3 6C3 4.3 4.3 3 6 3C7.7 3 9 4.3 9 6C9 7.7 7.7 9 6 9ZM8 6C8 7.1 7.1 8 6 8C4.9 8 4 7.1 4 6C4 4.9 4.9 4 6 4C7.1 4 8 4.9 8 6ZM20 18C20 19.1 19.1 20 18 20C16.9 20 16 19.1 16 18C16 16.9 16.9 16 18 16C19.1 16 20 16.9 20 18ZM6 13C3.2 13 1 15.2 1 18C1 20.8 3.2 23 6 23C8.8 23 11 20.8 11 18C11 15.2 8.8 13 6 13ZM6 21C4.3 21 3 19.7 3 18C3 16.3 4.3 15 6 15C7.7 15 9 16.3 9 18C9 19.7 7.7 21 6 21ZM18 11C20.8 11 23 8.8 23 6C23 3.2 20.8 1 18 1C15.2 1 13 3.2 13 6C13 8.8 15.2 11 18 11ZM18 3C19.7 3 21 4.3 21 6C21 7.7 19.7 9 18 9C16.3 9 15 7.7 15 6C15 4.3 16.3 3 18 3ZM18 13C15.2 13 13 15.2 13 18C13 20.8 15.2 23 18 23C20.8 23 23 20.8 23 18C23 15.2 20.8 13 18 13ZM18 21C16.3 21 15 19.7 15 18C15 16.3 16.3 15 18 15C19.7 15 21 16.3 21 18C21 19.7 19.7 21 18 21Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 4C7 5.7 5.7 7 4 7C2.3 7 1 5.7 1 4C1 2.3 2.3 1 4 1C5.7 1 7 2.3 7 4ZM15 4C15 5.7 13.7 7 12 7C10.3 7 9 5.7 9 4C9 2.3 10.3 1 12 1C13.7 1 15 2.3 15 4ZM13 4C13 3.4 12.6 3 12 3C11.4 3 11 3.4 11 4C11 4.6 11.4 5 12 5C12.6 5 13 4.6 13 4ZM17 4C17 2.3 18.3 1 20 1C21.7 1 23 2.3 23 4C23 5.7 21.7 7 20 7C18.3 7 17 5.7 17 4ZM19 4C19 4.6 19.4 5 20 5C20.6 5 21 4.6 21 4C21 3.4 20.6 3 20 3C19.4 3 19 3.4 19 4ZM7 12C7 13.7 5.7 15 4 15C2.3 15 1 13.7 1 12C1 10.3 2.3 9 4 9C5.7 9 7 10.3 7 12ZM5 12C5 11.4 4.6 11 4 11C3.4 11 3 11.4 3 12C3 12.6 3.4 13 4 13C4.6 13 5 12.6 5 12ZM12 9C10.3 9 9 10.3 9 12C9 13.7 10.3 15 12 15C13.7 15 15 13.7 15 12C15 10.3 13.7 9 12 9ZM20 9C18.3 9 17 10.3 17 12C17 13.7 18.3 15 20 15C21.7 15 23 13.7 23 12C23 10.3 21.7 9 20 9ZM4 17C2.3 17 1 18.3 1 20C1 21.7 2.3 23 4 23C5.7 23 7 21.7 7 20C7 18.3 5.7 17 4 17ZM12 17C10.3 17 9 18.3 9 20C9 21.7 10.3 23 12 23C13.7 23 15 21.7 15 20C15 18.3 13.7 17 12 17ZM23 20C23 21.7 21.7 23 20 23C18.3 23 17 21.7 17 20C17 18.3 18.3 17 20 17C21.7 17 23 18.3 23 20ZM21 20C21 19.4 20.6 19 20 19C19.4 19 19 19.4 19 20C19 20.6 19.4 21 20 21C20.6 21 21 20.6 21 20Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 4C7 5.7 5.7 7 4 7C2.3 7 1 5.7 1 4C1 2.3 2.3 1 4 1C5.7 1 7 2.3 7 4ZM15 4C15 5.7 13.7 7 12 7C10.3 7 9 5.7 9 4C9 2.3 10.3 1 12 1C13.7 1 15 2.3 15 4ZM13 4C13 3.4 12.6 3 12 3C11.4 3 11 3.4 11 4C11 4.6 11.4 5 12 5C12.6 5 13 4.6 13 4ZM17 4C17 2.3 18.3 1 20 1C21.7 1 23 2.3 23 4C23 5.7 21.7 7 20 7C18.3 7 17 5.7 17 4ZM19 4C19 4.6 19.4 5 20 5C20.6 5 21 4.6 21 4C21 3.4 20.6 3 20 3C19.4 3 19 3.4 19 4ZM7 12C7 13.7 5.7 15 4 15C2.3 15 1 13.7 1 12C1 10.3 2.3 9 4 9C5.7 9 7 10.3 7 12ZM5 12C5 11.4 4.6 11 4 11C3.4 11 3 11.4 3 12C3 12.6 3.4 13 4 13C4.6 13 5 12.6 5 12ZM12 9C10.3 9 9 10.3 9 12C9 13.7 10.3 15 12 15C13.7 15 15 13.7 15 12C15 10.3 13.7 9 12 9ZM20 9C18.3 9 17 10.3 17 12C17 13.7 18.3 15 20 15C21.7 15 23 13.7 23 12C23 10.3 21.7 9 20 9ZM5 17H3V19H1V21H3V23H5V21H7V19H5V17Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 1H4C2.9 1 2 1.9 2 3V9C2 10.1 2.9 11 4 11H20C21.1 11 22 10.1 22 9V3C22 1.9 21.1 1 20 1ZM20 9H4V3H20V9ZM14 7H6V5H14V7ZM20 13H4C2.9 13 2 13.9 2 15V21C2 22.1 2.9 23 4 23H20C21.1 23 22 22.1 22 21V15C22 13.9 21.1 13 20 13ZM20 21H4V15H20V21ZM14 19H6V17H14V19Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M5.64648 12.6465L6.34648 13.3465L11.7465 8.04648L6.34648 2.64648L5.64648 3.34648L10.2465 8.04648L5.64648 12.6465Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9 2V4H4V9H2V4C2 2.9 2.9 2 4 2H9ZM20 2H15V4H20V9H22V4C22 2.9 21.1 2 20 2ZM4 20V15H2V20C2 21.1 2.9 22 4 22H9V20H4ZM20 20H15V22H20C21.1 22 22 21.1 22 20V15H20V20Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9 2V4H4V9H2V4C2 3.46957 2.21071 2.96086 2.58579 2.58579C2.96086 2.21071 3.46957 2 4 2H9ZM20 2H15V4H20V9H22V4C22 3.46957 21.7893 2.96086 21.4142 2.58579C21.0391 2.21071 20.5304 2 20 2ZM4 20V15H2V20C2 20.5304 2.21071 21.0391 2.58579 21.4142C2.96086 21.7893 3.46957 22 4 22H9V20H4ZM20 20H15V22H20C20.5304 22 21.0391 21.7893 21.4142 21.4142C21.7893 21.0391 22 20.5304 22 20V15H20V20ZM17 13H15V11H13V13H11V15H13V17H15V15H17V13Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 3C13.78 3 15.5201 3.52784 17.0001 4.51677C18.4802 5.50571 19.6337 6.91131 20.3149 8.55585C20.9961 10.2004 21.1743 12.01 20.8271 13.7558C20.4798 15.5016 19.6226 17.1053 18.364 18.364C17.1053 19.6226 15.5016 20.4798 13.7558 20.8271C12.01 21.1743 10.2004 20.9961 8.55585 20.3149C6.91132 19.6337 5.50571 18.4802 4.51678 17.0001C3.52785 15.5201 3.00001 13.78 3.00001 12C3.00001 9.61305 3.94822 7.32387 5.63604 5.63604C7.32387 3.94821 9.61306 3 12 3ZM12 1C9.82441 1 7.69767 1.64514 5.88873 2.85383C4.07979 4.06253 2.66989 5.78049 1.83733 7.79048C1.00477 9.80047 0.786929 12.0122 1.21137 14.146C1.6358 16.2798 2.68345 18.2398 4.22183 19.7782C5.76021 21.3166 7.72022 22.3642 9.85401 22.7886C11.9878 23.2131 14.1995 22.9952 16.2095 22.1627C18.2195 21.3301 19.9375 19.9202 21.1462 18.1113C22.3549 16.3023 23 14.1756 23 12C23 9.08262 21.8411 6.28473 19.7782 4.22183C17.7153 2.15893 14.9174 1 12 1ZM16 12L10 8V16L16 12Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M10.393 12.6465L5.69297 8.04651L10.393 3.34651L9.69297 2.64651L4.29297 8.04651L9.69297 13.3465L10.393 12.6465Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 4C16.4 4 20 7.6 20 12C20 16.4 16.4 20 12 20C7.6 20 4 16.4 4 12C4 7.6 7.6 4 12 4ZM12 2C6.5 2 2 6.5 2 12C2 17.5 6.5 22 12 22C17.5 22 22 17.5 22 12C22 6.5 17.5 2 12 2ZM12 10C13.1 10 14 10.9 14 12C14 13.1 13.1 14 12 14C10.9 14 10 13.1 10 12C10 10.9 10.9 10 12 10ZM12 8C9.8 8 8 9.8 8 12C8 14.2 9.8 16 12 16C14.2 16 16 14.2 16 12C16 9.8 14.2 8 12 8Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22 4H2V21H14V16H18V11H22V4ZM12 19H4V16H12V19ZM16 14H4V11H16V14ZM20 9H4V6H20V9Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0)"><path d="M12 6.8L12.9 9.7L13.3 11.1H14.8H17.8L15.4 12.9L14.2 13.8L14.6 15.2L15.5 18.1L13.1 16.3L12 15.3L10.8 16.2L8.4 18L9.3 15.1L9.7 13.7L8.5 12.8L6.1 11H9.1H10.6L11 9.6L12 6.8ZM12 0.300003L9.2 9H0L7.4 14.4L4.6 23.1L12 17.7L19.4 23.1L16.6 14.4L24 9H14.8L12 0.300003Z"></path></g><defs><clipPath id="clip0"><rect width="24" height="24"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 8.00001H19.6L15.6 4.00001L17 2.60001L23.4 9.00001L17 15.4L15.6 14L19.6 10H7C4.8 10 3 11.8 3 14C3 16.2 4.8 18 7 18H8V20H7C3.7 20 1 17.3 1 14C1 10.7 3.7 8.00001 7 8.00001Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M12 7V9H4V7H12ZM16 8C16 12.4 12.4 16 8 16C3.6 16 0 12.4 0 8C0 3.6 3.6 0 8 0C12.4 0 16 3.6 16 8ZM14 8C14 4.7 11.3 2 8 2C4.7 2 2 4.7 2 8C2 11.3 4.7 14 8 14C11.3 14 14 11.3 14 8Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.01 2.993C11.8 2.993 11.59 3.023 11.37 3.043L12.71 1.703L11.3 0.292999L7.59 4.003L11.3 7.713L12.71 6.303L11.46 5.053C11.64 5.043 11.82 5.013 12 5.013C15.86 5.013 19 8.153 19 12.013C19 15.873 15.86 19.013 12 19.013C8.14 19.013 5 15.873 5 12.013C5 11.463 4.55 11.013 4 11.013C3.45 11.013 3 11.463 3 12.013C3 16.973 7.04 21.013 12 21.013C16.96 21.013 21 16.973 21 12.013C21 7.053 16.97 2.993 12.01 2.993Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 2H4L2 4V20C2 20.5304 2.21071 21.0391 2.58579 21.4142C2.96086 21.7893 3.46957 22 4 22H20C20.5304 22 21.0391 21.7893 21.4142 21.4142C21.7893 21.0391 22 20.5304 22 20V4C22 3.46957 21.7893 2.96086 21.4142 2.58579C21.0391 2.21071 20.5304 2 20 2ZM15 4V6H9V4H15ZM8 20V15H16V20H8ZM20 20H18V13H6V20H4V4.83L4.83 4H7V8H17V4H20V20Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M23 11H19.9C19.4 7.4 16.6 4.5 13 4.1V1H11V4.1C7.4 4.5 4.5 7.4 4.1 11H1V13H4.1C4.6 16.6 7.4 19.5 11 19.9V23H13V19.9C16.6 19.4 19.5 16.6 19.9 13H23V11ZM12 18C8.7 18 6 15.3 6 12C6 8.7 8.7 6 12 6C15.3 6 18 8.7 18 12C18 15.3 15.3 18 12 18Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9.9 4C9.4 2.3 7.9 1 6 1C3.8 1 2 2.8 2 5C2 7.2 3.8 9 6 9C7.9 9 9.4 7.7 9.9 6H22V4H9.9ZM6 7C4.9 7 4 6.1 4 5C4 3.9 4.9 3 6 3C7.1 3 8 3.9 8 5C8 6.1 7.1 7 6 7ZM9 15C7.1 15 5.6 16.3 5.1 18H2V20H5.1C5.5 21.7 7.1 23 9 23C10.9 23 12.4 21.7 12.9 20H22V18H12.9C12.4 16.3 10.9 15 9 15ZM9 21C7.9 21 7 20.1 7 19C7 17.9 7.9 17 9 17C10.1 17 11 17.9 11 19C11 20.1 10.1 21 9 21ZM18 8C16.1 8 14.6 9.3 14.1 11H2V13H14.1C14.5 14.7 16.1 16 18 16C20.2 16 22 14.2 22 12C22 9.8 20.2 8 18 8ZM18 14C16.9 14 16 13.1 16 12C16 10.9 16.9 10 18 10C19.1 10 20 10.9 20 12C20 13.1 19.1 14 18 14Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M6.8 2C6.4 0.8 5.3 0 4 0C2.3 0 1 1.3 1 3C1 4.7 2.3 6 4 6C5.3 6 6.4 5.2 6.8 4H15V2H6.8ZM4 4C3.4 4 3 3.6 3 3C3 2.4 3.4 2 4 2C4.6 2 5 2.4 5 3C5 3.6 4.6 4 4 4ZM12 5C10.7 5 9.6 5.8 9.2 7H1V9H9.2C9.6 10.2 10.7 11 12 11C13.7 11 15 9.7 15 8C15 6.3 13.7 5 12 5ZM12 9C11.4 9 11 8.6 11 8C11 7.4 11.4 7 12 7C12.6 7 13 7.4 13 8C13 8.6 12.6 9 12 9ZM6 10C4.7 10 3.6 10.8 3.2 12H1V14H3.2C3.6 15.2 4.7 16 6 16C7.3 16 8.4 15.2 8.8 14H15V12H8.8C8.4 10.8 7.3 10 6 10ZM6 14C5.4 14 5 13.6 5 13C5 12.4 5.4 12 6 12C6.6 12 7 12.4 7 13C7 13.6 6.6 14 6 14Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M24 17V19H9.1C9.5 18.4 9.9 17.7 10.2 17H24ZM11.9 9.00001C11 13.7 8.6 19.6 5 22.6C3.8 23.6 2 22.6 2 21.1C2 20.4 2.1 19.7 2.2 19H0V17H2.8C4.3 12.9 7.6 9.10001 10.2 7.60001C10.4 6.10001 10.4 4.80001 10.2 3.90001C9.9 3.30001 9.7 3.00001 9.6 3.00001C9.4 3.00001 7.8 2.90001 3.8 8.70001L2.2 7.60001C5.5 2.80001 7.9 0.700007 9.9 1.00001C12 1.20001 12.5 4.60001 12.2 6.90001C14.3 7.00001 14.8 8.20001 14.9 10.3C16.2 9.10001 18.1 7.90001 19.2 9.20001C20.8 8.90001 22.1 10.4 22.9 11.5L21.3 12.7C20.4 11.4 19.8 11.2 19.6 11.2C19.5 11.2 19.5 11.3 19.4 11.4C19 12 18.6 12.8 18 13.7C17.7 14.1 17.2 14.3 16.7 14.1C15.5 13.5 16.5 12.1 16.8 11.2C15.8 12 14.4 13.4 13.9 14.8C13.8 15.5 13.3 16.3 12.5 16.1C11.6 15.9 11.7 14.9 12 14.2C13.3 9.80001 12.5 9.00001 12.5 9.00001C12.5 8.90001 12.2 8.80001 11.9 9.00001ZM9.5 10.4C6.9 12.8 4.1 17.1 4 20.8C6.6 18.5 8.5 14.3 9.5 10.4Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M11 5C12.7 5 14 6.3 14 8C14 9.7 12.7 11 11 11H5C3.3 11 2 9.7 2 8C2 6.3 3.3 5 5 5H11ZM11 3H5C2.2 3 0 5.2 0 8C0 10.8 2.2 13 5 13H11C13.8 13 16 10.8 16 8C16 5.2 13.8 3 11 3ZM11 6C9.9 6 9 6.9 9 8C9 9.1 9.9 10 11 10C12.1 10 13 9.1 13 8C13 6.9 12.1 6 11 6Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M11 5C12.7 5 14 6.3 14 8C14 9.7 12.7 11 11 11H5C3.3 11 2 9.7 2 8C2 6.3 3.3 5 5 5H11ZM11 3H5C2.2 3 0 5.2 0 8C0 10.8 2.2 13 5 13H11C13.8 13 16 10.8 16 8C16 5.2 13.8 3 11 3ZM5 6C3.9 6 3 6.9 3 8C3 9.1 3.9 10 5 10C6.1 10 7 9.1 7 8C7 6.9 6.1 6 5 6Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22 7V6C22 4.9 21.1 4 20 4H16C14.9 4 14 4.9 14 6V7C14 8.1 14.9 9 16 9H20C21.1 9 22 8.1 22 7ZM20 7H16V6H20V7ZM2 6V7C2 8.1 2.9 9 4 9H11C12.1 9 13 8.1 13 7V6C13 4.9 12.1 4 11 4H4C2.9 4 2 4.9 2 6ZM4 6H11V7H4V6ZM9 12V13C9 14.1 9.9 15 11 15H20C21.1 15 22 14.1 22 13V12C22 10.9 21.1 10 20 10H11C9.9 10 9 10.9 9 12ZM11 12H20V13H11V12ZM2 18V19C2 20.1 2.9 21 4 21H15C16.1 21 17 20.1 17 19V18C17 16.9 16.1 16 15 16H4C2.9 16 2 16.9 2 18ZM4 18H15V19H4V18ZM2 12V13C2 14.1 2.9 15 4 15H6C7.1 15 8 14.1 8 13V12C8 10.9 7.1 10 6 10H4C2.9 10 2 10.9 2 12ZM4 12H6V13H4V12Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 6H4C2.9 6 2 6.9 2 8V16C2 17.1 2.9 18 4 18H20C21.1 18 22 17.1 22 16V8C22 6.9 21.1 6 20 6ZM20 16H4V8H20V16ZM14 13H6V11H14V13Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M24 21.4201C23.9387 22.1566 23.5894 22.8394 23.0278 23.3202C22.4662 23.8011 21.7376 24.0413 21 23.9888C20.2624 24.0413 19.5338 23.8011 18.9722 23.3202C18.4106 22.8394 18.0613 22.1566 18 21.4201C18 18.8513 21 16.2826 21 14.9932C21 16.2826 24 18.8513 24 21.4201ZM22 12.9942L11 1.99951L8.71 4.2884L10.12 5.70771L11 4.82814L18.17 11.9946L5.64 15.8028L2.83 12.9942L7.71 8.11653L9.29 9.70576C9.38296 9.79944 9.49356 9.8738 9.61542 9.92455C9.73728 9.97529 9.86799 10.0014 10 10.0014C10.132 10.0014 10.2627 9.97529 10.3846 9.92455C10.5064 9.8738 10.617 9.79944 10.71 9.70576C10.8037 9.61284 10.8781 9.5023 10.9289 9.3805C10.9797 9.2587 11.0058 9.12805 11.0058 8.99611C11.0058 8.86416 10.9797 8.73352 10.9289 8.61172C10.8781 8.48992 10.8037 8.37937 10.71 8.28645L3.71 1.28986C3.5217 1.10165 3.2663 0.995911 3 0.995911C2.7337 0.995911 2.4783 1.10165 2.29 1.28986C2.1017 1.47807 1.99591 1.73334 1.99591 1.99951C1.99591 2.26569 2.1017 2.52096 2.29 2.70917L6.29 6.70722L0 12.9942L10 22.9893L18 14.9932L22 12.9942Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M21 4H16V2C16 1.46957 15.7893 0.960859 15.4142 0.585786C15.0391 0.210714 14.5304 0 14 0L10 0C9.46957 0 8.96086 0.210714 8.58579 0.585786C8.21071 0.960859 8 1.46957 8 2V4H3C2.46957 4 1.96086 4.21071 1.58579 4.58579C1.21071 4.96086 1 5.46957 1 6V12H2V20C2 20.5304 2.21071 21.0391 2.58579 21.4142C2.96086 21.7893 3.46957 22 4 22H20C20.5304 22 21.0391 21.7893 21.4142 21.4142C21.7893 21.0391 22 20.5304 22 20V12H23V6C23 5.46957 22.7893 4.96086 22.4142 4.58579C22.0391 4.21071 21.5304 4 21 4ZM10 2H14V4H10V2ZM20 20H4V12H9V16H15V12H20V20ZM11 14V10H13V14H11ZM21 10H15V8H9V10H3V6H21V10Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17 8.00001H4.40001L8.40001 4.00001L7.00001 2.60001L0.600006 9.00001L7.00001 15.4L8.40001 14L4.40001 10H17C19.2 10 21 11.8 21 14C21 16.2 19.2 18 17 18H16V20H17C20.3 20 23 17.3 23 14C23 10.7 20.3 8.00001 17 8.00001Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 4C7.2 4 3 7.2 0.5 12C3 16.8 7.2 20 12 20C16.8 20 20.9 16.8 23.5 12C20.9 7.2 16.7 4 12 4ZM12 18C8.5 18 5.1 15.8 2.8 12C5.1 8.2 8.5 6 12 6C15.5 6 18.9 8.2 21.2 12C18.9 15.8 15.5 18 12 18ZM12 7C9.2 7 7 9.2 7 12C7 14.8 9.2 17 12 17C14.8 17 17 14.8 17 12C17 9.2 14.7 7 12 7ZM12 15C10.3 15 9 13.7 9 12C9 11.7 9 11.5 9.1 11.3L12 12L10.3 9.5C10.8 9.2 11.3 9 12 9C13.7 9 15 10.3 15 12C15 13.7 13.6 15 12 15Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7.7 16.3C8.1 16.7 8.1 17.3 7.7 17.7L3.7 21.7C3.5 21.9 3.3 22 3 22C2.7 22 2.5 21.9 2.3 21.7C1.9 21.3 1.9 20.7 2.3 20.3L6.3 16.3C6.7 15.9 7.3 15.9 7.7 16.3ZM20.5 10L23 13.7L18.6 14.6L17.7 19L14 16.5L10.3 19L9.4 14.6L5 13.7L7.5 10L5 6.3L9.4 5.4L10.3 1L14 3.5L17.7 1L18.6 5.4L23 6.3L20.5 10ZM18.1 10L18.8 8.9L19.6 7.7L18.1 7.4L16.8 7.1L16.5 5.8L16.2 4.3L15 5.1L14 5.9L12.9 5.2L11.7 4.3L11.4 5.8L11.1 7.1L9.8 7.4L8.3 7.7L9.1 8.9L9.9 10L9.2 11.1L8.4 12.3L9.9 12.6L11.2 12.9L11.5 14.2L11.8 15.7L13 14.9L14.1 14.2L15.2 14.9L16.4 15.7L16.7 14.2L17 12.9L18.3 12.6L19.8 12.3L19 11.1L18.1 10Z"></path></svg>'},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},,function(e,t,o){"use strict";o.r(t),o.d(t,"Version",(function(){return Hi})),o.d(t,"enStrings",(function(){return n})),o.d(t,"editorLocalization",(function(){return H})),o.d(t,"defaultStrings",(function(){return F})),o.d(t,"localization",(function(){return H})),o.d(t,"QuestionConvertMode",(function(){return i})),o.d(t,"settings",(function(){return a})),o.d(t,"EmptySurveyCreatorOptions",(function(){return s})),o.d(t,"CreatorAction",(function(){return fo})),o.d(t,"TabbedMenuItem",(function(){return yo})),o.d(t,"TabbedMenuContainer",(function(){return vo})),o.d(t,"ToolbarActionContainer",(function(){return bo})),o.d(t,"CreatorEvent",(function(){return wo})),o.d(t,"CreatorBase",(function(){return Co})),o.d(t,"SurveyCreatorModel",(function(){return xo})),o.d(t,"StylesManager",(function(){return To})),o.d(t,"initializeDesignTimeSurveyModel",(function(){return So})),o.d(t,"editableStringRendererName",(function(){return Eo})),o.d(t,"getElementWrapperComponentName",(function(){return Oo})),o.d(t,"getQuestionContentWrapperComponentName",(function(){return Io})),o.d(t,"getElementWrapperComponentData",(function(){return Vo})),o.d(t,"getItemValueWrapperComponentName",(function(){return No})),o.d(t,"getItemValueWrapperComponentData",(function(){return Ao})),o.d(t,"isStringEditable",(function(){return _o})),o.d(t,"isTextInput",(function(){return Lo})),o.d(t,"registerAdorner",(function(){return jo})),o.d(t,"removeAdorners",(function(){return ko})),o.d(t,"CreatorResponsivityManager",(function(){return Zt})),o.d(t,"EmbedModel",(function(){return ue})),o.d(t,"TabEmbedPlugin",(function(){return ce})),o.d(t,"AceJsonEditorModel",(function(){return he})),o.d(t,"TabJsonEditorAcePlugin",(function(){return ge})),o.d(t,"JsonEditorBaseModel",(function(){return pe})),o.d(t,"TabJsonEditorBasePlugin",(function(){return de})),o.d(t,"TextareaJsonEditorModel",(function(){return me})),o.d(t,"TabJsonEditorTextareaPlugin",(function(){return fe})),o.d(t,"TestSurveyTabViewModel",(function(){return we})),o.d(t,"TabTestPlugin",(function(){return Ce})),o.d(t,"createColor",(function(){return Do})),o.d(t,"createBoxShadow",(function(){return Ro})),o.d(t,"parseBoxShadow",(function(){return Bo})),o.d(t,"DefaultFonts",(function(){return ro})),o.d(t,"fontsettingsToCssVariable",(function(){return ao})),o.d(t,"fontsettingsFromCssVariable",(function(){return so})),o.d(t,"elementSettingsToCssVariable",(function(){return lo})),o.d(t,"elementSettingsFromCssVariable",(function(){return uo})),o.d(t,"Themes",(function(){return co})),o.d(t,"PredefinedThemes",(function(){return po})),o.d(t,"PredefinedColors",(function(){return ho})),o.d(t,"ThemeSurveyTabViewModel",(function(){return go})),o.d(t,"TabThemePlugin",(function(){return mo})),o.d(t,"initLogicOperator",(function(){return Ae})),o.d(t,"LogicEvent",(function(){return _e})),o.d(t,"SurveyLogic",(function(){return Le})),o.d(t,"TranslationItemBase",(function(){return pt})),o.d(t,"TranslationItemString",(function(){return dt})),o.d(t,"TranslationItem",(function(){return ht})),o.d(t,"TranslationGroup",(function(){return gt})),o.d(t,"Translation",(function(){return mt})),o.d(t,"translationCss",(function(){return ct})),o.d(t,"TabTranslationPlugin",(function(){return ft})),o.d(t,"initialSettingsAllowShowEmptyTitleInDesignMode",(function(){return Ut})),o.d(t,"TabDesignerViewModel",(function(){return Gt})),o.d(t,"TabDesignerPlugin",(function(){return zt})),o.d(t,"SurveyLogicUI",(function(){return It})),o.d(t,"TabLogicPlugin",(function(){return Vt})),o.d(t,"logicCss",(function(){return yt})),o.d(t,"ToolboxToolViewModel",(function(){return qo})),o.d(t,"PageNavigatorViewModel",(function(){return Ho})),o.d(t,"PageAdorner",(function(){return Fo})),o.d(t,"RowViewModel",(function(){return Uo})),o.d(t,"QuestionAdornerViewModel",(function(){return Go})),o.d(t,"QuestionDropdownAdornerViewModel",(function(){return zo})),o.d(t,"QuestionImageAdornerViewModel",(function(){return Zo})),o.d(t,"QuestionRatingAdornerViewModel",(function(){return Jo})),o.d(t,"ItemValueWrapperViewModel",(function(){return Wo})),o.d(t,"ImageItemValueWrapperViewModel",(function(){return Ko})),o.d(t,"MatrixCellWrapperEditSurvey",(function(){return Xo})),o.d(t,"MatrixCellWrapperViewModel",(function(){return Yo})),o.d(t,"SurveySimulatorModel",(function(){return ye})),o.d(t,"DEFAULT_MONITOR_DPI",(function(){return ve})),o.d(t,"simulatorDevices",(function(){return be})),o.d(t,"SurveyResultsItemModel",(function(){return $o})),o.d(t,"SurveyResultsModel",(function(){return ti})),o.d(t,"LogoImageViewModel",(function(){return oi})),o.d(t,"StringItemsNavigatorBase",(function(){return Xt})),o.d(t,"StringEditorConnector",(function(){return io})),o.d(t,"StringEditorViewModelBase",(function(){return no})),o.d(t,"QuestionEmbeddedSurveyModel",(function(){return ii})),o.d(t,"QuestionLinkValueModel",(function(){return ni})),o.d(t,"EditorLocalization",(function(){return q})),o.d(t,"getLocString",(function(){return Q})),o.d(t,"SurveyJSON5",(function(){return Z})),o.d(t,"QuestionSpinEditorModel",(function(){return ri})),o.d(t,"QuestionColorModel",(function(){return ai})),o.d(t,"QuestionFileEditorModel",(function(){return si})),o.d(t,"setSurveyJSONForPropertyGrid",(function(){return He})),o.d(t,"PropertyEditorSetupValue",(function(){return Qe})),o.d(t,"PropertyGridEditorCollection",(function(){return Fe})),o.d(t,"PropertyGridTitleActionsCreator",(function(){return Ue})),o.d(t,"PropertyJSONGenerator",(function(){return Ge})),o.d(t,"PropertyGridModel",(function(){return ze})),o.d(t,"PropertyGridEditor",(function(){return Ze})),o.d(t,"PropertyGridEditorBoolean",(function(){return Je})),o.d(t,"PropertyGridEditorStringBase",(function(){return We})),o.d(t,"PropertyGridEditorString",(function(){return Ke})),o.d(t,"PropertyGridLinkEditor",(function(){return Xe})),o.d(t,"PropertyGridEditorNumber",(function(){return Ye})),o.d(t,"PropertyGridEditorImageSize",(function(){return $e})),o.d(t,"PropertyGridEditorText",(function(){return et})),o.d(t,"PropertyGridEditorHtml",(function(){return tt})),o.d(t,"PropertyGridEditorColor",(function(){return ot})),o.d(t,"PropertyGridEditorStringArray",(function(){return it})),o.d(t,"PropertyGridEditorDropdown",(function(){return nt})),o.d(t,"PropertyGridEditorSet",(function(){return rt})),o.d(t,"PropertyGridEditorPage",(function(){return at})),o.d(t,"PropertyGridEditorQuestion",(function(){return st})),o.d(t,"PropertyGridEditorQuestionSelectBase",(function(){return lt})),o.d(t,"PropertyGridEditorQuestionValue",(function(){return ut})),o.d(t,"PropertyGridEditorExpression",(function(){return li})),o.d(t,"PropertyGridEditorCondition",(function(){return ui})),o.d(t,"PropertyGridEditorMatrix",(function(){return di})),o.d(t,"PropertyGridEditorMatrixItemValues",(function(){return hi})),o.d(t,"PropertyGridEditorMatrixRateValues",(function(){return gi})),o.d(t,"PropertyGridEditorMatrixColumns",(function(){return mi})),o.d(t,"PropertyGridEditorMatrixPages",(function(){return fi})),o.d(t,"PropertyGridEditorMatrixCalculatedValues",(function(){return yi})),o.d(t,"PropertyGridEditorMatrixHtmlConditions",(function(){return vi})),o.d(t,"PropertyGridEditorMatrixUrlConditions",(function(){return bi})),o.d(t,"PropertyGridEditorMatrixMutlipleTextItems",(function(){return wi})),o.d(t,"PropertyGridEditorMatrixMultipleTypes",(function(){return Ci})),o.d(t,"PropertyGridEditorMatrixValidators",(function(){return xi})),o.d(t,"PropertyGridEditorMatrixTriggers",(function(){return Ti})),o.d(t,"PropertyGridEditorBindings",(function(){return Pi})),o.d(t,"PropertyGridViewModel",(function(){return Ht})),o.d(t,"ObjectSelectorItem",(function(){return Rt})),o.d(t,"ObjectSelector",(function(){return Bt})),o.d(t,"ObjectSelectorModel",(function(){return qt})),o.d(t,"PropertyGridEditorQuestionRestfull",(function(){return Oi})),o.d(t,"PropertyGridValueEditorBase",(function(){return ji})),o.d(t,"PropertyGridCellsEditor",(function(){return ki})),o.d(t,"PropertyGridValueEditor",(function(){return Mi})),o.d(t,"PropertyGridRowValueEditor",(function(){return Di})),o.d(t,"PropertyGridPanelValueEditor",(function(){return Ri})),o.d(t,"PropertyGridTriggerValueEditor",(function(){return Bi})),o.d(t,"PropertyGridTriggerValueInLogicEditor",(function(){return qi})),o.d(t,"propertyGridCss",(function(){return se})),o.d(t,"QuestionConverter",(function(){return X})),o.d(t,"svgBundle",(function(){})),o.d(t,"SurveyTextWorkerError",(function(){return ee})),o.d(t,"SurveyTextWorkerParserError",(function(){return te})),o.d(t,"SurveyTextWorkerJsonError",(function(){return oe})),o.d(t,"SurveyTextWorker",(function(){return ie})),o.d(t,"JsonDuplicateNameError",(function(){return ne})),o.d(t,"QuestionToolboxCategory",(function(){return J})),o.d(t,"QuestionToolboxItem",(function(){return W})),o.d(t,"QuestionToolbox",(function(){return K})),o.d(t,"SidebarModel",(function(){return Kt})),o.d(t,"SidebarTabModel",(function(){return Jt})),o.d(t,"getNextItemValue",(function(){return p})),o.d(t,"getNextItemText",(function(){return d})),o.d(t,"getNextValue",(function(){return h})),o.d(t,"findParentNode",(function(){return g})),o.d(t,"focusFirstControl",(function(){return m})),o.d(t,"getFirstNonTextElement",(function(){return f})),o.d(t,"getNodesFromKoComponentInfo",(function(){return y})),o.d(t,"propertyExists",(function(){return v})),o.d(t,"isPropertyVisible",(function(){return b})),o.d(t,"toggleHovered",(function(){return w})),o.d(t,"clearNewLines",(function(){return C})),o.d(t,"select",(function(){return x})),o.d(t,"copyObject",(function(){return T})),o.d(t,"copyCssClasses",(function(){return S})),o.d(t,"assignDefaultV2Classes",(function(){return P})),o.d(t,"wrapTextByCurlyBraces",(function(){return E})),o.d(t,"capitalize",(function(){return O})),o.d(t,"notShortCircuitAnd",(function(){return I})),o.d(t,"imageMimeTypes",(function(){return V})),o.d(t,"getAcceptedTypesByContentMode",(function(){return N})),o.d(t,"getQuestionFromObj",(function(){return A})),o.d(t,"ingectAlpha",(function(){return _})),o.d(t,"convertRgbaToString",(function(){return L})),o.d(t,"parseRgbaFromString",(function(){return j})),o.d(t,"parseColor",(function(){return k})),o.d(t,"HSBToRGB",(function(){return M})),o.d(t,"RGBToHSB",(function(){return D})),o.d(t,"assign",(function(){return R})),o.d(t,"ColorCalculator",(function(){return B})),o.d(t,"SurveyQuestionEditorDefinition",(function(){return Me})),o.d(t,"ObjType",(function(){return Y})),o.d(t,"SurveyHelper",(function(){return re})),o.d(t,"ResizeManager",(function(){return Wt})),o.d(t,"UndoRedoPlugin",(function(){return kt})),o.d(t,"undoRedoTransaction",(function(){return Mt})),o.d(t,"ignoreUndoRedo",(function(){return Dt})),o.d(t,"UndoRedoManager",(function(){return Nt})),o.d(t,"Transaction",(function(){return At})),o.d(t,"UndoRedoAction",(function(){return _t})),o.d(t,"UndoRedoArrayAction",(function(){return Lt})),o.d(t,"PagesController",(function(){return Qt}));var i,n={survey:{edit:"Edit",externalHelpLink:"Watch and learn how to create surveys",externalHelpLinkUrl:"https://www.youtube.com/channel/UCH2ru9okIcooNZfpIbyq4qQ?view_as=subscriber",dropQuestion:"Please drop a question here from the Toolbox.",addLogicItem:"Create a rule to customize the flow of the survey.",copy:"Copy",duplicate:"Duplicate",addToToolbox:"Add to toolbox",deletePanel:"Delete Panel",deleteQuestion:"Delete Question",convertTo:"Convert to",drag:"Drag element",license:"PLEASE PURCHASE A DEVELOPER LICENSE TO BE ABLE TO USE SURVEY CREATOR IN YOUR APP"},qt:{default:"Default",checkbox:"Checkboxes",comment:"Long Text",imagepicker:"Image Picker",ranking:"Ranking",image:"Image",dropdown:"Dropdown",tagbox:"Multi-Select Dropdown",file:"File Upload",html:"HTML",matrix:"Single-Select Matrix",matrixdropdown:"Multi-Select Matrix",matrixdynamic:"Dynamic Matrix",multipletext:"Multiple Textboxes",panel:"Panel",paneldynamic:"Dynamic Panel",radiogroup:"Radio Button Group",rating:"Rating Scale",text:"Single-Line Input",boolean:"Yes/No (Boolean)",expression:"Expression (read-only)",signaturepad:"Signature",buttongroup:"Button Group"},ed:{defaultLocale:"Default ({0})",survey:"Survey",settings:"Settings",settingsTooltip:"Open settings",surveySettings:"Survey Settings",surveySettingsTooltip:"Open survey settings",showPanel:"Show Panel",hidePanel:"Hide Panel",prevSelected:"Select previous",nextSelected:"Select next",surveyTypeName:"Survey",pageTypeName:"Page",panelTypeName:"Panel",questionTypeName:"Question",columnTypeName:"Column",addNewPage:"Add New Page",moveRight:"Scroll to the Right",moveLeft:"Scroll to the Left",deletePage:"Delete Page",editPage:"Edit Page",edit:"Edit",newPageName:"page",newQuestionName:"question",newPanelName:"panel",newTextItemName:"text",testSurvey:"Preview",themeSurvey:"Themes",defaultV2Theme:"Default",modernTheme:"Modern",defaultTheme:"Default (legacy)",testSurveyAgain:"Preview Survey Again",testSurveyWidth:"Survey width: ",navigateToMsg:"You had to navigate to",logic:"Logic",embedSurvey:"Embed Survey",translation:"Translation",saveSurvey:"Save Survey",saveSurveyTooltip:"Save Survey",designer:"Designer",jsonEditor:"JSON Editor",jsonHideErrors:"Hide errors",jsonShowErrors:"Show errors",undo:"Undo",redo:"Redo",undoTooltip:"Undo last change",redoTooltip:"Redo the change",showMoreChoices:"Show more",showLessChoices:"Show less",copy:"Copy",cut:"Cut",paste:"Paste",copyTooltip:"Copy selection to clipboard",cutTooltip:"Cut selection to clipboard",pasteTooltip:"Paste from clipboard",options:"Options",generateValidJSON:"Generate Valid JSON",generateReadableJSON:"Generate Readable JSON",toolbox:"Toolbox","property-grid":"Properties",propertyGridFilteredTextPlaceholder:"Type to search...",toolboxGeneralCategory:"General",toolboxChoiceCategory:"Choice Questions",toolboxTextCategory:"Text Input Questions",toolboxContainersCategory:"Containers",toolboxMatrixCategory:"Matrix Questions",toolboxMiscCategory:"Misc",correctJSON:"Please correct JSON.",surveyResults:"Survey Results ",surveyResultsTable:"As Table",surveyResultsJson:"As JSON",resultsTitle:"Question Title",resultsName:"Question Name",resultsValue:"Answer Value",resultsDisplayValue:"Display Value",modified:"Modified",saving:"Saving",saved:"Saved",propertyEditorError:"Error",saveError:"Error! Editor content is not saved.",translationPropertyGridTitle:"Language Settings",themePropertyGridTitle:"Theme Settings",translationLanguages:"Languages",translationAddLanguage:"Select language to translate",translationShowAllStrings:"All Strings",translationShowUsedStringsOnly:"Used Strings Only",translationShowAllPages:"All Pages",translationNoStrings:"No strings to translate. Please, change the filter.",translationExportToSCVButton:"Export to CSV",translationImportFromSCVButton:"Import from CSV",translationMergeLocaleWithDefault:"Merge {0} with default locale",translationPlaceHolder:"Translation...",themeExportButton:"Export",themeImportButton:"Import",bold:"Bold",italic:"Italic",underline:"Underline",addNewQuestion:"Add Question",selectPage:"Select page...",carryForwardChoicesCopied:"Choices are copied from",htmlPlaceHolder:"HTML content will be here.",panelPlaceHolder:"Drop a question from the toolbox here.",surveyPlaceHolder:"The survey is empty. Drag an element from the toolbox or click the button below.",imagePlaceHolder:"Drag and drop an image here or click the button below and choose an image to upload",imageChooseImage:"Choose Image",addNewTypeQuestion:"Add {0}",chooseLogoPlaceholder:"[LOGO]",auto:"auto",choices_Item:"Item ",lg:{addNewItem:"Add New Rule",empty_tab:"Create a rule to customize the flow of the survey.",page_visibilityName:"Show (hide) page",page_enableName:"Enable (disable) page",panel_visibilityName:"Show (hide) panel",panel_enableName:"Enable (disable) panel",question_visibilityName:"Show (hide) question",question_enableName:"Enable (disable) question",question_requireName:"Make question required",column_visibilityName:"Show (hide) column",column_enableName:"Enable (disable) column",column_requireName:"Make column required",trigger_completeName:"Complete survey",trigger_setvalueName:"Set answer",trigger_copyvalueName:"Copy answer",trigger_skipName:"Skip to question",trigger_runExpressionName:"Run expression",completedHtmlOnConditionName:'Set "Survey Complete" page markup',page_visibilityDescription:"Make the page visible when the logic expression returns true. Otherwise keep it invisible.",panel_visibilityDescription:"Make the panel visible when the logic expression returns true. Otherwise keep it invisible.",panel_enableDescription:"Make the panel, and all elements inside it, enable when the logic expression returns true. Otherwise keep them disabled.",question_visibilityDescription:"Make the question visible when the logic expression returns true. Otherwise keep it invisible.",question_enableDescription:"Make the question enable when the logic expression returns true. Otherwise keep it disabled.",question_requireDescription:"Question becomes required when the logic expression returns true.",trigger_completeDescription:"When the logic expression returns true then the survey becomes completed and an end-user see the 'Thank you page'.",trigger_setvalueDescription:"When question values, that are used in the logic expression, are changed and the logic expression returns true, then the value is set to the selected question.",trigger_copyvalueDescription:"When question values, that are used in the logic expression, are changed and the logic expression returns true, then the value of one selected question is copied to another selected question.",trigger_skipDescription:"When the logic expression returns true then the survey skip to / focus the selected question.",trigger_runExpressionDescription:"When the logic expression returns true, then the custom expression is performed. You may optionally set this expression result into the selected question",completedHtmlOnConditionDescription:"If the logic expression returns true, then the default text for the 'Thank you page' is changed to the given one.",itemExpressionText:"When expression: '{0}' returns true",itemEmptyExpressionText:"New rule",page_visibilityText:"make page {0} visible",panel_visibilityText:"make panel {0} visible",panel_enableText:"make panel {0} enable",question_visibilityText:"make question {0} visible",question_enableText:"make question {0} enable",question_requireText:"make question {0} required",column_visibilityText:"make column {0} of question {1} visible",column_enableText:"make column {0} of question {1} enable",column_requireText:"make column {0} of question {1} required",trigger_completeText:"survey becomes completed",trigger_setvalueText:"set into question: {0} value {1}",trigger_setvalueEmptyText:"clear question value: {0}",trigger_copyvalueText:"copy into question: {0} value from question {1}",trigger_skipText:"survey skip to the question {0}",trigger_runExpressionText1:"run expression: '{0}'",trigger_runExpressionText2:" and set its result into question: {0}",completedHtmlOnConditionText:"show custom text for the 'Thank you page'.",showAllQuestions:"All Questions",showAllActionTypes:"All Action Types",conditions:"Condition(s)",actions:"Action(s)",expressionEditorTitle:"Define condition(s)",actionsEditorTitle:"Define action(s)",deleteAction:"Delete Action",addNewAction:"Add Action",selectedActionCaption:"Select action...",expressionInvalid:"The logic expression is empty or invalid. Please correct it.",noActionError:"Please, add at least one action.",actionInvalid:"Please, fix problems in your action(s).",uncompletedRule_title:"Logical rules are incomplete",uncompletedRule_text:"You have not completed some of the logical rules. If you leave the tab now, the changes will be lost. Do you still want to leave the tab without completing the changes?",uncompletedRule_apply:"Yes",uncompletedRule_cancel:"No, I want to complete the rules",expressionSetup:"",actionsSetup:""}},pe:{apply:"Apply",ok:"OK",save:"Save",clear:"Clear",saveTooltip:"Save",cancel:"Cancel",set:"Set",reset:"Reset",change:"Change",refresh:"Refresh",close:"Close",delete:"Delete",add:"Add",addNew:"Add New",addItem:"Click to add an item...",removeItem:"Click to remove the item...",dragItem:"Drag the item",addOther:"Other",addSelectAll:"Select All",addNone:"None",removeAll:"Remove All",edit:"Edit",back:"Return without saving",backTooltip:"Return without saving",saveAndBack:"Save and return",saveAndBackTooltip:"Save and return",doneEditing:"Done",editChoices:"Edit Choices",showChoices:"Show Choices",move:"Move",empty:"<empty>",emptyValue:"Value is empty",fastEntry:"Manual Entry",fastEntryNonUniqueError:"Value '{0}' is not unique",fastEntryChoicesCountError:"Please limit the number of items from {0} to {1}",fastEntryPlaceholder:"You can set data in the following format:\nvalue1|text\nvalue2",formEntry:"Form Entry",testService:"Test the service",itemSelectorEmpty:"Please select the element",conditionActionEmpty:"Please select the action",conditionSelectQuestion:"Select question...",conditionSelectPage:"Select page...",conditionSelectPanel:"Select panel...",conditionValueQuestionTitle:"Please enter/select the value",expressionHelp:"Use curly brackets to access answers: `{question1} + {question2}`. Expressions also support functions: `iif()`, `today()`, `age()`, `min()`, `max()`, `count()`, `avg()`, and others",aceEditorHelp:"Press ctrl+space to get expression completion hint",aceEditorRowTitle:"Current row",aceEditorPanelTitle:"Current panel",showMore:"For more details please check the documentation",assistantTitle:"Available questions",cellsEmptyRowsColumns:"There is should be at least one column or row",showPreviewBeforeComplete:"Preview answers before submitting the survey",overridingPropertyPrefix:"Set by ",propertyIsEmpty:"Please enter a value",propertyIsNoUnique:"Please enter a unique value",propertyNameIsNotUnique:"Please enter a unique name",propertyNameIsIncorrect:'Do not use reserved words: "item", "choice", "panel", "row".',listIsEmpty:"No items have been added yet","listIsEmpty@choices":"No choices have been added yet","addNew@choices":"Add a choice",expressionIsEmpty:"Expression is empty",value:"Value",text:"Text",rowid:"Row ID",imageLink:"Image or video URL",columnEdit:"Edit column: {0}",itemEdit:"Edit item: {0}",url:"Service URL",path:"Path to data within the service",valueName:"Store answers in the following JSON field",choicesbyurl:{valueName:"Get values from the following JSON field"},titleName:"Get display texts from the following JSON field",imageLinkName:"Get image URLs from the following JSON field",allowEmptyResponse:"Allow empty response",titlePlaceholder:"Title",surveyTitlePlaceholder:"Survey Title",pageTitlePlaceholder:"Page {num}",descriptionPlaceholder:"Description",surveyDescriptionPlaceholder:"Description",pageDescriptionPlaceholder:"Description",showOtherItem:"Allow the Other option",otherText:"Other option text",showNoneItem:"Allow the None option",noneText:"None option text",showSelectAllItem:"Allow the Select All option",selectAllText:"Select All option text",choicesMin:"Minimum value for auto-generated items",choicesMax:"Maximum value for auto-generated items",choicesStep:"Step for auto-generated items",name:"Name",title:"Title",cellType:"Cell type",colCount:"Column count",choicesOrder:"Choices sort order",visible:"Visible",isRequired:"Required",isAllRowRequired:"Require answer for all rows",requiredErrorText:'"Required" error message',startWithNewLine:"Display the question on a new line",rows:"Rows",cols:"Columns",placeholder:"Input area placeholder",showPreview:"Show preview area",storeDataAsText:"Store file content in JSON result as text",maxSize:"Maximum file size (in bytes)",imageHeight:"Image height",imageWidth:"Image width",rowCount:"Row count",columnLayout:"Columns layout",addRowLocation:"Add Row button location",addRowText:"Add Row button text",removeRowText:"Remove Row button text",rateMin:"Minimum rate value",rateMax:"Maximum rate value",rateStep:"Rate step",minRateDescription:"Minimum rate value description",maxRateDescription:"Maximum rate value description",inputType:"Input type",optionsCaption:"Option placeholder",defaultValue:"Default Answer",cellsDefaultRow:"Default texts",surveyEditorTitle:"Edit survey settings",qEditorTitle:"Edit: {0}",maxLength:"Maximum length (in characters)",buildExpression:"Build",editExpression:"Edit",and:"and",or:"or",remove:"Remove",addCondition:"Add Condition",emptyLogicPopupMessage:"Select a question to start configuring conditions.",if:"If",then:"then",setToName:"Target question",fromName:"Question to copy answer from",gotoName:"Question to skip to",ruleIsNotSet:"Rule is incorrect",includeIntoResult:"Include into survey results",showTitle:"Show the title",expandCollapseTitle:"Expand/collapse title",locale:"Survey language",simulator:"Select device type",landscapeOrientation:"Switch to landscape orientation",portraitOrientation:"Switch to portrait orientation",mode:"Editable or read-only",clearInvisibleValues:"Clear invisible values",cookieName:"Cookie name",sendResultOnPageNext:"Save partial survey results in progress",storeOthersAsComment:"Store the Others value in a separate field",showPageTitles:"Show page titles",showPageNumbers:"Show page numbers",pagePrevText:"Previous Page button text",pageNextText:"Next Page button text",completeText:"Complete Survey button text",previewText:"Preview Answers button text",editText:"Edit Answer button text",startSurveyText:"Start Survey button text",showNavigationButtons:"Navigation buttons location",showPrevButton:"Show the Previous Page button",firstPageIsStarted:"First page is a start page",showCompletedPage:"Show the Survey Complete page",goNextPageAutomatic:"Proceed to the next page automatically",showProgressBar:"Progress bar location",questionTitleLocation:"Question title location",requiredText:"Required symbol(s)",questionStartIndex:"Start index (number or letter)",showQuestionNumbers:"Question numbering",questionTitleTemplate:"Question title template, default is: '{no}. {require} {title}'",questionErrorLocation:"Error message location",focusFirstQuestionAutomatic:"Focus first question on a new page",questionsOrder:"Element order on the page",maxTimeToFinish:"Time limit to finish the survey (in seconds)",maxTimeToFinishPage:"Time limit to finish one page (in seconds)",image:{imageHeight:"Image height (in CSS-accepted values)",imageWidth:"Image width (in CSS-accepted values)"},page:{maxTimeToFinish:"Time limit to finish the page (in seconds)"},question:{page:"Parent page"},showTimerPanel:"Timer location",showTimerPanelMode:"Timer mode",renderMode:"Panel display mode",allowAddPanel:"Allow adding panels",allowRemovePanel:"Allow removing panels",noEntriesText:"Empty entries text",panelAddText:"Add Panel button text",panelRemoveText:"Remove Panel button text",isSinglePage:"Show all elements on one page",html:"HTML markup",expression:"Expression",setValue:"Answer",dataFormat:"Image format",allowAddRows:"Allow adding rows",allowRemoveRows:"Allow removing rows",allowRowsDragAndDrop:"Allow row drag and drop",responsiveImageSizeHelp:"Does not apply if you specify the exact image width or height.",minImageWidth:"Minimum image width",maxImageWidth:"Maximum image width",minImageHeight:"Minimum image height",maxImageHeight:"Maximum image height",minValue:"Minimum value",maxValue:"Maximum value",minLength:"Minimum length (in characters)",allowDigits:"Allow digits",minCount:"Minimum count",maxCount:"Maximum count",regex:"Regular expression",surveyvalidator:{text:"Error message",expression:"Validation expression"},totalText:"Total row text",totalType:"Total type",totalExpression:"Total expression",totalDisplayStyle:"Total value display style",totalCurrency:"Currency",totalFormat:"Formatted string",logo:"Logo (URL or base64-encoded string)",questionsOnPageMode:"Survey structure",maxTextLength:"Maximum answer length (in characters)",maxOthersLength:"Maximum comment length (in characters)",autoGrowComment:"Auto-expand comment area if necessary",allowResizeComment:"Allow users to resize text areas",textUpdateMode:"Update text question value",focusOnFirstError:"Set focus on the first invalid answer",checkErrorsMode:"Run validation",navigateToUrl:"Navigate to URL",navigateToUrlOnCondition:"Dynamic URL",completedBeforeHtml:"Markup to show if the user already filled out this survey",completedHtml:"Survey Complete page markup",completedHtmlOnCondition:"Dynamic Survey Complete page markup",loadingHtml:"Markup to show while survey model is loading",commentText:"Comment area text",autocomplete:"Autocomplete type",labelTrue:'"True" label',labelFalse:'"False" label',allowClear:"Show the Clear button",displayStyle:"Value display style",format:"Formatted string",maximumFractionDigits:"Maximum fractional digits",minimumFractionDigits:"Minimum fractional digits",useGrouping:"Display grouping separators",allowMultiple:"Allow multiple files",allowImagesPreview:"Preview images",acceptedTypes:"Accepted file types",waitForUpload:"Wait for the upload to complete",needConfirmRemoveFile:"Confirm file deletion",detailPanelMode:"Detail panel location",minRowCount:"Minimum row count",maxRowCount:"Maximum row count",confirmDelete:"Confirm row deletion",confirmDeleteText:"Confirmation message",paneldynamic:{confirmDelete:"Confirm panel deletion"},panelCount:"Initial panel count",minPanelCount:"Minimum panel count",maxPanelCount:"Maximum panel count",panelsState:"Inner panel expand state",templateDescription:"Description template",templateTitle:"Title template",panelPrevText:"Previous Panel button tooltip",panelNextText:"Next Panel button tooltip",showRangeInProgress:"Show progress bar",templateTitleLocation:"Question title location",panelRemoveButtonLocation:"Remove Panel button location",hideIfRowsEmpty:"Hide the question if there are no rows",hideColumnsIfEmpty:"Hide columns if there are no rows",rateValues:"Custom rate values",rateCount:"Rate count",rateDisplayMode:"Rate display mode",autoGenerate:"How to specify rate values?",hideIfChoicesEmpty:"Hide the question if it contains no choices",hideNumber:"Hide question number",minWidth:"Minimum width (in CSS-accepted values)",maxWidth:"Maximum width (in CSS-accepted values)",width:"Width (in CSS-accepted values)",showHeader:"Show column headers",horizontalScroll:"Show horizontal scrollbar",columnMinWidth:"Minimum column width (in CSS-accepted values)",rowTitleWidth:"Row header width (in CSS-accepted values)",valueTrue:'"True" value',valueFalse:'"False" value',minErrorText:'"Value is below minimum" error message',maxErrorText:'"Value exceeds maximum" error message',otherErrorText:'"Empty comment" error message',keyDuplicationError:'"Non-unique key value" error message',maxSelectedChoices:"Maximum selected choices",showClearButton:"Show the Clear button",showNumber:"Show panel number",logoWidth:"Logo width (in CSS-accepted values)",logoHeight:"Logo height (in CSS-accepted values)",readOnly:"Read-only",enableIf:"Editable if",emptyRowsText:'"No rows" message',size:"Input field size (in characters)",separateSpecialChoices:"Separate special choices (None, Other, Select All)",choicesFromQuestion:"Copy choices from the following question",choicesFromQuestionMode:"Which choices to copy?",showCommentArea:"Show the comment area",commentPlaceholder:"Comment area placeholder",displayRateDescriptionsAsExtremeItems:"Display rate descriptions as extreme values",rowsOrder:"Row order",columnsLayout:"Column layout",columnColCount:"Nested column count",state:"Panel expand state",correctAnswer:"Correct Answer",defaultPanelValue:"Default Values",cells:"Cell Texts",keyName:"Key column",itemvalue:{text:"Alt text"},logoPosition:"Logo position",addLogo:"Add logo...",changeLogo:"Change logo...",logoPositions:{none:"Remove logo",left:"Left",right:"Right",top:"On the top",bottom:"In the bottom"},tabs:{general:"General",fileOptions:"Options",html:"HTML Editor",columns:"Columns",rows:"Rows",choices:"Choices",items:"Items",visibleIf:"Visible If",enableIf:"Editable If",requiredIf:"Required If",rateValues:"Rate Values",choicesByUrl:"Choices from a RESTful Service",matrixChoices:"Default Choices",multipleTextItems:"Text Inputs",numbering:"Numbering",validators:"Validators",navigation:"Navigation",question:"Question",pages:"Pages",timer:"Timer/Quiz",calculatedValues:"Calculated Values",triggers:"Triggers",templateTitle:"Title template",totals:"Totals",logic:"Logic",layout:"Layout",data:"Data",validation:"Validation",cells:"Cell Texts",showOnCompleted:"Survey Complete",logo:"Logo in Survey Title",slider:"Slider",expression:"Expression",others:"Others"},editProperty:"Edit property '{0}'",items:"Items",choicesVisibleIf:"Choices are visible if",choicesEnableIf:"Choices are selectable if",columnsEnableIf:"Columns are visible if",rowsEnableIf:"Rows are visible if",indent:"Add indents",panel:{indent:"Add outer indents"},innerIndent:"Add inner indents",defaultValueFromLastRow:"Take default values from the last row",defaultValueFromLastPanel:"Take default values from the last panel",enterNewValue:"Please, enter the value.",noquestions:"There are no questions in the survey.",createtrigger:"Please create a trigger",titleKeyboardAdornerTip:"Press enter button to edit",keyboardAdornerTip:"Press enter button to edit item, press delete button to delete item, press alt plus arrow up or arrow down to move item",triggerOn:"On ",triggerMakePagesVisible:"Make pages visible",triggerMakeQuestionsVisible:"Make elements visible",triggerCompleteText:"Complete the survey if succeed.",triggerNotSet:"The trigger is not set",triggerRunIf:"Run if",triggerSetToName:"Change value of: ",triggerFromName:"Copy value from: ",triggerRunExpression:"Run this Expression",triggerSetValue:"to: ",triggerGotoName:"Go to the question",triggerIsVariable:"Do not put the variable into the survey result.",triggerRunExpressionEmpty:"Please enter a valid expression",emptyExpressionPlaceHolder:"Type expression here...",noFile:"No file choosen",clearIfInvisible:"Clear the value if the question becomes hidden",valuePropertyName:"Value property name",searchEnabled:"Enable search",hideSelectedItems:"Hide selected items",closeOnSelect:"Close the dropdown after selection",signatureWidth:"Signature width",signatureHeight:"Signature height",verticalAlign:"Vertical alignment",alternateRows:"Alternate rows",columnsVisibleIf:"Columns are visible if",rowsVisibleIf:"Rows are visible if",otherPlaceholder:"Comment area placeholder"},pv:{true:"true",false:"false",inherit:"Inherit",show:"Visible",hide:"Hidden",default:"Inherit",initial:"Initial",random:"Random",collapsed:"Collapsed",expanded:"Expanded",none:"None",asc:"Ascending",desc:"Descending",indeterminate:"Indeterminate",decimal:"decimal",currency:"currency",percent:"percent",firstExpanded:"First panel is expanded",off:"Hide question numbers",onpanel:"Start on each panel",onPanel:"Start on each panel",onSurvey:"Continue throughout the survey",list:"List",progressTop:"Panel navigator + Progress bar at the top",progressBottom:"Panel navigator + Progress bar at the bottom",progressTopBottom:"Panel navigator + Progress bar at the top and bottom",tab:"Tabs",horizontal:"Horizontal",vertical:"Vertical",top:"Top",bottom:"Bottom",topBottom:"Top and bottom",both:"Both",left:"Left",right:"Right",color:"color",date:"date",datetime:"datetime","datetime-local":"datetime-local",email:"email",month:"month",number:"number",password:"password",range:"range",tel:"tel",text:"text",time:"time",url:"url",week:"week",hidden:"Hidden",on:"Continue from the previous page",onPage:"Start on each page",edit:"Editable",display:"Read-only",onComplete:"When the survey is completed",onHidden:"When the question becomes hidden",onHiddenContainer:"When the question or its panel/page becomes hidden",clearInvisibleValues:{none:"Never"},inputType:{color:"Color",date:"Date","datetime-local":"Date and Time",email:"Email",month:"Month",number:"Number",password:"Password",range:"Range",tel:"Phone Number",text:"Text",time:"Time",url:"URL",week:"Week"},all:"All",page:"Page",survey:"Survey",onNextPage:"When switching to the next page",onValueChanged:"After an answer is changed",onValueChanging:"Before an answer is changed",standard:"Original structure",singlePage:"All questions on a single page",questionPerPage:"Each question on an individual page",noPreview:"No preview",showAllQuestions:"Show all questions",showAnsweredQuestions:"Show answered questions only",pages:"Completed pages",questions:"Answered questions",requiredQuestions:"Answered required questions",correctQuestions:"Valid answers",buttons:"Completed pages (button UI)",underInput:"Under the input",underTitle:"Under the title",onBlur:"On blur",onTyping:"While typing",underRow:"Under the row",underRowSingle:"Under the row, only one panel is visible",showNavigationButtons:{none:"Hidden"},showProgressBar:{off:"Hidden"},showTimerPanel:{none:"Hidden"},showTimerPanelMode:{all:"Both"},detailPanelMode:{none:"Hidden"},addRowLocation:{default:"Depends on matrix layout"},panelsState:{default:"Users cannot expand or collapse panels",collapsed:"All panels are collapsed",expanded:"All panels are expanded"},widthMode:{auto:"Auto",static:"Static",responsive:"Responsive"},imageFit:{none:"None",contain:"Contain",cover:"Cover",fill:"Fill"},contentMode:{auto:"Auto",image:"Image",video:"Video",youtube:"YouTube"},displayMode:{auto:"Auto",buttons:"Buttons",dropdown:"Dropdown"},rateColorMode:{default:"Default"},autoGenerate:{true:"Generate",false:"Enter manually"},rateType:{labels:"Labels",stars:"Stars",smileys:"Smileys"}},op:{empty:"Empty",notempty:"Not empty",equal:"Equals",notequal:"Does not equal",contains:"Contains",notcontains:"Does not contain",anyof:"Any of",allof:"All of",greater:"Greater than",less:"Less than",greaterorequal:"Greater than or equal to",lessorequal:"Less than or equal to",and:"and",or:"or"},ew:{angular:"Use Angular version",jquery:"Use jQuery version",knockout:"Use Knockout version",react:"Use React version",vue:"Use Vue version",bootstrap:"For bootstrap framework",modern:"Modern theme",default:"Default theme",orange:"Orange theme",darkblue:"Darkblue theme",darkrose:"Darkrose theme",stone:"Stone theme",winter:"Winter theme",winterstone:"Winter-Stone theme",showOnPage:"Show survey on a page",showInWindow:"Show survey in a window",loadFromServer:"Load Survey JSON from server",titleScript:"Scripts and styles",titleHtml:"HTML",titleJavaScript:"JavaScript"},ts:{selectPage:"Select the page to test it",showInvisibleElements:"Show invisible elements",hideInvisibleElements:"Hide invisible elements"},validators:{answercountvalidator:"Answer count",emailvalidator:"Email",expressionvalidator:"Expression",numericvalidator:"Number",regexvalidator:"Regex",textvalidator:"Text"},triggers:{completetrigger:"Complete survey",setvaluetrigger:"Set answer",copyvaluetrigger:"Copy answer",skiptrigger:"Skip to question",runexpressiontrigger:"Run expression",visibletrigger:"change visibility (deprecated)"},pehelp:{cookieName:"Cookies prevent users from filling out the same survey twice.",size:"Resizes the visible area of the input field. Please use the <b>Validation → Maximum length</b> setting to limit the input length.",format:"Use {0} as a placeholder for the actual value.",totalText:"Visible only when at least one column has Total type or Total expression.",acceptedTypes:"Refer to the [accept](https://www.w3schools.com/tags/att_input_accept.asp) attribute description for more information.",columnColCount:"Applicable only to Radiogroup and Checkbox cell types.",autocomplete:"Refer to the [autocomplete](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) attribute description for more information.",valueName:"If you do not set this property, the answer will be stored in a field specified by the Name property.",choicesbyurl:{valueName:" "},keyName:'If the specified column contains identical values, the survey throws the "Non-unique key value" error.'},p:{title:{name:"title",title:"Leave it empty, if it is the same as 'Name'"},multiSelect:"Allow multiple selection",showLabel:"Show image captions",value:"Value",tabAlign:"Tab alignment",description:"Description",logoFit:"Logo fit",pages:"Pages",questions:"Questions",triggers:"Triggers",calculatedValues:"Calculated values",surveyId:"Survey id",surveyPostId:"Survey post id",surveyShowDataSaving:"Survey show data saving",questionDescriptionLocation:"Question description location",progressBarType:"Progress bar type",showTOC:"Show TOC",tocLocation:"Toc location",questionTitlePattern:"Question title pattern",widthMode:"Width mode",showBrandInfo:"Show brand info",useDisplayValuesInDynamicTexts:"Use display values in dynamic texts",visibleIf:"Visible if",titleLocation:"Title location",descriptionLocation:"Description location",defaultValueExpression:"Default value expression",requiredIf:"Required if",validators:"Validators",bindings:"Bindings",renderAs:"Render as",attachOriginalItems:"Attach original items",choices:"Choices",choicesByUrl:"Choices by url",currency:"Currency",cellHint:"Cell hint",isUnique:"Is unique",showInMultipleColumns:"Show in multiple columns",totalMaximumFractionDigits:"Total maximum fraction digits",totalMinimumFractionDigits:"Total minimum fraction digits",columns:"Columns",detailElements:"Detail elements",allowAdaptiveActions:"Allow adaptive actions",defaultRowValue:"Default row value",detailPanelShowOnAdding:"Detail panel show on adding",choicesLazyLoadEnabled:"Choices lazy load enabled",choicesLazyLoadPageSize:"Choices lazy load page size",inputFieldComponent:"Input field component",itemComponent:"Item component",min:"Min",max:"Max",minValueExpression:"Min value expression",maxValueExpression:"Max value expression",step:"Step",dataList:"Data list",itemSize:"Item size",elements:"Elements",content:"Content",navigationButtonsVisibility:"Navigation buttons visibility",navigationTitle:"Navigation title",navigationDescription:"Navigation description",longTap:"Long tap",autoGrow:"Auto grow",allowResize:"Allow resizing",acceptCarriageReturn:"Accept carriage return",displayMode:"Display mode",rateType:"Rate type",label:"Label",contentMode:"Content mode",imageFit:"Image fit",altText:"Alt text",height:"Height",penColor:"Pen color",backgroundColor:"Background color",templateElements:"Template elements",operator:"Operator",isVariable:"Is variable",runExpression:"Run expression",showCaption:"Show caption",iconName:"Icon name",iconSize:"Icon size"},theme:{"--background":"Background Color","--background-dim-light":"Background Dim Light Color","--primary-foreground":"Primary Foreground Color","--foreground":"Foreground Color","--base-unit":"Base Unit",groupGeneral:"General",groupAdvanced:"Advanced",themeName:"Theme",themeMode:"Modes",themeModePanels:"Panels",themeModeLightweight:"Lightweight",themePaletteLight:"Light",themePaletteDark:"Dark",primaryColor:"Accent Color",primaryDefaultColor:"Default",primaryDarkColor:"Hover",primaryLightColor:"Selected",backgroundDimColor:"Background Color",backgroundImage:"Background Image",backgroundImageFitAuto:"Auto",backgroundImageFitCover:"Cover",backgroundImageFitContain:"Contain",backgroundOpacity:"Opacity",backgroundImageAttachmentFixed:"Fixed",backgroundImageAttachmentScroll:"Scroll",panelBackgroundTransparency:"Panel Background Transparency",questionBackgroundTransparency:"Question Background Transparency",questionPanel:"Question Panel",questionTitle:"Question Title Font",questionDescription:"Question Description Font",editorPanel:"Editor",editorFont:"Editor Font",backcolor:"Default Background",hovercolor:"Hover Background",borderDecoration:"Border Decoration",accentBackground:"Accent Background",accentForeground:"Accent Foreground",primaryForecolor:"Default Color",primaryForecolorLight:"Disabled Color",linesColors:"Lines",borderDefault:"Major",borderLight:"Minor",fontFamily:"Font Family",fontSize:"Font Size",color:"Color",size:"Size",fontWeightRegular:"Regular",fontWeightHeavy:"Heavy",fontWeightSemiBold:"Semi-Bold",fontWeightBold:"Bold",scale:"Scale",cornerRadius:"Corner Radius",surveyTitle:"Survey Title Font",pageTitle:"Page Title Font",pageDescription:"Page Description Font",boxShadowX:"X",boxShadowY:"Y",boxShadowAddRule:"Add More Shadow Effect",opacity:"Opacity",boxShadowBlur:"Blur",boxShadowSpread:"Spread",boxShadowDrop:"Drop",boxShadowInner:"Inner",questionShadow:"Question Panel Border / Shadow",editorShadow:"Editor Border / Shadow",names:{default:"Default",contrast:"Contrast",plain:"Plain",simple:"Simple",blank:"Blank",double:"Double",bulk:"Bulk","pseudo-3d":"Pseudo 3D",playful:"Playful",ultra:"Ultra"},colors:{teal:"Teal",blue:"Blue",purple:"Purple",orchid:"Orchid",tulip:"Tulip",brown:"Brown",green:"Green"}}},r=o(0);!function(e){e[e.AllTypes=0]="AllTypes",e[e.CompatibleTypes=1]="CompatibleTypes"}(i||(i={}));var a={translation:{sortByName:!1,exportPrefix:"",maximumSelectedLocales:7,exportFileName:"survey_translation.csv"},theme:{exportFileName:"survey_theme.json",fontFamily:"Open Sans"},operators:{empty:[],notempty:[],equal:["!file"],notequal:["!file"],contains:["checkbox","text","comment"],notcontains:["checkbox","text","comment"],anyof:["selectbase"],allof:["checkbox"],greater:["!checkbox","!imagepicker","!boolean","!file"],less:["!checkbox","!imagepicker","!boolean","!file"],greaterorequal:["!checkbox","!imagepicker","!boolean","!file"],lessorequal:["!checkbox","!imagepicker","!boolean","!file"]},defaultNewSurveyJSON:{},designer:{defaultAddQuestionType:"text",showAddQuestionButton:!0},logic:{get defaultOperator(){return a.logic.defaultOperators.default},set defaultOperator(e){a.logic.defaultOperators.default=e},defaultOperators:{default:"equal",checkbox:"allof",tagbox:"allof"},visibleActions:[],logicItemTitleMaxChars:50,openBracket:"{",closeBracket:"}",updateExpressionsOnChanging:{questionName:!0,columnName:!0,choiceValue:!0}},questionConvertMode:i.AllTypes,propertyGrid:{useButtonGroup:!0,maxCharsInButtonGroup:25,showNavigationButtons:!1,maximumColumnsCount:0,maximumChoicesCount:0,maximumRowsCount:0,maximumRateValues:0,generalTabName:"general",defaultExpandedTabName:"general"},toolbox:{defaultJSON:{dropdown:{choices:["Item 1","Item 2","Item 3"]},tagbox:{choices:["Item 1","Item 2","Item 3"]},checkbox:{choices:["Item 1","Item 2","Item 3"]},radiogroup:{choices:["Item 1","Item 2","Item 3"]},ranking:{choices:["Item 1","Item 2","Item 3"]},imagepicker:{imageFit:"cover",choices:[{value:"Image 1",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/lion.jpg"},{value:"Image 2",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/giraffe.jpg"},{value:"Image 3",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/panda.jpg"},{value:"Image 4",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/camel.jpg"}]},image:{imageFit:"cover",imageHeight:"auto",imageWidth:"100%"}}},notifications:{lifetime:2e3},autoSave:{delay:500},dragDrop:{restrictDragQuestionBetweenPages:!1},layout:{showTabs:!0,showToolbar:!0,allowCollapseSidebar:!0},jsonEditor:{indentation:1}},s=function(){function e(){this.isMobileView=!1,this.allowEditExpressionsInTextEditor=!0,this.maximumColumnsCount=a.propertyGrid.maximumColumnsCount,this.maximumChoicesCount=a.propertyGrid.maximumChoicesCount,this.maximumRowsCount=a.propertyGrid.maximumRowsCount,this.maximumRateValues=a.propertyGrid.maximumRateValues}return e.prototype.getProcessedTranslationItemText=function(e,t,o,i){return o},e.prototype.getObjectDisplayName=function(e,t,o,i){return i},e.prototype.onCanShowPropertyCallback=function(e,t,o,i,n){return!0},e.prototype.onPropertyGridSurveyCreatedCallback=function(e,t){},e.prototype.onPropertyEditorCreatedCallback=function(e,t,o){},e.prototype.onPropertyEditorUpdateTitleActionsCallback=function(e,t,o,i){},e.prototype.onPropertyGridShowModalCallback=function(e,t,o,i,n){},e.prototype.onIsPropertyReadOnlyCallback=function(e,t,o,i,n){return o},e.prototype.onCanDeleteItemCallback=function(e,t,o){return o},e.prototype.onCollectionItemDeletingCallback=function(e,t,o,i){return!0},e.prototype.onCollectionItemAllowingCallback=function(e,t,o,i,n){},e.prototype.onItemValueAddedCallback=function(e,t,o,i){},e.prototype.onMatrixDropdownColumnAddedCallback=function(e,t,o){},e.prototype.onSetPropertyEditorOptionsCallback=function(e,t,o){},e.prototype.onGetErrorTextOnValidationCallback=function(e,t,o){return null},e.prototype.onValueChangingCallback=function(e){},e.prototype.onGetElementEditorTitleCallback=function(e,t){return t},e.prototype.startUndoRedoTransaction=function(){},e.prototype.stopUndoRedoTransaction=function(){},e.prototype.createSurvey=function(e,t,o){return new r.SurveyModel(e)},e.prototype.onConditionQuestionsGetListCallback=function(e,t,o,i){return"asc"},e.prototype.onConditionGetTitleCallback=function(e,t){return t},e.prototype.onLogicGetTitleCallback=function(e,t,o,i){return o},e.prototype.getTranslationExportedText=function(e,t,o,i,n){return n},e.prototype.uploadFiles=function(e,t,o){},e}();function l(e){if(!e)return"";for(var t="",o=e.length-1;o>=0;o--){if(e[o]>="0"&&e[o]<="9")t=e[o]+t;else if(t)return t;if(10==t.length)break}return t}r.StylesManager.applyTheme("defaultV2");var u={true:"false",True:"False",TRUE:"FALSE",false:"true",False:"True",FALSE:"TRUE",yes:"no",Yes:"No",YES:"NO",no:"yes",No:"Yes",NO:"YES"};function c(e,t){t=t.toString();for(var o=0;o<e.length;o++)if(e[o]&&e[o].toString()===t)return!0;return!1}function p(e,t){return h(e,t.map((function(e){return e.value})))}function d(e){var t=e.length;if(0===t)return"";if(!e[t-1].text||e[t-1].text===e[t-1].value)return"";var o=[];e.forEach((function(e){e.hasText&&o.push(e.text)})),e.map((function(e){return e.text}));var i=h("",o);return i?i.toString():""}function h(e,t){if(t.length>0)var o=function(e){return u[e]?u[e]:null}(t[t.length-1]);if(o&&t.indexOf(o)<0)return o;for(var i,n="",r=-1,a=t.length-1;a>=0;a--)if(t[a]){var s=t[a].toString();if(n=l(s)){r=s.lastIndexOf(n),i=t[a];break}}if(r>-1){var p,d=parseInt(n),h=i===d;do{if(h)p=++d;else{for(var g=(d++).toString();n.length>g.length;)g="0"+g;p=s.substring(0,r)+g+s.substring(r+n.length)}}while(c(t,p));return p}return e||(e=t[t.length-1]),e+1}function g(e,t){for(var o=t;o&&!o.classList.contains(e);)o=o.parentElement;return o}function m(e){for(var t=0;t<e.length;t++)if("function"==typeof e[t].getElementsByClassName){var o=e[t].getElementsByClassName("svd-focusable");if(0===o.length&&-1!==e[t].className.indexOf("svd-focusable")&&(o=[e[t]]),o.length>0){var i=o[0];if("a"!==i.tagName.toLowerCase()){i.focus({preventScroll:!0});break}}}}function f(e){if(e&&e.length){for(var t=0;t<e.length;t++)if("#text"!=e[t].nodeName&&"#comment"!=e[t].nodeName)return e[t];return null}}function y(e){var t=e.element,o=[];if(8!==t.nodeType)return t.childNodes;for(;t=t.nextSibling;)3!==t.nodeType&&o.push(t);return o}function v(e,t){var o=!0;e&&"function"==typeof e.getType&&(o=!!r.Serializer.findProperty(e.getType(),t));return o}function b(e,t){var o=!0;if(e&&"function"==typeof e.getType){var i=r.Serializer.findProperty(e.getType(),t);o=!i||i.visible}return o}function w(e,t,o){void 0===o&&(o=0);function i(e,o){void 0===o&&(o=null);var i=(t.className||"").split(" ");o&&-1==i.indexOf(o)||-1==i.indexOf(e)&&(t.className+=" "+e)}e.__svc_question_processed||"mouseover"!==e.type?(t.className=(t.className||"").replace(" svc-hovered-ready",""),t.className=(t.className||"").replace(" svc-hovered","")):(o?(i("svc-hovered-ready"),setTimeout((function(){i("svc-hovered","svc-hovered-ready")}),o)):i("svc-hovered"),e.__svc_question_processed=!0)}function C(e){return e.replace(new RegExp("(\\r\\n|\\n|\\r)","gm"),"")}function x(e){var t,o;window&&(window.getSelection&&document.createRange?(o=window.getSelection(),(t=document.createRange()).selectNodeContents(e),o.removeAllRanges(),o.addRange(t)):document.selection&&document.body.createTextRange&&((t=document.body.createTextRange()).moveToElementText(e),t.select()))}function T(e,t){for(var o in t){var i=t[o];"object"==typeof i&&(i={},this.copyObject(i,t[o])),e[o]=i}}function S(e,t){t&&("string"==typeof t||t instanceof String?e.root=t:T(e,t))}function P(e,t){S(e,r.defaultV2Css.question),S(e,r.defaultV2Css[t])}function E(e){return a.logic.openBracket+e+a.logic.closeBracket}function O(e){return e?e=(e=e.replace(/[\s]+/g," ")).replace(/([\s]|^)(\S)/g,(function(e,t,o){return t+o.toUpperCase()})):e}function I(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.every((function(e){return!0===e}))}var V="image/png, image/gif, image/jpeg, image/apng, image/avif, image/svg+xml, image/webp";function N(e){return["auto","image"].indexOf(e)>-1?V:"video"==e?"video/*":""}function A(e){return e instanceof r.MatrixDropdownColumn?e.templateQuestion:e}function _(e,t){if(e&&void 0!==t)return"rgba("+parseInt(e.slice(1,3),16)+", "+parseInt(e.slice(3,5),16)+", "+parseInt(e.slice(5,7),16)+", "+t+")"}function L(e,t){return"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"}function j(e){var t=e.match(/\((.*)\)/);return t?t[1].split(",").map((function(e){return parseFloat(e)})):[]}function k(e){var t=j(e);if(0!==t.length){var o=1;return 4==t.length&&(o=t.pop()),{color:t.reduce((function(e,t){var o=t.toString(16);return e+(1==o.length?"0"+o:o)}),"#"),opacity:100*o}}return{color:e,opacity:100}}function M(e,t,o){t/=100,o/=100;var i=function(t){return(t+e/60)%6},n=function(e){return o*(1-t*Math.max(0,Math.min(i(e),4-i(e),1)))};return[Math.round(255*n(5)),Math.round(255*n(3)),Math.round(255*n(1))]}function D(e,t,o){e/=255,t/=255,o/=255;var i=Math.max(e,t,o),n=i-Math.min(e,t,o),r=0===n?0:n&&i===e?(t-o)/n:i===t?2+(o-e)/n:4+(e-t)/n;return[60*(r<0?r+6:r),i&&n/i*100,100*i]}function R(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!(e.length<=1))if(2!=e.length)for(var o=1;o<e.length;o++)R(e[0],e[o]);else Object.keys(e[1]).forEach((function(t){return e[0][t]=e[1][t]}))}var B=function(){function e(){this.colorSettings={baseColorAlpha:1,darkColorAlpha:1,lightColorAlpha:1,deltaDarkColor:0,deltaLightColor:0,newColorLight:"",newColorDark:""}}return e.prototype.initialize=function(e,t,o){var i=j(e),n=j(o),r=j(t);this.colorSettings.baseColorAlpha=i[3],this.colorSettings.darkColorAlpha=n[3],this.colorSettings.lightColorAlpha=r[3];var a=D(i[0],i[1],i[2]),s=D(n[0],n[1],n[2]),l=D(r[0],r[1],r[2]);this.colorSettings.deltaDarkColor=a[2]-s[2],this.colorSettings.deltaLightColor=a[2]-l[2]},e.prototype.calculateColors=function(e){var t=j(e);0===t.length&&(t=j(_(e,1)));var o=D(t[0],t[1],t[2]),i=M(o[0],o[1],o[2]-this.colorSettings.deltaDarkColor),n=M(o[0],o[1],o[2]-this.colorSettings.deltaLightColor);this.colorSettings.newColorLight=L(n,this.colorSettings.lightColorAlpha),this.colorSettings.newColorDark=L(i,this.colorSettings.darkColorAlpha)},e}(),q=function(){function e(){this.camelCaseBreaking=!0,this.currentLocale="",this.locales={},this.peByClass={},this.peHelpByClass={}}return e.prototype.reset=function(){this.peByClass={},this.peHelpByClass={}},e.prototype.getString=function(e,t){void 0===t&&(t=null);for(var o=this.getLocale(t),i=this.getLocale("en"),n=e.split("."),r=o,a=0;a<n.length;a++)if(!(r=r[n[a]])&&""!==r)return o===i?n[a]:this.getString(e,"en");return r},e.prototype.hasString=function(e,t){void 0===t&&(t=null);for(var o=this.getLocale(t),i=e.split("."),n=o,r=0;r<i.length;r++)if(!(n=n[i[r]])&&""!==n)return!1;return!0},e.prototype.getLocaleName=function(e,t){void 0===t&&(t=null);var o=r.surveyLocalization.localeNames;t||(t=r.surveyLocalization.defaultLocale);var i=e?O(o[e]):H.getString("ed.defaultLocale").format(O(o[t]));return i||e},e.prototype.getPropertyName=function(e,t){void 0===t&&(t=null);var o=this.getProperty(e,t),i=o.name;return i?i!=e?i:this.getAutoPropertyName(i,t):o},e.prototype.getPropertyTitle=function(e){var t=this.getProperty(e);return t.title?t.title:""},e.prototype.getPropertyNameInEditor=function(e,t,o){void 0===o&&(o=null);var i=this.getPropertyInfoInEditorByType(e,t,this.peByClass,"pe");return i||(i=this.getString("pe."+t)),i!==t?i:this.getPropertyName(t,o)},e.prototype.getPropertyHelpInEditor=function(e,t,o){void 0===o&&(o=void 0);var i=this.getPropertyInfoInEditorByType(e,t,this.peHelpByClass,"pehelp");if(i)return" "===i?null:i;var n=this.getLocale();return n&&n.pehelp&&(i=n.pehelp[t]),i||(o&&n.pe?n.pe[o+"Help"]:void 0)},e.prototype.getPropertyInfoInEditorByType=function(e,t,o,i){if(e){var n=o[e];for(void 0===n&&(n=this.getObjInEditorByType(e,o,i));n;){if(n.props[t])return n.props[t];n=n.parent}}},e.prototype.getObjInEditorByType=function(e,t,o){if(e){t[e];var i=this.getLocale(),n=i?i[o]:void 0;if(n){for(var a=r.Serializer.findClass(e),s=[],l=void 0;a;){var u=a.name;if(l=t[e])break;if(s.push(u),n[u]){l={props:n[u],parent:this.getObjInEditorByType(a.parentName,t,o)};break}if(!a.parentName)break;a=r.Serializer.findClass(a.parentName)}for(var c=0;c<s.length;c++)t[s[c]]=l;return l}}},e.prototype.getProperty=function(e,t){void 0===t&&(t=null);var o=this.getString("p."+e);if(o!==e)return o;var i=e.indexOf("_");return i<-1?this.getAutoPropertyName(o,t):(e=e.substring(i+1),(o=this.getString("p."+e))!==e?o:this.getAutoPropertyName(o,t))},e.prototype.convertToCamelCase=function(e,t){if(void 0===t&&(t=!1),!e)return e;if((e=e.trim()).indexOf(" ")>-1)return e;for(var o=!1,i=0;i<e.length;i++)if(e[i]!==e[i].toUpperCase()){o=!0;break}if(!o)return e;var n=e[0].toUpperCase(),r=!1,a=function(t){return!(t>=e.length)&&e[t].toUpperCase()===e[t]};for(i=1;i<e.length;i++){!r&&a(i)&&(n+=" "),n+=!r&&!a(i+1)?e[i].toLowerCase():e[i],r=a(i)}return t&&(n=n.toLowerCase()),n},e.prototype.getAutoPropertyName=function(e,t){return void 0===t&&(t=null),t||(e&&this.camelCaseBreaking?this.convertToCamelCase(e):e)},e.prototype.getPropertyValueInEditor=function(e,t){var o=this.getLocale();if(o&&o.pv&&o.pv[e]){var i=o.pv[e][t];if(i)return i}return this.getPropertyValue(t)},e.prototype.getPropertyValue=function(e,t){return void 0===t&&(t=null),this.getValueInternal(e,"pv",t)},e.prototype.getValidatorName=function(e,t){return void 0===t&&(t=null),this.getValueInternal(e,"validators",t)},e.prototype.getTriggerName=function(e,t){return void 0===t&&(t=null),this.getValueInternal(e,"triggers",t)},e.prototype.getLocale=function(e){e||(e=this.currentLocale);var t=e?this.locales[e]:F;return t||(t=F),t},e.prototype.getValueInternal=function(e,t,o){if(void 0===o&&(o=null),""===e||null==e)return"";e=e.toString();var i=this.getLocale(o),n=i[t]?i[t][e]:null;return n||(n=F[t][e]),n||(this.camelCaseBreaking?this.convertToCamelCase(e,!1):e)},e.prototype.getLocales=function(){var e=[];for(var t in e.push(""),this.locales)e.push(t);return e},e}(),H=new q;function Q(e,t){return void 0===t&&(t=null),H.getString(e,t)}r.surveyLocalization.onGetExternalString=function(e,t){var o=H.getString(e,t);return o!==e?o:""};var F=n,U=function(e,t,o,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,o,a):n(t,o))||a);return r>3&&a&&Object.defineProperty(t,o,a),a},G=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e};function z(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);function i(){this.constructor=e}e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var Z=function(){function e(e){void 0===e&&(e=0),this.parseType=e}return e.prototype.parse=function(e,t,o,i){var n;return void 0===t&&(t=null),void 0===o&&(o=0),void 0===i&&(i=-1),this.text=String(e),this.at=o,this.endAt=i,this.ch=" ",n=this.value(),this.white(),this.ch&&this.error("Syntax error"),"function"==typeof t?function e(o,i){var n,r,a=o[i];if(a&&"object"==typeof a)for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(void 0!==(r=e(a,n))?a[n]=r:delete a[n]);return t.call(o,i,a)}({"":n},""):n},e.prototype.error=function(e){var t=new SyntaxError;throw t.message=e,t.at=this.at,t},e.prototype.next=function(e){return void 0===e&&(e=null),e&&e!==this.ch&&this.error("Expected '"+e+"' instead of '"+this.ch+"'"),this.ch=this.chartAt(),this.at+=1,this.ch},e.prototype.peek=function(){return this.chartAt()},e.prototype.chartAt=function(){return this.endAt>-1&&this.at>=this.endAt?"":this.text.charAt(this.at)},e.prototype.identifier=function(){var e=this.ch;for("_"!==this.ch&&"$"!==this.ch&&(this.ch<"a"||this.ch>"z")&&(this.ch<"A"||this.ch>"Z")&&this.error("Bad identifier");this.next()&&("_"===this.ch||"$"===this.ch||this.ch>="a"&&this.ch<="z"||this.ch>="A"&&this.ch<="Z"||this.ch>="0"&&this.ch<="9");)e+=this.ch;return e},e.prototype.number=function(){var e,t="",o="",i=10;if("-"!==this.ch&&"+"!==this.ch||(t=this.ch,this.next(this.ch)),"I"===this.ch)return("number"!=typeof(e=this.word())||isNaN(e))&&this.error("Unexpected word for number"),"-"===t?-e:e;if("N"===this.ch)return e=this.word(),isNaN(e)||this.error("expected word to be NaN"),e;switch("0"===this.ch&&(o+=this.ch,this.next(),"x"===this.ch||"X"===this.ch?(o+=this.ch,this.next(),i=16):this.ch>="0"&&this.ch<="9"&&this.error("Octal literal")),i){case 10:for(;this.ch>="0"&&this.ch<="9";)o+=this.ch,this.next();if("."===this.ch)for(o+=".";this.next()&&this.ch>="0"&&this.ch<="9";)o+=this.ch;if("e"===this.ch||"E"===this.ch)for(o+=this.ch,this.next(),"-"!==this.ch&&"+"!==this.ch||(o+=this.ch,this.next());this.ch>="0"&&this.ch<="9";)o+=this.ch,this.next();break;case 16:for(;this.ch>="0"&&this.ch<="9"||this.ch>="A"&&this.ch<="F"||this.ch>="a"&&this.ch<="f";)o+=this.ch,this.next()}if(e="-"===t?-o:+o,isFinite(e))return e;this.error("Bad number")},e.prototype.string=function(){var t,o,i,n,r="";if('"'===this.ch||"'"===this.ch)for(i=this.ch;this.next();){if(this.ch===i)return this.next(),r;if("\\"===this.ch)if(this.next(),"u"===this.ch){for(n=0,o=0;o<4&&(t=parseInt(this.next(),16),isFinite(t));o+=1)n=16*n+t;r+=String.fromCharCode(n)}else if("\r"===this.ch)"\n"===this.peek()&&this.next();else{if("string"!=typeof e.escapee[this.ch])break;r+=e.escapee[this.ch]}else{if("\n"===this.ch)break;r+=this.ch}}this.error("Bad string")},e.prototype.inlineComment=function(){"/"!==this.ch&&this.error("Not an inline comment");do{if(this.next(),"\n"===this.ch||"\r"===this.ch)return void this.next()}while(this.ch)},e.prototype.blockComment=function(){"*"!==this.ch&&this.error("Not a block comment");do{for(this.next();"*"===this.ch;)if(this.next("*"),"/"===this.ch)return void this.next("/")}while(this.ch);this.error("Unterminated block comment")},e.prototype.comment=function(){"/"!==this.ch&&this.error("Not a comment"),this.next("/"),"/"===this.ch?this.inlineComment():"*"===this.ch?this.blockComment():this.error("Unrecognized comment")},e.prototype.white=function(){for(;this.ch;)if("/"===this.ch)this.comment();else{if(!(e.ws.indexOf(this.ch)>=0))return;this.next()}},e.prototype.word=function(){switch(this.ch){case"t":return this.next("t"),this.next("r"),this.next("u"),this.next("e"),!0;case"f":return this.next("f"),this.next("a"),this.next("l"),this.next("s"),this.next("e"),!1;case"n":return this.next("n"),this.next("u"),this.next("l"),this.next("l"),null;case"I":return this.next("I"),this.next("n"),this.next("f"),this.next("i"),this.next("n"),this.next("i"),this.next("t"),this.next("y"),1/0;case"N":return this.next("N"),this.next("a"),this.next("N"),NaN}this.error("Unexpected '"+this.ch+"'")},e.prototype.array=function(){var e=[];if("["===this.ch)for(this.next("["),this.white();this.ch;){if("]"===this.ch)return this.next("]"),e;if(","===this.ch?this.error("Missing array element"):e.push(this.value()),this.white(),","!==this.ch)return this.next("]"),e;this.next(","),this.white()}this.error("Bad array")},e.prototype.object=function(){var t,o,i=!0,n={};if(this.parseType>0&&(n[e.positionName]={start:this.at-1}),"{"===this.ch)for(this.next("{"),this.white(),o=this.at-1;this.ch;){if("}"===this.ch)return this.parseType>0&&(n[e.positionName].end=o),this.next("}"),n;if(t='"'===this.ch||"'"===this.ch?this.string():this.identifier(),this.white(),this.parseType>1&&(n[e.positionName][t]={start:o,valueStart:this.at}),this.next(":"),n[t]=this.value(),this.parseType>1&&(o=this.at-1,n[e.positionName][t].valueEnd=o,n[e.positionName][t].end=o),this.white(),","!==this.ch)return this.parseType>1&&(n[e.positionName][t].valueEnd--,n[e.positionName][t].end--),this.parseType>0&&(n[e.positionName].end=this.at-1),this.next("}"),n;this.parseType>1&&(n[e.positionName][t].valueEnd--,i||n[e.positionName][t].end--),this.next(","),this.white(),i=!1}this.error("Bad object")},e.prototype.value=function(){switch(this.white(),this.ch){case"{":return this.object();case"[":return this.array();case'"':case"'":return this.string();case"-":case"+":case".":return this.number();default:return this.ch>="0"&&this.ch<="9"?this.number():this.word()}},e.prototype.stringify=function(e,t,o){if(void 0===t&&(t=null),void 0===o&&(o=null),t&&"function"!=typeof t&&!this.isArray(t))throw new Error("Replacer must be a function or an array");this.replacer=t,this.indentStr=this.getIndent(o),this.objStack=[];var i={"":e};return void 0===e?this.getReplacedValueOrUndefined(i,"",!0):this.internalStringify(i,"",!0)},e.prototype.getIndent=function(e){if(e){if("string"==typeof e)return e;if("number"==typeof e&&e>=0)return this.makeIndent(" ",e,!0)}return""},e.prototype.getReplacedValueOrUndefined=function(e,t,o){var i=e[t];return i&&i.toJSON&&"function"==typeof i.toJSON&&(i=i.toJSON()),"function"==typeof this.replacer?this.replacer.call(e,t,i):this.replacer?o||this.isArray(e)||this.replacer.indexOf(t)>=0?i:void 0:i},e.prototype.isWordChar=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"_"===e||"$"===e},e.prototype.isWordStart=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"_"===e||"$"===e},e.prototype.isWord=function(e){if("string"!=typeof e)return!1;if(!this.isWordStart(e[0]))return!1;for(var t=1,o=e.length;t<o;){if(!this.isWordChar(e[t]))return!1;t++}return!0},e.prototype.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},e.prototype.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},e.prototype.isNaN=function(e){return"number"==typeof e&&e!=e},e.prototype.checkForCircular=function(e){for(var t=0;t<this.objStack.length;t++)if(this.objStack[t]===e)throw new TypeError("Converting circular structure to JSON")},e.prototype.makeIndent=function(e,t,o){if(void 0===o&&(o=!1),!e)return"";e.length>10&&(e=e.substring(0,10));for(var i=o?"":"\n",n=0;n<t;n++)i+=e;return i},e.prototype.escapeString=function(t){return e.escapable.lastIndex=0,e.escapable.test(t)?'"'+t.replace(e.escapable,(function(t){var o=e.meta[t];return"string"==typeof o?o:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'},e.prototype.internalStringify=function(e,t,o){var i,n,r=this.getReplacedValueOrUndefined(e,t,o);switch(r&&!this.isDate(r)&&(r=r.valueOf()),typeof r){case"boolean":return r.toString();case"number":return isNaN(r)||!isFinite(r)?"null":r.toString();case"string":return this.escapeString(r.toString());case"object":if(null===r)return"null";if(this.isArray(r)){this.checkForCircular(r),i="[",this.objStack.push(r);for(var a=0;a<r.length;a++)n=this.internalStringify(r,a,!1),i+=this.makeIndent(this.indentStr,this.objStack.length),i+=null==n?"null":n,a<r.length-1?i+=",":this.indentStr&&(i+="\n");this.objStack.pop(),i+=this.makeIndent(this.indentStr,this.objStack.length,!0)+"]"}else{this.checkForCircular(r),i="{";var s=!1;for(var l in this.objStack.push(r),r)if(r.hasOwnProperty(l)){var u=this.internalStringify(r,l,!1);if(o=!1,null!=u)i+=this.makeIndent(this.indentStr,this.objStack.length),s=!0,i+=(this.isWord(l)?l:this.escapeString(l))+":"+(this.indentStr?" ":"")+u+","}this.objStack.pop(),i=s?i.substring(0,i.length-1)+this.makeIndent(this.indentStr,this.objStack.length)+"}":"{}"}return i;default:return}},e.positionName="pos",e.escapee={"'":"'",'"':'"',"\\":"\\","/":"/","\n":"",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},e.ws=[" ","\t","\r","\n","\v","\f"," ","\ufeff"],e.cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e.escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e.meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},e}(),J=function(e){function t(t){var o=e.call(this)||this;return o.toolbox=t,o}return z(t,e),t.prototype.toggleState=function(){this.toolbox&&this.toolbox.toggleCategoryState(this.name)},U([Object(r.property)()],t.prototype,"name",void 0),U([Object(r.propertyArray)()],t.prototype,"items",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"collapsed",void 0),t}(r.Base),W=function(e){function t(t){var o=e.call(this,t)||this;return o.item=t,o}return z(t,e),t.prototype.toJSON=function(){return this.item},t}(r.Action),K=function(e){function t(t,o,i){void 0===t&&(t=null),void 0===o&&(o=null),void 0===i&&(i=!1);var n=e.call(this)||this;return n.supportedQuestions=t,n.creator=o,n._orderedQuestions=["radiogroup","rating","checkbox","dropdown","tagbox","boolean","file","imagepicker","ranking","text","comment","multipletext","panel","paneldynamic","matrix","matrixdropdown","matrixdynamic","html","expression","image","signaturepad"],n.copiedItemMaxCount=3,n.allowExpandMultipleCategoriesValue=!1,n.keepAllCategoriesExpandedValue=!1,n.createDefaultItems(t,i),n.initDotsItem(),n}return z(t,e),t.getQuestionDefaultSettings=function(e){if(a.toolbox&&a.toolbox.defaultJSON)return a.toolbox.defaultJSON[e]},Object.defineProperty(t.prototype,"orderedQuestions",{get:function(){return this._orderedQuestions},set:function(e){this._orderedQuestions=e,this.reorderItems()},enumerable:!1,configurable:!0}),t.prototype.initDotsItem=function(){var e=this;this.dotsItem.popupModel.horizontalPosition="right",this.dotsItem.popupModel.verticalPosition="top",this.dragOrClickHelper=new r.DragOrClickHelper((function(t,o,i){var n=e.creator.getJSONForNewElement(i.json);e.dotsItem.popupModel.toggleVisibility(),e.dragDropHelper.startDragToolboxItem(t,n,i.title)})),this.hiddenItemsListModel.onPointerDown=function(t,o){e.creator.readOnly||e.dragOrClickHelper.onPointerDown(t,o)},this.dotsItem.popupModel.cssClass="svc-toolbox-popup"},t.prototype.getDefaultQuestionCategories=function(){var e=this,o={};return Object.keys(t.defaultCategories).forEach((function(i){t.defaultCategories[i].forEach((function(t){e.supportedQuestions&&-1==e.supportedQuestions.indexOf(t)||(o[t]=Q("ed."+i))}))})),o},t.prototype.onActiveCategoryChanged=function(e){for(var t=this.categories,o=0;o<t.length;o++){var i=t[o];i.collapsed=i.name!==e}},t.prototype.setLocation=function(e){"sidebar"===e?this.visibleActions.forEach((function(e){return e.mode="small"})):this.dotsItem.popupModel.horizontalPosition="right"==this.creator.toolboxLocation?"left":"right"},Object.defineProperty(t.prototype,"jsonText",{get:function(){return JSON.stringify(this.actions)},set:function(e){this.actions=e?JSON.parse(e):[],this.onItemsChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"copiedJsonText",{get:function(){return JSON.stringify(this.copiedItems)},set:function(e){var t=e?JSON.parse(e):[];this.clearCopiedItems();for(var o=0;o<t.length;o++)t[o].isCopied=!0,this.addItem(t[o])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"items",{get:function(){return this.actions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemNames",{get:function(){for(var e=[],t=0;t<this.items.length;t++)e.push(this.items[t].name);return e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"copiedItems",{get:function(){for(var e=[],t=0;t<this.actions.length;t++)this.actions[t].isCopied&&e.push(this.actions[t]);return e},enumerable:!1,configurable:!0}),t.prototype.addItems=function(e,t){void 0===t&&(t=!1),t&&this.clearItems();for(var o=0;o<e.length;o++)this.actions.push(this.getActionByItem(e[o]));this.onItemsChanged()},t.prototype.addCopiedItem=function(e,o){void 0===o&&(o=null),o||(o={});var i=o.name?o.name:e.name,n=o.title?o.title:i,r={id:i,name:i,title:n,tooltip:o.tooltip?o.tooltip:n,isCopied:!1!==o.isCopied,iconName:o.iconName?o.iconName:t.defaultIconName,json:o.json?o.json:this.getQuestionJSON(e),category:o.category?o.category:""};if(!this.replaceItem(r)){var a=this.copiedItems;this.copiedItemMaxCount>0&&a.length==this.copiedItemMaxCount&&this.removeItem(a[this.copiedItemMaxCount-1].name),this.addItem(r)}},t.prototype.getActionByItem=function(e){return e instanceof W?e:(e.iconName=e.iconName?e.iconName:t.defaultIconName,new W(e))},t.prototype.addItem=function(e,t){this.correctItem(e);var o=this.getActionByItem(e);void 0===t?this.actions.push(o):this.actions.splice(t,0,o),this.onItemsChanged()},t.prototype.correctItem=function(e){e.title||(e.title=e.name),e.tooltip||(e.tooltip=e.title)},Object.defineProperty(t.prototype,"dragDropHelper",{get:function(){return this.creator.dragDropSurveyElements},enumerable:!1,configurable:!0}),t.prototype.replaceItem=function(e){this.correctItem(e);var t=this.indexOf(e.name);if(!(t<0))return this.actions[t]=this.getActionByItem(e),this.onItemsChanged(),!0},t.prototype.removeItem=function(e){var t=this.indexOf(e);return!(t<0)&&(this.actions.splice(t,1),this.onItemsChanged(),!0)},t.prototype.clearItems=function(){this.actions=[],this.onItemsChanged()},t.prototype.clearCopiedItems=function(){for(var e=this.copiedItems,t=0;t<e.length;t++)this.removeItem(e[t].name)},t.prototype.getItemByName=function(e){var t=this.indexOf(e);return t>-1?this.actions[t]:null},Object.defineProperty(t.prototype,"allowExpandMultipleCategories",{get:function(){return this.allowExpandMultipleCategoriesValue},set:function(e){this.allowExpandMultipleCategoriesValue=e,this.updateCategoriesState()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keepAllCategoriesExpanded",{get:function(){return this.keepAllCategoriesExpandedValue||!this.showCategoryTitlesValue},set:function(e){this.keepAllCategoriesExpandedValue=e,this.canCollapseCategories=!this.keepAllCategoriesExpanded,this.updateCategoriesState()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showCategoryTitles",{get:function(){return this.showCategoryTitlesValue},set:function(e){this.showCategoryTitlesValue=e,this.updateCategoriesState()},enumerable:!1,configurable:!0}),t.prototype.updateTitles=function(){this.actions.forEach((function(e){var t=H.getString("qt."+e.name);t&&(e.title=t,e.tooltip=t)}))},t.prototype.updateCategoriesState=function(){this.allowExpandMultipleCategories||this.keepAllCategoriesExpanded?(this.activeCategory="",this.keepAllCategoriesExpandedValue&&this.expandAllCategories()):this.categories.length>0&&(this.activeCategory=this.categories[0].name)},t.prototype.changeCategory=function(e,t){this.changeCategories([{name:e,category:t}])},t.prototype.changeCategories=function(e){for(var t=0;t<e.length;t++){var o=e[t],i=this.getItemByName(o.name);i&&(i.category=o.category)}this.onItemsChanged()},t.prototype.removeCategories=function(){var e=r.ElementFactory.Instance.getAllTypes();this.changeCategories(e.map((function(e){return{name:e,category:null}}))),this.onItemsChanged()},t.prototype.toggleCategoryState=function(e){if(!this.keepAllCategoriesExpanded)if(this.allowExpandMultipleCategories){var t=this.getCategoryByName(e);t&&(t.collapsed=!t.collapsed)}else this.activeCategory=e},t.prototype.expandCategory=function(e){if(this.allowExpandMultipleCategories){var t=this.getCategoryByName(e);t&&(t.collapsed=!1)}else this.canCollapseCategories&&(this.activeCategory=e)},t.prototype.collapseCategory=function(e){if(this.allowExpandMultipleCategories){var t=this.getCategoryByName(e);t&&(t.collapsed=!0)}},t.prototype.expandAllCategories=function(){this.expandCollapseAllCategories(!1)},t.prototype.collapseAllCategories=function(){this.expandCollapseAllCategories(!0)},t.prototype.hiddenItemSelected=function(e){this.creator.clickToolboxItem(e.json)},t.prototype.expandCollapseAllCategories=function(e){for(var t=this.categories,o=0;o<t.length;o++)t[o].collapsed=e},t.prototype.getCategoryByName=function(e){for(var t=this.categories,o=0;o<t.length;o++){var i=t[o];if(i.name===e)return i}return null},t.prototype.onItemsChanged=function(){for(var e=new Array,t={},o=this.activeCategory,i=0;i<this.actions.length;i++){var n=this.actions[i],r=n.category?n.category:H.getString("ed.toolboxGeneralCategory");if(!t[r]){var a=this.createCategory();a.name=r,a.collapsed=r!==o&&!this.keepAllCategoriesExpanded,t[r]=a,e.push(a)}t[r].items.push(n)}this.categories=e,this.keepAllCategoriesExpanded||(this.allowExpandMultipleCategories?e.length>0&&(e[0].collapsed=!1):o&&t[o]?this.activeCategory=o:this.activeCategory=e.length>0?e[0].name:"");var s=[];this.categories.forEach((function(e){s=s.concat(e.items)})),this.actions=s,this.hasCategories=e.length>1,this.updateItemSeparators(),this.raiseUpdate(!1)},t.prototype.createCategory=function(){return new J(this)},t.prototype.indexOf=function(e){for(var t=0;t<this.actions.length;t++)if(this.actions[t].name==e)return t;return-1},t.prototype.updateItemSeparators=function(){(this.hasCategories?this.categories:[{items:this.actions}]).forEach((function(e,t){(e.items||[]).forEach((function(e,o){e.needSeparator=0!==t&&0==o,e.innerItem&&(e.innerItem.needSeparator=e.needSeparator)}))}))},t.prototype.reorderItems=function(){var e=this;this.actions.sort((function(t,o){var i=e._orderedQuestions.indexOf(t.name);-1===i&&(i=Number.MAX_VALUE);var n=e._orderedQuestions.indexOf(o.name);return-1===n&&(n=Number.MAX_VALUE),i-n})),this.onItemsChanged()},t.prototype.createDefaultItems=function(e,t){this.clearItems();for(var o=this.getQuestionTypes(e),i=t?this.getDefaultQuestionCategories():{},n=0;n<o.length;n++){var a=o[n],s=r.ElementFactory.Instance.createElement(a,"q1");s||(s=r.Serializer.createClass(a));var l=this.getQuestionJSON(s),u=H.getString("qt."+a),c={id:a,name:a,iconName:"icon-"+a,title:u,tooltip:u,json:l,isCopied:!1,category:i[a]||""};this.actions.push(this.getActionByItem(c))}this.registerCustomWidgets(),this.registerComponentQuestions(),this.onItemsChanged()},t.prototype.registerCustomWidgets=function(){var e=r.CustomWidgetCollection.Instance;if(e.getActivatedBy)for(var t=e.widgets,o=0;o<t.length;o++)t[o].canShowInToolbox&&this.addItemFromJSON(t[o].widgetJson)},t.prototype.registerComponentQuestions=function(){for(var e=this.getComponentItems(),t=0;t<e.length;t++)this.addItemFromJSON(e[t].json)},t.prototype.getComponentItems=function(){var e=void 0;if(e||(e=r.ComponentCollection),!e)return[];var t=e.Instance.items;return t||[]},t.prototype.addItemFromJSON=function(e){if(!1!==e.showInToolbox){var o=e.iconName?e.iconName:t.defaultIconName,i=H.getString("qt."+e.name);i&&i!=e.name||(i=e.title),i||(i=e.name);var n=e.defaultJSON?e.defaultJSON:{};n.type||(n.type=e.name);var a=e.category?e.category:"",s=new r.Action({id:e.name,name:e.name,iconName:o,title:i,tooltip:i,json:n,isCopied:!1,category:a}),l=this.getActionByItem(s),u=this.getActionById(s.id);if(u)this.actions.splice(this.actions.indexOf(u),1,l);else{var c=Array.isArray(this.supportedQuestions)?this.supportedQuestions.indexOf(s.id):-1;c>-1?this.actions.splice(c,0,l):this.actions.push(l)}}},t.prototype.getQuestionJSON=function(e){var o=(new r.JsonObject).toJsonObject(e);o.type=e.getType();var i=t.getQuestionDefaultSettings(o.type);if(i)for(var n in i)o[n]=i[n];return o},t.prototype.isHiddenCustomWidget=function(e){var t=r.CustomWidgetCollection.Instance.getCustomWidgetByName(e);return!!t&&!t.showInToolbox},t.prototype.getQuestionTypes=function(e){var o=r.ElementFactory.Instance.getAllTypes();e&&0!=e.length||(e=o);for(var i=[],n=0;n<this.orderedQuestions.length;n++){var a=this.orderedQuestions[n];e.indexOf(a)>-1&&o.indexOf(a)>-1&&i.push(a)}for(n=0;n<e.length;n++){var s=e[n];i.indexOf(s)<0&&t.hiddenTypes.indexOf(s)<0&&o.indexOf(s)>-1&&!this.isHiddenCustomWidget(s)&&i.push(s)}return i},t.prototype.dispose=function(){},t.hiddenTypes=["buttongroup","linkvalue","embeddedsurvey","spinedit","color","fileedit"],t.defaultIconName="icon-default",t.defaultCategories={toolboxChoiceCategory:["radiogroup","rating","checkbox","dropdown","tagbox","boolean","file","imagepicker","ranking"],toolboxTextCategory:["text","comment","multipletext"],toolboxContainersCategory:["panel","paneldynamic"],toolboxMatrixCategory:["matrix","matrixdropdown","matrixdynamic"],toolboxMiscCategory:["html","expression","image","signaturepad"]},U([Object(r.property)({defaultValue:!1})],t.prototype,"showCategoryTitlesValue",void 0),U([Object(r.propertyArray)()],t.prototype,"categories",void 0),U([Object(r.property)({defaultValue:"",onSet:function(e,t){t.onActiveCategoryChanged(e)}})],t.prototype,"activeCategory",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"hasCategories",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"canCollapseCategories",void 0),U([Object(r.property)({defaultValue:!1,onSet:function(e,t){t.hasCategories&&t.showCategoryTitles&&(e?(t.isResponsivenessDisabled=!1,t.raiseUpdate(!0)):(t.isResponsivenessDisabled=!0,t.setActionsMode("large")))}})],t.prototype,"isCompact",void 0),U([Object(r.property)()],t.prototype,"forceCompact",void 0),t}(r.AdaptiveActionContainer),X=function(){function e(){}return e.addConvertInfo=function(t,o){e.convertInfo[t]||(e.convertInfo[t]=[]),e.convertInfo[t].push(o)},e.getConvertToClasses=function(t,o,n){void 0===o&&(o=null),void 0===n&&(n=!1);var s=a.questionConvertMode==i.AllTypes?function(e,t){void 0===t&&(t=!1);if("panel"===e)return t?["panel","paneldynamic"]:["paneldynamic"];for(var o=r.Serializer.getChildrenClasses("question",!0),i=[],n=0;n<o.length;n++)(t||o[n].name!==e)&&i.push(o[n].name);"paneldynamic"===e&&i.push("panel");var a=r.CustomWidgetCollection.Instance.widgets;for(n=0;n<a.length;n++)(t||a[n].name!==e)&&i.push(a[n].name);return i}(t,n):e.convertInfo[t];if(!s)return[];if(Array.isArray(o)&&o.length>0){var l=[];s.forEach((function(e){return l.push(e)})),s=o.filter((function(e){return l.indexOf(e)>=0}))}return s||[]},e.convertObject=function(t,o,i){if(void 0===i&&(i=null),!t||!t.parent||o==t.getType())return null;var n=K.getQuestionDefaultSettings(o),a=r.QuestionFactory.Instance.createQuestion(o,t.name);a||(a=r.Serializer.createClass(o,{})),a instanceof r.QuestionSelectBase&&(null==n?void 0:n.choices)&&(a.choices=null),a.name=t.name;var s=a.toJSON(),l=t.toJSON();for(var u in l)s[u]=l[u];e.updateJSON(s,o,t.getType(),i),a.fromJSON(s),e.removeValidators(a);var c=t.parent,p=c.elements.indexOf(t);return c.isConverting=!0,c.removeElement(t),c.addElement(a,p),delete c.isConverting,a.onSurveyLoad(),a},e.updateJSON=function(t,o,i,n){e.updateJSONFromQuestionDefaultSettings(t,o,n),e.updateJSONForRating(t,o,n),e.updateJSONForMatrices(t,o,i),e.updateJSONForPanels(t,o,i),e.updateJSONForBarrating(t,o)},e.updateJSONFromQuestionDefaultSettings=function(e,t,o){var i=K.getQuestionDefaultSettings(t);if(i)if("image"!==t||e.imageLink||(e.imageLink=i.imageLink),"imagepicker"===t||"dropdown"===t||"checkbox"===t||"radiogroup"===t||"ranking"===t)e.choices||(e.choices=i.choices);else for(var n in i)o&&o[n]||(e[n]=i[n])},e.updateJSONForMatrices=function(e,t,o){r.Serializer.isDescendantOf(t,"matrix")&&r.Serializer.isDescendantOf(o,"matrixdropdownbase")&&e.columns&&(e.columns=e.columns.map((function(e){return e.title?{value:e.name,text:e.title}:e.name}))),r.Serializer.isDescendantOf(t,"matrixdropdownbase")&&r.Serializer.isDescendantOf(o,"matrix")&&e.columns&&(e.columns=e.columns.map((function(e){return{name:e.value||e,title:e.text}})))},e.updateJSONForRating=function(e,t,o){"rating"===t&&e.choices&&(o&&o.choices&&r.Helpers.isArraysEqual(o.choices,e.choices)||(e.rateValues=e.choices)),e.rateValues&&!r.Serializer.isDescendantOf(t,"matrixdropdownbase")&&(e.choices=e.rateValues)},e.updateJSONForBarrating=function(e,t){"barrating"===t&&(e.choices=[1,2,3,4,5])},e.updateJSONForPanels=function(e,t,o){r.Serializer.isDescendantOf(t,"paneldynamic")&&r.Serializer.isDescendantOf(o,"panel")&&e.elements&&(e.templateElements=e.elements,delete e.elements),r.Serializer.isDescendantOf(t,"panel")&&r.Serializer.isDescendantOf(o,"paneldynamic")&&e.templateElements&&(e.elements=e.templateElements,delete e.templateElements)},e.removeValidators=function(e){var t=e.validators;if(Array.isArray(t)&&0!==t.length)for(var o=e.getSupportedValidators(),i=t.length-1;i>=0;i--){var n=t[i].getType().replace("validator","");o.indexOf(n)<0&&t.splice(i,1)}},e.convertInfo={},e}();!function(){for(var e=r.Serializer.getChildrenClasses("selectbase",!0),t=0;t<e.length;t++)for(var o=0;o<e.length;o++)t!=o&&X.addConvertInfo(e[t].name,e[o].name);X.addConvertInfo("text","comment"),X.addConvertInfo("comment","text")}();var Y,$=function(e){function t(t){var o=e.call(this)||this;return o.setDesignMode(!0),o.fromJSON(t),o}return z(t,e),t}(r.SurveyModel),ee=function(e,t){this.at=e,this.text=t,this.rowAt=-1,this.columnAt=-1},te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.getErrorType=function(){return"parseerror"},t}(ee),oe=function(e){function t(t){var o=e.call(this,t.at,t.getFullDescription())||this;return o.elementStart=t.at,o.elementEnd=t.end,o.errorType=t.type,o.propertyName=t.propertyName,o}return z(t,e),t.prototype.getErrorType=function(){return this.errorType},t.prototype.correctAt=function(e){this.at<0||(this.propertyName&&"unknownproperty"===this.errorType&&(this.at=this.getCorrectAtForUnknowProperty(e)),"duplicatename"===this.errorType&&(this.at=this.getCorrectAtForDuplicateName(e)))},t.prototype.getCorrectAtForUnknowProperty=function(e){var t=this.getNewIndex(e,this.propertyName);return t>-1?t:this.at},t.prototype.getCorrectAtForDuplicateName=function(e){var t=this.getNewIndex(e,"name:");return t<0&&(t=this.getNewIndex(e,'"name":')),t>-1?t:this.at},t.prototype.getNewIndex=function(e,t){var o=e.indexOf(t,this.at);return o>-1&&(this.elementEnd<0||o<this.elementEnd)?o:-1},t}(ee),ie=function(){function e(e){this.text=e,this.text&&""!=this.text.trim()||(this.text="{}"),this.errors=[],this.process()}return Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isJsonCorrect",{get:function(){return 0===this.errors.length&&null!==this.surveyValue},enumerable:!1,configurable:!0}),e.prototype.process=function(){var e=this;try{this.jsonValue=new Z(1).parse(this.text)}catch(i){this.errors.push(new te(i.at,i.message))}if(null!=this.jsonValue){this.updateJsonPositions(this.jsonValue),this.surveyValue=new $(this.jsonValue);var t=this.surveyValue.jsonErrors;if(Array.isArray(t))for(var o=0;o<t.length;o++){var i=new oe(t[o]);i.correctAt(this.text),this.errors.push(i)}this.getDuplicatedNamesErrors().forEach((function(t){return e.errors.push(t)}))}this.setErrorsPositionByChartAt()},e.prototype.updateJsonPositions=function(e){for(var t in e.pos.self=e,e){var o=e[t];o&&o.pos&&(e.pos[t]=o.pos,this.updateJsonPositions(o))}},e.prototype.setErrorsPositionByChartAt=function(){if(0!==this.errors.length){this.errors.sort((function(e,t){return e.at>t.at?1:e.at<t.at?-1:0}));for(var e={row:0,column:0},t=0,o=0;o<this.errors.length;o++){var i=this.errors[o].at;e=this.getPostionByChartAt(e,t,i);var n=this.errors[o];i==n.at&&(n.columnAt=e.column,n.rowAt=e.row),t=i}}},e.prototype.getPostionByChartAt=function(t,o,i){for(var n={row:t.row,column:t.column},r=o;r<i;)this.text.charAt(r)==e.newLineChar?(n.row++,n.column=0):n.column++,r++;return n},e.prototype.getDuplicatedNamesErrors=function(){var e=this,t=[];return this.getDuplicatedElements().forEach((function(o){var i=new oe(e.createDuplicatedError(o));i.correctAt(e.text),i&&t.push(i)})),t},e.prototype.getDuplicatedElements=function(){var e=this,t=[],o={};return this.survey.pages.forEach((function(i){return e.checkDuplicatedElement(i,o,t)})),this.survey.getAllPanels().forEach((function(i){return e.checkDuplicatedElement(i,o,t)})),this.survey.getAllQuestions().forEach((function(i){return e.checkDuplicatedElement(i,o,t)})),t},e.prototype.checkDuplicatedElement=function(e,t,o){var i=e.name;t[i]?o.push(e):t[i]=!0},e.prototype.createDuplicatedError=function(e){var t=e.pos;if(t){var o=new r.JsonError("duplicatename","The name: '"+e.name+"' is duplicated.");return o.at=t.start,o.end=t.end,o.element=e,o}},e}(),ne=function(e){function t(t){var o=e.call(this,"duplicatename","The name: '"+t.name+"' is duplicated.")||this;return o.element=t,o}return z(t,e),t}(r.JsonError);!function(e){e[e.Unknown=0]="Unknown",e[e.Survey=1]="Survey",e[e.Page=2]="Page",e[e.Panel=3]="Panel",e[e.Question=4]="Question",e[e.Column=5]="Column"}(Y||(Y={}));var re=function(){function e(){}return e.getNewPageName=function(t){return e.getNewName(t,H.getString("ed.newPageName"))},e.isPageNameAutoGenerated=function(t){return e.isNameAutoGenerated(t,H.getString("ed.newPageName"))},e.getNewQuestionName=function(t){return e.getNewName(t,H.getString("ed.newQuestionName"))},e.getNewPanelName=function(t){return e.getNewName(t,H.getString("ed.newPanelName"))},e.generateNewName=function(e){for(var t=e.length;t>0&&e[t-1]>="0"&&e[t-1]<="9";)t--;var o=e.substring(0,t),i=0;return t<e.length&&(i=parseInt(e.substring(t))),o+ ++i},e.getNewName=function(e,t){for(var o={},i=0;i<e.length;i++)o[e[i].name]=!0;for(var n=1;o[t+n.toString()];)n++;return t+n.toString()},e.isNameAutoGenerated=function(e,t){if(!e||e.length<t.length)return!1;var o=e.substring(t.length);return r.Helpers.isNumber(o)},e.getObjectType=function(e){return e&&e.getType?"page"==e.getType()?Y.Page:"panel"==e.getType()?Y.Panel:"survey"==e.getType()?Y.Survey:"matrixdropdowncolumn"==e.getType()?Y.Column:e.name?Y.Question:Y.Unknown:Y.Unknown},e.getObjectTypeStr=function(t){var o=e.getObjectType(t);return o===Y.Survey?"survey":o===Y.Page?"page":o===Y.Panel?"panel":o===Y.Question?"question":o===Y.Column?"column":"unknown"},e.getObjectName=function(t,o){return void 0===o&&(o=!1),e.getObjectType(t)===Y.Survey?H.getString("ed.surveyTypeName"):o&&t.title?t.title:o&&t.text?t.text:t.name?t.name:""},e.getElements=function(e,t){return void 0===t&&(t=!1),e?e.getElementsInDesign?e.getElementsInDesign(t):e.elements?e.elements:[]:[]},e.isPropertyVisible=function(e,t,o,i,n,r){if(void 0===o&&(o=null),void 0===i&&(i=null),void 0===n&&(n=null),void 0===r&&(r=null),!t||!t.visible)return!1;if(i&&t.showMode&&i!==t.showMode)return!1;if(t.isVisible&&e.getLayoutType&&!t.isVisible(e.getLayoutType(),null))return!1;var a=o?function(e,t){return o.onCanShowPropertyCallback(e,t,i,n,r)}:null;return!(a&&!a(e,t))},e.scrollIntoViewIfNeeded=function(t){if(t&&t.scrollIntoView){var o=t.getBoundingClientRect(),i=e.getScrollableDiv(t);if(i){var n=i.clientHeight;if(o.top<i.offsetTop)t.scrollIntoView(!0);else{var r=n+i.offsetTop;o.bottom>r&&o.height<n&&t.scrollIntoView(!1)}}}},e.getScrollableDiv=function(e){for(;e;){if(e.id&&e.id.indexOf("scrollableDiv")>-1)return e;if(!e.offsetParent)return null;e=e.offsetParent}return null},e.moveItemInArray=function(t,o,i){if(!t||t.length<2)return!1;if(i<0||i>=t.length)return!1;var n=t.indexOf(o);if(n<0||n==i)return!1;for(var r=0;r<t.length;r++)e.disableSelectingObj(t[r]);t.splice(n,1),t.splice(i,0,o);for(r=0;r<t.length;r++)e.enableSelectingObj(t[r]);return!0},e.applyItemValueArray=function(e,t){if(t&&0!=t.length){if(e.length>t.length&&e.splice(t.length,e.length-t.length),e.length<t.length){for(var o=[],i=e.length;i<t.length;i++)o.push(t[i]);e.splice.apply(e,[e.length,0].concat(o))}for(i=0;i<e.length;i++)e[i].value!=t[i].value&&(e[i].value=t[i].value),e[i].text=t[i].hasText?t[i].text:""}else e.splice(0,e.length)},e.disableSelectingObj=function(e){e.disableSelecting=!0},e.enableSelectingObj=function(e){delete e.disableSelecting},e.canSelectObj=function(e){return!e||!0!==e.disableSelecting},e.warnNonSupported=function(t,o){var i=E(t)+" is not supported in V2.";o&&(i+=" Use the '"+o+"' property instead"),e.warnText(i)},e.warnText=function(e){console.warn(e)},e.deleteConditionProperties=function(e){delete e.visible,delete e.visibleIf,delete e.readOnly,delete e.enableIf,delete e.valueName,delete e.choicesVisibleIf,delete e.choicesEnableIf,delete e.width,delete e.minWidth,delete e.maxWidth},e.updateQuestionJson=function(t){if(t.storeOthersAsComment=!1,e.deleteConditionProperties(t),t.choices)for(var o=0;o<t.choices.length;o++)e.deleteConditionProperties(t.choices[o])},e.convertMatrixRowsToText=function(e){return e.filter((function(e){return!e.cells[0].hasError})).map((function(e){return e.cells.map((function(e){return e.value||""})).join(r.ItemValue.Separator).replace(/\|$/,"")})).join("\n")},e.convertItemValuesToText=function(e){var t="";return e.forEach((function(e){t&&(t+="\n"),t+=e.value,e.pureText&&(t+=r.ItemValue.Separator+e.pureText)})),t},e.convertTextToItemValues=function(e,t,o){var i=[];if(!e)return i;for(var n=e.split("\n"),a=0;a<n.length;a++)if(n[a]){var s=n[a].split(r.ItemValue.Separator),l=r.Serializer.createClass(o);t.forEach((function(e,t){l[e.name]=s[t]})),i.push(l)}return i},e.sortItems=function(e,t){void 0===t&&(t="text");var o=function(e,t){for(var o="";t<e.length&&e[t]>="0"&&e[t]<="9";)o+=e[t],t++;return parseFloat(o)};e.sort((function(e,i){for(var n=e[t]?e[t]:"",r=i[t]?i[t]:"",a=0;a<n.length&&a<r.length&&n[a]===r[a];)a++;if(a<n.length&&a<r.length){for(;a>0&&n[a-1]>="0"&&n[a-1]<="9";)a--;var s=o(n,a),l=o(r,a);if(s<l)return-1;if(s>l)return 1}return n.localeCompare(r)}))},e.getQuestionContextIndexInfo=function(e,t){void 0===t&&(t="");for(var o=["row","panel"],i=0;i<o.length;i++){var n=t+o[i]+".",r=e.indexOf(n);if(r>-1)return{index:r,name:n}}},e.isSupportCellEditor=function(e){for(var t=["selectbase","boolean","rating"],o=0;o<t.length;o++)if(r.Serializer.isDescendantOf(e,t[o]))return!0;return!1},e}(),ae=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.items=[],o}return z(t,e),Object.defineProperty(t.prototype,"hasPrev",{get:function(){return this.currentIndex>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasNext",{get:function(){var e=this.currentIndex;return e>-1&&e<this.items.length-1},enumerable:!1,configurable:!0}),t.prototype.hasInHistory=function(e){return this.getIndex(e)>-1},t.prototype.prev=function(){this.selectElement(this.currentIndex-1)},t.prototype.next=function(){this.selectElement(this.currentIndex+1)},t.prototype.reset=function(){this.items=[],this.creator.selectedElement&&this.onObjSelected(this.creator.selectedElement)},t.prototype.selectFromAction=function(e,t){var o=this.currentIndex;o>-1&&o<this.items.length&&(this.items[o].propertyName=t),this.creator.selectElement(e)},t.prototype.onObjSelected=function(e){if(!this.isChangingInternally){var t=this.currentIndex;t>-1&&this.items.splice(t,1),this.items.push({obj:e})}},Object.defineProperty(t.prototype,"currentIndex",{get:function(){return this.getIndex(this.creator.selectedElement)},enumerable:!1,configurable:!0}),t.prototype.getIndex=function(e){if(!e)return-1;this.updateItems();for(var t=0;t<this.items.length;t++)if(this.items[t].obj==e)return t;return-1},t.prototype.selectElement=function(e){if(!(e<0||e>=this.items.length)){this.isChangingInternally=!0;var t=this.items[e];this.creator.selectElement(t.obj,t.propertyName),this.isChangingInternally=!1}},t.prototype.updateItems=function(){for(var e=this.items.length-1;e>=0;e--){var t=this.items[e].obj;!t||!t.isDisposed&&t.inSurvey||this.items.splice(e,1)}},t}(r.Base),se={root:"spg-root-modern",container:"spg-container-modern",header:"spg-title spg-container-modern__title",body:"spg-body",bodyEmpty:"spg-body spg-body--empty",footer:"spg-footer spg-body__footer spg-clearfix",title:"",description:"",logo:"spg-logo",logoImage:"spg-logo__image",headerText:"spg-header__text",navigationButton:"",completedPage:"spg-completedpage",navigation:{complete:"spg-btn spg-footer__complete-btn",prev:"spg-btn spg-footer__prev-btn",next:"spg-btn spg-footer__next-btn",start:"spg-btn spg-footer__start-btn",preview:"spg-btn spg-footer__preview-btn",edit:"spg-btn spg-footer__edit-btn"},panel:{title:"spg-title spg-panel__title",titleExpandable:"spg-panel__title--expandable",titleOnExpand:"spg-panel__title--expanded",titleOnError:"spg-panel__title--error",description:"spg-description spg-panel__description",container:"spg-panel spg-row__panel",content:"spg-panel__content",icon:"spg-panel__icon",iconExpanded:"spg-panel__icon--expanded",footer:"spg-panel__footer",requiredText:"spg-panel__required-text"},paneldynamic:{root:"spg-paneldynamic",navigation:"spg-paneldynamic__navigation",title:"spg-title spg-question__title",button:"spg-action-button spg-action-button--text",buttonRemove:"spg-action-button--danger",buttonAdd:"spg-paneldynamic__add-btn",progressTop:"spg-paneldynamic__progress spg-paneldynamic__progress--top",progressBottom:"spg-paneldynamic__progress spg-paneldynamic__progress--bottom",buttonPrev:"spg-paneldynamic__prev-btn",buttonNext:"spg-paneldynamic__next-btn",progressContainer:"spg-paneldynamic__progress-container",progress:"spg-progress",progressBar:"spg-progress__bar",progressText:"spg-paneldynamic__progress-text",panelFooter:"spg-panel__footer",separator:"spg-paneldynamic__separator"},progress:"spg-progress spg-body__progress",progressBar:"spg-progress__bar",progressText:"spg-progress__text",progressTextInBar:"spg-hidden",page:{root:"spg-page spg-body__page",title:"spg-title spg-page__title",description:"spg-description spg-page__description"},pageTitle:"spg-title spg-page__title",pageDescription:"spg-description spg-page__description",row:"spg-row spg-clearfix",rowMultiple:"spg-row--multiple",question:{mainRoot:"spg-question spg-row__question",flowRoot:"spg-question spg-row__question spg-row__question--flow",asCell:"spg-table__cell",header:"spg-question__header",headerLeft:"spg-question__header--location--left",headerTop:"spg-question__header--location--top",headerBottom:"spg-question__header--location--bottom",content:"spg-question__content",contentLeft:"spg-question__content--left",titleLeftRoot:"spg-question--location--left",titleOnAnswer:"spg-question__title--answer",titleOnError:"spg-question__title--error",title:"spg-title spg-question__title",requiredText:"spg-question__required-text",number:"spg-question__num",description:"spg-description spg-question__description",descriptionUnderInput:"spg-description spg-question__description",comment:"spg-comment",required:"spg-question--required",titleRequired:"spg-question__title--required",indent:0,footer:"spg-question__footer",formGroup:"spg-question__form-group",hasError:"",disabled:"spg-question--disabled"},image:{root:"spg-image",image:"sv_image_image"},error:{root:"spg-question__erbox",icon:"spg-question__erbox-icon",item:"",locationTop:"spg-question__erbox--location--top",locationBottom:"spg-question__erbox--location--bottom"},checkbox:{root:"spg-selectbase",item:"spg-item spg-checkbox spg-selectbase__item",itemSelectAll:"spg-checkbox--selectall",itemNone:"spg-checkbox--none",itemDisabled:"spg-item--disabled spg-checkbox--disabled",itemChecked:"spg-checkbox--checked",itemHover:"spg-checkbox--allowhover",itemInline:"spg-selectbase__item--inline",label:"spg-selectbase__label",itemSvgIconId:"#icon-v2check",labelChecked:"",itemControl:"spg-checkbox__control",itemDecorator:"spg-checkbox__svg",controlLabel:"spg-checkbox__caption",materialDecorator:"spg-checkbox__rectangle",other:"spg-comment spg-question__other",column:"spg-selectbase__column"},radiogroup:{root:"spg-selectbase",item:"spg-item spg-radio spg-selectbase__item",itemInline:"spg-selectbase__item--inline",label:"spg-selectbase__label",labelChecked:"",itemDisabled:"spg-item--disabled spg-radio--disabled",itemChecked:"spg-radio--checked",itemHover:"spg-radio--allowhover",itemControl:"spg-visuallyhidden spg-item__control",itemDecorator:"spg-item__svg spg-radio__svg",controlLabel:"spg-item__control-label",materialDecorator:"spg-item__decorator spg-radio__decorator",other:"spg-comment spg-question__other",clearButton:"spg-btn spg-selectbase__clear-btn",column:"spg-selectbase__column"},boolean:{mainRoot:"spg-question spg-row__question spg-question--boolean",rootCheckbox:"spg-selectbase",checkboxItem:"spg-checkbox",checkboxItemChecked:"spg-checkbox--checked",checkboxitemIndeterminate:"spg-checkbox--indeterminate",checkboxItemDisabled:"spg-checkbox--disabled",svgIconId:"#icon-v2check",checkboxLabel:"spg-selectbase__label",controlCheckbox:"spg-checkbox__control",checkboxControlLabel:"spg-checkbox__caption",checkboxItemDecorator:"spg-checkbox__svg",checkboxMaterialDecorator:"spg-checkbox__rectangle"},text:{root:"spg-input spg-text",small:"spg-row__question--small",content:"spg-question__content spg-text__content",remainingCharacterCounter:"spg-remaining-character-counter",onError:"spg-input--error"},multipletext:{root:"spg-multipletext",item:"spg-multipletext__item",itemTitle:"spg-multipletext__item-title",content:"spg-multipletext__content spg-text__content",row:"spg-multipletext__row",cell:"spg-multipletext__cell"},dropdown:{root:"",popup:"",small:"spg-row__question--small sd-row__question--small",control:"spg-input spg-dropdown sd-input sd-dropdown",filterStringInput:"sd-dropdown__filter-string-input spg-dropdown__filter-string-input",other:"spg-comment spg-question__other",onError:"spg-input--error",selectWrapper:"sv-dropdown_select-wrapper spg-dropdown_select-wrapper",chevronButton:"sd-dropdown_chevron-button spg-dropdown_chevron-button",chevronButtonSvg:"sd-dropdown_chevron-button-svg",chevronButtonIconId:"icon-chevron"},imagepicker:{root:"spg-imagepicker",item:"spg-imagepicker__item",itemInline:"spg-imagepicker__item--inline",itemChecked:"spg-imagepicker__item--checked",itemDisabled:"spg-imagepicker__item--disabled",itemHover:"spg-imagepicker__item--allowhover",label:"spg-imagepicker__label",itemControl:"spg-imagepicker__control",image:"spg-imagepicker__image",itemText:"spg-imagepicker__text",clearButton:"spg-btn",other:"spg-comment spg-question__other"},matrix:{tableWrapper:"spg-matrix spg-table-wrapper",root:"spg-table",rowError:"spg-matrix__row--error",cell:"spg-table__cell spg-matrix__cell",headerCell:"spg-table__cell spg-table__cell--header",label:"spg-item spg-radio spg-matrix__label",itemValue:"spg-visuallyhidden spg-item__control spg-radio__control",itemChecked:"spg-radio--checked",itemDisabled:"spg-item--disabled spg-radio--disabled",itemHover:"spg-radio--allowhover",materialDecorator:"spg-item__decorator spg-radio__decorator",itemDecorator:"spg-item__svg spg-radio__svg",cellText:"spg-matrix__text",cellTextSelected:"spg-matrix__text--checked",cellTextDisabled:"spg-matrix__text--disabled"},matrixdropdown:{tableWrapper:"spg-table-wrapper",root:"spg-table",cell:"spg-table__cell",headerCell:"spg-table__cell spg-table__cell--header"},matrixdynamic:{tableWrapper:"spg-table-wrapper",root:"spg-table spg-matrixdynamic",content:"spg-matrixdynamic__content spg-text__content",cell:"spg-table__cell",headerCell:"spg-table__cell spg-table__cell--header",button:"spg-btn",detailRow:"spg-table__row spg-table__row--detail",detailButton:"spg-table__cell--detail-button",detailButtonExpanded:"spg-table__cell--detail-button--expanded",detailIcon:"spg-detail-panel__icon",detailIconExpanded:"spg-detail-panel__icon--expanded",detailPanelCell:"spg-table__cell--detail-panel",actionsCell:"spg-table__cell spg-table__cell--actions",buttonAdd:"spg-matrixdynamic__add-btn spg-action-button spg-action-button--large",buttonRemove:"spg-matrixdynamic__remove-btn",iconAdd:"",iconRemove:"",dragElementDecorator:"spg-drag-element__svg",iconDragElement:"#icon-drag-area-indicator",iconDrag:"spg-matrixdynamic__drag-element",footer:"",dragDropGhostPositionTop:"spg-matrixdynamic__drag-drop-ghost-position-top",dragDropGhostPositionBottom:"spg-matrixdynamic__drag-drop-ghost-position-bottom",emptyRowsSection:"spg-matrixdynamic__placeholder",emptyRowsText:"spg-matrixdynamic__placeholder-text",cellQuestionWrapper:"spg-table__question-wrapper"},rating:{root:"spg-rating",item:"spg-rating__item",selected:"spg-rating__item--selected",minText:"spg-rating__min-text",itemText:"spg-rating__item-text",maxText:"spg-rating__max-text",disabled:"spg-rating--disabled"},comment:{root:"spg-input spg-comment",content:"spg-question__content spg-comment__content",remainingCharacterCounter:"spg-remaining-character-counter",small:"spg-row__question--small",onError:"spg-input--error"},expression:"",file:{root:"spg-file",other:"spg-comment spg-question__other",placeholderInput:"spg-visuallyhidden",preview:"spg-file__preview",fileSign:"spg-hidden",fileSignBottom:"spg-file__sign",fileDecorator:"spg-file__decorator",fileInput:"spg-visuallyhidden",noFileChosen:"spg-description spg-file__no-file-chosen",chooseFile:"spg-btn spg-file__choose-btn",disabled:"spg-file__choose-btn--disabled",removeButton:"spg-hidden",removeButtonBottom:"spg-btn spg-file__clean-btn",removeFile:"spg-hidden",removeFileSvg:"spg-file__remove-svg",wrapper:"spg-file__wrapper"},signaturepad:{root:"spg-signaturepad sjs_sp_container",small:"spg-row__question--small",controls:"sjs_sp_controls",clearButton:"sjs_sp_clear"},propertygrid_bindings:{content:"spg-question__content spg-question__nopadding spg-question-group"},propertygrid_restfull:{content:"spg-question__content spg-question__nopadding"},saveData:{root:"",saving:"",error:"",success:"",saveAgainButton:""},window:{root:"sv_window",body:"sv_window_content",header:{root:"sv_window_title",title:"",button:"",buttonExpanded:"",buttonCollapsed:""}},actionBar:{root:"spg-action-bar",item:"spg-action-button",itemPressed:"spg-action-button--pressed",itemAsIcon:"spg-action-button--icon",itemIcon:"spg-action-button__icon",itemTitle:"spg-action-button__title"},spinedit:{root:"spg-input spg-spin-editor spg-input-container",control:"spg-spin-editor__input spg-input-container__input",buttonsContainer:"spg-input-container__buttons-container",arrowButton:"spg-input__edit-button",increaseButtonIcon:"icon-arrow-up",decreaseButtonIcon:"icon-arrow-down"},color:{root:"spg-input spg-color-editor spg-input-container",swatch:"spg-color-editor__color-swatch",colorInput:"spg-color-editor__color-input",control:"spg-color-editor__input spg-input-container__input",colorDropdown:"spg-input__edit-button",colorDropdownIcon:"icon-drop-down-arrow",colorItem:"spg-color-editor__color-item",swatchIcon:"icon-color-picker"},fileedit:{root:"spg-input spg-input-container spg-file-edit",control:"spg-input-container__input",buttonsContainer:"spg-input-container__buttons-container",chooseButtonIcon:"icon-file",clearButtonIcon:"icon-clear",fileInput:"sd-visuallyhidden",clearButton:"spg-input__edit-button",chooseButton:"spg-input__edit-button spg-file-edit__choose-button"},linkvalue:{content:"spg-link"}},le={pages:[{name:"embed",elements:[{type:"dropdown",name:"framework",width:"284px",minWidth:"284px",maxWidth:"284px",titleLocation:"hidden",defaultValue:"jquery",choices:[{value:"angular",text:"Use Angular version"},{value:"jquery",text:"Use jQuery version"},{value:"knockout",text:"Use Knockout version"},{value:"react",text:"Use React version"},{value:"vue",text:"Use Vue version"}],showOptionsCaption:!1},{type:"dropdown",name:"theme",width:"284px",minWidth:"284px",maxWidth:"284px",startWithNewLine:!1,titleLocation:"hidden",defaultValue:"defaultV2",choices:[{value:"defaultV2",text:"DefaultV2 theme"},{value:"modern",text:"Modern theme"},{value:"default",text:"Default theme"},{value:"orange",text:"Orange theme"},{value:"darkblue",text:"Darkblue theme"},{value:"darkrose",text:"Darkrose theme"},{value:"stone",text:"Stone theme"},{value:"winter",text:"Winter theme"},{value:"winterstone",text:"Winter-Stone theme"},{value:"bootstrap",text:"For bootstrap framework"}],showOptionsCaption:!1},{type:"dropdown",name:"show",width:"284px",minWidth:"284px",maxWidth:"284px",startWithNewLine:!1,titleLocation:"hidden",defaultValue:"page",choices:[{value:"page",text:"Show survey on a page"},{value:"window",text:"Show survey in a window"}],showOptionsCaption:!1},{type:"expression",name:"scripts_expression",visible:!1,expression:"surveyjsEmbedScriptsMarkup({framework}, {theme})"},{type:"comment",name:"scripts",description:"Scripts and styles",readOnly:!0},{type:"expression",name:"html_expression",visible:!1,expression:"surveyjsEmbedHtmlMarkup({framework}, {show})"},{type:"comment",name:"html",visibleIf:"{framework} <> 'knockout' or {show} <> 'window'",description:"HTML",readOnly:!0,rows:1},{type:"expression",name:"javascript_expression",visible:!1,expression:"surveyjsEmbedJavascriptMarkup({framework}, {theme}, {show})"},{type:"comment",name:"javascript",description:"JavaScript",readOnly:!0,rows:14}]}],triggers:[{type:"copyvalue",expression:"{scripts_expression} notempty",setToName:"scripts",fromName:"scripts_expression"},{type:"copyvalue",expression:"{html_expression} notempty",setToName:"html",fromName:"html_expression"},{type:"copyvalue",expression:"{javascript_expression} notempty",setToName:"javascript",fromName:"javascript_expression"}],showNavigationButtons:"none"};o(4);var ue=function(e){function t(t){var o=e.call(this)||this;return r.FunctionFactory.Instance.register("surveyjsEmbedScriptsMarkup",(function(e){var t=e[0],o=e[1],i="";return i="jquery"===t?'<script src="https://unpkg.com/jquery"><\/script>':"\x3c!-- Your platform ("+t+") scripts --\x3e",i+="\n\n","bootstrap"!==o&&(i+='<link href="https://unpkg.com/survey-'+t+"@"+r.Version+"/"+(["defaultV2","modern"].indexOf(o)>-1?o:"survey")+'.css" type="text/css" rel="stylesheet"/>'),i+'\n<script src="https://unpkg.com/survey-'+t+"@"+r.Version+"/survey."+("knockout"!==t?t:"ko")+'.min.js"><\/script>'})),r.FunctionFactory.Instance.register("surveyjsEmbedHtmlMarkup",(function(e){var t=e[0],o=e[1];switch(t){case"angular":return"<ng-app></ng-app>";case"vue":return'<div id="surveyContainer"><survey'+("window"===o?"-window":"")+' :survey="survey"/></div>';default:return'<div id="surveyContainer"></div>'}})),r.FunctionFactory.Instance.register("surveyjsEmbedJavascriptMarkup",(function(e){var o=e[0],i=e[1],n=e[2],r='Survey.StylesManager.applyTheme("'+i+'");\n\n';r+="var surveyJSON = "+JSON.stringify(t.JSON)+";\n\n",r+='function sendDataToServer(survey) {\n //send Ajax request to your web server\n alert("The results are: " + JSON.stringify(survey.data));\n}\n\n';var a="window"===n?"Window":"";switch(o){case"angular":r+='@Component({\n selector: "ng-app",\n template: \'<div id="surveyElement"></div>\'\n})',r+="\nexport class AppComponent {\n ngOnInit() {\n var survey = new Survey.Model(surveyJSON);\n survey.onComplete.add(sendDataToServer);\n Survey.Survey"+a+'NG.render("surveyElement", { model: survey });\n }\n}';break;case"jquery":r+="var survey = new Survey.Model(surveyJSON);\n",r+='$("#surveyContainer").Survey'+a+"({\n model: survey,\n onComplete: sendDataToServer\n});";break;case"knockout":r+="var survey = new Survey.Survey"+a+"(surveyJSON);\n",r+="window"===n?"survey.show();\n":"",r+="survey.onComplete.add(sendDataToServer);\n",r+="window"!==n?'survey.render("surveyContainer");':"";break;case"react":r+="ReactDOM.render(<Survey.Survey"+a+' json={ surveyJSON } onComplete={ sendDataToServer } />, document.getElementById("surveyContainer"));';break;case"vue":r+='var survey = new Survey.Model(surveyJSON);\nsurvey.onComplete.add(sendDataToServer);\nnew Vue({ el: "#surveyContainer", data: { survey: survey } });'}return r})),o.survey=t.createSurvey(le,"embed"),o.survey.getCss().list={},o.survey.css=se,r.settings.readOnlyCommentRenderMode="default",o.survey.onUpdateQuestionCssClasses.add((function(e,t){"comment"===t.question.getType()&&(t.cssClasses.title="sv-question-embed__title")})),o}return z(t,e),U([Object(r.property)()],t.prototype,"survey",void 0),t}(r.Base),ce=function(){function e(e){this.creator=e,e.addPluginTab("embed",this,"ed.embedSurvey")}return e.prototype.activate=function(){this.model=new ue(this.creator)},e.prototype.deactivate=function(){return this.model=void 0,!0},e}(),pe=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.isJSONChanged=!1,o.isProcessingImmediately=!1,o.jsonEditorChangedTimeoutId=-1,o}return z(t,e),Object.defineProperty(t.prototype,"text",{get:function(){return this.getText()},set:function(e){this.setText(e)},enumerable:!1,configurable:!0}),t.prototype.onEditorActivated=function(){},t.prototype.onPluginActivate=function(){this.text=this.creator.text,this.onEditorActivated(),this.isJSONChanged=!1},t.prototype.onTextChanged=function(){if(-1!==this.jsonEditorChangedTimeoutId&&clearTimeout(this.jsonEditorChangedTimeoutId),this.isProcessingImmediately)this.jsonEditorChangedTimeoutId=-1;else{var e=this;window&&(this.jsonEditorChangedTimeoutId=window.setTimeout((function(){e.jsonEditorChangedTimeoutId=-1,e.processErrors(e.text)}),t.updateTextTimeout))}},t.prototype.processErrors=function(e){var t=new ie(e);this.setErrors(t.errors)},Object.defineProperty(t.prototype,"readOnly",{get:function(){return this.creator.readOnly},enumerable:!1,configurable:!0}),t.updateTextTimeout=1e3,t}(r.Base),de=function(){function e(e){this.creator=e}return e.prototype.activate=function(){this.model=this.createModel(this.creator)},e.prototype.deactivate=function(){if(this.model){if(!new ie(this.model.text).isJsonCorrect)return!1;!this.model.readOnly&&this.model.isJSONChanged&&(this.creator.selectedElement=void 0,this.creator.text=this.model.text,this.creator.selectedElement=this.creator.survey,this.creator.setModified({type:"JSON_EDITOR"})),this.model=void 0}return!0},e}();o(5);var he=function(e){function t(t){var o=e.call(this,t)||this;return o.aceCanUndo=!1,o.aceCanRedo=!1,o}return z(t,e),t.prototype.getText=function(){return this.aceEditor?this.aceEditor.getValue():""},t.prototype.setText=function(e){this.isProcessingImmediately=!0,this.aceEditor.setValue(e),this.aceEditor.renderer.updateFull(!0),this.aceEditor.getSession().getUndoManager().reset(),this.processErrors(e),this.isProcessingImmediately=!1},t.prototype.init=function(e){if(this.aceEditor=e,this.aceEditor.commands.removeCommand("find"),this.aceEditor.setReadOnly(this.readOnly),t.aceBasePath)try{window.ace.config.set("basePath",t.aceBasePath),this.aceEditor.session.setMode("ace/mode/json")}catch(e){}var o=this;this.aceEditor.setShowPrintMargin(!1),this.aceEditor.getSession().on("change",(function(){o.onTextChanged()})),this.aceEditor.getSession().setUseWorker(!0),ie.newLineChar=this.aceEditor.session.doc.getNewLineCharacter(),this.onPluginActivate()},t.prototype.updateUndoRedoState=function(){var e=this.aceEditor.getSession().getUndoManager();this.aceCanUndo=e.hasUndo(),this.aceCanRedo=e.hasRedo(),!0===this.aceEditor.isFocused()&&(this.isJSONChanged=!e.isClean())},t.prototype.onTextChanged=function(){this.updateUndoRedoState(),e.prototype.onTextChanged.call(this)},t.prototype.createAnnotations=function(e){for(var t=[],o=0;o<e.length;o++){var i=e[o],n={row:i.rowAt,column:i.columnAt,text:i.text,type:"error"};t.push(n)}return t},t.prototype.setErrors=function(e){this.aceEditor.getSession().setAnnotations(this.createAnnotations(e))},t.prototype.onEditorActivated=function(){this.aceEditor.getSession().getUndoManager().markClean(),this.updateUndoRedoState(),this.aceEditor.focus()},t.aceBasePath="",U([Object(r.property)()],t.prototype,"aceCanUndo",void 0),U([Object(r.property)()],t.prototype,"aceCanRedo",void 0),t}(pe),ge=function(e){function t(t){var o=e.call(this,t)||this;return t.addPluginTab("editor",o,Q("ed.jsonEditor"),"svc-tab-json-editor-ace"),o}return z(t,e),t.prototype.createModel=function(e){return new he(e)},t.hasAceEditor=function(){return void 0!==window.ace},t}(de);o(6);var me=function(e){function t(t){var o=e.call(this,t)||this;return o.ariaLabel=Q("ed.jsonEditor"),o.onPluginActivate(),o}return z(t,e),t.prototype.checkKey=function(e,t){if("Tab"===t.key){t.preventDefault();var o=t.target,i=o.selectionStart,n=o.selectionEnd;o.value=o.value.substring(0,i)+"\t"+o.value.substring(n),o.selectionStart=o.selectionEnd=i+1,t.stopPropagation()}return!0},t.prototype.getText=function(){return this._text},t.prototype.setText=function(e){this.isProcessingImmediately=!0,this._text=e,this.processErrors(e),this.isProcessingImmediately=!1},Object.defineProperty(t.prototype,"errorButtonText",{get:function(){return this.canShowErrors?Q("ed.jsonHideErrors"):Q("ed.jsonShowErrors")},enumerable:!1,configurable:!0}),t.prototype.toggleErrors=function(){this.canShowErrors=!this.canShowErrors},Object.defineProperty(t.prototype,"userFriendlyErrors",{get:function(){if(0===this._errors.length)return[];for(var e=[],t=0;t<this._errors.length-1;t++)e[t]=this._errors[t].text,e[t]+="\n\n";return e[this._errors.length-1]=this._errors[this._errors.length-1].text,e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"errors",{get:function(){return this._errors},enumerable:!1,configurable:!0}),t.prototype.onTextChanged=function(){this.isJSONChanged=!0,e.prototype.onTextChanged.call(this)},t.prototype.setErrors=function(e){this._errors=e},U([Object(r.property)({defaultValue:"",onSet:function(e,t){return t.onTextChanged()}})],t.prototype,"_text",void 0),U([Object(r.propertyArray)()],t.prototype,"_errors",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"canShowErrors",void 0),t}(pe),fe=function(e){function t(t){var o=e.call(this,t)||this;return t.addPluginTab("editor",o,Q("ed.jsonEditor"),"svc-tab-json-editor-textarea"),o}return z(t,e),t.prototype.createModel=function(e){return new me(e)},t}(de);o(7);var ye=function(e){function t(){var t=e.call(this)||this;return t.activateZoom=function(){document.addEventListener("keydown",t.listenTryToZoom),document.addEventListener("wheel",t.listenTryToZoomWithWheel,{passive:!1})},t.deactivateZoom=function(){document.removeEventListener("keydown",t.listenTryToZoom),document.removeEventListener("wheel",t.listenTryToZoomWithWheel)},t.listenTryToZoomWithWheel=function(e){return t.tryToZoomWithWheel(e,e)},t.listenTryToZoom=function(e){return t.tryToZoom(e,e)},t}return z(t,e),Object.defineProperty(t.prototype,"zoomScale",{get:function(){return this.currZoomScale},enumerable:!1,configurable:!0}),t.prototype.tryToZoomWithWheel=function(e,t){var o=t.deltaY;return(t.ctrlKey||t.metaKey)&&(o<0?this.zoomSimulator("up",t):this.zoomSimulator("down",t)),!0},t.prototype.tryToZoom=function(e,t){return(t.ctrlKey||t.metaKey)&&(107!=t.keyCode&&187!=t.keyCode||this.zoomSimulator("up",t),109!=t.keyCode&&189!=t.keyCode||this.zoomSimulator("down",t),48!=t.keyCode&&96!=t.keyCode||this.zoomSimulator("zero",t)),!0},t.prototype.changeZoomScale=function(e){var t="up"===e?1.01:"down"===e?1/1.01:1;this.currZoomScale="zero"===e?1:this.currZoomScale*t},t.prototype.zoomSimulator=function(e,t){t.preventDefault(),this.changeZoomScale(e);var o=document.getElementById("svd-simulator-wrapper");o&&(o.style.transform="scale("+this.currZoomScale+")"),t.stopPropagation()},t.prototype.resetZoomParameters=function(){this.currZoomScale=1;var e=document.getElementById("svd-simulator-wrapper");e&&(e.style.transform="")},Object.defineProperty(t.prototype,"activeDevice",{get:function(){return this.device},set:function(e){this.device=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"landscapeOrientation",{get:function(){return this.landscape},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasFrame",{get:function(){var e=be[this.activeDevice];return this.simulatorEnabled&&"desktop"!==e.deviceType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"simulatorFrame",{get:function(){if(this.hasFrame){var e=be[this.activeDevice],t=(this.landscapeOrientation?e.height:e.width)/e.cssPixelRatio,o=(this.landscapeOrientation?e.width:e.height)/e.cssPixelRatio,i=1*((this.landscapeOrientation?e.frameHeight:e.frameWidth)/e.cssPixelRatio),n=1*((this.landscapeOrientation?e.frameWidth:e.frameHeight)/e.cssPixelRatio);return{scale:(this.simulatorScaleEnabled,1),frameWidth:i,frameHeight:n,landscapedFrameWidth:this.landscapeOrientation?n:i,landscapedFrameHeight:this.landscapeOrientation?i:n,deviceWidth:t,deviceHeight:o,cssClass:e.cssClass+(this.landscapeOrientation?" svd-simulator-frame-landscape":"")}}},enumerable:!1,configurable:!0}),t.prototype.getRootCss=function(){return(new r.CssClassBuilder).append("svd-simulator-main").append("svd-simulator-main--frame",this.hasFrame).append("svd-simulator-main--desktop","desktop"===this.device).append("svd-simulator-main--running",this.isRunning).toString()},U([Object(r.property)({defaultValue:!0})],t.prototype,"landscape",void 0),U([Object(r.property)()],t.prototype,"survey",void 0),U([Object(r.property)({defaultValue:"desktop"})],t.prototype,"device",void 0),U([Object(r.property)({defaultValue:"l"})],t.prototype,"orientation",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"considerDPI",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"isRunning",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"simulatorEnabled",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"simulatorScaleEnabled",void 0),t}(r.Base),ve=96*("undefined"!=typeof window?window.devicePixelRatio:1),be={desktop:{deviceType:"desktop",title:"Desktop"},iPhone6:{cssPixelRatio:2,ppi:326,width:750,height:1334,frameWidth:960,frameHeight:1750,deviceType:"phone",title:"iPhone 6",cssClass:"svd-simulator-iphone6"},iPhone6plus:{cssPixelRatio:2.6,ppi:401,width:1080,height:1920,frameWidth:1330,frameHeight:2550,deviceType:"phone",title:"iPhone 6 Plus",cssClass:"svd-simulator-iphone6plus"},iPhone8:{cssPixelRatio:2,ppi:326,width:750,height:1334,frameWidth:990,frameHeight:1860,deviceType:"phone",title:"iPhone 8",cssClass:"svd-simulator-iphone8"},iPhone8plus:{cssPixelRatio:3,ppi:401,width:1080,height:1920,frameWidth:1330,frameHeight:2550,deviceType:"phone",title:"iPhone 8 Plus",cssClass:"svd-simulator-iphone8plus"},iPhoneX:{cssPixelRatio:3,ppi:458,width:1125,height:2436,frameWidth:1330,frameHeight:2680,deviceType:"phone",title:"iPhone X",cssClass:"svd-simulator-iphonex"},iPhoneXmax:{cssPixelRatio:3,ppi:458,width:1242,height:2688,frameWidth:1410,frameHeight:2980,deviceType:"phone",title:"iPhone X Max",cssClass:"svd-simulator-iphonexmax"},iPad:{cssPixelRatio:2,ppi:264,width:1536,height:2048,frameWidth:1837,frameHeight:2563,deviceType:"tablet",title:"iPad",cssClass:"svd-simulator-ipad"},iPadMini:{cssPixelRatio:2,ppi:326,width:1536,height:2048,frameWidth:1890,frameHeight:2600,deviceType:"tablet",title:"iPad Mini",cssClass:"svd-simulator-ipadmini"},iPadPro:{cssPixelRatio:2,ppi:264,width:1688,height:2388,frameWidth:2008,frameHeight:2980,deviceType:"tablet",title:'iPad Pro 11"',cssClass:"svd-simulator-ipadpro"},iPadPro13:{cssPixelRatio:2,ppi:264,width:2048,height:2732,frameWidth:2360,frameHeight:3300,deviceType:"tablet",title:'iPad Pro 12,9"',cssClass:"svd-simulator-ipadpro13"},androidPhone:{cssPixelRatio:2,ppi:316,width:720,height:1280,frameWidth:850,frameHeight:1630,deviceType:"phone",title:"Android Phone",cssClass:"svd-simulator-androidphone"},androidTablet:{cssPixelRatio:1.5,ppi:149,width:800,height:1280,frameWidth:1070,frameHeight:1480,deviceType:"tablet",title:"Android Tablet",cssClass:"svd-simulator-androidtablet"},win10Phone:{cssPixelRatio:2,ppi:294,width:720,height:1280,frameWidth:1152,frameHeight:2030,deviceType:"phone",title:"Windows 10 Phone",cssClass:"svd-simulator-win10phone"},msSurface:{cssPixelRatio:1,ppi:148,width:768,height:1366,frameWidth:1040,frameHeight:1620,deviceType:"tablet",title:"MS Surface",cssClass:"svd-simulator-mssurface"},genericPhone:{cssPixelRatio:1,deviceType:"phone",title:"",cssClass:"svd-simulator-genphone"}};o(8);var we=function(e){function t(t,o){void 0===o&&(o=r.defaultV2Css);var i=e.call(this)||this;return i.surveyProvider=t,i.startTheme=o,i.pages=new r.ActionContainer,i.simulator=new ye,i}return z(t,e),Object.defineProperty(t.prototype,"activeLanguage",{get:function(){return this.getPropertyValue("activeLanguage",this.survey.locale||r.surveyLocalization.defaultLocale)},set:function(e){e!==this.activeLanguage&&(this.setPropertyValue("activeLanguage",e),this.survey.locale=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.simulator.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageActions",{get:function(){return this.pages.actions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPageToolbarVisible",{get:function(){return this.pages.visibleActions.length>0&&!this.surveyProvider.isMobileView},enumerable:!1,configurable:!0}),t.prototype.updateSimulatorSurvey=function(e,t){var o=this,i=this.surveyProvider.createSurvey(e||{},"test");this.surveyProvider.showThemeTab?i.applyTheme(this.surveyProvider.theme):i.setCss(t,!1),this.simulator.survey=i,this.onSurveyCreatedCallback&&this.onSurveyCreatedCallback(this.survey);var n=this;this.survey.onComplete.add((function(e){n.isRunning=!1})),this.survey.onNavigateToUrl&&this.survey.onNavigateToUrl.add((function(e,t){var o=t.url;if(t.url="",o){var i=Q("ed.navigateToMsg")+" '"+o+"'.";this.surveyProvider?this.surveyProvider.notify(i):alert(i)}})),this.survey.onStarted.add((function(e){n.setActivePageItem(n.simulator.survey.activePage,!0)})),this.survey.onCurrentPageChanged.add((function(e,t){n.activePage=t.newCurrentPage,n.setActivePageItem(t.oldCurrentPage,!1),n.setActivePageItem(t.newCurrentPage,!0)})),this.survey.onPageVisibleChanged.add((function(e,t){n.updatePageItem(t.page)})),this.survey.onPopupVisibleChanged.add((function(e,t){t.visible?o.onScrollCallback=function(){t.popup.toggleVisibility()}:o.onScrollCallback=void 0}))},t.prototype.setJSON=function(e,t){this.json=e,null!=e&&e.cookieName&&delete e.cookieName,this.updateSimulatorSurvey(e,t)},t.prototype.initialize=function(e,t){this.setJSON(e,this.startTheme),this.updatePageList(),void 0!==t.showPagesInTestSurveyTab&&(this.showPagesInTestSurveyTab=t.showPagesInTestSurveyTab),this.buildActions()},t.prototype.updatePageItem=function(e){var t=this.getPageItemByPage(e);t&&(t.enabled=e.isVisible)},t.prototype.getCurrentPageItem=function(){return this.pageListItems[this.survey.pages.indexOf(this.survey.activePage)]},t.prototype.getSelectPageTitle=function(){return this.activePage&&this.getPageTitle(this.activePage,"preview-tab:selected-page","survey-tester-selected")||Q("ts.selectPage")},t.prototype.getPageTitle=function(e,t,o){void 0===t&&(t="preview-tab:page-list"),void 0===o&&(o="survey-tester");var i=this.surveyProvider.getObjectDisplayName(e,t,o,e.title);if(i===e.name&&0===i.indexOf("page")){var n=this.survey.pages.indexOf(e);return H.getString("ed.pageTypeName")+" "+(n+1)}return i},t.prototype.updatePageList=function(){for(var e=[],t=0;t<this.survey.pages.length;t++){var o=this.survey.pages[t];e.push({id:o.name,data:o,title:this.getPageTitle(o),enabled:o.isVisible,visible:!0})}this.pageListItems=e},t.prototype.show=function(){this.showInvisibleElements=!1,this.activePage=this.survey.activePage,this.survey.locale=this.activeLanguage,this.isRunning=!0},t.prototype.testAgain=function(){this.setJSON(this.json,this.simulator.survey.css),this.updatePageList(),this.show()},t.prototype.buildActions=function(){var e=this,t=[],o=function(t){var o=e.survey.currentPageNo,i=o+(t?1:-1);"starting"===e.survey.state&&t&&(i=0);var n=e.survey.visiblePages[i];!t&&0===o&&e.survey.firstPageIsStarted&&e.survey.pages.length>0&&(n=e.survey.pages[0]);var r=e.survey.pages.indexOf(n);e.activePage=e.survey.pages[r],e.selectPageAction.data.selectedItem=e.pageListItems[r]};this.prevPageAction&&(this.prevPageAction.visible=new r.ComputedUpdater((function(){return I(e.isRunning,"test"===e.surveyProvider.activeTab,e.pageListItems.length>1)})),this.prevPageAction.iconName=new r.ComputedUpdater((function(){return e.surveyProvider.isMobileView?"icon-arrow-left":"icon-arrow-left_16x16"})),this.prevPageAction.iconSize=new r.ComputedUpdater((function(){return e.surveyProvider.isMobileView?24:16})),this.prevPageAction.action=function(){return o(!1)},t.push(this.prevPageAction)),this.selectPageAction=Object(r.createDropdownActionModel)({id:"pageSelector",css:"svc-page-selector",title:this.getSelectPageTitle(),visible:this.isRunning&&this.pageListItems.length>1&&this.showPagesInTestSurveyTab},{items:this.pageListItems,allowSelection:!0,selectedItem:this.getCurrentPageItem(),onSelectionChanged:function(t){e.activePage=t.data},verticalPosition:"top",horizontalPosition:"center"}),t.push(this.selectPageAction),this.nextPageAction&&(this.nextPageAction.visible=new r.ComputedUpdater((function(){return I(e.isRunning,"test"===e.surveyProvider.activeTab,e.pageListItems.length>1)})),this.nextPageAction.iconName=new r.ComputedUpdater((function(){return e.surveyProvider.isMobileView?"icon-arrow-right":"icon-arrow-right_16x16"})),this.nextPageAction.iconSize=new r.ComputedUpdater((function(){return e.surveyProvider.isMobileView?24:16})),this.nextPageAction.action=function(){return o(!0)},t.push(this.nextPageAction)),this.pages.actions=t,this.pages.containerCss="sv-action-bar--pages",this.updatePrevNextPageActionState()},t.prototype.setActivePageItem=function(e,t){var o=this.getPageItemByPage(e);o&&(o.active=t)},t.prototype.getPageItemByPage=function(e){for(var t=this.pageListItems,o=0;o<t.length;o++)if(t[o].data===e)return t[o];return null},t.prototype.updateResultsTemplate=function(e){this.simulator.survey.setCss(e,!1),this.simulator.survey.render()},t.prototype.setTheme=function(e,t){var o=t.filter((function(t){return t.name===e})),i=r.defaultV2Css;o.length>0&&(i=o[0].theme),this.isRunning?this.updateSimulatorSurvey(this.json,i):this.updateResultsTemplate(i)},t.prototype.onPropertyValueChanged=function(t,o,i){e.prototype.onPropertyValueChanged.call(this,t,o,i),this.pages.hasActions&&("activePage"===t&&(this.updatePrevNextPageActionState(),this.selectPageAction.title=this.getSelectPageTitle()),"isRunning"!==t&&"pageListItems"!==t&&"showPagesInTestSurveyTab"!==t||(this.selectPageAction.popupModel.contentComponentData.model.items=this.pageListItems,this.selectPageAction.popupModel.contentComponentData.model.selectedItem=this.getCurrentPageItem(),this.selectPageAction.visible=this.isRunning&&this.pageListItems.length>1&&this.showPagesInTestSurveyTab))},t.prototype.updatePrevNextPageActionState=function(){if(this.prevPageAction&&this.survey){var e=this.survey.firstPageIsStarted&&"starting"!==this.survey.state||!this.survey.firstPageIsStarted&&!this.survey.isFirstPage;this.prevPageAction.css=e?"sv-action-bar-item--secondary":"",this.prevPageAction.enabled=e;var t=this.survey&&this.survey.visiblePages.indexOf(this.activePage)!==this.survey.visiblePages.length-1;this.nextPageAction.css=t?"sv-action-bar-item--secondary":"",this.nextPageAction.enabled=t}},t.prototype.onScroll=function(){return this.onScrollCallback&&this.onScrollCallback(),!0},U([Object(r.property)({defaultValue:!1,onSet:function(e,t){t.simulator.survey.showInvisibleElements=e}})],t.prototype,"showInvisibleElements",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"showPagesInTestSurveyTab",void 0),U([Object(r.property)({defaultValue:!0,onSet:function(e,t){t.simulator&&(t.simulator.isRunning=e)}})],t.prototype,"isRunning",void 0),U([Object(r.propertyArray)()],t.prototype,"pageListItems",void 0),U([Object(r.property)({onSet:function(e,t){if(e){var o=t.simulator.survey;o.firstPageIsStarted&&(e===o.pages[0]?o.clear(!1,!0):"starting"==o.state&&o.setPropertyValue("isStartedState",!1)),"starting"!==o.state&&(o.currentPage=e)}t.updatePrevNextPageActionState()}})],t.prototype,"activePage",void 0),t}(r.Base),Ce=function(){function e(e){this.creator=e,this.simulatorTheme=r.surveyCss[r.defaultV2ThemeName],e.addPluginTab("test",this,"ed.testSurvey"),this.setPreviewTheme(this.creator.themeForPreview),this.createActions().forEach((function(t){return e.toolbar.actions.push(t)}))}return e.prototype.getSimulatorDevicesTitle=function(){return this.model?be[this.model.simulator.device].title||Q("pe.simulator"):""},e.prototype.setDevice=function(e){this.model.simulator.device=e,this.model.simulator.resetZoomParameters();var t=be[this.model.simulator.device].deviceType;this.orientationSelectorAction.enabled="desktop"!=t,this.deviceSelectorAction.iconName="icon-device-"+t,this.deviceSelectorAction.title=Q("pe.simulator")},e.prototype.setDefaultLanguageOption=function(e){var t=this,o=!0===e||"all"===e||"auto"===e&&this.model.survey.getUsedLocales().length>1;this.languageSelectorAction.visible=o;var i=[];o&&(i=this.getLanguages("all"!==e?this.model.survey.getUsedLocales():null)),this.languageSelectorAction.popupModel.contentComponentData.model.setItems(i),this.languageSelectorAction.data.selectedItem=i.filter((function(e){return e.id===t.model.activeLanguage}))[0]},e.prototype.getLanguages=function(e){void 0===e&&(e=null);for(var t=[],o=e&&e.length>1?e:r.surveyLocalization.getLocales(),i=0;i<o.length;i++){var n=o[i];t.push({id:n,title:H.getLocaleName(n)})}return t},e.prototype.updateActions=function(){this.languageSelectorAction.title=H.getLocaleName(this.model.activeLanguage),this.languageSelectorAction.visible=!0,this.creator.showSimulatorInTestSurveyTab&&(this.setDevice(this.model.simulator.device),this.deviceSelectorAction.data.selectedItem={id:this.model.simulator.device},this.orientationSelectorAction.title=Q("pe.portraitOrientation")),this.creator.showInvisibleElementsInTestSurveyTab&&(this.invisibleToggleAction.css=this.model.showInvisibleElements?"sv-action-bar-item--active":"",this.invisibleToggleAction.visible=this.model.isRunning),null!=this.creator.showDefaultLanguageInTestSurveyTab&&this.setDefaultLanguageOption(this.creator.showDefaultLanguageInTestSurveyTab)},e.prototype.setPreviewTheme=function(e){this.simulatorTheme=r.surveyCss[e]||r.surveyCss[r.defaultV2ThemeName]},e.prototype.activate=function(){var e=this;this.model=new we(this.creator,this.simulatorTheme),this.model.onSurveyCreatedCallback=function(t){e.creator.onTestSurveyCreated&&e.creator.onTestSurveyCreated.fire(e.creator,{survey:t})},this.model.simulator.landscape="portrait"!=this.creator.previewOrientation,this.update()},e.prototype.update=function(){var e=this;if(this.model){var t={showPagesInTestSurveyTab:this.creator.showPagesInTestSurveyTab};this.model.testAgainAction=this.testAgainAction,this.model.prevPageAction=this.prevPageAction,this.model.nextPageAction=this.nextPageAction,this.model.initialize(this.creator.JSON,t),this.updateActions(),this.model.show(),this.model.onPropertyChanged.add((function(t,o){"isRunning"===o.name&&(e.invisibleToggleAction&&(e.invisibleToggleAction.visible=e.model.isRunning),e.testAgainAction.visible=!e.model.isRunning)}))}},e.prototype.deactivate=function(){return this.model&&(this.simulatorTheme=this.model.simulator.survey.css,this.model.onSurveyCreatedCallback=void 0,this.model=void 0),this.languageSelectorAction.visible=!1,this.testAgainAction.visible=!1,this.invisibleToggleAction&&(this.invisibleToggleAction.visible=!1),!0},e.prototype.getAvailableThemes=function(e){for(var t=[],o=0;o<e.length;o++){var i=e[o],n=new r.Action({id:i.name+"_themeSwitcher",locTitleName:this.getThemeLocName(i.name)});n.value=i.name,t.push(n)}return t},e.prototype.getThemeLocName=function(e){return"ed."+e+"Theme"},e.prototype.createActions=function(){var e=this,t=[];if(this.testAgainAction=new r.Action({id:"testSurveyAgain",visible:!1,locTitleName:"ed.testSurveyAgain",action:function(){e.model.testAgain()}}),this.creator.showSimulatorInTestSurveyTab){var o=Object.keys(be).filter((function(e){return!!be[e].title})).map((function(e){return{id:e,title:be[e].title}}));this.deviceSelectorAction=Object(r.createDropdownActionModel)({id:"deviceSelector",iconName:"icon-device-desktop",mode:"small",visible:new r.ComputedUpdater((function(){return I("test"===e.creator.activeTab,e.creator.showSimulatorInTestSurveyTab)}))},{items:o,allowSelection:!0,onSelectionChanged:function(t){e.setDevice(t.id)},horizontalPosition:"center",onHide:function(){e.deviceSelectorAction.enabled=!0},onShow:function(){e.deviceSelectorAction.enabled=!1}}),t.push(this.deviceSelectorAction),this.orientationSelectorAction=new r.Action({id:"orientationSelector",iconName:"icon-device-rotate",mode:"small",visible:new r.ComputedUpdater((function(){return I("test"===e.creator.activeTab,e.creator.showSimulatorInTestSurveyTab)})),action:function(){e.model.simulator.landscape=!e.model.simulator.landscape,e.orientationSelectorAction.title=Q(e.model.simulator.landscape?"pe.portraitOrientation":"pe.landscapeOrientation")}}),t.push(this.orientationSelectorAction)}this.creator.showInvisibleElementsInTestSurveyTab&&(this.invisibleToggleAction=new r.Action({id:"showInvisible",iconName:"icon-invisible-items",mode:"small",needSeparator:new r.ComputedUpdater((function(){return!e.creator.isMobileView})),locTitleName:"ts.showInvisibleElements",visible:!1,action:function(){e.model.showInvisibleElements=!e.model.showInvisibleElements,e.invisibleToggleAction.css=e.model.showInvisibleElements?"sv-action-bar-item--active":"",e.invisibleToggleAction.title=Q(e.model.showInvisibleElements?"ts.hideInvisibleElements":"ts.showInvisibleElements")}}),t.push(this.invisibleToggleAction));var i=r.StylesManager.getIncludedThemeCss(),n=["defaultV2","modern","default"];i=i.sort((function(e,t){return n.indexOf(e.name)>n.indexOf(t.name)?1:-1}));var a,s=this.getAvailableThemes(i);if(this.creator.allowChangeThemeInPreview&&s.length>1&&!this.creator.showThemeTab){this.changeThemeModel=new r.ListModel(s,(function(t){e.model&&e.model.setTheme(t.value,i),e.changeThemeAction.locTitleName=e.getThemeLocName(t.value),e.changeThemeAction.locStrsChanged(),e.changeThemePopupModel.toggleVisibility()}),!0),this.changeThemeModel.locOwner=this.creator,this.changeThemePopupModel=new r.PopupModel("sv-list",{model:this.changeThemeModel},"bottom","center");this.changeThemeAction=new r.Action({id:"themeSwitcher",iconName:"icon-theme",component:"sv-action-bar-item-dropdown",mode:"large",locTitleName:this.getThemeLocName((a=i.filter((function(t){return t.theme.root===e.simulatorTheme.root})),a.length>0?a[0].name:"defaultV2")),needSeparator:!0,visible:new r.ComputedUpdater((function(){return I(e.creator.showSimulatorInTestSurveyTab,"test"===e.creator.activeTab)})),action:function(){e.changeThemePopupModel.toggleVisibility()},popupModel:this.changeThemePopupModel}),t.push(this.changeThemeAction)}return this.languageSelectorAction=Object(r.createDropdownActionModel)({id:"languageSelector",iconName:"icon-language",visible:!1,mode:new r.ComputedUpdater((function(){return e.creator.isMobileView?"small":"large"}))},{items:[],allowSelection:!0,onSelectionChanged:function(t){e.model.activeLanguage=t.id,e.languageSelectorAction.title=H.getLocaleName(t.id)},horizontalPosition:"center",onHide:function(){e.languageSelectorAction.enabled=!0},onShow:function(){e.languageSelectorAction.enabled=!1}}),t.push(this.languageSelectorAction),this.designerAction=new r.Action({id:"svd-designer",iconName:"icon-preview",needSeparator:!0,action:function(){e.creator.makeNewViewActive("designer")},active:new r.ComputedUpdater((function(){return"test"===e.creator.activeTab})),visible:new r.ComputedUpdater((function(){return"test"===e.creator.activeTab})),locTitleName:"ed.designer",showTitle:!1}),this.prevPageAction=new r.Action({id:"prevPage",iconName:"icon-arrow-left_16x16",visible:!1}),this.nextPageAction=new r.Action({id:"nextPage",iconName:"icon-arrow-right_16x16",visible:!1}),t},e.prototype.addFooterActions=function(){this.creator.footerToolbar.actions.push(this.testAgainAction),this.invisibleToggleAction&&this.creator.footerToolbar.actions.push(this.invisibleToggleAction),this.languageSelectorAction&&this.creator.footerToolbar.actions.push(this.languageSelectorAction),this.creator.footerToolbar.actions.push(this.prevPageAction),this.creator.footerToolbar.actions.push(this.nextPageAction),this.creator.footerToolbar.actions.push(this.designerAction)},e}(),xe=function(){function e(e,t){void 0===t&&(t=null),this.survey=e,this.options=t}return e.prototype.toDisplayText=function(e){if(!this.survey)return e;this.showTitles=!!this.options&&1==this.options.showTitlesInExpressions;var t=(new r.ConditionsParser).parseExpression(e);if(!t)return e;if(t.getType)return this.toDisplayTextCore(t);if(!this.showTitles)return e;var o=[];return t.setVariables(o),this.replaceVariables(e,o)},e.prototype.toExpression=function(e){return this.toDisplayTextCore(e)},e.prototype.toDisplayTextCore=function(e){this.currentQuestion=null;var t=this,o=!0,i=function(e){var n=o;return o=!1,t.showTitles&&"variable"==e.getType()?t.getQuestionText(e):t.showTitles&&"const"==e.getType()?t.getDisplayText(e):"binary"==e.getType()?(t.proceedBinary(e),t.getDisplayBinary(e,n,i)):"unary"==e.getType()?t.getDisplayUnary(e,i):void 0};return e.toString(i)},e.prototype.getQuestionText=function(e){var t=this.getQuestionByName(e.variable);return t&&t.title?E(t.title):e.variable},e.prototype.getDisplayText=function(e){if(this.currentQuestion){var t=this.currentQuestion.getDisplayValue(!0,e.correctValue);return t?new r.Const(t).toString():void 0}},e.prototype.getDisplayOperand=function(e,t){return e?e.toString(t):""},e.prototype.getDisplayOperator=function(t){var o=e.operatorText[t];return o||H.getString("op."+t)},e.prototype.getDisplayBinary=function(e,t,o){return(t?"":"(")+this.getDisplayOperand(e.leftOperand,o)+" "+this.getDisplayOperator(e.operator)+" "+this.getDisplayOperand(e.rightOperand,o)+(t?"":")")},e.prototype.getDisplayUnary=function(e,t){var o=e.expression.toString(t),i=this.getDisplayOperator(e.operator);return"empty"==e.operator||"notempty"==e.operator?o+" "+i:i+" "+o},e.prototype.proceedBinary=function(e){e.isArithmetic||e.isConjunction?this.currentQuestion=null:(this.currentQuestion=this.getQuestionFromOperands(e.leftOperand,e.rightOperand),this.currentQuestion||(this.currentQuestion=this.getQuestionFromOperands(e.rightOperand,e.leftOperand)))},e.prototype.getQuestionFromOperands=function(e,t){if(!e||!t)return null;if("variable"!=e.getType())return null;var o=t.getType();return"const"!=o&&"function"!=o&&"array"!=o?null:this.getQuestionByName(e.variable)},e.prototype.replaceVariables=function(e,t){for(var o=0;o<t.length;o++)e=this.replaceVariable(e,t[o]);return e},e.prototype.replaceVariable=function(e,t){var o=this.getQuestionByName(t);return o&&o.title?e.replace(E(t),E(o.title)):e},e.prototype.getQuestionByName=function(e){return this.survey?this.survey.getQuestionByValueName(e):null},e.operatorText={less:"<",lessorequal:"<=",greater:">",greaterorequal:">=",equal:"==",notequal:"!=",plus:"+",minus:"-",mul:"*",div:"/",power:"^",mod:"%",negate:"!"},e}(),Te=function(){function e(){}return e.prototype.remove=function(e,t){var o=(new r.ConditionsParser).parseExpression(e);if(!o)return e;if(this.wasRemoved=!1,o.getType){var i=this.processOperand(o,t);return this.wasRemoved?i?i.toString():"":e}return e},e.prototype.processOperand=function(e,t){return e?"variable"==e.getType()?this.processVariable(e,t):"unary"==e.getType()?this.processUnary(e,t):"binary"==e.getType()?this.proceedBinary(e,t):e:null},e.prototype.processVariable=function(e,t){return e.variable!==t?e:(this.wasRemoved=!0,null)},e.prototype.processUnary=function(e,t){return this.processOperand(e.expression,t)?e:(this.wasRemoved=!0,null)},e.prototype.proceedBinary=function(e,t){var o=this.processOperand(e.leftOperand,t),i=this.processOperand(e.rightOperand,t);if(o&&i)return o!==e.leftOperand||i!==e.rightOperand?new r.BinaryOperand(e.operator,o,i,e.isArithmetic):e;if(!o&&!i)return null;var n=o||i;return"binary"==n.getType()?n:null},e}(),Se=function(){function e(e){this.constChanges=[],this.operand=(new r.ConditionsParser).parseExpression(e)}return e.prototype.update=function(e,t,o){this.updateOperand(this.operand,e.toLocaleLowerCase(),t,o)},Object.defineProperty(e.prototype,"isModified",{get:function(){return this.constChanges.length>0},enumerable:!1,configurable:!0}),e.prototype.toString=function(){var e=this,t=!0,o=function(i){var n=t;return t=!1,"const"===i.getType()?e.constToString(i):"binary"===i.getType()?e.binaryToString(i,n,o):void 0};return this.operand.toString(o)},e.prototype.constToString=function(e){for(var t=0;t<this.constChanges.length;t++)if(this.constChanges[t].op===e)return this.constChanges[t].val;return e.toString()},e.prototype.binaryToString=function(e,t,o){return(t?"":"(")+this.operandToString(e.leftOperand,o)+" "+this.operatorToString(e.operator)+" "+this.operandToString(e.rightOperand,o)+(t?"":")")},e.prototype.operandToString=function(e,t){return e?e.toString(t):""},e.prototype.operatorToString=function(t){var o=e.operatorText[t];return o||t},e.prototype.updateOperand=function(e,t,o,i){if("binary"==e.getType()){var n=e;n.isConjunction?(this.updateOperand(n.leftOperand,t,o,i),this.updateOperand(n.rightOperand,t,o,i)):this.hasVarName(n.leftOperand,t)?this.updateOperandConst(n.rightOperand,o,i):this.hasVarName(n.rightOperand,t)&&this.updateOperandConst(n.leftOperand,o,i)}},e.prototype.hasVarName=function(e,t){if(e&&"variable"===e.getType())return e.variable.toLowerCase()===t},e.prototype.updateOperandConst=function(e,t,o){var i=this;if("array"===e.getType()){var n=e;Array.isArray(n.values)&&n.values.forEach((function(e){return i.updateOperandConst(e,t,o)}))}if("const"===e.getType()){var a=e;r.Helpers.isTwoValueEquals(a.correctValue,t)&&(o=this.getCorrectNewValue(a,o),this.constChanges.push({op:e,val:o}))}},e.prototype.getCorrectNewValue=function(e,t){var o=e.toString();return!o||r.Helpers.isTwoValueEquals(e.correctValue,o)||'"'!==o[0]&&"'"!==o[0]?t:o[0]+t+o[0]},e.operatorText={less:"<",lessorequal:"<=",greater:">",greaterorequal:">=",equal:"=",notequal:"!=",plus:"+",minus:"-",mul:"*",div:"/",power:"^",mod:"%",negate:"!"},e}();function Pe(e,t,o,i){var n=new Se(e);return n.update(t,o,i),n.isModified?n.toString():e}function Ee(e){return H.getString("ed.lg."+e)}var Oe=function(){function e(e,t,o){void 0===o&&(o=null),this.logicType=e,this.survey=t,this.options=o,this.mergeWithBaseClass()}return e.expressionToDisplayText=function(e,t,o){return new xe(e,t).toDisplayText(o)},e.prototype.mergeWithBaseClass=function(){if(this.logicType.baseClass){var e=Ie.baseTypes[this.logicType.baseClass];if(e)for(var t in e)this.logicType[t]||(this.logicType[t]=e[t])}},Object.defineProperty(e.prototype,"name",{get:function(){return this.logicType.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseClass",{get:function(){return this.logicType.baseClass},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"propertyName",{get:function(){return this.logicType.propertyName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasVisibleElements",{get:function(){return!0!==this.logicType.isInvisible},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dynamicPropertyName",{get:function(){return this.logicType.dynamicPropertyName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dependedOnPropertyName",{get:function(){return this.logicType.dependedOnPropertyName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visible",{get:function(){return!!this.showInUI&&(!this.logicType.showIf||this.logicType.showIf(this.survey))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showTitlesInExpression",{get:function(){return!!this.options&&this.options.showTitlesInExpressions},enumerable:!1,configurable:!0}),e.prototype.createNewObj=function(e){var t=r.Serializer.createClass(this.baseClass);return e&&t.fromJSON(e.toJSON()),t.survey=this.survey,t.setOwner&&t.setOwner(this.survey),t},e.prototype.cloneElement=function(e){return this.isTrigger?this.createNewObj(e):e},e.prototype.areElementsEqual=function(e,t){return e===t||!(!this.isTrigger||e.getType()!==t.getType())&&r.Helpers.isTwoValueEquals(e.toJSON(),t.toJSON())},e.prototype.saveNewElement=function(e){var t=this.logicType.getCollection?this.logicType.getCollection(this.survey):null;!t&&this.isTrigger&&(t=this.survey.triggers),t&&t.indexOf(e)<0&&t.push(e)},Object.defineProperty(e.prototype,"showInUI",{get:function(){return!1!==this.logicType.showInUI},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUniqueItem",{get:function(){return!0===this.logicType.isUniqueItem},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"questionNames",{get:function(){return this.logicType.questionNames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"displayName",{get:function(){return Ee(this.name+"Name")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"description",{get:function(){return Ee(this.name+"Description")},enumerable:!1,configurable:!0}),e.prototype.getParentElement=function(e){return this.logicType.getParentElement?this.logicType.getParentElement(e):null},Object.defineProperty(e.prototype,"hasSelectorChoices",{get:function(){return!!this.logicType.getSelectorChoices},enumerable:!1,configurable:!0}),e.prototype.getSelectorChoices=function(e,t){return this.hasSelectorChoices?this.logicType.getSelectorChoices(e,t):null},e.prototype.getDisplayText=function(e){var t=Ee(this.name+"Text");if(this.logicType.getDisplayText)return this.logicType.getDisplayText(e,t,this);this.logicType.getElementName&&(e=this.getElementByName(this.logicType.getElementName(e)));var o=this.getElementDisplayName(e);if(o){var i=this.getParentElement(e),n=this.getElementDisplayName(i);return t.format(o,n)}return t},e.prototype.getElementDisplayName=function(e){if(!e)return"";var t="";return this.showTitlesInExpression&&(t=e.title),t||(t=e.name||""),E(t)},e.prototype.getElementByName=function(e){if(!this.survey)return null;var t=this.survey.getQuestionByName(e);return t||this.survey.getPageByName(e)},e.prototype.formatElName=function(e){var t=this.getElementByName(e);return this.getElementDisplayName(t)},e.prototype.formatExpression=function(t){return e.expressionToDisplayText(this.survey,this.options,t)},e.prototype.supportContext=function(e){return!!this.logicType.supportContext&&this.logicType.supportContext(e)},Object.defineProperty(e.prototype,"isTrigger",{get:function(){return!!this.baseClass&&this.baseClass.indexOf("trigger")>-1},enumerable:!1,configurable:!0}),e}();var Ie=function(){function e(){}return e.baseTypes={panel:{showIf:function(e){return e.getAllPanels().length>0},getSelectorChoices:function(e,t){return e.getAllPanels()}},question:{showIf:function(e){return e.getAllQuestions().length>0},supportContext:function(e){return Array.isArray(e.templateElements)},getParentElement:function(e){return e?e.parentQuestion:null},getSelectorChoices:function(e,t){for(var o=new Array,i=e.getAllQuestions(),n=function(e){o.push(e),e.isPanel&&e.elements.forEach((function(e){return n(e)}))},a=0;a<i.length;a++){var s=i[a];t||o.push(s),s instanceof r.QuestionPanelDynamicModel&&(!t||t===s)&&s.templateElements.forEach((function(e){return n(e)}))}return o}},matrixdropdowncolumn:{showIf:function(e){return function(e){for(var t=e.getAllQuestions(),o=0;o<t.length;o++){var i=t[o];if(i instanceof r.QuestionMatrixDropdownModelBase&&i.columns.length>0)return!0}return!1}(e)},supportContext:function(e){return Array.isArray(e.columns)},getParentElement:function(e){return e?e.colOwner:null},getSelectorChoices:function(e,t){for(var o=[],i=e.getAllQuestions(),n=0;n<i.length;n++){var a=i[n];if(a instanceof r.QuestionMatrixDropdownModelBase&&(!t||t===a))for(var s=a.columns,l=0;l<s.length;l++)o.push(s[l])}return o}}},e.types=[{name:"page_visibility",baseClass:"page",propertyName:"visibleIf",showIf:function(e){return e.pages.length>1},getSelectorChoices:function(e,t){return e.pages}},{name:"page_enable",baseClass:"page",propertyName:"enableIf",showIf:function(e){return e.pages.length>1},getSelectorChoices:function(e,t){return e.pages}},{name:"panel_visibility",baseClass:"panel",propertyName:"visibleIf"},{name:"panel_enable",baseClass:"panel",propertyName:"enableIf"},{name:"question_visibility",baseClass:"question",propertyName:"visibleIf"},{name:"question_enable",baseClass:"question",propertyName:"enableIf"},{name:"question_require",baseClass:"question",propertyName:"requiredIf"},{name:"column_visibility",baseClass:"matrixdropdowncolumn",propertyName:"visibleIf"},{name:"column_enable",baseClass:"matrixdropdowncolumn",propertyName:"enableIf"},{name:"column_require",baseClass:"matrixdropdowncolumn",propertyName:"requiredIf"},{name:"expression_expression",baseClass:"expression",propertyName:"expression",showInUI:!1},{name:"matrixdropdowncolumn_totalExpression",baseClass:"matrixdropdowncolumn",propertyName:"totalExpression",showInUI:!1},{name:"trigger_complete",baseClass:"completetrigger",propertyName:"expression",isUniqueItem:!0,isInvisible:!0},{name:"trigger_setvalue",baseClass:"setvaluetrigger",propertyName:"expression",dynamicPropertyName:"setValue",dependedOnPropertyName:"setToName",questionNames:["setToName"],getDisplayText:function(e,t,o){return r.Helpers.isValueEmpty(e.setValue)&&(t=Ee("trigger_setvalueEmptyText")),t.format(o.formatElName(e.setToName),e.setValue)}},{name:"trigger_copyvalue",baseClass:"copyvaluetrigger",propertyName:"expression",questionNames:["setToName","fromName"],getDisplayText:function(e,t,o){return t.format(o.formatElName(e.setToName),o.formatElName(e.fromName))}},{name:"trigger_skip",baseClass:"skiptrigger",propertyName:"expression",questionNames:["gotoName"],isUniqueItem:!0,getElementName:function(e){return e.gotoName}},{name:"trigger_runExpression",baseClass:"runexpressiontrigger",propertyName:"expression",questionNames:["setToName"],getDisplayText:function(e,t,o){var i=Ee("trigger_runExpressionText1");(i=i.format(o.formatExpression(e.runExpression)),e.setToName)&&(i+=Ee("trigger_runExpressionText2").format(o.formatElName(e.setToName)));return i}},{name:"completedHtmlOnCondition",baseClass:"htmlconditionitem",propertyName:"expression",isUniqueItem:!0,getCollection:function(e){return e.completedHtmlOnCondition}},{name:"trigger_runExpression_Expression",baseClass:"runexpressiontrigger",propertyName:"runExpression",showInUI:!1},{name:"question_expressionValidator",baseClass:"expressionvalidator",propertyName:"expression",showInUI:!1},{name:"matrix_rowsVisibleIf",baseClass:"matrix",propertyName:"rowsVisibleIf",showInUI:!1},{name:"matrix_columnsVisibleIf",baseClass:"matrix",propertyName:"columnsVisibleIf",showInUI:!1},{name:"matrixdropdown_rowsVisibleIf",baseClass:"matrixdropdown",propertyName:"rowsVisibleIf",showInUI:!1},{name:"select_choicesVisibleIf",baseClass:"selectbase",propertyName:"choicesVisibleIf",showInUI:!1},{name:"select_choicesEnableIf",baseClass:"selectbase",propertyName:"choicesEnableIf",showInUI:!1},{name:"itemvalue_visibleIf",baseClass:"itemvalue",propertyName:"visibleIf",showInUI:!1},{name:"itemvalue_enableIf",baseClass:"itemvalue",propertyName:"enableIf",showInUI:!1},{name:"calculatedValue",baseClass:"calculatedvalue",propertyName:"expression",showInUI:!1}],e}(),Ve=function(){function e(e,t,o){this.surveyValue=o,this.logicTypeValue=e,this.elementValue=t}return Object.defineProperty(e.prototype,"logicType",{get:function(){return this.logicTypeValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.elementValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return this.element&&this.logicType?this.logicType.getParentElement(this.element):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),e.prototype.apply=function(e,t){if(void 0===t&&(t=!1),this.element&&this.logicType&&(this.element[this.logicType.propertyName]=e,!e&&r.Serializer.isDescendantOf(this.element.getType(),"surveytrigger"))){var o=this.survey.triggers.indexOf(this.element);o>-1&&this.survey.triggers.splice(o,1)}},e.prototype.renameQuestion=function(e,t){if(this.element)for(var o=this.questionNames,i=0;i<o.length;i++){var n=this.element[o[i]];n&&n.toLowerCase()==e.toLowerCase()&&(this.element[o[i]]=t)}},e.prototype.clone=function(){var t=this.logicType.cloneElement(this.element);return new e(this.logicType,t,this.survey)},e.prototype.equals=function(e){return this.logicType===e.logicType&&this.logicType.areElementsEqual(this.element,e.element)},Object.defineProperty(e.prototype,"name",{get:function(){return this.logicType?this.logicType.displayName:""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logicTypeName",{get:function(){return this.logicType?this.logicType.name:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logicTypeDescription",{get:function(){return this.logicType?this.logicType.description:""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this.logicType?this.logicType.getDisplayText(this.element):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deleteActionText",{get:function(){return Ee("deleteAction")},enumerable:!1,configurable:!0}),e.prototype.getLocString=function(e){return H.getString(e)},e.prototype.isSuitableByQuestionName=function(e){var t=this.elementName===e||0===this.elementName.indexOf(e+".");return t||(t=this.questionNamesValues.filter((function(t){return t===e||0===t.indexOf(e+".")})).length>0),t},e.prototype.isSuitableByLogicType=function(e){return!this.logicTypeName||e===this.logicTypeName},e.prototype.addQuestionNames=function(e){var t=this.elementOwnerName;this.elementName&&-1===e.indexOf(t)&&e.push(t),this.questionNamesValues.forEach((function(t){t&&-1===e.indexOf(t)&&e.push(t)}))},Object.defineProperty(e.prototype,"questionNames",{get:function(){return this.logicType&&this.logicType.questionNames?this.logicType.questionNames:[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elementName",{get:function(){if(!this.element)return"";var e="",t=this.getOwnerElement();return t&&t!==this.element&&(e=t.name+"."),e+this.element.name||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elementOwnerName",{get:function(){var e=this.getOwnerElement();return e&&e.name||""},enumerable:!1,configurable:!0}),e.prototype.getOwnerElement=function(){if(!this.element)return null;var e=this.parentElement;return e||this.element},Object.defineProperty(e.prototype,"questionNamesValues",{get:function(){var e=this;return this.questionNames.map((function(t){return e.element[t]}))},enumerable:!1,configurable:!0}),e}(),Ne=function(){function e(t,o){void 0===o&&(o=""),this.owner=t,this.expression=o,this.idValue=++e.counter,this.isNew=!1,this.isModified=!1,this.actionsValue=[],this.removedActions=[]}return Object.defineProperty(e.prototype,"actions",{get:function(){return this.actionsValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this.idValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return"logicItem"+this.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"survey",{get:function(){return this.owner.survey},enumerable:!1,configurable:!0}),e.prototype.getVisibleLogicTypes=function(){return this.owner.getVisibleLogicTypes()},Object.defineProperty(e.prototype,"expressionText",{get:function(){var e=this.getExpressionAsDisplayText();return e||H.getString("ed.lg.itemEmptyExpressionText")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"actionsText",{get:function(){return this.actions.map((function(e){return e.text})).join(", ")},enumerable:!1,configurable:!0}),e.prototype.getDisplayText=function(){var e=this.getExpressionAsDisplayText(),t="";return this.actions.forEach((function(e){t+=", "+e.text})),e&&t?(this.ifText+" "+e+t).replace(new RegExp("({|})","gm"),"'"):H.getString("ed.lg.itemEmptyExpressionText")},e.prototype.edit=function(){this.owner&&this.owner.editItem(this)},e.prototype.remove=function(){this.owner&&this.owner.removeItem(this)},Object.defineProperty(e.prototype,"isReadOnly",{get:function(){return!!this.owner&&this.owner.readOnly},enumerable:!1,configurable:!0}),e.prototype.addNewAction=function(e){this.actions.push(e)},e.prototype.removeAction=function(e){this.replaceActionCore(null,e)},e.prototype.replaceAction=function(e,t){t?this.replaceActionCore(e,t):this.addNewAction(e)},e.prototype.clone=function(){for(var t=new e(this.owner,this.expression),o=0;o<this.actions.length;o++)t.addNewAction(this.actions[o].clone());return t},e.prototype.equals=function(e){if(this.expression!==e.expression)return!1;if(this.actions.length!==e.actions.length)return!1;for(var t=0;t<this.actions.length;t++)if(!this.actions[t].equals(e.actions[t]))return!1;return!0},e.prototype.replaceActionCore=function(e,t){this.removedActions.push(t);var o=this.actions.indexOf(t);o>-1&&(e?this.actions.splice(o,1,e):this.actions.splice(o,1))},e.prototype.apply=function(e){e?this.removeSameActions():this.removeActions();for(var t=0;t<this.removedActions.length;t++)this.removedActions[t].apply("");this.removedActions=[],this.applyExpression(e,!1)},e.prototype.renameQuestion=function(e,t){if(e&&t){this.renameQuestionInExpression(e,t,[a.logic.closeBracket,".","["]);for(var o=this.actions,i=0;i<o.length;i++)o[i].renameQuestion(e,t)}},e.prototype.renameColumn=function(e,t,o){if(this.canUpdateExpressionByQuestion(e)){this.actions[0].parentElement===e&&this.renameQuestionInExpression("row."+o,"row."+t.name,[a.logic.closeBracket]);var i=e.rows;if(Array.isArray(i)&&this.isQuestionInExpression(e))for(var n=this.getItemValueQuestionName(e)+".",s=0;s<i.length;s++)if(!r.Helpers.isValueEmpty(i[s].value)){var l=i[s].value.toString()+".";this.renameQuestionInExpression(n+l+o,n+l+t.name,[a.logic.closeBracket])}}},e.prototype.renameItemValue=function(e,t,o){if(this.canUpdateExpressionByQuestion(e)&&(!e.parentQuestion||(Array.isArray(e.parentQuestion.rows)&&this.renameDropdownColumnItemValue(e,t,o),this.actions[0].parentElement===e.parentQuestion))&&this.isQuestionInExpression(e)){var i=this.getItemValueQuestionName(e).toLocaleLowerCase(),n=e.rows,a=this.expression;if(Array.isArray(n))for(var s=0;s<n.length;s++){if(!r.Helpers.isValueEmpty(n[s].value))a=Pe(a,i+("."+n[s].value.toString()),o,t.value)}else a=Pe(a,i,o,t.value);a!=this.expression&&this.applyExpression(a,!0)}},e.prototype.renameDropdownColumnItemValue=function(e,t,o){var i=e.parentQuestion;if(this.isQuestionInExpression(i)){var n="."+e.getValueName();if(this.isStrContainsInExpression(n+a.logic.closeBracket)){for(var s=i.getValueName()+".",l=i.rows,u=this.expression,c=0;c<l.length;c++){if(!r.Helpers.isValueEmpty(l[c].value))u=Pe(u,s+l[c].value.toString()+n,o,t.value)}u!=this.expression&&this.applyExpression(u,!0)}}},e.prototype.renameRowValue=function(e,t,o){if(this.canUpdateExpressionByQuestion(e)&&this.isQuestionInExpression(e)){var i=this.getItemValueQuestionName(e);this.renameQuestionInExpression(i+"."+o.toString(),i+"."+t.value.toString(),[a.logic.closeBracket,"."])}},e.prototype.canUpdateExpressionByQuestion=function(e){return!!this.expression&&!!e.name&&this.actions.length>0},e.prototype.isQuestionInExpression=function(e){return this.isStrContainsInExpression(this.getItemValueQuestionName(e).toLocaleLowerCase())},e.prototype.isStrContainsInExpression=function(e){return!!e&&this.expression.toLocaleLowerCase().indexOf(e.toLocaleLowerCase())>-1},e.prototype.getItemValueQuestionName=function(e){var t=e.getValueName();if(e.parentQuestion){if(e.parentQuestion.isDescendantOf("paneldynamic"))return"panel."+t;if(e.parentQuestion.isDescendantOf("matrixdropdownbase"))return"row."+t}return t},e.prototype.removeQuestion=function(e){this.removeQuestionInExpression(e)},e.prototype.getQuestionNames=function(){var e=[];return this.getQuestionNamesFromExpression(e),this.getQuestionNamesFromActions(e),e},e.prototype.getActionTypes=function(){return this.actions.map((function(e){return e.logicTypeName}))},e.prototype.getContext=function(){var e=this.expression;if(!e)return null;if(!re.getQuestionContextIndexInfo(e,"{"))return null;for(var t=0;t<this.actions.length;t++){var o=this.actions[t].parentElement;if(o)return o}return null},e.prototype.getQuestionNamesFromExpression=function(e){new r.ConditionRunner(this.expression).getVariables().forEach((function(t){-1===e.indexOf(t)&&e.push(t)}))},e.prototype.getQuestionNamesFromActions=function(e){this.actions.forEach((function(t){return t.addQuestionNames(e)}))},e.prototype.getExpressionAsDisplayText=function(){return this.owner?this.owner.getExpressionAsDisplayText(this.expression):this.expression},Object.defineProperty(e.prototype,"editText",{get:function(){return H.getString("pe.edit")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deleteText",{get:function(){return H.getString("pe.delete")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ifText",{get:function(){return H.getString("pe.if")},enumerable:!1,configurable:!0}),e.prototype.isSuitable=function(e,t){return void 0===t&&(t=""),!e&&!t||(e?t?(this.isSuitableInExpression(e)||this.isSuitableByNameInActions(e))&&this.isSuitableByLogicTypeInActions(t):this.isSuitableInExpression(e)||this.isSuitableByNameInActions(e):this.isSuitableByLogicTypeInActions(t))},e.prototype.isSuitableInExpression=function(e){return-1!==this.expression.indexOf(E(e))||-1!==this.expression.indexOf("'"+e+".")},e.prototype.isSuitableByNameInActions=function(e){return this.actions.some((function(t){return t.isSuitableByQuestionName(e)}))},e.prototype.isSuitableByLogicTypeInActions=function(e){return this.actions.some((function(t){return t.isSuitableByLogicType(e)}))},e.prototype.renameQuestionInExpression=function(e,t,o){var i=this;if(this.expression&&(e=e.toLowerCase(),this.isStrContainsInExpression(e))){var n=a.logic.openBracket;e=n+e,t=n+t;var r=this.expression;o.forEach((function(o){r=i.renameQuestionInExpressionCore(r,r.toLocaleLowerCase(),e+o,t+o)})),r!=this.expression&&this.applyExpression(r,!0)}},e.prototype.renameQuestionInExpressionCore=function(e,t,o,i){for(var n=t.lastIndexOf(o,t.length);n>-1;)e=e.substring(0,n)+i+e.substring(n+o.length),n=(t=t.substring(0,n)).lastIndexOf(o,n);return e},e.prototype.removeQuestionInExpression=function(e){if(this.expression){var t=(new Te).remove(this.expression,e);t!=this.expression&&this.applyExpression(t,!0)}},e.prototype.applyExpression=function(e,t){this.expression=e;for(var o=this.actions,i=0;i<o.length;i++)o[i].apply(e,t)},e.prototype.removeActions=function(){for(var e=this.actions,t=e.length-1;t>=0;t--)this.removeAction(e[t])},e.prototype.removeSameActions=function(){for(var e=this.actions,t=e.length-1;t>=0;t--)for(var o=t-1;o>=0;o--)if(e[t].equals(e[o])){this.removeAction(e[t]);break}},e.counter=0,e}();function Ae(e){e.popupModel.isFocusedContent=!0,e.popupModel.setWidthByTarget=!1,e.dropdownListModel.listModel.searchEnabled=e.searchEnabled}o(9);var _e=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t}(r.EventBase),Le=function(e){function t(t,o){void 0===o&&(o=null);var i=e.call(this)||this;return i.survey=t,i.options=o,i.invisibleItems=[],i.onLogicItemSaved=new _e,i.onLogicItemValidation=new _e,i.onLogicItemRemoving=new _e,i.onLogicItemRemoved=new _e,i.options||(i.options=new s),i.readOnly=i.optionsReadOnly,i.update(),i}return z(t,e),Object.defineProperty(t,"visibleActions",{get:function(){return a.logic.visibleActions},set:function(e){a.logic.visibleActions=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"types",{get:function(){return Ie.types},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.onEndEditing(),this.survey=void 0},Object.defineProperty(t.prototype,"editableItem",{get:function(){return this.editableItemValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mode",{get:function(){return this.modeValue},set:function(e){if(this.modeValue!==e){var t=this.mode;this.modeValue=e,this.errorText="","view"!=e||"edit"!=t&&"new"!=t||this.onEndEditing()}},enumerable:!1,configurable:!0}),t.prototype.getLocString=function(e){return H.getString(e)},t.prototype.getTypeByName=function(e){for(var t=0;t<this.logicTypes.length;t++)if(this.logicTypes[t].name==e)return this.logicTypes[t];return null},t.prototype.update=function(e,t){void 0===e&&(e=null),void 0===t&&(t=null),e&&(this.survey=e),t&&(this.options=t),this.logicTypes=this.createLogicTypes(),this.updateVisibleItems(),this.invisibleItems=this.buildItems(!1),this.readOnly=this.optionsReadOnly,this.mode="view"},t.prototype.updateVisibleItems=function(){this.items=this.buildItems(!0),this.editableItemValue=null},Object.defineProperty(t.prototype,"optionsReadOnly",{get:function(){return!!this.options&&this.options.readOnly},enumerable:!1,configurable:!0}),t.prototype.saveEditableItem=function(){if(!this.editableItem||this.hasError())return!1;this.options&&this.options.startUndoRedoTransaction(),this.onEditableItemApply();var e=this.items.indexOf(this.editableItem)<0;e&&this.items.push(this.editableItem);var t=!e||this.editableItem.isNew;return this.editableItem.isNew=!1,this.onItemChanged(this.editableItem,t?"new":"modify"),this.options&&this.options.stopUndoRedoTransaction(),this.onLogicItemSaved.fire(this,{item:this.editableItem}),!0},t.prototype.saveEditableItemAndBack=function(){var e=this.saveEditableItem();return e&&(this.mode="view"),e},t.prototype.onEditableItemApply=function(){},t.prototype.onItemChanged=function(e,t){this.onChangedCallback&&this.onChangedCallback(e,t)},t.prototype.renameQuestion=function(e,t){this.items.forEach((function(o){return o.renameQuestion(e,t)})),this.invisibleItems.forEach((function(o){return o.renameQuestion(e,t)}))},t.prototype.renameItemValue=function(e,t){var o=this.getItemValueQuestion(e,t);o&&(this.items.forEach((function(i){return i.renameItemValue(o,e,t)})),this.invisibleItems.forEach((function(i){return i.renameItemValue(o,e,t)})))},t.prototype.renameRowValue=function(e,t){var o=this.getItemValueQuestion(e,t);o&&(this.items.forEach((function(i){return i.renameRowValue(o,e,t)})),this.invisibleItems.forEach((function(i){return i.renameRowValue(o,e,t)})))},t.prototype.renameColumn=function(e,t){var o=e.colOwner;o&&o.isQuestion&&(this.items.forEach((function(i){return i.renameColumn(o,e,t)})),this.invisibleItems.forEach((function(i){return i.renameColumn(o,e,t)})))},t.prototype.getItemValueQuestion=function(e,t){if(!e.locOwner||r.Helpers.isValueEmpty(t)||r.Helpers.isValueEmpty(e.value))return null;var o=e.locOwner;return o.isQuestion?o:null},t.prototype.removeQuestion=function(e){this.removeQuestionCore(e,this.items),this.removeQuestionCore(e,this.invisibleItems)},t.prototype.hasError=function(){if(!this.editableItem)return!1;if(this.hasErrorInUI())return!0;var e=new r.ExpressionRunner(this.getExpressionText()),t={item:this.editableItem,error:"",usedNamesInExpression:e.getVariables(),actions:this.getEditingActions()};this.onLogicItemValidation.fire(this,t),this.errorText=t.error;var o=this.survey.creator;return this.errorText&&o&&o.notify(this.errorText,"error"),!!this.errorText},t.prototype.getUsedQuestions=function(){var e=this,t={};this.items.forEach((function(o){o.getQuestionNames().forEach((function(o){var i=e.survey.getQuestionByName(o);i&&!t[o]&&(t[o]=i)}))}));var o=[];return Object.keys(t).forEach((function(e){t[e]&&o.push(t[e])})),o},t.prototype.getUsedActionTypes=function(){var e=this,t={};this.items.forEach((function(o){o.getActionTypes().forEach((function(o){t[o]||(t[o]=e.logicTypes.filter((function(e){return e.name==o}))[0])}))}));var o=[];return Object.keys(t).forEach((function(e){t[e]&&o.push(t[e])})),o},t.prototype.hasErrorInUI=function(){return!1},t.prototype.getExpressionText=function(){return""},t.prototype.getEditingActions=function(){return[]},t.prototype.onReadOnlyChanged=function(){},t.prototype.removeQuestionCore=function(e,t){for(var o=0;o<t.length;o++)t[o].removeQuestion(e)},t.prototype.addNew=function(){this.options&&this.options.startUndoRedoTransaction();var e=new Ne(this);e.isNew=!0,this.items.push(e),this.editItemCore(e),this.options&&this.options.stopUndoRedoTransaction()},t.prototype.editItem=function(e){this.options&&this.options.startUndoRedoTransaction(),this.editItemCore(e),this.options&&this.options.stopUndoRedoTransaction()},t.prototype.editItemCore=function(e){this.editableItemValue=e,this.onStartEditing(),this.mode=e.isNew?"new":"edit"},t.prototype.onStartEditing=function(){},t.prototype.onEndEditing=function(){this.editableItemValue=null},t.prototype.canRemoveItem=function(e){var t={item:e,allowRemove:!0};return this.onLogicItemRemoving.fire(this,t),t.allowRemove},t.prototype.removeItem=function(e,t){if(void 0===t&&(t=!0),!t||this.canRemoveItem(e)){this.options&&this.options.startUndoRedoTransaction(),e.apply("");var o=this.items.indexOf(e);o>-1&&this.items.splice(o,1),this.onItemChanged(e,"delete"),this.options&&this.options.stopUndoRedoTransaction(),this.onLogicItemRemoved.fire(this,{item:e})}},t.prototype.addAction=function(e,t){void 0===t&&(t=null);var o=this.createNewAction(e,t);return this.editableItem.addNewAction(o),o},t.prototype.addNewAction=function(){return this.addAction(null,null)},t.prototype.createNewAction=function(e,t){return new Ve(e,t,this.survey)},t.prototype.getVisibleLogicTypes=function(){for(var e=[],t=this.logicTypes,o=0;o<t.length;o++)t[o].visible&&e.push(t[o]);return e},t.prototype.removeAction=function(e){this.editableItem&&(this.editableItem.removeAction(e),0==this.editableItem.actions.length&&this.addNewAction())},t.prototype.getExpressionAsDisplayText=function(e){return Oe.expressionToDisplayText(this.survey,this.options,e)},t.prototype.buildItems=function(e){for(var t=[],o={},i=this.getAllElements(),n=0;n<i.length;n++)this.buildItemsByElement(i[n],t,o,e);return t},t.prototype.getAllElements=function(){var e=[];return this.AddElements(this.survey.pages,e),this.AddElements(Ie.baseTypes.question.getSelectorChoices(this.survey,null),e),this.AddElements(this.survey.getAllPanels(),e),this.AddElements(this.survey.triggers,e),this.AddElements(this.survey.completedHtmlOnCondition,e),this.AddElements(this.survey.calculatedValues,e),this.AddElements(Ie.baseTypes.matrixdropdowncolumn.getSelectorChoices(this.survey,null),e),this.AddElements(this.getValidators(),e),this.AddElements(this.getItemValues(),e),e},t.prototype.getValidators=function(){for(var e=[],t=this.survey.getAllQuestions(),o=0;o<t.length;o++)this.AddElements(t[o].validators,e);return e},t.prototype.getItemValues=function(){for(var e=[],t=this.survey.getAllQuestions(),o=0;o<t.length;o++){var i=t[o],n=i.choices;if(n){var a=r.Serializer.findProperty(i.getType(),"choices");a&&"itemvalue[]"===a.type&&this.AddElements(n,e)}}return e},t.prototype.AddElements=function(e,t){for(var o=0;o<e.length;o++)t.push(e[o])},t.prototype.buildItemsByElement=function(e,t,o,i){for(var n=this.getElementAllTypes(e),a=0;a<this.logicTypes.length;a++){var s=this.logicTypes[a];if(s.showInUI===i){var l=e[s.propertyName];if(n.indexOf(s.baseClass)>-1&&!r.Helpers.isValueEmpty(l)){var u=this.getLogicItemHashKey(l,e),c=o[u];c||(c=new Ne(this,l),o[u]=c,t.push(c));var p=this.createNewAction(s,e);c.addNewAction(p)}}}},t.prototype.getLogicItemHashKey=function(e,t){var o=this.getParentQuestion(t);return(o?"@"+o.name:"")+e.replace(" ","").toLowerCase()},t.prototype.getParentQuestion=function(e){var t=e.parentQuestion;return t||(e.isDescendantOf("matrixdropdowncolumn")?e.colOwner:null)},t.prototype.getElementAllTypes=function(e){var t=[],o=e.getType();for(t.push(o);o&&"base"!=o;){var i=r.Serializer.findClass(o);if(!i)break;(o=i.parentName)&&t.push(o)}return t},t.prototype.createLogicTypes=function(){for(var e=[],o=t.visibleActions,i=0;i<t.types.length;i++)o.length>0&&o.indexOf(t.types[i].name)<0||e.push(new Oe(t.types[i],this.survey,this.options));return e},U([Object(r.propertyArray)()],t.prototype,"items",void 0),U([Object(r.propertyArray)()],t.prototype,"logicTypes",void 0),U([Object(r.property)()],t.prototype,"errorText",void 0),U([Object(r.property)({onSet:function(e,t){t.onReadOnlyChanged()}})],t.prototype,"readOnly",void 0),U([Object(r.property)()],t.prototype,"placeholderHtml",void 0),t}(r.Base),je=o(1),ke=function(){function e(e){this.objValue=e,this.editableObjValue=this.createEditableObj()}return e.isCopyObject=function(e){return!!e&&e.isCopy},e.getSurvey=function(t){if(t instanceof r.SurveyModel||t&&t.getType&&"survey"==t.getType())return e.getOriginalSurvey(t);if(t instanceof r.MatrixDropdownColumn&&t.colOwner)return t.colOwner.survey;if(t){if(t.survey)return e.getOriginalSurvey(t.survey);if(t.owner)return e.getSurvey(t.owner);if(t.errorOwner)return e.getSurvey(t.errorOwner);if(t.locOwner)return e.getSurvey(t.locOwner)}var o=e.getOriginalObject(t);return o&&o!==t?e.getSurvey(o):null},e.getOriginalObject=function(e){return e&&e.originalObj?e.originalObj:e},e.getOriginalSurvey=function(t){return e.getOriginalObject(t)},Object.defineProperty(e.prototype,"obj",{get:function(){return this.objValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"editableObj",{get:function(){return this.editableObjValue},enumerable:!1,configurable:!0}),e.prototype.isPropertyChanged=function(e){return"pages"!=e&&!r.Helpers.isTwoValueEquals(this.obj[e],this.editableObj[e])},e.prototype.apply=function(e){this.isPropertyChanged(e)&&(this.obj[e]=this.editableObj[e])},e.prototype.reset=function(){this.assignProperties(this.editableObj)},e.prototype.applyAll=function(e){void 0===e&&(e=[]);for(var t=this.getProperties(e),o=0;o<t.length;o++)this.apply(t[o])},e.prototype.getProperties=function(e){var t=[],o=this.getObjJson(this.editableObj),i=this.getObjJson(this.obj);for(var n in o)e.indexOf(n)>-1||t.push(n);for(var n in i)e.indexOf(n)>-1||t.indexOf(n)>-1||t.push(n);return t},e.prototype.createEditableObj=function(){var e=this.obj.getType(),t=r.Serializer.createClass(e);return null==t&&"survey"==e&&(t=new r.SurveyModel),this.assignProperties(t),"matrixdropdowncolumn"==e&&(t.colOwner=this.obj.colOwner),"survey"!=e&&(t.setSurveyImpl?t.setSurveyImpl(this.obj.survey):this.obj.survey&&!t.survey&&(t.survey=this.obj.survey)),this.obj.parent&&(t.parent=this.obj.parent),t.isCopy=!0,t.originalObj=this.obj,t},e.prototype.assignProperties=function(e){(new r.JsonObject).toObject(this.getObjJson(),e)},e.prototype.getObjJson=function(e){void 0===e&&(e=null),e||(e=this.obj);var t=new r.JsonObject;return t.lightSerializing=!0,t.toJsonObject(e)},e}(),Me=function(){function e(){}return e.definition={question:{properties:["name","title","description","visible","isRequired","readOnly","showCommentArea","commentText","commentPlaceholder",{name:"visibleIf",tab:"logic"},{name:"enableIf",tab:"logic"},{name:"requiredIf",tab:"logic"},{name:"bindings",tab:"logic"},{name:"defaultValueExpression",tab:"logic"},{name:"page",tab:"layout"},{name:"startWithNewLine",tab:"layout"},{name:"hideNumber",tab:"layout"},{name:"state",tab:"layout"},{name:"titleLocation",tab:"layout"},{name:"descriptionLocation",tab:"layout"},{name:"indent",tab:"layout"},{name:"width",tab:"layout"},{name:"minWidth",tab:"layout"},{name:"maxWidth",tab:"layout"},{name:"valueName",tab:"data"},{name:"defaultValue",tab:"data"},{name:"correctAnswer",tab:"data"},{name:"useDisplayValuesInDynamicTexts",tab:"data"},{name:"clearIfInvisible",tab:"data"},{name:"requiredErrorText",tab:"validation"},{name:"validators",tab:"validation"}],tabs:[{name:"logic",index:100},{name:"layout",index:200},{name:"data",index:300},{name:"validation",index:400}]},comment:{properties:[{name:"rows",tab:"layout"},{name:"cols",tab:"layout"},"placeholder",{name:"maxLength",tab:"validation"},{name:"textUpdateMode",tab:"data"},{name:"autoGrow",tab:"layout"},{name:"allowResize",tab:"layout"}]},file:{properties:["allowMultiple","allowImagesPreview","acceptedTypes",{name:"showPreview"},{name:"storeDataAsText"},"maxSize","imageHeight","imageWidth","waitForUpload","needConfirmRemoveFile"]},html:{properties:["html"]},matrixdropdownbase:{properties:["cellType","optionsCaption","detailPanelMode","detailPanelShowOnAdding",{name:"showHeader",tab:"layout"},{name:"showColumnHeader",tab:"layout"},{name:"verticalAlign",tab:"layout"},{name:"alternateRows",tab:"layout"},{name:"columnsVisibleIf",tab:"logic"},{name:"columnLayout",tab:"layout"},{name:"horizontalScroll",tab:"layout"},{name:"columnColCount",tab:"layout"},{name:"columnMinWidth",tab:"layout"}],tabs:[{name:"columns",index:10},{name:"rows",index:11},{name:"choices",index:12}]},matrixdynamic:{properties:["allowAddRows","allowRemoveRows","allowRowsDragAndDrop","rowCount","minRowCount","maxRowCount","addRowLocation","addRowText","removeRowText","confirmDelete","confirmDeleteText","placeholder",{name:"hideColumnsIfEmpty",tab:"columns"},{name:"emptyRowsText",tab:"columns"},{name:"defaultRowValue",tab:"data"},{name:"defaultValueFromLastRow",tab:"data"},{name:"keyName",tab:"validation"},{name:"keyDuplicationError",tab:"validation"}]},matrixdropdown:{properties:["totalText","placeholder",{name:"hideIfRowsEmpty",tab:"rows"},{name:"rowsVisibleIf",tab:"logic"},{name:"rowTitleWidth",tab:"layout"},{name:"keyDuplicationError",tab:"validation"}]},matrix:{properties:[{name:"isAllRowRequired",tab:"validation"},{name:"showHeader",tab:"layout"},{name:"showColumnHeader",tab:"layout"},{name:"verticalAlign",tab:"layout"},{name:"alternateRows",tab:"layout"},{name:"rowsOrder",tab:"rows"},{name:"hideIfRowsEmpty",tab:"rows"},{name:"columnsVisibleIf",tab:"logic"},{name:"rowsVisibleIf",tab:"logic"},{name:"columnMinWidth",tab:"layout"},{name:"rowTitleWidth",tab:"layout"}],tabs:[{name:"columns",index:10},{name:"rows",index:11},{name:"cells",index:500}]},multipletext:{properties:[{name:"colCount",tab:"layout"},{name:"itemSize",tab:"layout"}],tabs:[{name:"items",index:10}]},rating:{properties:[{name:"displayMode",tab:"layout"},{name:"rateCount",tab:"rateValues"},{name:"rateMin",tab:"rateValues"},{name:"rateMax",tab:"rateValues"},{name:"rateStep",tab:"rateValues"},{name:"minRateDescription",tab:"rateValues"},{name:"maxRateDescription",tab:"rateValues"},{name:"displayRateDescriptionsAsExtremeItems",tab:"rateValues"}],tabs:[{name:"rateValues",index:10}]},selectbase:{properties:[{name:"choicesFromQuestion",tab:"choices"},{name:"choicesFromQuestionMode",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"colCount",tab:"layout"},{name:"showOtherItem",tab:"choices"},{name:"otherText",tab:"choices"},{name:"otherPlaceholder",tab:"choices"},{name:"showNoneItem",tab:"choices"},{name:"noneText",tab:"choices"},{name:"hideIfChoicesEmpty",tab:"logic"},{name:"choicesVisibleIf",tab:"logic"},{name:"choicesEnableIf",tab:"logic"},{name:"otherErrorText",tab:"validation"},{name:"separateSpecialChoices",tab:"choices"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},checkbox:{properties:[{name:"showSelectAllItem",tab:"choices"},{name:"selectAllText",tab:"choices"},{name:"maxSelectedChoices",tab:"choices"},{name:"separateSpecialChoices",tab:"choices"}]},radiogroup:{properties:[{name:"showClearButton",tab:"choices"},{name:"separateSpecialChoices",tab:"choices"}]},dropdown:{properties:["placeholder","autocomplete",{name:"choicesMin",tab:"choices"},{name:"choicesMax",tab:"choices"},{name:"choicesStep",tab:"choices"},{name:"allowClear",tab:"choices"}]},tagbox:{properties:["closeOnSelect","placeholder",{name:"searchEnabled",tab:"choices"},{name:"hideSelectedItems",tab:"choices"},{name:"allowClear",tab:"choices"}]},imagepicker:{properties:["contentMode","imageFit","isResponsive","minImageWidth","maxImageWidth","minImageHeight","maxImageHeight",{name:"imageHeight",placeholder:"auto"},{name:"imageWidth",placeholder:"auto"},"multiSelect","showLabel"]},image:{properties:["imageLink","contentMode","imageFit",{name:"imageHeight",placeholder:"auto"},{name:"imageWidth",placeholder:"auto"},"text"]},"itemvalue[]@choices":{properties:[{name:"visibleIf"},{name:"enableIf"}],tabs:[{name:"general"}]},"itemvalue[]@rows":{properties:[{name:"visibleIf"},{name:"enableIf"}],tabs:[{name:"general"}]},"itemvalue[]@columns":{properties:[{name:"visibleIf"},{name:"enableIf"}],tabs:[{name:"general"}]},text:{properties:["inputType","min","max","step","placeholder","autocomplete","dataList",{name:"minValueExpression",tab:"logic"},{name:"maxValueExpression",tab:"logic"},{name:"size",tab:"layout"},{name:"maxLength",tab:"validation"},{name:"minErrorText",tab:"validation"},{name:"maxErrorText",tab:"validation"},{name:"textUpdateMode",tab:"data"}]},boolean:{properties:["label","labelTrue","labelFalse","showTitle",{name:"valueTrue",tab:"data"},{name:"valueFalse",tab:"data"}]},expression:{properties:["expression","currency","displayStyle","format","maximumFractionDigits","minimumFractionDigits","useGrouping"]},matrixdropdowncolumn:{properties:["name","title"]},"matrixdropdowncolumn@default":{properties:["cellType","name","title","isRequired","readOnly","isUnique","showInMultipleColumns","width","minWidth",{name:"visibleIf",tab:"logic"},{name:"enableIf",tab:"logic"},{name:"requiredIf",tab:"logic"},{name:"defaultValueExpression",tab:"logic"},{name:"totalType",tab:"totals"},{name:"totalDisplayStyle",tab:"totals"},{name:"totalCurrency",tab:"totals"},{name:"totalFormat",tab:"totals"},{name:"totalExpression",tab:"totals"}],tabs:[{name:"general",index:5},{name:"logic",index:20},{name:"totals",index:40}]},"matrixdropdowncolumn@checkbox":{properties:[{name:"showOtherItem",tab:"choices"},{name:"otherText",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"colCount",tab:"choices"},{name:"showSelectAllItem",tab:"choices"},{name:"showNoneItem",tab:"choices"},{name:"noneText",tab:"choices"},{name:"maxSelectedChoices",tab:"choices"},{name:"selectAllText",tab:"choices"},{name:"choicesVisibleIf",tab:"logic"},{name:"choicesEnableIf",tab:"logic"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},"matrixdropdowncolumn@radiogroup":{properties:[{name:"showOtherItem",tab:"choices"},{name:"otherText",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"colCount",tab:"choices"},{name:"showNoneItem",tab:"choices"},{name:"noneText",tab:"choices"},{name:"choicesVisibleIf",tab:"logic"},{name:"choicesEnableIf",tab:"logic"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},"matrixdropdowncolumn@dropdown":{properties:[{name:"showOtherItem",tab:"choices"},{name:"otherText",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"optionsCaption",tab:"choices"},{name:"showNoneItem",tab:"choices"},{name:"noneText",tab:"choices"},{name:"choicesVisibleIf",tab:"logic"},{name:"choicesEnableIf",tab:"logic"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},"matrixdropdowncolumn@text":{properties:["inputType","min","max","step","placeholder","dataList","maxLength"],tabs:[{name:"validators",index:10}]},"matrixdropdowncolumn@comment":{properties:["rows","placeholder","maxLength"],tabs:[{name:"validators",index:10}]},"matrixdropdowncolumn@boolean":{properties:["defaultValue","labelTrue","labelFalse","valueTrue","valueFalse"]},"matrixdropdowncolumn@expression":{properties:["displayStyle","currency"],tabs:[{name:"expression",index:10}]},"matrixdropdowncolumn@rating":{properties:["rateValues",{name:"rateType",tab:"rateValues"},{name:"rateCount",tab:"rateValues"},{name:"rateColorMode",tab:"rateValues"},{name:"scaleColorMode",tab:"rateValues"},{name:"autoGenerate",tab:"rateValues"},{name:"rateMin",tab:"rateValues"},{name:"rateMax",tab:"rateValues"},{name:"rateStep",tab:"rateValues"},{name:"minRateDescription",tab:"rateValues"},{name:"maxRateDescription",tab:"rateValues"},{name:"displayRateDescriptionsAsExtremeItems",tab:"rateValues"}],tabs:[{name:"rateValues",index:5}]},multipletextitem:{properties:["inputType","name","title","isRequired","maxLength","size","placeholder","requiredErrorText","validators"]},"multipletext@items":{properties:["name","title"]},calculatedvalue:{properties:["name","expression","includeIntoResult"]},"calculatedvalue@items":{properties:["name","expression"]},paneldynamic:{properties:["renderMode","templateTabTitle","tabAlign","panelCount","minPanelCount","maxPanelCount","panelsState",{name:"allowAddPanel"},{name:"allowRemovePanel"},"panelAddText","panelRemoveText","templateTitle","templateDescription","noEntriesText","confirmDelete","confirmDeleteText","panelPrevText","panelNextText","showQuestionNumbers","showRangeInProgress",{name:"defaultPanelValue",tab:"data"},{name:"defaultValueFromLastPanel",tab:"data"},{name:"templateTitleLocation",tab:"layout"},{name:"panelRemoveButtonLocation",tab:"layout"},{name:"keyName",tab:"validation"},{name:"keyDuplicationError",tab:"validation"}]},panelbase:{properties:["name","title","description","visible","readOnly",{name:"visibleIf",tab:"logic"},{name:"enableIf",tab:"logic"},{name:"requiredIf",tab:"logic"},{name:"questionTitleLocation",tab:"layout"}],tabs:[{name:"logic",index:100},{name:"layout",index:200},{name:"data",index:300},{name:"validation",index:400}]},panel:{properties:["isRequired",{name:"requiredErrorText",tab:"validation"},{name:"page",tab:"layout"},{name:"startWithNewLine",tab:"layout"},{name:"state",tab:"layout"},{name:"questionsOrder",tab:"layout"},{name:"indent",tab:"layout"},{name:"innerIndent",tab:"layout"},{name:"width",tab:"layout"},{name:"showNumber",tab:"numbering"},{name:"showQuestionNumbers",tab:"numbering"},{name:"questionStartIndex",tab:"numbering"},{name:"minWidth",tab:"layout"},{name:"maxWidth",tab:"layout"}],tabs:[{name:"numbering",index:350}]},page:{properties:["navigationTitle","navigationDescription","maxTimeToFinish",{name:"questionsOrder",tab:"layout"},{name:"navigationButtonsVisibility",tab:"layout"}]},survey:{properties:["title","description","showTitle","locale","mode","cookieName","widthMode","width",{name:"showPreviewBeforeComplete",tab:"navigation"},{name:"pagePrevText",tab:"navigation"},{name:"pageNextText",tab:"navigation"},{name:"completeText",tab:"navigation"},{name:"previewText",tab:"navigation"},{name:"editText",tab:"navigation"},{name:"startSurveyText",tab:"navigation"},{name:"showNavigationButtons",tab:"navigation"},{name:"showPrevButton",tab:"navigation"},{name:"firstPageIsStarted",tab:"navigation"},{name:"goNextPageAutomatic",tab:"navigation"},{name:"showProgressBar",tab:"navigation"},{name:"progressBarType",tab:"navigation"},{name:"questionsOnPageMode",tab:"navigation"},{name:"showTOC",tab:"navigation"},{name:"tocLocation",tab:"navigation"},{name:"questionTitleLocation",tab:"question"},{name:"questionDescriptionLocation",tab:"question"},{name:"showQuestionNumbers",tab:"question"},{name:"questionTitlePattern",tab:"question"},{name:"requiredText",tab:"question"},{name:"questionStartIndex",tab:"question"},{name:"questionErrorLocation",tab:"question"},{name:"focusFirstQuestionAutomatic",tab:"question"},{name:"questionsOrder",tab:"question"},{name:"maxTextLength",tab:"question"},{name:"maxOthersLength",tab:"question"},{name:"autoGrowComment",tab:"question"},{name:"allowResizeComment",tab:"question"},{name:"showPageTitles",tab:"pages"},{name:"showPageNumbers",tab:"pages"},{name:"calculatedValues",tab:"logic"},{name:"triggers",tab:"logic"},{name:"clearInvisibleValues",tab:"data"},{name:"textUpdateMode",tab:"data"},{name:"sendResultOnPageNext",tab:"data"},{name:"storeOthersAsComment",tab:"data"},{name:"focusOnFirstError",tab:"validation"},{name:"checkErrorsMode",tab:"validation"},{name:"navigateToUrl",tab:"showOnCompleted"},{name:"showCompletedPage",tab:"showOnCompleted"},{name:"completedHtml",tab:"showOnCompleted"},{name:"navigateToUrlOnCondition",tab:"showOnCompleted"},{name:"completedHtmlOnCondition",tab:"showOnCompleted"},{name:"loadingHtml",tab:"showOnCompleted"},{name:"completedBeforeHtml",tab:"showOnCompleted"},{name:"maxTimeToFinish",tab:"timer"},{name:"maxTimeToFinishPage",tab:"timer"},{name:"showTimerPanel",tab:"timer"},{name:"showTimerPanelMode",tab:"timer"},{name:"logo",tab:"logo"},{name:"logoPosition",tab:"logo"},{name:"logoWidth",tab:"logo"},{name:"logoHeight",tab:"logo"},{name:"logoFit",tab:"logo"}],tabs:[{name:"logo",index:50},{name:"navigation",index:100},{name:"question",index:200},{name:"pages",index:250},{name:"logic",index:300},{name:"data",index:400},{name:"validation",index:500},{name:"showOnCompleted",index:600},{name:"timer",index:700}]},"page@survey":{properties:["name","title"]}},e}(),De=function(){function e(){}return Object.defineProperty(e.prototype,"name",{get:function(){return this.property?this.property.name:""},enumerable:!1,configurable:!0}),e}(),Re=function(){this.visible=!0,this.index=0,this.properties=[]},Be=function(){function e(e,t,o,i,n,a){void 0===t&&(t=null),void 0===o&&(o=null),void 0===i&&(i=null),void 0===n&&(n=null),void 0===a&&(a=null),this.obj=e,this.options=t,this.parentObj=n,this.parentProperty=a,this.tabs=[],this.showModeValue=i,this.properties=r.Serializer.getPropertiesByObj(this.obj),this.fillPropertiesHash(),this.buildTabs(o)}return e.prototype.getProperty=function(e){var t=this.propertiesHash[e];return t&&t.visible?t.property:null},Object.defineProperty(e.prototype,"showMode",{get:function(){return this.showModeValue?this.showModeValue:"form"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEmpty",{get:function(){for(var e=0;e<this.tabs.length;e++)if(this.tabs[e].visible&&this.tabs[e].properties.length>0)return!1;return!0},enumerable:!1,configurable:!0}),e.prototype.fillPropertiesHash=function(){this.propertiesHash={};for(var e=0;e<this.properties.length;e++){var t=this.properties[e];this.propertiesHash[t.name]={property:t,visible:re.isPropertyVisible(this.obj,t,this.options,this.showMode,this.parentObj,this.parentProperty)}}},e.prototype.isJSONPropertyVisible=function(e){var t=this.propertiesHash[e.name];return!!t&&t.visible},e.prototype.getTabByName=function(e){for(var t=0;t<this.tabs.length;t++)if(this.tabs[t].name==e)return this.tabs[t];return null},e.prototype.getTabs=function(){return this.tabs},e.prototype.getProperties=function(e){for(var t=[],o=0;o<e.properties.length;o++)t.push(e.properties[o].property);return t},e.prototype.buildTabs=function(e){e||(e=this.obj.getType());for(var t=this.getAllDefinitionsByClass(e),o=[],i=t.length-1;i>=0;i--){for(var n=t[i],r=n.tabs?n.tabs.length-1:-1;r>=0;r--)o.indexOf(n.tabs[r].name)>-1||this.addPropertyIntoTab(n.tabs[r],!0)&&o.push(n.tabs[r].name);for(r=n.properties?n.properties.length-1:-1;r>=0;r--){var a=n.properties[r].name||n.properties[r];-1===o.indexOf(a)&&(o.push(a),this.addPropertyIntoTab(n.properties[r]))}}for(i=this.tabs.length-1;i>=0;i--)this.movePropertiesToNextProperties(this.tabs[i].properties),this.tabs[i].visible?this.sortProperties(this.tabs[i].properties):this.tabs.splice(i,1);this.tabs.sort((function(e,t){return e.index<t.index?-1:e.index>t.index?1:0}))},e.prototype.addPropertyIntoTab=function(e,t){if(void 0===t&&(t=!1),t){var o=this.getTabOrCreate(e.name);e.index>0&&(o.index=e.index),!1===e.visible&&(o.visible=!1),e.title&&(o.title=e.title)}var i="string"==typeof e,n=i?e:e.name,r=this.propertiesHash[n];if(!r)return!1;if(!i&&!1===e.visible)return!1;if(!r.visible&&(i||!i&&!0!==e.visible))return!1;var s=t?e.name:a.propertyGrid.generalTabName;t||i||!e.tab||(s=e.tab);var l=new De;return l.property=r.property,l.category=!i&&e.category?e.category:"",l.title=!i&&e.title?e.title:"",l.onSameLine=this.isPropertyOnSameLine(r.property.nextToProperty),l.createdFromTabName=t,this.getTabOrCreate(s).properties.unshift(l),!0},e.prototype.movePropertiesToNextProperties=function(e){for(var t=[].concat(e),o=0;o<t.length;o++){var i=this.getNextToNameProperty(t[o].property),n=this.getTabByPropertyName(i);if(n){var r=this.getPropertyByNameInTab(n,i),a=n.properties.indexOf(r);n.properties.splice(a+1,0,t[o]),e.splice(e.indexOf(t[o]),1)}}},e.prototype.getTabByPropertyName=function(e){if(!e)return null;this.isPropertyOnSameLine(e)&&(e=e.substring(1));for(var t=0;t<this.tabs.length;t++)if(this.getPropertyByNameInTab(this.tabs[t],e))return this.tabs[t];return null},e.prototype.getNextToNameProperty=function(e){return e.nextToProperty?this.isPropertyOnSameLine(e.nextToProperty)?e.nextToProperty.substring(1):e.nextToProperty:""},e.prototype.isPropertyOnSameLine=function(e){return!!e&&"*"===e[0]},e.prototype.getPropertyByNameInTab=function(e,t){for(var o=e.properties,i=0;i<o.length;i++)if(o[i].name==t)return o[i];return null},e.prototype.getTabOrCreate=function(e){for(var t=0;t<this.tabs.length;t++)if(this.tabs[t].name==e)return this.tabs[t];var o=new Re;return o.name=e,e==a.propertyGrid.generalTabName&&(o.index=-1),this.tabs.unshift(o),o},e.prototype.setUsedProperties=function(e,t){for(var o=0;o<e.length;o++){var i=e[o].properties;if(Array.isArray(i))for(var n=0;n<i.length;n++){t[i[n].name?i[n].name:i[n]]=!0}}},e.prototype.getAllDefinitionsByClass=function(e){var t=[],o={};if(e.indexOf("@")>-1&&Me.definition[e]){var i=e.substring(0,e.indexOf("@")+1)+"default";return i!=e&&Me.definition[i]&&t.push(Me.definition[i]),t.push(Me.definition[e]),this.setUsedProperties(t,o),this.addNonTabProperties(t,o,!0),t}for(var n=e,s=!1;n;){var l=r.Serializer.findClass(n);if(!l)break;var u=Me.definition[l.name];if(u){if(u.properties)for(var c=0;c<u.properties.length;){var p=u.properties[c],d="string"==typeof p?p:p.name,h=a.propertyGrid.generalTabName;"string"!=typeof p&&p.tab&&(h=p.tab);var g=this.propertiesHash[d]?this.propertiesHash[d].property:null,m=this.getJsonPropertyCategory(g);m&&m!==h?u.properties.splice(c,1):(o[d]=!0,c++)}if(u.tabs)for(c=0;c<u.tabs.length;c++)s=s||"others"==u.tabs[c].name,o[u.tabs[c].name]=!0;t.unshift(u)}n=l.parentName}return s||this.addNonTabProperties(t,o),t},e.prototype.getJsonPropertyCategory=function(e){return e&&e.category?e.category:null},e.prototype.addNonTabProperties=function(e,t,o){void 0===o&&(o=!1);for(var i={properties:[],tabs:[]},n=[],r=0;r<this.properties.length;r++){var s=this.properties[r];if(!(!this.isJSONPropertyVisible(s)||t[s.name]||o&&"form"!==s.showMode)){var l=this.getJsonPropertyCategory(s),u=l||(0==e.length?a.propertyGrid.generalTabName:"others");if(n.indexOf(u)<0&&u!=a.propertyGrid.generalTabName&&(n.push(u),i.tabs.push({name:u,index:"others"==u?1e3:10*n.length})),s.categoryIndex>-1&&n.indexOf(u)>-1)for(var c=0;c<i.tabs.length;c++)i.tabs[c].name==u&&(i.tabs[c].index=s.categoryIndex);i.properties.push({name:this.properties[r].name,tab:u})}}i.properties.length>0&&e.push(i)},e.prototype.sortProperties=function(e){if(Array.isArray(e))for(var t=[].concat(e),o=0;o<t.length;o++){var i=t[o].property.visibleIndex;if(t[o].createdFromTabName&&i<0&&(i=0),!(i<0)){var n=e.indexOf(t[o]);n>-1&&e.splice(n,1),i<e.length?e.splice(i,0,t[o]):e.push(t[o])}}},e}(),qe=function(){function e(){}return e.prototype.parse=function(t){e.boldRegEx||(e.boldRegEx=/\*{2}(.*?)\*{2}/gm,e.italicRegEx=/\_(.*?)\_/gm,e.codeRegEx=/\`(.*?)\`/gm,e.linkRegEx=/\[(.+)\]\(([^ ]+?)( "(.+)")?\)/);var o=function(e,t,o,n){if(!t)return e;var r=e.indexOf(t);if(i(e,r))return e;var a=t.substring(n.length,t.length),s="<span class='"+o+"'>"+(a=a.substring(0,a.length-n.length))+"</span>";return e.replace(t,s)},i=function(e,t){for(var o=!1,i=t-1;i>0;i--){if(" "===e[i]||"\n"===e[i])return!1;if("]"===e[i]&&o)return!0;o="("===e[i]}return!1};return t=this.replace(e.boldRegEx,t,"spg-bold","**",o),t=this.replace(e.italicRegEx,t,"spg-italic","_",o),t=this.replace(e.codeRegEx,t,"spg-code","`",o),t=this.replace(e.linkRegEx,t,"spg-link","",(function(e,t,o,i){if(!t)return e;var n=t.indexOf("](");if(n<0)return e;var r=t.substring(1,n),a="<a class='"+o+"' target='_blank' href='"+t.substring(n+2,t.length-1)+"'>"+r+"</a>";return e.replace(t,a)})),t=this.addLineBreaks(t)},e.prototype.replace=function(e,t,o,i,n){var r=t.match(e);if(!Array.isArray(r)||0==r.length)return t;for(var a=0;a<r.length;a++)t=n(t,r[a],o,i);return t},e.prototype.addLineBreaks=function(e){return e.indexOf("\n")<0?e:e.split("\n").join("<br/>")},e}();function He(e,t,o){void 0===t&&(t=!0),void 0===o&&(o=!0),e.showNavigationButtons="none",e.showPageTitles=!1,e.focusFirstQuestionAutomatic=!1,e.showQuestionNumbers="off",o&&(e.questionTitleLocation="left"),e.showProgressBar="off",t&&(e.textUpdateMode="onTyping"),e.requiredText=""}r.FunctionFactory.Instance.register("propertyVisibleIf",(function(e){return!!(this.question&&this.question.obj&&this.question.property)&&this.question.property.visibleIf(this.question.obj)})),r.FunctionFactory.Instance.register("propertyEnableIf",(function(e){return!!(this.question&&this.question.obj&&this.question.property)&&!this.question.obj[this.question.property.overridingProperty]}));var Qe=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=!0),this.options=e,this.options||(this.options=new s),t&&this.setupSurvey()}return e.prototype.setupSurvey=function(){this.editSurveyValue=this.createSurvey()},Object.defineProperty(e.prototype,"editSurvey",{get:function(){return this.editSurveyValue},enumerable:!1,configurable:!0}),e.prototype.hasErrors=function(){return this.editSurvey.hasErrors(!0,!0)},e.prototype.createSurvey=function(){var e=this.getSurveyJSON();return He(e,!0,!1),this.options.createSurvey(e,this.getSurveyCreationReason())},e.prototype.dispose=function(){this.editSurvey&&this.editSurvey.dispose()},e}(),Fe={editors:new Array,fitHash:{},clearHash:function(){this.fitHash={}},register:function(e){this.editors.push(e)},getEditor:function(e,t){if(!e)return null;if(t)for(var o=this.editors.length-1;o>=0;o--){var i=this.editors[o];if(i.fit(e,t))return i}var n=this.fitHash[e.id];if(n)return n;var r=this.isEditorFit(e);return r||this.isEditorFit(e,!0)},isEditorFit:function(e,t){void 0===t&&(t=!1);for(var o=this.editors.length-1;o>=0;o--){var i=this.editors[o];if(!t&&i.fit(e)||t&&i.isDefault&&i.isDefault())return this.fitHash[e.id]=i,i}return null},getJSON:function(e,t,o,i){var n=this.getEditor(t,i);return n?n.getJSON(e,t,o):null},onCreated:function(e,t,o,i){var n=this.getEditor(o);n&&n.onCreated&&n.onCreated(e,t,o,i)},onSetup:function(e,t,o,i){var n=this.getEditor(o);n&&n.onSetup&&n.onSetup(e,t,o,i)},validateValue:function(e,t,o,i){var n=this.getEditor(o);return n&&n.validateValue?n.validateValue(e,t,o,i):""},onAfterRenderQuestion:function(e,t,o){var i=this.getEditor(t);i&&i.onAfterRenderQuestion&&i.onAfterRenderQuestion(e,t,o)},onMatrixCellCreated:function(e,t,o){var i=this.getEditor(t);i&&i.onMatrixCellCreated&&i.onMatrixCellCreated(o.question.obj,o)},onMatrixCellValueChanged:function(e,t,o){var i=this.getEditor(t);i&&i.onMatrixCellValueChanged&&i.onMatrixCellValueChanged(e,o);var n=o.row;if(n){var r=n.getQuestionByName(o.columnName);r&&n.runCondition({},{question:r})}},onMatrixAllowRemoveRow:function(e,t,o){var i=this.getEditor(t);return!i||!i.onMatrixAllowRemoveRow||i.onMatrixAllowRemoveRow(e,o)},onGetMatrixRowAction:function(e,t,o,i){var n=this.getEditor(t);n&&n.onGetMatrixRowAction&&n.onGetMatrixRowAction(e,o,i)},onUpdateQuestionCssClasses:function(e,t,o){var i=this.getEditor(t);i&&i.onUpdateQuestionCssClasses&&i.onUpdateQuestionCssClasses(e,o)},onGetQuestionTitleActions:function(e,t,o){var i=this.getEditor(t);i&&i.onGetQuestionTitleActions&&i.onGetQuestionTitleActions(e,o)},onValueChanged:function(e,t,o){var i=this.getEditor(t);i&&i.onValueChanged&&i.onValueChanged(e,t,o)},onMasterValueChanged:function(e,t,o){var i=this.getEditor(t);i&&i.onMasterValueChanged&&i.onMasterValueChanged(e,t,o)}},Ue=function(){function e(e,t){this.obj=e,this.options=t}return e.prototype.onGetQuestionTitleActions=function(e){var t=e.question,o=t.property,i=Fe.getEditor(o);if(i){var n=[],r=!t.isReadOnly;!!i.clearPropertyValue&&(!i.canClearPropertyValue||i.canClearPropertyValue(this.obj,o,t,this.options))&&n.push(this.createClearValueAction(i,o,t,r)),!1!==t.allowBatchEdit&&i.createPropertyEditorSetup&&(r&&(r=!i.isPropertyEditorSetupEnabled||i.isPropertyEditorSetupEnabled(this.obj,o,e.question,this.options)),n.push(this.createEditorSetupAction(i,o,t,r)));var a=this.createPropertyHelpAction(t);a&&n.push(a),n.length>0&&(e.titleActions=n)}},e.prototype.createClearValueAction=function(e,t,o,i){var n=this;return{id:"property-grid-clear",title:Q("pe.clear"),showTitle:!1,iconName:"icon-clear",innerCss:"spg-action-button--danger",enabled:i,visible:new r.ComputedUpdater((function(){var e=o.obj[t.name];return Array.isArray(e)?e.length>0:!!e})),action:function(){e.clearPropertyValue(o.obj,t,o,n.options)}}},e.prototype.showModalPropertyEditor=function(e,t,o){return e.showModalPropertyEditor(e,t,o,this.options)},e.prototype.createEditorSetupAction=function(e,t,o,i){var n=this;return{id:"property-grid-setup",iconName:t.isArray?"icon-fast-entry":"icon-wizard",enabled:i,title:Q("pe.edit"),showTitle:!1,action:function(){return n.showModalPropertyEditor(e,t,o)}}},e.prototype.createPropertyHelpAction=function(e){var t=this;if(!e.description)return null;var o=new r.Action({title:"",tooltip:e.description,id:"property-grid-help",iconName:this.getHelpActionIconName(e),showTitle:!1,action:function(){e.descriptionLocation="hidden"!=e.descriptionLocation?"hidden":"underTitle",o.iconName=t.getHelpActionIconName(e)}});return o},e.prototype.getHelpActionIconName=function(e){return"hidden"!=e.descriptionLocation?"icon-description-hide":"icon-description"},e}(),Ge=function(){function e(e,t,o,i,n){void 0===t&&(t=null),void 0===o&&(o=null),void 0===i&&(i=null),void 0===n&&(n=null),this.obj=e,this.options=t,this.parentObj=o,this.parentProperty=i,this.properties=n}return e.isPropertyReadOnly=function(e,t,o,i,n){var r=e.readOnly;return t&&o&&(r=t.onIsPropertyReadOnlyCallback(o,e,r,i,n)),r},e.getClassNameProperty=function(e){if(e&&e.getClassNameProperty)return e.getClassNameProperty()},e.prototype.toJSON=function(e,t){return void 0===e&&(e=!1),void 0===t&&(t=void 0),this.createJSON(e,t)},e.prototype.createColumnsJSON=function(e,t){for(var o=[],i=0;i<t.length;i++){var n=this.getColumnPropertyJSON(e,t[i]);n&&o.push(n)}return o},e.prototype.setupObjPanel=function(e,t,o){void 0===t&&(t=!1),void 0===o&&(o=void 0),e.fromJSON(this.toJSON(t,o)),this.onQuestionsCreated(e)},e.prototype.onQuestionsCreated=function(e){for(var t=r.Serializer.getPropertiesByObj(this.obj),o={},i=0;i<t.length;i++)o[t[i].name]=t[i];var n=e.questions;for(i=0;i<n.length;i++){var a=n[i],s=o[a.name];a.property=s,a.obj=this.obj,a.options=this.options;var l=this.getVisibilityOnEvent(s),u=this.isPropertyReadOnly(s);if(a.readOnly=a.readOnly||u,a.visible=a.visible&&l,s.visibleIf&&l&&(a.visibleIf="propertyVisibleIf() = true"),s.overridingProperty&&a.visible){a.onUpdateCssClassesCallback=function(e){e.questionWrapper="spg-boolean-wrapper--overriding"},u||(a.enableIf="propertyEnableIf() = true");var c=this.createOverridingQuestion(e,a,s.overridingProperty);a.parent.addElement(c,a.parent.elements.indexOf(a)+1)}a.descriptionLocation="hidden";var p=H.getPropertyHelpInEditor(this.obj.getType(),s.name,s.type);p&&(a.description=p),Fe.onCreated(this.obj,a,s,this.options),this.options.onPropertyEditorCreatedCallback(this.obj,s,a)}},e.prototype.getVisibilityOnEvent=function(e,t){return void 0===t&&(t=""),this.options.onCanShowPropertyCallback(this.obj,e,t,this.parentObj,this.parentProperty)},e.prototype.isPropertyReadOnly=function(t){return e.isPropertyReadOnly(t,this.options,this.obj,this.parentObj,this.parentProperty)},e.prototype.createOverridingQuestion=function(e,t,o){var i=r.Serializer.createClass("linkvalue");i.name=t.name+"_overridingProperty",i.startWithNewLine=!1,i.property=t.property,i.obj=t.obj,i.visibleIf="propertyEnableIf() = false";var n=e.getQuestionByName(o),a=n?n.title:o;return i.linkValueText=H.getString("pe.overridingPropertyPrefix")+a,i.titleLocation="hidden",i.onUpdateCssClassesCallback=function(e){e.questionWrapper="spg-link-wrapper--overriding"},n&&(i.linkClickCallback=function(){n.focus()}),i},e.prototype.getClasPropName=function(){if(this.parentObj&&this.parentProperty)return this.parentProperty.name;var t=e.getClassNameProperty(this.obj);return t&&this.obj[t]?this.obj[t]:void 0},e.prototype.createJSON=function(e,t){void 0===t&&(t=void 0);var o=void 0,i=this.getClasPropName();i&&("itemvalue"===(o=this.obj.getType())&&(o+="[]"),o+="@"+i);for(var n=new Be(this.obj,null,o,void 0,this.parentObj,this.parentProperty).getTabs(),r={},s=0;s<n.length;s++)!1!==n[s].visible&&(r[n[s].name]=this.createPanelProps(n[s],t));var l={elements:[]};for(var u in r)if(u==a.propertyGrid.generalTabName&&e){var c=r[u].elements;for(s=0;s<c.length;s++)l.elements.push(c[s])}else l.elements.push(r[u]);return l},e.prototype.createPanelProps=function(e,t){for(var o=this.createPanelJSON(e.name,e.title),i=0;i<e.properties.length;i++){var n=e.properties[i],r=this.createQuestionJSON(n.property,n.title,!1,t);n.onSameLine&&(r.startWithNewLine=!1,this.updateQuestionJSONOnSameLine(r),o.elements.length>0&&this.updateQuestionJSONOnSameLine(o.elements[o.elements.length-1])),r&&o.elements.push(r)}return o},e.prototype.updateQuestionJSONOnSameLine=function(e){e.titleLocation="left",e.minWidth="50px"},e.prototype.createPanelJSON=function(e,t){return{type:"panel",name:e,title:this.getPanelTitle(e,t),state:"collapsed",elements:[]}},e.prototype.createQuestionJSON=function(e,t,o,i){var n;if(void 0===o&&(o=!1),!this.isPropertyVisible(e,o?"list":"")&&o)return null;var r=Fe.getJSON(this.obj,e,this.options,i);if(!r)return null;r.name=e.name,r.visible=e.visible,r.isReadOnly=e.readOnly,r.isRequired=e.isRequired,r.requiredErrorText=H.getString("pe.propertyIsEmpty"),r.title=this.getQuestionTitle(e,t),["page","panelbase"].indexOf(e.className)&&"name"===r.name&&(r.isRequired=!0,r.requiredErrorText=H.getString("pe.propertyIsEmpty"));var a=null===(n=Me.definition[this.obj.getType()])||void 0===n?void 0:n.properties.filter((function(t){return t.name===e.name}))[0];return"object"==typeof a&&a.placeholder&&(r.placeholder=H.getString("pe."+a.placeholder)),r},e.prototype.getColumnPropertyJSON=function(e,t){if(!e)return null;var o=r.Serializer.findProperty(e,t);if(!o)return null;var i=this.createQuestionJSON(o,"",!0,void 0);return i?(i.name=o.name,i.title=this.getQuestionTitle(o,""),o.isUnique&&(i.isUnique=o.isUnique),i.type&&(i.cellType=i.type,delete i.type),"buttongroup"===i.cellType&&(i.cellType="dropdown"),o.visibleIf&&(i.visibleIf="propertyVisibleIf() = true"),i.isReadOnly&&(i.readOnly=i.isReadOnly,delete i.isReadOnly),i):null},e.prototype.isPropertyVisible=function(e,t){return!!e.visible&&(!t||!e.showMode||t==e.showMode)},e.prototype.getPanelTitle=function(e,t){return t||H.getString("pe.tabs."+e)},e.prototype.getQuestionTitle=function(e,t){return e.displayName?e.displayName:t&&t!==e.name?t:H.getPropertyNameInEditor(this.obj.getType(),e.name)},e}(),ze=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=new s),this.isCellCreating=!1,this.options=t,this.options.enableLinkFileEditor&&Fe.register(new Xe),this.obj=e}return e.prototype.refresh=function(){this.setObj(this.objValue)},Object.defineProperty(e.prototype,"obj",{get:function(){return this.objValue},set:function(e){this.objValue!==e&&this.setObj(e)},enumerable:!1,configurable:!0}),e.prototype.selectProperty=function(e,t){if(void 0===t&&(t=!0),this.survey){var o=this.survey.getQuestionByName(e);if(o){for(var i=this.survey.getAllPanels(),n=0;n<i.length;n++){var r=i[n];r===o.parent?r.expand():r.collapse()}t&&o.focus()}}},e.prototype.setObjFromAction=function(e,t){this.changedFromActionCallback?this.changedFromActionCallback(e,t):this.setObj(e)},e.prototype.setObj=function(e){var t=this;this.objValue=e,this.classNameProperty=this.obj?Ge.getClassNameProperty(this.obj):"",this.classNameValue=this.classNameProperty?this.obj[this.classNameProperty]:void 0,this.titleActionsCreator=this.obj?new Ue(this.obj,this.options):void 0;var o=this.getSurveyJSON();this.options.readOnly&&(o.mode="display"),this.surveyValue&&(this.surveyValue.onValidateQuestion.clear(),this.surveyValue.onValueChanging.clear(),this.surveyValue.onValueChanged.clear(),this.surveyValue.onMatrixCellValueChanging.clear(),this.surveyValue.onMatrixCellValidate.clear(),this.surveyValue.onMatrixCellValueChanged.clear(),this.surveyValue.editingObj=void 0,this.surveyValue.data={},this.surveyValue.dispose()),this.surveyValue=this.createSurvey(o),this.surveyValue.questionErrorLocation="bottom",this.surveyValue.getCss().list={},this.surveyValue.css=se;var i=this.surveyValue.createNewPage("p1");this.obj&&(new Ge(this.obj,this.options).setupObjPanel(i,!1),this.survey.addPage(i),this.survey.getAllQuestions().forEach((function(e){Fe.onSetup(t.obj,e,e.property,t.options)})),this.survey.checkErrorsMode="onValueChanging",this.survey.onValueChanged.add((function(e,o){t.onValueChanged(o)})),this.survey.onValueChanging.add((function(e,o){t.onValueChanging(o)})),this.survey.onValidateQuestion.add((function(e,o){t.onValidateQuestion(o)})),this.survey.onGetQuestionTitleActions.add((function(e,o){t.titleActionsCreator.onGetQuestionTitleActions(o),t.onGetQuestionTitleActions(o);var i=o.question;t.options.onPropertyEditorUpdateTitleActionsCallback(t.obj,i.property,i,o.titleActions)})),this.survey.onGetPanelTitleActions.add((function(e,t){t.titleActions.splice(0,t.titleActions.length)})),this.survey.onMatrixCellCreated.add((function(e,o){t.onMatrixCellCreated(o)})),this.survey.onMatrixCellValueChanging.add((function(e,o){t.onMatrixCellValueChanging(o)})),this.survey.onMatrixCellValidate.add((function(e,o){t.onMatrixCellValidate(o)})),this.survey.onMatrixCellValueChanged.add((function(e,o){t.onMatrixCellValueChanged(o)})),this.survey.onMatrixAllowRemoveRow.add((function(e,o){o.allow=t.getMatrixAllowRemoveRow(o.question,o.row)})),this.survey.onMatrixRowRemoving.add((function(e,o){o.allow=t.getMatrixOnRowRemoving(o.question,o.row)})),this.survey.onMatrixRowAdded.add((function(e,o){t.onMatrixRowAdded(o)})),this.survey.onGetMatrixRowActions.add((function(e,o){t.onGetMatrixRowAction(o)})),this.survey.onUpdateQuestionCssClasses.add((function(e,o){t.onUpdateQuestionCssClasses(o)})),this.survey.onAfterRenderQuestion.add((function(e,o){t.onAfterRenderQuestion(o)})),this.survey.onTextMarkdown.add((function(e,t){var o;"description"===t.name&&(t.html=(o=t.text,(new qe).parse(o)))})),this.survey.editingObj=this.obj,this.objValueChangedCallback&&this.objValueChangedCallback(),this.updateDependedPropertiesEditors(),this.survey.onFocusInPanel.add((function(e,o){if(t.currentlySelectedPanel!==o.panel){var i=o.panel.getFirstQuestionToFocus(!1,!0);t.currentlySelectedProperty=i?i.name:"",t.currentlySelectedPanel=o.panel}})),this.survey.onFocusInQuestion.add((function(e,o){t.currentlySelectedProperty=o.question.name,t.currentlySelectedPanel=o.question.parent})),this.survey.onUploadFiles.add((function(e,o){var i="image"==o.question.obj.getType()?o.question.obj:"imageitemvalue"==o.question.obj.getType()?o.question.obj.locOwner:void 0;t.options.uploadFiles(o.files,i,(function(e,t){return o.callback(e,[{content:t,file:o.files[0]}])}))})),this.survey.getAllQuestions().map((function(e){return e.allowRootStyle=!1})),this.survey.onQuestionCreated.add((function(e,t){t.question.allowRootStyle=!1})),this.options.onPropertyGridSurveyCreatedCallback(this.obj,this.survey))},Object.defineProperty(e.prototype,"options",{get:function(){return this.optionsValue},set:function(e){this.optionsValue=e||new s},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),e.prototype.validate=function(){if(this.survey)return!this.survey.hasErrors(!0,!0)},e.prototype.collapseCategory=function(e){var t=this.survey.getPanelByName(e);t&&t.collapse()},e.prototype.expandCategory=function(e){var t=this.survey.getPanelByName(e);t&&t.expand()},e.prototype.collapseAllCategories=function(){for(var e=this.survey.getAllPanels(),t=0;t<e.length;t++)e[t].collapse()},e.prototype.expandAllCategories=function(){for(var e=this.survey.getAllPanels(),t=0;t<e.length;t++)e[t].expand()},e.prototype.createSurvey=function(e){return this.options.createSurvey(e,"property-grid")},e.prototype.getSurveyJSON=function(){var e={};return He(e,!0,!1),e},e.prototype.validateQuestionValue=function(e,t,o,i){if(t.isRequired&&(r.Helpers.isValueEmpty(i)||t.valueChangingEmpty))return this.getErrorTextOnValidate(H.getString("pe.propertyIsEmpty"),o.name,e,i);if(this.isPropNameInValid(e,o,i)||t.nameHasError)return this.getErrorTextOnValidate(H.getString("pe.propertyNameIsIncorrect"),o.name,e,i);var n=Fe.validateValue(e,t,o,i);return this.getErrorTextOnValidate(n,o.name,e,i)},e.prototype.getErrorTextOnValidate=function(e,t,o,i){var n=this.options.onGetErrorTextOnValidationCallback(t,o,i);return n||e},e.prototype.onValidateQuestion=function(e){var t=e.question;t&&t.property&&(e.error=this.validateQuestionValue(this.obj,t,t.property,e.value))},e.prototype.onValueChanging=function(e){var t=e.question;if(t&&t.property&&!r.Helpers.isTwoValueEquals(e.value,e.oldValue)){var o={obj:this.obj,propertyName:t.property.name,value:e.oldValue,newValue:e.value,doValidation:!1};if(this.options.onValueChangingCallback(o),e.value=o.newValue,t.property.isRequired){var i=r.Helpers.isValueEmpty(e.value);t.valueChangingEmpty=i}var n=this.isPropNameInValid(this.obj,t.property,e.value);t.nameHasError=n}},e.prototype.isPropNameInValid=function(e,t,o){return!(!e.isQuestion||"name"!==t.name||!o)&&(o=o.toLowerCase(),["item","choice","row","panel"].indexOf(o)>-1)},e.prototype.onValueChanged=function(e){var t=this,o=e.question;if(o&&o.property&&(o.valueChangingEmpty=!1,o.nameHasError=!1,this.changeDependedProperties(o,(function(e){return t.survey.getQuestionByName(e)}),(function(e){return t.survey.getValue(e)})),Fe.onValueChanged(this.obj,o.property,o),this.classNameProperty&&e.name===this.classNameProperty&&this.classNameValue!==e.value&&(this.setObj(this.obj),this.survey))){var i=this.survey.getQuestionByName(e.name);i&&i.focus()}},e.prototype.changeDependedProperties=function(e,t,o){var i=e.property;if(i){var n=i.getDependedProperties();if(n)for(var a=0;a<n.length;a++){var s=n[a],l=t(s);if(l){this.updateDependedPropertiesEditor(l);var u=o(s);r.Helpers.isTwoValueEquals(l.value,u)||(l.value=u),Fe.onMasterValueChanged(e.obj,l.property,l)}}}},e.prototype.updateDependedPropertiesEditor=function(e){var t=e.obj;if(t){var o=e.property;o&&o.onPropertyEditorUpdate&&o.onPropertyEditorUpdate(t,e)}},e.prototype.updateDependedPropertiesEditors=function(){for(var e=this.survey.getAllQuestions(),t=0;t<e.length;t++)this.updateDependedPropertiesEditor(e[t])},e.prototype.onAfterRenderQuestion=function(e){Fe.onAfterRenderQuestion(this.obj,e.question.property,e)},e.prototype.onMatrixCellCreated=function(e){this.isCellCreating=!0,Fe.onMatrixCellCreated(this.obj,e.question.property,e),this.isCellCreating=!1;var t=e.row.editingObj;if(t){var o=r.Serializer.findProperty(t.getType(),e.columnName);if(o){var i=this.getMatrixAllowEditRow(e.question,e.row);e.cellQuestion.readOnly=!i||Ge.isPropertyReadOnly(o,this.options,t,this.obj,e.question.property)}}},e.prototype.onMatrixCellValueChanging=function(e){if(!this.isCellCreating){var t={obj:e.row.editingObj,propertyName:e.columnName,value:e.oldValue,newValue:e.value,doValidation:!1};this.options.onValueChangingCallback(t),e.value=t.newValue}},e.prototype.onMatrixCellValidate=function(e){if(!this.isCellCreating){var t=e.row.getQuestionByColumnName(e.columnName);t&&t.property&&(e.error=this.validateQuestionValue(e.row.editingObj,t,t.property,e.value))}},e.prototype.onGetMatrixRowAction=function(e){var t=this;Fe.onGetMatrixRowAction(this.obj,e.question.property,e,(function(o){t.setObjFromAction(o,e.question.name)}))},e.prototype.onUpdateQuestionCssClasses=function(e){Fe.onUpdateQuestionCssClasses(this.obj,e.question.property,e)},e.prototype.onGetQuestionTitleActions=function(e){Fe.onGetQuestionTitleActions(this.obj,e.question.property,e)},e.prototype.onMatrixCellValueChanged=function(e){if(!this.isCellCreating){var t=e.row.getQuestionByName(e.columnName);t&&this.changeDependedProperties(t,(function(t){return e.row.getQuestionByName(t)}),(function(t){return e.row.getValue(t)})),Fe.onMatrixCellValueChanged(this.obj,e.question.property,e)}},e.prototype.getMatrixAllowRemoveRow=function(e,t){return void 0===t.allowDeleteRow&&this.calculateMatrixAllowOperations(e,t),t.allowDeleteRow},e.prototype.getMatrixOnRowRemoving=function(e,t){return this.options.onCollectionItemDeletingCallback(this.obj,e.property,e.value,t.editingObj)},e.prototype.getMatrixAllowEditRow=function(e,t){return!e.readOnly&&(void 0===t.allowEditRow&&this.calculateMatrixAllowOperations(e,t),t.allowEditRow)},e.prototype.calculateMatrixAllowOperations=function(e,t){var o={allowDelete:this.onMatrixAllowRemoveRow(e,t),allowEdit:!0,allowAdd:void 0};this.options.onCollectionItemAllowingCallback(this.obj,e.property,e.value,t.editingObj,o),t.allowDeleteRow=o.allowDelete,t.allowEditRow=o.allowEdit},e.prototype.onMatrixAllowRemoveRow=function(e,t){var o=Fe.onMatrixAllowRemoveRow(this.obj,e.property,t);return this.options.onCanDeleteItemCallback(this.obj,t.editingObj,o)},e.prototype.onMatrixRowAdded=function(e){var t=e.row.editingObj;r.Serializer.isDescendantOf(t.getType(),"itemvalue")&&this.options.onItemValueAddedCallback(this.obj,e.question.property.name,e.row.editingObj,e.question.value),r.Serializer.isDescendantOf(t.getType(),"matrixdropdowncolumn")&&this.options.onMatrixDropdownColumnAddedCallback(this.obj,e.row.editingObj,e.question.value)},e}(),Ze=function(){function e(){}return e.prototype.showModalPropertyEditor=function(e,t,o,i,n){var a=this,s=o.obj,l=e.createPropertyEditorSetup(s,t,o,i);if(!l)return null;if("condition"!==t.type&&(l.editSurvey.css=r.defaultV2Css),o.isReadOnly&&(l.editSurvey.mode="display"),!r.settings.showModal)return l;var u=r.surveyLocalization.currentLocale,c=H.currentLocale;r.surveyLocalization.currentLocale=c;var p=r.settings.showModal("survey",{survey:l.editSurvey,model:l.editSurvey},(function(){return a.onModalPropertyEditorClosed(e,t,o,i,"apply"),n&&n("apply"),l.apply()}),(function(){a.onModalPropertyEditorClosed(e,t,o,i,"cancel"),n&&n("cancel")}),"sv-property-editor",o.title,i.isMobileView?"overlay":"popup");if(o.isReadOnly){var d=p.footerToolbar.getActionById("apply");d&&(d.visible=!1)}return p.locale=c,r.surveyLocalization.currentLocale=u,this.onModalPropertyEditorShown(e,t,o,i),i.onPropertyGridShowModalCallback(s,t,o,l,p),l},e.prototype.onModalPropertyEditorShown=function(e,t,o,i){},e.prototype.onModalPropertyEditorClosed=function(e,t,o,i,n){},e.prototype.isSupportGrouping=function(){return!1},e.prototype.hasPreviousElementForGrouping=function(e){if(!e||!e.parent)return!1;var t=e.parent.elements.indexOf(e);if(!(t<1)){var o=e.parent.elements[t-1],i=e.parent.elements[t-2];return o.getType()===e.getType()||t>1&&!o.startWithNewLine&&i.property===o.property&&i.getType()===e.getType()}},e.prototype.onUpdateQuestionCssClasses=function(e,t){this.isSupportGrouping()&&this.hasPreviousElementForGrouping(t.question)&&(t.cssClasses.mainRoot+=" spg-row-narrow__question")},e}(),Je=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e,t){return"boolean"==e.type||"switch"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"boolean",default:!1,renderAs:"checkbox",titleLocation:"hidden"}},t.prototype.isSupportGrouping=function(){return!0},t}(Ze),We=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.updateMaxLength=function(e,t){return e.maxLength>0&&(t.maxLength=e.maxLength),t},t.prototype.onCreated=function(e,t,o,i){t.disableNativeUndoRedo=!0},t}(Ze),Ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"string"==e.type},t.prototype.isDefault=function(){return!0},t.prototype.getJSON=function(e,t,o){var i=this.updateMaxLength(t,{type:"text"});return t.isRequired&&(i.textUpdateMode="onBlur"),t.dataList&&(i.dataList=t.dataList),i},t}(We),Xe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return["logo","imageLink"].indexOf(e.name)>-1},t.prototype.getJSON=function(e,t,o){return{type:"fileedit",storeDataAsText:!1}},t.prototype.onCreated=function(e,t,o,i){if(["image"].indexOf(e.getType())>-1){var n=e;n.registerFunctionOnPropertyValueChanged("contentMode",(function(e){t.acceptedTypes=N(e)})),t.acceptedTypes=N(n.contentMode)}else t.acceptedTypes=N("image")},t}(Ze),Ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"number"==e.type||"responsiveImageSize"==e.type},t.prototype.getJSON=function(e,t,o){var i={type:"text",inputType:"number",textUpdateMode:"onBlur"};return void 0!==t.minValue&&(i.min=t.minValue),void 0!==t.maxValue&&(i.max=t.maxValue),i},t}(Ze),$e=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"string"==e.type&&("imageHeight"==e.name||"imageWidth"==e.name)},t.prototype.isDefault=function(){return!1},t.prototype.onCreated=function(e,t,o){t.valueFromDataCallback=function(t){var o,i,n,a;return(o=e.imageHeight,i=e.imageWidth,n=r.Serializer.findProperty(e.getType(),"imageHeight"),a=r.Serializer.findProperty(e.getType(),"imageWidth"),!(!n&&!a)&&n.isDefaultValue(o)&&a.isDefaultValue(i))?void 0:t}},t}(Ke),et=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"text"===e.type},t.prototype.getJSON=function(e,t,o){return this.updateMaxLength(t,{type:"comment"})},t}(We),tt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"html"===e.type},t.prototype.getJSON=function(e,t,o){return this.updateMaxLength(t,{type:"comment"})},t}(We),ot=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"color"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"text",inputType:"color"}},t}(Ze),it=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"string[]"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"comment"}},t.prototype.onCreated=function(e,t,o){t.valueFromDataCallback=function(e){return Array.isArray(e)?e.join("\n"):""},t.valueToDataCallback=function(e){return e?Array.isArray(e)&&!e.split?e:e.split("\n"):[]}},t}(Ze),nt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return this.isLocaleProp(e)||e.hasChoices},t.prototype.getJSON=function(e,t,o){var i=this.getChoices(e,t),n={type:this.renderAsButtonGroup(t,i)?"buttongroup":"dropdown",choices:i,showOptionsCaption:!1};return this.updateObjBasedOnEmptyValueItem(t,i,n),n},t.prototype.getChoices=function(e,t){return t.getChoices(e,(function(e){}))},t.prototype.updateObjBasedOnEmptyValueItem=function(e,t,o){var i=this.getEmptyJsonItemValue(e,t);i&&(o.showOptionsCaption=!0,o.allowClear=!0,i.text&&(o.optionsCaption=i.text))},Object.defineProperty(t.prototype,"canRenderAsButtonGroup",{get:function(){return a.propertyGrid.useButtonGroup},enumerable:!1,configurable:!0}),t.prototype.renderAsButtonGroup=function(e,t){if(this.isLocaleProp(e))return!1;if(!this.canRenderAsButtonGroup||!t||0==t.length||t.length>4)return!1;for(var o=0,i=0;i<t.length;i++){var n=this.getLocalizedText(e,t[i].value?t[i].value:t[i]);o+=n?n.length:0}return o<a.propertyGrid.maxCharsInButtonGroup},t.prototype.onCreated=function(e,t,o){this.setChoices(e,t,o),t.displayValueCallback=function(e){return e||t.optionsCaption}},t.prototype.onMasterValueChanged=function(e,t,o){this.setChoices(e,o,t),o.isEmpty()||r.ItemValue.getItemByValue(o.choices,o.value)||o.clearValue()},t.prototype.setChoicesCore=function(e,t,o){o&&Array.isArray(o)&&0!=o.length&&(this.updateObjBasedOnEmptyValueItem(t,o,e),e.choices=this.choicesFromPropChoices(t,o))},t.prototype.isLocaleProp=function(e){return"locale"===e.name},t.prototype.getLocalizedText=function(e,t){var o;if(this.isLocaleProp(e)&&(o=H.getLocaleName(t)))return o;if("cellType"===e.name&&(o=H.getString("qt."+t)))return o;return null===t?null:H.getPropertyValueInEditor(e.name,t)},t.prototype.choicesFromPropChoices=function(e,t){for(var o=[],i=0;i<t.length;i++){var n=this.getJsonItem(e,t[i]);r.Helpers.isValueEmpty(n.value)||o.push(n)}return o},t.prototype.getJsonItem=function(e,t){var o={value:void 0!==t.value?t.value:t},i=t.text?t.text:"";return i||(i=this.getLocalizedText(e,o.value)),i&&i!=o.value&&(o.text=i),o},t.prototype.setChoices=function(e,t,o){var i=this,n=o.getChoices(e,(function(e){i.setChoicesCore(t,o,e)}));this.setChoicesCore(t,o,n)},t.prototype.getEmptyJsonItemValue=function(e,t){if(!t)return null;for(var o=0;o<t.length;o++){var i=t[o],n=void 0!==i.value?i.value:i;if(r.Helpers.isValueEmpty(n))return this.getJsonItem(e,i)}return null},t}(Ze),rt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"set"==e.type||"multiplevalues"==e.type},t.prototype.getJSON=function(t,o,i){var n=e.prototype.getJSON.call(this,t,o,i),a=!!r.Serializer.findClass("tagbox");return n.type=a?"tagbox":"checkbox",n.hasSelectAll=!a,n},t}(nt),at=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return e.hasChoices&&"page"==e.name},Object.defineProperty(t.prototype,"canRenderAsButtonGroup",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.onCreated=function(t,o,i){e.prototype.onCreated.call(this,t,o,i),o.valueFromDataCallback=function(e){return e?e.name:""},o.valueToDataCallback=function(e){if(e&&t&&t.getSurvey())return t.getSurvey().getPageByName(e)}},t}(nt),st=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"question"==e.type},t.prototype.getJSON=function(e,t,o){var i={type:"dropdown",optionsCaption:H.getString("pe.conditionSelectQuestion"),choices:this.getChoices(e,t,o)};return"question"==t.type&&(i.allowClear=!1),i},t.prototype.getChoices=function(e,t,o){var i=this,n=ke.getSurvey(e);if(!n)return[];var r=this.getQuestions(n,e);r||(r=[]);var a=!!o&&o.showTitlesInExpressions,s=r.map((function(e){var t=a?e.locTitle.renderedHtml:e.name;return o&&(t=o.getObjectDisplayName(e,"property-grid:property-editor","property-editor",t)),{value:i.getItemValue(e),text:t}}));return re.sortItems(s),s},t.prototype.getQuestions=function(e,t){return e.getAllQuestions()},t.prototype.getItemValue=function(e){return e.name},t}(Ze),lt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"question_selectbase"==e.type},t.prototype.getQuestions=function(t,o){for(var i=e.prototype.getQuestions.call(this,t,o),n=[],a=0;a<i.length;a++)i[a]!==o&&r.Serializer.isDescendantOf(i[a].getType(),"selectbase")&&n.push(i[a]);return n},t}(st),ut=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"questionvalue"==e.type},t.prototype.getItemValue=function(e){return e.getValueName()},t.prototype.getQuestions=function(t,o){return e.prototype.getQuestions.call(this,t,o).filter((function(e){return!r.Serializer.isDescendantOf(e.getType(),"nonvalue")}))},t}(st);Fe.register(new Je),Fe.register(new Ke),Fe.register(new Ye),Fe.register(new ot),Fe.register(new et),Fe.register(new tt),Fe.register(new nt),Fe.register(new rt),Fe.register(new at),Fe.register(new it),Fe.register(new st),Fe.register(new ut),Fe.register(new lt),Fe.register(new $e),r.QuestionFactory.Instance.registerQuestion("buttongroup",(function(e){return new r.QuestionButtonGroupModel(e)}));var ct={root:"st-root-modern",container:"st-container-modern",header:"st-title st-container-modern__title",body:"st-body",bodyEmpty:"st-body st-body--empty",footer:"st-footer st-body__footer st-clearfix",title:"",description:"",logo:"st-logo",logoImage:"st-logo__image",headerText:"st-header__text",navigationButton:"",completedPage:"st-completedpage",navigation:{complete:"st-btn st-footer__complete-btn",prev:"st-btn st-footer__prev-btn",next:"st-btn st-footer__next-btn",start:"st-btn st-footer__start-btn",preview:"st-btn st-footer__preview-btn",edit:"st-btn st-footer__edit-btn"},panel:{title:"st-title st-panel__title",titleExpandable:"st-panel__title--expandable",titleOnExpand:"st-panel__title--expanded",titleOnError:"st-panel__title--error",description:"st-description st-panel__description",container:"st-element st-panel st-row__panel",content:"st-panel__content",icon:"st-panel__icon",iconExpanded:"st-panel__icon--expanded",footer:"st-panel__footer",requiredText:"st-panel__required-text"},paneldynamic:{root:"st-paneldynamic",navigation:"st-paneldynamic__navigation",title:"st-title st-question__title",button:"st-btn",buttonRemove:"st-paneldynamic__remove-btn",buttonAdd:"st-paneldynamic__add-btn",progressTop:"st-paneldynamic__progress st-paneldynamic__progress--top",progressBottom:"st-paneldynamic__progress st-paneldynamic__progress--bottom",buttonPrev:"st-paneldynamic__prev-btn",buttonNext:"st-paneldynamic__next-btn",progressContainer:"st-paneldynamic__progress-container",progress:"st-progress",progressBar:"st-progress__bar",progressText:"st-paneldynamic__progress-text",separator:"st-paneldynamic__separator",panelWrapper:"st-paneldynamic__panel-wrapper",panelWrapperInRow:"st-paneldynamic__panel-wrapper--in-row"},progress:"st-progress st-body__progress",progressBar:"st-progress__bar",progressText:"st-progress__text",progressTextInBar:"st-hidden",page:{root:"st-page st-body__page",title:"st-title st-page__title",description:"st-description st-page__description"},pageTitle:"st-title st-page__title",pageDescription:"st-description st-page__description",row:"st-row st-clearfix",question:{mainRoot:"st-element st-question st-row__question",flowRoot:"st-element st-question st-row__question st-row__question--flow",asCell:"st-table__cell",header:"st-question__header",headerLeft:"st-question__header--location--left",headerTop:"st-question__header--location--top",headerBottom:"st-question__header--location--bottom",content:"st-question__content",contentLeft:"st-question__content--left",titleLeftRoot:"",titleOnAnswer:"st-question__title--answer",titleOnError:"st-question__title--error",title:"st-title st-question__title",requiredText:"st-question__required-text",number:"st-question__num",description:"st-description st-question__description",descriptionUnderInput:"st-description st-question__description",comment:"st-comment",required:"st-question--required",titleRequired:"st-question__title--required",indent:20,footer:"st-question__footer",formGroup:"st-question__form-group",hasError:"",disabled:"st-question--disabled"},image:{root:"st-image",image:"sv_image_image"},error:{root:"st-question__erbox",icon:"",item:"",locationTop:"st-question__erbox--location--top",locationBottom:"st-question__erbox--location--bottom"},checkbox:{root:"st-selectbase",item:"st-item st-checkbox st-selectbase__item",itemSelectAll:"st-checkbox--selectall",itemNone:"st-checkbox--none",itemDisabled:"st-item--disabled st-checkbox--disabled",itemChecked:"st-item--checked st-checkbox--checked",itemHover:"st-item--allowhover st-checkbox--allowhover",itemInline:"st-selectbase__item--inline",label:"st-selectbase__label",labelChecked:"",itemControl:"st-visuallyhidden st-item__control st-checkbox__control",itemDecorator:"st-item__svg st-checkbox__svg",controlLabel:"st-item__control-label",materialDecorator:"st-item__decorator st-checkbox__decorator",other:"st-comment st-question__other",column:"st-selectbase__column"},radiogroup:{root:"st-selectbase",item:"st-item st-radio st-selectbase__item",itemInline:"st-selectbase__item--inline",label:"st-selectbase__label",labelChecked:"",itemDisabled:"st-item--disabled st-radio--disabled",itemChecked:"st-item--checked st-radio--checked",itemHover:"st-item--allowhover st-radio--allowhover",itemControl:"st-visuallyhidden st-item__control st-radio__control",itemDecorator:"st-item__svg st-radio__svg",controlLabel:"st-item__control-label",materialDecorator:"st-item__decorator st-radio__decorator",other:"st-comment st-question__other",clearButton:"st-btn st-selectbase__clear-btn",column:"st-selectbase__column"},boolean:{mainRoot:"st-question st-row__question st-question--boolean",root:"",item:"st-boolean",control:"st-boolean__control st-visuallyhidden",itemChecked:"st-boolean--checked",itemIndeterminate:"st-boolean--indeterminate",itemDisabled:"st-boolean--disabled",label:"st-boolean__label",switch:"st-boolean__switch",disabledLabel:"st-checkbox__label--disabled",itemDecorator:"st-checkbox__hidden",materialDecorator:"st-checkbox__rectangle",sliderText:"",slider:"st-boolean__thumb"},text:{root:"st-input st-text",small:"st-row__question--small",controlDisabled:"st-input--disabled",onError:"st-input--error"},multipletext:{root:"st-multipletext",item:"st-multipletext__item",itemTitle:"st-multipletext__item-title",row:"st-multipletext__row",cell:"st-multipletext__cell"},dropdown:{root:"st-selectbase",small:"st-row__question--small",control:"st-input st-dropdown",other:"st-comment st-question__other",onError:"st-input--error",label:"st-selectbase__label",item:"st-item st-radio st-selectbase__item",itemDisabled:"st-item--disabled st-radio--disabled",itemChecked:"st-item--checked st-radio--checked",itemHover:"st-item--allowhover st-radio--allowhover",itemControl:"st-visuallyhidden st-item__control st-radio__control",itemDecorator:"st-item__svg st-radio__svg",controlDisabled:"st-input--disabled",controlLabel:"st-item__control-label",materialDecorator:"st-item__decorator st-radio__decorator"},imagepicker:{root:"st-imagepicker",item:"st-imagepicker__item",itemInline:"st-imagepicker__item--inline",itemChecked:"st-imagepicker__item--checked",itemDisabled:"st-imagepicker__item--disabled",itemHover:"st-imagepicker__item--allowhover",label:"st-imagepicker__label",itemControl:"st-imagepicker__control",image:"st-imagepicker__image",itemText:"st-imagepicker__text",clearButton:"st-btn",other:"st-comment st-question__other"},matrix:{mainRoot:"st-question st-row__question st-scrollable",tableWrapper:"st-matrix",root:"st-table",rowError:"st-matrix__row--error",cell:"st-table__cell st-matrix__cell",headerCell:"st-table__cell st-table__cell--header",label:"st-item st-radio st-matrix__label",itemValue:"st-visuallyhidden st-item__control st-radio__control",itemChecked:"st-radio--checked",itemDisabled:"st-item--disabled st-radio--disabled",itemHover:"st-radio--allowhover",materialDecorator:"st-item__decorator st-radio__decorator",itemDecorator:"st-item__svg st-radio__svg",cellText:"st-matrix__text",cellTextSelected:"st-matrix__text--checked",cellTextDisabled:"st-matrix__text--disabled"},matrixdropdown:{mainRoot:"st-question st-row__question st-scrollable",root:"st-table",cell:"st-table__cell",headerCell:"st-table__cell st-table__cell--header"},matrixdynamic:{mainRoot:"st-question st-row__question st-scrollable",root:"st-table st-matrixdynamic",cell:"st-table__cell",headerCell:"st-table__cell st-table__cell--header",button:"st-btn",detailRow:"st-table__row st-table__row--detail",detailButton:"st-table__cell--detail-button",detailButtonExpanded:"st-table__cell--detail-button--expanded",detailIcon:"st-detail-panel__icon",detailIconExpanded:"st-detail-panel__icon--expanded",detailPanelCell:"st-table__cell--detail-panel",actionsCell:"st-table__cell st-table__cell--actions",buttonAdd:"st-matrixdynamic__add-btn",buttonRemove:"st-matrixdynamic__remove-btn",iconAdd:"",iconRemove:""},rating:{root:"st-rating",item:"st-rating__item",itemHover:"st-rating__item--allowhover",selected:"st-rating__item--selected",minText:"st-rating__item-text st-rating__min-text",itemText:"st-rating__item-text",maxText:"st-rating__item-text st-rating__max-text",itemDisabled:"st-rating__item--disabled"},comment:{root:"st-comment",small:"st-row__question--small"},expression:"",file:{root:"st-file",other:"st-comment st-question__other",placeholderInput:"st-visuallyhidden",preview:"st-file__preview",fileSign:"st-hidden",fileSignBottom:"st-file__sign",fileDecorator:"st-file__decorator",fileInput:"st-visuallyhidden",noFileChosen:"st-description st-file__no-file-chosen",chooseFile:"st-btn st-file__choose-btn",disabled:"st-file__choose-btn--disabled",removeButton:"st-hidden",removeButtonBottom:"st-btn st-file__clean-btn",removeFile:"st-hidden",removeFileSvg:"st-file__remove-svg",wrapper:"st-file__wrapper"},signaturepad:{root:"st-signaturepad sjs_sp_container",small:"st-row__question--small",controls:"sjs_sp_controls",placeholder:"sjs_sp_placeholder",clearButton:"sjs_sp_clear"},saveData:{root:"",saving:"",error:"",success:"",saveAgainButton:""},window:{root:"sv_window",body:"sv_window_content",header:{root:"sv_window_title",title:"",button:"",buttonExpanded:"",buttonCollapsed:""}}};o(10);var pt=function(e){function t(t,o){var i=e.call(this)||this;return i.name=t,i.translation=o,i}return z(t,e),Object.defineProperty(t.prototype,"isGroup",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.fillLocales=function(e){},t.prototype.mergeLocaleWithDefault=function(e){},t.prototype.makeObservable=function(){this.fireOnObjCreating()},t.prototype.deleteLocaleStrings=function(e){},t.prototype.fireOnObjCreating=function(e){void 0===e&&(e=null),this.translation&&(e||(e=this),this.translation.fireOnObjCreating(e))},t}(r.Base),dt=function(e){function t(t,o){var i=e.call(this)||this;return i.locString=t,i.locale=o,i.text=i.locString.getLocaleText(i.locale),i}return z(t,e),t.prototype.onPropertyValueChanged=function(t,o,i){e.prototype.onPropertyValueChanged.call(this,t,o,i),"text"===t&&this.locString.setLocaleText(this.locale,i)},t.prototype.getType=function(){return"translationitemstring"},U([Object(r.property)()],t.prototype,"text",void 0),U([Object(r.property)()],t.prototype,"placeholder",void 0),t}(r.Base),ht=function(e){function t(t,o,i,n,r,a){void 0===i&&(i=""),void 0===a&&(a=null);var s=e.call(this,t,n)||this;s.name=t,s.locString=o,s.defaultValue=i,s.context=r,s.property=a,s.translation&&(s.readOnly=s.translation.readOnly),s.hashValues={};var l=s;return s.afterRender=function(e,t){l.translation&&l.translation.translateItemAfterRender(l,e,t.locale)},s.fireOnObjCreating(),s}return z(t,e),Object.defineProperty(t.prototype,"maxLength",{get:function(){return this.property?this.property.maxLength:-1},enumerable:!1,configurable:!0}),t.prototype.makeObservable=function(){for(var t in e.prototype.makeObservable.call(this),this.hashValues)this.fireOnObjCreating(this.hashValues[t])},t.prototype.getType=function(){return"translationitem"},Object.defineProperty(t.prototype,"text",{get:function(){return this.customText?this.customText:this.localizableName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"localizableName",{get:function(){var e=this.context&&this.context.getType&&this.context.getType();return H.getPropertyNameInEditor(e,this.name)},enumerable:!1,configurable:!0}),t.prototype.getLocText=function(e){return this.locString.getLocaleText(e)},t.prototype.setLocText=function(e,t){this.locString.setLocaleText(e,t),this.translation.tranlationChangedCallback&&this.translation.tranlationChangedCallback(e,this.name,t,this.context)},t.prototype.values=function(e){if(!this.hashValues[e]){var t=new dt(this.locString,e);e||(t.placeholder=this.defaultValue),this.hashValues[e]=t,this.fireOnObjCreating(t)}return this.hashValues[e]},t.prototype.fillLocales=function(e){for(var t=this.getKeys(),o=0;o<t.length;o++){var i=t[o];i&&e.indexOf(i)<0&&i!==r.LocalizableString.defaultLocale&&e.push(i)}},t.prototype.toJSON=function(){var e=this.locString.getJson();return(e=this.correctJSON(e))&&"string"!=typeof e?e:{default:e}},t.prototype.correctJSON=function(e){if(!e||"string"==typeof e)return e;if(Array.isArray(e))return e.join("\n");for(var t in e)Array.isArray(e[t])&&(e[t]=e[t].join("\n"));return e},t.prototype.getKeys=function(){return this.locString.getLocales()},t.prototype.mergeLocaleWithDefault=function(e){var t=this.locString.getLocaleText(e);t&&(this.locString.setLocaleText("",t),this.locString.setLocaleText(e,null))},t.prototype.deleteLocaleStrings=function(e){this.setLocText(e,"")},t.prototype.getPlaceholder=function(e){var t=H.getString("ed.translationPlaceHolder",e);return this.context instanceof r.SurveyModel?r.surveyLocalization.getString(this.name,e)||t:this.context instanceof r.PageModel||"title"!==this.name?"choices"===this.context.ownerPropertyName&&"itemvalue"===this.context.getType()&&(this.getPlaceholderText(e)||this.getItemValuePlaceholderText())||t:this.getPlaceholderText(e)||this.context.name},t.prototype.getTextForExport=function(e){var t=this.locString.getLocaleText(e);return t||(e.indexOf("-")<0?"":this.getPlaceholderText(e))},t.prototype.getPlaceholderText=function(e){if(!e||"default"===e)return"";var t=this.getRootDialect(e);return this.locString.getLocaleText(t)},t.prototype.getRootDialect=function(e){var t=e.indexOf("-");return t<0||(e=e.substring(0,t))===r.surveyLocalization.defaultLocale?"":e},t.prototype.getItemValuePlaceholderText=function(){var e=this.context.value;return r.Helpers.isValueEmpty(e)?"":e.toString()},U([Object(r.property)({defaultValue:!1})],t.prototype,"readOnly",void 0),t}(pt),gt=function(e){function t(t,o,i,n,r){void 0===i&&(i=null),void 0===n&&(n=""),void 0===r&&(r=!1);var a=e.call(this,t,i)||this;return a.name=t,a.obj=o,a.text=n,a.hasIndent=r,a.isRootValue=!1,a.removeLocale=function(e){a.translation&&a.translation.removeLocale(e)},a.text||(a.text=t),a.reset(),a.fireOnObjCreating(),a}return z(t,e),t.prototype.getType=function(){return"translationgroup"},Object.defineProperty(t.prototype,"items",{get:function(){return this.itemValues},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locItems",{get:function(){return this.itemValues.filter((function(e){return e instanceof ht}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRoot",{get:function(){return this.isRootValue},enumerable:!1,configurable:!0}),t.prototype.setAsRoot=function(){this.isRootValue=!0},t.prototype.getItemByName=function(e){for(var t=0;t<this.itemValues.length;t++)if(this.itemValues[t].name==e)return this.itemValues[t];return null},Object.defineProperty(t.prototype,"groups",{get:function(){return this.itemValues.filter((function(e){return e instanceof t}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isGroup",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locales",{get:function(){return this.translation?this.translation.locales:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"removeLocaleText",{get:function(){return H.getString("pe.remove")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"localeCount",{get:function(){return Array.isArray(this.locales)?this.locales.length:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locWidth",{get:function(){var e=this.localeCount;return e<2?"100%":Math.floor(100/e).toString()+"%"},enumerable:!1,configurable:!0}),t.prototype.getLocaleName=function(e){return this.translation?this.translation.getLocaleName(e):H.getLocaleName(e)},t.prototype.reset=function(){this.itemValues=[],this.fillItems()},t.prototype.fillLocales=function(e){for(var t=0;t<this.items.length;t++)this.items[t].fillLocales(e)},t.prototype.makeObservable=function(){e.prototype.makeObservable.call(this);for(var t=0;t<this.items.length;t++)this.items[t].makeObservable()},Object.defineProperty(t.prototype,"showAllStrings",{get:function(){return!this.translation||this.translation.showAllStrings},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasItems",{get:function(){if(this.locItems.length>0)return!0;for(var e=this.groups,t=0;t<e.length;t++)if(e[t].hasItems)return!0;return!1},enumerable:!1,configurable:!0}),t.prototype.mergeLocaleWithDefault=function(e){this.itemValues.forEach((function(t){return t.mergeLocaleWithDefault(e)}))},t.prototype.deleteLocaleStrings=function(e){this.items.forEach((function(t){return t.deleteLocaleStrings(e)}))},t.prototype.fillItems=function(){if(this.isItemValueArray(this.obj))this.createItemValuesLocale();else if(this.obj&&this.obj.getType){for(var e=this.getLocalizedProperties(this.obj),o=0;o<e.length;o++){var i=e[o],n=this.createTranslationItem(this.obj,e[o]);n&&this.itemValues.push(n)}e=this.getArrayProperties(this.obj);for(o=0;o<e.length;o++){i=e[o];var r=this.obj[i.name];if(this.isItemValueArray(r)){if(this.canShowProperty(i,Array.isArray(r)&&r.length>0)){var a=new t(i.name,r,this.translation,H.getPropertyName(i.name),!0);a.hasItems&&this.itemValues.push(a)}}else this.createGroups(r,i)}this.sortItems()}},t.prototype.sortItems=function(){a.translation.sortByName&&this.itemValues.sort((function(e,t){return e.name?t.name?e.name.localeCompare(t.name):1:-1}))},t.prototype.getLocalizedProperties=function(e){for(var t=[],o=r.Serializer.getPropertiesByObj(e),i=0;i<o.length;i++){var n=o[i];n.isSerializable&&n.isLocalizable&&(!n.readOnly&&n.visible&&t.push(n))}return t},t.prototype.getArrayProperties=function(e){for(var t=[],o=r.Serializer.getPropertiesByObj(e),i=0;i<o.length;i++){var n=o[i];if(!1!==n.isSerializable){var a=e[n.name];a&&Array.isArray(a)&&a.length>0&&t.push(n)}}return t},t.prototype.canShowProperty=function(e,t){return!(this.translation&&!this.translation.canShowProperty(this.obj,e,t))},t.prototype.createTranslationItem=function(e,t){var o=this.getDefaultValue(e,t),i=e[t.serializationProperty];return i&&(this.showAllStrings||o||!i.isEmpty)&&this.canShowProperty(t,i.isEmpty)?new ht(t.name,i,o,this.translation,e,t):null},t.prototype.getDefaultValue=function(e,t){if("title"==t.name&&t.isLocalizable&&t.serializationProperty){var o=e[t.serializationProperty];if(o&&"page"!=e.getType()&&(o.onGetTextCallback||o.onRenderedHtmlCallback))return e.name}return""},t.prototype.isItemValueArray=function(e){return!!e&&Array.isArray(e)&&e.length>0&&!!e[0]&&!!e[0].getType&&!!e[0].setData&&!!e[0].setLocText},t.prototype.createGroups=function(e,o){for(var i=0;i<e.length;i++){var n=e[i];if(n&&n.getType){var r=n.name,a=r;if(!r){var s="["+i.toString()+"]";r=o.name+s,a=H.getPropertyName(o.name)+s}var l=new t(r,n,this.translation,a);l.hasItems&&this.itemValues.push(l)}}},t.prototype.createItemValuesLocale=function(){for(var e=0;e<this.obj.length;e++){var t=this.obj[e];if(this.showAllStrings||!t.locText.isEmpty||isNaN(t.value)){var o=new ht(t.value,t.locText,t.value,this.translation,t);this.itemValues.push(o),this.addCustomPropertiesForItemValue(this.obj[e],o)}}},t.prototype.addCustomPropertiesForItemValue=function(e,t){for(var o=this.getLocalizedProperties(e),i=0;i<o.length;i++)if("text"!=o[i].name){var n=this.createTranslationItem(e,o[i]);n&&(n.customText=t.text+" ("+n.localizableName+")",n.name=e.value+"."+n.name,this.itemValues.push(n))}},U([Object(r.property)({defaultValue:!0})],t.prototype,"showHeader",void 0),t}(pt),mt=function(e){function t(t,o,i){void 0===o&&(o=null),void 0===i&&(i=!0);var n=e.call(this)||this;n.options=o,n.hasUI=i,n.chooseLanguageActions=[],n.options||(n.options=new s);var r=n;return n.exportToCSVFileUI=function(){r.exportToSCVFile(a.translation.exportFileName)},n.importFromCSVFileUI=function(e){e.files.length<1||(r.importFromCSVFile(e.files[0]),e.value="")},n.settingsSurveyValue=n.createSettingsSurvey(),n.surveyValue=t,n.setupToolbarItems(),n.updateChooseLanguageActions(),n}return z(t,e),t.prototype.getProcessedTranslationItemText=function(e,t,o,i){return this.options.getProcessedTranslationItemText(e,t,o,i)},t.prototype.getType=function(){return"translation"},t.prototype.makeObservable=function(e){this.onBaseObjCreatingCallback=e,this.fireOnObjCreating(this),this.root.makeObservable()},t.prototype.fireOnObjCreating=function(e){this.onBaseObjCreatingCallback&&this.onBaseObjCreatingCallback(e)},Object.defineProperty(t.prototype,"settingsSurvey",{get:function(){return this.settingsSurveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"localesQuestion",{get:function(){return this.settingsSurvey.getQuestionByName("locales")},enumerable:!1,configurable:!0}),t.prototype.deleteLocaleStrings=function(e){this.root||this.reset(),this.root&&this.root.deleteLocaleStrings(e)},t.prototype.createSettingsSurvey=function(){var e=this,t=this.getSettingsSurveyJSON();He(t);var o=this.options.createSurvey(t,"translation_settings");return o.css=se,o.css.root+=" st-properties",o.onValueChanged.add((function(t,o){"locales"==o.name&&e.updateLocales()})),o.onGetPanelTitleActions.add((function(t,o){"languages"==o.panel.name&&(o.titleActions=[e.addLanguageAction])})),o},t.prototype.calcIsChooseLanguageEnabled=function(){this.isChooseLanguageEnabled=this.chooseLanguageActions.filter((function(e){return e.visible})).length>0},t.prototype.updateLocales=function(){if(this.localesQuestion){var e=[""],t=this.localesQuestion.value;Array.isArray(t)||(t=[]);for(var o=0;o<t.length;o++)e.push(t[o]);this.locales=e,this.canMergeLocaleWithDefault=this.hasLocale(this.defaultLocale)}},t.prototype.getSettingsSurveyJSON=function(){var e=this.getLocaleName("");return{elements:[{type:"panel",name:"languages",elements:[{type:"checkbox",name:"defaultLanguage",titleLocation:"hidden",readOnly:!0,choices:[e],defaultValue:[e]},{type:"checkbox",name:"locales",choicesVisibleIf:"{selLocales} contains {item}",titleLocation:"hidden",maxSelectedChoices:a.translation.maximumSelectedLocales}],title:H.getString("ed.translationLanguages")}]}},t.prototype.getSurveyLocales=function(){for(var e=new Array,t=r.surveyLocalization.supportedLocales,o=Array.isArray(t)&&t.length>0?t:r.surveyLocalization.getLocales(),i={},n=0;n<o.length;n++)this.addLocaleIntoChoices(o[n],e,i);(o=this.settingsSurvey.getValue("selLocales"))||(o=[]);for(n=0;n<o.length;n++)this.addLocaleIntoChoices(o[n],e,i);return[e,o]},t.prototype.updateSettingsSurveyLocales=function(){var e=this.getSurveyLocales(),t=e[0],o=e[1];this.localesQuestion.choices=t;var i=[];o||(o=[]);for(var n=0;n<o.length;n++)this.localeInitialVisibleCallback&&!this.localeInitialVisibleCallback(o[n])||i.push(o[n]);var r=a.translation.maximumSelectedLocales;r>0&&i.length>r&&i.splice(r),this.localesQuestion.value=i},t.prototype.resetStringsSurvey=function(){this.hasUI&&(this.stringsSurvey=this.createStringsSurvey(),this.stringsHeaderSurvey=this.createStringsHeaderSurvey(),this.updateReadOnly())},t.prototype.createStringsSurvey=function(){var e=this,t={autoGrowComment:!0,allowResizeComment:!1};He(t,!1);var o=this.options.createSurvey(t,"translation_strings");o.lazyRendering=!0,o.skeletonComponentName="sd-translation-line-skeleton",o.startLoadingFromJson(),o.css=ct,o.addNewPage("page"),this.addTranslationGroupIntoStringsSurvey(o.pages[0],this.root,null),o.data=this.getStringsSurveyData(o),o.endLoadingFromJson();var i=function(e,t){var o=r.ItemValue.getItemByValue(e.rows,t);return o?o.translationData:null};return o.onMatrixCellCreated.add((function(t,o){if(o.cell.question instanceof r.QuestionCommentModel){var n=o.cell.question,a=i(o.question,o.row.name);e.setPlaceHolder(n,a,o.columnName);var s=!!a&&a.locString.getIsMultiple();n.acceptCarriageReturn=s,a&&(n.maxLength=a.maxLength),s||(n.rows=1)}})),o.onMatrixCellValueChanging.add((function(t,o){var n=i(o.question,o.row.name);n&&(o.value=e.getProcessedTranslationItemText(o.columnName,n.locString,o.value,n.context))})),o.onMatrixCellValueChanged.add((function(t,o){var n=i(o.question,o.row.name);if(n){n.setLocText(o.columnName,o.value);var r=o.columnName;o.row.cells.forEach((function(t){"default"!==r&&0!==t.column.name.indexOf(r+"-")||e.setPlaceHolder(t.question,n,t.column.name)}))}})),o.currentPage=o.pages[0],o},t.prototype.setPlaceHolder=function(e,t,o){e.placeholder=t.getPlaceholder(o)},t.prototype.createStringsHeaderSurvey=function(){var e={};He(e,!1);var t=this.options.createSurvey(e,"translation_strings_header");t.css=ct;var o=t.addNewPage("page"),i=r.Serializer.createClass("matrixdropdown");return i.name="stringsHeader",i.titleLocation="hidden",this.addLocaleColumns(i),o.addQuestion(i),t.currentPage=t.pages[0],t},t.prototype.addTranslationGroupIntoStringsSurvey=function(e,t,o){for(var i=0;i<t.items.length;i++)if(!t.items[i].isGroup){var n=t.items[i],a=r.Serializer.createClass("matrixdropdown");a.cellType="comment",a.titleLocation="hidden",a.name=this.getStringsSurveyQuestionName(t,o)+i,a.showHeader=!1,e.addQuestion(a),this.addLocaleColumns(a);var s=new r.ItemValue(n.name,n.text);s.translationData=n,a.rows.push(s)}for(i=0;i<t.items.length;i++)if(t.items[i].isGroup){n=t.items[i];var l=r.Serializer.createClass("panel");l.name=n.name,e.addElement(l),l.title=n.text,n.hasIndent&&(l.cssClasses.panel.content+=" st-panel-indent"),this.addTranslationGroupIntoStringsSurvey(l,n,t)}},t.prototype.addLocaleColumns=function(e){var t=this.getSelectedLocales();e.addColumn("default",this.getLocaleName(""));for(var o=0;o<t.length;o++)e.addColumn(t[o],this.getLocaleName(t[o]))},t.prototype.getStringsSurveyQuestionName=function(e,t){return null==t||e.obj.name==e.name?e.name+"_props":t.name+"_"+e.name},t.prototype.getStringsSurveyData=function(e){for(var t={},o=e.getAllQuestions(),i=0;i<o.length;i++)t[o[i].name]=this.getStringsQuestionData(o[i]);return t},t.prototype.getStringsQuestionData=function(e){for(var t={},o=0;o<e.rows.length;o++){var i=e.rows[o],n=i.translationData.toJSON();r.Helpers.isValueEmpty(n)||(t[i.value]=n)}return t},t.prototype.updateHeaderStringsSurveyColumns=function(){if(this.stringsHeaderSurvey){var e=this.stringsHeaderSurvey.getQuestionByName("stringsHeader");e.columns=[],this.addLocaleColumns(e)}},t.prototype.updateStringsSurveyColumns=function(){if(this.stringsSurvey)for(var e=this.stringsSurvey.getAllQuestions(),t=0;t<e.length;t++){var o=e[t];o.beginUpdate(),o.columns=[],this.addLocaleColumns(o),o.endUpdate()}},t.prototype.addLocaleIntoChoices=function(e,t,o){e&&!o[e]&&(o[e]=!0,t.push(new r.ItemValue(e,this.getLocaleName(e))))},t.prototype.addLocaleIntoValue=function(e,t){this.addLocaleIntoValueCore("selLocales",e),t&&this.addLocaleIntoValueCore("locales",e)},t.prototype.addLocaleIntoValueCore=function(e,t){if(t){var o=this.settingsSurvey.getValue(e);Array.isArray(o)||(o=[]),o.indexOf(t)<0&&("locales"!==e||o.length<a.translation.maximumSelectedLocales)&&(o.push(t),this.settingsSurvey.setValue(e,o))}},t.prototype.isLocaleVisible=function(e,t){return t!==r.surveyLocalization.defaultLocale&&e.indexOf(t)<0},t.prototype.setupToolbarItems=function(){var e=this;this.chooseLanguageActions=this.getSurveyLocales()[0].map((function(t){return new r.Action({id:t.value,title:e.getLocaleName(t.value),data:t})})),this.addLanguageAction=Object(r.createDropdownActionModel)({id:"svc-translation-choose-language",iconName:"icon-add",enabled:new r.ComputedUpdater((function(){return e.isChooseLanguageEnabled}))},{items:this.chooseLanguageActions,allowSelection:!1,onSelectionChanged:function(t){e.addLocale(t.id)}})},t.prototype.onPropertyValueChanged=function(t,o,i){e.prototype.onPropertyValueChanged.call(this,t,o,i),"canMergeLocaleWithDefault"===t&&(this.mergeLocaleWithDefaultText=this.getMergeLocaleWithDefaultText()),"locales"===t&&(this.updateHeaderStringsSurveyColumns(),this.updateStringsSurveyColumns())},t.prototype.getMergeLocaleWithDefaultText=function(){if(!this.canMergeLocaleWithDefault)return"";var e=this.getLocaleName(this.defaultLocale);return H.getString("ed.translationMergeLocaleWithDefault").format(e)},Object.defineProperty(t.prototype,"survey",{get:function(){return this.surveyValue},set:function(e){this.surveyValue=e,this.settingsSurvey.setValue("selLocales",[]),this.reset()},enumerable:!1,configurable:!0}),t.prototype.reset=function(e){void 0===e&&(e=!1);var t=this.filteredPage?this.filteredPage:this.survey,o=this.filteredPage?t.name:"survey";this.root=new gt(o,t,this),this.root.setAsRoot(),this.root.reset(),this.resetLocales(),this.isEmpty=!this.root.hasItems,this.updateSettingsSurveyLocales(),this.updateLocales(),this.resetStringsSurvey(),this.updateChooseLanguageActions()},t.prototype.updateReadOnly=function(){this.stringsSurvey&&(this.stringsSurvey.mode=this.readOnly?"display":"edit")},t.prototype.canShowProperty=function(e,t,o){var i=!o||re.isPropertyVisible(e,t,this.options);return this.translationStringVisibilityCallback?this.translationStringVisibilityCallback(e,t.name,i):i},Object.defineProperty(t.prototype,"defaultLocale",{get:function(){return r.surveyLocalization.defaultLocale},enumerable:!1,configurable:!0}),t.prototype.getLocaleName=function(e){return H.getLocaleName(e,this.defaultLocale)},t.prototype.removeLocale=function(e){if(this.hasLocale(e)){var t=this.locales.indexOf(e),o=this.locales;o.splice(t,1),this.locales=o,this.canMergeLocaleWithDefault=this.hasLocale(this.defaultLocale)}},t.prototype.hasLocale=function(e){for(var t=this.locales,o=0;o<t.length;o++)if(t[o]==e)return!0;return!1},t.prototype.addLocale=function(e){this.hasLocale(e)||this.addLocaleIntoValue(e,!0),this.updateChooseLanguageActions()},t.prototype.updateChooseLanguageActions=function(){var e=this,t=this.chooseLanguageActions,o=this.settingsSurvey.getValue("selLocales");o||(o=[]),Array.isArray(t)&&t.forEach((function(t){return t.visible=e.isLocaleVisible(o,t.data.value)})),this.calcIsChooseLanguageEnabled()},t.prototype.resetLocales=function(){var e=[""];this.root.fillLocales(e),this.setLocales(e)},t.prototype.getSelectedLocales=function(){var e=this.localesQuestion.value;return Array.isArray(e)?e:[]},t.prototype.setSelectedLocales=function(e){this.localesQuestion.value=e},Object.defineProperty(t.prototype,"noStringsText",{get:function(){return H.getString("ed.translationNoStrings")},enumerable:!1,configurable:!0}),t.prototype.exportToCSV=function(){this.root||this.reset();var e=[],o=[],i=this.locales;o.push("description ↓ - language →");for(var n=0;n<i.length;n++)o.push(i[n]?i[n]:"default");e.push(o);var r={};for(var s in this.fillItemsHash("",this.root,r),r){var l=[s],u=r[s];for(n=0;n<i.length;n++){var c=i[n],p=u.getTextForExport(c);p=p||0!=n?p:u.defaultValue,p=this.options.getTranslationExportedText(u.context,u.name,u.locString,c,p),l.push(p||0!=n?p:u.defaultValue)}e.push(l)}var d=a.translation.exportPrefix;return d||(d=""),d+Object(je.unparse)(e,{quoteChar:'"',escapeChar:'"',delimiter:t.csvDelimiter,header:!0,newline:t.newLineDelimiter,skipEmptyLines:!1,columns:null})},t.prototype.importFromNestedArray=function(e){var o=this,i=e.shift().slice(1);"default"===i[0]&&(i[0]="");var n=new t(this.survey,this.options,!1);n.showAllStrings=!0;var r={};this.fillItemsHash("",n.root,r),e.forEach((function(e){var t=e.shift().trim();if(t){var n=r[t];n&&o.updateItemWithStrings(t,n,e,i)}})),this.reset(),this.importFinishedCallback&&this.importFinishedCallback()},t.prototype.exportToSCVFile=function(e){if(window){var t=this.exportToCSV(),o=new Blob([t],{type:"text/csv"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveBlob(o,e);else{var i=window.document.createElement("a");i.href=window.URL.createObjectURL(o),i.download=e,document.body.appendChild(i),i.click(),document.body.removeChild(i)}}},t.prototype.importFromCSVFile=function(e){var t=this;Object(je.parse)(e,{complete:function(e,o){t.importFromNestedArray(e.data)}})},t.prototype.mergeLocaleWithDefault=function(){this.hasLocale(this.defaultLocale)&&(this.root.mergeLocaleWithDefault(this.defaultLocale),this.settingsSurveyValue.setValue("selLocales",[]),this.settingsSurveyValue.setValue("locales",[]),this.reset())},t.prototype.translateItemAfterRender=function(e,t,o){if(this.translateItemAfterRenderCallback){if(Array.isArray(t))for(var i=0;i<t.length;i++)if("TEXTAREA"==t[i].tagName){t=t[i];break}this.translateItemAfterRenderCallback(e,t,o)}},t.prototype.updateItemWithStrings=function(e,t,o,i){for(var n=0;n<o.length&&n<i.length;n++){var r=o[n].trim();r&&(this.importItemCallback&&(r=this.importItemCallback(e,i[n],r)),r&&(t.values(i[n]).text=r))}},t.prototype.fillItemsHash=function(e,t,o){var i=this,n=e?e+"."+t.name:t.name;t.locItems.forEach((function(e){o[n+"."+e.name]=e})),t.groups.forEach((function(e){return i.fillItemsHash(n,e,o)}))},t.prototype.setLocales=function(e){this.settingsSurvey.setValue("setLocales",[]),this.localesQuestion.value=[];for(var t=0;t<e.length;t++)this.addLocaleIntoValue(e[t],!1)},t.prototype.dispose=function(){this.isEmpty=!0,this.stringsSurvey&&(this.stringsSurvey.dispose(),this.stringsSurvey=void 0),this.stringsHeaderSurvey&&(this.stringsHeaderSurvey.dispose(),this.stringsHeaderSurvey=void 0),this.settingsSurveyValue&&(this.settingsSurveyValue.dispose(),this.settingsSurveyValue=void 0),this.importFinishedCallback=void 0,this.availableTranlationsChangedCallback=void 0,this.tranlationChangedCallback=void 0},t.csvDelimiter=",",t.newLineDelimiter="\n",U([Object(r.propertyArray)()],t.prototype,"locales",void 0),U([Object(r.property)()],t.prototype,"canMergeLocaleWithDefault",void 0),U([Object(r.property)()],t.prototype,"mergeLocaleWithDefaultText",void 0),U([Object(r.property)({defaultValue:!1,onSet:function(e,t){t.updateReadOnly()}})],t.prototype,"readOnly",void 0),U([Object(r.property)()],t.prototype,"root",void 0),U([Object(r.property)({defaultValue:!1,onSet:function(e,t){t.reset()}})],t.prototype,"showAllStrings",void 0),U([Object(r.property)({onSet:function(e,t){t.reset()}})],t.prototype,"filteredPage",void 0),U([Object(r.property)()],t.prototype,"stringsSurvey",void 0),U([Object(r.property)()],t.prototype,"stringsHeaderSurvey",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"isEmpty",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"isChooseLanguageEnabled",void 0),t}(r.Base),ft=function(){function e(e){this.creator=e,e.addPluginTab("translation",this),this.sidebarTab=this.creator.sidebar.addTab("translation"),this.sidebarTab.caption=H.getString("ed.translationPropertyGridTitle"),this.createActions().forEach((function(t){return e.toolbar.actions.push(t)}))}return e.prototype.activate=function(){var e=this;this.model=new mt(this.creator.survey,this.creator),this.model.readOnly=this.creator.readOnly,this.model.translationStringVisibilityCallback=function(t,o,i){var n={obj:t,propertyName:o,visible:i};return!e.creator.onTranslationStringVisibility.isEmpty&&e.creator.onTranslationStringVisibility.fire(e.creator,n),n.visible},this.model.localeInitialVisibleCallback=function(t){var o={locale:t,isSelected:!0};return e.creator.onTranslationLocaleInitiallySelected.fire(e.creator,o),o.isSelected},this.model.importItemCallback=function(t,o,i){var n={locale:o,name:t,text:i};return e.creator.onTranslationImportItem.fire(e.creator,n),n.text},this.model.importFinishedCallback=function(){e.creator.onTranslationImported.fire(e.creator,{})},this.sidebarTab.model=this.model.settingsSurvey,this.sidebarTab.componentName="survey-widget",this.creator.sidebar.activeTab=this.sidebarTab.id,this.mergeLocaleWithDefaultAction.title=this.createMergeLocaleWithDefaultActionTitleUpdater(),this.mergeLocaleWithDefaultAction.tooltip=this.createMergeLocaleWithDefaultActionTitleUpdater(),this.mergeLocaleWithDefaultAction.visible=this.model.canMergeLocaleWithDefault,this.filterPageAction.visible=this.creator.survey.pageCount>1,this.updateFilterPageAction(!0),this.filterStringsAction.visible=!0,this.updateFilterStrigsAction(!0),this.importCsvAction.visible=!0,this.exportCsvAction.visible=!0,this.filterPageAction.data.setItems([{id:null,title:this.showAllPagesText}].concat(this.creator.survey.pages.map((function(t){return{id:t.name,title:e.getPageDisplayText(t)}}))),!1),this.model.onPropertyChanged.add((function(t,o){"filteredPage"===o.name&&e.updateFilterPageAction(),"showAllStrings"===o.name&&e.updateFilterStrigsAction(),"canMergeLocaleWithDefault"===o.name&&(e.mergeLocaleWithDefaultAction.visible=e.model.canMergeLocaleWithDefault),"mergeLocaleWithDefaultText"===o.name&&(e.mergeLocaleWithDefaultAction.title=e.model.mergeLocaleWithDefaultText,e.mergeLocaleWithDefaultAction.tooltip=e.model.mergeLocaleWithDefaultText)})),this.model.reset()},e.prototype.update=function(){this.model&&(this.model.survey=this.creator.survey,this.model.filteredPage=null,this.updateFilterPageAction(!0))},e.prototype.deactivate=function(){return this.model&&this.model.dispose(),this.model=void 0,this.sidebarTab.visible=!1,this.filterStringsAction.visible=!1,this.filterPageAction.visible=!1,this.mergeLocaleWithDefaultAction.title=void 0,this.mergeLocaleWithDefaultAction.tooltip=void 0,this.mergeLocaleWithDefaultAction.visible=!1,this.importCsvAction.visible=!1,this.exportCsvAction.visible=!1,!0},e.prototype.createMergeLocaleWithDefaultActionTitleUpdater=function(){var e=this;return new r.ComputedUpdater((function(){var t=e.creator.locale;return t||(t="en"),H.getString("ed.translationMergeLocaleWithDefault").format(r.surveyLocalization.defaultLocale)}))},Object.defineProperty(e.prototype,"selectLanguageOptionsCaption",{get:function(){return H.getString("ed.translationAddLanguage")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showAllStringsText",{get:function(){return H.getString("ed.translationShowAllStrings")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showUsedStringsOnlyText",{get:function(){return H.getString("ed.translationShowUsedStringsOnly")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showAllPagesText",{get:function(){return H.getString("ed.translationShowAllPages")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"exportToCSVText",{get:function(){return H.getString("ed.translationExportToSCVButton")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"importFromCSVText",{get:function(){return H.getString("ed.translationImportFromSCVButton")},enumerable:!1,configurable:!0}),e.prototype.createActions=function(){var e=this,t=[];return this.createFilterPageAction(),t.push(this.filterPageAction),this.createFilterStringsAction(),t.push(this.filterStringsAction),this.mergeLocaleWithDefaultAction=new r.Action({id:"svd-translation-merge_locale_withdefault",visible:!1,component:"sv-action-bar-item",mode:"small",needSeparator:!0,action:function(){e.model.mergeLocaleWithDefault()}}),t.push(this.mergeLocaleWithDefaultAction),this.importCsvAction=new r.Action({id:"svc-translation-import",iconName:"icon-load",locTitleName:"ed.translationImportFromSCVButton",locTooltipName:"ed.translationImportFromSCVButton",visible:!1,mode:"small",component:"sv-action-bar-item",needSeparator:!0,action:function(){document&&(e.inputFileElement||(e.inputFileElement=document.createElement("input"),e.inputFileElement.type="file",e.inputFileElement.style.display="none",e.inputFileElement.onchange=function(){e.model.importFromCSVFileUI(e.inputFileElement)}),e.inputFileElement.click())}}),t.push(this.importCsvAction),this.exportCsvAction=new r.Action({id:"svc-translation-export",iconName:"icon-download",locTitleName:"ed.translationExportToSCVButton",locTooltipName:"ed.translationExportToSCVButton",visible:!1,mode:"small",component:"sv-action-bar-item",action:function(){e.model.exportToCSVFileUI()}}),t.push(this.exportCsvAction),t},e.prototype.createFilterPageAction=function(){var e=this;this.filterPageAction=Object(r.createDropdownActionModel)({id:"svc-translation-filter-page",title:this.getFilterPageActionTitle(),visible:!1,mode:"small"},{items:[{id:null,title:this.showAllPagesText}],allowSelection:!0,onSelectionChanged:function(t){e.model.filteredPage=t.id?e.creator.survey.getPageByName(t.id):null},horizontalPosition:"center"})},e.prototype.createFilterStringsAction=function(){var e=this;this.filterStringsAction=Object(r.createDropdownActionModel)({id:"svc-translation-show-all-strings",title:this.getFilterStringsActionTitle(),visible:!1,mode:"small"},{items:[{id:"show-all-strings",title:this.showAllStringsText},{id:"show-used-strings-only",title:this.showUsedStringsOnlyText}],allowSelection:!0,onSelectionChanged:function(t){e.model.showAllStrings="show-all-strings"===t.id},horizontalPosition:"center"})},e.prototype.updateFilterStrigsAction=function(e){void 0===e&&(e=!1);var t=this.getFilterStringsActionTitle();if(this.filterStringsAction.title=t,e){this.filterStringsAction.needSeparator=this.filterPageAction.visible;var o=this.filterStringsAction.data;o.selectedItem=o.actions.filter((function(e){return e.title===t}))[0]}},e.prototype.updateFilterPageAction=function(e){if(void 0===e&&(e=!1),this.filterPageAction.title=this.getFilterPageActionTitle(),e){var t=this.filterPageAction.data,o=this.model.filteredPage?this.model.filteredPage.name:null;t.selectedItem=t.actions.filter((function(e){return e.id===o}))[0]}},e.prototype.getFilterPageActionTitle=function(){return this.model&&this.model.filteredPage&&this.getPageDisplayText(this.model.filteredPage)||this.showAllPagesText},e.prototype.getFilterStringsActionTitle=function(){return this.model&&!this.model.showAllStrings?this.showUsedStringsOnlyText:this.showAllStringsText},e.prototype.getPageDisplayText=function(e){return this.creator.getObjectDisplayName(e,"translation-tab","survey-translation",e.title)},e}(),yt={root:"",container:"",header:"",body:"sl-body",bodyEmpty:"",footer:"",title:"",description:"",logo:"",logoImage:"",headerText:"",navigationButton:"",completedPage:"",navigation:{complete:"",prev:"",next:"",start:"",preview:"",edit:""},panel:{title:"",titleExpandable:"",titleOnExpand:"",titleOnError:"",description:"",container:"sl-panel",content:"",icon:"",iconExpanded:"",footer:"sl-panel__footer",requiredText:"sl-panel__required-text"},paneldynamic:{mainRoot:"",root:"",navigation:"",title:"",button:"",buttonRemove:"",buttonAdd:"svc-logic-operator sl-paneldynamic__add-btn",progressTop:"",progressBottom:"",buttonPrev:"",buttonNext:"",progressContainer:"",progress:"",progressBar:"",progressText:"",separator:"sv-hidden",panelWrapper:"",panelWrapperInRow:"sl-panel-wrapper--in-row"},progress:"",progressBar:"",progressText:"",progressTextInBar:"",page:{root:"",title:"",description:""},pageTitle:"",pageDescription:"",row:"sl-row",rowMultiple:"sl-row--multiple",question:{mainRoot:"sl-question",flowRoot:"",asCell:"",header:"sl-question__header",headerLeft:"sl-question__header--left",headerTop:"",headerBottom:"",content:"",contentLeft:"",titleLeftRoot:"",titleOnAnswer:"",titleOnError:"",title:"sl-question__title",requiredText:"sl-question__required-text",number:"",description:"",descriptionUnderInput:"",comment:"",required:"",titleRequired:"",indent:0,footer:"",formGroup:"",hasError:"",disabled:""},image:{root:""},error:{root:"",icon:"",item:"",locationTop:"",locationBottom:""},checkbox:{root:"",item:"",itemSelectAll:"",itemNone:"",itemDisabled:"",itemChecked:"",itemHover:"",itemInline:"",label:"",labelChecked:"",itemControl:"",itemDecorator:"",controlLabel:"",materialDecorator:"",other:"",column:""},radiogroup:{root:"",item:"",itemInline:"",label:"",labelChecked:"",itemDisabled:"",itemChecked:"",itemHover:"",itemControl:"",itemDecorator:"",controlLabel:"",materialDecorator:"",other:"",clearButton:"",column:""},boolean:{mainRoot:"",root:"",item:"",control:"",itemChecked:"",itemIndeterminate:"",itemDisabled:"",label:"",switch:"",disabledLabel:"",itemDecorator:"",materialDecorator:"",sliderText:"",slider:""},text:{root:"",small:"",controlDisabled:"",onError:""},multipletext:{root:"",item:"",itemTitle:"",row:"",cell:""},dropdown:{root:"",popup:"",small:"",control:"sl-dropdown",selectWrapper:"",other:"",onError:"",label:"",item:"",itemDisabled:"",itemChecked:"",itemHover:"",itemControl:"",itemDecorator:"",controlDisabled:"",controlLabel:"",materialDecorator:"",controlValue:"sl-dropdown__value",chevronButton:"",chevronButtonSvg:"",chevronButtonIconId:""},imagepicker:{root:"",item:"",itemInline:"",itemChecked:"",itemDisabled:"",itemHover:"",label:"",itemControl:"",image:"",itemText:"",clearButton:"",other:""},matrix:{mainRoot:"",tableWrapper:"",root:"",row:"",rowAdditional:"",rowError:"",cell:"",headerCell:"",label:"",itemValue:"",itemChecked:"",itemDisabled:"",itemHover:"",materialDecorator:"",itemDecorator:"",cellText:"",cellTextSelected:"",cellTextDisabled:""},matrixdropdown:{tableWrapper:"",mainRoot:"",root:"",row:"",rowAdditional:"",cell:"",headerCell:""},matrixdynamic:{tableWrapper:"",mainRoot:"sl-question st-row__question st-scrollable",root:"sl-table st-matrixdynamic",row:"sl-table__row",rowAdditional:"sl-table__row--additional",cell:"sl-table__cell",headerCell:"sl-table__cell st-table__cell--header",button:"sl-btn",detailRow:"sl-table__row st-table__row--detail",detailButton:"sl-table__cell--detail-button",detailButtonExpanded:"sl-table__cell--detail-button--expanded",detailIcon:"sl-detail-panel__icon",detailIconExpanded:"sl-detail-panel__icon--expanded",detailPanelCell:"sl-table__cell--detail-panel",actionsCell:"sl-table__cell sl-table__cell--actions st-table__cell--actions",buttonAdd:"sl-matrixdynamic__add-btn",buttonRemove:"sl-matrixdynamic__remove-btn",iconAdd:"",iconRemove:""},rating:{root:"",item:"",itemHover:"",selected:"",minText:"",itemText:"",maxText:"",itemDisabled:""},comment:{mainRoot:"",root:"spg-input spg-comment sl-comment",small:""},expression:"",file:{root:"",other:"",placeholderInput:"",preview:"",fileSign:"",fileSignBottom:"",fileDecorator:"",fileInput:"",noFileChosen:"",chooseFile:"",disabled:"",removeButton:"",removeButtonBottom:"",removeFile:"",removeFileSvg:"",wrapper:""},signaturepad:{root:"",small:"",controls:"",placeholder:"",clearButton:""},saveData:{root:"",saving:"",error:"",success:"",saveAgainButton:""},window:{root:"",body:"",header:{root:"",title:"",button:"",buttonExpanded:"",buttonCollapsed:""}},embeddedsurvey:{mainRoot:"sl-embedded-survey"},actionBar:r.defaultActionBarCss},vt=function(){this.conjunction="and",this.operator=a.logic.defaultOperators.default},bt=function(e){function t(t){var o=e.call(this)||this;return o.survey=t,o}return z(t,e),t.prototype.getOperatorText=function(){var e=this.operator;return"equal"==e?"=":"notequal"==e?"<>":"greater"==e?">":"less"==e?"<":"greaterorequal"==e?">=":"lessorequal"==e?"<=":e},t.prototype.getValueText=function(){var e=this.value;if(!e)return e;if(!Array.isArray(e))return this.valToText(e);for(var t="[",o=0;o<e.length;o++)t+=this.valToText(e[o]),o<e.length-1&&(t+=", ");return t+="]"},Object.defineProperty(t.prototype,"isValueRequired",{get:function(){return"empty"!==this.operator&&"notempty"!==this.operator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isReady",{get:function(){return!(!this.questionName||this.isValueRequired&&r.Helpers.isValueEmpty(this.value))},enumerable:!1,configurable:!0}),t.prototype.toExpression=function(){var e=E(this.getQuestionValueByName())+" "+this.getOperatorText();return this.isValueRequired&&(e+=" "+this.getValueText()),e},t.prototype.getQuestionValueByName=function(){var e=this.survey.getQuestionByName(this.questionName);return e&&e.name!=e.getValueName()&&this.questionName!=e.getValueName()?this.questionName.replace(e.name,e.getValueName()):this.questionName},t.prototype.valToText=function(e){return"true"==e||"false"==e||this.isNumeric(e)?e:"["==e[0]?e.replace(/(?!^)(['])(?!$)/g,"\\$1"):(this.isQuote(e[0])||(e="'"+e),this.isQuote(e[e.length-1])||(e+="'"),e.replace(/(?!^)(['"])(?!$)/g,"\\$1"))},t.prototype.isNumeric=function(e){return!("string"==typeof e&&e.length>1&&"0"===e[0]&&"x"!==e[1])&&!isNaN(e)},t.prototype.isQuote=function(e){return"'"==e||'"'==e},t}(vt),wt=function(){function e(e){void 0===e&&(e=null),this.hasValue=e}return e.prototype.build=function(e){if(!e)return[];var t;return(t=(new r.ConditionsParser).parseExpression(e))?this.buildEditorItems(t):[]},e.prototype.buildEditorItems=function(e){var t=[];return this.buildEditorItemsCore(e,t,"")||(t=[]),t},e.prototype.buildEditorItemsCore=function(e,t,o){if("unary"==e.getType())return this.buildEditorItemsAddUnaryOperand(e,t);if("binary"!==e.getType())return!1;var i=e;return!(i.isArithmetic&&!i.isConjunction)&&(i.isConjunction?this.buildEditorItemsAddConjunction(i,t,o):this.buildEditorItemsAddBinaryOperand(i,t))},e.prototype.buildEditorItemsAddConjunction=function(e,t,o){var i=e.conjunction;if("or"==i&&o&&o!=i)return!1;if(!this.buildEditorItemsCore(e.leftOperand,t,i))return!1;var n=t.length;return!!this.buildEditorItemsCore(e.rightOperand,t,i)&&(t[n].conjunction=e.conjunction,!0)},e.prototype.buildEditorItemsAddBinaryOperand=function(e,t){var o=this.getOperandByType(e,"variable"),i=this.getArrayValueFromOperand(e),n=i?null:this.getOperandByType(e,"const");if(!o||!n&&!i&&this.canShowValueByOperator(e.operator))return!1;if(!this.isVariableInSurvey(o.variable))return!1;var r=new vt;return r.questionName=o.variable,r.operator=e.leftOperand!==o?this.getOppositeOperator(e.operator):e.operator,i&&(r.value=i),n&&(r.value=n.correctValue),t.push(r),!0},e.prototype.isVariableInSurvey=function(e){return!this.hasValue||this.hasValue(e)},e.prototype.getArrayValueFromOperand=function(e){var t=this.getOperandByType(e,"array");if(!t||!t.values)return null;var o=t.values;if(!Array.isArray(o)||0==o.length)return null;for(var i=[],n=0;n<o.length;n++){var r=o[n];if(r){if("const"!=r.getType())return null;i.push(r.correctValue)}}return 0==i.length?null:i},e.prototype.buildEditorItemsAddUnaryOperand=function(e,t){var o=e.operator;if("empty"!==o&&"notempty"!=o)return!1;var i=e.expression;if(null==i||"variable"!=i.getType())return!1;var n=i.variable;if(!this.isVariableInSurvey(n))return!1;var r=new vt;return r.questionName=n,r.operator=o,t.push(r),!0},e.prototype.getOppositeOperator=function(e){return"less"==e?"greater":"greater"==e?"less":"lessorequal"==e?"greaterorequal":"greaterorequal"==e?"lessorequal":e},e.prototype.getOperandByType=function(e,t){return e.rightOperand?e.leftOperand.getType()!==t&&e.rightOperand.getType()!==t||e.leftOperand.getType()==t&&e.rightOperand.getType()==t?null:e.leftOperand.getType()==t?e.leftOperand:e.rightOperand:null},e.prototype.canShowValueByOperator=function(e){return"empty"!=e&&"notempty"!=e},e}();r.FunctionFactory.Instance.register("questionValueVisibleIf",(function(e){return 2===e.length&&(!(!e[0]||!e[1])&&("empty"!==e[1]&&"notempty"!==e[1]))}));var Ct=function(e){function t(t,o,i,n){void 0===o&&(o=null),void 0===i&&(i=null),void 0===n&&(n="");var r=e.call(this,i)||this;return r.propertyName=n,r.addConditionQuestionsHash={},r.isModalValue=!0,r.isSettingPanelValues=!1,r.calculatedValueQuestion=null,r.surveyValue=t,r.objectValue=o,r.panelValue=r.editSurvey.getQuestionByName("panel"),r.textEditorValue=r.editSurvey.getQuestionByName("textEditor"),r.options.maxLogicItemsInCondition&&(r.panel.maxPanelCount=r.options.maxLogicItemsInCondition),r.allConditionQuestions=r.createAllConditionQuestions(),r.editSurvey.onValueChanged.add((function(e,t){r.onValueChanged(t)})),r.editSurvey.onDynamicPanelAdded.add((function(e,t){r.onPanelAdded()})),r.editSurvey.onDynamicPanelRemoved.add((function(e,t){0==t.question.panelCount&&t.question.addPanel(),r.panel.panelCount>0&&(r.panel.panels[0].getQuestionByName("questionName").titleLocation="left")})),r.editSurvey.onDynamicPanelItemValueChanged.add((function(e,t){r.onPanelValueChanged(t.panel,t.name)})),r.editSurvey.css=yt,r.editSurvey.onUpdateQuestionCssClasses.add((function(e,t){r.onUpdateQuestionCssClasses(t)})),r.text=r.object&&r.propertyName?r.object[r.propertyName]:"",r.updatePlaceholderVisibileIf(),r}return z(t,e),t.canParseExpression=function(e){return!e||!!(new r.ConditionsParser).parseExpression(e)},t.canBuildExpression=function(e){return!e||!!t.canParseExpression(e)&&(new wt).build(e).length>0},t.isOperatorEnabled=function(e,o){if(!e)return!0;if(!o||0==o.length)return!0;for(var i=[],n=[],r=0;r<o.length;r++){var a=o[r];"!"==a[0]?n.push(a.substring(1)):i.push(a)}return t.isClassContains(e,i,n)},t.isClassContains=function(e,t,o){for(var i=r.Serializer.findClass(e);i;){if(t.indexOf(i.name)>-1)return!0;if(o.indexOf(i.name)>-1)return!1;i=i.parentName?r.Serializer.findClass(i.parentName):null}return 0==t.length},Object.defineProperty(t.prototype,"title",{get:function(){return this.panel.title},set:function(e){this.panel.title=e,this.textEditor.title=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isModal",{get:function(){return this.isModalValue},set:function(e){e!==this.isModalValue&&(this.isModalValue=e,this.updatePlaceholderVisibileIf())},enumerable:!1,configurable:!0}),t.prototype.updatePlaceholderVisibileIf=function(){if(this.panel){var e="";this.isModal&&(e="{panel.questionName} empty and {panelIndex} == 0"),this.panel.template.getQuestionByName("placeholder").visibleIf=e}},t.prototype.getSurveyJSON=function(){return{elements:[{type:"paneldynamic",titleLocation:"hidden",name:"panel",panelRemoveButtonLocation:"right",panelAddText:H.getString("pe.addCondition"),minPanelCount:1,maxPanelCount:1,startWithNewLine:!1,templateElements:[{name:"conjunction",type:"dropdown",renderAs:"logicoperator",titleLocation:"hidden",showOptionsCaption:!1,visibleIf:"{panelIndex} > 0",choices:[{value:"and",text:H.getString("pe.and")},{value:"or",text:H.getString("pe.or")}]},{name:"questionName",type:"dropdown",renderAs:"logicoperator",title:H.getString("pe.if"),titleLocation:"left",showOptionsCaption:!1,startWithNewLine:!1,isRequired:!0},{name:"operator",type:"dropdown",renderAs:"logicoperator",searchEnabled:!1,titleLocation:"hidden",startWithNewLine:!1,showOptionsCaption:!1,isRequired:!0,enableIf:"{panel.questionName} notempty"},{name:"removeAction",type:"linkvalue",titleLocation:"hidden",showOptionsCaption:!1,visible:!1,startWithNewLine:!1,showValueInLink:!1,allowClear:!1,showClear:!1},{name:"questionValue",type:"text",visible:!1},{name:"placeholder",type:"html",visible:!1,html:"<div class='svc-logic-placeholder'><span class=\"svc-logic-placeholder__text\">"+H.getString("pe.emptyLogicPopupMessage")+"<span></div>"}]},{type:"comment",titleLocation:"hidden",name:"textEditor",textUpdateMode:"onTyping",placeholder:H.getString("pe.emptyExpressionPlaceHolder"),visible:!1}]}},t.prototype.getSurveyCreationReason=function(){return"condition-builder"},Object.defineProperty(t.prototype,"text",{get:function(){return this.getText()},set:function(e){this.isModal||t.canBuildExpression(e)?(this.textEditor.value=e,this.showBuilder(e)):(this.panel.panelCount=0,this.showTextEditor(e))},enumerable:!1,configurable:!0}),t.prototype.isModified=function(e){if(this.textEditor.visible)return e!=this.text;var t=this.getEditorItems(),o=e?(new r.ConditionsParser).parseExpression(e):null;if(!o)return!(1==t.length&&!t[0].questionName);if(!this.isReady)return!0;var i=(new r.ConditionsParser).parseExpression(this.text);return!o.isEqual(i)},Object.defineProperty(t.prototype,"context",{get:function(){return this.contextValue},set:function(e){e!==this.context&&(this.contextValue=e,this.updateNamesOnContextChanged(),this.onContextChanged&&this.onContextChanged(e))},enumerable:!1,configurable:!0}),t.prototype.processText=function(e){this.panel.panelCount=0;var t=(new wt).build(e);this.buildPanels(t)},Object.defineProperty(t.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"object",{get:function(){return this.objectValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panel",{get:function(){return this.panelValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textEditor",{get:function(){return this.textEditorValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isReady",{get:function(){if(this.textEditor.visible)return t.canParseExpression(this.textEditor.value);for(var e=0;e<this.panel.panels.length;e++)if(!this.createEditorItemFromPanel(this.panel.panels[e]).isReady)return!1;return!0},enumerable:!1,configurable:!0}),t.prototype.isEmpty=function(){return 0===this.panel.panels.length||!(this.panel.panels.length>1)&&!this.createEditorItemFromPanel(this.panel.panels[0]).questionName},t.prototype.hasErrorInUI=function(){var e=this.survey.creator;return!this.isReady&&(this.hasErrors(),this.errorText=Ee("expressionInvalid"),e&&e.notify(this.errorText,"error"),!0)},t.prototype.apply=function(){return!this.hasErrorInUI()&&(this.object&&this.propertyName?(this.object[this.propertyName]=this.text,!0):void 0)},t.prototype.setIsFastEntry=function(e){e?this.showTextEditor(this.text):this.panel.visible||this.showBuilder(this.text)},t.prototype.buildPanels=function(e){this.panel.panelCount=e.length;for(var t=0;t<e.length;t++)this.setItemToPanel(e[t],this.panel.panels[t]);0==this.panel.panelCount&&this.panel.addPanel()},t.prototype.setupConditionOperator=function(e,o){var i=this,n=o.getQuestionByName("operator");n.choices=this.getOperators(),n.value=e.operator,n.onOpened.add((function(e,n){var r=o.getQuestionByName("questionName").value,s=i.getQuestionConditionJson(r),l=s?s.type:null;n.choices.forEach((function(e,o){var i=t.isOperatorEnabled(l,a.operators[e.value]);e.setIsEnabled(i),e.setIsVisible(i)}))}))},t.prototype.setupConditionQuestionName=function(e,t){var o=t.getQuestionByName("questionName");o.choices=this.getConditionQuestions(),o.titleLocation=0==this.panel.panels.indexOf(t)?"left":"hidden";var i=this.getQuestionNameToPanel(e.questionName);this.getConditionQuestion(i)&&(o.value=i)},t.prototype.setupRemoveQuestion=function(e){var t=e.getQuestionByName("removeAction").parentQuestion,o=e.getQuestionByName("removeAction");o.linkClickCallback=function(){t&&t.removePanelUI(e)},o.linkSetButtonCssClasses="svc-logic-condition-remove svc-icon-remove",o.linkValueText=""},t.prototype.setItemToPanel=function(e,t){this.isSettingPanelValues=!0,t.getQuestionByName("conjunction").value=e.conjunction,this.setupConditionOperator(e,t),this.setupConditionQuestionName(e,t),t.getQuestionByName("questionValue")&&(t.getQuestionByName("questionValue").value=e.value),this.setupRemoveQuestion(t),this.isSettingPanelValues=!1},t.prototype.getConditionQuestions=function(){if(!this.context)return this.allConditionQuestions;for(var e=[],t=0;t<this.allConditionQuestions.length;t++){var o=this.allConditionQuestions[t];o.context&&o.context!==this.context||e.push(o)}return e},t.prototype.getText=function(){if(this.textEditor.visible)return this.textEditor.value;for(var e="",t=this.getEditorItems(),o=0;o<t.length&&t[o].isReady;o++)e&&(e+=" "+t[o].conjunction+" "),e+=t[o].toExpression();return e},t.prototype.getEditorItems=function(){for(var e=[],t=0;t<this.panel.panels.length;t++)e.push(this.createEditorItemFromPanel(this.panel.panels[t]));return e},t.prototype.createEditorItemFromPanel=function(e){var t=new bt(this.survey);return t.conjunction=e.getQuestionByName("conjunction").value,t.questionName=this.getQuestionNameFromPanel(e.getQuestionByName("questionName").value),t.operator=e.getQuestionByName("operator").value,e.getQuestionByName("questionValue")&&(t.value=e.getQuestionByName("questionValue").value),t},t.prototype.getQuestionNameFromPanel=function(e){if(!this.context||!e)return e;var t=this.context.getValueName()+".";return e.replace(t,"")},t.prototype.getContextIndexInfo=function(e,t){return void 0===t&&(t=""),re.getQuestionContextIndexInfo(e,t)},t.prototype.getQuestionNameToPanel=function(e){if(!this.context||!e)return e;var t=this.getContextIndexInfo(e);return t&&0===t.index?this.context.getValueName()+"."+e:e},t.prototype.getContextFromPanels=function(){if(this.object)return null;for(var e=0;e<this.panel.panels.length;e++){var t=this.panel.panels[e].getQuestionByName("questionName").value,o=this.getContextByQuestionName(t);if(o)return o}return null},t.prototype.updateNamesOnContextChanged=function(){for(var e=0;e<this.panel.panels.length;e++)this.panel.panels[e].getQuestionByName("questionName").choices=this.getConditionQuestions()},t.prototype.getContextByQuestionName=function(e){if(!e)return null;var t=this.getContextIndexInfo(e,".");return t?(e=e.substring(0,t.index),this.survey.getQuestionByValueName(e)):null},t.prototype.createAllConditionQuestions=function(){if(!this.survey)return[];var e=[],t=this.survey.getAllQuestions(),o=this.getContextObject(),i="acs";if(t.length>0){for(var n=0;n<t.length;n++){if(o!=(a=t[n])){var r=o||(!this.context||this.context===a);a.addConditionObjectsByContext(e,r)}}i=this.options.onConditionQuestionsGetListCallback(this.propertyName,this.object,this,e);for(n=0;n<e.length;n++){e[n].value=e[n].name;var a=e[n].question?e[n].question:e[n];if(!this.options.showTitlesInExpressions){var s=e[n].name,l=a.valueName;l&&0==s.indexOf(l)&&(s=s.replace(l,a.name)),e[n].text=this.options.getObjectDisplayName(a,"condition-editor","condition",s)}this.addConditionQuestionsHash[e[n].name]=a}}var u=this.survey.getVariableNames();return this.addSurveyCalculatedValues(u),this.addValuesIntoConditionQuestions(u,e),"asc"===i&&re.sortItems(e),e},t.prototype.getContextObject=function(){if(this.object&&this.object.isDescendantOf("itemvalue")){var e=this.object.locOwner;if(e&&e.getType)return e.locOwner&&e.locOwner.isDescendantOf("matrixdropdowncolumn")?e.locOwner:e}return this.object},t.prototype.addValuesIntoConditionQuestions=function(e,t){for(var o=0;o<e.length;o++){var i=e[o].name?e[o].name:e[o];this.addConditionQuestionsHash[i]=this.getCalculatedValueQuestion(),t.push({value:i,text:i,question:this.getCalculatedValueQuestion()})}},t.prototype.addSurveyCalculatedValues=function(e){this.survey.calculatedValues.forEach((function(t){e.indexOf(t.name)<0&&e.push(t.name)}))},t.prototype.getCalculatedValueQuestion=function(){return this.calculatedValueQuestion||(this.calculatedValueQuestion=r.Serializer.createClass("text"),this.calculatedValueQuestion.name="question"),this.calculatedValueQuestion},t.prototype.getOperators=function(){var e=[],t=a.operators;for(var o in t)e.push(new r.ItemValue(o,H.getString("op."+o)));return e},t.prototype.rebuildQuestionValue=function(e){e.getQuestionByName("questionValue")&&e.getQuestionByName("questionValue").clearValue();var t=this.getQuestionConditionJson(e.getQuestionByName("questionName").value,e.getQuestionByName("operator").value);t||(t={type:"text"}),t.isRequired=!0,re.updateQuestionJson(t),t.enableIf="{panel.questionName} notempty and {panel.operator} != 'empty' and {panel.operator} != 'notempty'";var o=r.Serializer.createClass(t.type);delete t.type,(new r.JsonObject).toObject(t,o),o||(o=r.Serializer.createClass("text",t));var i=e.getQuestionByName("questionValue");if(i&&e.removeElement(i),this.canShowQuestionValue(e)){var n=o.title;o.name="questionValue",o.visibleIf="questionValueVisibleIf({panel.questionName}, {panel.operator})",o.title=n,o.description="",o.titleLocation="top",o.hasComment=!1,e.addElement(o)}},t.prototype.rebuildQuestionValueOnOperandChanging=function(e){var t=this.getQuestionConditionJson(e.getQuestionByName("questionName").value,e.getQuestionByName("operator").value),o=e.getQuestionByName("questionValue");!o||!o.isReadOnly&&o.isVisible||o.clearValue(),!o||t&&t.type==o.getType()||this.rebuildQuestionValue(e)},t.prototype.canShowQuestionValue=function(e){var t=e.getQuestionByName("operator");if(!t)return!1;this.updateOperatorEnables(e);for(var o=t.choices,i=0;i<o.length;i++)if(o[i].isEnabled){var n=o[i].value;if("empty"!==n&&"notempty"!=n)return!0}return!1},t.prototype.getConditionQuestion=function(e){return this.addConditionQuestionsHash[e]},t.prototype.getQuestionConditionJson=function(e,o){var i="",n=this.getConditionQuestion(e);if(!n)return null;o||(o=this.getDefaultOperatorByQuestion(n)),0==e.indexOf(n.getValueName())&&(i=e.substring(n.getValueName().length));var r=this.getContextIndexInfo(e);r&&0==r.index&&(i=e.substring(r.name.length)),i||(i=e),i&&"."==i[0]&&(i=i.substring(1));var a=n&&n.getConditionJson?n.getConditionJson(o,i):null;return a?(a.choicesFromQuestion&&this.updateChoicesFromQuestion(a),"expression"==a.type&&(a.type="text"),"anyof"==o&&(t.isClassContains(a.type,["checkbox"],[])||(a.type="checkbox")),a):null},t.prototype.updateChoicesFromQuestion=function(e){var t=this.getConditionQuestion(e.choicesFromQuestion);if(t){delete e.choicesFromQuestion;var o=t.toJSON();o.choices&&(e.choices=o.choices),o.choicesByUrl&&(e.choicesByUrl=o.choicesByUrl)}},t.prototype.updateOperatorEnables=function(e){var o=e.getQuestionByName("questionName");if(o){var i=this.getQuestionConditionJson(o.value),n=i?i.type:null,r=e.getQuestionByName("operator");if(r){for(var s=r.choices,l=!0,u=r.value,c=0;c<s.length;c++){var p=t.isOperatorEnabled(n,a.operators[s[c].value]);s[c].setIsEnabled(p),s[c].setIsVisible(p),s[c].value==u&&(l=s[c].isEnabled)}l||(r.value=this.getFirstEnabledOperator(s))}}},t.prototype.updateQuestionsWidth=function(e){var t=e.getQuestionByName("questionValue"),o=e.getQuestionByName("conjunction"),i=e.getQuestionByName("questionName"),n=e.getQuestionByName("operator"),r=!!t&&!t.startWithNewLine,a=!o||!o.isVisible;a||(o.minWidth="50px",o.width="15%"),i.minWidth="50px",i.width=a?"40%":"25%",n.minWidth="50px",n.width=r?"25%":"60%",t&&(t.minWidth="50px",t.width=r?"35%":"")},Object.defineProperty(t.prototype,"defaultOperator",{get:function(){return a.logic.defaultOperators.default},enumerable:!1,configurable:!0}),t.prototype.getDefaultOperatorByQuestionName=function(e){return this.getDefaultOperatorByQuestion(this.getConditionQuestion(e))},t.prototype.getDefaultOperatorByQuestion=function(e){if(e){var t=a.logic.defaultOperators;if(t[e.getType()])return t[e.getType()]}return this.defaultOperator},t.prototype.getFirstEnabledOperator=function(e){for(var t=0;t<e.length;t++)if(e[t].isEnabled)return e[t].value;return this.defaultOperator},t.prototype.onPanelAdded=function(){this.setItemToPanel(new vt,this.panel.panels[this.panel.panels.length-1])},t.prototype.onPanelValueChanged=function(e,t){"questionName"==t&&(this.context=this.getContextFromPanels(),this.rebuildQuestionValue(e),this.isSettingPanelValues||(e.getQuestionByName("operator").value=this.getDefaultOperatorByQuestionName(e.getQuestionByName("questionName").value))),"operator"==t&&this.rebuildQuestionValueOnOperandChanging(e),this.updateOperatorEnables(e),this.updateQuestionsWidth(e)},t.prototype.onUpdateQuestionCssClasses=function(e){var t=e.cssClasses,o=e.question;t.answered="svc-logic-question--answered","conjunction"===o.name&&(o.allowRootStyle=!1,t.control+=" svc-logic-operator svc-logic-operator--conjunction "),"questionName"===o.name&&(o.allowRootStyle=!1,t.control+=" svc-logic-operator svc-logic-operator--question",t.error.root="svc-logic-operator__error",t.onError="svc-logic-operator--error"),"operator"===o.name&&(o.allowRootStyle=!1,t.control+=" svc-logic-operator svc-logic-operator--operator"),"removeAction"===o.name&&(o.allowRootStyle=!1,t.mainRoot+=" svc-logic-condition-remove-question"),("questionValue"===o.name||o.isContentElement)&&(P(t,o.getType()),t.mainRoot+=" svc-logic-question-value sd-element--with-frame",t.error.root="svc-logic-operator__error"),"panel"===o.name&&(t.root+=" svc-logic-paneldynamic",t.buttonAdd+=" svc-logic-operator--operator",t.iconRemove="svc-icon-remove",t.buttonRemove="svc-logic-paneldynamic__button svc-logic-paneldynamic__remove-btn",t.buttonRemoveRight="svc-logic-paneldynamic__remove-btn--right",t.buttonRemoveText="svc-logic-paneldynamic__button-remove-text")},t.prototype.onValueChanged=function(e){if("panel"===e.question.name&&e.value.length>0){var t=this.options.maxLogicItemsInCondition>0?this.options.maxLogicItemsInCondition:100;e.question.maxPanelCount=1!==e.value.length||e.value[0].questionName?t:1,this.panel.panels.forEach((function(t){t.getQuestionByName("removeAction").visible=1!==e.value.length}))}this.setTitle()},t.prototype.setTitle=function(){var e=this.isReady?this.text:"";this.title=this.options.onConditionGetTitleCallback(e,e||H.getString("pe.ruleIsNotSet"))},t.prototype.showTextEditor=function(e){this.panel.visible=!1,this.textEditor.value=e,this.textEditor.visible=!0},t.prototype.showBuilder=function(e){(this.isModal||this.getCanShowBuilder(e))&&(this.textEditor.visible=!1,this.processText(e),this.panel.visible=!0)},t.prototype.getCanShowBuilder=function(e){return t.canBuildExpression(e)},t}(Qe),xt=function(){function e(e,t,o){this.panel=e,this.initialLogicAction=t,this.logicType=o}return e.createActionModel=function(e,t,o,i){return o&&o.hasSelectorChoices?new Tt(e,t,o,i):new St(e,t,o)},e.prototype.updateCurrentLogicAction=function(e){return!1},e.prototype.afterUpdateInitialLogicAction=function(){},e.prototype.resetElements=function(){},e.prototype.getSelectedElement=function(){return null},e.prototype.updateInitialLogicAction=function(){this.initialLogicAction=this.currentLogicAction,this.afterUpdateInitialLogicAction&&this.afterUpdateInitialLogicAction()},e.prototype.setInitialElementValue=function(e,t,o){o&&0!==e.choices.filter((function(e){return e.value===o})).length?e.value=o:e.value=t&&t.logicType==this.logicType?t.elementName:void 0},e}(),Tt=function(e){function t(t,o,i,n){var r=e.call(this,t,o,i)||this;return r.selectorElementsHash=n,r}return z(t,e),t.prototype.getSelectorOptionsText=function(e){var t=e.baseClass,o="page"==t?"pe.conditionSelectPage":"panel"==t?"pe.conditionSelectPanel":"pe.conditionSelectQuestion";return H.getString(o)},t.prototype.getElementBySelectorName=function(e){var t=e.getQuestionByName("elementSelector").value;return t?this.selectorElementsHash[t]:null},t.prototype.updateCurrentLogicAction=function(e){var t=this.getElementBySelectorName(this.panel);return(!this.initialLogicAction||this.initialLogicAction.logicType!=this.logicType||!!t&&this.initialLogicAction.element!=t)&&(this.currentLogicAction=new Ve(this.logicType,t,e),!0)},t.prototype.resetElements=function(){this.panel.getQuestionByName("elementSelector").visible=!1},t.prototype.updatePanelElements=function(e,t){var o=this.panel.getQuestionByName("elementSelector");o.visible=!0,o.choices=t,o.allowClear=!1,o.optionsCaption=this.getSelectorOptionsText(this.logicType),this.setInitialElementValue(o,this.initialLogicAction,e)},t.prototype.getSelectedElement=function(){return this.panel.getQuestionByName("elementSelector").value},t}(xt),St=function(e){function t(t,o,i){var n=e.call(this,t,o,i)||this;return n.isTrigger=!0,n}return z(t,e),t.prototype.recreateQuestion=function(e,t,o,i){var n=o?e.getQuestionByName(o):null;if(n){var a=e.getElementByName("triggerEditorPanel"),s=r.Serializer.createClass("panel");new Ge(t,i).setupObjPanel(s,!0,"logic");var l=s.getQuestionByName(o);if(l){var u=a.elements.indexOf(n);a.addElement(l,u),n.delete()}"setValue"===l.name&&this.updateSetValueQuestion(l),this.updateVisibilityPanel(a),s.dispose()}},t.prototype.updateSetValueQuestion=function(e){var t=e.obj,o=t.getSurvey();if(o||(o=t.owner),t.setToName&&o){var i=o.getQuestionByValueName(t.setToName);e.title=i.title,e.titleLocation="top"}},t.prototype.updateRunExpressionQuestion=function(e){e.titleLocation="hidden",e.placeholder=H.getString("pe.emptyExpressionPlaceHolder")},t.prototype.createElementPanelObj=function(){var e=this.initialLogicAction,t=e&&e.logicType==this.logicType?e.element:null,o=this.logicType.createNewObj(t);return this.setPanelObj(o),o},t.prototype.getQuestions=function(){var e=this,t=this.panel.getElementByName("triggerQuestionsPanel");return 0!==t.elements.length&&this.logicType.questionNames?t.elements.filter((function(t){return-1!==e.logicType.questionNames.indexOf(t.name)})):null},t.prototype.resetPanel=function(e){var t=this.panel.getElementByName(e);t.questions.forEach((function(e){e.clearValue()})),t.elements.splice(0,t.elements.length),t.visible=!1},t.prototype.updateVisibilityPanel=function(e){e.elements.length>0?e.visible=e.elements.filter((function(e){return e.visible})).length>0:e.visible=!1},t.prototype.updatePanelQuestionsValue=function(e){var t=this;e.onSurveyLoad(),e.questions.forEach((function(e){r.Helpers.isValueEmpty(t.panelObj[e.getValueName()])||(e.value=t.panelObj[e.getValueName()])}))},t.prototype.afterUpdateInitialLogicAction=function(){this.setPanelObj(this.initialLogicAction.element),this.panelObj&&this.logicType.saveNewElement(this.panelObj)},t.prototype.updateCurrentLogicAction=function(e){if(!(!this.initialLogicAction||this.initialLogicAction.logicType!=this.logicType)){for(var t=this.initialLogicAction.element,o=this.panelObj.toJSON(),i=Object.keys(o),n=Object.keys(t.toJSON()),r=[],a=0;a<n.length;a++){var s=n[a];i.indexOf(s)<0&&r.push(s)}t.fromJSON(o),this.currentLogicAction=this.initialLogicAction;for(a=0;a<r.length;a++)t[r[a]]=void 0;return!1}return this.currentLogicAction=new Ve(this.logicType,this.panelObj,e),!0},t.prototype.updatePanel=function(e,t,o,i){this.panelObj&&(this.panelObj[e]=t,this.logicType&&this.logicType.dependedOnPropertyName===e&&this.recreateQuestion(this.panel,this.panelObj,this.logicType.dynamicPropertyName,o),this.panel.runCondition(i.getAllValues(),{survey:i}))},t.prototype.setPanelObj=function(e){var t=this,o=this.panelObj;o&&(o.onPropertyValueChangedCallback=void 0),this.panelObj=e,e&&(e.onPropertyValueChangedCallback=function(e,i,n,r,a){if(t.panel&&!t.panel.isDisposed){var s=t.panel.getQuestionByName(e);s&&(s.value=n)}else o.onPropertyValueChangedCallback=void 0})},t.prototype.resetElements=function(){this.setPanelObj(null),this.resetPanel("triggerQuestionsPanel"),this.resetPanel("triggerEditorPanel")},t.prototype.updatePanelElements=function(e,t){var o=this,i=this.panel.getElementByName("triggerEditorPanel"),n=this.panel.getElementByName("triggerQuestionsPanel"),r=this.createElementPanelObj();new Ge(r,t).setupObjPanel(i,!0,"logic"),i.title="";var a=i.getQuestionByName("runExpression");(a&&this.updateRunExpressionQuestion(a),this.logicType.questionNames)&&i.elements.filter((function(e){return-1!==o.logicType.questionNames.indexOf(e.name)})).forEach((function(e){var t=e;"dropdown"===t.getType()&&(t.allowClear=!1,t.renderAs="logicoperator"),n.addQuestion(t)}));i.getElementByName(this.logicType.propertyName).visible=!1,this.updateVisibilityPanel(n),this.updatePanelQuestionsValue(n),this.updateVisibilityPanel(i),this.updatePanelQuestionsValue(i);var s=this.getQuestions();s&&e&&s.forEach((function(t){o.setInitialElementValue(t,o.initialLogicAction,e),e=null}))},t.prototype.getSelectedElement=function(){var e=this.getQuestions();if(e){var t=e[0];return!!t&&t.value}},t}(xt);r.FunctionFactory.Instance.register("logicTypeVisibleIf",(function(e){if(!this.question||!this.question.parentQuestion||1!=e.length)return!0;var t=this.question.parentQuestion.panels;if(t.length<2)return!0;for(var o=0;o<t.length;o++){var i=t[o].getQuestionByName("logicTypeName");if(i!=this.question&&i.value==e[0])return!1}return!0}));var Pt=function(e){function t(t,o){void 0===o&&(o=null);var i=e.call(this,o)||this;return i.options=o,i.initialSelectedElements={},i.isModifiedValue=!1,i.selectorElementsHash={},i.options||(i.options=new s),i.editSurvey.onDynamicPanelItemValueChanged.add((function(e,t){"logicTypeName"==t.name&&i.onLogicTypeChanged(t.panel);var o=i.getActionModelByPanel(t.panel);o.isTrigger&&o.updatePanel(t.name,t.value,i.options,i.editSurvey)})),i.editSurvey.onDynamicPanelRemoved.add((function(e,t){if(!i.isBuildingPanels){var o=i.getActionModelByPanel(t.panel);o&&o.initialLogicAction&&i.editableItem.removeAction(o.initialLogicAction),0==i.panel.panelCount&&i.panel.addPanel(),i.panel.panelCount>0&&(i.panels[0].getQuestionByName("logicTypeName").title=H.getString("pe.then"))}})),i.editSurvey.onDynamicPanelAdded.add((function(e,t){if(!i.isBuildingPanels){var o=i.panels[i.panel.panelCount-1];i.onPanelAdded(o,null)}})),i.editSurvey.css=yt,i.editSurvey.onUpdateQuestionCssClasses.add((function(e,t){i.onUpdateQuestionCssClasses(t)})),i.editSurvey.onUpdatePanelCssClasses.add((function(e,t){i.onUpdatePanelCssClasses(t)})),i.editSurvey.onQuestionAdded.add((function(e,t){i.onQuestionAdded(t)})),i.editSurvey.onGetQuestionTitleActions.add((function(e,t){i.onGetQuestionTitleActions(t)})),i.editSurvey.onValueChanged.add((function(e,t){i.onValueChanged(t)})),i.setEditableItem(t),i}return z(t,e),Object.defineProperty(t.prototype,"editableItem",{get:function(){return this.editableItemValue},enumerable:!1,configurable:!0}),t.prototype.setEditableItem=function(e){this.editableItemValue=e,this.buildInitialSelectedElements(),this.buildPanels(),this.resetModified()},Object.defineProperty(t.prototype,"survey",{get:function(){return this.editableItem.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isModified",{get:function(){return this.isModifiedValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panel",{get:function(){return this.editSurvey.getQuestionByName("panel")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panels",{get:function(){return this.panel.panels},enumerable:!1,configurable:!0}),t.prototype.getActionModelByPanel=function(e){return e.actionModel},t.prototype.setActionModelByPanel=function(e,t){e.actionModel=t},Object.defineProperty(t.prototype,"context",{get:function(){return this.contextValue},set:function(e){e!==this.context&&(this.contextValue=e,this.updatePanelsOnContextChanged())},enumerable:!1,configurable:!0}),t.prototype.getLogicTypeByPanel=function(e){return this.getLogicTypeByName(e.getQuestionByName("logicTypeName").value)},t.prototype.getSurveyJSON=function(){return{clearInvisibleValues:"onHidden",elements:[{type:"paneldynamic",name:"panel",title:Ee("actionsEditorTitle"),titleLocation:"hidden",panelAddText:Ee("addNewAction"),panelRemoveButtonLocation:"right",panelCount:0,minPanelCount:1,maxPanelCount:1,templateElements:[{name:"logicTypeName",type:"dropdown",renderAs:"logicoperator",searchEnabled:!1,allowClear:!1,title:H.getString("pe.then"),titleLocation:"left",isRequired:!0,optionsCaption:Ee("selectedActionCaption"),requiredErrorText:this.getLocString("pe.conditionActionEmpty")},{name:"logicTypeDescription",type:"html",startWithNewLine:!1,visible:!1},{name:"elementSelector",type:"dropdown",renderAs:"logicoperator",allowClear:!1,titleLocation:"hidden",isRequired:!0,startWithNewLine:!1,visible:!1},{name:"triggerQuestionsPanel",type:"panel",startWithNewLine:!1,visible:!1},{name:"removeAction",type:"linkvalue",titleLocation:"hidden",showOptionsCaption:!1,visible:!1,startWithNewLine:!1,showValueInLink:!1,allowClear:!1,showClear:!1},{name:"triggerEditorPanel",type:"panel",visible:!1}]}]}},t.prototype.getSurveyCreationReason=function(){return"logic-item-editor"},t.prototype.resetModified=function(){this.isModifiedValue=!1},t.prototype.isEmpty=function(){return 0===this.panels.length||!(this.panels.length>1)&&!this.getActionModelByPanel(this.panels[0])},t.prototype.apply=function(){if(this.editSurvey.hasErrors())return!1;for(var e=0;e<this.panels.length;e++)this.applyPanel(this.panels[e]);return this.resetModified(),!0},t.prototype.getEditingActions=function(){var e=this;return this.panels.map((function(t){var o=e.getActionModelByPanel(t);return o.updateCurrentLogicAction(e.survey),o.currentLogicAction||o.initialLogicAction})).filter((function(e){return!!e}))},t.prototype.onUpdateQuestionCssClasses=function(e){var t=e.cssClasses,o=e.question;t.answered="svc-logic-question--answered","logicTypeName"===o.name&&(o.allowRootStyle=!1,t.control+=" svc-logic-operator svc-logic-operator--action",t.error.root="svc-logic-operator__error",t.onError="svc-logic-operator--error"),"elementSelector"!==o.name&&"setToName"!==o.name&&"fromName"!==o.name&&"gotoName"!==o.name||(o.allowRootStyle=!1,t.control+=" svc-logic-operator svc-logic-operator--question",t.error.root="svc-logic-operator__error",t.onError="svc-logic-operator--error"),"setToName"!==o.name&&"fromName"!==o.name||(o.allowRootStyle=!1,o.titleLocation="left",o.startWithNewLine=!1,t.error.root="svc-logic-operator__error",t.onError="svc-logic-operator--error"),("setValue"===o.name||o.isContentElement)&&(P(t,o.getType()),t.mainRoot+=" svc-logic-question-value sd-element--with-frame"),"removeAction"===o.name&&(o.allowRootStyle=!1,t.mainRoot+=" svc-logic-condition-remove-question"),"panel"===o.name&&(t.root+=" svc-logic-paneldynamic",t.buttonAdd+=" svc-logic-operator--action ",t.iconRemove="svc-icon-remove",t.buttonRemove="svc-logic-paneldynamic__button svc-logic-paneldynamic__remove-btn",t.buttonRemoveRight="svc-logic-paneldynamic__remove-btn--right",t.buttonRemoveText="svc-logic-paneldynamic__button-remove-text")},t.prototype.onUpdatePanelCssClasses=function(e){"triggerEditorPanel"===e.panel.name&&(e.cssClasses.panel.container+=" svc-logic_trigger-editor"),"triggerQuestionsPanel"===e.panel.name&&(e.panel.allowRootStyle=!1,e.cssClasses.panel.container+=" svc-logic_trigger-questions")},t.prototype.onValueChanged=function(e){this.isModifiedValue=!0,e.question.maxPanelCount=1!==e.value.length||e.value[0].logicTypeName?100:1,this.panels.forEach((function(t){t.getQuestionByName("removeAction").visible=1!==e.value.length}))},t.prototype.onQuestionAdded=function(e){"setToName"!==e.question.name&&"fromName"!==e.question.name||(e.question.titleLocation="left",e.question.startWithNewLine=!1)},t.prototype.onGetQuestionTitleActions=function(e){"setValue"===e.question.name&&(e.titleActions=[])},t.prototype.applyPanel=function(e){var t=this.getActionModelByPanel(e);t.updateCurrentLogicAction(this.survey)&&(this.editableItem.replaceAction(t.currentLogicAction,t.initialLogicAction),t.updateInitialLogicAction())},t.prototype.buildInitialSelectedElements=function(){if(this.initialSelectedElements={},this.editableItem)for(var e=0;e<this.editableItem.actions.length;e++){var t=this.editableItem.actions[e];if(this.isElementSelectorVisible(t.logicType)){var o=t.logicTypeName;this.initialSelectedElements[o]||(this.initialSelectedElements[o]=[]),this.initialSelectedElements[o].push(t.element)}}},t.prototype.buildPanels=function(){if(this.panel.panelCount=0,this.editableItem){this.logicTypeChoices=this.getLogicTypeChoices();for(var e=0;e<this.editableItem.actions.length;e++)this.onPanelAdded(this.panel.addPanel(),this.editableItem.actions[e]);0==this.panel.panelCount&&this.onPanelAdded(this.panel.addPanel(),null)}},t.prototype.onPanelAdded=function(e,t){var o=e.getQuestionByName("logicTypeName");if(o.title=this.panel.panelCount>1?H.getString("pe.and"):H.getString("pe.then"),o.choices=this.logicTypeChoices,o.allowClear=!1,t){var i=xt.createActionModel(e,t,this.getLogicTypeByName(t.logicTypeName),this.selectorElementsHash);this.setActionModelByPanel(e,i),o.value=t.logicTypeName}var n=e.getQuestionByName("removeAction"),r=n.parentQuestion;return n.linkClickCallback=function(){r&&r.removePanelUI(e)},n.linkSetButtonCssClasses="svc-logic-condition-remove svc-icon-remove",n.linkValueText="",e},t.prototype.updatePanelsOnContextChanged=function(){if(this.logicTypeChoices=this.getLogicTypeChoices(),this.context)for(var e=this.panels.length-1;e>=0;e--){var t=this.panels[e];this.isPanelSupportContext(t)||(0===e&&1===this.panels.length?t.getQuestionByName("logicTypeName").clearValue():this.panel.removePanel(e))}for(e=0;e<this.panels.length;e++)this.updateSelectorOnContextChanged(this.panels[e])},t.prototype.isPanelSupportContext=function(e){var t=this.getLogicTypeByPanel(e);return!!t&&t.supportContext(this.context)},t.prototype.updateSelectorOnContextChanged=function(e){var t=e.getQuestionByName("logicTypeName");t.choices=this.logicTypeChoices,t.allowClear=!1;var o=this.getLogicTypeByPanel(e);if(this.isElementSelectorVisible(o)){var i=e.getQuestionByName("elementSelector");i.choices=this.getSelectorChoices(o),i.allowClear=!1}},t.prototype.getLogicTypeChoices=function(){for(var e=[],t=this.editableItem.getVisibleLogicTypes(),o=0;o<t.length;o++){var i=t[o];if(!this.context||i.supportContext(this.context)){var n=new r.ItemValue(i.name,i.displayName);i.isUniqueItem&&(n.visibleIf="logicTypeVisibleIf({item})"),e.push(n)}}return e},t.prototype.onLogicTypeChanged=function(e){var t=this.getLogicTypeByPanel(e);e.getQuestionByName("logicTypeDescription").html=t?t.description:"";var o,i=this.getActionModelByPanel(e);if(i&&(o=i.getSelectedElement(),i.resetElements()),t){var n=xt.createActionModel(e,i?i.initialLogicAction:null,t,this.selectorElementsHash);this.setActionModelByPanel(e,n),n.isTrigger?n.updatePanelElements(o,this.options):n.updatePanelElements(o,this.getSelectorChoices(n.logicType))}},t.prototype.getLogicTypeByName=function(e){if(!e)return null;for(var t=this.editableItem.getVisibleLogicTypes(),o=0;o<t.length;o++)if(t[o].name==e)return t[o];return null},t.prototype.isElementSelectorVisible=function(e){return!!e&&e.hasSelectorChoices},t.prototype.getLocString=function(e){return H.getString(e)},t.prototype.getElementText=function(e,t){var o="";return t&&(o=e.locTitle.renderedHtml),o||(o=e.name),e.isQuestion&&(o=this.options.getObjectDisplayName(e,"logic-tab:question-selector","condition",o)),o},t.prototype.getSelectorChoices=function(e){if(!e.hasSelectorChoices)return[];for(var t=e.getSelectorChoices(this.survey,this.context),o=[],i=this.options.showTitlesInExpressions,n=0;n<t.length;n++){var a="",s="",l=t[n],u=e.getParentElement(l);u&&(a=u.name+".",s=this.getElementText(u,i)+".");var c=this.getElementText(l,i),p=a+l.name,d=new r.ItemValue(p,s+c);this.selectorElementsHash[p]=l,l[e.propertyName]&&!this.isElementInInitialSelection(e.name,l)&&(d.enableIf="1=2",d.visibleIf="1=2"),o.push(d)}return re.sortItems(o),o},t.prototype.isElementInInitialSelection=function(e,t){return!!this.initialSelectedElements[e]&&this.initialSelectedElements[e].indexOf(t)>-1},t}(Qe);function Et(e,t){if(!Array.isArray(e))return null;for(var o=0;o<e.length;o++)if(e[o].id===t)return e[o];return null}function Ot(e,t,o){var i=Et(t,"remove-row");i&&(i.component="sv-action-bar-item",i.iconName="icon-delete",i.innerCss="spg-action-button spg-action-button--danger",i.title=e.removeRowText,i.showTitle=!1,i.visibleIndex=10,i.action=function(){e.removeRowUI(o)})}o(11);var It=function(e){function t(t,o){void 0===o&&(o=null);var i=e.call(this,t,o)||this;return i.survey=t,i.options=o,i.itemUIHash={},i.options||(i.options=new s),i.setupToolbarItems(),i.update(),i}return z(t,e),t.prototype.update=function(t,o){var i=this;void 0===t&&(t=null),void 0===o&&(o=null),e.prototype.update.call(this,t,o);var n=this.options.createSurvey(this.getLogicItemSurveyJSON(),"logic-items");n.css=yt,this.itemsSurveyValue=n,this.itemsSurvey.onMatrixRowRemoving.add((function(e,t){var o=i.visibleItems[t.rowIndex];t.allow=i.canRemoveItem(o)})),this.itemsSurvey.onMatrixRowRemoved.add((function(e,t){var o=i.visibleItems[t.rowIndex],n=o===i.editableItem;i.removeItem(o,!1),n&&(i.mode="view",i.updateNewActionState()),i.expressionEditorCanShowBuilder=!!i.editableItem})),this.itemsSurvey.onGetMatrixRowActions.add((function(e,t){!function(e,t,o){var i=Et(t,"show-detail");if(i){i.component="sv-action-bar-item",i.iconName="icon-logic-expand",i.innerCss="sl-table__action-button sl-table__detail-button",i.iconSize=48,i.showTitle=!1,i.action=function(){o.showHideDetailPanelClick()};var n=function(){i.iconName=o.isDetailPanelShowing?"icon-logic-collapse":"icon-logic-expand"};e.registerFunctionOnPropertyValueChanged("isRowShowing"+o.id,n),n()}}(t.question,t.actions,t.row),function(e,t,o){Ot(e,t,o);var i=Et(t,"remove-row");i&&(i.css="sl-table__action-button sl-table__remove-button")}(t.question,t.actions,t.row)})),this.updateItemsSurveyData(),this.onReadOnlyChanged()},t.prototype.dispose=function(){for(var t in e.prototype.dispose.call(this),this.itemUIHash){var o=this.itemUIHash[t];o.expressionEditor.dispose(),o.itemEditor.dispose()}this.itemUIHash={}},t.prototype.addNewUI=function(){0!=this.items.length&&this.items[this.items.length-1].isNew||this.addNew();var e=this.matrixItems.visibleRows;e[e.length-1].showDetailPanel()},t.prototype.toggleExpressionEditorIsFastEntry=function(){this.expressionEditorIsFastEntry=!this.expressionEditorIsFastEntry,this.expressionEditor&&this.expressionEditor.setIsFastEntry(this.expressionEditorIsFastEntry)},t.prototype.updateEditableItemIsModifiedState=function(){this.editableItem&&(this.editableItem.isModified=!!this.itemEditor&&!!this.expressionEditor&&(this.itemEditor.isModified||this.expressionEditor.isModified(this.editableItem.expression)))},t.prototype.getUnsavedItems=function(){for(var e=[],t=0;t<this.visibleItems.length;t++){var o=this.visibleItems[t],i=this.findLogicItemUI(o);i&&(o.isNew?i.expressionEditor.isEmpty()&&i.itemEditor.isEmpty()||e.push(o):o.isModified&&e.push(o))}return e},t.prototype.getErroredItem=function(e){for(var t=0;t<e.length;t++){var o=e[t];if(this.isErroredItem(o))return o}return null},t.prototype.isErroredItem=function(e){var t=this.findLogicItemUI(e);return!!t&&(t.expressionEditor.hasErrors()||t.itemEditor.hasErrors())},t.prototype.showErroredItem=function(e){var t=this.visibleItems.indexOf(e),o=this.matrixItems.visibleRows,i=t>-1&&t<o.length?o[t]:null;i&&(o.forEach((function(e){return e.hideDetailPanel()})),this.mode="view",i.showDetailPanel(),this.hasErrorInUI())},t.prototype.saveItem=function(e){this.isErroredItem(e)||(this.options&&this.options.startUndoRedoTransaction(),this.doItemApply(e),this.options&&this.options.stopUndoRedoTransaction())},t.prototype.tryLeaveUI=function(e){var t=this;this.updateEditableItemIsModifiedState();var o=this.getUnsavedItems();if(0===o.length)return e&&e(!0),!0;var i=this.getErroredItem(o),n=function(){o.forEach((function(e){return t.saveItem(e)})),e&&e(!0)};if(!i)return n(),!0;var r=function(){t.showErroredItem(i),e&&e(!1)};return this.confirmLeavingOnError(n,r)?void 0:(r(),!1)},t.prototype.confirmLeavingOnError=function(e,t){if(!r.settings.showModal)return!1;var o=new r.LocalizableString(void 0);o.text=this.getLocString("ed.lg.uncompletedRule_text");var i=r.settings.showModal("sv-string-viewer",{locStr:o,locString:o,model:o},(function(){return e(),!0}),(function(){return t(),!0}),void 0,this.getLocString("ed.lg.uncompletedRule_title"),"popup"),n=i.footerToolbar,a=n.getActionById("apply");return n.getActionById("cancel").title=this.getLocString("ed.lg.uncompletedRule_cancel"),a.title=this.getLocString("ed.lg.uncompletedRule_apply"),a.innerCss+=" svc-logic-tab__leave-apply-button",i.width="800px",!0},t.prototype.onPropertyValueChanged=function(t,o,i){e.prototype.onPropertyValueChanged.call(this,t,o,i),"items"===t&&this.updateItemsSurveyData()},t.prototype.onReadOnlyChanged=function(){var e=this;this.itemsSurvey&&(this.itemsSurvey.mode=this.readOnly?"display":"edit",Object.keys(this.itemUIHash||{}).forEach((function(t){e.updateEditModeLogicItem(e.itemUIHash[t])})))},Object.defineProperty(t.prototype,"expressionEditor",{get:function(){return this.expressionEditorValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemEditor",{get:function(){return this.itemEditorValue},enumerable:!1,configurable:!0}),t.prototype.getExpressionEditor=function(e){return this.getLogicItemUI(e).expressionEditor},t.prototype.getLogicItemEditor=function(e){return this.getLogicItemUI(e).itemEditor},t.prototype.updateEditModeLogicItem=function(e){e&&(e.expressionEditor.editSurvey.mode=this.readOnly?"display":"edit",e.itemEditor.editSurvey.mode=this.readOnly?"display":"edit")},t.prototype.getLogicItemUI=function(e){var t=this.findLogicItemUI(e);if(!t){var o=e.getContext();t={expressionEditor:this.createExpressionPropertyEditor(),itemEditor:new Pt(e,this.options)},this.updateEditModeLogicItem(t),t.expressionEditor.context=o,t.itemEditor.context=o,t.expressionEditor.text=e.expression,t.expressionEditor.onContextChanged=function(e){t.itemEditor.context=e},this.itemUIHash[e.id]=t}return t},t.prototype.findLogicItemUI=function(e){return this.itemUIHash[e.id]},Object.defineProperty(t.prototype,"expressionSurvey",{get:function(){return this.expressionEditor.editSurvey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemEditorSurvey",{get:function(){return this.itemEditor.editSurvey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemsSurvey",{get:function(){return this.itemsSurveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasItems",{get:function(){return this.items.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"matrixItems",{get:function(){return this.itemsSurvey.getQuestionByName("items")},enumerable:!1,configurable:!0}),t.prototype.onStartEditing=function(){e.prototype.onStartEditing.call(this),this.expressionEditorValue=this.getExpressionEditor(this.editableItem),this.itemEditorValue=this.getLogicItemEditor(this.editableItem),this.expressionEditorIsFastEntry=!1,this.expressionEditor.setIsFastEntry(this.expressionEditorIsFastEntry),this.expressionEditorCanShowBuilder=Ct.canBuildExpression(this.expressionEditor.text)},t.prototype.onEndEditing=function(){this.updateEditableItemIsModifiedState(),e.prototype.onEndEditing.call(this),this.expressionEditorValue=null,this.itemEditorValue=null},t.prototype.onEditableItemApply=function(){this.doItemApply(this.editableItem),this.editableItem.isSuitable(this.questionFilter,this.actionTypeFilter)?this.updateItemsSurveyData():(this.questionFilter="",this.actionTypeFilter="")},t.prototype.doItemApply=function(e){var t=this.findLogicItemUI(e);t&&(t.expressionEditor.apply(),t.itemEditor.apply(),e.apply(t.expressionEditor.text),e.actions.length!=t.itemEditor.panels.length&&t.itemEditor.setEditableItem(e),t.itemEditor.resetModified(),e.isNew=!1)},t.prototype.hasErrorInUI=function(){var e=this.survey.creator;return this.expressionEditor.hasErrorInUI()?(this.errorText=this.expressionEditor.errorText,!0):!!this.itemEditor.hasErrors()&&(this.errorText=Ee("actionInvalid"),e&&e.notify(this.errorText,"error"),!0)},t.prototype.getExpressionText=function(){return this.expressionEditor.text},t.prototype.getEditingActions=function(){return this.itemEditor.getEditingActions()},t.prototype.getLogicItemSurveyJSON=function(){var e=this.survey.creator,t=e&&e.useTableViewInLogicTab?this.getTwoColumnsLayout():this.getOneColumnLayout();return He(t),t},t.prototype.getTwoColumnsLayout=function(){return{elements:[{type:"matrixdynamic",name:"items",titleLocation:"hidden",detailPanelMode:"underRowSingle",allowAddRows:!1,allowAdaptiveActions:!1,rowCount:0,columns:[{cellType:"linkvalue",name:"conditions",title:this.getLocString("ed.lg.conditions")},{cellType:"linkvalue",name:"actions",title:this.getLocString("ed.lg.actions")}]}]}},t.prototype.getOneColumnLayout=function(){return{elements:[{type:"matrixdynamic",name:"items",titleLocation:"hidden",showColumnHeader:!1,detailPanelMode:"underRowSingle",allowAddRows:!1,allowAdaptiveActions:!1,rowCount:0,showHeader:!1,columns:[{cellType:"linkvalue",name:"rules",showTooltip:!0,width:"100%"}]}]}},t.prototype.createExpressionPropertyEditor=function(){var e=this,t=new Ct(this.survey,null,this.options);return t.isModal=!1,t.editSurvey.onValueChanged.add((function(t,o){"textEditor"===o.name&&(e.expressionEditorCanShowBuilder=Ct.canBuildExpression(o.value))})),t},t.prototype.getVisibleItems=function(){var e=this;return this.items.filter((function(t){return t.isNew||t.isSuitable(e.questionFilter,e.actionTypeFilter)}))},t.prototype.getDataFromItem=function(e){var t=this.survey.creator;return t&&t.useTableViewInLogicTab?{conditions:e.expressionText,actions:e.actionsText}:{rules:this.getLogicItemDisplayText(e)}},t.prototype.getLogicItemDisplayText=function(e){var t=e.getDisplayText();return this.options?this.options.onLogicGetTitleCallback(e.expression,e.expressionText,t,e):t},t.prototype.updateItemsSurveyData=function(){var e=this;if(this.itemsSurvey){var t=[];this.visibleItems=this.getVisibleItems(),this.visibleItems.forEach((function(o){t.push(e.getDataFromItem(o))})),this.matrixItems.onHasDetailPanelCallback=function(e){return!0},this.matrixItems.onCreateDetailPanelCallback=function(t,o){t.onDetailPanelShowingChanged=function(){if(e.expressionEditorCanShowBuilder=t.isDetailPanelShowing,t.isDetailPanelShowing){if("view"===e.mode){var i=e.visibleItems[t.rowIndex-1];e.editItem(i)}var n=o.getQuestionByName("conditions"),r=o.getQuestionByName("actions");n.embeddedSurvey=e.expressionEditor.editSurvey,r.embeddedSurvey=e.itemEditorValue.editSurvey,e.updateRowIsAdditionalClasses(t.rowIndex-1,!1)}else e.mode="view",e.updateRenderedRows();e.updateNewActionState()},o.addNewQuestion("embeddedsurvey","conditions"),o.addNewQuestion("embeddedsurvey","actions"),o.footerActions.push({id:"saveDetailPanel",innerCss:"sl-panel__done-button",title:e.getLocString("pe.doneEditing"),action:function(){e.saveEditableItem()&&t.hideDetailPanel(!0)}})},this.matrixItems.onCellCreatedCallback=function(e){e.cell.question.linkClickCallback=function(){e.row.isDetailPanelShowing?e.row.hideDetailPanel():e.row.showDetailPanel()},e.cell.question.showClear=!1,e.cell.question.allowClear=!1},this.matrixItems.value=t,this.updateRenderedRows()}},t.prototype.updateRenderedRows=function(){var e=this;this.visibleItems.forEach((function(t,o){e.updateRowIsAdditionalClasses(o,e.visibleItems[o].isModified||e.visibleItems[o].isNew)}))},t.prototype.updateRowIsAdditionalClasses=function(e,t){this.matrixItems.renderedTable&&(this.matrixItems.renderedTable.rows[e].isAdditionalClasses=t)},t.prototype.updateNewActionState=function(){this.addNewButton.enabled="new"!==this.mode},t.prototype.setupToolbarItems=function(){var e=this;this.addNewButton=new r.Action({id:"svd-logic-addNew",title:this.addNewText,tooltip:this.addNewText,component:"sv-action-bar-item",enabled:!0,action:function(){e.addNewUI()}})},Object.defineProperty(t.prototype,"addNewText",{get:function(){return Ee("addNewItem")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"emptyTabPlaceholder",{get:function(){return Ee("empty_tab")},enumerable:!1,configurable:!0}),U([Object(r.property)()],t.prototype,"itemsSurveyValue",void 0),U([Object(r.property)()],t.prototype,"expressionEditorIsFastEntry",void 0),U([Object(r.property)()],t.prototype,"expressionEditorCanShowBuilder",void 0),U([Object(r.property)({onSet:function(e,t){t.updateItemsSurveyData()}})],t.prototype,"questionFilter",void 0),U([Object(r.property)({onSet:function(e,t){t.updateItemsSurveyData()}})],t.prototype,"actionTypeFilter",void 0),t}(Le),Vt=function(){function e(e){this.creator=e,e.addPluginTab("logic",this),this.createActions().forEach((function(t){return e.toolbar.actions.push(t)}))}return e.prototype.activate=function(){var e=this;this.model=new It(this.creator.survey,this.creator),this.filterQuestionAction.title=this.createFilterQuestionTitleUpdater(),this.filterQuestionAction.visible=!0,this.filterActionTypeAction.title=this.createFilterTypeTitleUpdater(),this.filterActionTypeAction.visible=!0,this.fastEntryAction&&(this.fastEntryAction.visible=!0,this.fastEntryAction.active=this.model.expressionEditorIsFastEntry,this.fastEntryAction.enabled=!1),this.model.onPropertyChanged.add((function(t,o){e.fastEntryAction&&"expressionEditorIsFastEntry"===o.name&&(e.fastEntryAction.active=e.model.expressionEditorIsFastEntry),e.fastEntryAction&&"expressionEditorCanShowBuilder"===o.name&&(e.fastEntryAction.enabled=e.model.expressionEditorCanShowBuilder)}))},e.prototype.createFilterTypeTitleUpdater=function(){var e=this;return new r.ComputedUpdater((function(){var t=e.creator.locale;t||(t="en");var o=e.model.actionTypeFilter,i=e.showAllActionTypesText;return o?e.model.getTypeByName(o).displayName:i}))},e.prototype.createFilterQuestionTitleUpdater=function(){var e=this;return new r.ComputedUpdater((function(){var t=e.creator.locale;t||(t="en");var o=e.model.questionFilter,i=e.showAllQuestionsText;return o||i}))},e.prototype.update=function(){this.model&&this.model.update(this.creator.survey)},e.prototype.canDeactivateAsync=function(e){var t=this;this.model?this.model.tryLeaveUI((function(o){o?e():t.creator.notify(H.getString("ed.lg.expressionInvalid"),"error")})):e()},e.prototype.deactivate=function(){return this.disposeObjs(),!0},e.prototype.dispose=function(){this.disposeObjs()},e.prototype.disposeObjs=function(){this.filterActionTypeAction.title=void 0,this.filterQuestionAction.title=void 0,this.model&&(this.model.dispose(),this.model=void 0),this.filterQuestionAction.visible=!1,this.filterActionTypeAction.visible=!1,this.fastEntryAction&&(this.fastEntryAction.visible=!1)},e.prototype.createActions=function(){var e=this,t=[],o=new r.ListModel([{id:null,title:this.showAllQuestionsText}],(function(t){e.model.questionFilter=t.id?t.id:"",i.toggleVisibility()}),!0);o.locOwner=this.creator;var i=new r.PopupModel("sv-list",{model:o},"bottom","center",void 0,void 0,void 0,void 0,void 0,(function(){var t=e.model.getUsedQuestions().map((function(t){return{id:t.name,title:e.creator.getObjectDisplayName(t,"logic-tab:question-filter","condition",t.name)}}));re.sortItems(t,"title"),i.contentComponentData.model.setItems([{id:null,title:e.showAllQuestionsText}].concat(t))}));this.filterQuestionAction=new r.Action({id:"svc-logic-filter-question",visible:!1,component:"sv-action-bar-item-dropdown",popupModel:i,action:function(){i.toggleVisibility()}}),t.push(this.filterQuestionAction);var n=new r.ListModel([{id:null,title:this.showAllActionTypesText}],(function(t){e.model.actionTypeFilter=t.id?t.id:"",a.toggleVisibility()}),!0);n.locOwner=this.creator;var a=new r.PopupModel("sv-list",{model:n},"bottom","center",void 0,void 0,void 0,void 0,void 0,(function(){var t=e.model.getUsedActionTypes().map((function(e){return{id:e.name,title:e.displayName}}));re.sortItems(t,"title"),a.contentComponentData.model.setItems([{id:null,title:e.showAllActionTypesText}].concat(t))}));return this.filterActionTypeAction=new r.Action({id:"svc-logic-filter-actiontype",visible:!1,component:"sv-action-bar-item-dropdown",popupModel:a,action:function(){a.toggleVisibility()}}),t.push(this.filterActionTypeAction),this.creator.allowEditExpressionsInTextEditor&&(this.fastEntryAction=new r.Action({id:"svc-logic-fast-entry",iconName:"icon-fast-entry",locTitleName:"pe.fastEntry",visible:!1,component:"sv-action-bar-item",action:function(){e.model.toggleExpressionEditorIsFastEntry()}}),t.push(this.fastEntryAction)),t},Object.defineProperty(e.prototype,"showAllQuestionsText",{get:function(){return Ee("showAllQuestions")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showAllActionTypesText",{get:function(){return Ee("showAllActionTypes")},enumerable:!1,configurable:!0}),e}(),Nt=function(){function e(){this._ignoreChanges=!1,this._isExecuting=!1,this._preparingTransaction=null,this._transactions=[],this._currentTransactionIndex=-1,this.transactionCounter=0}return e.prototype.onPropertyValueChanged=function(e,t,o,i,n){if(!ke.isCopyObject(i)&&!this.isIgnoring&&!0!==i.ignoreUndoRedo){var r=this._preparingTransaction,a=n?new Lt(e,i,n):new _t(e,t,o,i);if(!r)return(r=new At(e)).addAction(a),void this._addTransaction(r);r.addAction(a)}},e.prototype.isCorrectProperty=function(e,t){var o=r.Serializer.getOriginalProperty(e,t);return!!o&&o.isSerializable},e.prototype.tryMergeTransaction=function(e,t,o){if("name"===t)return!1;var i=this._getCurrentTransaction();return!(!i||0==i.actions.length)&&i.actions[i.actions.length-1].tryMerge(e,t,o)},e.prototype.isCopyObject=function(e){},e.prototype._cutOffTail=function(){this._currentTransactionIndex+1!==this._transactions.length&&(this._transactions.length=this._currentTransactionIndex+1)},Object.defineProperty(e.prototype,"isIgnoring",{get:function(){return this._ignoreChanges||this._isExecuting},enumerable:!1,configurable:!0}),e.prototype._addTransaction=function(e){e.isEmpty()||(this._cutOffTail(),this._transactions[this._currentTransactionIndex]!==e&&(this._transactions.push(e),this._currentTransactionIndex++),this.canUndoRedoCallback())},e.prototype._getCurrentTransaction=function(){var e=this._currentTransactionIndex;return this._transactions[e]},e.prototype._getNextTransaction=function(){var e=this._currentTransactionIndex;return this._transactions[e+1]},e.prototype.notifyChangesFinished=function(e,t){void 0===t&&(t=!1),e.actions.length>0&&this.changesFinishedCallback&&this.changesFinishedCallback(e.actions,t)},e.prototype.canUndoRedoCallback=function(){},e.prototype.startTransaction=function(e){this.isIgnoring||(this.transactionCounter++,this._preparingTransaction||(this._preparingTransaction=new At(e)))},e.prototype.stopTransaction=function(){this.isIgnoring||(this.transactionCounter>0&&this.transactionCounter--,!this._preparingTransaction||this.transactionCounter>0||(this._addTransaction(this._preparingTransaction),0===this.transactionCounter&&this.notifyChangesFinished(this._preparingTransaction),this._preparingTransaction=null))},e.prototype.setUndoCallbackForTransaction=function(e){this._preparingTransaction&&(this._preparingTransaction.undoCallback=e)},Object.defineProperty(e.prototype,"isProcessingUndoRedo",{get:function(){return!0===this._isExecuting},enumerable:!1,configurable:!0}),e.prototype.canUndo=function(){return!!this._getCurrentTransaction()},e.prototype.undo=function(){var e=this._getCurrentTransaction();this.canUndo()&&(this._isExecuting=!0,e.rollback(),this._isExecuting=!1,this._currentTransactionIndex--,this.canUndoRedoCallback(),this.notifyChangesFinished(e,!0))},e.prototype.canRedo=function(){return!!this._getNextTransaction()},e.prototype.redo=function(){var e=this._getNextTransaction();this.canRedo()&&(this._isExecuting=!0,e.apply(),this._isExecuting=!1,this._currentTransactionIndex++,this.canUndoRedoCallback(),this.notifyChangesFinished(e))},e.prototype.suspend=function(){this._ignoreChanges=!0},e.prototype.resume=function(){this._ignoreChanges=!1},e}(),At=function(){function e(e){this._name=e,this._actions=[],this.undoCallback=function(){}}return e.prototype.apply=function(){for(var e=this._actions,t=0;t<e.length;t++){e[t].apply()}},e.prototype.rollback=function(){for(var e=this._actions,t=e.length-1;t>=0;t--){e[t].rollback()}this.undoCallback()},e.prototype.addAction=function(e){this._actions.push(e)},e.prototype.isEmpty=function(){return 0===this._actions.length},Object.defineProperty(e.prototype,"actions",{get:function(){return this._actions},enumerable:!1,configurable:!0}),e}(),_t=function(){function e(e,t,o,i){this._propertyName=e,this._oldValue=t,this._newValue=o,this._sender=i,this.tickCount=(new Date).getTime()}return e.prototype.apply=function(){this._sender[this._propertyName]=this._newValue},e.prototype.rollback=function(){this._sender[this._propertyName]=this._oldValue},e.prototype.getChanges=function(e){return void 0===e&&(e=!1),{object:this._sender,propertyName:this._propertyName,oldValue:e?this._newValue:this._oldValue,newValue:e?this._oldValue:this._newValue}},e.prototype.getDeletedElement=function(e){},e.prototype.getInsertedElement=function(e){},e.prototype.getIndex=function(){return-1},e.prototype.tryMerge=function(t,o,i){if(t!==this._sender||o!==this._propertyName||i==this._oldValue)return!1;var n=r.Serializer.getOriginalProperty(t,o);return!(!n||"string"!==n.type&&"text"!==n.type)&&(!((new Date).getTime()-this.tickCount>e.maximumMergeTime)&&(this._newValue=i,!0))},e.maximumMergeTime=1e3,e}(),Lt=function(){function e(e,t,o){this._propertyName=e,this._sender=t,this._index=0,this._itemsToAdd=[],this._deletedItems=[],this._index=o.index,this._itemsToAdd=o.itemsToAdd,this._deletedItems=o.deletedItems}return e.prototype.apply=function(){this.rollback()},e.prototype.rollback=function(){var e=this._sender[this._propertyName],t=this._index,o=this._itemsToAdd.length,i=[].concat(this._deletedItems);this._deletedItems=e.splice.apply(e,[t,o].concat(i)),this._itemsToAdd=[].concat(i)},e.prototype.getChanges=function(){return{object:this._sender,propertyName:this._propertyName,oldValue:this._deletedItems,newValue:this._itemsToAdd}},e.prototype.getDeletedElement=function(e){return this.getMovedElement(this._deletedItems,this._itemsToAdd,e)},e.prototype.getInsertedElement=function(e){return this.getMovedElement(this._itemsToAdd,this._deletedItems,e)},e.prototype.getIndex=function(){return this._index},e.prototype.getMovedElement=function(e,t,o){var i=o?t:e;if(Array.isArray(i)&&1===i.length)return i[0]},e.prototype.tryMerge=function(e,t,o){return!1},e}(),jt=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.undoRedoManager=void 0,o.onBeforeUndo=new wo,o.onBeforeRedo=new wo,o.onAfterUndo=new wo,o.onAfterRedo=new wo,o.updateSurvey(),o}return z(t,e),t.prototype.onSurveyPropertyValueChangedCallback=function(e,t,o,i,n){this.undoRedoManager&&this.undoRedoManager.isCorrectProperty(i,e)&&(this.undoRedoManager.tryMergeTransaction(i,e,o)?this.creator.notifySurveyPropertyChanged({name:e,target:i,oldValue:t,newValue:o}):(this.undoRedoManager.startTransaction(e+" changed"),this.undoRedoManager.onPropertyValueChanged(e,t,o,i,n),this.creator.updateElementsOnLocaleChanged(i,e),this.creator.updateConditionsOnNameChanged(i,e,t),this.undoRedoManager.stopTransaction()))},t.prototype.updateSurvey=function(){var e=this,t=this.creator.survey;t&&(t.onPropertyValueChangedCallback=function(t,o,i,n,r){e.onSurveyPropertyValueChangedCallback(t,o,i,n,r)}),this.undoRedoManager=new Nt,this.undoRedoManager.changesFinishedCallback=function(t,o){if(!e.notifySurveyMoveItem(t,o))for(var i=t.length-1;i>=0;i--){var n=t[i];if(n){var r=n.getChanges(o);e.creator.notifySurveyPropertyChanged({name:r.propertyName,target:r.object,oldValue:r.oldValue,newValue:r.newValue})}}},this.undoRedoManager.canUndoRedoCallback=function(){e.updateUndeRedoActions()}},t.prototype.notifySurveyMoveItem=function(e,t){e.length;var o=e[0],i=e[1];if(!o||!i)return!1;var n=o.getChanges(t),r=i.getChanges(t);if(n.object!==r.object||n.propertyName!==r.propertyName)return!1;var a=o.getDeletedElement(t),s=o.getInsertedElement(t),l=i.getDeletedElement(t),u=i.getInsertedElement(t);if(a===s||a!==u&&s!==l)return!1;var c=a?o.getIndex():i.getIndex(),p=s?o.getIndex():i.getIndex();return this.creator.notifySurveyItemMoved({arrayName:n.propertyName,parent:n.object,element:a||s,indexFrom:t?p:c,indexTo:t?c:p}),!0},t.prototype.selectElementAfterUndo=function(){this.selectElementAfterUndoCore(this.creator.selectedElement)},t.prototype.selectElementAfterUndoCore=function(e){!e||e.isDisposed||!e.getSurvey()||this.creator.isObjQuestion(e)&&!e.parent?this.creator.selectElement(this.creator.survey):this.creator.selectElement(e)},t.prototype.undo=function(){if(this.undoRedoManager){this.undoRedoManager.suspend();var e={canUndo:this.undoRedoManager.canUndo()};if(this.onBeforeUndo.fire(this.creator,e),this.creator.onBeforeUndo.fire(this.creator,e),e.canUndo){var t=this.undoRedoManager.undo();this.onAfterUndo.fire(this.creator,{state:t}),this.creator.onAfterUndo.fire(this.creator,{state:t}),this.selectElementAfterUndo()}this.undoRedoManager.resume()}},t.prototype.redo=function(){if(this.undoRedoManager){var e={canRedo:this.undoRedoManager.canRedo()};if(this.onBeforeRedo.fire(this.creator,e),this.creator.onBeforeRedo.fire(this.creator,e),e.canRedo){var t=this.undoRedoManager.redo();this.onAfterRedo.fire(this.creator,{state:t}),this.creator.onAfterRedo.fire(this.creator,{state:t}),this.selectElementAfterUndo()}}},t.prototype.startTransaction=function(e){void 0===e&&(e=""),this.undoRedoManager&&this.undoRedoManager.startTransaction(e)},t.prototype.stopTransaction=function(){this.undoRedoManager&&this.undoRedoManager.stopTransaction()},t.prototype.createActions=function(){var e=this,t=[];return this.undoAction=new r.Action({id:"action-undo",iconName:"icon-undo",locTitleName:"ed.undo",showTitle:!1,visible:new r.ComputedUpdater((function(){return"designer"===e.creator.activeTab})),action:function(){return e.undo()}}),this.redoAction=new r.Action({id:"action-redo",iconName:"icon-redo",locTitleName:"ed.redo",showTitle:!1,visible:new r.ComputedUpdater((function(){return"designer"===e.creator.activeTab})),action:function(){return e.redo()}}),t.push(this.undoAction),t.push(this.redoAction),this.updateUndeRedoActions(),t},t.prototype.updateUndeRedoActions=function(){this.undoAction.enabled=this.undoRedoManager.canUndo(),this.redoAction.enabled=this.undoRedoManager.canRedo()},U([Object(r.property)()],t.prototype,"undoRedoManager",void 0),t}(r.Base),kt=function(){function e(e){var t=this;this.creator=e,this.model=void 0,this.model=new jt(e),this.model.createActions().forEach((function(t){return e.toolbar.actions.push(t)})),e.registerShortcut("undo",{hotKey:{ctrlKey:!0,keyCode:90},macOsHotkey:{keyCode:90},execute:function(){return t.model.undo()}}),e.registerShortcut("redo",{hotKey:{ctrlKey:!0,keyCode:89},macOsHotkey:{keyCode:89},execute:function(){return t.model.redo()}})}return e.prototype.activate=function(){},e.prototype.deactivate=function(){return!0},e.prototype.update=function(){},e.prototype.addFooterActions=function(){this.model.undoAction&&this.creator.footerToolbar.actions.push(this.model.undoAction),this.model.redoAction&&this.creator.footerToolbar.actions.push(this.model.redoAction)},e}();function Mt(e,t){return void 0===t&&(t="undoRedoManager"),function(o,i,n){var r=n.value;return n.value=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=this[t];try{a&&a.startTransaction(e||i);var s=r.apply(this,o);return s}finally{a&&a.stopTransaction()}},n}}function Dt(e){return void 0===e&&(e="undoRedoManager"),function(t,o,i){var n=i.value;return i.value=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];var i=this[e];try{i&&i.suspend();var r=n.apply(this,t);return r}finally{i&&i.resume()}},i}}var Rt=function(e){function t(t,o,i,n){var r=e.call(this,{id:"sv_item_selector_"+t.toString(),title:i})||this;return r.data=o,r.level=n,r}return z(t,e),t.prototype.hasText=function(e){return!e||(this.textInLow||(this.textInLow=this.title.toLocaleLowerCase()),this.textInLow.indexOf(e)>-1)},t}(r.Action),Bt=function(){function e(e,t,o){void 0===o&&(o=void 0),this.creator=e,this.getObjectDisplayName=o,this.surveyValue=t,this.rebuild()}return Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this.itemsValue},enumerable:!1,configurable:!0}),e.prototype.getItemByObj=function(e){for(var t=this.items,o=0;o<t.length;o++)if(t[o].data===e)return t[o];return null},e.prototype.filterByText=function(e){this.filteredTextInLow=e?e.toLocaleLowerCase():"",this.updateItemsVisibility()},e.prototype.rebuild=function(){var e=[];this.deepestLevel=0;var t=this.createItem(this.survey,null);e.push(t);for(var o=0;o<this.survey.pages.length;o++){var i=this.survey.pages[o],n=t;if(!this.creator||"single"!==this.creator.pageEditMode){var r=this.createItem(i,t);e.push(r),n=r}this.buildElements(e,this.getElements(i),n)}this.itemsValue=e},e.prototype.updateItemsVisibility=function(){for(var e=this.deepestLevel;e>=0;e--)this.updateItemsLevelVisibility(e)},e.prototype.updateItemsLevelVisibility=function(e){for(var t=0;t<this.items.length;t++){var o=this.items[t];o.level===e&&(o.visible=this.hasVisibleChildren(t)||o.hasText(this.filteredTextInLow))}},e.prototype.hasVisibleChildren=function(e){for(var t=this.items[e].level,o=e+1;o<this.items.length;o++){if(this.items[o].level<=t)return!1;if(this.items[o].visible)return!0}return!1},e.prototype.getElements=function(e){return re.getElements(e)},e.prototype.buildElements=function(e,t,o){for(var i=0;i<t.length;i++){var n=t[i],r=this.createItem(n,o);e.push(r),this.buildElements(e,this.getElements(n),r)}},e.prototype.createItem=function(t,o){var i=new Rt(e.uniqueId++,t,this.getText(t),null!=o?o.level+1:0);return i.level>this.deepestLevel&&(this.deepestLevel=i.level),i},e.prototype.getText=function(e){return this.getObjectDisplayName?this.getObjectDisplayName(e,"property-grid-header:element-list","property-grid",void 0):re.getObjectName(e,!1)},e.uniqueId=0,e}(),qt=function(e){function t(t,o){void 0===o&&(o=void 0);var i=e.call(this)||this;return i.creator=t,i.getObjectDisplayName=o,i}return z(t,e),Object.defineProperty(t.prototype,"list",{get:function(){return this.listModelValue},enumerable:!1,configurable:!0}),t.prototype.show=function(e,t,o){var i=this;this.selector=new Bt(this.creator,e,this.getObjectDisplayName);var n=this.selector.getItemByObj(t);this.listModelValue?(this.listModelValue.setItems(this.selector.items),this.listModelValue.selectedItem=n):this.listModelValue=new r.ListModel(this.selector.items,(function(e){o(e.data)}),!0,n,(function(e){i.selector.filterByText(e)})),this.isVisible=!0},t.prototype.refresh=function(){this.listModelValue.refresh()},U([Object(r.property)()],t.prototype,"isVisible",void 0),t}(r.Base),Ht=function(e){function t(t,o){var i=e.call(this)||this;return i.propertyGridModel=t,i.creator=o,i.selectedElementName=i.getTitle(),i.propertyGridModel.objValueChangedCallback=function(){i.onSurveyChanged()},i.propertyGridModel.changedFromActionCallback=function(e,t){i.selectionController&&i.selectionController.selectFromAction(e,t)},i.initActions(),i.creator.onPropertyChanged.add((function(e,t){"sidebarLocation"===t.name&&(i.selectorPopupModel.horizontalPosition="right"==i.creator.sidebarLocation?"left":"right")})),i.onSurveyChanged(),i}return z(t,e),t.prototype.onPropertyValueChanged=function(t,o,i){e.prototype.onPropertyValueChanged.call(this,t,o,i),this.nextSelectionAction&&"hasNext"===t&&(this.nextSelectionAction.enabled=this.hasNext),this.prevSelectionAction&&"hasPrev"===t&&(this.prevSelectionAction.enabled=this.hasPrev)},Object.defineProperty(t.prototype,"selectionController",{get:function(){return this.creator.selectionHistoryController},enumerable:!1,configurable:!0}),t.prototype.onSurveyChanged=function(){var e=this;this.survey=this.propertyGridModel.survey,this.survey&&this.survey.onValueChanged.add((function(t,o){"name"!=o.name&&"title"!=o.name||e.updateTitle()})),this.updateTitle(),this.selectionController&&(this.hasPrev=this.selectionController.hasPrev,this.hasNext=this.selectionController.hasNext)},t.prototype.updateTitle=function(){var e=this.getTitle();this.selectedElementName=e,this.objectSelectionAction.title=this.selectedElementName},t.prototype.getTitle=function(){var e=this.getSelectedObj();if(!e)return"";var t=re.getObjectName(e,this.propertyGridModel.options.showObjectTitles);return this.propertyGridModel.options.getObjectDisplayName(e,"property-grid-header:selected-element","property-grid-title",t)},t.prototype.getSelectedObj=function(){return this.propertyGridModel.obj},t.prototype.initActions=function(){var e=this;a.propertyGrid.showNavigationButtons&&(this.prevSelectionAction=new r.Action({id:"svd-grid-history-prev",iconName:"icon-arrow-left",component:"sv-action-bar-item",title:Q("ed.prevSelected"),showTitle:!1,enabled:this.hasPrev,action:function(){e.selectionController.prev()}}),this.nextSelectionAction=new r.Action({id:"svd-grid-history-next",iconName:"icon-arrow-right",component:"sv-action-bar-item",title:Q("ed.nextSelected"),showTitle:!1,enabled:this.hasNext,action:function(){e.selectionController.next()}}));var t=new qt(this.creator,(function(t,o,i,n){return e.propertyGridModel.options.getObjectDisplayName(t,o,i,n)}));this.selectorPopupModel=new r.PopupModel("svc-object-selector",{model:t},"bottom","center"),this.selectorPopupModel.cssClass+=" svc-object-selector",this.objectSelectionAction=new r.Action({id:"svd-grid-object-selector",title:this.selectedElementName,css:"sv-action--object-selector sv-action-bar-item--secondary",component:"sv-action-bar-item-dropdown",action:function(){e.selectorPopupModel.displayMode=e.creator.isMobileView?"overlay":"popup",t.show(e.selectionController.creator.survey,e.propertyGridModel.obj,(function(t){e.selectionController.selectFromAction(t,"name"),e.selectorPopupModel.toggleVisibility()})),e.selectorPopupModel.toggleVisibility(),t.list.scrollToSelectedItem()},popupModel:this.selectorPopupModel})},U([Object(r.property)()],t.prototype,"hasPrev",void 0),U([Object(r.property)()],t.prototype,"hasNext",void 0),U([Object(r.property)()],t.prototype,"survey",void 0),U([Object(r.property)()],t.prototype,"selectedElementName",void 0),t}(r.Base),Qt=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.onPagesChanged=o.addEvent(),o.onCurrentPageChanged=o.addEvent(),o.currentPageChangedFunc=function(e,t){o.page2Display=o.survey.currentPage,o.onCurrentPageChanged.fire(o,{})},o.onSurveyChanged(),o}return z(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.creator.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pages",{get:function(){return this.survey.pages},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentPage",{get:function(){return this.survey.currentPage},set:function(e){this.survey.currentPage=e,this.page2Display=e},enumerable:!1,configurable:!0}),t.prototype.selectPage=function(e){this.currentPage=e,this.creator.selectElement(e)},t.prototype.getDisplayName=function(e){return e?this.creator.getObjectDisplayName(e,"page-selector"):""},t.prototype.raisePagesChanged=function(){this.page2Display=this.survey.currentPage,this.onPagesChanged.fire(this,{})},t.prototype.onSurveyChanged=function(){this.removeFunctions(),this.surveyValue=this.creator.survey,this.surveyValue&&(this.raisePagesChanged(),this.page2Display=this.survey.currentPage,this.surveyValue.onCurrentPageChanged.add(this.currentPageChangedFunc))},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.removeFunctions()},t.prototype.removeFunctions=function(){this.surveyValue&&!this.surveyValue.isDisposed&&this.surveyValue.onCurrentPageChanged.remove(this.currentPageChangedFunc)},U([Object(r.property)()],t.prototype,"page2Display",void 0),t}(r.Base);var Ft=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isEdge=!1,t.isSide=!1,t.prevIsEdge=null,t.dragOverIndicatorElement=null,t.isDraggedElementSelected=!1,t.doBanDropHere=function(){t.removeDragOverMarker(t.dragOverIndicatorElement),t.removeDragOverMarker(t.dropTarget)},t.doDrop=function(){if(t.dropTarget){var e=t.parentElement,o=t.draggedElement,i=t.draggedElement,n=t.dropTarget,a=e.dragDropFindRow(n),s=t.getElementIndexInPanel(n,a);t.dragOverLocation!==r.DragTypeOverMeEnum.Right&&t.dragOverLocation!==r.DragTypeOverMeEnum.Bottom||s++;var l=[],u=[],c=i&&i.parent&&i.parent.dragDropFindRow(i);if(c&&c.elements.length>1&&(l.push(i),c.elements[0]===i&&l.push(c.elements[1])),a){var p=(t.dragOverIndicatorElement||t.dropTarget).dragTypeOverMe;p===r.DragTypeOverMeEnum.Left?(u.push(n),0===a.elements.indexOf(n)||0===a.elements.indexOf(i)&&1===a.elements.indexOf(n)?l.push(o):u.push(o)):p===r.DragTypeOverMeEnum.Right?(u.push(o),0===a.elements.indexOf(n)&&l.push(o)):a.elements.length>1?(l.push(o),p===r.DragTypeOverMeEnum.Top?s=t.getElementIndexInPanel(a.elements[0],a):p===r.DragTypeOverMeEnum.Bottom&&(s=t.getElementIndexInPanel(a.elements[a.elements.length-1],a)+1)):l.push(o)}if(i&&i.parent)e.survey.startMovingQuestion(),!!a&&a.panel==i.parent?(t.moveElementInPanel(a.panel,i,o,s),a.panel.updateRows(),s=-1):i.parent.removeElement(i);return t.isEdge||t.isSide||!n.isPanel&&!n.isPage?a&&s>-1&&(a.panel.addElement(o,s),a.panel.updateRows()):(n.addElement(o),n.updateRows()),e.survey.stopMovingQuestion(),l.map((function(e){e.startWithNewLine=!0})),u.map((function(e){e.startWithNewLine=!1})),o}},t}return z(t,e),Object.defineProperty(t.prototype,"draggedElementType",{get:function(){return"survey-element"},enumerable:!1,configurable:!0}),t.prototype.startDragToolboxItem=function(e,t,o){var i=this.createElementFromJson(t);i.toolboxItemTitle=o,this.startDrag(e,i,null,null,!0)},t.prototype.startDragSurveyElement=function(e,t,o){this.isDraggedElementSelected=o,this.startDrag(e,t)},t.prototype.getShortcutText=function(t){return t.toolboxItemTitle||e.prototype.getShortcutText.call(this,t)},t.prototype.createDraggedElementShortcut=function(e,t,o){var i=document.createElement("div"),n=document.createElement("span");return n.className="svc-dragged-element-shortcut__text",n.innerText=e,i.appendChild(this.createDraggedElementIcon()),i.appendChild(n),i.className=this.getDraggedElementClass(),i},t.prototype.createDraggedElementIcon=function(){var e=document.createElement("span"),t='<svg class="sv-svg-icon" role="img" style="width: 24px; height: 24px;"><use xlink:href="#icon-'+this.draggedElement.getType()+'"></use></svg>';return e.className="svc-dragged-element-shortcut__icon",e.innerHTML=t,e},t.prototype.getDraggedElementClass=function(){var e="svc-dragged-element-shortcut";return this.isDraggedElementSelected&&(e+=" svc-dragged-element-shortcut--selected"),e},t.prototype.createElementFromJson=function(e){var t=this.createNewElement(e);return t.setSurveyImpl?t.setSurveyImpl(this.survey):t.setData(this.survey),t.renderWidth="100%",t},t.prototype.createNewElement=function(e){var t=r.Serializer.createClass(e.type);return(new r.JsonObject).toObject(e,t),t},t.prototype.findDropTargetNodeByDragOverNode=function(e){if(e.closest(".svc-row--ghost")){var t="[data-sv-drop-target-survey-element='sv-drag-drop-ghost-survey-element-name']",o=e.closest(t)||e.querySelector(t);if(o)return o}return e.closest(this.dropTargetDataAttributeName)},t.prototype.getDropTargetByDataAttributeValue=function(e,o,i){if(this.removeDragOverMarker(this.dragOverIndicatorElement),this.dragOverIndicatorElement=null,!e){var n=o.parentElement.closest(this.dropTargetDataAttributeName);e=this.getDataAttributeValueByNode(n)}if(!e)throw new Error("Can't find drop target survey element name");if(e===t.ghostSurveyElementName)return this.prevDropTarget;if("newGhostPage"===e)return t.newGhostPage;var r,a,s=this.survey.getPageByName(e);if(s)return 0!==s.elements.length?null:s;if(this.survey.pages.forEach((function(t){var o=t.getElementByName(e);o&&(r=o,a=o)})),"paneldynamic"!==r.getType()||this.isEdge||this.isSide||(r=r.template),"matrixdropdown"!==r.getType()&&"matrixdynamic"!==r.getType()||"none"===r.detailPanelMode||this.isEdge||this.isSide?r.isPanel&&(r=this.getPanelDropTarget(o,r,i)):r=r.detailPanel,!r.page){var l=o.parentElement.closest("[data-sv-drop-target-page]");e=l.dataset.svDropTargetPage;var u=this.survey.getPageByName(e);r.__page=u}return this.dragOverIndicatorElement=a,r},t.prototype.isDropTargetValid=function(e,o){return!!e&&(e!==this.draggedElement&&(("paneldynamic"!==this.draggedElement.getType()||e!==this.draggedElement.template)&&(!t.restrictDragQuestionBetweenPages||!this.shouldRestricDragQuestionBetweenPages(e))))},t.prototype.shouldRestricDragQuestionBetweenPages=function(e){var t=this.draggedElement.page,o=e.isPage?e:e.page;return t&&t!==o},t.prototype.getPanelDropTarget=function(e,t,o){return this.isEdge||0===t.questions.length||(e=this.findDeepestDropTargetChild(e),t=this.getDropTargetByNode(e,o)),t},t.prototype.findDeepestDropTargetChild=function(e){for(var t=this.dropTargetDataAttributeName,o=e;e;)o=e,e=e.querySelector(t);return o},t.prototype.dragOverCore=function(e,t,o,i){if(void 0===o&&(o=!1),void 0===i&&(i=!1),this.removeDragOverMarker(this.dragOverIndicatorElement),this.removeDragOverMarker(this.dropTarget),e!==this.draggedElement){this.dropTarget=e,this.dragOverLocation=t,this.isEdge=o,this.isSide=i,this.parentElement=this.dropTarget.isPage?this.dropTarget:this.dropTarget.page||this.dropTarget.__page;var n=this.dragOverIndicatorElement||this.dropTarget;if(this.isEdge||this.isSide||!this.isDragOverInsideEmptyPanel()){var a=this.parentElement.dragDropFindRow(n);a&&a.elements.length>1&&(this.dragOverLocation===r.DragTypeOverMeEnum.Top||this.dragOverLocation===r.DragTypeOverMeEnum.Bottom)?(a.dragTypeOverMe=this.dragOverLocation,this.dragOverIndicatorElement=a):n.dragTypeOverMe=this.dragOverLocation}else n.dragTypeOverMe=r.DragTypeOverMeEnum.InsideEmptyPanel}else this.allowDropHere=!1},t.prototype.dragOver=function(e){var t=this.findDropTargetNodeFromPoint(e.clientX,e.clientY);if(t){this.isEdge=function(e,t){var o=e.getBoundingClientRect();return t-o.top<=Ft.edgeHeight||o.bottom-t<=Ft.edgeHeight}(t,e.clientY),this.isSide=function(e,t){var o=e.getBoundingClientRect();return t-o.left<=Ft.edgeHeight||o.right-t<=Ft.edgeHeight}(t,e.clientX);var o=this.getDropTargetByNode(t,e);if(this.isDropTargetValid(o,t)){this.allowDropHere=!0;var i=function(e,t,o){var i=o.getBoundingClientRect(),n=i.height/i.width,a=e-i.x,s=t-i.y;return s>=n*a?s>=-n*a+i.height?r.DragTypeOverMeEnum.Bottom:r.DragTypeOverMeEnum.Left:s>=-n*a+i.height?r.DragTypeOverMeEnum.Right:r.DragTypeOverMeEnum.Top}(e.clientX,e.clientY,t);this.dragOverCore(o,i,this.isEdge,this.isSide)}else this.banDropHere()}else this.banDropHere()},t.prototype.onStartDrag=function(){this.draggedElement.isDragMe=!0},t.prototype.getElementIndexInPanel=function(e,t){if(!t)return-1;var o=t.elements.indexOf(e);if(0==t.index)return o;var i=t.panel.rows[t.index-1],n=i.elements[i.elements.length-1];return o+t.panel.elements.indexOf(n)+1},t.prototype.moveElementInPanel=function(e,t,o,i){var n=t.parent.elements.indexOf(t);i>n&&i--,t===o&&n===i||(e.removeElement(t),e.addElement(o,i))},t.prototype.removeDragOverMarker=function(e){var t;e&&(e.dragTypeOverMe=null);var o=null===(t=this.parentElement)||void 0===t?void 0:t.dragDropFindRow(e);o&&(o.dragTypeOverMe=null)},t.prototype.clear=function(){this.isEdge=null,this.isSide=null,this.removeDragOverMarker(this.prevDropTarget),this.removeDragOverMarker(this.dropTarget),this.removeDragOverMarker(this.dragOverIndicatorElement),this.draggedElement&&(this.draggedElement.isDragMe=!1),e.prototype.clear.call(this)},t.prototype.getTargetParent=function(e){var t=e.isPage||e.isPanel?e:e.parent;return"paneldynamic"===e.getType()&&(t=e.templateValue),t},t.prototype.getTargetRow=function(e){var t;return this.getTargetParent(e).rows.forEach((function(o){-1!==o.elements.indexOf(e)&&(t=o)})),t},t.prototype.isDragOverInsideEmptyPanel=function(){var e=this.dropTarget.isPanel&&0===this.dropTarget.questions.length,t=!this.isEdge&&!this.isSide;return e&&t},t.newGhostPage=null,t.restrictDragQuestionBetweenPages=!1,t.edgeHeight=30,t.nestedPanelDepth=-1,t.ghostSurveyElementName="sv-drag-drop-ghost-survey-element-name",t}(r.DragDropCore);o(12);var Ut=r.settings.allowShowEmptyTitleInDesignMode,Gt=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.pagesControllerValue=new Qt(t),o.initSurvey(),o}return z(t,e),t.prototype.createNewPage=function(){var e=this,t=this.survey.createNewPage("");t.ignoreUndoRedo=!0,this.creator.setNewNames(t),t.onFirstRendering(),t.updateCustomWidgets(),t.setWasShown(!0),t.setSurveyImpl(this.survey),t.updateElementCss();var o=function(i,n){"elements"===n.name&&t.elements.length>0&&e.creator.addPage(t,!0,(function(){return t.onPropertyChanged.remove(o),t.showTitle=!0,t.showDescription=!0,delete t.ignoreUndoRedo,!(e.survey.pages.indexOf(t)>-1)}))};t.num=this.survey.pages.length+1,t.onPropertyChanged.add(o),this.newPage=t,Ft.newGhostPage=t},Object.defineProperty(t.prototype,"canShowNewPage",{get:function(){if(!this.survey||"single"===this.creator.pageEditMode||!this.creator.allowModifyPages)return!1;if("bypage"===this.creator.pageEditMode)return!0;var e=this.survey.pages;return 0===e.length||e[e.length-1].elements.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.creator.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pagesController",{get:function(){return this.pagesControllerValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isToolboxVisible",{get:function(){return this.creator.showToolboxValue&&("right"===this.creator.toolboxLocation||"left"===this.creator.toolboxLocation)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholderText",{get:function(){return Q("ed.surveyPlaceHolder")},enumerable:!1,configurable:!0}),t.prototype.onDesignerSurveyPropertyChanged=function(e,t){if(e&&!this.isUpdatingNewPage){if(this.isUpdatingNewPage=!0,"elements"===t&&e.isDescendantOf("page")){var o=!1;0===e.elements.length&&(o=this.checkLastPageToDelete()),this.checkNewPage(o)}"pages"===t&&e.isDescendantOf("survey")&&this.checkNewPage(!0),this.isUpdatingNewPage=!1}},t.prototype.calculateDesignerCss=function(){return this.survey.css.container+" "+this.survey.css.container+"--"+this.survey.calculatedWidthMode},t.prototype.initSurvey=function(){var e=this;this.survey&&(this.showNewPage=!1,this.newPage=void 0,this.checkNewPage(!1),this.cssUpdater&&this.cssUpdater.dispose(),this.cssUpdater=new r.ComputedUpdater((function(){return e.calculateDesignerCss()})),this.designerCss=this.cssUpdater,this.pagesController.onSurveyChanged())},t.prototype.checkNewPage=function(e){var t=0===this.survey.getAllQuestions().length&&0===this.survey.pageCount;if(this.showPlaceholder=t,this.pageCount=this.survey.pageCount,this.showPlaceholder||this.canShowNewPage){var o=this.survey.pages;(!this.newPage||o.length>0&&this.newPage===o[o.length-1])&&(this.createNewPage(),this.showNewPage=!0),this.newPage.showTitle=!t,this.newPage.showDescription=!t}else this.showNewPage=!1,this.newPage=void 0;e&&(this.newPage&&(this.newPage.num=this.survey.pages.length+1,this.newPage.name=re.getNewPageName(this.survey.pages)),this.pagesController.raisePagesChanged())},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.cssUpdater&&this.cssUpdater.dispose()},t.prototype.checkLastPageToDelete=function(){if(0===this.survey.pageCount)return!1;if(1===this.survey.pageCount&&!this.creator.isInitialSurveyEmpty)return!1;var e=this.survey.pages[this.survey.pageCount-1];if(e.elements.length>0||e.isConverting)return!1;if(!re.isPageNameAutoGenerated(e.name))return!1;var t=e.toJSON();for(var o in delete t.name,t)return!1;return e.delete(),0===this.survey.pageCount&&this.creator.selectElement(this.survey),!0},t.prototype.clickDesigner=function(){this.creator.selectedElement=this.creator.survey},t.prototype.getRootCss=function(){var e=this.survey.css.root;return(this.creator.showPageNavigator&&this.survey.pageCount>1||"bypage"===this.creator.pageEditMode)&&(e+=" svc-tab-designer--with-page-navigator"),this.showPlaceholder&&(e+=" svc-tab-designer--with-place-holder"),e},U([Object(r.property)()],t.prototype,"newPage",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"showNewPage",void 0),U([Object(r.property)()],t.prototype,"pageCount",void 0),U([Object(r.property)()],t.prototype,"designerCss",void 0),U([Object(r.property)()],t.prototype,"showPlaceholder",void 0),t}(r.Base),zt=function(){function e(e){var t=this;this.creator=e,e.addPluginTab("designer",this);var o=new ze(e.survey,e);this.propertyGrid=new Ht(o,e),this.propertyGridTab=this.creator.sidebar.addTab("propertyGrid","svc-property-grid",this.propertyGrid,(function(){var e=[];return t.propertyGrid.prevSelectionAction&&(t.propertyGrid.prevSelectionAction.visible=t.createVisibleUpdater(),e.push(t.propertyGrid.prevSelectionAction)),t.propertyGrid.nextSelectionAction&&(t.propertyGrid.nextSelectionAction.visible=t.createVisibleUpdater(),e.push(t.propertyGrid.nextSelectionAction)),t.propertyGrid.objectSelectionAction&&(t.propertyGrid.objectSelectionAction.visible=t.createVisibleUpdater(),e.push(t.propertyGrid.objectSelectionAction)),e})),this.toolboxTab=this.creator.sidebar.addTab("toolbox","svc-toolbox",e),this.creator.onPropertyChanged.add((function(e,o){"isMobileView"===o.name&&t.updatePropertyGridTabCaption(),"toolboxLocation"===o.name&&(t.toolboxTab.visible&&"sidebar"!==o.newVal&&(t.propertyGridTab.visible=!0),t.toolboxTab.visible="sidebar"===o.newVal)})),this.propertyGrid.onPropertyChanged.add((function(e,o){"selectedElementName"===o.name&&t.updatePropertyGridTabCaption()})),this.createActions().forEach((function(t){return e.toolbar.actions.push(t)})),e.registerShortcut("delete",{hotKey:{keyCode:46},macOsHotkey:{keyCode:46},execute:function(){return t.creator.deleteCurrentElement()}})}return Object.defineProperty(e.prototype,"isSurveySelected",{get:function(){return this.creator.isElementSelected(this.creator.survey)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSettingsActive",{get:function(){return this.creator.showSidebar&&this.isSurveySelected},enumerable:!1,configurable:!0}),e.prototype.createVisibleUpdater=function(){var e=this;return new r.ComputedUpdater((function(){return"designer"===e.creator.activeTab}))},e.prototype.updatePropertyGridTabCaption=function(){this.propertyGridTab.caption=this.creator.isMobileView?this.propertyGrid.selectedElementName:""},e.prototype.activate=function(){this.model=new Gt(this.creator),this.creator.sidebar.activeTab=this.propertyGridTab.id,this.creator.focusElement(void 0,!0)},e.prototype.deactivate=function(){return this.model=void 0,this.propertyGridTab.visible=!1,!0},e.prototype.onDesignerSurveyPropertyChanged=function(e,t){this.model&&this.model.onDesignerSurveyPropertyChanged(e,t)},e.prototype.update=function(){this.model&&this.model.initSurvey()},e.prototype.createActions=function(){var e=this,t=[],o=new r.Action({id:"svd-toolbox",iconName:"icon-toolbox",needSeparator:!0,action:function(){e.creator.showSidebar||e.creator.setShowSidebar(!0,!0),e.creator.sidebar.activeTab="toolbox"},active:new r.ComputedUpdater((function(){return"toolbox"===e.creator.sidebar.activeTab})),visible:new r.ComputedUpdater((function(){return I("designer"===e.creator.activeTab,e.creator.showToolbox,"sidebar"===e.creator.toolboxLocation)})),title:"Toolbox",showTitle:!1});return this.surveySettingsAction=new r.Action({id:"svd-settings",iconName:"icon-settings",needSeparator:new r.ComputedUpdater((function(){return I("sidebar"!==e.creator.toolboxLocation,!e.creator.isMobileView)})),action:function(){e.selectSurvey()},active:new r.ComputedUpdater((function(){return I(e.creator.sidebar.activeTab===e.propertyGridTab.id,e.isSurveySelected)})),pressed:new r.ComputedUpdater((function(){return I(e.creator.sidebar.activeTab===e.propertyGridTab.id,e.isSurveySelected)})),visible:this.createVisibleUpdater(),locTitleName:"ed.surveySettings",locTooltipName:"ed.surveySettingsTooltip",showTitle:!1}),this.saveSurveyAction=new r.Action({id:"svd-save",iconName:"icon-save",action:function(){return e.creator.doSave()},active:!1,enabled:!1,visible:new r.ComputedUpdater((function(){return I("designer"===e.creator.activeTab,e.creator.showSaveButton)})),locTitleName:"ed.saveSurvey",locTooltipName:"ed.saveSurveyTooltip",showTitle:!1}),this.previewAction=new r.Action({id:"svd-preview",iconName:"icon-preview",needSeparator:!0,action:function(){e.creator.makeNewViewActive("test")},visible:this.createVisibleUpdater(),locTitleName:"ed.testSurvey",showTitle:!1}),t.push(this.saveSurveyAction),t.push(o),t.push(this.surveySettingsAction),this.creator.onSelectedElementChanged.add((function(t,o){e.surveySettingsAction.active=e.isSettingsActive,e.surveySettingsAction.pressed=e.isSettingsActive})),this.creator.onShowSidebarVisibilityChanged.add((function(t,o){e.surveySettingsAction.active=e.isSettingsActive,e.surveySettingsAction.pressed=e.isSettingsActive})),t},e.prototype.selectSurvey=function(){this.creator.showSidebar||this.creator.setShowSidebar(!0,!0),this.creator.selectElement(this.creator.survey),this.creator.sidebar.activeTab=this.propertyGridTab.id},e.prototype.addFooterActions=function(){this.creator.footerToolbar.actions.push(this.surveySettingsAction),this.creator.footerToolbar.actions.push(this.previewAction)},e}();o(13);var Zt=function(){function e(e,t){var o=this;this.container=e,this.creator=t,this.resizeObserver=void 0,"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((function(e){return o.process()})),this.resizeObserver.observe(this.findCorrectParent(this.container)),this.process(),"xs"!=this.currentWidth&&"s"!=this.currentWidth&&"m"!==this.currentWidth||this.creator.setShowSidebar(!1))}return e.prototype.getScreenWidth=function(){var t,o=this;return Object.keys(e.screenSizeBreakpoints).forEach((function(i){var n=e.screenSizeBreakpoints[i];!t&&o.container&&n&&o.container.offsetWidth>=n&&(t=i)})),t||"xs"},e.prototype.initMobileView=function(){this.creator.showTabs=!1,this.creator.showToolbar=!1,this.creator.isMobileView=!0},e.prototype.resetMobileView=function(){this.creator.showTabs=void 0,this.creator.showToolbar=void 0,this.creator.isMobileView=void 0},e.prototype.procesShowToolbox=function(e){e&&!this.creator.showToolbox&&void 0!==this.prevShowToolbox?(this.creator.showToolbox=this.prevShowToolbox,this.prevShowToolbox=void 0):!e&&this.creator.showToolbox&&void 0===this.prevShowToolbox&&(this.prevShowToolbox=this.creator.showToolbox,this.creator.showToolbox=!1)},e.prototype.procesShowPageNavigator=function(e){"bypage"!==this.creator.pageEditMode?e&&!this.creator.showPageNavigator&&void 0!==this.prevShowPageNavigator?(this.creator.showPageNavigator=this.prevShowPageNavigator,this.prevShowPageNavigator=void 0):!e&&this.creator.showPageNavigator&&void 0===this.prevShowPageNavigator&&(this.prevShowPageNavigator=this.creator.showPageNavigator,this.creator.showPageNavigator=!1):this.creator.showPageNavigator=!0},e.prototype.findCorrectParent=function(e){return(null===window||void 0===window?void 0:window.getComputedStyle)&&"inline"===window.getComputedStyle(e.parentElement).display?this.findCorrectParent(e.parentElement):e.parentElement},e.prototype._process=function(e,t,o){this.creator.updateToolboxIsCompact(e),this.procesShowToolbox(t),this.procesShowPageNavigator(t),this.creator.sidebar.flyoutMode=o,this.creator.sidebar.visible&&!o&&(this.creator.sidebar.collapsedManually=!1),this.creator.sidebar.visible&&!this.creator.sidebar.expandedManually&&o&&"right"!=this.creator.toolboxLocation&&this.creator.sidebar.collapseSidebar(),this.creator.sidebar.visible||this.creator.sidebar.collapsedManually||o||"right"==this.creator.toolboxLocation||this.creator.sidebar.expandSidebar()},e.prototype.process=function(){this.currentWidth=this.getScreenWidth(),"xl"===this.currentWidth||"xxl"===this.currentWidth?this._process(!1,!0,!1):"l"===this.currentWidth?this._process(!0,!0,!1):"m"===this.currentWidth?this._process(!0,!0,!0):this._process(!0,!1,!0),"xs"==this.currentWidth?this.initMobileView():this.resetMobileView()},e.prototype.dispose=function(){this.resizeObserver&&this.resizeObserver.disconnect()},e.screenSizeBreakpoints={xxl:1800,xl:1500,l:1200,m:900,s:600},e}(),Jt=function(e){function t(t,o,i,n){var r=e.call(this)||this;return r.id=t,r.sidePanel=o,i&&(r.componentName=i),n&&(r.model=n),r}return z(t,e),U([Object(r.property)({onSet:function(e,t){t.sidePanel.headerText=t.caption}})],t.prototype,"caption",void 0),U([Object(r.property)({onSet:function(e,t){t.sidePanel.updateHasVisibleTabs()}})],t.prototype,"visible",void 0),U([Object(r.property)()],t.prototype,"model",void 0),U([Object(r.property)()],t.prototype,"componentName",void 0),t}(r.Base),Wt=function(){function e(e,t){var o=this;this.container=e,this.events={mousedown:{touch:"touchend",mouse:"mousedown",pointer:"pointerdown"},mouseup:{touch:"touchstart",mouse:"mouseup",pointer:"pointerup"},mousemove:{touch:"touchmove",mouse:"mousemove",pointer:"pointermove"}},this.onMouseDownListener=function(e){window&&(e.preventDefault(),o.originalWidth=o.getStyleValue(o.container,"width"),o.originalMouseX=e.pageX,o.currentResizer=e.target,window.addEventListener(o.getMouseEvent("mousemove"),o.resize),window.addEventListener(o.getMouseEvent("mouseup"),o.stopResize))},this.resize=function(e){var t=o.originalWidth,i=e.pageX-o.originalMouseX;o.currentResizer==o.westResizer?t-=i:t+=i,t>o.maxWidth?t=o.maxWidth:t<o.minWidth&&(t=o.minWidth),o.container.style.width=t+"px"},this.stopResize=function(e){window&&(window.removeEventListener(o.getMouseEvent("mousemove"),o.resize),window.removeEventListener(o.getMouseEvent("mouseup"),o.stopResize))},this.init(e),this.setHandles(t)}return e.prototype.setHandles=function(e){var t=!1,o=!1,i=e.split(",");i.forEach((function(e){return e.trim()})),((i=i.filter((function(e){return!!e})))||[]).forEach((function(e){"w"==e&&(t=!0),"e"==e&&(o=!0)})),this.westResizer.style.display=t?"block":"none",this.eastResizer.style.display=o?"block":"none"},e.prototype.getStyleValue=function(e,t){return window?parseFloat(window.getComputedStyle(e).getPropertyValue(t).replace("px","")):0},e.prototype.isEventSupported=function(e){var t=document.createElement("div"),o=(e="on"+e)in t;return o||(t.setAttribute(e,"return;"),o="function"==typeof t[e]),t=null,o},e.prototype.getEventPrefix=function(){return void 0===this.mouseDevice&&(this.isEventSupported("pointerdown")?this.mouseDevice="pointer":this.isEventSupported("touchstart")?this.mouseDevice="touch":this.isEventSupported("mousedown")&&(this.mouseDevice="mouse")),this.mouseDevice},e.prototype.getMouseEvent=function(e){return this.events[e][this.getEventPrefix()]},e.prototype.init=function(e){this.westResizer=this.createrResizerElement("svc-resizer svc-resizer-west"),this.eastResizer=this.createrResizerElement("svc-resizer svc-resizer-east"),this.minWidth=this.getStyleValue(e,"min-width"),this.maxWidth=this.getStyleValue(e,"max-width"),e.insertBefore(this.westResizer,e.children[0]),e.appendChild(this.eastResizer)},e.prototype.createrResizerElement=function(e){var t=document.createElement("div");return t.className=e,t.addEventListener(this.getMouseEvent("mousedown"),this.onMouseDownListener),t},e.prototype.dispose=function(){this.eastResizer.removeEventListener(this.getMouseEvent("mousedown"),this.onMouseDownListener),this.eastResizer.remove(),this.eastResizer=void 0,this.westResizer.removeEventListener(this.getMouseEvent("mousedown"),this.onMouseDownListener),this.westResizer.remove(),this.westResizer=void 0},e}(),Kt=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.toolbar=new r.AdaptiveActionContainer,o.onSidebarVisibilityChanged=function(e,t){o.isDisposed||(o.visible=t.show)},o.creator.onShowSidebarVisibilityChanged.add(o.onSidebarVisibilityChanged),o.creator.onPropertyChanged.add((function(e,t){"sidebarLocation"===t.name&&o.resizeManager&&o.resizeManager.setHandles(o.getCurrentHandles())})),o.visible=o.creator.showSidebar,o.createActions(),o}return z(t,e),Object.defineProperty(t.prototype,"flyoutPanelMode",{get:function(){return this.visible&&this.flyoutMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"closeText",{get:function(){return Q("pe.close")},enumerable:!1,configurable:!0}),t.prototype.getTabById=function(e){return this.tabs.filter((function(t){return t.id===e}))[0]},t.prototype.createActions=function(){var e=this;this._collapseAction=new r.Action({id:"svd-grid-hide",iconName:"icon-collapse-panel",css:"svd-grid-hide",locTitleName:"ed.hidePanel",showTitle:!1,visible:new r.ComputedUpdater((function(){return I(!I(!e.creator.allowCollapseSidebar,!e.flyoutMode),e.visible)})),action:function(){e.collapseSidebar(),e.flyoutMode?e.creator.focusElement(e.creator.selectedElement,!0):(e.collapsedManually=!0,e.expandedManually=!1)}}),this.toolbar.actions.push(this._collapseAction),this.creator.allowCollapseSidebar&&(this._expandAction=new r.Action({id:"svd-grid-expand",iconName:"icon-expand-panel",css:"svd-grid-expand",needSeparator:!0,action:function(){e.expandSidebar(),e.flyoutMode||(e.collapsedManually=!1,e.expandedManually=e.flyoutMode)},locTitleName:"ed.showPanel",visible:new r.ComputedUpdater((function(){return I(e.hasVisibleTabs,!e.visible)})),showTitle:!1}))},t.prototype.getCurrentHandles=function(){return"right"==this.creator.sidebarLocation?"w":"e"},t.prototype.getExpandAction=function(){return this._expandAction},t.prototype.collapseSidebar=function(){this.creator.setShowSidebar(!1)},t.prototype.expandSidebar=function(){this.creator.setShowSidebar(!0)},t.prototype.addTab=function(e,t,o,i){var n=this,r=new Jt(e,this,t,o);return this.tabs.push(r),i&&(i()||[]).forEach((function(e){return n.toolbar.actions.push(e)})),r},t.prototype.updateHasVisibleTabs=function(){this.hasVisibleTabs=(this.tabs||[]).filter((function(e){return e.visible})).length>0},t.prototype.dispose=function(){this.creator&&!this.isDisposed&&this.creator.onShowSidebarVisibilityChanged.remove(this.onSidebarVisibilityChanged),e.prototype.dispose.call(this)},t.prototype.initResizeManager=function(e){this.resizeManager=new Wt(e,this.getCurrentHandles())},t.prototype.resetResizeManager=function(){this.resizeManager&&(this.resizeManager.dispose(),this.resizeManager=void 0)},U([Object(r.propertyArray)()],t.prototype,"tabs",void 0),U([Object(r.property)()],t.prototype,"headerText",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"visible",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"collapsedManually",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"expandedManually",void 0),U([Object(r.property)()],t.prototype,"hasVisibleTabs",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"flyoutMode",void 0),U([Object(r.property)({onSet:function(e,t){t.tabs.forEach((function(e){return e.visible=!1})),t._activeTab=t.tabs.filter((function(t){return t.id===e}))[0],t._activeTab&&(t.headerText=t._activeTab.caption,t._activeTab.visible=!0)}})],t.prototype,"activeTab",void 0),t}(r.Base),Xt=function(){function e(e){this.question=e}return e.createItemsNavigator=function(e){return e instanceof r.QuestionImagePickerModel?null:e instanceof r.QuestionMultipleTextModel?new $t(e):e instanceof r.QuestionMatrixDropdownModel?new to(e):e instanceof r.QuestionMatrixDynamicModel?new oo(e):e instanceof r.QuestionMatrixModel?new eo(e):e instanceof r.QuestionSelectBase?new Yt(e):null},e.prototype.addNewItems=function(e,t,o){var i=this,n=e.slice(0,t).concat(o.map((function(e){return t=e,i.question.createItemValue?i.question.createItemValue(t):new r.ItemValue(t);var t}))).concat(e.slice(t+1));this.question[this.getItemsPropertyName(e)]=n},e.prototype.setEventsForItem=function(e,t,o){var i=this,n=io.get(this.getItemLocString(t,o));n.onEditComplete.clear(),n.onEditComplete.add((function(){var n=t.indexOf(o);n>=0&&n<t.length-1&&io.get(i.getItemLocString(t,t[n+1])).activateEditor(),n==t.length-1&&(i.addNewItem(e,t),io.get(i.getItemLocString(t,t[t.length-1])).setAutoFocus(),io.get(i.getItemLocString(t,t[t.length-1])).activateEditor())})),n.onBackspaceEmptyString.clear(),n.onBackspaceEmptyString.add((function(){var e=t.indexOf(o),n=null;if(-1!==e){if(0==e&&t.length>=2&&(n=t[1]),e>0&&(n=t[e-1]),n){var r=io.get(i.getItemLocString(t,n));r.setAutoFocus(),r.activateEditor()}t.splice(e,1)}})),n.onTextChanging.clear(),n.onTextChanging.add((function(e,n){var r=n.value.split(/\r?\n/).filter((function(e){return!!e}));if(!(r.length<=1)){n.cancel=!0;var a=t.indexOf(o);i.addNewItems(t,a,r);var s=a+r.length;s>=t.length&&(s=t.length-1),io.get(i.getItemLocString(t,t[s])).setAutoFocus(),io.get(i.getItemLocString(t,t[s])).activateEditor()}}))},e.setQuestion=function(t){var o=t.element,i=e.createItemsNavigator(o);if(i){var n=t.creator,r=io.get(o.locTitle),a=i.getItemSets(),s=a[0];r.hasEditCompleteHandler||(r.onEditComplete.add((function(){s.length&&io.get(i.getItemLocString(s,s[0])).activateEditor()})),r.hasEditCompleteHandler=!0),a.forEach((function(e){e.forEach((function(t){i.setEventsForItem(n,e,t)}));var t=i.getItemsPropertyName(e);o.onPropertyChanged.add((function(o,r){r.name==t&&e.forEach((function(t){i.setEventsForItem(n,e,t)}))}))}))}return!!i},e}(),Yt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.getItemLocString=function(e,t){return t.locText},t.prototype.getItemSets=function(){return[this.question.choices]},t.prototype.addNewItem=function(e,t,o){void 0===o&&(o=null);var i=e.createNewItemValue(this.question);o&&(i.value=o)},t.prototype.getItemsPropertyName=function(e){return"choices"},t}(Xt),$t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.getItemLocString=function(e,t){return t.locTitle},t.prototype.getItemSets=function(){return[this.question.items]},t.prototype.addNewItem=function(e,t,o){void 0===o&&(o=null),this.question.addItem(o||h("text",t.map((function(e){return e.name}))))},t.prototype.getItemsPropertyName=function(e){return"items"},t.prototype.addNewItems=function(e,t,o){var i=e.slice(0,t).concat(o.map((function(e){return new r.MultipleTextItemModel(e)}))).concat(e.slice(t+1));this.question[this.getItemsPropertyName(e)]=i},t}(Xt),eo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.getItemLocString=function(e,t){return t.locText},t.prototype.getItemSets=function(){return[this.question.columns,this.question.rows]},t.prototype.addNewItem=function(e,t,o){void 0===o&&(o=null),t==this.question.columns&&this.question.addColumn(o||h("Column ",t.map((function(e){return e.value})))),t==this.question.rows&&this.question.rows.push(o||new r.ItemValue(h("Row ",t.map((function(e){return e.value})))))},t.prototype.getItemsPropertyName=function(e){return e==this.question.columns?"columns":e==this.question.rows?"rows":void 0},t}(Xt),to=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.getItemLocString=function(e,t){return e==this.question.columns?t.locTitle:t.locText},t.prototype.addNewItems=function(t,o,i){if(t==this.question.columns){var n=t.slice(0,o).concat(i.map((function(e){return new r.MatrixDropdownColumn(e)}))).concat(t.slice(o+1));this.question[this.getItemsPropertyName(t)]=n}else e.prototype.addNewItems.call(this,t,o,i)},t}(eo),oo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.getItemSets=function(){return[this.question.columns]},t}(to),io=function(e){function t(t){var o=e.call(this)||this;return o.locString=t,o.hasEditCompleteHandler=!1,o.onDoActivate=new r.EventBase,o.onTextChanging=new r.EventBase,o.onEditComplete=new r.EventBase,o.onBackspaceEmptyString=new r.EventBase,o}return z(t,e),t.get=function(e){return e._stringEditorConnector||(e._stringEditorConnector=new t(e)),e._stringEditorConnector},t.prototype.setAutoFocus=function(){this.focusOnEditor=!0},t.prototype.activateEditor=function(){this.onDoActivate.fire(this.locString,{})},t}(r.Base),no=function(e){function t(t,o){var i=e.call(this)||this;return i.locString=t,i.creator=o,i.blurredByEscape=!1,i.focusedProgram=!1,i.characterCounter=new r.CharacterCounter,i.justFocused=!1,i.connector=io.get(t),i.connector.onDoActivate.add((function(){i.activate()})),i.checkMarkdownToTextConversion(i.locString.owner,i.locString.name),i}return z(t,e),t.prototype.afterRender=function(){this.connector.focusOnEditor&&this.activate()&&(this.connector.focusOnEditor=!1)},t.prototype.activate=function(){var e=this.getEditorElement();return!(!e||null==e.offsetParent)&&(e.focus(),x(e),!0)},t.prototype.setLocString=function(e){var t=this;this.locString=e,this.connector=io.get(e),this.connector.onDoActivate.add((function(){t.activate()}))},t.prototype.checkConstraints=function(e){this.maxLength>0&&e.keyCode>=32&&((e.target.innerText||"").length>=this.maxLength&&e.preventDefault());(e.ctrlKey||e.metaKey)&&-1!==[89,90].indexOf(e.keyCode)&&(e.stopImmediatePropagation(),e.preventDefault())},t.prototype.onClick=function(e){e.stopPropagation()},t.prototype.onFocus=function(e){this.focusedProgram||(this.valueBeforeEdit=this.locString.hasHtml?e.target.innerHTML:e.target.innerText,this.focusedProgram=!1),this.maxLength>0&&this.characterCounter.updateRemainingCharacterCounter(this.valueBeforeEdit,this.maxLength),this.creator.selectFromStringEditor=!0,e.target.parentElement.click(),e.target.spellcheck=!0,e.target.setAttribute("tabindex",-1),this.focused=!0,this.justFocused=!0},t.prototype.checkMarkdownToTextConversion=function(e,t){var o={element:e,text:null,name:t,html:""};this.creator&&(this.creator.onHtmlToMarkdown.fire(this.creator,o),this.editAsText=null===o.text)},t.prototype.onCompositionStart=function(e){this.compostionInProgress=!0},t.prototype.onInput=function(e){var t;if(this.maxLength>0){var o=e.target.innerText||"";this.characterCounter.updateRemainingCharacterCounter(o,this.maxLength)}if(this.editAsText&&!this.compostionInProgress){var i={value:null===(t=e.target)||void 0===t?void 0:t.innerText,cancel:null};if(this.connector.onTextChanging.fire(this,i),i.cancel)return;Object(r.sanitizeEditableContent)(e.target),this.maxLength>=0&&e.target.innerText.length>this.maxLength&&(e.target.innerText=e.target.innerText.substring(0,this.maxLength))}},t.prototype.onCompositionEnd=function(e){this.compostionInProgress=!1,this.onInput(e)},t.prototype.onBlur=function(e){if(e.target.removeAttribute("tabindex"),this.blurredByEscape)return this.blurredByEscape=!1,this.locString.hasHtml?e.target.innerHTML=this.valueBeforeEdit:e.target.innerText=this.valueBeforeEdit,this.errorText=null,this.focused=!1,void(null===window||void 0===window||window.getSelection().removeAllRanges());var t=null;if(!this.editAsText){var o={element:this.locString.owner,text:null,name:this.locString.name,html:e.target.innerHTML};this.creator.onHtmlToMarkdown.fire(this.creator,o),t=o.text}var i=t||C(this.locString.hasHtml?e.target.innerHTML:e.target.innerText),n=this.locString.owner,a={obj:n,propertyName:this.locString.name,value:this.locString.text,newValue:i,doValidation:!1};if(this.creator.onValueChangingCallback(a),i=a.newValue,this.errorText=this.creator.onGetErrorTextOnValidationCallback(this.locString.name,n,i),!this.errorText&&!i){var s=n.getPropertyByName&&n.getPropertyByName(this.locString.name);s&&s.isRequired&&(this.errorText=H.getString("pe.propertyIsEmpty"))}if(this.locString.text==i||!this.locString.text&&i==this.locString.calculatedText)this.locString.hasHtml?e.target.innerHTML=this.locString.renderedHtml:e.target.innerText=this.locString.renderedHtml,this.locString.strChanged();else{if(this.errorText)return this.creator.notify(this.errorText,"error"),this.focusedProgram=!0,e.target.innerText=i,void e.target.focus();if(this.locString.owner instanceof r.ItemValue&&this.creator.inplaceEditForValues){var l=this.locString.owner;if(l.value!==i){if(l.locOwner&&l.ownerPropertyName){var u=l.locOwner[l.ownerPropertyName];Array.isArray(u)&&r.ItemValue.getItemByValue(u,i)&&(i=p(i,u),e&&e.target&&(e.target.innerText=i))}l.value=i}}else{var c=this.locString.storeDefaultText;this.locString.storeDefaultText=!1,this.locString.text=i,this.locString.storeDefaultText=c}}this.focused=!1,null===window||void 0===window||window.getSelection().removeAllRanges()},t.prototype.done=function(e){e.stopImmediatePropagation(),e.preventDefault()},t.prototype.onPaste=function(e){if(this.editAsText){e.preventDefault();var t=e.clipboardData.getData("text/plain");document.execCommand("insertHTML",!1,t)}},t.prototype.onKeyDown=function(e){return 13!==e.keyCode||!this.editAsText&&e.shiftKey||(this.blurEditor(),e.ctrlKey||e.metaKey||this.connector.onEditComplete.fire(this,{}),this.done(e)),27===e.keyCode&&(this.blurredByEscape=!0,this.blurEditor(),this.done(e)),8!==e.keyCode||e.target.innerText||(this.done(e),this.connector.onBackspaceEmptyString.fire(this,{})),this.checkConstraints(e),!0},t.prototype.onKeyUp=function(e){return 9===e.keyCode&&e.target===document.activeElement&&x(e.target),!0},t.prototype.onMouseUp=function(e){return!this.justFocused||(this.justFocused=!1,!!window&&((window.getSelection().focusNode&&window.getSelection().focusNode.parentElement!==e.target||0==window.getSelection().toString().length)&&x(e.target),!1))},t.prototype.findProperty=function(){if(this.locString.owner.getType){var e=this.locString.owner.getType();if(this.locString.name)return r.Serializer.findProperty(e,this.locString.name)}},Object.defineProperty(t.prototype,"maxLength",{get:function(){var e=this.findProperty();return!e||e.maxLength<=0?-1:e.maxLength},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholder",{get:function(){var e=this;if(this.placeholderValue)return this.placeholderValue;var t=this.findProperty();if(!t||!t.placeholder)return"";var o=H.getString(t.placeholder);if(o){var i=/\{([^}]+)\}/g;this.placeholderValue=new r.ComputedUpdater((function(){for(var t=o,n=i.exec(t);null!=n;)t=t.replace(i,(function(t){return""+(e.locString.owner&&e.locString.owner[n[1]])})),n=i.exec(t);return t}))}return this.placeholderValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contentEditable",{get:function(){return this.creator.isCanModifyProperty(this.locString.owner,this.locString.name)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showCharacterCounter",{get:function(){return-1!==this.maxLength},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getCharacterCounterClass",{get:function(){return"svc-remaining-character-counter"},enumerable:!1,configurable:!0}),t.prototype.className=function(e){return(new r.CssClassBuilder).append("svc-string-editor").append("svc-string-editor--hidden",""==e&&""==this.placeholder).append("svc-string-editor--readonly",!this.contentEditable).append("svc-string-editor--error",!!this.errorText).toString()},U([Object(r.property)()],t.prototype,"errorText",void 0),U([Object(r.property)()],t.prototype,"focused",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"editAsText",void 0),U([Object(r.property)()],t.prototype,"placeholderValue",void 0),t}(r.Base),ro=["Open Sans","Arial, sans-serif","Brush Script MT, cursive","Courier New, monospace","Garamond, serif","Georgia, serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"];function ao(e,t){Object.keys(e.value).forEach((function(o){var i,n=e.contentPanel.getQuestionByName(o);t["--sjs-font-"+e.name.toLocaleLowerCase()+"-"+o]=e.value[o]+((null===(i=n.unit)||void 0===i?void 0:i.toString())||"")}))}function so(e,t,o){var i={};return Object.keys(t).filter((function(t){return-1!==t.indexOf(e.name.toLocaleLowerCase())})).forEach((function(e){var o=e.split("-").pop();i[o]=t[e]})),0!==Object.keys(i).length?e.value=i:o&&(e.contentPanel.getQuestionByName("color").value=o),i}function lo(e,t){Object.keys(e.value).forEach((function(o){"corner"!==o&&(t["--sjs-"+e.name.toLocaleLowerCase()+"-"+o]=e.value[o])}))}function uo(e,t,o,i){var n={};return Object.keys(t).filter((function(t){return-1!==t.indexOf(e.name.toLocaleLowerCase())})).forEach((function(e){var o=e.split("-").pop();"cornerRadius"===o?n.corner=parseFloat(t[e].toString()):n[o]=t[e]})),0===Object.keys(n).length?(e.contentPanel.getQuestionByName("backcolor").value=o,e.contentPanel.getQuestionByName("hovercolor").value=i):e.value=n,n}r.ComponentCollection.Instance.add({name:"fontsettings",showInToolbox:!1,elementsJSON:[{type:"dropdown",name:"family",title:Q("theme.fontFamily"),titleLocation:"left",descriptionLocation:"hidden",choices:[].concat(ro),allowClear:!1},{type:"buttongroup",name:"weight",titleLocation:"hidden",descriptionLocation:"hidden",choices:[{value:"400",text:Q("theme.fontWeightRegular")},{value:"500",text:Q("theme.fontWeightSemiBold")},{value:"600",text:Q("theme.fontWeightBold")},{value:"700",text:Q("theme.fontWeightHeavy")}]},{type:"colorsettings",name:"color",colorTitle:Q("theme.color"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"},{type:"spinedit",name:"size",title:Q("theme.size"),titleLocation:"left",descriptionLocation:"hidden",unit:"px",min:0}],onInit:function(){},onCreated:function(e){e.contentPanel.getQuestionByName("color").visible="surveyTitle"!==e.name},onValueChanged:function(e,t,o){}}),r.ComponentCollection.Instance.add({name:"elementsettings",showInToolbox:!1,elementsJSON:[{type:"colorsettings",name:"backcolor",colorTitle:Q("theme.backcolor"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"},{type:"colorsettings",name:"hovercolor",colorTitle:Q("theme.hovercolor"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"},{type:"spinedit",name:"corner",title:Q("theme.cornerRadius"),titleLocation:"left",descriptionLocation:"hidden",unit:"px",min:0},{type:"expression",name:"cornerRadius",expression:"iif({composite.corner} notempty, {composite.corner} + 'px', '')",visible:!1}],onInit:function(){},onCreated:function(e){},onValueChanged:function(e,t,o){}}),o(14);var co=o(15),po=["default","contrast","plain","simple","blank","double","bulk","pseudo-3d","playful","ultra"],ho={light:{teal:"rgba(11, 128, 128, 1)",blue:"rgba(39, 114, 203, 1)",purple:"rgba(122, 70, 187, 1)",orchid:"rgba(178, 61, 153, 1)",tulip:"rgba(191, 76, 97, 1)",brown:"rgba(177, 94, 47, 1)",green:"rgba(11, 134, 75, 1)"},dark:{teal:"rgba(22, 198, 187, 1)",blue:"rgba(109, 183, 252, 1)",purple:"rgba(173, 144, 255, 1)",orchid:"rgba(232, 113, 220, 1)",tulip:"rgba(245, 131, 151, 1)",brown:"rgba(252, 187, 89, 1)",green:"rgba(140, 204, 90, 1)"}},go=function(e){function t(t,o){void 0===o&&(o=r.defaultV2Css);var i=e.call(this)||this;i.surveyProvider=t,i.startTheme=o,i.pages=new r.ActionContainer,i.themeChanges={},i.colorCalculator=new B,i.blockChanges=!1,i.simulator=new ye,i.loadTheme(i.surveyProvider.theme),i.themeEditorSurveyValue=i.createThemeEditorSurvey();var n=i;return i.exportToFileUI=function(){n.exportToFile(a.theme.exportFileName)},i.importFromFileUI=function(e){e.files.length<1||(n.importFromFile(e.files[0]),e.value="")},i}return z(t,e),t.prototype.getFullThemeName=function(e){return"light"===this.themePalette?e||this.themeName:(e||this.themeName)+"-"+this.themePalette},Object.defineProperty(t.prototype,"themeVariables",{get:function(){return co[this.getFullThemeName()]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeLanguage",{get:function(){return this.getPropertyValue("activeLanguage",this.survey.locale||r.surveyLocalization.defaultLocale)},set:function(e){e!==this.activeLanguage&&(this.setPropertyValue("activeLanguage",e),this.survey.locale=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.simulator.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageActions",{get:function(){return this.pages.actions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPageToolbarVisible",{get:function(){return this.pages.visibleActions.length>0&&!this.surveyProvider.isMobileView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"themeEditorSurvey",{get:function(){return this.themeEditorSurveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTheme",{get:function(){return this.surveyProvider.theme},enumerable:!1,configurable:!0}),t.prototype.applySelectedTheme=function(){var e={};R(e,co[this.getFullThemeName("default")],co[this.getFullThemeName()]),this.survey.isCompact&&R(e,co[this.getFullThemeName()+"-lw"]),R(e,this.themeChanges),this.currentTheme.cssVariables=e,this.loadThemeIntoPropertyGrid(this.themeEditorSurvey),this.setThemeToSurvey()},t.prototype.loadTheme=function(e){this.themeName=e.themeName,this.themePalette=e.themePalette,this.themeMode=e.isCompact?"lightweight":void 0,this.backgroundImage=e.backgroundImage,this.backgroundImageFit=e.backgroundImageFit,this.backgroundImageAttachment=e.backgroundImageAttachment;var t=this.getFullThemeName();if(!co[t]){co[t]=e;var o=this.themeEditorSurvey.getQuestionByName("themeName");o.choices=o.choices.concat(new r.ItemValue(e.themeName))}var i={};R(i,this.themeVariables,e.cssVariables),e.cssVariables=i},t.prototype.updateSimulatorSurvey=function(e,t){var o=this.surveyProvider.createSurvey(e||{},"theme");o.setCss(t,!1),this.simulator.survey=o,this.setThemeToSurvey(),this.onSurveyCreatedCallback&&this.onSurveyCreatedCallback(this.survey);var i=this;this.survey.onComplete.add((function(e){i.isRunning=!1})),this.survey.onNavigateToUrl&&this.survey.onNavigateToUrl.add((function(e,t){var o=t.url;if(t.url="",o){var i=Q("ed.navigateToMsg")+" '"+o+"'.";this.surveyProvider?this.surveyProvider.notify(i):alert(i)}})),this.survey.onStarted.add((function(e){i.setActivePageItem(i.simulator.survey.activePage,!0)})),this.survey.onCurrentPageChanged.add((function(e,t){i.activePage=t.newCurrentPage,i.setActivePageItem(t.oldCurrentPage,!1),i.setActivePageItem(t.newCurrentPage,!0)})),this.survey.onPageVisibleChanged.add((function(e,t){i.updatePageItem(t.page)}))},t.prototype.exportToFile=function(e){if(window){var t=JSON.stringify(this.currentTheme,null,4),o=new Blob([t],{type:"application/json"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveBlob(o,e);else{var i=window.document.createElement("a");i.href=window.URL.createObjectURL(o),i.download=e,document.body.appendChild(i),i.click(),document.body.removeChild(i)}}},t.prototype.importFromFile=function(e){var t=this,o=new FileReader;o.onload=function(e){var i=JSON.parse(o.result);t.setThemeFromFile(i)},o.readAsText(e)},t.prototype.setThemeFromFile=function(e){this.surveyProvider.theme=e,this.loadTheme(e),this.loadThemeIntoPropertyGrid(this.themeEditorSurvey),this.initializeColorCalculator(),this.setThemeToSurvey()},t.prototype.setJSON=function(e,t){this.json=e,null!=e&&e.cookieName&&delete e.cookieName,this.updateSimulatorSurvey(e,t)},t.prototype.initialize=function(e,t){this.setJSON(e,this.startTheme),this.updatePageList(),void 0!==t.showPagesInTestSurveyTab&&(this.showPagesInTestSurveyTab=t.showPagesInTestSurveyTab),this.buildActions()},t.prototype.updatePageItem=function(e){var t=this.getPageItemByPage(e);t&&(t.enabled=e.isVisible)},t.prototype.getCurrentPageItem=function(){return this.pageListItems[this.survey.pages.indexOf(this.survey.activePage)]},t.prototype.getSelectPageTitle=function(){return this.activePage&&this.getPageTitle(this.activePage,"preview-tab:selected-page","survey-tester-selected")||Q("ts.selectPage")},t.prototype.getPageTitle=function(e,t,o){void 0===t&&(t="preview-tab:page-list"),void 0===o&&(o="survey-tester");var i=this.surveyProvider.getObjectDisplayName(e,t,o,e.title);if(i===e.name&&0===i.indexOf("page")){var n=this.survey.pages.indexOf(e);return H.getString("ed.pageTypeName")+" "+(n+1)}return i},t.prototype.updatePageList=function(){for(var e=[],t=0;t<this.survey.pages.length;t++){var o=this.survey.pages[t];e.push({id:o.name,data:o,title:this.getPageTitle(o),enabled:o.isVisible,visible:!0})}this.pageListItems=e},t.prototype.resetTheme=function(){this.themeChanges={},this.applySelectedTheme()},t.prototype.show=function(){this.showInvisibleElements=!1,this.activePage=this.survey.activePage,this.survey.locale=this.activeLanguage,this.isRunning=!0},t.prototype.testAgain=function(){this.setJSON(this.json,this.simulator.survey.css),this.updatePageList(),this.show()},t.prototype.buildActions=function(){var e=this,t=[],o=function(t){var o=e.survey.currentPageNo,i=o+(t?1:-1);"starting"===e.survey.state&&t&&(i=0);var n=e.survey.visiblePages[i];!t&&0===o&&e.survey.firstPageIsStarted&&e.survey.pages.length>0&&(n=e.survey.pages[0]);var r=e.survey.pages.indexOf(n);e.activePage=e.survey.pages[r],e.selectPageAction.data.selectedItem=e.pageListItems[r]};this.prevPageAction&&(this.prevPageAction.visible=new r.ComputedUpdater((function(){return I(e.isRunning,"test"===e.surveyProvider.activeTab,e.pageListItems.length>1)})),this.prevPageAction.iconName=new r.ComputedUpdater((function(){return e.surveyProvider.isMobileView?"icon-arrow-left":"icon-arrow-left_16x16"})),this.prevPageAction.iconSize=new r.ComputedUpdater((function(){return e.surveyProvider.isMobileView?24:16})),this.prevPageAction.action=function(){return o(!1)},t.push(this.prevPageAction)),this.selectPageAction=Object(r.createDropdownActionModel)({id:"pageSelector",css:"svc-page-selector",title:this.getSelectPageTitle(),visible:this.isRunning&&this.pageListItems.length>1&&this.showPagesInTestSurveyTab},{items:this.pageListItems,allowSelection:!0,selectedItem:this.getCurrentPageItem(),onSelectionChanged:function(t){e.activePage=t.data},verticalPosition:"top",horizontalPosition:"center"}),t.push(this.selectPageAction),this.nextPageAction&&(this.nextPageAction.visible=new r.ComputedUpdater((function(){return I(e.isRunning,"test"===e.surveyProvider.activeTab,e.pageListItems.length>1)})),this.nextPageAction.iconName=new r.ComputedUpdater((function(){return e.surveyProvider.isMobileView?"icon-arrow-right":"icon-arrow-right_16x16"})),this.nextPageAction.iconSize=new r.ComputedUpdater((function(){return e.surveyProvider.isMobileView?24:16})),this.nextPageAction.action=function(){return o(!0)},t.push(this.nextPageAction)),this.pages.actions=t,this.pages.containerCss="sv-action-bar--pages",this.updatePrevNextPageActionState()},t.prototype.setActivePageItem=function(e,t){var o=this.getPageItemByPage(e);o&&(o.active=t)},t.prototype.getPageItemByPage=function(e){for(var t=this.pageListItems,o=0;o<t.length;o++)if(t[o].data===e)return t[o];return null},t.prototype.updateResultsTemplate=function(e){this.simulator.survey.setCss(e,!1),this.simulator.survey.render()},t.prototype.setTheme=function(e,t){var o=t.filter((function(t){return t.name===e})),i=r.defaultV2Css;o.length>0&&(i=o[0].theme),this.isRunning?this.updateSimulatorSurvey(this.json,i):this.updateResultsTemplate(i)},t.prototype.onPropertyValueChanged=function(t,o,i){e.prototype.onPropertyValueChanged.call(this,t,o,i),this.pages.hasActions&&("activePage"===t&&(this.updatePrevNextPageActionState(),this.selectPageAction.title=this.getSelectPageTitle()),"isRunning"!==t&&"pageListItems"!==t&&"showPagesInTestSurveyTab"!==t||(this.selectPageAction.popupModel.contentComponentData.model.items=this.pageListItems,this.selectPageAction.popupModel.contentComponentData.model.selectedItem=this.getCurrentPageItem(),this.selectPageAction.visible=this.isRunning&&this.pageListItems.length>1&&this.showPagesInTestSurveyTab))},t.prototype.updatePrevNextPageActionState=function(){if(this.prevPageAction&&this.survey){var e=this.survey.firstPageIsStarted&&"starting"!==this.survey.state||!this.survey.firstPageIsStarted&&!this.survey.isFirstPage;this.prevPageAction.css=e?"sv-action-bar-item--secondary":"",this.prevPageAction.enabled=e;var t=this.survey&&this.survey.visiblePages.indexOf(this.activePage)!==this.survey.visiblePages.length-1;this.nextPageAction.css=t?"sv-action-bar-item--secondary":"",this.nextPageAction.enabled=t}},t.prototype.initializeColorCalculator=function(){this.currentTheme.cssVariables["--sjs-primary-backcolor"]&&this.currentTheme.cssVariables["--sjs-primary-backcolor-light"]&&this.currentTheme.cssVariables["--sjs-primary-backcolor-dark"]&&this.colorCalculator.initialize(this.currentTheme.cssVariables["--sjs-primary-backcolor"],this.currentTheme.cssVariables["--sjs-primary-backcolor-light"],this.currentTheme.cssVariables["--sjs-primary-backcolor-dark"])},t.prototype.createThemeEditorSurvey=function(){var e=this,t=this.getThemeEditorSurveyJSON();He(t,!0,!1);var o=this.surveyProvider.createSurvey(t,"theme_editor");o.getCss().list={};var i=G({},se);return i.root+=" spg-theme-builder-root",o.css=i,this.loadThemeIntoPropertyGrid(o),this.initializeColorCalculator(),o.onValueChanged.add((function(t,i){var n,r;if(!e.blockChanges){if(0===i.name.indexOf("--")&&(e.themeChanges[i.name]=i.value),-1!==["themeName","themeMode","themePalette"].indexOf(i.name))return e[i.name]=i.value,e.initializeColorCalculator(),void("themeMode"===i.name?(e.survey.isCompact="lightweight"===i.value,e.currentTheme.isCompact="lightweight"===i.value,e.applySelectedTheme()):(e.currentTheme.themeName=e.themeName,e.currentTheme.themePalette=e.themePalette,e.resetTheme()));if(-1===["backgroundImage","backgroundImageFit","backgroundImageAttachment"].indexOf(i.name)){if("backgroundOpacity"===i.name)return e.survey.backgroundOpacity=i.value/100,void(e.currentTheme.backgroundOpacity=i.value/100);if("--sjs-primary-backcolor"===i.name&&(e.colorCalculator.calculateColors(i.value),e.themeChanges["--sjs-primary-backcolor"]=i.value,e.themeChanges["--sjs-primary-backcolor-light"]=e.colorCalculator.colorSettings.newColorLight,e.themeChanges["--sjs-primary-backcolor-dark"]=e.colorCalculator.colorSettings.newColorDark,e.themeEditorSurvey.setValue("--sjs-primary-backcolor-light",e.colorCalculator.colorSettings.newColorLight),e.themeEditorSurvey.setValue("--sjs-primary-backcolor-dark",e.colorCalculator.colorSettings.newColorDark)),"questionBackgroundTransparency"===i.name||"editorPanel"===i.name){var a=k(o.getValue("--sjs-general-backcolor-dim-light")).color,s=o.getValue("questionBackgroundTransparency");e.themeChanges["--sjs-editor-background"]=_(a,s/100)}if("panelBackgroundTransparency"===i.name||"questionPanel"===i.name){a=k(o.getValue("--sjs-general-backcolor")).color;var l=o.getValue("panelBackgroundTransparency");e.themeChanges["--sjs-question-background"]=_(a,l/100)}"fontsettings"===(null===(n=i.question)||void 0===n?void 0:n.getType())&&ao(i.question,e.themeChanges),"elementsettings"===(null===(r=i.question)||void 0===r?void 0:r.getType())&&lo(i.question,e.themeChanges);var u={};R(u,e.currentTheme.cssVariables,e.themeChanges),e.currentTheme.cssVariables=u,e.setThemeToSurvey()}else e[i.name]=i.value}})),o.getAllQuestions().forEach((function(e){return e.allowRootStyle=!1})),o.onQuestionCreated.add((function(e,t){t.question.allowRootStyle=!1})),o},t.prototype.loadThemeIntoPropertyGrid=function(e){this.blockChanges=!0;try{e.clear(!0),e.mergeData(this.currentTheme.cssVariables),e.setValue("themeName",this.themeName),e.setValue("themeMode",this.themeMode),e.setValue("themePalette",this.themePalette),this.updatePGEditors(e)}finally{this.blockChanges=!1}},t.prototype.updatePGEditors=function(e){var t=this,o={};R(o,this.currentTheme.cssVariables),e.getQuestionByName("backgroundImage").value=this.backgroundImage,e.getQuestionByName("backgroundImageFit").value=this.backgroundImageFit,e.getQuestionByName("backgroundImageAttachment").value=this.backgroundImageAttachment,uo(e.getQuestionByName("questionPanel"),o,o["--sjs-general-backcolor"],o["--sjs-general-backcolor-dark"]),uo(e.getQuestionByName("editorPanel"),o,o["--sjs-general-backcolor-dim-light"],o["--sjs-general-backcolor-dim-dark"]),so(e.getQuestionByName("surveyTitle"),o),so(e.getQuestionByName("pageTitle"),o,o["--sjs-general-dim-forecolor"]),so(e.getQuestionByName("pageDescription"),o,o["--sjs-general-dim-forecolor-light"]),so(e.getQuestionByName("questionTitle"),o,o["--sjs-general-forecolor"]),so(e.getQuestionByName("questionDescription"),o,o["--sjs-general-forecolor-light"]),so(e.getQuestionByName("editorFont"),o),e.getAllQuestions().forEach((function(e){-1!==["color","colorsettings"].indexOf(e.getType())&&(e.choices=Object.keys(ho[t.themePalette]).map((function(e){return new r.ItemValue(ho[t.themePalette][e],Q("theme.colors."+e))})))}))},t.prototype.setThemeToSurvey=function(e){e&&(this.surveyProvider.theme=e),this.survey.applyTheme(this.surveyProvider.theme)},t.prototype.getThemeEditorSurveyJSON=function(){return{clearInvisibleValues:"none",elements:[{type:"panel",state:"expanded",title:Q("theme.groupGeneral"),elements:[{type:"panel",elements:[{type:"dropdown",name:"themeName",title:Q("theme.themeName"),descriptionLocation:"hidden",choices:po.map((function(e){return{value:e,text:Q("theme.names."+e)}})),defaultValue:"default",allowClear:!1},{type:"panel",name:"themeSettings",title:Q("theme.themeMode"),elements:[{type:"buttongroup",name:"themeMode",titleLocation:"hidden",choices:[{value:"panels",text:Q("theme.themeModePanels")},{value:"lightweight",text:Q("theme.themeModeLightweight")}],defaultValue:"panels"},{type:"buttongroup",name:"themePalette",titleLocation:"hidden",choices:[{value:"light",text:Q("theme.themePaletteLight")},{value:"dark",text:Q("theme.themePaletteDark")}],defaultValue:"light"}]}]},{type:"panel",elements:[{type:"color",name:"--sjs-primary-backcolor",title:Q("theme.primaryColor"),descriptionLocation:"hidden"},{type:"color",name:"--sjs-general-backcolor-dim",title:Q("theme.backgroundDimColor"),descriptionLocation:"hidden"},{type:"panel",name:"background",title:Q("theme.backgroundImage"),elements:[{type:"fileedit",name:"backgroundImage",titleLocation:"hidden",acceptedTypes:"image/*",placeholder:"Browse..."},{type:"buttongroup",name:"backgroundImageFit",titleLocation:"hidden",choices:[{value:"auto",text:Q("theme.backgroundImageFitAuto")},{value:"contain",text:Q("theme.backgroundImageFitContain")},{value:"cover",text:Q("theme.backgroundImageFitCover")}],defaultValue:"cover"},{type:"buttongroup",name:"backgroundImageAttachment",titleLocation:"hidden",choices:[{value:"fixed",text:Q("theme.backgroundImageAttachmentFixed")},{value:"scroll",text:Q("theme.backgroundImageAttachmentScroll")}],defaultValue:"scroll"},{type:"spinedit",name:"backgroundOpacity",titleLocation:"left",title:Q("theme.backgroundOpacity"),descriptionLocation:"hidden",unit:"%",defaultValue:100,min:0,max:100,step:5}]},{type:"spinedit",name:"panelBackgroundTransparency",title:Q("theme.panelBackgroundTransparency"),descriptionLocation:"hidden",unit:"%",defaultValue:100,min:0,max:100,step:5},{type:"spinedit",name:"questionBackgroundTransparency",title:Q("theme.questionBackgroundTransparency"),descriptionLocation:"hidden",unit:"%",defaultValue:100,min:0,max:100,step:5}]},{type:"panel",elements:[{type:"dropdown",name:"--font-family",title:Q("theme.fontFamily"),descriptionLocation:"hidden",choices:[].concat(ro),defaultValue:"Open Sans",allowClear:!1},{type:"spinedit",name:"--font-size",title:Q("theme.fontSize"),descriptionLocation:"hidden",unit:"%",defaultValue:100,min:0,step:5},{type:"expression",name:"--sjs-font-size",expression:'{--font-size}*16/100+"px"',visible:!1}]},{type:"panel",elements:[{type:"spinedit",name:"commonScale",title:Q("theme.scale"),descriptionLocation:"hidden",unit:"%",defaultValue:100,min:0,step:5},{type:"expression",name:"--sjs-base-unit",expression:'{commonScale}*8/100+"px"',visible:!1},{type:"spinedit",name:"cornerRadius",title:Q("theme.cornerRadius"),descriptionLocation:"hidden",unit:"px",defaultValue:4,min:0},{type:"expression",name:"--sjs-corner-radius",expression:'{cornerRadius}+"px"',visible:!1}]}]},{type:"panel",title:Q("theme.groupAdvanced"),state:"collapsed",elements:[{type:"panel",elements:[{type:"color",name:"--sjs-general-backcolor-dim",title:Q("theme.backgroundDimColor"),descriptionLocation:"hidden"},{type:"panel",title:Q("theme.accentBackground"),elements:[{type:"colorsettings",name:"--sjs-primary-backcolor",colorTitle:Q("theme.primaryDefaultColor"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"},{type:"colorsettings",name:"--sjs-primary-backcolor-dark",colorTitle:Q("theme.primaryDarkColor"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"},{type:"colorsettings",name:"--sjs-primary-backcolor-light",colorTitle:Q("theme.primaryLightColor"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"}]},{type:"panel",title:Q("theme.accentForeground"),elements:[{type:"colorsettings",name:"--sjs-primary-forecolor",colorTitle:Q("theme.primaryForecolor"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"},{type:"colorsettings",name:"--sjs-primary-forecolor-light",colorTitle:Q("theme.primaryForecolorLight"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"}]}]},{type:"panel",elements:[{type:"fontSettings",name:"surveyTitle",title:Q("theme.surveyTitle"),descriptionLocation:"hidden",defaultValue:{family:a.theme.fontFamily,color:"rgba(22, 22, 22, 1)",weight:"700",size:32}},{type:"fontSettings",name:"pageTitle",title:Q("theme.pageTitle"),descriptionLocation:"hidden",defaultValue:{family:a.theme.fontFamily,color:"rgba(22, 22, 22, 1)",weight:"700",size:24}},{type:"fontSettings",name:"pageDescription",title:Q("theme.pageDescription"),descriptionLocation:"hidden",defaultValue:{family:a.theme.fontFamily,color:"rgba(22, 22, 22, 1)",weight:"400",size:16}}]},{type:"panel",elements:[{type:"elementSettings",name:"questionPanel",title:Q("theme.questionPanel"),descriptionLocation:"hidden",defaultValue:{backcolor:"rgba(255, 255, 255, 1)",hovercolor:"rgba(248, 248, 248, 1)",corner:4}},{type:"boxshadowsettings",name:"--sjs-shadow-small",descriptionLocation:"hidden",title:Q("theme.questionShadow"),defaultValue:{x:0,y:1,blur:2,spread:0,isInset:!1,color:"rgba(0, 0, 0, 0.15)"}},{type:"expression",name:"--sjs-general-backcolor",expression:"{questionPanel.backcolor}",visible:!1},{type:"fontSettings",name:"questionTitle",title:Q("theme.questionTitle"),descriptionLocation:"hidden",defaultValue:{family:a.theme.fontFamily,color:"rgba(22, 22, 22, 1)",weight:"600",size:16}},{type:"fontSettings",name:"questionDescription",title:Q("theme.questionDescription"),descriptionLocation:"hidden",defaultValue:{family:a.theme.fontFamily,color:"rgba(22, 22, 22, 1)",weight:"400",size:16}}]},{type:"panel",elements:[{type:"elementSettings",name:"editorPanel",title:Q("theme.editorPanel"),descriptionLocation:"hidden",defaultValue:{backcolor:"rgba(255, 255, 255, 1)",hovercolor:"rgba(248, 248, 248, 1)",corner:4}},{type:"boxshadowsettings",name:"--sjs-shadow-inner",descriptionLocation:"hidden",title:Q("theme.editorShadow"),defaultValue:{x:0,y:1,blur:2,spread:0,isInset:!0,color:"rgba(0, 0, 0, 0.15)"}},{type:"expression",name:"--sjs-general-backcolor-dim-light",expression:"{editorPanel.backcolor}",visible:!1},{type:"fontSettings",name:"editorFont",title:Q("theme.editorFont"),descriptionLocation:"hidden",defaultValue:{family:a.theme.fontFamily,color:"rgba(22, 22, 22, 1)",weight:"400",size:16}}]},{type:"panel",elements:[{type:"panel",title:Q("theme.linesColors"),elements:[{type:"colorsettings",name:"--sjs-border-default",colorTitle:Q("theme.borderDefault"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"},{type:"colorsettings",name:"--sjs-border-light",colorTitle:Q("theme.borderLight"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"}]}]}]}]}},U([Object(r.property)({defaultValue:!1,onSet:function(e,t){t.simulator.survey.showInvisibleElements=e}})],t.prototype,"showInvisibleElements",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"showPagesInTestSurveyTab",void 0),U([Object(r.property)({defaultValue:!0,onSet:function(e,t){t.simulator&&(t.simulator.isRunning=e)}})],t.prototype,"isRunning",void 0),U([Object(r.propertyArray)()],t.prototype,"pageListItems",void 0),U([Object(r.property)({onSet:function(e,t){if(e){var o=t.simulator.survey;o.firstPageIsStarted&&(e===o.pages[0]?o.clear(!1,!0):"starting"==o.state&&o.setPropertyValue("isStartedState",!1)),"starting"!==o.state&&(o.currentPage=e)}t.updatePrevNextPageActionState()}})],t.prototype,"activePage",void 0),U([Object(r.property)({onSet:function(e,t){t.survey&&(t.survey.backgroundImage=e),t.currentTheme.backgroundImage=e}})],t.prototype,"backgroundImage",void 0),U([Object(r.property)({defaultValue:"cover",onSet:function(e,t){t.survey&&(t.survey.backgroundImageFit=e),t.currentTheme.backgroundImageFit=e}})],t.prototype,"backgroundImageFit",void 0),U([Object(r.property)({defaultValue:"scroll",onSet:function(e,t){t.survey&&(t.survey.backgroundImageAttachment=e),t.currentTheme.backgroundImageAttachment=e}})],t.prototype,"backgroundImageAttachment",void 0),U([Object(r.property)({defaultValue:"default"})],t.prototype,"themeName",void 0),U([Object(r.property)({defaultValue:"light"})],t.prototype,"themePalette",void 0),U([Object(r.property)({defaultValue:"panels"})],t.prototype,"themeMode",void 0),t}(r.Base),mo=function(){function e(e){this.creator=e,this.simulatorTheme=r.surveyCss[r.defaultV2ThemeName],e.addPluginTab("theme",this,"ed.themeSurvey"),this.simulatorTheme=r.surveyCss[r.defaultV2ThemeName],this.createActions().forEach((function(t){return e.toolbar.actions.push(t)})),this.sidebarTab=this.creator.sidebar.addTab("theme"),this.sidebarTab.caption=H.getString("ed.themePropertyGridTitle")}return e.prototype.getSimulatorDevicesTitle=function(){return this.model?be[this.model.simulator.device].title||Q("pe.simulator"):""},e.prototype.setDevice=function(e){this.model.simulator.device=e,this.model.simulator.resetZoomParameters();var t=be[this.model.simulator.device].deviceType;this.orientationSelectorAction.enabled="desktop"!=t,this.deviceSelectorAction.iconName="icon-device-"+t,this.deviceSelectorAction.title=Q("pe.simulator")},e.prototype.updateActions=function(){this.creator.showSimulatorInTestSurveyTab&&(this.setDevice(this.model.simulator.device),this.deviceSelectorAction.data.selectedItem={id:this.model.simulator.device},this.orientationSelectorAction.title=Q("pe.portraitOrientation")),this.creator.showInvisibleElementsInTestSurveyTab&&(this.invisibleToggleAction.css=this.model.showInvisibleElements?"sv-action-bar-item--active":"",this.invisibleToggleAction.visible=this.model.isRunning)},e.prototype.activate=function(){this.model=new go(this.creator,this.simulatorTheme),this.model.simulator.landscape="portrait"!=this.creator.previewOrientation,this.update(),this.sidebarTab.model=this.model.themeEditorSurvey,this.sidebarTab.componentName="survey-widget",this.creator.sidebar.activeTab=this.sidebarTab.id,this.resetTheme.visible=!0,this.importAction.visible=!0,this.exportAction.visible=!0},e.prototype.update=function(){var e=this;if(this.model){var t={showPagesInTestSurveyTab:this.creator.showPagesInTestSurveyTab};this.model.testAgainAction=this.testAgainAction,this.model.prevPageAction=this.prevPageAction,this.model.nextPageAction=this.nextPageAction,this.model.initialize(this.creator.JSON,t),this.updateActions(),this.model.show(),this.model.onPropertyChanged.add((function(t,o){"isRunning"===o.name&&(e.invisibleToggleAction&&(e.invisibleToggleAction.visible=e.model.isRunning),e.testAgainAction.visible=!e.model.isRunning)}))}},e.prototype.deactivate=function(){return this.model&&(this.simulatorTheme=this.model.simulator.survey.css,this.model.onSurveyCreatedCallback=void 0,this.model=void 0),this.sidebarTab.visible=!1,this.testAgainAction.visible=!1,this.resetTheme.visible=!1,this.importAction.visible=!1,this.exportAction.visible=!1,this.invisibleToggleAction&&(this.invisibleToggleAction.visible=!1),!0},e.prototype.createActions=function(){var e=this,t=[];if(this.testAgainAction=new r.Action({id:"testSurveyAgain",visible:!1,locTitleName:"ed.testSurveyAgain",action:function(){e.model.testAgain()}}),this.creator.showSimulatorInTestSurveyTab){var o=Object.keys(be).filter((function(e){return!!be[e].title})).map((function(e){return{id:e,title:be[e].title}}));this.deviceSelectorAction=Object(r.createDropdownActionModel)({id:"deviceSelector",iconName:"icon-device-desktop",mode:"small",visible:new r.ComputedUpdater((function(){return I("theme"===e.creator.activeTab,e.creator.showSimulatorInTestSurveyTab)}))},{items:o,allowSelection:!0,onSelectionChanged:function(t){e.setDevice(t.id)},horizontalPosition:"center",onHide:function(){e.deviceSelectorAction.enabled=!0},onShow:function(){e.deviceSelectorAction.enabled=!1}}),t.push(this.deviceSelectorAction),this.orientationSelectorAction=new r.Action({id:"orientationSelector",iconName:"icon-device-rotate",mode:"small",visible:new r.ComputedUpdater((function(){return I("theme"===e.creator.activeTab,e.creator.showSimulatorInTestSurveyTab)})),action:function(){e.model.simulator.landscape=!e.model.simulator.landscape,e.orientationSelectorAction.title=Q(e.model.simulator.landscape?"pe.portraitOrientation":"pe.landscapeOrientation")}}),t.push(this.orientationSelectorAction)}return this.creator.showInvisibleElementsInTestSurveyTab&&(this.invisibleToggleAction=new r.Action({id:"showInvisible",iconName:"icon-invisible-items",mode:"small",needSeparator:new r.ComputedUpdater((function(){return!e.creator.isMobileView})),locTitleName:"ts.showInvisibleElements",visible:!1,action:function(){e.model.showInvisibleElements=!e.model.showInvisibleElements,e.invisibleToggleAction.css=e.model.showInvisibleElements?"sv-action-bar-item--active":"",e.invisibleToggleAction.title=Q(e.model.showInvisibleElements?"ts.hideInvisibleElements":"ts.showInvisibleElements")}}),t.push(this.invisibleToggleAction)),this.designerAction=new r.Action({id:"svd-designer",iconName:"icon-preview",needSeparator:!0,action:function(){e.creator.makeNewViewActive("designer")},active:new r.ComputedUpdater((function(){return"theme"===e.creator.activeTab})),visible:new r.ComputedUpdater((function(){return"theme"===e.creator.activeTab})),locTitleName:"ed.designer",showTitle:!1}),this.prevPageAction=new r.Action({id:"prevPage",iconName:"icon-arrow-left_16x16",visible:!1}),this.nextPageAction=new r.Action({id:"nextPage",iconName:"icon-arrow-right_16x16",visible:!1}),this.resetTheme=new r.Action({id:"resetTheme",iconName:"icon-reset",mode:"small",visible:new r.ComputedUpdater((function(){return"theme"===e.creator.activeTab})),action:function(){e.model.resetTheme()}}),t.push(this.resetTheme),this.importAction=new r.Action({id:"svc-theme-import",iconName:"icon-load",locTitleName:"ed.themeImportButton",locTooltipName:"ed.themeImportButton",visible:!1,mode:"small",component:"sv-action-bar-item",needSeparator:!0,action:function(){document&&(e.inputFileElement||(e.inputFileElement=document.createElement("input"),e.inputFileElement.type="file",e.inputFileElement.style.display="none",e.inputFileElement.onchange=function(){e.model.importFromFileUI(e.inputFileElement)}),e.inputFileElement.click())}}),t.push(this.importAction),this.exportAction=new r.Action({id:"svc-theme-export",iconName:"icon-download",locTitleName:"ed.themeExportButton",locTooltipName:"ed.themeExportButton",visible:!1,mode:"small",component:"sv-action-bar-item",action:function(){e.model.exportToFileUI()}}),t.push(this.exportAction),t},e.prototype.addFooterActions=function(){this.creator.footerToolbar.actions.push(this.testAgainAction),this.invisibleToggleAction&&this.creator.footerToolbar.actions.push(this.invisibleToggleAction),this.creator.footerToolbar.actions.push(this.prevPageAction),this.creator.footerToolbar.actions.push(this.nextPageAction),this.creator.footerToolbar.actions.push(this.designerAction)},e}();o(16),o(17),o(18);var fo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t}(r.Action),yo=function(e){function t(t){return e.call(this,t)||this}return z(t,e),t}(r.Action),vo=function(e){function t(){var t=e.call(this)||this;return t.dotsItem.popupModel.horizontalPosition="center",t.minVisibleItemsCount=1,t}return z(t,e),t}(r.AdaptiveActionContainer),bo=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o}return z(t,e),t.prototype.getRenderedActions=function(){var e=this.actions,t=this.creator.sidebar.getExpandAction(),o=e.indexOf(t);return-1!==o&&(e.splice(o,1),e.push(t)),e},t}(r.ActionContainer),wo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t}(r.EventBase),Co=function(e){function t(t,o){var i=e.call(this)||this;i.options=t,i.startEditTitleOnQuestionAdded=!0,i.isRTLValue=!1,i.alwaySaveTextInPropertyEditorsValue=!1,i.pageEditModeValue="standard",i.newQuestions=[],i.newPanels=[],i.plugins={},i.onElementDeleting=new wo,i.onGetPropertyReadOnly=new wo,i.onSurveyInstanceCreated=new wo,i.onGetObjectDisplayName=new wo,i.onHtmlToMarkdown=new wo,i.onElementAllowOperations=new wo,i.onDefineElementMenuItems=new wo,i.onShowingProperty=new wo,i.onCanShowProperty=i.onShowingProperty,i.onPropertyGridSurveyCreated=new wo,i.onPropertyEditorCreated=new wo,i.onPropertyEditorUpdateTitleActions=new wo,i.onPropertyGridShowModal=new wo,i.onCanDeleteItem=new wo,i.onCollectionItemDeleting=new wo,i.onCollectionItemAllowOperations=new wo,i.onItemValueAdded=new wo,i.onMatrixColumnAdded=new wo,i.onSetPropertyEditorOptions=new wo,i.onGenerateNewName=new wo,i.onPropertyValidationCustomError=new wo,i.onPropertyValueChanging=new wo,i.onSurveyPropertyValueChanged=new wo,i.onConditionQuestionsGetList=new wo,i.onConditionGetTitle=new wo,i.onLogicItemDisplayText=new wo,i.onModified=new wo,i.onQuestionAdded=new wo,i.onPanelAdded=new wo,i.onPageAdded=new wo,i.onGetPageActions=new wo,i.onDesignerSurveyCreated=new wo,i.onPreviewSurveyCreated=new wo,i.onTestSurveyCreated=i.onPreviewSurveyCreated,i.onNotify=new wo,i.onSelectedElementChanging=new wo,i.onSelectedElementChanged=new wo,i.onOpenFileChooser=new wo,i.onUploadFile=new wo,i.onTranslationStringVisibility=new wo,i.onTranslationLocaleInitiallySelected=new wo,i.onTranslationImportItem=new wo,i.onTranslationImported=new wo,i.onTranslationExportItem=new wo,i.onTranslationItemChanging=new wo,i.onDragDropAllow=new wo,i.maxLogicItemsInCondition=-1,i.showObjectTitles=!1,i.maxVisibleChoices=10,i.showTitlesInExpressions=!1,i.allowEditExpressionsInTextEditor=!0,i.maximumColumnsCount=a.propertyGrid.maximumColumnsCount,i.maximumChoicesCount=a.propertyGrid.maximumChoicesCount,i.maximumRowsCount=a.propertyGrid.maximumRowsCount,i.maximumRateValues=a.propertyGrid.maximumRateValues,i.showPagesInTestSurveyTab=!0,i.showSimulatorInTestSurveyTab=!0,i.themeForPreview="defaultV2",i.theme={cssVariables:{}},i._allowModifyPages=!0,i.showDefaultLanguageInTestSurveyTab="auto",i.showInvisibleElementsInTestSurveyTab=!0,i.showPageSelectorInToolbar=!1,i.allowChangeThemeInPreview=!0,i.showErrorOnFailedSave=!0,i.onActiveTabChanging=new wo,i.onActiveTabChanged=new wo,i.showSidebarValue=!0,i.onShowSidebarVisibilityChanged=new wo,i.onShowPropertyGridVisiblityChanged=new wo,i.onBeforeUndo=new wo,i.onBeforeRedo=new wo,i.onAfterUndo=new wo,i.onAfterRedo=new wo,i.onPageAdding=new wo,i.onDragStart=new r.Event,i.onBeforeDrop=i.onDragStart,i.onDragEnd=new r.Event,i.onAfterDrop=i.onDragEnd,i.onStateChanged=new wo,i.notifier=new r.Notifier({root:"svc-notifier",info:"svc-notifier--info",error:"svc-notifier--error",success:"svc-notifier--success",button:"",shown:"svc-notifier--shown"}),i.onKeyDownHandler=function(e){var t,o;Object.keys(i.shortcuts||{}).forEach((function(n){t=i.shortcuts[n],(o=e.metaKey?t.macOsHotkey:t.hotKey)&&!!o.ctrlKey==!!e.ctrlKey&&!!o.shiftKey==!!e.shiftKey&&o.keyCode===e.keyCode&&(o.keyCode<48&&Lo(e.target)||t.execute(i.selectElement))}))},i.shortcuts={},i.autoSaveDelay=a.autoSave.delay,i.autoSaveTimerId=null,i.saveNo=0,(o||"string"==typeof i.options||i.options instanceof String)&&(i.options=o||{},re.warnText("Creator constructor has one parameter, as creator options, in V2.")),i.previewOrientation=t.previewOrientation,i.toolbarValue=new bo(i),i.toolbarValue.locOwner=i,i.tabbedMenu=new vo,i.tabbedMenu.locOwner=i,i.selectionHistoryControllerValue=new ae(i),i.sidebar=new Kt(i),i.setOptions(i.options),i.patchMetadata(),i.initSurveyWithJSON(void 0,!1),i.toolbox=new K(i.options&&i.options.questionTypes?i.options.questionTypes:null,i,!0),i.updateToolboxIsCompact(),i.initTabs(),i.initDragDrop();var n=i.sidebar.getExpandAction();return n&&i.toolbar.actions.push(n),i}return z(t,e),t.prototype.getMarkdownHtml=function(e,t){return null},t.prototype.getRenderer=function(e){return null},t.prototype.getRendererContext=function(e){return e},t.prototype.getProcessedText=function(e){return e},t.prototype.getLocale=function(){return this.locale},Object.defineProperty(t.prototype,"showPreviewTab",{get:function(){return this.showTestSurveyTab},set:function(e){this.showTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowEditSurveyTitle",{get:function(){return this.getPropertyValue("allowEditSurveyTitle",!0)},set:function(e){this.setPropertyVisibility("survey",e,"title","description","logo","showTitle","logoWidth","logoHeight"),this.setPropertyValue("allowEditSurveyTitle",e),this.designerPropertyGrid&&this.designerPropertyGrid.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showSurveyTitle",{get:function(){return this.allowEditSurveyTitle},set:function(e){this.allowEditSurveyTitle=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"licenseText",{get:function(){return this.getLocString("survey.license")},enumerable:!1,configurable:!0}),t.prototype.changePageModifications=function(e){void 0===e&&(e=!1),this.setPropertyVisibility("survey",e,"pages"),this.setPropertyVisibility("question",e,"page"),this.setPropertyVisibility("panel",e,"page"),this.showJSONEditorTab=!0===this.options.showJSONEditorTab},Object.defineProperty(t.prototype,"pageEditMode",{get:function(){return this.pageEditModeValue},set:function(e){this.pageEditModeValue=e;var t="single"!==this.pageEditModeValue;this.changePageModifications(t),r.settings.allowShowEmptyTitleInDesignMode=t,r.settings.allowShowEmptyDescriptionInDesignMode=t,"bypage"===this.pageEditModeValue&&(this.showPageNavigator=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolbarItems",{get:function(){return this.toolbarValue.actions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolbar",{get:function(){return this.toolbarValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showingViewName",{get:function(){return this.activeTab},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isDesignerShowing",{get:function(){return"designer"===this.activeTab},enumerable:!1,configurable:!0}),t.prototype.showDesigner=function(){this.activeTab="designer"},Object.defineProperty(t.prototype,"isTestSurveyShowing",{get:function(){return this.isPreviewShowing},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPreviewShowing",{get:function(){return"test"===this.activeTab},enumerable:!1,configurable:!0}),t.prototype.showTestSurvey=function(){this.showPreview()},t.prototype.showPreview=function(){this.activeTab="test"},t.prototype.addPluginTab=function(e,t,o,i,n){var r=this,a=o?0==o.indexOf("ed.")?o:"":"ed."+e;a&&(o=void 0);var s=new yo({id:e,locTitleName:a,title:o,componentContent:i||"svc-tab-"+e,data:t,action:function(){r.makeNewViewActive(e)},active:this.viewType===e,disableHide:this.viewType===e});n>=0&&n<this.tabs.length?this.tabs.splice(n,0,s):this.tabs.push(s),this.addPlugin(e,t)},t.prototype.addPlugin=function(e,t){this.plugins[e]=t},t.prototype.getPlugin=function(e){return this.plugins[e]},Object.defineProperty(t.prototype,"showPagesInPreviewTab",{get:function(){return this.showPagesInTestSurveyTab},set:function(e){this.showPagesInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showSimulatorInPreviewTab",{get:function(){return this.showSimulatorInTestSurveyTab},set:function(e){this.showSimulatorInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowModifyPages",{get:function(){return this._allowModifyPages},set:function(e){this._allowModifyPages=e,this.changePageModifications(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showDefaultLanguageInPreviewTab",{get:function(){return this.showDefaultLanguageInTestSurveyTab},set:function(e){this.showDefaultLanguageInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showInvisibleElementsInPreviewTab",{get:function(){return this.showInvisibleElementsInTestSurveyTab},set:function(e){this.showInvisibleElementsInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabs",{get:function(){return this.tabbedMenu.actions},set:function(e){this.tabbedMenu.actions=e},enumerable:!1,configurable:!0}),t.prototype.getLocString=function(e){return H.getString(e)},t.prototype.onSetReadOnly=function(e){},Object.defineProperty(t.prototype,"locale",{get:function(){return this.getPropertyValue("locale",H.currentLocale)},set:function(e){if(H.currentLocale!==e){H.currentLocale=e,this.setPropertyValue("locale",e),this.toolbox.updateTitles(),this.refreshPlugin();var t=this.selectedElement;t&&(this.selectElement(null),this.selectElement(t)),this.locStrsChanged()}},enumerable:!1,configurable:!0}),t.prototype.locStrsChanged=function(){e.prototype.locStrsChanged.call(this),this.tabbedMenu.locStrsChanged(),this.toolbar.locStrsChanged()},t.prototype.refreshPlugin=function(){var e=this.currentPlugin;if(e){e.deactivate&&e.deactivate();var t=this.viewType;this.viewType="",e.activate(),this.viewType=t}},Object.defineProperty(t.prototype,"readOnly",{get:function(){return this.getPropertyValue("readOnly",!1)},set:function(e){var t=this.text;this.setPropertyValue("readOnly",e),this.onSetReadOnly(e),this.text=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRTL",{get:function(){return this.isRTLValue},set:function(e){this.isRTLValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeTab",{get:function(){return this.viewType},set:function(e){this.makeNewViewActive(e)},enumerable:!1,configurable:!0}),t.prototype.makeNewViewActive=function(e){var t=this;if(e==this.viewType)return!1;var o=this.currentPlugin;if(!o||!o.canDeactivateAsync)return this.switchViewType(e);o.canDeactivateAsync((function(){t.switchViewType(e)}))},t.prototype.switchViewType=function(e){var t={tabName:e,allow:!0};if(this.onActiveTabChanging.fire(this,t),t.allow){if(!this.canSwitchViewType())return!1;var o=this.activatePlugin(e);return this.viewType=e,this.onActiveTabChanged.fire(this,{tabName:e,plugin:o,model:o?o.model:void 0}),!0}},t.prototype.canSwitchViewType=function(){var e=this.currentPlugin;return!e||!e.deactivate||e.deactivate()},t.prototype.activatePlugin=function(e){var t=this.getPlugin(e);return t&&t.activate(),t},Object.defineProperty(t.prototype,"currentPlugin",{get:function(){return this.getPlugin(this.activeTab)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolboxCategories",{get:function(){return this.toolbox.categories},enumerable:!1,configurable:!0}),t.prototype.updateToolboxIsCompact=function(e){if(this.toolbox){var t=null!=e&&null!=e;void 0!==this.toolbox.forceCompact?this.toolbox.isCompact=this.toolbox.forceCompact:"right"==this.toolboxLocation?this.toolbox.isCompact=this.showSidebar||t&&e:t&&(this.toolbox.isCompact=e)}},Object.defineProperty(t.prototype,"showToolbox",{get:function(){return this.showToolboxValue},set:function(e){!0!==e&&!1!==e&&re.warnText("showToolbox is a boolean property now."),"none"===e||!1===e||"top"===e?this.showToolboxValue=!1:(!0===e||(this.toolboxLocation=e),this.showToolboxValue=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showSidebar",{get:function(){return this.showSidebarValue},set:function(e){!0===e||!1===e?this.showSidebar!==e&&(this.setShowSidebar(e,!0),this.onShowPropertyGridVisiblityChanged.isEmpty||(re.warnNonSupported("onShowPropertyGridVisiblityChanged","onShowSidebarVisibilityChanged"),this.onShowPropertyGridVisiblityChanged.fire(this,{show:e}))):re.warnText("showSidebar is a boolean property now.")},enumerable:!1,configurable:!0}),t.prototype.setShowSidebar=function(e,t){void 0===t&&(t=!1),this.showSidebarValue=e,t&&(e?this.sidebar.expandedManually=!0:this.sidebar.collapsedManually=!0),this.updateToolboxIsCompact(),this.onShowSidebarVisibilityChanged.fire(this,{show:e})},Object.defineProperty(t.prototype,"showPropertyGrid",{get:function(){return re.warnNonSupported("showPropertyGrid","showSidebar"),this.showSidebar},set:function(e){re.warnNonSupported("showPropertyGrid","showSidebar"),!0===e||!1===e?this.showSidebar=e:re.warnText("showSidebar is a boolean property.")},enumerable:!1,configurable:!0}),t.prototype.rightContainerActiveItem=function(e){re.warnNonSupported("rightContainerActiveItem")},t.prototype.leftContainerActiveItem=function(e){re.warnNonSupported("leftContainerActiveItem")},Object.defineProperty(t.prototype,"undoRedoManager",{get:function(){var e=this.getPlugin("undoredo");return e&&e.model.undoRedoManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"undoRedoController",{get:function(){var e=this.getPlugin("undoredo");return e&&e.model},enumerable:!1,configurable:!0}),t.prototype.startUndoRedoTransaction=function(e){void 0===e&&(e=""),this.undoRedoController&&this.undoRedoController.startTransaction(e)},t.prototype.stopUndoRedoTransaction=function(){this.undoRedoController&&this.undoRedoController.stopTransaction()},Object.defineProperty(t.prototype,"isProcessingUndoRedo",{get:function(){return this.undoRedoManager&&this.undoRedoManager.isProcessingUndoRedo},enumerable:!1,configurable:!0}),t.prototype.undo=function(){this.undoRedoController&&this.undoRedoController.undo()},t.prototype.redo=function(){this.undoRedoController&&this.undoRedoController.redo()},Object.defineProperty(t.prototype,"selectionHistoryController",{get:function(){return this.selectionHistoryControllerValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentPage",{get:function(){return this.survey.currentPage},set:function(e){this.survey.currentPage=e},enumerable:!1,configurable:!0}),t.prototype.addPage=function(e,t,o){void 0===t&&(t=!0);var i={page:e,allow:!0};if(this.onPageAdding.fire(this,i),!i.allow)return null;if(void 0===o||o()){var n=e;return n?this.survey.addPage(n):n=this.addNewPageIntoSurvey(),t&&this.selectElement(n),n}},t.prototype.addNewPageIntoSurvey=function(){var e=re.getNewPageName(this.survey.pages);return this.survey.addNewPage(e)},t.prototype.initTabs=function(){this.initPlugins(),this.initFooterToolbar(),this.tabs.length>0&&this.makeNewViewActive(this.tabs[0].id)},t.prototype.initPlugins=function(){this.addPlugin("undoredo",new kt(this)),this.showDesignerTab&&new zt(this),this.showPreviewTab&&new Ce(this),this.showThemeTab&&new mo(this),this.showLogicTab&&new Vt(this),this.showJSONEditorTab&&(ge.hasAceEditor()?new ge(this):new fe(this)),this.showEmbeddedSurveyTab&&new ce(this),this.showTranslationTab&&new ft(this)},t.prototype.initFooterToolbar=function(){var e=this;this.footerToolbar||(this.footerToolbar=new r.ActionContainer,["undoredo","designer","test"].forEach((function(t){var o=e.getPlugin(t);o&&o.addFooterActions&&o.addFooterActions()})))},t.prototype.getOptions=function(){return this.options||{}},t.prototype.setOptions=function(e){e||(e={});var t={showTestSurveyTab:"showPreviewTab",showDefaultLanguageInTestSurveyTab:"showDefaultLanguageInPreviewTab",showInvisibleElementsInPreviewTab:"showInvisibleElementsInTestSurveyTab"};for(var o in t)if(void 0!==e[o]){var i=t[o];void 0===e[i]&&(e[i]=e[o],delete e[o])}for(var o in this.options=e,e)this[o]=e[o]},t.prototype.setPropertyPlaceHolder=function(e,t,o){var i=r.Serializer.findProperty(e,t);i&&(i.placeholder=o)},t.prototype.setPropertyVisibility=function(e,t){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];if(Array.isArray(o))for(var n=0;n<o.length;n++){var a=r.Serializer.findProperty(e,o[n]);a&&(a.visible=t)}},t.prototype.patchMetadata=function(){this.setPropertyPlaceHolder("survey","title","pe.surveyTitlePlaceholder"),this.setPropertyPlaceHolder("survey","description","pe.surveyDescriptionPlaceholder"),this.setPropertyVisibility("survey",!1,"logoPosition"),"single"!==this.pageEditMode&&(this.setPropertyPlaceHolder("page","title","pe.pageTitlePlaceholder"),this.setPropertyPlaceHolder("page","description","pe.pageDescriptionPlaceholder"))},t.prototype.isCanModifyProperty=function(e,t){var o,i,n=r.Serializer.findProperty(e.getType(),t);if(e instanceof r.ItemValue){o=e.locOwner,i=r.Serializer.findProperty(o.getType(),e.ownerPropertyName||t);var a=!0;if(o instanceof r.QuestionSelectBase&&(a=o.isItemInList(e)),!1===this.getElementAllowOperations(o).allowEdit)return!1;var s={allowDelete:!0,allowEdit:a,allowAdd:!0};if(this.onCollectionItemAllowingCallback(o,n,o.getPropertyValue(null==i?void 0:i.name),e,s),!1===s.allowEdit)return!1;if(this.onIsPropertyReadOnlyCallback(o,i,null==i?void 0:i.readOnly,null,null))return!1}if(e instanceof r.SurveyElement&&!1===this.getElementAllowOperations(e).allowEdit)return!1;return!n||!this.onIsPropertyReadOnlyCallback(e,n,n.readOnly,o,i)},t.prototype.onIsPropertyReadOnlyCallback=function(e,t,o,i,n){var r=this.readOnly||o;if(this.onGetPropertyReadOnly.isEmpty)return r;var a={obj:e,property:t,readOnly:r,propertyName:t.name,parentObj:i,parentProperty:n};return this.onGetPropertyReadOnly.fire(this,a),a.readOnly},Object.defineProperty(t.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isInitialSurveyEmpty",{get:function(){return this.isInitialSurveyEmptyValue},enumerable:!1,configurable:!0}),t.prototype.initSurveyWithJSON=function(e,t){var o=this;e||(e={logoPosition:"right"}),this.existingPages={};var i=this.createSurvey({});i.css=r.defaultV2Css,i.setDesignMode(!0),i.lazyRendering=!0,i.setJsonObject(e),this.isInitialSurveyEmptyValue=i.isEmpty,i.isEmpty&&i.setJsonObject(this.getDefaultSurveyJson()),i.pages.forEach((function(e){o.existingPages[e.id]=!0})),this.onDesignerSurveyCreated.fire(this,{survey:i}),i.onQuestionAdded.add((function(e,t){o.doOnQuestionAdded(t.question,t.parentPanel)})),i.onPanelAdded.add((function(e,t){o.doOnPanelAdded(t.panel,t.parentPanel)})),i.onPageAdded.add((function(e,t){o.existingPages[t.page.id]||(o.existingPages[t.page.id]=!0,o.doOnPageAdded(t.page))})),i.onDragDropAllow.add((function(e,t){t.survey=e,o.onDragDropAllow.fire(o,t)})),this.setSurvey(i),this.updatePlugin(this.activeTab),"designer"!==this.activeTab&&this.updatePlugin("designer"),this.undoRedoController&&this.undoRedoController.updateSurvey()},t.prototype.updatePlugin=function(e){var t=this.getPlugin(this.activeTab);t&&t.update&&t.update()},t.prototype.initDragDrop=function(){this.initDragDropSurveyElements(),this.initDragDropChoices()},t.prototype.initDragDropSurveyElements=function(){var e=this;Ft.restrictDragQuestionBetweenPages=a.dragDrop.restrictDragQuestionBetweenPages,this.dragDropSurveyElements=new Ft(null,this);var t=!1;this.dragDropSurveyElements.onDragStart.add((function(o,i){t=!o.draggedElement.parent,e.onDragStart.fire(o,i),e.startUndoRedoTransaction("drag drop")})),this.dragDropSurveyElements.onDragEnd.add((function(o,i){e.stopUndoRedoTransaction();var n=t&&e.startEditTitleOnQuestionAdded;e.selectElement(i.draggedElement,void 0,!1,n),t=!1,e.onDragEnd.fire(o,i)}))},t.prototype.initDragDropChoices=function(){var e=this;this.dragDropChoices=new r.DragDropChoices(null,this),this.dragDropChoices.onDragStart.add((function(t,o){e.startUndoRedoTransaction("drag drop")})),this.dragDropChoices.onDragEnd.add((function(t,o){e.stopUndoRedoTransaction(),e.selectElement(o.draggedElement,void 0,!1)}))},t.prototype.updateElementsOnLocaleChanged=function(e,t){if("survey"===e.getType()&&"locale"===t)for(var o=this.survey.pages,i=0;i<o.length;i++)o[i].locStrsChanged()},t.prototype.updateConditionsOnNameChanged=function(e,t,o){if(this.isObjQuestion(e)){if("name"!==t||e.valueName||this.updateLogicOnQuestionNameChanged(o,e.name),"valueName"===t){var i=o||e.name,n=e.valueName?e.valueName:e.name;this.updateLogicOnQuestionNameChanged(i,n)}"name"===t&&e.isDescendantOf("selectbase")&&this.updateChoicesFromQuestionOnColumnNameChanged(o,e.name)}"name"===t&&e.isDescendantOf("matrixdropdowncolumn")&&this.updateLogicOnColumnNameChanged(e,o,e.name)},t.prototype.getSurveyLogicForUpdate=function(){return this.surveyLogicForUpdate&&this.surveyLogicForUpdate.survey!==this.survey&&(this.surveyLogicForUpdate=void 0),this.surveyLogicForUpdate||(this.surveyLogicForUpdate=this.createSurveyLogicForUpdate()),this.surveyLogicForUpdate},t.prototype.clearSurveyLogicForUpdate=function(e,t,o){!this.surveyLogicRenaming&&this.surveyLogicForUpdate&&e&&t&&this.needClearSurveyLogicForUpdate(e,t,o)&&(this.surveyLogicForUpdate=void 0)},t.prototype.needClearSurveyLogicForUpdate=function(e,t,o){if(Array.isArray(o))return!0;var i=r.Serializer.findProperty(e.getType(),t);return!!i&&["expression","condition","questionvalue","question"].indexOf(i.type)>-1},t.prototype.updateSurveyLogicValues=function(e,t,o){e&&t&&!r.Helpers.isValueEmpty(o)&&"value"===t&&e.isDescendantOf("itemvalue")&&this.updateSurveyLogicItemValue(e,o)},t.prototype.updateSurveyLogicItemValue=function(e,t){if(e.locOwner&&a.logic.updateExpressionsOnChanging.choiceValue&&!(["choices","rateValues","columns","rows"].indexOf(e.ownerPropertyName)<0)){this.surveyLogicRenaming=!0;var o=this.getSurveyLogicForUpdate();"rows"===e.ownerPropertyName?o.renameRowValue(e,t):o.renameItemValue(e,t),this.surveyLogicRenaming=!1}},t.prototype.createSurveyLogicForUpdate=function(){return new Le(this.survey,this)},t.prototype.updateLogicOnQuestionNameChanged=function(e,t){e!==t&&a.logic.updateExpressionsOnChanging.questionName&&(this.surveyLogicRenaming=!0,this.getSurveyLogicForUpdate().renameQuestion(e,t),this.surveyLogicRenaming=!1)},t.prototype.updateLogicOnColumnNameChanged=function(e,t,o){t&&t!==o&&a.logic.updateExpressionsOnChanging.columnName&&(this.surveyLogicRenaming=!0,this.getSurveyLogicForUpdate().renameColumn(e,t),this.surveyLogicRenaming=!1)},t.prototype.updateChoicesFromQuestionOnColumnNameChanged=function(e,t){this.survey.getAllQuestions().forEach((function(o){o.choicesFromQuestion===e&&(o.choicesFromQuestion=t)}))},t.prototype.isObjQuestion=function(e){return this.isObjThisType(e,"question")},t.prototype.isObjPage=function(e){return this.isObjThisType(e,"page")},t.prototype.isObjThisType=function(e,t){for(var o=r.Serializer.findClass(e.getType());o&&o.parentName;){if(o.name===t)return!0;o=r.Serializer.findClass(o.parentName)}return!!o&&o.name===t},t.prototype.doOnQuestionAdded=function(e,t){e.name=this.generateUniqueName(e,e.name);var o={question:e,page:this.getPageByElement(e),reason:this.addNewElementReason};this.onQuestionAdded.fire(this,o)},t.prototype.doOnPanelAdded=function(e,t){var o={panel:e,page:this.getPageByElement(e),reason:this.addNewElementReason};this.onPanelAdded.fire(this,o)},t.prototype.doOnPageAdded=function(e){var t={page:e};this.onPageAdded.fire(this,t),this.setModified({type:"PAGE_ADDED",newValue:t.page})},t.prototype.getPageByElement=function(e){return this.survey.getPageByElement(e)},t.prototype.getDefaultSurveyJson=function(){var e=a.defaultNewSurveyJSON;return e.pages&&e.pages.length>0&&e.pages[0].name&&(e.pages[0].name=H.getString("ed.newPageName")+"1"),e},t.prototype.setSurvey=function(e){this.surveyValue&&this.surveyValue.dispose(),this.surveyValue=e,this.selectElement(e),this.selectionHistoryController.reset()},t.prototype.getSurveyTextFromDesigner=function(){if(!this.survey)return"";var e=this.survey.toJSON();e=this.singlePageJSON(e);var t=a.jsonEditor.indentation;return this.generateValidJSON?JSON.stringify(e,null,t):(new Z).stringify(e,null,t)},t.prototype.setTextValue=function(e){this.setSurveyJSONTextCallback&&this.setSurveyJSONTextCallback(e)},t.prototype.changeText=function(e,t){if(void 0===t&&(t=!1),this.setTextValue(e),e){var o=new ie(e);o.isJsonCorrect||o.survey?this.initSurveyWithJSON(o.survey.toJSON(),t):this.viewType="editor"}else this.initSurveyWithJSON(void 0,t)},Object.defineProperty(t.prototype,"text",{get:function(){return this.getSurveyJSONTextCallback?this.getSurveyJSONTextCallback().text:this.getSurveyTextFromDesigner()},set:function(e){this.changeText(e,!0)},enumerable:!1,configurable:!0}),t.prototype.getSurveyJSON=function(){if("editor"!=this.viewType)return(new r.JsonObject).toJsonObject(this.survey);var e=this.text,t=new ie(e);return t.isJsonCorrect?(new r.JsonObject).toJsonObject(t.survey):null},t.prototype.getObjectDisplayName=function(e,t,o,i){void 0===o&&(o=void 0),void 0===i&&(i=void 0),i||(i=re.getObjectName(e,this.showObjectTitles));var n={obj:e,displayName:i,area:t,reason:o};return this.onGetObjectDisplayName.fire(this,n),n.displayName},t.prototype.createSurvey=function(e,t){void 0===e&&(e={}),void 0===t&&(t="designer");var o=this.createSurveyCore(e,t);return"designer"!==t&&"modal-question-editor"!==t||So(o,this),o.needRenderIcons=!1,"designer"!=t&&"test"!=t&&(o.locale=H.currentLocale,e.clearInvisibleValues||(o.clearInvisibleValues="onComplete")),this.onSurveyInstanceCreated.fire(this,{survey:o,reason:t}),o},t.prototype.createSurveyCore=function(e,t){return void 0===e&&(e={}),new r.SurveyModel(e)},Object.defineProperty(t.prototype,"state",{get:function(){return this._stateValue?this._stateValue:""},enumerable:!1,configurable:!0}),t.prototype.setState=function(e){if(this._stateValue=e,this.onStateChanged.fire(this,{val:e}),e){this.notify(this.getLocString("ed."+e));var t=this.toolbarItems.filter((function(e){return"svd-save"===e.id}));Array.isArray(t)&&t.length>0&&(t[0].enabled="modified"===this.state,t[0].active="modified"===this.state)}},t.prototype.setModified=function(e){void 0===e&&(e=null),this.setState("modified"),this.onModified.fire(this,e),this.isAutoSave&&this.doAutoSave()},t.prototype.notifySurveyPropertyChanged=function(e){this.clearSurveyLogicForUpdate(e.target,e.name,e.newValue),this.updateSurveyLogicValues(e.target,e.name,e.oldValue);var t=this.currentPlugin;t&&t.onDesignerSurveyPropertyChanged&&t.onDesignerSurveyPropertyChanged(e.target,e.name),this.onSurveyPropertyValueChanged.isEmpty||(e.propertyName=e.name,e.obj=e.target,e.value=e.newValue,this.onSurveyPropertyValueChanged.fire(this,e)),e.type="PROPERTY_CHANGED",this.setModified(e)},t.prototype.notifySurveyItemMoved=function(e){e.type="ELEMENT_REORDERED",this.setModified(e)},t.prototype.notify=function(e,t){void 0===t&&(t="info"),this.onNotify.isEmpty?this.notifier.notify(e,t):this.onNotify.fire(this,{message:e})},t.prototype.convertQuestion=function(e,t){var o=X.convertObject(e,t,this.getDefaultElementJSON(e.getType()));return this.setModified({type:"QUESTION_CONVERTED",className:t,oldValue:e,newValue:o}),o},t.prototype.getDefaultElementJSON=function(e){if(!this.toolbox)return null;var t=this.toolbox.getItemByName(e);return t?t.json:null},t.prototype.singlePageJSON=function(e){if("single"===this.pageEditMode){var t=e.pages;Array.isArray(t)&&t.length>0&&(void 0!==t[0].elements&&(e.elements=t[0].elements),delete e.pages)}return e},Object.defineProperty(t.prototype,"JSON",{get:function(){var e=this.survey.toJSON();return this.singlePageJSON(e)},set:function(e){"editor"==this.viewType?this.setTextValue(JSON.stringify(e)):this.initSurveyWithJSON(e,!0)},enumerable:!1,configurable:!0}),t.prototype.loadSurvey=function(e){var t=this;(new r.dxSurveyService).loadSurvey(e,(function(e,o,i){e&&o&&(t.JSON=o)}))},t.prototype.doClickQuestionCore=function(e,t,o,i){void 0===t&&(t="ADDED_FROM_TOOLBOX"),void 0===o&&(o=-1),void 0===i&&(i=null),0==this.survey.pageCount&&this.addNewPageIntoSurvey();var n=this.currentPage;"bypage"===this.pageEditMode&&(n=this.getPlugin("designer").model.pagesController.page2Display);var r=this.getSelectedSurveyElement();r&&r.parent&&r.page==n&&r!==i&&(n=r.parent,o<0&&(o=n.elements.indexOf(r))>-1&&o++),i&&(n=i),this.addNewElementReason=t;var a=this.findRowByElement(r,n);e.setVisibleIndex(-1),a&&this.isRowMultiline(a)?this.addElemenMultiline(n,e,o,a):n.addElement(e,o),this.addNewElementReason="",this.setModified({type:t,question:e})},t.prototype.isRowMultiline=function(e){return e.elements.length>1},t.prototype.findRowByElement=function(e,t){return e?e.isPage?e.rows[e.rows.length-1]:t.rows.find((function(t){return-1!==t.elements.indexOf(e)})):null},t.prototype.addElemenMultiline=function(e,t,o,i){var n=i.elements.length,r=i.elements[n-1];r.startWithNewLine=!0,e.addElement(t,o),r.startWithNewLine=!1},t.prototype.setNewNames=function(e){this.newQuestions=[],this.newPanels=[],this.newQuestionChangedNames={},this.setNewNamesCore(e),this.updateNewElementExpressions(e)},t.prototype.updateNewElementExpressions=function(e){var t=this.createSurvey({},"updateNewElementExpressions");t.setDesignMode(!0),e.isPage?t.addPage(e):(t.addNewPage("p1"),t.pages[0].addElement(e));var o=new Le(t);for(var i in this.newQuestionChangedNames)o.renameQuestion(i,this.newQuestionChangedNames[i])},t.prototype.getAllQuestions=function(){for(var e=[],t=0;t<this.survey.pages.length;t++)this.addElements(this.survey.pages[t].elements,!1,e);return this.addElements(this.newPanels,!1,e),this.addElements(this.newQuestions,!1,e),e},t.prototype.getAllPanels=function(){for(var e=[],t=0;t<this.survey.pages.length;t++)this.addElements(this.survey.pages[t].elements,!0,e);return this.addElements(this.newPanels,!0,e),this.addElements(this.newQuestions,!0,e),e},t.prototype.addElements=function(e,t,o){for(var i=0;i<e.length;i++)e[i].isPanel===t&&o.push(e[i]),this.addElements(re.getElements(e[i]),t,o)},t.prototype.getNewName=function(e,t){return"page"==e?re.getNewPageName(this.survey.pages):t?this.getNewPanelName():this.getNewQuestionName()},t.prototype.getNewQuestionName=function(){return re.getNewQuestionName(this.getAllQuestions())},t.prototype.getNewPanelName=function(){return re.getNewPanelName(this.getAllPanels())},t.prototype.setNewNamesCore=function(e){var t=e.getType(),o=this.getNewName(t,e.isPanel);if(o!=e.name&&(this.newQuestionChangedNames[e.name]=o,e.name=o),e.isPanel||"page"==t){e.isPanel&&this.newPanels.push(e);for(var i=e,n=0;n<i.elements.length;n++)this.setNewNamesCore(i.elements[n])}else this.newQuestions.push(e)},t.prototype.createNewElement=function(e){var t=r.Serializer.createClass(e.type);return(new r.JsonObject).toObject(e,t),this.setNewNames(t),t},t.prototype.copyElement=function(e){var t=(new r.JsonObject).toJsonObject(e);return t.type=e.getType(),this.createNewElement(t)},t.prototype.fastCopyQuestion=function(e){var t=this.copyElement(e),o=e.parent?e.parent.elements.indexOf(e)+1:-1;return this.doClickQuestionCore(t,"ELEMENT_COPIED",o),t},Object.defineProperty(t.prototype,"selectedElement",{get:function(){return this.selectedElementValue},set:function(e){this.selectElement(e)},enumerable:!1,configurable:!0}),t.prototype.deleteCurrentObject=function(){this.deleteCurrentElement()},t.prototype.deleteCurrentElement=function(){this.deleteObject(this.selectedElement)},t.prototype.deleteElement=function(e){this.deleteObject(e)},t.prototype.copyPage=function(e){var t=this,o=this.copyElement(e),i=this.survey.pages.indexOf(e);i>-1?this.survey.pages.splice(i+1,0,o):this.survey.pages.push(o),this.addNewElementReason="ELEMENT_COPIED",o.questions.forEach((function(e){return t.doOnQuestionAdded(e,e.parent)}));var n=o.getPanels();return Array.isArray(n)&&n.forEach((function(e){return t.doOnPanelAdded(e,e.parent)})),this.addNewElementReason="",o},t.prototype.deleteObjectCore=function(e){if(e.isPage){var t=this.getNextPage(e);this.survey.removePage(e),this.selectElement(t||this.survey)}else this.deletePanelOrQuestion(e);this.setModified({type:"OBJECT_DELETED",target:e}),this.updateConditionsOnRemove(e)},t.prototype.getNextPage=function(e){var t=this.survey.pages.indexOf(e);return t<0||1==this.survey.pages.length?null:(t==this.survey.pages.length-1?t--:t++,t<0||t>this.survey.pages.length-1?null:this.survey.pages[t])},t.prototype.deleteObject=function(e){var t={element:e,elementType:re.getObjectType(e),allowing:!0};this.onElementDeleting.fire(this,t),t.allowing&&this.deleteObjectCore(e)},t.prototype.updateConditionsOnRemove=function(e){if(re.getObjectType(e)==Y.Question)t=[e];else var t=e.questions;if(t)for(var o=new Le(this.survey,this),i=0;i<t.length;i++)o.removeQuestion(t[i].getValueName())},t.prototype.isElementSelected=function(e){return!(!e||e.isDisposed)&&e.getPropertyValue("isSelectedInDesigner")},t.prototype.selectElement=function(e,t,o,i){if(void 0===o&&(o=!0),void 0===i&&(i=!1),!e||!e.isDisposed&&(!e.isQuestion&&!e.isPanel||e.parent)){var n=this.selectedElement;n!==e&&(this.selectedElementValue=this.onSelectingElement(e),n!==this.selectedElementValue&&(n&&!n.isDisposed&&n.setPropertyValue("isSelectedInDesigner",!1),this.selectedElementValue&&this.selectedElementValue.setPropertyValue("isSelectedInDesigner",!0))),(n!==e||t)&&this.selectionChanged(this.selectedElement,t,!!o);var r=this.getSelectedSurveyElement();n!==e&&document&&r&&this.focusElement(e,o,r,t,i)}},t.prototype.focusElement=function(e,t,o,i,n){void 0===o&&(o=null),void 0===i&&(i=null),void 0===n&&(n=null),o||(o=this.getSelectedSurveyElement()),setTimeout((function(){if(t&&o){var r=document.getElementById(o.id);if(r&&(r.scrollIntoView({block:"center"}),!i&&r.parentElement)){var a="string"==typeof t?r.parentElement.querySelector(t):r.parentElement;a&&a.focus()}}n&&e&&io.get(e.locTitle).activateEditor()}),100)},t.prototype.getSelectedSurveyElement=function(){var e=this.selectedElement;return e&&"survey"!=e.getType()&&e.isInteractiveDesignElement&&e.id?e:null},t.prototype.onSelectingElement=function(e){var t={newSelectedElement:e};return this.onSelectedElementChanging.fire(this,t),t.newSelectedElement},Object.defineProperty(t.prototype,"designerPropertyGrid",{get:function(){var e=this.sidebar.getTabById("propertyGrid");return e&&e.model?e.model.propertyGridModel:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propertyGrid",{get:function(){return this.designerPropertyGrid.survey},enumerable:!1,configurable:!0}),t.prototype.collapsePropertyGridCategory=function(e){this.designerPropertyGrid&&this.designerPropertyGrid.collapseCategory(e)},t.prototype.expandPropertyGridCategory=function(e){this.designerPropertyGrid&&this.designerPropertyGrid.expandCategory(e)},t.prototype.collapseAllPropertyGridCategories=function(){this.designerPropertyGrid&&this.designerPropertyGrid.collapseAllCategories()},t.prototype.expandAllPropertyGridCategories=function(){this.designerPropertyGrid&&this.designerPropertyGrid.expandAllCategories()},t.prototype.collapseAllPropertyTabs=function(){this.collapseAllPropertyGridCategories()},t.prototype.expandAllPropertyTabs=function(){this.expandAllPropertyGridCategories()},t.prototype.expandPropertyTab=function(e){this.expandPropertyGridCategory(e)},t.prototype.collapsePropertyTab=function(e){this.collapsePropertyGridCategory(e)},t.prototype.validateSelectedElement=function(){var e=!0;return this.selectedElement?(this.designerPropertyGrid&&(e=this.designerPropertyGrid.validate()),e):e},t.prototype.deleteLocaleStrings=function(e){new mt(this.survey).deleteLocaleStrings(e)},t.prototype.getPropertyGridExpandedCategory=function(){if(this.designerPropertyGrid){for(var e=this.designerPropertyGrid.survey.getAllPanels(),t=0;t<e.length;t++)if(e[t].isExpanded)return e[t].name;return""}},t.prototype.expandCategoryIfNeeded=function(){var e=a.propertyGrid.defaultExpandedTabName;if(e&&!this.getPropertyGridExpandedCategory()&&!this.survey.isEmpty){var t=this.designerPropertyGrid.survey.getPanelByName(e);t&&t.expand()}},t.prototype.selectionChanged=function(e,t,o){void 0===o&&(o=!0),this.survey.currentPage=this.getCurrentPageByElement(e),this.selectionHistoryController.onObjSelected(e),this.designerPropertyGrid&&(this.designerPropertyGrid.obj=e,t||(t=this.designerPropertyGrid.currentlySelectedProperty),t&&this.designerPropertyGrid.selectProperty(t,o||!this.selectFromStringEditor),this.expandCategoryIfNeeded(),this.selectFromStringEditor=!1);var i={newSelectedElement:e};this.onSelectedElementChanged.fire(this,i)},t.prototype.getCurrentPageByElement=function(e){if(e)return e.isPage?e:e.page?e.page:e.parentQuestion?this.getCurrentPageByElement(e.parentQuestion):void 0},t.prototype.clickToolboxItem=function(e,t,o){void 0===t&&(t=null),void 0===o&&(o="ADDED_FROM_TOOLBOX"),this.readOnly||(void 0===e.getType&&(e=this.createNewElement(e)),this.survey.lazyRendering=!1,this.doClickQuestionCore(e,o,-1,t),this.selectElement(e,null,!0,this.startEditTitleOnQuestionAdded))},t.prototype.getJSONForNewElement=function(e){var t=this.createNewElement(e);return(e=t.toJSON()).type=t.getType(),e},t.prototype.chooseFiles=function(e,t){if(this.onOpenFileChooser.isEmpty){if(!window||!window.FileReader)return;e.value="",e.onchange=function(o){if(window.FileReader&&e&&e.files&&!(e.files.length<1)){for(var i=[],n=0;n<e.files.length;n++)i.push(e.files[n]);t(i)}},e.click()}else this.onOpenFileChooser.fire(this,{input:e,callback:t})},t.prototype.uploadFiles=function(e,t,o){if(this.onUploadFile.isEmpty){var i=new FileReader;i.onload=function(e){o("success",i.result)},i.readAsDataURL(e[0])}else this.onUploadFile.fire(this,{question:t,files:e||[],callback:o})},t.prototype.initKeyboardShortcuts=function(e){e&&e.addEventListener("keydown",this.onKeyDownHandler)},t.prototype.removeKeyboardShortcuts=function(e){e&&e.removeEventListener("keydown",this.onKeyDownHandler)},t.prototype.registerShortcut=function(e,t){this.shortcuts[e]=t},t.prototype.unRegisterShortcut=function(e){delete this.shortcuts[e]},t.prototype.deletePanelOrQuestion=function(e){var t=e.parent,o=t.elements,i=o.indexOf(e);i==o.length-1&&i--,"single"===this.pageEditMode&&"page"===t.getType()&&(t=this.survey),e.delete(),this.selectElement(i>-1?o[i]:t)},t.prototype.onCanShowObjectProperty=function(e,t,o,i,n){var r={obj:e,property:t,canShow:!0,showMode:o,parentObj:i,parentProperty:n};return this.onCanShowProperty.fire(this,r),r.canShow},t.prototype.canDeleteItem=function(e,t,o){var i={obj:e,item:t,canDelete:o};return this.onCanDeleteItem.fire(this,i),i.canDelete},t.prototype.getErrorOnPropertyChanging=function(e,t,o){if("name"!==t)return null;if(re.getObjectType(e)===Y.Unknown)return null;return(re.getObjectType(e)===Y.Column?!!e.colOwner&&!this.isNameUniqueInArray(e.colOwner.columns,e,o):this.generateUniqueName(e,o)!==o)?this.getLocString("pe.propertyNameIsNotUnique"):null},t.prototype.generateUniqueName=function(e,t){var o={element:e,name:t,isUnique:!0};do{for(o.isUnique||(o.name=re.generateNewName(o.name));!this.isNameUnique(e,o.name);)o.name=re.generateNewName(o.name);o.isUnique=!0;var i=o.name;this.onGenerateNewName.fire(this,o),i!=o.name&&(o.isUnique=this.isNameUnique(e,o.name))}while(!o.isUnique);return o.name},t.prototype.isNameUnique=function(e,t){return!!this.isNameUniqueInArray(this.survey.pages,e,t)&&(!!this.isNameUniqueInArray(this.survey.getAllPanels(),e,t)&&this.isNameUniqueInArray(this.survey.getAllQuestions(),e,t))},t.prototype.isNameUniqueInArray=function(e,t,o){if(!Array.isArray(e))return!0;o=o.toLowerCase();for(var i=0;i<e.length;i++)if(e[i]!=t&&e[i].name.toLowerCase()==o)return!1;return!0},t.prototype.doPropertyGridChanged=function(){},Object.defineProperty(t.prototype,"alwaySaveTextInPropertyEditors",{get:function(){return this.alwaySaveTextInPropertyEditorsValue},set:function(e){this.alwaySaveTextInPropertyEditorsValue=e},enumerable:!1,configurable:!0}),t.prototype.onCanShowPropertyCallback=function(e,t,o,i,n){return void 0===o&&(o=null),this.onCanShowObjectProperty(e,t,o,i,n)},t.prototype.onPropertyGridSurveyCreatedCallback=function(e,t){var o={obj:e,survey:t};this.onPropertyGridSurveyCreated.fire(this,o)},t.prototype.onPropertyEditorCreatedCallback=function(e,t,o){var i={obj:e,property:t,editor:o};this.onPropertyEditorCreated.fire(this,i)},t.prototype.onPropertyEditorUpdateTitleActionsCallback=function(e,t,o,i){var n={obj:e,property:t,editor:o,titleActions:i};this.onPropertyEditorUpdateTitleActions.fire(this,n)},t.prototype.onPropertyGridShowModalCallback=function(e,t,o,i,n){var r={obj:e,property:t,editor:o,popupEditor:i,popupModel:n};this.onPropertyGridShowModal.fire(this,r)},t.prototype.onCanDeleteItemCallback=function(e,t,o){return this.canDeleteItem(e,t,o)},t.prototype.onCollectionItemDeletingCallback=function(e,t,o,i){if(this.onCollectionItemDeleting.isEmpty)return!0;var n={obj:e,property:t,propertyName:t.name,collection:o,item:i,allowDelete:!0};return this.onCollectionItemDeleting.fire(this,n),n.allowDelete},t.prototype.onCollectionItemAllowingCallback=function(e,t,o,i,n){if(!this.onCollectionItemAllowOperations.isEmpty){var r={obj:e,property:t,propertyName:t&&t.name,collection:o,item:i,allowEdit:n.allowEdit,allowDelete:n.allowDelete,allowAdd:n.allowAdd};this.onCollectionItemAllowOperations.fire(this,r),n.allowEdit=r.allowEdit,n.allowDelete=r.allowDelete,n.allowAdd=r.allowAdd}},t.prototype.onItemValueAddedCallback=function(e,t,o,i){var n={obj:e,propertyName:t,newItem:o,itemValues:i};this.onItemValueAdded.fire(this,n)},t.prototype.onMatrixDropdownColumnAddedCallback=function(e,t,o){var i={newColumn:t,matrix:e,columns:o};this.onMatrixColumnAdded.fire(this,i)},t.prototype.onSetPropertyEditorOptionsCallback=function(e,t,o){var i={propertyName:e,obj:t,editorOptions:o};this.onSetPropertyEditorOptions.fire(this,i)},t.prototype.onGetErrorTextOnValidationCallback=function(e,t,o){var i=this.getErrorOnPropertyChanging(t,e,o);if(i)return i;var n={propertyName:e,obj:t,value:o,error:""};return this.onPropertyValidationCustomError.fire(this,n),n.error},t.prototype.onValueChangingCallback=function(e){this.onPropertyValueChanging.fire(this,e)},t.prototype.onGetElementEditorTitleCallback=function(e,t){return t},t.prototype.onConditionQuestionsGetListCallback=function(e,t,o,i){if(this.onConditionQuestionsGetList.isEmpty)return"asc";var n={propertyName:e,obj:t,editor:o,sortOrder:"asc",list:i};if(this.onConditionQuestionsGetList.fire(this,n),n.list!==i){i.splice(0,i.length);for(var r=0;r<n.list.length;r++)i.push(n.list[r])}return n.sortOrder},t.prototype.onConditionGetTitleCallback=function(e,t){var o={expression:e,title:t};return this.onConditionGetTitle.fire(this,o),o.title},t.prototype.onLogicGetTitleCallback=function(e,t,o,i){if(this.onLogicItemDisplayText.isEmpty)return o;var n={expression:e,expressionText:t,text:o,logicItem:i};return this.onLogicItemDisplayText.fire(this,n),n.text},t.prototype.getProcessedTranslationItemText=function(e,t,o,i){if(this.onTranslationItemChanging.isEmpty)return o;var n={locale:e,obj:i,locString:t,newText:o};return this.onTranslationItemChanging.fire(this,n),n.newText},t.prototype.getTranslationExportedText=function(e,t,o,i,n){if(this.onTranslationExportItem.isEmpty)return n;var r={obj:e,locString:o,locale:i,text:n};return this.onTranslationExportItem.fire(this,r),r.text},t.prototype.doAutoSave=function(){if(this.autoSaveDelay<=0)this.doSave();else{this.autoSaveTimerId&&clearTimeout(this.autoSaveTimerId);var e=this;this.autoSaveTimerId=setTimeout((function(){clearTimeout(e.autoSaveTimerId),e.autoSaveTimerId=null,e.doSave()}),this.autoSaveDelay)}},t.prototype.doSave=function(){var e=this;this.setState("saving"),this.saveSurveyFunc&&(this.saveNo++,this.saveSurveyFunc(this.saveNo,(function(t,o){e.saveNo===t&&(o?e.setState("saved"):(e.setState("modified"),e.showErrorOnFailedSave&&e.notify(e.getLocString("ed.saveError"),"error")))})))},Object.defineProperty(t.prototype,"saveSurveyFunc",{get:function(){return this.saveSurveyFuncValue},set:function(e){this.saveSurveyFuncValue=e,this.showSaveButton=null!=e&&!this.isAutoSave},enumerable:!1,configurable:!0}),t.prototype.convertCurrentQuestion=function(e){var t=this.selectedElement;if(t&&t.getType()!==e){var o=re.getObjectType(t);o!==Y.Question&&o!==Y.Panel||(t=this.convertQuestion(t,e),this.selectElement(t,null,"#convertTo button"))}},t.prototype.getAddNewQuestionText=function(e){if(void 0===e&&(e=null),e||(e=this.currentAddQuestionType),e){var t=this.getLocString("ed.addNewTypeQuestion");if(t&&t.format)return t.format(this.toolbox.items.filter((function(t){return t.name==e}))[0].title)}return this.getLocString("ed.addNewQuestion")},Object.defineProperty(t.prototype,"addNewQuestionText",{get:function(){return this.getAddNewQuestionText()},enumerable:!1,configurable:!0}),t.prototype.getQuestionTypeSelectorModel=function(e,t){var o=this;void 0===t&&(t=null);var i=this.toolbox.items.map((function(e){return o.createIActionBarItemByClass(e.name,e.title,e.iconName,e.needSeparator)})),n=new r.ListModel(i,(function(i){o.currentAddQuestionType=i.id,o.addNewQuestionInPage(e,t),a.toggleVisibility()}),!1);n.locOwner=this;var a=new r.PopupModel("sv-list",{model:n},"bottom","center");return{iconName:"icon-more",title:this.getLocString("ed.addNewQuestion"),action:function(){a.displayMode=o.isMobileView?"overlay":"popup",a.toggleVisibility()},popupModel:a}},t.prototype.getUpdatedPageAdornerFooterActions=function(e,t){var o={page:e.page,addNewQuestion:function(t){e.addNewQuestion(e,void 0,t)},actions:t};return this.onGetPageActions.fire(this,o),o.actions},t.prototype.addNewQuestionInPage=function(e,t,o){void 0===t&&(t=null),void 0===o&&(o=null),o||(o=this.currentAddQuestionType),o||(o=a.designer.defaultAddQuestionType),e(o);var i={type:o},n=this.toolbox.getItemByName(o);n&&n.json&&(i=n.json);var r=this.createNewElement(i);this.clickToolboxItem(r,t,"ADDED_FROM_PAGEBUTTON")},t.prototype.createIActionBarItemByClass=function(e,t,o,i){var n=new r.Action({title:t,id:e,iconName:o});return n.needSeparator=i,n},t.prototype.onElementMenuItemsChanged=function(e,t){this.onDefineElementMenuItems.fire(this,{obj:e,items:t})},t.prototype.getElementAllowOperations=function(e){var t={obj:e,element:e,allowDelete:!0,allowCopy:!0,allowDragging:!0,allowChangeType:!0,allowChangeInputType:!0,allowChangeRequired:!0,allowEdit:void 0};return this.onElementAllowOperations.fire(this,t),t},t.prototype.getChoicesItemBaseTitle=function(){return this.getLocString("ed.choices_Item")||r.surveyLocalization.getString("choices_Item")},t.prototype.getNextItemValue=function(e){return p(this.getChoicesItemBaseTitle(),e.choices)},t.prototype.createNewItemValue=function(e,t,o){void 0===t&&(t=!0);var i=this.getNextItemValue(e),n=e.createItemValue(i);if(n.text=d(e.choices),e.choices.push(n),o&&o(n),t){var r=n.ownerPropertyName?n.ownerPropertyName:"choices";this.onItemValueAddedCallback(e,r,n,e.choices)}return n},t.prototype.onPropertyValueChanged=function(t,o,i){var n=this;e.prototype.onPropertyValueChanged.call(this,t,o,i),"viewType"===t&&this.tabs.forEach((function(e){var t=n.viewType===e.id;e.active=t,e.disableHide=t}))},t.prototype.initResponsivityManager=function(e){this.responsivityManager=new Zt(e,this)},t.prototype.resetResponsivityManager=function(){this.responsivityManager&&(this.responsivityManager.dispose(),this.responsivityManager=void 0)},t.prototype.dispose=function(){var t=this;this.isCreatorDisposed=!0,this.tabs=[],Object.keys(this.plugins).forEach((function(e){var o=t.plugins[e];"function"==typeof o.deactivate&&o.deactivate(),"function"==typeof o.dispose&&o.dispose()})),e.prototype.dispose.call(this)},U([Object(r.property)({defaultValue:!0})],t.prototype,"showDesignerTab",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"showJSONEditorTab",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"showTestSurveyTab",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"showThemeTab",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"showEmbeddedSurveyTab",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"showTranslationTab",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"showLogicTab",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"useTableViewInLogicTab",void 0),U([Object(r.property)({defaultValue:200})],t.prototype,"pageHoverDelay",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"inplaceEditForValues",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"haveCommercialLicense",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"isAutoSave",void 0),U([Object(r.property)()],t.prototype,"showOptions",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"showSearch",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"generateValidJSON",void 0),U([Object(r.property)({defaultValue:""})],t.prototype,"currentAddQuestionType",void 0),U([Object(r.property)({defaultValue:"landscape"})],t.prototype,"previewOrientation",void 0),U([Object(r.property)()],t.prototype,"surveyValue",void 0),U([Object(r.property)()],t.prototype,"viewType",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"showToolboxValue",void 0),U([Mt()],t.prototype,"addPage",null),U([Dt()],t.prototype,"doOnQuestionAdded",null),U([Dt()],t.prototype,"doOnPanelAdded",null),U([Dt()],t.prototype,"doOnPageAdded",null),U([Mt()],t.prototype,"deleteObject",null),U([Object(r.property)({defaultValue:!1})],t.prototype,"showSaveButton",void 0),U([Mt()],t.prototype,"convertCurrentQuestion",null),U([Mt()],t.prototype,"addNewQuestionInPage",null),U([Object(r.property)({defaultValue:!1})],t.prototype,"showHeaderInEmptySurvey",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"showPageNavigator",void 0),U([Object(r.property)({getDefaultValue:function(){return a.layout.showTabs}})],t.prototype,"showTabs",void 0),U([Object(r.property)({getDefaultValue:function(){return a.layout.showToolbar}})],t.prototype,"showToolbar",void 0),U([Object(r.property)({getDefaultValue:function(){return a.layout.allowCollapseSidebar}})],t.prototype,"allowCollapseSidebar",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"isMobileView",void 0),U([Object(r.property)({defaultValue:"left",onSet:function(e,t){t.toolbox&&(t.toolbox.setLocation(e),t.updateToolboxIsCompact())}})],t.prototype,"toolboxLocation",void 0),U([Object(r.property)({defaultValue:"right"})],t.prototype,"sidebarLocation",void 0),U([Object(r.property)({defaultValue:!1,onSet:function(e,t){if(!e)throw new Error("Creator is disposed")}})],t.prototype,"isCreatorDisposed",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"enableLinkFileEditor",void 0),t}(r.Base),xo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t}(Co),To=function(){function e(){}return Object.defineProperty(e,"currentTheme",{get:function(){re.warnNonSupported("StylesManager")},set:function(e){re.warnNonSupported("StylesManager")},enumerable:!1,configurable:!0}),e.applyTheme=function(e){re.warnNonSupported("StylesManager")},e}();function So(e,t){e.creator=t,e.isPopupEditorContent=!1;var o=e.getElementWrapperComponentName;e.getElementWrapperComponentName=function(t,i){return Oo(t,i,e.isPopupEditorContent)||o.call(e,t,i)};var i=e.getQuestionContentWrapperComponentName;e.getQuestionContentWrapperComponentName=function(t,o){return Io(t)||i.call(e,t,o)};var n=e.getElementWrapperComponentData;e.getElementWrapperComponentData=function(o,i){return Vo(o,i,t)||n.call(e,o,i)},e.getRowWrapperComponentName=function(e){return"svc-row"},e.getRowWrapperComponentData=function(e){return{creator:t,row:e}},e.getItemValueWrapperComponentName=function(e,t){return No(e,t)},e.getItemValueWrapperComponentData=function(e,o){return Ao(e,o,t)},e.getRendererForString=function(e,o){if(!t.readOnly&&_o(e,o))return Eo},e.getRendererContextForString=function(e,o){return!t.readOnly&&_o(e,o.name)?{creator:t,element:e,locStr:o}:o}}function Po(e){for(var t=e;t;){if(t.isContentElement)return!0;t=t.parentQuestion}return!1}var Eo="svc-string-editor";function Oo(e,t,o){if("logo-image"===t)return"svc-logo-image";if("cell"===t||"column-header"===t||"row-header"===t)return"svc-matrix-cell";if(!Po(e)){if(e instanceof r.Question){var i=e.isDescendantOf("dropdown")||e.isDescendantOf("tagbox");return o?i?"svc-cell-dropdown-question":"svc-cell-question":e.customWidget?"svc-widget-question":i?"svc-dropdown-question":e.isDescendantOf("image")?"svc-image-question":"svc-question"}if(e instanceof r.PanelModel)return"svc-panel"}}function Io(e){if(e.isDescendantOf("rating")&&!Po(e))return"svc-rating-question-content"}function Vo(e,t,o){return"logo-image"===t?o:"cell"===t||"column-header"===t||"row-header"===t?{creator:o,element:e,question:e.question,row:e.row,column:e.column}:Oo(e,t,!1)?e instanceof r.Question||e instanceof r.PanelModel?o:null:void 0}function No(e,t){return Po(t)?r.SurveyModel.TemplateRendererComponentName:t.isDescendantOf("imagepicker")?"svc-image-item-value":"svc-item-value"}function Ao(e,t,o){return t.isContentElement?e:{creator:o,question:t,item:e}}function _o(e,t){return!(!!e.data&&e.parentQuestion instanceof r.QuestionMatrixDropdownModelBase)&&(!Po(e)||e.isEditableTemplateElement)}function Lo(e){if(!e.tagName)return!1;var t=e.tagName.toLowerCase();return-1!==["input","textarea"].indexOf(t)||-1!==["span","div"].indexOf(t)&&e.isContentEditable}function jo(e,t){re.warnNonSupported("registerAdorner","This functionality is no longer supported.")}function ko(e){void 0===e&&(e=void 0),re.warnNonSupported("removeAdorners","This functionality is no longer supported.")}function Mo(e,t,o){var i=e.contentPanel.questions[0];"colorTitleLocation"==t&&(i.titleLocation=o),"colorTitle"==t&&(i.title=o),"choices"==t&&(i.choices=o)}function Do(e){return _(e.color,e.opacity/100)}function Ro(e){return e.map((function(e){var t,o,i,n,r;return(1==e.isInset?"inset ":"")+(null!==(t=e.x)&&void 0!==t?t:0)+"px "+(null!==(o=e.y)&&void 0!==o?o:0)+"px "+(null!==(i=e.blur)&&void 0!==i?i:0)+"px "+(null!==(n=e.spread)&&void 0!==n?n:0)+"px "+(null!==(r=e.color)&&void 0!==r?r:"#000000")})).join(", ")}function Bo(e){return e.split(/,(?![^(]*\))/).map((function(e){var t=e.match(/#[a-zA-Z0-9]+|rgba?\(.*?\)/),o=e.indexOf("inset")>-1,i={};o&&(e=e.replace("inset","")),t&&(i.color=t[0]);var n=e.replace(/\s+/g," ").replace(/^\s|\s$/g,"").split(" ");return i.x=parseInt(n[0])||0,i.y=parseInt(n[1])||0,i.blur=parseInt(n[2])||0,i.spread=parseInt(n[3])||0,i.isInset=o,i}))}r.ComponentCollection.Instance.add({name:"colorsettings",showInToolbox:!1,elementsJSON:[{name:"color",type:"color",titleLocation:"hidden"},{name:"opacity",startWithNewLine:!1,type:"spinedit",title:Q("theme.opacity"),min:0,max:100,unit:"%",titleLocation:"left"}],onInit:function(){r.Serializer.addProperties("colorsettings",[{name:"choices:itemvalue[]"},{name:"colorTitleLocation:string",default:"hidden"},{name:"colorTitle:string"}])},onLoaded:function(e){Mo(e,"colorTitle",e.colorTitle),Mo(e,"colorTitleLocation",e.colorTitleLocation),Mo(e,"choices",e.choices)},onPropertyChanged:function(e,t,o){Mo(e,t,o)},valueToQuestion:function(e){return e?Do(e):""},valueFromQuestion:function(e){return"string"==typeof e?k(e):e},onCreated:function(e){e.contentPanel.questions.forEach((function(e){return e.allowRootStyle=!1}))}}),r.ComponentCollection.Instance.add({name:"boxshadowsettings",showInToolbox:!1,questionJSON:{type:"paneldynamic",minPanelCount:1,panelAddText:Q("theme.boxShadowAddRule"),templateElements:[{type:"spinedit",name:"x",unit:"px",title:Q("theme.boxShadowX"),titleLocation:"left",min:0},{type:"spinedit",name:"y",unit:"px",min:0,startWithNewLine:!1,title:Q("theme.boxShadowY"),titleLocation:"left"},{type:"spinedit",name:"blur",unit:"px",title:Q("theme.boxShadowBlur"),min:0,titleLocation:"left"},{type:"spinedit",name:"spread",unit:"px",min:0,startWithNewLine:!1,title:Q("theme.boxShadowSpread"),titleLocation:"left"},{type:"colorsettings",name:"color",titleLocation:"hidden"},{type:"buttongroup",name:"isInset",titleLocation:"hidden",choices:[{text:Q("theme.boxShadowDrop"),value:!1},{text:Q("theme.boxShadowInner"),value:!0}]}]},onCreated:function(e){e.valueFromDataCallback=function(e){return"string"==typeof e?Bo(e):e},e.valueToDataCallback=function(e){return e?"string"==typeof e?e:Ro(Array.isArray(e)?e:[e]):""},e.contentQuestion.panels.forEach((function(e){return e.questions.forEach((function(e){return e.allowRootStyle=!1}))}))}});var qo=function(e){function t(t,o){var i=e.call(this)||this;return i.item=t,i.creator=o,i.click=function(e){i.allowAdd&&i.creator.clickToolboxItem(i.item.json)},i.onPointerUp=function(e){i._node.classList.remove("svc-toolbox__tool--pressed"),i._node=null,document.removeEventListener("pointerup",i.onPointerUp)},i.startDragToolboxItem=function(e,t){var o=i.creator.getJSONForNewElement(i.item.json);return i.dragDropHelper.startDragToolboxItem(e,o,i.item.title),!0},i.dragOrClickHelper=new r.DragOrClickHelper(i.startDragToolboxItem),i}return z(t,e),Object.defineProperty(t.prototype,"allowAdd",{get:function(){return!this.creator.readOnly},enumerable:!1,configurable:!0}),t.prototype.onPointerDown=function(e){if(this.allowAdd){if(0===this.item.id.indexOf("dotsItem-id"))return!0;this.dragOrClickHelper.onPointerDown(e),this._node=e.currentTarget,this._node.classList.add("svc-toolbox__tool--pressed"),document.addEventListener("pointerup",this.onPointerUp)}},Object.defineProperty(t.prototype,"dragDropHelper",{get:function(){return this.creator.dragDropSurveyElements},enumerable:!1,configurable:!0}),t}(r.Base);o(19),o(20);var Ho=function(e){function t(t,o){var i=e.call(this)||this;return i.pagesController=t,i.pageEditMode=o,i.pagesChangedFunc=function(e,t){i.buildItems()},i.currentPagesChangedFunc=function(e,t){i.currentPage=i.pagesController.currentPage},i.togglePageSelector=function(e){return i.popupModel.toggleVisibility()},i.icon="icon-select-page",i.pagesController.onPagesChanged.add(i.pagesChangedFunc),i.pagesController.onCurrentPageChanged.add(i.currentPagesChangedFunc),i.pageListModel=new r.ListModel([],(function(e){i.pagesController.selectPage(e.data),i.popupModel.toggleVisibility()}),!0),i.popupModel=new r.PopupModel("sv-list",{model:i.pageListModel}),i.pagesController&&(i.popupModel.horizontalPosition=i.pagesController.creator.toolboxLocation),i.popupModel.onShow=function(){i.pageListModel.selectedItem=i.getActionBarByPage(i.pagesController.currentPage),i.isPopupOpened=!0},i.popupModel.onHide=function(){i.isPopupOpened=!1},i.pagesController.creator.onPropertyChanged&&i.pagesController.creator.onPropertyChanged.add((function(e,t){"toolboxLocation"===t.name&&("sidebar"==i.pagesController.creator.toolboxLocation?i.popupModel.horizontalPosition="right":i.popupModel.horizontalPosition=i.pagesController.creator.toolboxLocation)})),i.buildItems(),i}return z(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.stopItemsContainerHeightObserver(),this.pagesController.onPagesChanged.remove(this.pagesChangedFunc),this.pagesController.onCurrentPageChanged.remove(this.currentPagesChangedFunc)},t.prototype.getActionBarByPage=function(e){for(var t=0;t<this.items.length;t++)if(this.items[t].data===e)return this.items[t];return null},t.prototype.setItems=function(e){this.items=e,this.pageListModel.setItems(e),this.visible=e.length>1||"bypage"===this.pageEditMode},t.prototype.buildItems=function(){this.currentPage=this.pagesController.currentPage||this.pagesController.pages[0];for(var e=[],t=this.pagesController.pages,o=0;o<t.length;o++)e.push(this.createActionBarItem(t[o]));if("bypage"===this.pagesController.creator.pageEditMode){var i=this.pagesController.creator.getPlugin("designer").model.newPage;i&&e.push(this.createActionBarItem(i))}this.setItems(e)},t.prototype.patchContainerOffset=function(e){for(;e;){if(-1!==e.className.indexOf("svc-tab-designer--with-page-navigator"))return void(e.offsetParent.scrollTop=0);e=e.parentElement}},t.prototype.createActionBarItem=function(e){var t=this,o={id:e.id,title:new r.ComputedUpdater((function(){var o=e.name,i=e.title;return t.pagesController?t.pagesController.getDisplayName(e):i||o}))};return o.active=new r.ComputedUpdater((function(){return e===t.currentPage})),o.action=function(o){t.scrollToPage(e)},o.data=e,this.createActionBarCore(o)},t.prototype.scrollToPage=function(e){var t=this;if("bypage"===this.pageEditMode)return this.pagesController.currentPage=e,this.currentPage=e,void this.pagesController.creator.selectElement(this.pagesController.currentPage);var o=document.getElementById(e.id);if(o){var i=this.pagesController.pages.indexOf(e)===this.pagesController.pages.length-1;this._scrollableContainer?(this._scrollableContainer.scrollTo(this._scrollableContainer.scrollLeft,o.offsetTop-20),this.patchContainerOffset(o),i&&setTimeout((function(){t._scrollableContainer.scrollTo(t._scrollableContainer.scrollLeft,o.offsetTop-20),t.patchContainerOffset(o)}),50)):(o.scrollIntoView({block:"start"}),this.patchContainerOffset(o),i&&setTimeout((function(){o.scrollIntoView({block:"start"}),t.patchContainerOffset(o)}),50))}},t.prototype.createActionBarCore=function(e){return new r.Action(e)},Object.defineProperty(t.prototype,"pageSelectorCaption",{get:function(){return Q("ed.selectPage")},enumerable:!1,configurable:!0}),t.prototype.onContainerScroll=function(e){var t=e.scrollTop,o=e.clientHeight,i=t+o,n=[],r=void 0,a=0;return this.pagesController.pages.forEach((function(e){var o=document.getElementById(e.id);if(o){var s=o.offsetTop,l=s+o.clientHeight;if(!(s<i||l>t))return;var u=s-t,c=i-l,p=o.clientHeight;u<0&&(p+=u),c<0&&(p+=c),(p/=o.clientHeight)>0&&(n.push({page:e,visiblePart:p}),p>a&&(a=p,r=e))}})),this.currentPage=r,n},t.prototype.stopItemsContainerHeightObserver=function(){this._itemsContainer=void 0,this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=void 0),this.isDisposed||(this.visibleItemsStartIndex=0,this.visibleItemsCount=Number.MAX_VALUE)},t.prototype.setScrollableContainer=function(e){this._scrollableContainer=e},t.prototype.setItemsContainer=function(e){var t=this;this.stopItemsContainerHeightObserver(),this._itemsContainer=e,this._resizeObserver=new ResizeObserver((function(e,o){return t.updateVisibleItems(e[0].contentBoxSize[0].blockSize)})),this._resizeObserver.observe(e)},t.prototype.updateVisibleItems=function(e){var o=e-t.PAGE_NAVIGATION_MENU_ITEM_HEIGHT;this.visibleItemsCount=Math.floor(o/t.PAGE_NAVIGATION_ITEM_HEIGHT);var i=this.pagesController.pages.indexOf(this.currentPage),n=0;i>=this.visibleItemsCount&&(n=this.items.length-i-1<this.visibleItemsCount/2?this.items.length-this.visibleItemsCount:i-Math.floor(this.visibleItemsCount/2)),this.visibleItemsStartIndex=n},Object.defineProperty(t.prototype,"visibleItems",{get:function(){return this.items.length<=this.visibleItemsCount?this.items:this.items.slice(this.visibleItemsStartIndex,this.visibleItemsStartIndex+this.visibleItemsCount)},enumerable:!1,configurable:!0}),t.PAGE_NAVIGATION_MENU_ITEM_HEIGHT=44,t.PAGE_NAVIGATION_ITEM_HEIGHT=36,U([Object(r.propertyArray)()],t.prototype,"items",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"visible",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"isPopupOpened",void 0),U([Object(r.property)({onSet:function(e,t){var o=t.pagesController.pages.indexOf(e);if(!(o>=t.visibleItemsStartIndex&&o<t.visibleItemsStartIndex+t.visibleItemsCount)){var i=t.visibleItemsStartIndex;if(o<t.visibleItemsStartIndex&&(i=o),o>=t.visibleItemsStartIndex+t.visibleItemsCount&&(i=o-t.visibleItemsCount+1),t.visibleItemsStartIndex!==i)if(t.visible&&t._itemsContainer){var n=t._itemsContainer.querySelectorAll(".svc-page-navigator__selector + div")[0];if(n){var r="svc-page-navigator__items--"+(t.visibleItemsStartIndex<i?"up":"down");n.className=r,setTimeout((function(){n.className="",t.visibleItemsStartIndex=i}),250)}}else t.visibleItemsStartIndex=i}}})],t.prototype,"currentPage",void 0),U([Object(r.property)({defaultValue:0})],t.prototype,"visibleItemsStartIndex",void 0),U([Object(r.property)({defaultValue:Number.MAX_VALUE})],t.prototype,"visibleItemsCount",void 0),t}(r.Base),Qo=function(e){function t(t,o){var i=e.call(this)||this;i.creator=t,i.surveyElement=o,i.selectedPropPageFunc=function(e,t){"isSelectedInDesigner"===t.name&&i.onElementSelectedChanged(t.newValue)},i.sidebarFlyoutModeChangedFunc=function(e,t){"flyoutMode"===t.name&&i.updateActionsProperties()},i.actionContainer=new r.AdaptiveActionContainer;var n=[];return i.buildActions(n),i.setSurveyElement(o),i.surveyElement&&(i.creator.sidebar.onPropertyChanged.add(i.sidebarFlyoutModeChangedFunc),i.creator.onElementMenuItemsChanged(i.surveyElement,n),i.actionContainer.setItems(n)),i.setShowAddQuestionButton(!0),i}return z(t,e),t.prototype.detachElement=function(e){e&&e.onPropertyChanged.remove(this.selectedPropPageFunc)},t.prototype.attachElement=function(e){e&&e.onPropertyChanged.add(this.selectedPropPageFunc)},t.prototype.setSurveyElement=function(e){this.detachElement(this.surveyElement),this.surveyElement=e,this.attachElement(this.surveyElement),this.updateActionsProperties()},t.prototype.checkActionProperties=function(){this.creator.isElementSelected(this.surveyElement)&&this.updateActionsProperties()},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.detachElement(this.surveyElement)},t.prototype.onElementSelectedChanged=function(e){e&&this.updateActionsProperties()},t.prototype.updateActionsProperties=function(){this.isDisposed||this.updateElementAllowOptions(this.creator.getElementAllowOperations(this.surveyElement),this.isOperationsAllow())},t.prototype.updateElementAllowOptions=function(e,t){this.allowDragging=t&&e.allowDragging,this.allowEditOption=null==e.allowEdit||!!e.allowEdit,this.updateActionVisibility("delete",t&&e.allowDelete),this.updateActionVisibility("duplicate",t&&e.allowCopy);var o=void 0!==e.allowEdit?t&&e.allowEdit:this.creator.sidebar.flyoutMode;this.updateActionVisibility("settings",o),this.setShowAddQuestionButton(!1!==e.allowEdit)},t.prototype.isOperationsAllow=function(){return!this.creator.readOnly},t.prototype.updateActionVisibility=function(e,t){var o=this.getActionById(e);o&&(o.visible=t)},t.prototype.getActionById=function(e){for(var t=this.actionContainer.actions,o=0;o<t.length;o++)if(t[o].id===e)return t[o];return null},t.prototype.buildActions=function(e){var t=this;e.push(new r.Action({id:"duplicate",iconName:"icon-duplicate_16x16",css:"sv-action-bar-item--secondary",locTitleName:"survey.duplicate",visibleIndex:10,iconSize:16,action:function(){t.duplicate()}})),e.push(new r.Action({id:"settings",iconName:"icon-settings_16x16",css:"sv-action-bar-item--secondary",locTitleName:"ed.settings",locTooltipName:"ed.settingsTooltip",visibleIndex:20,iconSize:16,action:function(){t.creator.setShowSidebar(!0,!0),t.creator.propertyGrid.getAllQuestions()[0].focus()}})),e.push(new r.Action({id:"delete",iconName:"icon-delete_16x16",css:"sv-action-bar-item--secondary",locTitleName:"pe.delete",visibleIndex:30,iconSize:16,action:function(){t.creator.deleteElement(t.surveyElement)}}))},Object.defineProperty(t.prototype,"allowEdit",{get:function(){return!!this.creator&&!this.creator.readOnly&&this.allowEditOption},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showAddQuestionButton",{get:function(){return this.getPropertyValue("showAddQuestionButton")},enumerable:!1,configurable:!0}),t.prototype.setShowAddQuestionButton=function(e){this.setPropertyValue("showAddQuestionButton",e&&this.allowEdit&&a.designer.showAddQuestionButton)},t.prototype.duplicate=function(){},U([Object(r.property)({defaultValue:!0})],t.prototype,"allowDragging",void 0),t}(r.Base);o(21);var Fo=function(e){function t(t,o){var i=e.call(this,t,o)||this;return i.addGhostPage=function(e){void 0===e&&(e=!0);var t=i.page;i.isGhost&&i.creator.addPage(t,e,(function(){return t.unRegisterFunctionOnPropertiesValueChanged(["title","description"]),t.name=re.getNewPageName(i.creator.survey.pages),!0}))&&(i.creator.survey.currentPage=t),e&&i.creator.selectElement(t)},i.actionContainer.sizeMode="small",i.questionTypeSelectorModel=i.creator.getQuestionTypeSelectorModel((function(e){i.currentAddQuestionType=e,i.addGhostPage()})),i.attachElement(o),i}return z(t,e),t.prototype.updateDragTypeOverMe=function(){this.dragTypeOverMe=this.page.dragTypeOverMe},t.prototype.attachElement=function(t){var o=this;e.prototype.attachElement.call(this,t),this.dragTypeOverMe=null,t&&(t.surveyChangedCallback=function(){o.isPageLive=!!t.survey},this.isGhost&&(this.updateActionsProperties(),t.registerFunctionOnPropertiesValueChanged(["title","description"],(function(){o.addGhostPage()})),this.patchPageForDragDrop(t,this.addGhostPage)),t.registerFunctionOnPropertiesValueChanged(["dragTypeOverMe"],(function(){o.updateDragTypeOverMe()})),t.onFirstRendering(),t.updateCustomWidgets(),t.setWasShown(!0),this.checkActionProperties(),this.dragTypeOverMe=t.dragTypeOverMe)},t.prototype.detachElement=function(t){t&&(t.unRegisterFunctionOnPropertiesValueChanged(["dragTypeOverMe"]),t.unRegisterFunctionOnPropertiesValueChanged(["title","description"]),t.surveyChangedCallback=void 0),e.prototype.detachElement.call(this,t),this.dragTypeOverMe=null},t.prototype.onElementSelectedChanged=function(t){e.prototype.onElementSelectedChanged.call(this,t),this.isSelected=t,t&&this.onPageSelectedCallback&&this.onPageSelectedCallback()},t.prototype.patchPageForDragDrop=function(e,t){e._isGhost=!0,e._addGhostPageViewModel=function(){delete e._isGhost,delete e._addGhostPageViewModel,t()}},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.detachElement(this.page),this.onPropertyValueChangedCallback=void 0},Object.defineProperty(t.prototype,"isGhost",{get:function(){return this.creator.survey.pages.indexOf(this.page)<0},enumerable:!1,configurable:!0}),t.prototype.isOperationsAllow=function(){return e.prototype.isOperationsAllow.call(this)&&!this.isGhost&&"single"!==this.creator.pageEditMode&&this.creator.allowModifyPages},t.prototype.getPage=function(){return this.surveyElement},Object.defineProperty(t.prototype,"page",{get:function(){return this.getPage()},enumerable:!1,configurable:!0}),t.prototype.addNewQuestion=function(e,t,o){var i=this;this.creator.addNewQuestionInPage((function(e){i.addGhostPage(!1),i.creator.survey.currentPage=i.page}),null,o||this.currentAddQuestionType||a.designer.defaultAddQuestionType)},t.prototype.select=function(e,t){e.isGhost||("single"!==e.creator.pageEditMode?(e.creator.selectElement(e.page,void 0,!1),this.onPageSelectedCallback&&this.onPageSelectedCallback()):e.creator.selectElement(e.creator.survey,void 0,!1)),t.stopPropagation(),t.cancelBubble=!0},Object.defineProperty(t.prototype,"css",{get:function(){var e="";return this.dragTypeOverMe&&0===this.page.elements.length&&this.creator.survey.pages.length>0&&(e="svc-page--drag-over-empty"),this.isGhost?e+" svc-page__content--new":(this.creator.isElementSelected(this.page)&&(e+=" svc-page__content--selected"),e)},enumerable:!1,configurable:!0}),t.prototype.hover=function(e,t){w(e,t,this.creator.pageHoverDelay)},t.prototype.hoverStopper=function(e,t){e.__svc_question_processed=!0},t.prototype.duplicate=function(){var e=this.creator.copyPage(this.page);this.creator.selectElement(e)},Object.defineProperty(t.prototype,"addNewQuestionText",{get:function(){return!this.currentAddQuestionType&&this.creator?this.creator.getLocString("ed.addNewQuestion"):this.creator?this.creator.getAddNewQuestionText(this.currentAddQuestionType):""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"footerActionsBar",{get:function(){var e=this;if(!this._footerActionsBar){this._footerActionsBar=new r.ActionContainer,this._footerActionsBar.containerCss="svc-page__footer",this._footerActionsBar.cssClasses={item:"svc-btn",itemTitle:"svc-text svc-text--normal svc-text--bold"};var t=[{css:"svc-add-new-question-action",visible:new r.ComputedUpdater((function(){return e.showAddQuestionButton})),component:"svc-add-new-question-btn",data:this}];t=this.creator.getUpdatedPageAdornerFooterActions(this,t),this.footerActionsBar.setItems(t)}return this._footerActionsBar},enumerable:!1,configurable:!0}),U([Object(r.property)({defaultValue:!1})],t.prototype,"isSelected",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"isPageLive",void 0),U([Object(r.property)({defaultValue:""})],t.prototype,"currentAddQuestionType",void 0),U([Object(r.property)({defaultValue:null})],t.prototype,"dragTypeOverMe",void 0),t}(Qo);o(22);var Uo=function(e){function t(t,o,i){var n=e.call(this)||this;return n.creator=t,n.row=o,n.templateData=i,n}return z(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){var e="svc-row";return 1===this.row.elements.length&&"sv-drag-drop-ghost-survey-element-name"===this.row.elements[0].name&&(e+=" svc-row--ghost"),this.row.dragTypeOverMe===r.DragTypeOverMeEnum.Top&&(e+=" svc-row--drag-over-top"),this.row.dragTypeOverMe===r.DragTypeOverMeEnum.Bottom&&(e+=" svc-row--drag-over-bottom"),e},enumerable:!1,configurable:!0}),t}(r.Base);o(23);var Go=function(e){function t(t,o,i){var n=e.call(this,t,o)||this;return n.templateData=i,n.startDragSurveyElement=function(e){var t=n.surveyElement,o=n.creator.selectedElement===t;return n.dragDropHelper.startDragSurveyElement(e,t,o),!0},n.questionTypeSelectorModel=n.creator.getQuestionTypeSelectorModel((function(e){n.currentAddQuestionType=e}),n.surveyElement instanceof r.PanelModelBase?n.surveyElement:null),n.actionContainer.sizeMode="small",o.isQuestion&&o.setCanShowOptionItemCallback&&o.setCanShowOptionItemCallback((function(e){return!t.readOnly&&(e!==n.surveyElement.newItem||(t.maximumChoicesCount<1||o.choices.length<t.maximumChoicesCount))})),n.checkActionProperties(),n.dragOrClickHelper=new r.DragOrClickHelper(n.startDragSurveyElement),Xt.setQuestion(n),n}return z(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this.surveyElement},enumerable:!1,configurable:!0}),t.prototype.select=function(e,t){if(e.surveyElement.isInteractiveDesignElement)return t.stopPropagation(),t.cancelBubble=!0,e.creator.selectElement(e.surveyElement,void 0,!1),!0},t.prototype.rootCss=function(){return this.surveyElement.isQuestion&&!this.surveyElement.startWithNewLine?" svc-question__adorner--start-with-new-line":""},t.prototype.css=function(){if(!this.surveyElement.isInteractiveDesignElement)return"";var e="svc-question__content";return e+="function"==typeof this.surveyElement.getType?" svc-question__content--"+this.surveyElement.getType():"",this.creator.isElementSelected(this.surveyElement)&&(e+=" svc-question__content--selected"),this.isEmptyElement&&(e+=" svc-question__content--empty"),this.isDragMe?e+=" svc-question__content--dragged":e=e.replace(" svc-question__content--dragged",""),this.dragTypeOverMe===r.DragTypeOverMeEnum.InsideEmptyPanel?e+=" svc-question__content--drag-over-inside":e=e.replace(" svc-question__content--drag-over-inside",""),this.dragTypeOverMe===r.DragTypeOverMeEnum.MultilineLeft||this.dragTypeOverMe===r.DragTypeOverMeEnum.Left?e+=" svc-question__content--drag-over-left":e=e.replace(" svc-question__content--drag-over-left",""),this.dragTypeOverMe===r.DragTypeOverMeEnum.MultilineRight||this.dragTypeOverMe===r.DragTypeOverMeEnum.Right?e+=" svc-question__content--drag-over-right":e=e.replace(" svc-question__content--drag-over-right",""),this.dragTypeOverMe===r.DragTypeOverMeEnum.Top?e+=" svc-question__content--drag-over-top":e=e.replace(" svc-question__content--drag-over-top",""),this.dragTypeOverMe===r.DragTypeOverMeEnum.Bottom?e+=" svc-question__content--drag-over-bottom":e=e.replace(" svc-question__content--drag-over-bottom",""),e},Object.defineProperty(t.prototype,"isDragMe",{get:function(){return this.surveyElement.isDragMe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dragTypeOverMe",{get:function(){return this.element.dragTypeOverMe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUsingCarryForward",{get:function(){var e;return null===(e=this.element)||void 0===e?void 0:e.isUsingCarryForward},enumerable:!1,configurable:!0}),t.prototype.createCarryForwardParams=function(){var e,t=this;if(!this.isUsingCarryForward)return null;var o=null===(e=this.element)||void 0===e?void 0:e.choicesFromQuestion;if(!o)return null;var i=this.creator.survey.getQuestionByName(o);return i?{question:i,text:this.creator.getLocString("ed.carryForwardChoicesCopied"),onClick:function(){t.creator.selectElement(i)}}:null},t.prototype.dispose=function(){this.surveyElement.unRegisterFunctionOnPropertyValueChanged("isRequired","isRequiredAdorner"),this.surveyElement.unRegisterFunctionOnPropertyValueChanged("inputType","inputTypeAdorner"),this.surveyElement.setCanShowOptionItemCallback&&this.surveyElement.setCanShowOptionItemCallback(void 0)},Object.defineProperty(t.prototype,"isDraggable",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.hover=function(e,t){this.surveyElement.isInteractiveDesignElement&&(this.updateActionsProperties(),w(e,t))},t.prototype.updateElementAllowOptions=function(t,o){e.prototype.updateElementAllowOptions.call(this,t,o),this.updateActionVisibility("convertTo",o&&t.allowChangeType),this.updateActionVisibilityByProp("isrequired","isRequired",o&&t.allowChangeRequired),this.updateActionVisibilityByProp("convertInputType","inputType",t.allowChangeInputType)},t.prototype.updateActionVisibilityByProp=function(e,t,o){var i=r.Serializer.findProperty(this.surveyElement.getType(),t);if(i){var n=this.creator.onIsPropertyReadOnlyCallback(this.surveyElement,i,i.readOnly,null,null);this.updateActionVisibility(e,o&&!n)}},Object.defineProperty(t.prototype,"isEmptyElement",{get:function(){if(this.surveyElement instanceof r.QuestionHtmlModel)return!this.surveyElement.html;if(this.surveyElement instanceof r.PanelModelBase){var e=this.surveyElement;return!e.rows||e.rows.length<=0||0===e.elements.length}return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholderText",{get:function(){return this.surveyElement instanceof r.QuestionHtmlModel?Q("ed.htmlPlaceHolder"):Q("ed.panelPlaceHolder")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dragDropHelper",{get:function(){return this.creator.dragDropSurveyElements},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRequired",{get:function(){return this.surveyElement.isRequired},set:function(e){this.surveyElement.isRequired=e},enumerable:!1,configurable:!0}),t.prototype.onPointerDown=function(e){this.dragOrClickHelper.onPointerDown(e)},t.prototype.getConvertToTypesActions=function(){var e=this,t=X.getConvertToClasses(this.currentType,this.creator.toolbox.itemNames,!0),o=[],i=null;return t.forEach((function(t){var n=e.creator.toolbox.items.filter((function(e){return e.name==t}))[0],r=i&&n.category!=i.category,a=e.creator.createIActionBarItemByClass(n.name,n.title,n.iconName,r);i=n,o.push(a)})),o},Object.defineProperty(t.prototype,"currentType",{get:function(){return this.surveyElement.getType()},enumerable:!1,configurable:!0}),t.prototype.createConvertToAction=function(){var e=this,t=this.getConvertToTypesActions(),o=t.length>0;return this.createDropdownModel("convertTo",t,o,0,this.currentType,(function(t){e.creator.convertCurrentQuestion(t.id)}))},t.prototype.createConvertInputType=function(){var e=this,t=null;if("text"===this.surveyElement.getType()&&(t=r.Serializer.findProperty("text","inputType")),"rating"===this.surveyElement.getType()&&(t=r.Serializer.findProperty("rating","rateDisplayMode")),!t||!b(this.surveyElement,t.name))return null;var o=t.name,i=this.surveyElement.getPropertyValue(o),n=t.getChoices(this.surveyElement,(function(e){})),a=[];n.forEach((function(e){a.push({id:e,title:H.getPropertyValueInEditor(t.name,e)})}));var s=this.createDropdownModel("convertInputType",a,!0,1,i,(function(t){e.surveyElement.setPropertyValue(o,t.id),s.title=t.title}));return this.surveyElement.registerFunctionOnPropertyValueChanged(o,(function(){var t=e.getSelectedItem(a,e.surveyElement.getPropertyValue(o));t&&(s.popupModel.contentComponentData.model.selectedItem=t,s.title=t.title)}),"inputTypeAdorner"),s.removePriority=1,s},t.prototype.getSelectedItem=function(e,t){var o=e.filter((function(e){return e.id===t}));return o.length>0?o[0]:void 0},t.prototype.createDropdownModel=function(e,t,o,i,n,a){var s=this,l=this.getSelectedItem(t,n),u=l?l.title:n,c=Object(r.createDropdownActionModel)({id:e,css:"sv-action--convertTo sv-action-bar-item--secondary",iconName:"icon-drop-down-arrow_16x16",iconSize:16,title:u,enabled:o,visibleIndex:i,disableShrink:!0,action:function(e){c.popupModel.displayMode=s.creator.isMobileView?"overlay":"popup"}},{items:t,onSelectionChanged:a,allowSelection:!0,selectedItem:l,horizontalPosition:"center"});return c},t.prototype.createRequiredAction=function(){var e=this;this.surveyElement.isRequired;var t=new r.Action({id:"isrequired",ariaChecked:new r.ComputedUpdater((function(){return e.isRequired})),ariaRole:"checkbox",css:this.isRequired?"sv-action-bar-item--secondary":"",title:this.creator.getLocString("pe.isRequired"),visibleIndex:20,iconName:this.isRequired?"icon-switch-active_16x16":"icon-switch-inactive_16x16",iconSize:16,action:function(){e.creator.isCanModifyProperty(e.surveyElement,"isRequired")&&(e.isRequired=!e.isRequired)}});return this.surveyElement.registerFunctionOnPropertyValueChanged("isRequired",(function(){t.iconName=e.isRequired?"icon-switch-active_16x16":"icon-switch-inactive_16x16",t.css=e.isRequired?"sv-action-bar-item--secondary":""}),"isRequiredAdorner"),t},t.prototype.buildActions=function(t){e.prototype.buildActions.call(this,t);var o=this.surveyElement;t.push(this.createConvertToAction());var i=this.createConvertInputType();i&&t.push(i),t[t.length-1].css+=" sv-action--convertTo-last",void 0!==o.isRequired&&v(o,"isRequired")&&b(o,"isRequired")&&t.push(this.createRequiredAction())},t.prototype.duplicate=function(){var e=this;setTimeout((function(){var t=e.creator.fastCopyQuestion(e.surveyElement);e.creator.selectElement(t)}),1)},t.prototype.addNewQuestion=function(){this.creator.addNewQuestionInPage((function(e){}),this.surveyElement instanceof r.PanelModelBase?this.surveyElement:null,this.currentAddQuestionType||a.designer.defaultAddQuestionType)},Object.defineProperty(t.prototype,"addNewQuestionText",{get:function(){return!this.currentAddQuestionType&&this.creator?this.creator.getLocString("ed.addNewQuestion"):this.creator?this.creator.getAddNewQuestionText(this.currentAddQuestionType):""},enumerable:!1,configurable:!0}),U([Object(r.property)()],t.prototype,"isDragged",void 0),U([Object(r.property)({defaultValue:""})],t.prototype,"currentAddQuestionType",void 0),t}(Qo);o(2);var zo=function(e){function t(t,o,i){var n=e.call(this,t,o,i)||this;return n.switchCollapse=function(){n.isCollapsed=!n.isCollapsed},n.surveyElement.registerFunctionOnPropertyValueChanged("isSelectedInDesigner",(function(){n.leftFocus()}),"dropdownCollapseChecker"),n.visibleCount=t.maxVisibleChoices,n.isCollapsed=n.isCollapsed&&n.needToCollapse,n}return z(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.surveyElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemComponent",{get:function(){return this.surveyElement.isDescendantOf("dropdown")?"survey-radiogroup-item":"survey-checkbox-item"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"needToCollapse",{get:function(){return this.visibleCount>0&&this.question.visibleChoices.length>this.visibleCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCollapseView",{get:function(){return this.isCollapsed},enumerable:!1,configurable:!0}),t.prototype.leftFocus=function(){this.creator.isElementSelected(this.surveyElement)||this.isCollapsed||(this.isCollapsed=this.needToCollapse)},t.prototype.getChoiceCss=function(){return(new r.CssClassBuilder).append("svc-question__dropdown-choice").append("svc-question__dropdown-choice--collapsed",this.isCollapsed&&this.needToCollapse).toString()},t.prototype.getRenderedItems=function(){return this.isCollapsed?this.question.visibleChoices.slice(0,this.visibleCount):this.question.visibleChoices},t.prototype.getButtonText=function(){return this.isCollapsed?H.getString("ed.showMoreChoices"):H.getString("ed.showLessChoices")},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.surveyElement.unRegisterFunctionOnPropertyValueChanged("isSelectedInDesigner","dropdownCollapseChecker")},U([Object(r.property)({defaultValue:!0})],t.prototype,"isCollapsed",void 0),U([Object(r.property)({defaultValue:-1})],t.prototype,"visibleCount",void 0),t}(Go);o(24);var Zo=function(e){function t(t,o,i,n){var r=e.call(this,t,o,i)||this;return r.questionRoot=n,r.isEmptyImageLink=!r.question.imageLink,r.surveyElement.registerFunctionOnPropertyValueChanged("imageLink",(function(){r.imageLinkValueChangedHandler()}),"imageLinkValueChanged"),r.initFilePresentationModel(),r}return z(t,e),t.prototype.initFilePresentationModel=function(){var e=this;this.filePresentationModel=r.Serializer.createClass("file",{name:this.question.name});var t=new r.SurveyModel;this.filePresentationModel.setSurveyImpl(t),this.filePresentationModel.forceIsInputReadOnly=!this.creator.isCanModifyProperty(this.question,"imageLink"),this.filePresentationModel.dragAreaPlaceholder=this.placeholderText,this.filePresentationModel.chooseButtonCaption=this.chooseImageText,this.filePresentationModel.acceptedTypes="image/*",this.filePresentationModel.storeDataAsText=!1,t.onUploadFiles.add((function(t,o){o.files[0]&&e.creator.uploadFiles(o.files,e.question,(function(t,o){e.question.imageLink=o}))}))},t.prototype.chooseFile=function(e){var t=e.questionRoot.getElementsByClassName("svc-choose-file-input")[0];e.creator.chooseFiles(t,(function(t){e.isUploading=!0,e.creator.uploadFiles(t,e.surveyElement,(function(t,o){e.surveyElement.imageLink=o,e.isUploading=!1}))}))},Object.defineProperty(t.prototype,"acceptedTypes",{get:function(){return N(this.surveyElement.contentMode)},enumerable:!1,configurable:!0}),t.prototype.imageLinkValueChangedHandler=function(){this.isEmptyImageLink=!this.question.imageLink,this.filePresentationModel.value=null,this.filePresentationModel.visible=!this.question.imageLink},Object.defineProperty(t.prototype,"isEmptyElement",{get:function(){return this.isEmptyImageLink},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.surveyElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholderText",{get:function(){return Q("ed.imagePlaceHolder")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"chooseImageText",{get:function(){return Q("ed.imageChooseImage")},enumerable:!1,configurable:!0}),U([Object(r.property)({defaultValue:!1})],t.prototype,"isUploading",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"isEmptyImageLink",void 0),t}(Go);o(25);var Jo=function(e){function t(t,o,i){var n=e.call(this)||this;return n.creator=t,n.surveyElement=o,n.templateData=i,n}return z(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return A(this.surveyElement)},enumerable:!1,configurable:!0}),t.useRateValues=function(e){return e.useRateValues()},t.prototype.addItem=function(e){if(e.allowAdd)if(t.useRateValues(e.element)){var o,i=e.element.rateValues.map((function(e){return e.value}));o=h(e.creator.getChoicesItemBaseTitle(),i);var n=new r.ItemValue(o);n.locOwner={getLocale:function(){return e.element.getLocale?e.element.getLocale():""},getMarkdownHtml:function(e){return e},getProcessedText:function(e){return e}},e.element.rateValues=e.element.rateValues.concat([n]);var a=e.element.rateValues;e.creator.onItemValueAddedCallback(e.element,"rateValues",a[a.length-1],a)}else e.element.rateMax+=e.element.rateStep},t.prototype.removeItem=function(e){if(e.allowRemove){var o=r.Serializer.findProperty(e.element.getType(),"rateValues"),i=e.element.rateValues&&e.element.rateValues.length-1,n=e.element.rateValues&&e.element.rateValues[i]||null;if(e.creator.onCollectionItemDeletingCallback(e.element,o,e.element.rateValues,n)){var a=e.element;t.useRateValues(e.element)||i!==a.rateValues.length-1?(t.useRateValues(e.element)||(a.rateValues=a.rateValues),a.rateValues.splice(i,1)):a.rateMax-=a.rateStep}}},t.allowAddForElement=function(e,o){return(o<1||o>r.settings.ratingMaximumRateValueCount)&&!t.useRateValues(e)&&(o=r.settings.ratingMaximumRateValueCount),"smileys"==e.rateDisplayMode&&(o<1||o>10)&&(o=10),o<1||e.rateCount<o},Object.defineProperty(t.prototype,"allowAdd",{get:function(){return this.canAddOrRemove()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableAdd",{get:function(){return this.allowAdd&&t.allowAddForElement(this.element,this.creator.maximumRateValues)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"addClassNames",{get:function(){return(new r.CssClassBuilder).append("svc-item-value-controls__button").append("svc-item-value-controls__button--disabled",!this.enableAdd).append("svc-item-value-controls__add").toString()},enumerable:!1,configurable:!0}),t.allowRemoveForElement=function(e){return e.rateCount>2},t.prototype.canAddOrRemove=function(){return this.creator.isCanModifyProperty(this.element,"rateValues")&&this.creator.isCanModifyProperty(this.element,"rateCount")&&(!this.element.autoGenerate||this.creator.isCanModifyProperty(this.element,"rateMax"))},Object.defineProperty(t.prototype,"allowRemove",{get:function(){return this.canAddOrRemove()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableRemove",{get:function(){return this.allowRemove&&t.allowRemoveForElement(this.element)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"removeClassNames",{get:function(){return(new r.CssClassBuilder).append("svc-item-value-controls__button").append("svc-item-value-controls__button--disabled",!this.enableRemove).append("svc-item-value-controls__remove").toString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"addTooltip",{get:function(){return Q("pe.addItem")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"removeTooltip",{get:function(){return Q("pe.removeItem")},enumerable:!1,configurable:!0}),t}(r.Base);o(26);var Wo=function(e){function t(t,o,i){var n=e.call(this)||this;n.creator=t,n.question=o,n.item=i,n.canTouchItems=!0,n.focusCameFromDown=!1,n.startDragItemValue=function(e,t){n.dragDropHelper.startDrag(e,n.item,n.question,t)},n.handleDragDropGhostPositionChanged=function(){n.ghostPosition=n.getGhostPosition(n.item),n.isDragDropGhost=n.item===n.dragDropHelper.draggedElement,n.item===n.dragDropHelper.prevDropTarget?(n.isDragDropMoveDown=n.item.isDragDropMoveDown,n.isDragDropMoveUp=n.item.isDragDropMoveUp):(n.isDragDropMoveDown=!1,n.isDragDropMoveUp=!1)},n.updateIsNew(o,i);var a=function(){n.updateIsNew(o,i)};return o.noneItem===i?o.registerFunctionOnPropertyValueChanged("showNoneItem",a):o.otherItem===i?o.registerFunctionOnPropertyValueChanged("showOtherItem",a):o.isDescendantOf("checkbox")&&o.selectAllItem===i?o.registerFunctionOnPropertyValueChanged("showSelectAllItem",a):n.isNew&&(o.visibleChoicesChangedCallback=function(){n.updateNewItemValue()},n.updateNewItemValue()),n.dragDropHelper.onGhostPositionChanged.add(n.handleDragDropGhostPositionChanged),n.dragOrClickHelper=new r.DragOrClickHelper(n.startDragItemValue),n.allowItemOperations={allowDelete:void 0,allowEdit:void 0,allowAdd:void 0},n.collectionProperty=r.Serializer.findProperty(o.getType(),n.collectionPropertyName),n.creator.onCollectionItemAllowingCallback(o,n.collectionProperty,o.visibleChoices,n.item,n.allowItemOperations),void 0===n.allowItemOperations.allowDelete&&(n.allowItemOperations.allowDelete=!0),void 0===n.allowItemOperations.allowAdd&&(n.allowItemOperations.allowAdd=!0),n.creator.isCanModifyProperty(o,"choices")||(n.canTouchItems=!1),n}return z(t,e),Object.defineProperty(t.prototype,"canBeDragged",{get:function(){return!this.isNew&&this.question.choices.indexOf(this.item)>-1},enumerable:!1,configurable:!0}),t.prototype.isBanStartDrag=function(e){return!this.isDraggable||("true"===e.target.getAttribute("contenteditable")||!this.canBeDragged)},t.prototype.updateNewItemValue=function(){this.creator&&this.question&&this.question.newItem&&(this.question.newItem.value=this.creator.getNextItemValue(this.question),this.question.newItem.text=d(this.question.choices))},Object.defineProperty(t.prototype,"collectionPropertyName",{get:function(){return this.item.ownerPropertyName?this.item.ownerPropertyName:"choices"},enumerable:!1,configurable:!0}),t.prototype.onPointerDown=function(e){return!!this.isBanStartDrag(e)||(this.dragOrClickHelper.onPointerDown(e),!1)},Object.defineProperty(t.prototype,"dragDropHelper",{get:function(){return this.creator.dragDropChoices},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.dragDropHelper.onGhostPositionChanged.remove(this.handleDragDropGhostPositionChanged)},t.prototype.getGhostPosition=function(e){return this.dragDropHelper.dropTarget!==e?null:this.dragDropHelper.isBottom?"bottom":"top"},Object.defineProperty(t.prototype,"isDraggable",{get:function(){return this.isDraggableItem(this.item)},enumerable:!1,configurable:!0}),t.prototype.isDraggableItem=function(e){return!(this.creator.readOnly||!this.canTouchItems)&&-1!==this.question.choices.indexOf(e)},t.prototype.add=function(e){e.question.noneItem!==e.item?e.question.otherItem!==e.item?e.question.isDescendantOf("checkbox")&&e.question.selectAllItem===e.item?e.question.hasSelectAll=!0:(this.addNewItem(e.item,e.question,e.creator),this.updateIsNew(e.question,e.item)):e.question.hasOther=!0:e.question.hasNone=!0},t.prototype.addNewItem=function(e,t,o){e.value="newitem";var i=o.createNewItemValue(t);this.updateNewItemValue(),io.get(i.locText).setAutoFocus()},t.prototype.remove=function(e){if(e.question.noneItem===e.item)e.question.hasNone=!1;else if(e.question.otherItem===e.item)e.question.hasOther=!1;else if(e.question.isDescendantOf("checkbox")&&e.question.selectAllItem===e.item)e.question.hasSelectAll=!1;else{var t=e.question.choices,o=t.indexOf(e.item);if(!this.creator.onCollectionItemDeletingCallback(e.question,this.collectionProperty,t,e.item))return;var i=this.findNextElementIndexToRemove(o);e.question.choices.splice(o,1),this.focusNextElementToRemove(i)}this.updateIsNew(e.question,e.item)},t.prototype.onFocusOut=function(e){this.question._lastActiveItemValueIndex=this.question.choices.indexOf(this.item)},t.prototype.findNextElementIndexToRemove=function(e){var t=0;return this.question.choices.length>0&&((t=e<this.question._lastActiveItemValueIndex?e-1:e)<0&&(t=0),t>=this.question.choices.length-2&&(t=this.question.choices.length-2)),t},t.prototype.focusNextElementToRemove=function(e){var t=this;setTimeout((function(){var o;null===(o=document.getElementById(t.question.id).querySelectorAll(".svc-item-value-controls__remove")[e])||void 0===o||o.focus()}),100)},t.prototype.updateIsNew=function(e,t){this.isNew=!e.isItemInList(t)},Object.defineProperty(t.prototype,"allowRemove",{get:function(){var e=!this.question.isItemInList(this.item);return!this.creator.readOnly&&this.canTouchItems&&this.allowItemOperations.allowDelete&&!e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tooltip",{get:function(){return Q(this.isNew?"pe.addItem":"pe.removeItem")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dragTooltip",{get:function(){return Q("pe.dragItem")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowAdd",{get:function(){var e=!this.question.isItemInList(this.item);return!this.creator.readOnly&&this.canTouchItems&&this.allowItemOperations.allowAdd&&e},enumerable:!1,configurable:!0}),t.prototype.select=function(e,t){e.question.inMatrixMode||(e.creator.selectElement(e.question,"choices",!1),t&&t.stopPropagation())},U([Object(r.property)({defaultValue:!1})],t.prototype,"isNew",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"isDragging",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"isDragDropGhost",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"isDragDropMoveDown",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"isDragDropMoveUp",void 0),U([Object(r.property)({defaultValue:null})],t.prototype,"ghostPosition",void 0),t}(r.Base);o(27);var Ko=function(e){function t(t,o,i,n,r){var a=e.call(this,t,o,i)||this;return a.question=o,a.item=i,a.templateData=n,a.itemsRoot=r,a.isChoosingNewFile=!1,a.onDragOver=function(e){a.isFileDragging=!0,e.dataTransfer.dropEffect="copy",e.preventDefault()},a.onDrop=function(e){a.isFileDragging=!1,e.preventDefault();var t=e.dataTransfer;if(t&&t.files&&!(t.files.length<1)){for(var o=[],i=0;i<t.files.length;i++)o.push(t.files[i]);a.uploadFiles(o)}},a.onDragLeave=function(e){a.isFileDragging=!1},a}return z(t,e),t.prototype.getRootCss=function(){return(new r.CssClassBuilder).append("svc-image-item-value-wrapper").append("svc-image-item-value").append("svc-image-item-value--new",this.isNew).append("svc-image-item-value-wrapper--ghost",this.isDragDropGhost).append("svc-image-item-value--file-dragging",this.isFileDragging).append("svc-image-item-value--single",this.getIsNewItemSingle()).toString()},t.prototype.getIsNewItemSingle=function(){return this.isNew&&0===this.question.choices.length},t.prototype.chooseFile=function(e){var t=e.itemsRoot.getElementsByClassName("svc-choose-file-input")[0];e.creator.chooseFiles(t,(function(t){e.isUploading=!0,e.creator.uploadFiles(t,e.question,(function(t,o){e.item.imageLink=o,e.isUploading=!1}))}))},t.prototype.uploadFiles=function(e){var t=this;this.isUploading=!0,this.creator.uploadFiles(e,this.question,(function(e,o){t.creator.createNewItemValue(t.question,t.isChoosingNewFile,(function(e){e.imageLink=o})),t.isChoosingNewFile=!1,t.isUploading=!1}))},t.prototype.chooseNewFile=function(e){var t=this,o=e.itemsRoot.getElementsByClassName("svc-choose-file-input")[0];e.creator.chooseFiles(o,(function(o){t.isChoosingNewFile=!0,e.uploadFiles(o)}))},Object.defineProperty(t.prototype,"acceptedTypes",{get:function(){return N(this.question.contentMode)},enumerable:!1,configurable:!0}),U([Object(r.property)({defaultValue:!1})],t.prototype,"isFileDragging",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"isUploading",void 0),t}(Wo);o(28);var Xo=function(){function e(e,t){this.cellQuestion=t,this.creator=e;var o=t.toJSON();o.type=t.getType(),this.surveyValue=e.createSurvey({questions:[o]},"modal-question-editor"),this.survey.css=r.defaultV2Css,this.survey.setDesignMode(!0),this.survey.isPopupEditorContent=!0,this.survey.showQuestionNumbers="none",this.survey.questionTitleLocation="hidden",this.question.setSurveyImpl(this.survey),this.question.inMatrixMode=!0}return Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"question",{get:function(){return this.survey.getAllQuestions()[0]},enumerable:!1,configurable:!0}),e.prototype.apply=function(){var e=this.cellQuestion.parentQuestion,t=e.getColumnByName(this.cellQuestion.name),o=t.toJSON(),i=o.cellType,n=this.survey.getAllQuestions()[0].toJSON();i&&(n.cellType=i),r.Helpers.isTwoValueEquals(n,o)||(t.fromJSON(n),e.onColumnCellTypeChanged(t),this.creator.setModified({type:"MATRIX_CELL_EDITOR",column:t}))},e}(),Yo=function(e){function t(t,o,i,n,r){var a=e.call(this)||this;return a.creator=t,a.templateData=o,a.question=i,a.row=n,a.column=r,a.onSelectionChanged=function(e,t){a.context&&a.context.getPropertyValue?a.isSelected=a.creator.isElementSelected(a.context):a.isSelected=!1},t.onSelectedElementChanged.add(a.onSelectionChanged),a}return z(t,e),t.prototype.editQuestion=function(e,t){var o=new Xo(e.creator,e.question);r.settings.showModal("svc-question-editor-content",{survey:o.survey,creator:this.creator},(function(){return o.apply(),!0}),void 0,"svc-matrix-cell__popup",e.question.name,this.creator.isMobileView?"overlay":"popup"),t.stopPropagation(),e.creator.selectElement(e.column)},Object.defineProperty(t.prototype,"context",{get:function(){return this.row||this.column||this.templateData},enumerable:!1,configurable:!0}),t.prototype.selectContext=function(e,t){if(e.row)return e.creator.selectElement(e.row.data,"rows",!1),void t.stopPropagation();"function"==typeof e.context.getType&&("itemvalue"===e.context.getType()?e.creator.selectElement(e.context.locOwner,e.context.ownerPropertyName,!1):e.creator.selectElement(e.context),t.stopPropagation())},Object.defineProperty(t.prototype,"isSupportCellEditor",{get:function(){return!(!this.question||!this.question.getType)&&re.isSupportCellEditor(this.question.getType())},enumerable:!1,configurable:!0}),t.prototype.hover=function(e,t){!this.row&&this.context&&this.context.getPropertyValue&&this.context.getType&&"itemvalue"!==this.context.getType()&&w(e,t)},t.prototype.dispose=function(){this.creator.onSelectedElementChanged.remove(this.onSelectionChanged)},U([Object(r.property)()],t.prototype,"isSelected",void 0),t}(r.Base);o(29);var $o=function(e){function t(t,o){var i=e.call(this)||this;return i._data=t,i._lvl=o,i.toggle=function(){i.collapsed=!i.collapsed},i.markerWidth=16,i.items=ei(t.data,o+1),i.lvl=o,i}return z(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this.items},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isNode",{get:function(){return this._data.isNode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._data.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this._data.title},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._data.value},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayValue",{get:function(){return this._data.displayValue},enumerable:!1,configurable:!0}),t.prototype.getString=function(e){return this._data.getString(e)},Object.defineProperty(t.prototype,"markerMargin",{get:function(){return(1.5+this.lvl)*this.markerWidth+"px"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textMargin",{get:function(){return(2.75+this.lvl)*this.markerWidth+"px"},enumerable:!1,configurable:!0}),U([Object(r.property)({defaultValue:!0})],t.prototype,"collapsed",void 0),U([Object(r.property)({defaultValue:0})],t.prototype,"lvl",void 0),U([Object(r.property)()],t.prototype,"items",void 0),t}(r.Base);function ei(e,t){return void 0===e&&(e=[]),e.filter((function(e){return!!e})).map((function(e){return new $o(e,t)}))}var ti=function(e){function t(t){var o=e.call(this)||this;o.survey=t,o.selectTableClick=function(){o.resultViewType="table"},o.selectJsonClick=function(){o.resultViewType="text"},o.resultText=JSON.stringify(t.data,null,4);var i=t.getPlainData({includeEmpty:!1,includeValues:!0});return o.resultData=ei(i,0),o}return z(t,e),t.prototype.getLocString=function(e){return H.getString(e)},Object.defineProperty(t.prototype,"surveyResultsText",{get:function(){return this.getLocString("ed.surveyResults")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"surveyResultsTableText",{get:function(){return this.getLocString("ed.surveyResultsTable")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"surveyResultsJsonText",{get:function(){return this.getLocString("ed.surveyResultsJson")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resultsTitle",{get:function(){return this.getLocString("ed.resultsTitle")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resultsName",{get:function(){return this.getLocString("ed.resultsName")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resultsValue",{get:function(){return this.getLocString("ed.resultsValue")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resultsDisplayValue",{get:function(){return this.getLocString("ed.resultsDisplayValue")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isTableSelected",{get:function(){return"table"===this.resultViewType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isJsonSelected",{get:function(){return"text"===this.resultViewType},enumerable:!1,configurable:!0}),U([Object(r.property)({defaultValue:"table"})],t.prototype,"resultViewType",void 0),U([Object(r.property)({defaultValue:""})],t.prototype,"resultText",void 0),U([Object(r.propertyArray)()],t.prototype,"resultData",void 0),t}(r.Base);o(30);var oi=function(e){function t(t,o){var i=e.call(this)||this;return i.creator=t,i.root=o,i}return z(t,e),Object.defineProperty(t.prototype,"allowEdit",{get:function(){return!this.creator.readOnly},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"containerCss",{get:function(){return(new r.CssClassBuilder).append("svc-logo-image-container").append("svc-logo-image-container--editable",this.allowEdit).toString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.creator.survey},enumerable:!1,configurable:!0}),t.prototype.uploadFile=function(e,t,o){e.isUploading=!0,e.creator.uploadFiles(o,void 0,(function(o,i){e.creator.survey.logo=i,t.value="",e.isUploading=!1}))},t.prototype.chooseFile=function(e){if(this.allowEdit){var t=e.root.getElementsByClassName("svc-choose-file-input")[0];0===t.files.length?e.creator.chooseFiles(t,(function(o){e.uploadFile(e,t,o)})):e.uploadFile(e,t,[t.files[0]])}},t.prototype.remove=function(e){e.creator.survey.logo=""},Object.defineProperty(t.prototype,"chooseLogoPlaceholder",{get:function(){return this.creator.getLocString("ed.chooseLogoPlaceholder")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"acceptedTypes",{get:function(){return N("image")},enumerable:!1,configurable:!0}),U([Object(r.property)({defaultValue:!1})],t.prototype,"isUploading",void 0),t}(r.Base),ii=function(e){function t(t){var o=e.call(this,t)||this;return o.onEmbeddedSurveyValueChanged=function(){},o}return z(t,e),Object.defineProperty(t.prototype,"embeddedSurvey",{get:function(){return this.embeddedSurveyValue},set:function(e){this.embeddedSurveyValue=e,this.onEmbeddedSurveyValueChanged()},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"embeddedsurvey"},t}(r.QuestionNonValue);r.Serializer.addClass("embeddedsurvey",[],(function(){return new ii("")}),"nonvalue"),r.QuestionFactory.Instance.registerQuestion("embeddedsurvey",(function(e){return new ii(e)})),o(31);var ni=function(e){function t(t,o){void 0===o&&(o=null);var i=e.call(this,t)||this,n=o&&!o.showValueInLink&&H.getString("pe.set")+" "+o.title||null;return i.linkValueText=n||H.getString("pe.emptyValue"),i}return z(t,e),t.prototype.onPropertyValueChanged=function(t,o,i){e.prototype.onPropertyValueChanged.call(this,t,o,i),"value"===t&&(this.updateLinkValueText(),this.allowClear&&(this.showClear=!r.Helpers.isValueEmpty(i)),this.updateIsClickable())},t.prototype.onReadOnlyChanged=function(){this.updateIsClickable(),e.prototype.onReadOnlyChanged.call(this)},t.prototype.updateIsClickable=function(){this.setPropertyValue("isClickable",!this.isReadOnly||!!this.isClickableCallback&&this.isClickableCallback())},Object.defineProperty(t.prototype,"ariaRole",{get:function(){return"button"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tooltip",{get:function(){return this.showTooltip?this.linkValueText:void 0},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"linkvalue"},t.prototype.doLinkClick=function(){this.linkClickCallback&&this.linkClickCallback()},t.prototype.doClearClick=function(){this.clearClickCallback&&this.clearClickCallback()},t.prototype.updateLinkValueText=function(){var e;e=this.showValueInLink?this.isEmpty()?H.getString("pe.emptyValue"):this.getObjDisplayValue():H.getString(this.isEmpty()?"pe.set":"pe.change")+" "+this.title,this.linkValueText=e},t.prototype.stringifyValue=function(e){return"string"!=typeof e?JSON.stringify(e):e},t.prototype.getObjDisplayValue=function(){var e=this.obj;if(!e||!e.getDisplayValue)return this.stringifyValue(this.value);var t=e.getDisplayValue(!0,this.value);return"string"!=typeof t?JSON.stringify(t):t},U([Object(r.property)({defaultValue:"svc-link-value-button svc-question-link__set-button"})],t.prototype,"linkSetButtonCssClasses",void 0),U([Object(r.property)({defaultValue:"svc-question-link__clear-button"})],t.prototype,"linkClearButtonCssClasses",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"isSelected",void 0),U([Object(r.property)()],t.prototype,"linkValueText",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"showClear",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"allowClear",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"showValueInLink",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"showTooltip",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"isClickable",void 0),t}(r.Question);r.Serializer.addClass("linkvalue",["showValueInLink",{name:"showTooltip: boolean",default:!1,visible:!1}],(function(e){return new ni("",e)}),"nonvalue"),r.QuestionFactory.Instance.registerQuestion("linkvalue",(function(e){return new ni(e)}));var ri=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._showUnitsInEditor=!0,t.onUpButtonMouseDown=function(){t.increase(),t.increaseTimer=setTimeout(t.onUpButtonMouseDown,200)},t.onDownButtonMouseDown=function(){t.decrease(),t.decreaseTimer=setTimeout(t.onDownButtonMouseDown,200)},t.onButtonMouseLeave=function(){t.onButtonMouseUp()},t.onButtonMouseUp=function(){clearTimeout(t.decreaseTimer),clearTimeout(t.increaseTimer)},t.onKeyDown=function(e){switch(e.key){case"ArrowUp":t.increase(),e.stopPropagation(),e.preventDefault();break;case"ArrowDown":t.decrease(),e.stopPropagation(),e.preventDefault()}},t.onInputKeyDown=function(e){"ArrowUp"!=e.key&&"ArrowDown"!=e.key||t.updateValueOnEvent(e)},t.onFocus=function(e){t._showUnitsInEditor=!1},t.onBlur=function(e){t._showUnitsInEditor=!0,"INPUT"==e.target.tagName&&t.updateValueOnEvent(e)},t}return z(t,e),t.prototype.parseValue=function(e){return{value:parseFloat(e.toString()),unit:e.toString().replace(/[^A-Za-z]/g,"")}},t.prototype.changeValue=function(e){var t=this.parseValue(this.renderedValue),o=Number(this.renderedStep||1),i=t.value;e?i+=o:i-=o,this.value=i},Object.defineProperty(t.prototype,"showUnitsInEditor",{get:function(){return!!this.unit&&this._showUnitsInEditor},enumerable:!1,configurable:!0}),t.prototype.correctValue=function(e){if(null==e||null==e)return e;var t=Number(this.renderedMax),o=Number(this.renderedMin);return e="string"==typeof e?parseFloat(e):e,isNaN(e)?e=isNaN(o)?0:o:e>t?e=t:e<o&&(e=o),e=Math.round(1e3*e)/1e3},t.prototype.setNewValue=function(t){e.prototype.setNewValue.call(this,this.correctValue(t))},Object.defineProperty(t.prototype,"renderedValue",{get:function(){var e,t,o=(null!==(t=null!==(e=this.value)&&void 0!==e?e:this.renderedMin)&&void 0!==t?t:0).toString();return this.showUnitsInEditor&&(o+=this.unit),o},enumerable:!1,configurable:!0}),t.prototype.increase=function(){this.changeValue(!0)},t.prototype.decrease=function(){this.changeValue(!1)},t.prototype.onBeforeInput=function(e){e.data&&!/[\d.]/.test(e.data)&&e.preventDefault()},t.prototype.getType=function(){return"spinedit"},Object.defineProperty(t.prototype,"isInputTextUpdate",{get:function(){return!1},enumerable:!1,configurable:!0}),U([Object(r.property)()],t.prototype,"unit",void 0),U([Object(r.property)()],t.prototype,"_showUnitsInEditor",void 0),t}(r.QuestionTextModel);r.Serializer.addClass("spinedit",["unit"],(function(){return new ri("")}),"text"),r.QuestionFactory.Instance.registerQuestion("spinedit",(function(e){return new ri(e)}));var ai=function(e){function t(t){var o=e.call(this,t)||this;return o.createItemValues("choices"),o.registerFunctionOnPropertyValueChanged("choices",(function(){o.updateChoices()})),o}return z(t,e),t.prototype.getCorrectedValue=function(e){if(null==e||null==e)return e;if(4===(e=((e=k(null!=e?e:"").color).match(/#(\d|\w){1,6}/)||["#000000"])[0]).length)for(var t=1;t<4;t++)e+=e[t];if(e.length<7){var o=e.length;for(t=0;t<7-o;t++)e+="0"}return e},t.prototype.setNewValue=function(t){this.resetRenderedValue(),e.prototype.setNewValue.call(this,this.getCorrectedValue(t)),this.updateRenderedValue()},t.prototype.onBeforeInput=function(e){e.data&&!/[\d\w(),#]/.test(e.data)&&e.preventDefault()},t.prototype.onColorInputChange=function(e){this.value=e.target.value},t.prototype.getType=function(){return"color"},t.prototype.resetRenderedValue=function(){this._renderedValue=void 0},t.prototype.updateRenderedValue=function(){if(this.value){var e=k(this.value||"");this._renderedValue=e.color}else this._renderedValue="#000000"},Object.defineProperty(t.prototype,"renderedValue",{get:function(){return this._renderedValue||this.updateRenderedValue(),this._renderedValue.toUpperCase()},enumerable:!1,configurable:!0}),t.prototype.getSwatchStyle=function(){return{backgroundColor:this.renderedValue}},Object.defineProperty(t.prototype,"isInputTextUpdate",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.onSurveyValueChanged=function(t){e.prototype.onSurveyValueChanged.call(this,t),this.updateRenderedValue()},Object.defineProperty(t.prototype,"dropdownAction",{get:function(){return this._dropdownAction||(this._dropdownAction=this.createDropdownAction()),this._dropdownAction},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"choices",{get:function(){return this.getPropertyValue("choices")},set:function(e){this.setPropertyValue("choices",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showDropdownAction",{get:function(){return!this.isValueEmpty(this.choices)},enumerable:!1,configurable:!0}),t.prototype.createDropdownAction=function(){var e=this,t=Object(r.createDropdownActionModelAdvanced)({},{onSelectionChanged:function(t){e.value=t.value},items:this.choices},{showPointer:!1,verticalPosition:"bottom",horizontalPosition:"center"}),o=t.popupModel,i=o.contentComponentData.model;return o.setWidthByTarget=!0,o.positionMode="fixed",i.isItemSelected=function(t){return t.value==e.value},t},t.prototype.calcCssClasses=function(t){var o=e.prototype.calcCssClasses.call(this,t),i=this.dropdownAction;i.cssClasses={item:o.colorDropdown},i.iconName=o.colorDropdownIcon;var n=i.popupModel.contentComponentData.model;return n.cssClasses={},n.cssClasses={itemBody:n.cssClasses.itemBody+" "+o.colorItem},o},t.prototype.updateChoices=function(){this.dropdownAction.popupModel.contentComponentData.model.setItems(this.choices)},Object.defineProperty(t.prototype,"itemComponent",{get:function(){return"color-item"},enumerable:!1,configurable:!0}),U([Object(r.property)()],t.prototype,"unit",void 0),U([Object(r.property)()],t.prototype,"_renderedValue",void 0),t}(r.QuestionTextModel);r.Serializer.addClass("color",["unit","choices:itemvalue[]"],(function(){return new ai("")}),"text"),r.QuestionFactory.Instance.registerQuestion("color",(function(e){return new ai(e)}));var si=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.onChangeQuestionValue=function(e){},t.prototype.setNewValue=function(t){"object"==typeof t&&(this.stateChanged(this.isEmpty()?"empty":"loaded"),this.isLoadingFromJson||this.loadPreview(t),this.loadedFilesValue=t,t=this.previewValue[0].content),e.prototype.setNewValue.call(this,t)},t.prototype.loadPreview=function(t){"string"!=typeof t&&e.prototype.loadPreview.call(this,t)},Object.defineProperty(t.prototype,"allowMultiple",{get:function(){return!1},set:function(e){},enumerable:!1,configurable:!0}),t.prototype.clear=function(e,t){var o=this;if(void 0===t&&(t=!0),this.survey){var i=function(){t&&(o.value=void 0),o.errors=[],e&&e()};this.loadedFilesValue?(this.containsMultiplyFiles=!1,this.survey.clearFiles(this.loadedFilesValue,this.name,this.previewValue,null,(function(e,t){"success"===e&&i()}))):i()}},t.prototype.updateValueFromInputEvent=function(e){r.Helpers.isTwoValueEquals(e.target.value,this.value)||(this.clear(void 0,!1),this.loadedFilesValue=void 0,this.value=e.target.value)},t.prototype.onInputChange=function(e){e.target!==document.activeElement&&this.updateValueFromInputEvent(e)},t.prototype.onInputBlur=function(e){this.updateValueFromInputEvent(e)},t.prototype.getType=function(){return"fileedit"},t.prototype.getIsClearButtonDisabled=function(){return!this.value||this.isInputReadOnly},t}(r.QuestionFileModel);r.Serializer.addClass("fileedit",[],(function(){return new si("")}),"file"),r.QuestionFactory.Instance.registerQuestion("fileedit",(function(e){return new si(e)}));var li=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"expression"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"comment",showOptionsCaption:!1}},t.prototype.clearPropertyValue=function(e,t,o,i){o.clearValue()},t}(Ze),ui=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"condition"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"comment",showOptionsCaption:!1,readOnly:!1===o.allowEditExpressionsInTextEditor}},t.prototype.createPropertyEditorSetup=function(e,t,o,i){return new Ct(e.getSurvey(),e,i,t.name)},t}(li);Fe.register(new li),Fe.register(new ui);var ci=function(e){function t(t,o,i,n){void 0===o&&(o=null),void 0===i&&(i="item"),void 0===n&&(n=[]);var r=e.call(this,o)||this;return r.choices=t,r.className=i,r.names=n,r.commentValue=r.editSurvey.getQuestionByName("question"),r.setComment(),r.editSurvey.getQuestionByName("question").placeholder=H.getString("pe.fastEntryPlaceholder"),r.editSurvey.onValidateQuestion.add((function(e,t){var o=r.options.maximumChoicesCount;if(o>0){var i=r.getChoicesCount();o<i&&(t.error=H.getString("pe.fastEntryChoicesCountError").format(i,o))}else if(r.isValueUnique){var n=r.getFirstUniqueValue();n&&(t.error=H.getString("pe.fastEntryNonUniqueError").format(n))}})),r}return z(t,e),t.calcBeforeApplyItemsArray=function(e,t,o){if(t&&0!=t.length){if(e.length>t.length&&e.splice(t.length,e.length-t.length),e.length<t.length){for(var i=[],n=e.length;n<t.length;n++)i.push(t[n]);e.splice.apply(e,[e.length,0].concat(i))}}else e.splice(0,e.length)},t.applyItemsArray=function(e,t,o){void 0===o&&(o=[]),this.calcBeforeApplyItemsArray(e,t,o);for(var i=0;i<e.length;i++)o.forEach((function(o){e[i][o]=t[i][o]}))},t.prototype.getSurveyJSON=function(){return{elements:[{type:"comment",name:"question",titleLocation:"hidden",rows:12}]}},t.prototype.getSurveyCreationReason=function(){return"fast-entry"},t.prototype.apply=function(){if(this.comment.isEmpty())return!1;if(this.editSurvey.hasErrors(!0))return!1;var e=this.convertTextToItemValues(this.comment.value);return t.applyItemsArray(this.choices,e,this.names),!0},t.prototype.convertTextToItemValues=function(e){var t=[];if(!e)return t;for(var o=e.split("\n"),i=0;i<o.length;i++)if(o[i]){var n=o[i].split(r.ItemValue.Separator),a=r.Serializer.createClass(this.className);this.names.forEach((function(e,t){a[e]=n[t]})),t.push(a)}return t},Object.defineProperty(t.prototype,"comment",{get:function(){return this.commentValue},enumerable:!1,configurable:!0}),t.prototype.getChoicesCount=function(){for(var e=this.comment.value.split("\n"),t=0,o=0;o<e.length;o++){e[o]&&t++}return t},Object.defineProperty(t.prototype,"isValueUnique",{get:function(){return!0===r.Serializer.findProperty("itemvalue","value").isUnique},enumerable:!1,configurable:!0}),t.prototype.getFirstUniqueValue=function(){for(var e=this.comment.value.split("\n"),t={},o=0;o<e.length;o++){var i=e[o];if(i){var n=i.split(r.ItemValue.Separator)[0];if(t[n])return n;t[n]=!0}}},t.prototype.setComment=function(){var e=this.convertItemValuesToText();this.comment.value=e},t.prototype.collectNames=function(e,t,o){var i="";return this.names.forEach((function(n){if("itemvalues"===t){if("value"==n)return;var a="text"==n?e.pureText:e[n]}else a=e[n];if(a){for(var s=0;s<o;s++)i+=r.ItemValue.Separator;i+=a,o=1}else o++})),i},t.prototype.convertItemValuesToText=function(){var e=this,t="";return this.choices.forEach((function(o){t&&(t+="\n"),t+=e.collectNames(o,"",0)})),t},t}(Qe),pi=function(e){function t(t,o,i,n){void 0===o&&(o=null),void 0===i&&(i="itemvalue"),void 0===n&&(n=["value","text"]);var r=e.call(this,t,o,i,n)||this;return r.choices=t,r.className=i,r.names=n,r}return z(t,e),t.applyItemValueArray=function(e,t,o){void 0===o&&(o=[]),this.calcBeforeApplyItemsArray(e,t,o);for(var i=0;i<e.length;i++)e[i].value!=t[i].value&&(e[i].value=t[i].value),e[i].text=t[i].hasText?t[i].text:"",o.forEach((function(o){"value"!=o&&"text"!=o&&(e[i][o]=t[i][o])}))},t.prototype.apply=function(){if(this.comment.isEmpty())return!1;if(this.editSurvey.hasErrors(!0))return!1;var e=this.convertTextToItemValues(this.comment.value);return t.applyItemValueArray(this.choices,e,this.names),!0},t.prototype.convertItemValuesToText=function(){var e=this,t="";return this.choices.forEach((function(o){t&&(t+="\n"),t+=o.value,t+=e.collectNames(o,"itemvalues",1)})),t},t}(ci);r.Serializer.addProperty("itemvalue",{name:"icon",isSerializable:!1,readOnly:!0,visibleIndex:0,visibleIf:function(e){return e&&"rateValues"===e.ownerPropertyName&&e.locOwner instanceof r.QuestionRatingModel&&"smileys"==e.locOwner.rateType}});var di=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.getNewColumnName=function(e,t,o){var i=[];if(Array.isArray(e))for(var n=0;n<e.length;n++)i.push(e[n][t]);return h(o,i)},t.prototype.onCreated=function(e,t,o){var i=this;t.onGetValueForNewRowCallBack=function(e){return i.createNewItem(e,o)},this.setupMatrixQuestion(e,t,o)},t.prototype.onSetup=function(e,t,o,i){var n=t;n.allowRowsDragAndDrop&&n.dragDropMatrixRows&&(n.dragDropMatrixRows.onDragStart.add((function(){i.startUndoRedoTransaction()})),n.dragDropMatrixRows.onDragEnd.add((function(){i.stopUndoRedoTransaction()})))},t.prototype.initializeAcceptedTypes=function(e,t){"imagepicker"===e.getType()&&"imageLink"==t.name&&"fileedit"==t.getType()&&(e.registerFunctionOnPropertyValueChanged("contentMode",(function(e){t.acceptedTypes=N(e)})),t.acceptedTypes=N(e.contentMode))},t.prototype.initializePlaceholder=function(e,t,o){var i="function"==typeof e.getType&&e.getType();"text"===t.getType()&&i&&("text"===o&&"itemvalue"===i&&(t.placeholder=new r.ComputedUpdater((function(){return e.value?e.value.toString():e.text}))),"title"===o&&"matrixdropdowncolumn"===i&&(t.placeholder=new r.ComputedUpdater((function(){return e.name?e.name:e.title}))))},t.prototype.onMatrixCellCreated=function(e,t){var o=t.row.editingObj;if(o){var i=t.cellQuestion;i.obj=o,this.initializeAcceptedTypes(e,i),this.initializePlaceholder(o,i,t.columnName),i.property=r.Serializer.findProperty(o.getType(),t.columnName)}},t.prototype.onMatrixCellValueChanged=function(e,t){var o=t.question.getColumnByName(t.columnName);o&&o.isUnique&&t.question.visibleRows.forEach((function(e){if(e!==t.row){var o=e.getQuestionByColumnName(t.columnName);o&&o.errors.length>0&&o.hasErrors()}}))},t.prototype.updateMatixActionsClasses=function(e){e.forEach((function(e){e.innerCss=(e.innerCss||"")+" spg-action-button--muted"}))},t.prototype.onGetMatrixRowAction=function(e,t,o){var i=this,n=t.question,r=t.row,a=t.actions;this.getEditItemAsStandAlone()&&a.push({id:"svd-grid-edit-column",iconName:"icon-edit",title:H.getString("pe.edit"),visibleIndex:0,showTitle:!1,location:"end",action:function(){var e=t.row.editingObj;o(e)}});var s=a.filter((function(e){return"show-detail"===e.id}))[0];Ot(n,a,r),s&&(s.component="sv-action-bar-item",s.iconName=this.getShowDetailActionIconName(r),s.showTitle=!1,s.location="end",s.ariaExpanded=r.isDetailPanelShowing,s.action=function(){r.showHideDetailPanelClick(),s.iconName=r.isDetailPanelShowing?"icon-editing-finish":"icon-edit"},s.visibleIndex=0,s.visible=this.hasPropertiesInDetail,r.onDetailPanelShowingChanged=function(){s.iconName=i.getShowDetailActionIconName(r),s.ariaExpanded=r.isDetailPanelShowing}),this.updateMatixActionsClasses(a)},t.prototype.getShowDetailActionIconName=function(e){return e.isDetailPanelShowing?"icon-editing-finish":"icon-edit"},t.prototype.onGetQuestionTitleActions=function(e,t){var o=t.question;t.titleActions.push({id:"add-item",iconName:"icon-add",title:o.addRowText,showTitle:!1,action:function(){o.addRow()},enabled:new r.ComputedUpdater((function(){return o.canAddRow}))})},t.prototype.createNewItem=function(e,o){var i=this.getBaseValue(o),n=this.getKeyValue();i||(i="item");var a=null;i&&n&&(a=t.getNewColumnName(e.value,n,i));var s=r.Serializer.createClass(this.getDefaultClassName(o),{});a&&(s[n]=a),this.getObjTypeName()&&(s[this.getObjTypeName()]=s.getType());var l=e.obj[o.name];return r.Serializer.isDescendantOf(s.getType(),"itemvalue")&&(s.text=d(l)),l.push(s),l!=e.value&&(e.value=l),s},t.prototype.getDefaultClassName=function(e){return e.className},t.prototype.getBaseValue=function(e){return e.getBaseValue()},t.prototype.getKeyValue=function(){return""},t.prototype.getColumnNames=function(e,t,o){var i=this.getPropertiesNames(e,t,o);return i&&i.length>0?i:this.getDefaultListProperties(t)},t.prototype.getColumnClassName=function(e,t){return t.className},t.prototype.getPropertiesNames=function(e,t,o){for(var i=[],n=this.getDefinedListProperties(e,t,o),r=0;r<n.length;r++)i.push(n[r].name);return 0==i.length&&(i=this.getDefaulColumnNames()),i},t.prototype.getDefinedListProperties=function(e,t,o){if(!t.className)return[];var i=r.Serializer.createClass(t.className);if(!i)return[];var n=new Be(i,o,this.getColumnClassName(e,t),"list",e,t);return 0==n.getTabs().length?[]:n.getTabs()[0].properties},t.prototype.getDefaultListProperties=function(e){var t=[];if(e&&e.className)for(var o=r.Serializer.getProperties(e.className),i=0;i<o.length;i++)this.isPropertyShownInList(o[i])&&t.push(o[i].name);return t.length>0?t:this.getDefaulColumnNames()},t.prototype.getDefaulColumnNames=function(){return[]},t.prototype.isPropertyShownInList=function(e){return e.visible&&"form"!==e.showMode},t.prototype.getObjTypeName=function(){return""},t.prototype.hasDetailPanel=function(){return!this.getEditItemAsStandAlone()},t.prototype.setupMatrixQuestion=function(e,t,o){var i=this;this.hasPropertiesInDetail=this.hasDetailPanel()&&this.calcHasPropertiesInDetail(t,o),t.onHasDetailPanelCallback=function(e){return!1!==e.allowEditRow&&i.hasPropertiesInDetail},t.onCreateDetailPanelRenderedRowCallback=function(e){e.cells=[e.cells[1]],e.cells[0].colSpans+=2};var n=t;if(t.onCreateDetailPanelCallback=function(e,t){new Ge(e.editingObj,n.options,n.obj,n.property).setupObjPanel(t,!0)},t.allowRowsDragAndDrop=this.getAllowRowDragDrop(o)&&!t.isReadOnly,n.options&&this.setupUsingOptions(e,t,n.options,o),o.uniquePropertyName){var r=t.getColumnByName(o.uniquePropertyName);r&&(r.isUnique=!0)}},t.prototype.getAllowRowDragDrop=function(e){return!1},t.prototype.calcHasPropertiesInDetail=function(e,t){if(!t.className)return!0;var o=r.Serializer.createClass(t.className);if(!o)return!0;var i=new r.PanelModel("");return new Ge(o,e.options,e.obj,t).setupObjPanel(i,!0),i.elements.length>0},t.prototype.getJSON=function(e,t,o){return this.getMatrixJSON(e,t,this.getColumnNames(e,t,o),o)},t.prototype.getMatrixJSON=function(e,t,o,i){var n=t.className;n||(n=t.baseClassName);var r=this.getColumnsJSON(e,t,o,i),a={type:"matrixdynamic",detailPanelMode:"underRow",cellType:"text",rowCount:0,columns:r,showHeader:r.length>2,hideColumnsIfEmpty:!0,addRowText:this.getAddRowText(t),keyDuplicationError:H.getString("pe.propertyIsNoUnique"),emptyRowsText:this.getEmptyRowsText(t)};this.getShowDetailPanelOnAdding()&&(a.detailPanelShowOnAdding=!0);var s=this.getMaximumRowCount(e,t,i);return s>0&&(a.maxRowCount=s),a},t.prototype.getEmptyRowsText=function(e){var t="pe.listIsEmpty",o=t+"@"+e.name;return H.hasString(o)&&(t=o),H.getString(t)},t.prototype.getMaximumRowCount=function(e,t,o){return-1},t.prototype.filterPropertyNames=function(e){return e},t.prototype.getColumnsJSON=function(e,t,o,i){var n=t.className;n||(n=t.baseClassName);for(var r=new Ge(e,i).createColumnsJSON(n,this.filterPropertyNames(o)),a=0;a<r.length;a++)"comment"==r[a].cellType&&(r[a].cellType="text");return r},t.prototype.getEditItemAsStandAlone=function(){return!1},t.prototype.getShowDetailPanelOnAdding=function(){return!1},t.prototype.getAddRowText=function(e){var t="pe.addNew@"+e.name;return H.hasString(t)?H.getString(t):H.getString("pe.addNew")},t.prototype.setupUsingOptions=function(e,t,o,i){var n={allowAddRemoveItems:!0,allowRemoveAllItems:!0,showTextView:!0,allowBatchEdit:!0};o.onSetPropertyEditorOptionsCallback(i.name,e,n),n.allowAddRemoveItems||(t.allowAddRows=!1,t.allowRemoveRows=!1),t.allowRemoveAllItems=n.allowRemoveAllItems,t.showTextView=n.showTextView,t.allowBatchEdit=n.allowBatchEdit},t}(Ze),hi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return e.isArray&&r.Serializer.isDescendantOf(e.className,"itemvalue")&&"rateValues"!=e.name},t.prototype.filterPropertyNames=function(e){return e.filter((function(e){return"icon"!=e}))},t.prototype.isPropertyEditorSetupEnabled=function(e,t,o,i){if(!1===o.showTextView)return!1;var n=o.getColumnByName("value"),r=o.value;return!!n&&n.isVisible&&!n.readOnly&&!this.hasMultipleLanguage(r)&&!this.hasVisibleIfOrEnableIf(r)},t.prototype.getAllowRowDragDrop=function(e){return!0},t.prototype.createPropertyEditorSetup=function(e,t,o,i){var n=o.columns.filter((function(e){return!e.readOnly})).map((function(e){return e.name}));return new pi(e[t.name],i,t.className,n)},t.prototype.canClearPropertyValue=function(e,t,o,i){return!1!==o.allowRemoveAllItems},t.prototype.clearPropertyValue=function(e,t,o,i){var n=e[t.name];Array.isArray(n)&&n.splice(0,n.length)},t.prototype.getColumnClassName=function(e,t){return e.getType()+"@"+t.name},t.prototype.getDefaulColumnNames=function(){return["value","text"]},t.prototype.getKeyValue=function(){return"value"},t.prototype.getMatrixJSON=function(t,o,i,n){var r=e.prototype.getMatrixJSON.call(this,t,o,i,n);return"rateValues"===o.name&&"icon"==r.columns[0].name&&(r.showHeader=r.columns>3),r},t.prototype.getMaximumRowCount=function(t,o,i){return"choices"===o.name?i.maximumChoicesCount:"rows"===o.name?i.maximumRowsCount:"columns"===o.name?i.maximumColumnsCount:"rateValues"===o.name?i.maximumRateValues:e.prototype.getMaximumRowCount.call(this,t,o,i)},t.prototype.hasMultipleLanguage=function(e){if(!e||!Array.isArray(e))return!1;for(var t=0;t<e.length;t++)if(e[t].locText.hasNonDefaultText())return!0;return!1},t.prototype.hasVisibleIfOrEnableIf=function(e){if(!e||!Array.isArray(e))return!1;for(var t=0;t<e.length;t++)if(e[t].visibleIf||e[t].enableIf)return!0;return!1},t.prototype.onMatrixCellCreated=function(t,o){function i(e,t){e.html='<div class="spg-smiley-icon"><svg><use xlink:href="#icon-'+t+'"></use></svg></div>'}e.prototype.onMatrixCellCreated.call(this,t,o),t instanceof r.QuestionRatingModel&&"icon"==o.columnName&&(i(o.cellQuestion,o.cellQuestion.value),o.cellQuestion.onPropertyChanged.add((function(e,t){"value"==t.name&&i(e,t.newValue)})))},t.prototype.onMatrixCellValueChanged=function(t,o){e.prototype.onMatrixCellValueChanged.call(this,t,o),t instanceof r.QuestionRatingModel&&"icon"==o.columnName&&(o.cellQuestion.html=o.cellQuestion.value)},t}(di),gi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return e.isArray&&r.Serializer.isDescendantOf(e.className,"itemvalue")&&"rateValues"==e.name},t.prototype.updateAllowAddRemove=function(e,t){e.allowRemoveRows=Jo.allowRemoveForElement(t),e.allowAddRows=Jo.allowAddForElement(t,e.maxRowCount)},t.prototype.onCreated=function(t,o,i){var n=this;e.prototype.onCreated.call(this,t,o,i);var r=o,a=A(t);this.updateAllowAddRemove(r,a),t.onPropertyChanged.add((function(e,t){"rateCount"!=t.name&&"rateDisplayMode"!=t.name||n.updateAllowAddRemove(r,a)}))},t.prototype.onGetQuestionTitleActions=function(t,o){var i=o.titleActions.filter((function(e){return"property-grid-clear"==e.id}))[0];i&&(i.visible=!1),e.prototype.onGetQuestionTitleActions.call(this,t,o)},t.prototype.filterPropertyNames=function(e){return e},t}(hi),mi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"matrixdropdowncolumns"==e.type},t.prototype.getEditItemAsStandAlone=function(){return!0},t.prototype.getDefaulColumnNames=function(){return["name","title"]},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"column"},t.prototype.getMaximumRowCount=function(e,t,o){return o.maximumColumnsCount},t.prototype.getAllowRowDragDrop=function(e){return!0},t}(di),fi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"surveypages"==e.type},t.prototype.onMatrixAllowRemoveRow=function(e,t){var o=t.editingObj;if(o&&o.survey)return o.survey.currentPage!==o},t.prototype.getColumnClassName=function(e,t){return"page@"+e.getType()},t.prototype.getDefaulColumnNames=function(){return["name","title"]},t.prototype.hasDetailPanel=function(){return!1},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"page"},t.prototype.getAllowRowDragDrop=function(e){return!0},t}(di),yi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"calculatedvalues"==e.type},t.prototype.getColumnClassName=function(e,t){return"calculatedvalue@items"},t.prototype.getDefaulColumnNames=function(){return["name"]},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"var"},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t.prototype.setupMatrixQuestion=function(t,o,i){e.prototype.setupMatrixQuestion.call(this,t,o,i),o.isUniqueCaseSensitive=!1},t}(di),vi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"htmlconditions"==e.type},t.prototype.getDefaulColumnNames=function(){return["html"]},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(di),bi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"urlconditions"==e.type},t.prototype.getDefaulColumnNames=function(){return["url"]},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(di),wi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"textitem[]"==e.type},t.prototype.getColumnClassName=function(e,t){return"multipletext@items"},t.prototype.getDefaulColumnNames=function(){return["name"]},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"item"},t.prototype.getAllowRowDragDrop=function(){return!0},t.prototype.createPropertyEditorSetup=function(e,t,o,i){var n=[];return o.columns.forEach((function(e){n.push(e.name)})),new ci(e[t.name],i,t.className,n)},t.prototype.onMatrixCellCreated=function(t,o){e.prototype.onMatrixCellCreated.call(this,t,o);var i=o.cellQuestion;if(o.row.editingObj){var n=o.row.editingObj.editor;n&&i.property&&n.registerFunctionOnPropertyValueChanged(i.property.name,(function(){i.value=n[i.property.name]}))}},t}(di),Ci=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.getColumnsJSON=function(t,o,i,n){var r=e.prototype.getColumnsJSON.call(this,t,o,i,n);return this.getObjTypeName()&&r.unshift({name:this.getObjTypeName(),cellType:"dropdown"}),r},t.prototype.onMatrixCellCreated=function(t,o){e.prototype.onMatrixCellCreated.call(this,t,o);var i=o.cellQuestion;o.columnName===this.getObjTypeName()&&(i.showOptionsCaption=!1,i.choices=this.getChoices(t),i.value=o.row.editingObj.getType())},t.prototype.onMatrixCellValueChanged=function(t,o){if(e.prototype.onMatrixCellValueChanged.call(this,t,o),o.columnName===this.getObjTypeName()){var i=o.question.visibleRows.indexOf(o.row);if(!(i<0)){var n=o.row.isDetailPanelShowing,a=o.row.editingObj.toJSON();delete a.type;var s=r.Serializer.createClass(o.value);s.fromJSON(a),s[this.getObjTypeName()]=s.getType(),o.row.hideDetailPanel(!0),o.question.value.splice(i,1,s),o.row.value=s,n&&o.row.showDetailPanel()}}},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(di),xi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"validators"==e.type},t.prototype.getObjTypeName=function(){return"validatorType"},t.prototype.getDefaultClassName=function(e){return"expressionvalidator"},t.prototype.getChoices=function(e){for(var t=this.getSupportedValidators(e),o=[],i=0;i<t.length;i++){var n=t[i]+"validator";o.push({value:n,text:H.getValidatorName(n)})}return o},t.prototype.getSupportedValidators=function(e){return e?e.getSupportedValidators?e.getSupportedValidators():e.getOriginalObj?this.getSupportedValidators(e.getOriginalObj()):[]:[]},t}(Ci),Ti=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.getAvailableTriggers=function(){return r.Serializer.getChildrenClasses("surveytrigger",!0).filter((function(e){return"visibletrigger"!==e.name}))},t.prototype.fit=function(e){return"triggers"==e.type},t.prototype.getObjTypeName=function(){return"triggerType"},t.prototype.getDefaultClassName=function(e){var t=this.getAvailableTriggers().map((function(e){return e.name}));return t.length?-1!==t.indexOf("runexpressiontrigger")?"runexpressiontrigger":t[0]:e.name},t.prototype.getAllowRowDragDrop=function(e){return!0},t.prototype.getChoices=function(e){return this.getAvailableTriggers().map((function(e){return{value:e.name,text:H.getTriggerName(e.name)}}))},t}(Ci);Fe.register(new hi),Fe.register(new gi),Fe.register(new mi),Fe.register(new fi),Fe.register(new yi),Fe.register(new vi),Fe.register(new bi),Fe.register(new wi),Fe.register(new xi),Fe.register(new Ti),Fe.register({fit:function(e){return"icon"===e.name&&"itemvalue"===e.classInfo.name},getJSON:function(e){return{type:"html"}}});var Si={name:"propertygrid_bindings",showInToolbox:!1,createElements:function(){}};r.ComponentCollection.Instance.getCustomQuestionByName(Si.name)||r.ComponentCollection.Instance.add(Si);var Pi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"bindings"==e.type},t.prototype.getJSON=function(){return{type:"propertygrid_bindings"}},t.prototype.onCreated=function(e,t,o,i){t.contentPanel.fromJSON({elements:this.getQuestions(e,i)}),t.valueFromDataCallback=function(t){if(!t&&e.bindings.getNames().length>0){for(var o={},i=0,n=e.bindings.getNames();i<n.length;i++){var r=n[i];o[r]=e.bindings.getValueNameByPropertyName(r)}return o}return t}},t.prototype.getQuestions=function(e,t){for(var o=[],i=0,n=e.bindings.getNames();i<n.length;i++){var r=n[i];o.push(this.getBindingJSON(r,e,t))}return o},t.prototype.getBindingJSON=function(e,t,o){var i=new r.JsonObjectProperty(null,"value");i.type="questionvalue";var n=Fe.getJSON(t,i,o);return n.titleLocation="left",n.descriptionLocation="hidden",n.minWidth="0px",n.name=e,n.title=H.getPropertyName(e),n},t}(Ze);Fe.register(new Pi);var Ei={name:"propertygrid_restfull",showInToolbox:!1,createElements:function(e){}};r.ComponentCollection.Instance.getCustomQuestionByName(Ei.name)||r.ComponentCollection.Instance.add(Ei);var Oi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"restfull"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"propertygrid_restfull",titleLocation:"hidden"}},t.prototype.onCreated=function(e,t,o,i){new Ge(e[o.name],i,e,o).setupObjPanel(t.contentPanel,!0)},t}(st);Fe.register(new Oi);var Ii=function(e){function t(t,o){void 0===o&&(o=null);var i=e.call(this,o)||this;return i.matrix=t,i.editMatrixValue=i.editSurvey.getQuestionByName("question"),i.buildColumns(),i.buildRows(),i.editMatrix.value=i.matrix.cells.getJson(),i}return z(t,e),t.prototype.getSurveyJSON=function(){return{elements:[{type:"matrixdropdown",name:"question",cellType:"comment"}]}},t.prototype.getSurveyCreationReason=function(){return"cells-editor"},Object.defineProperty(t.prototype,"editMatrix",{get:function(){return this.editMatrixValue},enumerable:!1,configurable:!0}),t.prototype.apply=function(){return this.matrix.cells.setJson(this.editMatrix.value),!0},t.prototype.buildColumns=function(){for(var e=this.matrix.columns,t=0;t<e.length;t++)this.editMatrix.addColumn(""+e[t].value,e[t].text)},t.prototype.buildRows=function(){this.editMatrix.rows.push(new r.ItemValue("default",H.getString("pe.cellsDefaultRow")));for(var e=this.matrix.rows,t=0;t<e.length;t++)this.editMatrix.rows.push(new r.ItemValue(e[t].value,e[t].text))},t}(Qe),Vi=function(e){function t(t,o,i){void 0===i&&(i=null);var n=e.call(this,i,!1)||this;return n.editQuestion=t,n.propertyName=o,n.setupSurvey(),n.question.value=n.getQuestionValue(),n}return z(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.editSurvey.getQuestionByName("question")},enumerable:!1,configurable:!0}),t.prototype.getSurveyJSON=function(){return{elements:[this.getQuestionJSON()]}},t.prototype.getQuestionJSON=function(){var e=this.editQuestion.toJSON();return e.name="question",e.title=e.title||this.editQuestion.name,e.type=this.editQuestion.getType(),"expression"==e.type&&(e.type="text"),e.cellType&&"matrixdropdowncolumn"==e.type&&(e.type=e.cellType,delete e.cellType),re.updateQuestionJson(e),e},t.prototype.getQuestionValue=function(){return this.editQuestion[this.propertyName]},t.prototype.getEditValue=function(){return this.question.value},t.prototype.getSurveyCreationReason=function(){return"default-value"},t.prototype.apply=function(){return this.editQuestion[this.propertyName]=this.getEditValue(),!0},t}(Qe),Ni=function(e){function t(t,o,i){void 0===i&&(i=null);var n=e.call(this,t,o,i)||this;return n.editQuestion=t,n.propertyName=o,n}return z(t,e),t.prototype.getQuestionValue=function(){var t=e.prototype.getQuestionValue.call(this);return t?(Array.isArray(t)||(t=[t]),t):t},t.prototype.getEditValue=function(){var t=e.prototype.getEditValue.call(this);return t&&Array.isArray(t)?0==t.length?null:t[0]:t},t}(Vi),Ai=function(e){function t(t,o,i){void 0===i&&(i=null);var n=e.call(this,t,o,i)||this;return n.editQuestion=t,n.propertyName=o,n}return z(t,e),t.prototype.getQuestionJSON=function(){var t=e.prototype.getQuestionJSON.call(this);return t.type="matrixdynamic",t.rowCount=1,t.minRowCount=1,t.maxRowCount=1,t.columnsLocation="vertical",t},t}(Ni),_i=function(e){function t(t,o,i){void 0===i&&(i=null);var n=e.call(this,t,o,i)||this;return n.editQuestion=t,n.propertyName=o,n}return z(t,e),t.prototype.getQuestionJSON=function(){var t=e.prototype.getQuestionJSON.call(this);return t.panelCount=1,t.minPanelCount=1,t.maxPanelCount=1,t},t}(Ni),Li=function(e){function t(t,o,i,n){void 0===n&&(n=null);var r=e.call(this,t,i,n)||this;return r.editQuestion=t,r.editObj=o,r.propertyName=i,r.question.value=r.getQuestionValue(),r}return z(t,e),t.prototype.getQuestionValue=function(){return this.editObj?this.editObj[this.propertyName]:null},t.prototype.apply=function(){return this.editObj[this.propertyName]=this.question.value,!0},t}(Vi),ji=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onCreated=function(e,o,i,n){var r=o;r.isClickableCallback=function(){return!r.isReadOnly||!t.isValueEmpty(r.value)},r.linkClickCallback=function(){t.showModalPropertyEditor(t,i,o,n,(function(){return r.isSelected=!1})),r.isSelected=!0},r.clearClickCallback=function(){t.clearPropertyValue(o.obj,i,o,null)}},t}return z(t,e),t.prototype.getJSON=function(e,t,o){return{type:"linkvalue",showValueInLink:!1,titleLocation:"hidden"}},t.prototype.clearPropertyValue=function(e,t,o,i){e[t.name]=void 0},t.prototype.isValueEmpty=function(e){return r.Helpers.isValueEmpty(e)},t.prototype.isSupportGrouping=function(){return!0},t}(Ze),ki=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"cells"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,i){return new Ii(e,i)},t.prototype.clearPropertyValue=function(e,t,o,i){e.cells.setJson(null)},t.prototype.isValueEmpty=function(e){return!e||r.Helpers.isValueEmpty(e.values)},t}(ji),Mi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"value"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,i){return new Vi(e,t.name,i)},t}(ji),Di=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"rowvalue"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,i){return new Ai(e,t.name,i)},t}(ji),Ri=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"panelvalue"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,i){return new _i(e,t.name,i)},t}(ji),Bi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"triggervalue"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,i){var n=o.obj,r=this.getSetToNameQuestion(n);return new Li(r,n,t.name,i)},t.prototype.getSetToNameQuestion=function(e){var t=e.getSurvey();return t||(t=e.owner),e.setToName&&t?t.getQuestionByValueName(e.setToName):null},t}(ji),qi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e,t){return"logic"===t&&"triggervalue"==e.type},t.prototype.getJSON=function(e,t,o){var i=this.getSetToNameQuestion(e);if(!i)return{type:"linkvalue"};var n=i.toJSON();return n.type=i.getType(),re.updateQuestionJson(n),n},t}(Bi);Fe.register(new ki),Fe.register(new Mi),Fe.register(new Di),Fe.register(new Ri),Fe.register(new Bi),Fe.register(new qi);var Hi,Qi=o(32);r.SvgRegistry.registerIconsFromFolder(Qi),Hi="1.9.98",o(3),o(121),o(122),o(123),o(124),o(125),o(2),o(126),o(127),o(128),o(129),o(130),r.settings.supportCreatorV2=!0,Object(r.checkLibraryVersion)("1.9.98","survey-creator-core")}])}));
|
|
13
|
+
*/n=[],void 0===(r="function"==typeof(i=function e(){"use strict";var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},o=!t.document&&!!t.postMessage,i=t.IS_PAPA_WORKER||!1,n={},r=0,a={parse:function(o,i){var s=(i=i||{}).dynamicTyping||!1;if(C(s)&&(i.dynamicTypingFunction=s,s={}),i.dynamicTyping=s,i.transform=!!C(i.transform)&&i.transform,i.worker&&a.WORKERS_SUPPORTED){var l=function(){if(!a.WORKERS_SUPPORTED)return!1;var o,i,s=(o=t.URL||t.webkitURL||null,i=e.toString(),a.BLOB_URL||(a.BLOB_URL=o.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",i,")();"],{type:"text/javascript"})))),l=new t.Worker(s);return l.onmessage=f,l.id=r++,n[l.id]=l}();return l.userStep=i.step,l.userChunk=i.chunk,l.userComplete=i.complete,l.userError=i.error,i.step=C(i.step),i.chunk=C(i.chunk),i.complete=C(i.complete),i.error=C(i.error),delete i.worker,void l.postMessage({input:o,config:i,workerId:l.id})}var h=null;return a.NODE_STREAM_INPUT,"string"==typeof o?(o=function(e){return 65279===e.charCodeAt(0)?e.slice(1):e}(o),h=i.download?new u(i):new p(i)):!0===o.readable&&C(o.read)&&C(o.on)?h=new d(i):(t.File&&o instanceof File||o instanceof Object)&&(h=new c(i)),h.stream(o)},unparse:function(e,t){var o=!1,i=!0,n=",",r="\r\n",s='"',l=s+s,u=!1,c=null,p=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||a.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(n=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(o=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(u=t.skipEmptyLines),"string"==typeof t.newline&&(r=t.newline),"string"==typeof t.quoteChar&&(s=t.quoteChar),"boolean"==typeof t.header&&(i=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");c=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+s),("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(p=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/)}}();var d=new RegExp(g(s),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return h(null,e,u);if("object"==typeof e[0])return h(c||Object.keys(e[0]),e,u)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||c),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),h(e.fields||[],e.data||[],u);throw new Error("Unable to serialize unrecognized input");function h(e,t,o){var a="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var s=Array.isArray(e)&&0<e.length,l=!Array.isArray(t[0]);if(s&&i){for(var u=0;u<e.length;u++)0<u&&(a+=n),a+=m(e[u],u);0<t.length&&(a+=r)}for(var c=0;c<t.length;c++){var p=s?e.length:t[c].length,d=!1,h=s?0===Object.keys(t[c]).length:0===t[c].length;if(o&&!s&&(d="greedy"===o?""===t[c].join("").trim():1===t[c].length&&0===t[c][0].length),"greedy"===o&&s){for(var g=[],f=0;f<p;f++){var y=l?e[f]:f;g.push(t[c][y])}d=""===g.join("").trim()}if(!d){for(var v=0;v<p;v++){0<v&&!h&&(a+=n);var b=s&&l?e[v]:v;a+=m(t[c][b],v)}c<t.length-1&&(!o||0<p&&!h)&&(a+=r)}}return a}function m(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);var i=!1;p&&"string"==typeof e&&p.test(e)&&(e="'"+e,i=!0);var r=e.toString().replace(d,l);return(i=i||!0===o||"function"==typeof o&&o(e,t)||Array.isArray(o)&&o[t]||function(e,t){for(var o=0;o<t.length;o++)if(-1<e.indexOf(t[o]))return!0;return!1}(r,a.BAD_DELIMITERS)||-1<r.indexOf(n)||" "===r.charAt(0)||" "===r.charAt(r.length-1))?s+r+s:r}}};if(a.RECORD_SEP=String.fromCharCode(30),a.UNIT_SEP=String.fromCharCode(31),a.BYTE_ORDER_MARK="\ufeff",a.BAD_DELIMITERS=["\r","\n",'"',a.BYTE_ORDER_MARK],a.WORKERS_SUPPORTED=!o&&!!t.Worker,a.NODE_STREAM_INPUT=1,a.LocalChunkSize=10485760,a.RemoteChunkSize=5242880,a.DefaultDelimiter=",",a.Parser=m,a.ParserHandle=h,a.NetworkStreamer=u,a.FileStreamer=c,a.StringStreamer=p,a.ReadableStreamStreamer=d,t.jQuery){var s=t.jQuery;s.fn.parse=function(e){var o=e.config||{},i=[];return this.each((function(e){if("INPUT"!==s(this).prop("tagName").toUpperCase()||"file"!==s(this).attr("type").toLowerCase()||!t.FileReader||!this.files||0===this.files.length)return!0;for(var n=0;n<this.files.length;n++)i.push({file:this.files[n],inputElem:this,instanceConfig:s.extend({},o)})})),n(),this;function n(){if(0!==i.length){var t,o,n,l=i[0];if(C(e.before)){var u=e.before(l.file,l.inputElem);if("object"==typeof u){if("abort"===u.action)return t=l.file,o=l.inputElem,n=u.reason,void(C(e.error)&&e.error({name:"AbortError"},t,o,n));if("skip"===u.action)return void r();"object"==typeof u.config&&(l.instanceConfig=s.extend(l.instanceConfig,u.config))}else if("skip"===u)return void r()}var c=l.instanceConfig.complete;l.instanceConfig.complete=function(e){C(c)&&c(e,l.file,l.inputElem),r()},a.parse(l.file,l.instanceConfig)}else C(e.complete)&&e.complete()}function r(){i.splice(0,1),n()}}}function l(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=b(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new h(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,o){if(this.isFirstChunk&&C(this._config.beforeFirstChunk)){var n=this._config.beforeFirstChunk(e);void 0!==n&&(e=n)}this.isFirstChunk=!1,this._halted=!1;var r=this._partialLine+e;this._partialLine="";var s=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var l=s.meta.cursor;this._finished||(this._partialLine=r.substring(l-this._baseIndex),this._baseIndex=l),s&&s.data&&(this._rowCount+=s.data.length);var u=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(i)t.postMessage({results:s,workerId:a.WORKER_ID,finished:u});else if(C(this._config.chunk)&&!o){if(this._config.chunk(s,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);s=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(s.data),this._completeResults.errors=this._completeResults.errors.concat(s.errors),this._completeResults.meta=s.meta),this._completed||!u||!C(this._config.complete)||s&&s.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),u||s&&s.meta.paused||this._nextChunk(),s}this._halted=!0},this._sendError=function(e){C(this._config.error)?this._config.error(e):i&&this._config.error&&t.postMessage({workerId:a.WORKER_ID,error:e,finished:!1})}}function u(e){var t;(e=e||{}).chunkSize||(e.chunkSize=a.RemoteChunkSize),l.call(this,e),this._nextChunk=o?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),o||(t.onload=w(this._chunkLoaded,this),t.onerror=w(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!o),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var i in e)t.setRequestHeader(i,e[i])}if(this._config.chunkSize){var n=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+n)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}o&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var o=t.statusText||e;this._sendError(new Error(o))}}function c(e){var t,o;(e=e||{}).chunkSize||(e.chunkSize=a.LocalChunkSize),l.call(this,e);var i="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,o=e.slice||e.webkitSlice||e.mozSlice,i?((t=new FileReader).onload=w(this._chunkLoaded,this),t.onerror=w(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var n=Math.min(this._start+this._config.chunkSize,this._input.size);e=o.call(e,this._start,n)}var r=t.readAsText(e,this._config.encoding);i||this._chunkLoaded({target:{result:r}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function p(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,o=this._config.chunkSize;return o?(e=t.substring(0,o),t=t.substring(o)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function d(e){l.call(this,e=e||{});var t=[],o=!0,i=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){i&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):o=!0},this._streamData=w((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),o&&(o=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=w((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=w((function(){this._streamCleanUp(),i=!0,this._streamData("")}),this),this._streamCleanUp=w((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function h(e){var t,o,i,n=Math.pow(2,53),r=-n,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,l=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,u=this,c=0,p=0,d=!1,h=!1,f=[],y={data:[],errors:[],meta:{}};if(C(e.step)){var v=e.step;e.step=function(t){if(y=t,T())x();else{if(x(),0===y.data.length)return;c+=t.data.length,e.preview&&c>e.preview?o.abort():(y.data=y.data[0],v(y,u))}}}function w(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function x(){return y&&i&&(P("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),i=!1),e.skipEmptyLines&&(y.data=y.data.filter((function(e){return!w(e)}))),T()&&function(){if(y)if(Array.isArray(y.data[0])){for(var t=0;T()&&t<y.data.length;t++)y.data[t].forEach(o);y.data.splice(0,1)}else y.data.forEach(o);function o(t,o){C(e.transformHeader)&&(t=e.transformHeader(t,o)),f.push(t)}}(),function(){if(!y||!e.header&&!e.dynamicTyping&&!e.transform)return y;function t(t,o){var i,n=e.header?{}:[];for(i=0;i<t.length;i++){var r=i,a=t[i];e.header&&(r=i>=f.length?"__parsed_extra":f[i]),e.transform&&(a=e.transform(a,r)),a=S(r,a),"__parsed_extra"===r?(n[r]=n[r]||[],n[r].push(a)):n[r]=a}return e.header&&(i>f.length?P("FieldMismatch","TooManyFields","Too many fields: expected "+f.length+" fields but parsed "+i,p+o):i<f.length&&P("FieldMismatch","TooFewFields","Too few fields: expected "+f.length+" fields but parsed "+i,p+o)),n}var o=1;return!y.data.length||Array.isArray(y.data[0])?(y.data=y.data.map(t),o=y.data.length):y.data=t(y.data,0),e.header&&y.meta&&(y.meta.fields=f),p+=o,y}()}function T(){return e.header&&0===f.length}function S(t,o){return i=t,e.dynamicTypingFunction&&void 0===e.dynamicTyping[i]&&(e.dynamicTyping[i]=e.dynamicTypingFunction(i)),!0===(e.dynamicTyping[i]||e.dynamicTyping)?"true"===o||"TRUE"===o||"false"!==o&&"FALSE"!==o&&(function(e){if(s.test(e)){var t=parseFloat(e);if(r<t&&t<n)return!0}return!1}(o)?parseFloat(o):l.test(o)?new Date(o):""===o?null:o):o;var i}function P(e,t,o,i){var n={type:e,code:t,message:o};void 0!==i&&(n.row=i),y.errors.push(n)}this.parse=function(n,r,s){var l=e.quoteChar||'"';if(e.newline||(e.newline=function(e,t){e=e.substring(0,1048576);var o=new RegExp(g(t)+"([^]*?)"+g(t),"gm"),i=(e=e.replace(o,"")).split("\r"),n=e.split("\n"),r=1<n.length&&n[0].length<i[0].length;if(1===i.length||r)return"\n";for(var a=0,s=0;s<i.length;s++)"\n"===i[s][0]&&a++;return a>=i.length/2?"\r\n":"\r"}(n,l)),i=!1,e.delimiter)C(e.delimiter)&&(e.delimiter=e.delimiter(n),y.meta.delimiter=e.delimiter);else{var u=function(t,o,i,n,r){var s,l,u,c;r=r||[",","\t","|",";",a.RECORD_SEP,a.UNIT_SEP];for(var p=0;p<r.length;p++){var d=r[p],h=0,g=0,f=0;u=void 0;for(var y=new m({comments:n,delimiter:d,newline:o,preview:10}).parse(t),v=0;v<y.data.length;v++)if(i&&w(y.data[v]))f++;else{var b=y.data[v].length;g+=b,void 0!==u?0<b&&(h+=Math.abs(b-u),u=b):u=b}0<y.data.length&&(g/=y.data.length-f),(void 0===l||h<=l)&&(void 0===c||c<g)&&1.99<g&&(l=h,s=d,c=g)}return{successful:!!(e.delimiter=s),bestDelimiter:s}}(n,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);u.successful?e.delimiter=u.bestDelimiter:(i=!0,e.delimiter=a.DefaultDelimiter),y.meta.delimiter=e.delimiter}var c=b(e);return e.preview&&e.header&&c.preview++,t=n,o=new m(c),y=o.parse(t,r,s),x(),d?{meta:{paused:!0}}:y||{meta:{paused:!1}}},this.paused=function(){return d},this.pause=function(){d=!0,o.abort(),t=C(e.chunk)?"":t.substring(o.getCharIndex())},this.resume=function(){u.streamer._halted?(d=!1,u.streamer.parseChunk(t,!0)):setTimeout(u.resume,3)},this.aborted=function(){return h},this.abort=function(){h=!0,o.abort(),y.meta.aborted=!0,C(e.complete)&&e.complete(y),t=""}}function g(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(e){var t,o=(e=e||{}).delimiter,i=e.newline,n=e.comments,r=e.step,s=e.preview,l=e.fastMode,u=t=void 0===e.quoteChar||null===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(u=e.escapeChar),("string"!=typeof o||-1<a.BAD_DELIMITERS.indexOf(o))&&(o=","),n===o)throw new Error("Comment character same as delimiter");!0===n?n="#":("string"!=typeof n||-1<a.BAD_DELIMITERS.indexOf(n))&&(n=!1),"\n"!==i&&"\r"!==i&&"\r\n"!==i&&(i="\n");var c=0,p=!1;this.parse=function(a,d,h){if("string"!=typeof a)throw new Error("Input must be a string");var m=a.length,f=o.length,y=i.length,v=n.length,b=C(r),w=[],x=[],T=[],S=c=0;if(!a)return z();if(e.header&&!d){var P=a.split(i)[0].split(o),E=[],O={},I=!1;for(var V in P){var N=P[V];C(e.transformHeader)&&(N=e.transformHeader(N,V));var A=N,_=O[N]||0;for(0<_&&(I=!0,A=N+"_"+_),O[N]=_+1;E.includes(A);)A=A+"_"+_;E.push(A)}if(I){var j=a.split(i);j[0]=E.join(o),a=j.join(i)}}if(l||!1!==l&&-1===a.indexOf(t)){for(var L=a.split(i),k=0;k<L.length;k++){if(T=L[k],c+=T.length,k!==L.length-1)c+=i.length;else if(h)return z();if(!n||T.substring(0,v)!==n){if(b){if(w=[],Q(T.split(o)),Z(),p)return z()}else Q(T.split(o));if(s&&s<=k)return w=w.slice(0,s),z(!0)}}return z()}for(var M=a.indexOf(o,c),D=a.indexOf(i,c),R=new RegExp(g(u)+g(t),"g"),B=a.indexOf(t,c);;)if(a[c]!==t)if(n&&0===T.length&&a.substring(c,c+v)===n){if(-1===D)return z();c=D+y,D=a.indexOf(i,c),M=a.indexOf(o,c)}else if(-1!==M&&(M<D||-1===D))T.push(a.substring(c,M)),c=M+f,M=a.indexOf(o,c);else{if(-1===D)break;if(T.push(a.substring(c,D)),G(D+y),b&&(Z(),p))return z();if(s&&w.length>=s)return z(!0)}else for(B=c,c++;;){if(-1===(B=a.indexOf(t,B+1)))return h||x.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:w.length,index:c}),U();if(B===m-1)return U(a.substring(c,B).replace(R,t));if(t!==u||a[B+1]!==u){if(t===u||0===B||a[B-1]!==u){-1!==M&&M<B+1&&(M=a.indexOf(o,B+1)),-1!==D&&D<B+1&&(D=a.indexOf(i,B+1));var q=F(-1===D?M:Math.min(M,D));if(a.substr(B+1+q,f)===o){T.push(a.substring(c,B).replace(R,t)),a[c=B+1+q+f]!==t&&(B=a.indexOf(t,c)),M=a.indexOf(o,c),D=a.indexOf(i,c);break}var H=F(D);if(a.substring(B+1+H,B+1+H+y)===i){if(T.push(a.substring(c,B).replace(R,t)),G(B+1+H+y),M=a.indexOf(o,c),B=a.indexOf(t,c),b&&(Z(),p))return z();if(s&&w.length>=s)return z(!0);break}x.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:w.length,index:c}),B++}}else B++}return U();function Q(e){w.push(e),S=c}function F(e){var t=0;if(-1!==e){var o=a.substring(B+1,e);o&&""===o.trim()&&(t=o.length)}return t}function U(e){return h||(void 0===e&&(e=a.substring(c)),T.push(e),c=m,Q(T),b&&Z()),z()}function G(e){c=e,Q(T),T=[],D=a.indexOf(i,c)}function z(e){return{data:w,errors:x,meta:{delimiter:o,linebreak:i,aborted:p,truncated:!!e,cursor:S+(d||0)}}}function Z(){r(z()),w=[],x=[]}},this.abort=function(){p=!0},this.getCharIndex=function(){return c}}function f(e){var t=e.data,o=n[t.workerId],i=!1;if(t.error)o.userError(t.error,t.file);else if(t.results&&t.results.data){var r={abort:function(){i=!0,y(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:v,resume:v};if(C(o.userStep)){for(var a=0;a<t.results.data.length&&(o.userStep({data:t.results.data[a],errors:t.results.errors,meta:t.results.meta},r),!i);a++);delete t.results}else C(o.userChunk)&&(o.userChunk(t.results,r,t.file),delete t.results)}t.finished&&!i&&y(t.workerId,t.results)}function y(e,t){var o=n[e];C(o.userComplete)&&o.userComplete(t),o.terminate(),delete n[e]}function v(){throw new Error("Not implemented.")}function b(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var o in e)t[o]=b(e[o]);return t}function w(e,t){return function(){e.apply(t,arguments)}}function C(e){return"function"==typeof e}return i&&(t.onmessage=function(e){var o=e.data;if(void 0===a.WORKER_ID&&o&&(a.WORKER_ID=o.workerId),"string"==typeof o.input)t.postMessage({workerId:a.WORKER_ID,results:a.parse(o.input,o.config),finished:!0});else if(t.File&&o.input instanceof File||o.input instanceof Object){var i=a.parse(o.input,o.config);i&&t.postMessage({workerId:a.WORKER_ID,results:i,finished:!0})}}),(u.prototype=Object.create(l.prototype)).constructor=u,(c.prototype=Object.create(l.prototype)).constructor=c,(p.prototype=Object.create(p.prototype)).constructor=p,(d.prototype=Object.create(l.prototype)).constructor=d,a})?i.apply(t,n):i)||(e.exports=r)},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e){e.exports=JSON.parse('{"default":{"--sjs-general-backcolor":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dark":"rgba(248, 248, 248, 1)","--sjs-general-backcolor-dim":"rgba(243, 243, 243, 1)","--sjs-general-backcolor-dim-light":"rgba(249, 249, 249, 1)","--sjs-general-backcolor-dim-dark":"rgba(243, 243, 243, 1)","--sjs-general-forecolor":"rgba(0, 0, 0, 0.91)","--sjs-general-forecolor-light":"rgba(0, 0, 0, 0.45)","--sjs-general-dim-forecolor":"rgba(0, 0, 0, 0.91)","--sjs-general-dim-forecolor-light":"rgba(0, 0, 0, 0.45)","--sjs-primary-backcolor":"rgba(25, 179, 148, 1)","--sjs-primary-backcolor-light":"rgba(25, 179, 148, 0.1)","--sjs-primary-backcolor-dark":"rgba(20, 164, 139, 1)","--sjs-primary-forecolor":"rgba(255, 255, 255, 1)","--sjs-primary-forecolor-light":"rgba(255, 255, 255, 0.25)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-secondary-backcolor":"rgba(255, 152, 20, 1)","--sjs-secondary-backcolor-light":"rgba(255, 152, 20, 0.1)","--sjs-secondary-backcolor-semi-light":"rgba(255, 152, 20, 0.25)","--sjs-secondary-forecolor":"rgba(255, 255, 255, 1)","--sjs-secondary-forecolor-light":"rgba(255, 255, 255, 0.25)","--sjs-shadow-small":"0px 1px 2px 0px rgba(0, 0, 0, 0.15)","--sjs-shadow-medium":"0px 2px 6px 0px rgba(0, 0, 0, 0.1)","--sjs-shadow-large":"0px 8px 16px 0px rgba(0, 0, 0, 0.1)","--sjs-shadow-inner":"inset 0px 1px 2px 0px rgba(0, 0, 0, 0.15)","--sjs-border-light":"rgba(0, 0, 0, 0.09)","--sjs-border-default":"rgba(0, 0, 0, 0.16)","--sjs-border-inside":"rgba(0, 0, 0, 0.16)","--sjs-special-red":"rgba(229, 10, 62, 1)","--sjs-special-red-light":"rgba(229, 10, 62, 0.1)","--sjs-special-red-forecolor":"rgba(255, 255, 255, 1)","--sjs-special-green":"rgba(25, 179, 148, 1)","--sjs-special-green-light":"rgba(25, 179, 148, 0.1)","--sjs-special-green-forecolor":"rgba(255, 255, 255, 1)","--sjs-special-blue":"rgba(67, 127, 217, 1)","--sjs-special-blue-light":"rgba(67, 127, 217, 0.1)","--sjs-special-blue-forecolor":"rgba(255, 255, 255, 1)","--sjs-special-yellow":"rgba(255, 152, 20, 1)","--sjs-special-yellow-light":"rgba(255, 152, 20, 0.1)","--sjs-special-yellow-forecolor":"rgba(255, 255, 255, 1)"},"contrast":{"--sjs-general-backcolor-dark":"rgba(228, 228, 228, 1)","--sjs-general-backcolor-dim":"rgba(224, 224, 224, 1)","--sjs-general-backcolor-dim-light":"rgba(238, 238, 238, 1)","--sjs-general-backcolor-dim-dark":"rgba(220, 220, 220, 1)","--sjs-general-forecolor-light":"rgba(0, 0, 0, 0.6)","--sjs-general-dim-forecolor-light":"rgba(0, 0, 0, 0.6)","--sjs-primary-backcolor":"rgba(103, 58, 176, 1)","--sjs-primary-backcolor-light":"rgba(103, 58, 176, 0.1)","--sjs-primary-backcolor-dark":"rgba(69, 24, 142, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 1px rgba(0, 0, 0, 0.2)","--sjs-shadow-inner":"0px 0px 0px 1px rgba(0, 0, 0, 0.25)","--sjs-border-light":"rgba(0, 0, 0, 0.25)","--sjs-border-default":"rgba(0, 0, 0, 0.25)"},"plain":{"--sjs-general-backcolor-dark":"rgba(241, 246, 255, 1)","--sjs-general-backcolor-dim":"rgba(231, 240, 255, 1)","--sjs-general-backcolor-dim-light":"rgba(238, 245, 255, 1)","--sjs-general-backcolor-dim-dark":"rgba(223, 233, 250, 1)","--sjs-general-forecolor-light":"rgba(133, 154, 186, 1)","--sjs-general-dim-forecolor-light":"rgba(133, 154, 186, 1)","--sjs-primary-backcolor":"rgba(35, 101, 200, 1)","--sjs-primary-backcolor-light":"rgba(35, 101, 200, 0.1)","--sjs-primary-backcolor-dark":"rgba(26, 86, 175, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 0px rgba(0, 0, 0, 0.15)","--sjs-shadow-inner":"inset 0px 0px 0px 0px rgba(0, 0, 0, 0.15)","--sjs-border-light":"rgba(220, 229, 241, 1)","--sjs-border-default":"rgba(179, 200, 229, 1)"},"simple":{"--sjs-general-backcolor":"rgba(246, 246, 246, 1)","--sjs-general-backcolor-dark":"rgba(235, 235, 235, 1)","--sjs-general-backcolor-dim":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim-light":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim-dark":"rgba(235, 235, 235, 1)","--sjs-primary-backcolor":"rgba(85, 181, 52, 1)","--sjs-primary-backcolor-light":"rgba(85, 181, 52, 0.1)","--sjs-primary-backcolor-dark":"rgba(64, 159, 31, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 1px rgba(0, 0, 0, 0.15)","--sjs-shadow-medium":"0px 2px 6px 0px rgba(0, 0, 0, 0.1),0px 0px 0px 1px rgba(0, 0, 0, 0.1)","--sjs-shadow-inner":"0px 0px 0px 1px rgba(0, 0, 0, 0.12)","--sjs-border-light":"rgba(0, 0, 0, 0.12)","--sjs-border-default":"rgba(0, 0, 0, 0.12)"},"blank":{"--sjs-general-backcolor":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim-light":"rgba(255, 255, 255, 1)","--sjs-primary-backcolor":"rgba(37, 137, 229, 1)","--sjs-primary-backcolor-light":"rgba(37, 137, 229, 0.1)","--sjs-primary-backcolor-dark":"rgba(21, 119, 209, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 1px rgba(0, 0, 0, 0.15)","--sjs-shadow-medium":"0px 0px 0px 1px rgba(0, 0, 0, 0.1)","--sjs-shadow-large":"0px 8px 16px 0px rgba(0, 0, 0, 0.05)","--sjs-shadow-inner":"0px 0px 0px 1px rgba(0, 0, 0, 0.15)","--sjs-border-light":"rgba(0, 0, 0, 0.15)","--sjs-border-default":"rgba(0, 0, 0, 0.15)"},"double":{"--sjs-general-backcolor":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dark":"rgba(239, 239, 239, 1)","--sjs-general-backcolor-dim":"rgba(245, 245, 245, 1)","--sjs-general-backcolor-dim-light":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim-dark":"rgba(237, 237, 237, 1)","--sjs-primary-backcolor":"rgba(76, 100, 137, 1)","--sjs-primary-backcolor-light":"rgba(76, 100, 137, 0.1)","--sjs-primary-backcolor-dark":"rgba(62, 83, 115, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 2px rgba(0, 0, 0, 0.07)","--sjs-shadow-medium":"0px 2px 6px 0px rgba(0, 0, 0, 0.04),0px 0px 0px 2px rgba(0, 0, 0, 0.08)","--sjs-shadow-large":"0px 8px 16px 0px rgba(0, 0, 0, 0.08)","--sjs-shadow-inner":"0px 0px 0px 2px rgba(0, 0, 0, 0.1)","--sjs-border-light":"rgba(0, 0, 0, 0.1)","--sjs-border-default":"rgba(0, 0, 0, 0.1)"},"bulk":{"--sjs-general-backcolor":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dark":"rgba(244, 244, 244, 1)","--sjs-general-backcolor-dim":"rgba(216, 207, 236, 1)","--sjs-general-backcolor-dim-light":"rgba(241, 237, 248, 1)","--sjs-general-backcolor-dim-dark":"rgba(225, 220, 233, 1)","--sjs-general-dim-forecolor-light":"rgba(0, 0, 0, 0.5)","--sjs-primary-backcolor":"rgba(122, 100, 168, 1)","--sjs-primary-backcolor-light":"rgba(122, 100, 168, 0.1)","--sjs-primary-backcolor-dark":"rgba(105, 84, 152, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 2px 4px 0px rgba(0, 0, 0, 0.1),0px 8px 16px 0px rgba(0, 0, 0, 0.1),0px 0px 0px 1px rgba(0, 0, 0, 0.05)","--sjs-shadow-inner":"inset 0px 1px 4px 0px rgba(0, 0, 0, 0.1),inset 0px 0px 0px 1px rgba(0, 0, 0, 0.05)"},"pseudo-3d":{"--sjs-general-backcolor":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dark":"rgba(243, 243, 243, 1)","--sjs-general-backcolor-dim":"rgba(46, 172, 180, 1)","--sjs-general-backcolor-dim-light":"rgba(245, 245, 245, 1)","--sjs-general-backcolor-dim-dark":"rgba(234, 234, 234, 1)","--sjs-general-forecolor-light":"rgba(0, 0, 0, 0.43)","--sjs-general-dim-forecolor":"rgba(255, 255, 255, 1)","--sjs-general-dim-forecolor-light":"rgba(255, 255, 255, 0.8)","--sjs-primary-backcolor":"rgba(46, 172, 180, 1)","--sjs-primary-backcolor-light":"rgba(46, 172, 180, 0.1)","--sjs-primary-backcolor-dark":"rgba(23, 156, 165, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 2px 0px 0px rgba(0, 0, 0, 0.2)","--sjs-shadow-inner":"inset 0px 2px 0px 0px rgba(0, 0, 0, 0.1)","--sjs-border-light":"rgba(0, 0, 0, 0.09)","--sjs-border-default":"rgba(0, 0, 0, 0.16)"},"playful":{"--sjs-general-backcolor":"rgba(248, 248, 248, 1)","--sjs-general-backcolor-dark":"rgba(242, 242, 242, 1)","--sjs-general-backcolor-dim":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim-light":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim-dark":"rgba(242, 242, 242, 1)","--sjs-primary-backcolor":"rgba(217, 74, 100, 1)","--sjs-primary-backcolor-light":"rgba(217, 74, 100, 0.1)","--sjs-primary-backcolor-dark":"rgba(189, 61, 84, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 2px rgba(228, 228, 228, 1),0px 2px 0px 2px rgba(228, 228, 228, 1)","--sjs-shadow-medium":"0px 8px 0px 2px rgba(228, 228, 228, 1),0px 0px 0px 2px rgba(228, 228, 228, 1)","--sjs-shadow-large":"0px 0px 0px 0px rgba(0, 0, 0, 0.1)","--sjs-shadow-inner":"0px -2px 0px 2px rgba(228, 228, 228, 1),0px 0px 0px 2px rgba(228, 228, 228, 1)","--sjs-border-light":"rgba(0, 0, 0, 0.08)","--sjs-border-default":"rgba(0, 0, 0, 0.08)"},"ultra":{"--sjs-general-backcolor":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dark":"rgba(255, 216, 77, 1)","--sjs-general-backcolor-dim":"rgba(255, 216, 77, 1)","--sjs-general-backcolor-dim-light":"rgba(255, 216, 77, 1)","--sjs-general-backcolor-dim-dark":"rgba(255, 216, 77, 1)","--sjs-general-forecolor":"rgba(0, 0, 0, 1)","--sjs-general-forecolor-light":"rgba(0, 0, 0, 1)","--sjs-general-dim-forecolor":"rgba(0, 0, 0, 1)","--sjs-general-dim-forecolor-light":"rgba(0, 0, 0, 1)","--sjs-primary-backcolor":"rgba(0, 0, 0, 1)","--sjs-primary-backcolor-light":"rgba(255, 216, 77, 1)","--sjs-primary-backcolor-dark":"rgba(83, 83, 83, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 2px rgba(0, 0, 0, 1)","--sjs-shadow-medium":"0px 0px 0px 2px rgba(0, 0, 0, 1)","--sjs-shadow-large":"0px 6px 0px 0px rgba(0, 0, 0, 1)","--sjs-shadow-inner":"0px -2px 0px 2px rgba(0, 0, 0, 1),0px 0px 0px 2px rgba(0, 0, 0, 1)","--sjs-border-light":"rgba(0, 0, 0, 0.2)","--sjs-border-default":"rgba(0, 0, 0, 1)"},"default-dark":{"--sjs-general-backcolor":"rgba(48, 48, 48, 1)","--sjs-general-backcolor-dark":"rgba(52, 52, 52, 1)","--sjs-general-backcolor-dim":"rgba(36, 36, 36, 1)","--sjs-general-backcolor-dim-light":"rgba(43, 43, 43, 1)","--sjs-general-backcolor-dim-dark":"rgba(46, 46, 46, 1)","--sjs-general-forecolor":"rgba(255, 255, 255, 0.78)","--sjs-general-forecolor-light":"rgba(255, 255, 255, 0.42)","--sjs-general-dim-forecolor":"rgba(255, 255, 255, 0.79)","--sjs-general-dim-forecolor-light":"rgba(255, 255, 255, 0.45)","--sjs-primary-backcolor":"rgba(255, 152, 20, 1)","--sjs-primary-backcolor-light":"rgba(255, 255, 255, 0.07)","--sjs-primary-backcolor-dark":"rgba(255, 170, 24, 1)","--sjs-primary-forecolor":"rgba(32, 32, 32, 1)","--sjs-primary-forecolor-light":"rgba(32, 32, 32, 0.25)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-secondary-backcolor":"rgba(255, 152, 20, 1)","--sjs-secondary-backcolor-light":"rgba(255, 152, 20, 0.1)","--sjs-secondary-backcolor-semi-light":"rgba(255, 152, 20, 0.25)","--sjs-secondary-forecolor":"rgba(48, 48, 48, 1)","--sjs-secondary-forecolor-light":"rgba(48, 48, 48, 0.25)","--sjs-shadow-small":"0px 1px 2px 0px rgba(0, 0, 0, 0.35)","--sjs-shadow-medium":"0px 2px 6px 0px rgba(0, 0, 0, 0.2)","--sjs-shadow-large":"0px 8px 16px 0px rgba(0, 0, 0, 0.2)","--sjs-shadow-inner":"inset 0px 1px 2px 0px rgba(0, 0, 0, 0.2)","--sjs-border-light":"rgba(255, 255, 255, 0.08)","--sjs-border-default":"rgba(255, 255, 255, 0.12)","--sjs-border-inside":"rgba(255, 255, 255, 0.08)","--sjs-special-red":"rgba(254, 76, 108, 1)","--sjs-special-red-light":"rgba(254, 76, 108, 0.1)","--sjs-special-red-forecolor":"rgba(48, 48, 48, 1)","--sjs-special-green":"rgba(36, 197, 164, 1)","--sjs-special-green-light":"rgba(36, 197, 164, 0.1)","--sjs-special-green-forecolor":"rgba(48, 48, 48, 1)","--sjs-special-blue":"rgba(91, 151, 242, 1)","--sjs-special-blue-light":"rgba(91, 151, 242, 0.1)","--sjs-special-blue-forecolor":"rgba(48, 48, 48, 1)","--sjs-special-yellow":"rgba(255, 152, 20, 1)","--sjs-special-yellow-light":"rgba(255, 152, 20, 0.1)","--sjs-special-yellow-forecolor":"rgba(48, 48, 48, 1)"},"contrast-dark":{"--sjs-general-backcolor-dark":"rgba(58, 58, 58, 1)","--sjs-general-backcolor-dim":"rgba(27, 27, 27, 1)","--sjs-general-backcolor-dim-light":"rgba(33, 33, 33, 1)","--sjs-general-backcolor-dim-dark":"rgba(47, 47, 47, 1)","--sjs-general-forecolor":"rgba(255, 255, 255, 0.78)","--sjs-general-forecolor-light":"rgba(255, 255, 255, 0.5)","--sjs-general-dim-forecolor":"rgba(255, 255, 255, 0.8)","--sjs-general-dim-forecolor-light":"rgba(255, 255, 255, 0.55)","--sjs-primary-backcolor":"rgba(16, 226, 255, 1)","--sjs-primary-backcolor-light":"rgba(0, 0, 0, 0.35)","--sjs-primary-backcolor-dark":"rgba(129, 240, 255, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 1px rgba(255, 255, 255, 0.28)","--sjs-shadow-medium":"0px 2px 6px 0px rgba(0, 0, 0, 0.2),0px 0px 0px 1px rgba(255, 255, 255, 0.25)","--sjs-shadow-inner":"0px 0px 0px 1px rgba(255, 255, 255, 0.22)","--sjs-border-light":"rgba(255, 255, 255, 0.22)","--sjs-border-default":"rgba(255, 255, 255, 0.22)"},"plain-dark":{"--sjs-general-backcolor":"rgba(43, 48, 63, 1)","--sjs-general-backcolor-dark":"rgba(50, 55, 72, 1)","--sjs-general-backcolor-dim":"rgba(33, 37, 51, 1)","--sjs-general-backcolor-dim-light":"rgba(36, 41, 55, 1)","--sjs-general-backcolor-dim-dark":"rgba(40, 46, 61, 1)","--sjs-general-forecolor-light":"rgba(114, 120, 137, 1)","--sjs-general-dim-forecolor-light":"rgba(114, 120, 137, 1)","--sjs-primary-backcolor":"rgba(114, 187, 255, 1)","--sjs-primary-backcolor-light":"rgba(114, 187, 255, 0.1)","--sjs-primary-backcolor-dark":"rgba(151, 205, 255, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 0px rgba(0, 0, 0, 0.35)","--sjs-shadow-inner":"inset 0px 0px 0px 0px rgba(0, 0, 0, 0.2)","--sjs-border-light":"rgba(55, 62, 79, 1)","--sjs-border-default":"rgba(65, 72, 90, 1)"},"simple-dark":{"--sjs-general-backcolor":"rgba(48, 48, 48, 1)","--sjs-general-backcolor-dark":"rgba(56, 56, 56, 1)","--sjs-general-backcolor-dim":"rgba(36, 36, 36, 1)","--sjs-general-backcolor-dim-light":"rgba(43, 43, 43, 1)","--sjs-general-backcolor-dim-dark":"rgba(52, 52, 52, 1)","--sjs-primary-backcolor":"rgba(92, 214, 49, 1)","--sjs-primary-backcolor-light":"rgba(255, 255, 255, 0.07)","--sjs-primary-backcolor-dark":"rgba(130, 237, 92, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 1px rgba(255, 255, 255, 0.09)","--sjs-shadow-medium":"0px 2px 6px 0px rgba(0, 0, 0, 0.2),0px 0px 0px 1px rgba(255, 255, 255, 0.12)","--sjs-shadow-inner":"0px 0px 0px 1px rgba(255, 255, 255, 0.07)","--sjs-border-light":"rgba(255, 255, 255, 0.07)","--sjs-border-default":"rgba(255, 255, 255, 0.07)"},"blank-dark":{"--sjs-general-backcolor":"rgba(36, 36, 36, 1)","--sjs-general-backcolor-dark":"rgba(47, 47, 47, 1)","--sjs-general-backcolor-dim":"rgba(36, 36, 36, 1)","--sjs-general-backcolor-dim-light":"rgba(36, 36, 36, 1)","--sjs-general-backcolor-dim-dark":"rgba(47, 47, 47, 1)","--sjs-primary-backcolor":"rgba(85, 171, 250, 1)","--sjs-primary-backcolor-light":"rgba(255, 255, 255, 0.12)","--sjs-primary-backcolor-dark":"rgba(126, 193, 255, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 1px rgba(255, 255, 255, 0.12)","--sjs-shadow-medium":"0px 2px 6px 0px rgba(0, 0, 0, 0.2),0px 0px 0px 1px rgba(255, 255, 255, 0.12)","--sjs-shadow-inner":"0px 0px 0px 1px rgba(255, 255, 255, 0.12)","--sjs-border-light":"rgba(255, 255, 255, 0.12)","--sjs-border-default":"rgba(255, 255, 255, 0.12)"},"double-dark":{"--sjs-general-backcolor":"rgba(52, 52, 52, 1)","--sjs-general-backcolor-dark":"rgba(58, 58, 58, 1)","--sjs-general-backcolor-dim":"rgba(47, 47, 47, 1)","--sjs-general-backcolor-dim-light":"rgba(47, 47, 47, 1)","--sjs-general-backcolor-dim-dark":"rgba(53, 53, 53, 1)","--sjs-primary-backcolor":"rgba(120, 156, 210, 1)","--sjs-primary-backcolor-light":"rgba(255, 255, 255, 0.1)","--sjs-primary-backcolor-dark":"rgba(146, 181, 235, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 2px rgba(255, 255, 255, 0.12)","--sjs-shadow-medium":"0px 0px 0px 2px rgba(255, 255, 255, 0.1)","--sjs-shadow-large":"0px 8px 16px 0px rgba(0, 0, 0, 0.1)","--sjs-shadow-inner":"0px 0px 0px 2px rgba(255, 255, 255, 0.1)","--sjs-border-light":"rgba(255, 255, 255, 0.1)","--sjs-border-default":"rgba(255, 255, 255, 0.1)"},"bulk-dark":{"--sjs-general-backcolor":"rgba(39, 40, 50, 1)","--sjs-general-backcolor-dark":"rgba(46, 47, 58, 1)","--sjs-general-backcolor-dim":"rgba(30, 31, 40, 1)","--sjs-general-backcolor-dim-light":"rgba(32, 33, 43, 1)","--sjs-general-backcolor-dim-dark":"rgba(37, 38, 48, 1)","--sjs-general-forecolor":"rgba(213, 215, 238, 1)","--sjs-general-forecolor-light":"rgba(117, 120, 140, 1)","--sjs-general-dim-forecolor":"rgba(213, 215, 238, 1)","--sjs-general-dim-forecolor-light":"rgba(117, 119, 141, 1)","--sjs-primary-backcolor":"rgba(164, 127, 243, 1)","--sjs-primary-backcolor-light":"rgba(164, 127, 243, 0.1)","--sjs-primary-backcolor-dark":"rgba(192, 165, 251, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 2px 4px 0px rgba(0, 0, 0, 0.2),0px 8px 16px 0px rgba(0, 0, 0, 0.15),0px 0px 0px 1px rgba(255, 255, 255, 0.1)","--sjs-shadow-medium":"0px 2px 6px 0px rgba(0, 0, 0, 0.2),inset 0px 0px 0px 1px rgba(255, 255, 255, 0.05)","--sjs-shadow-inner":"inset 0px 1px 4px 0px rgba(0, 0, 0, 0.2),0px 0px 0px 1px rgba(255, 255, 255, 0.03)","--sjs-border-light":"rgba(54, 56, 69, 1)","--sjs-border-default":"rgba(67, 69, 85, 1)"},"pseudo-3d-dark":{"--sjs-general-backcolor":"rgba(53, 55, 63, 1)","--sjs-general-backcolor-dark":"rgba(60, 63, 74, 1)","--sjs-general-backcolor-dim":"rgba(38, 40, 47, 1)","--sjs-general-backcolor-dim-light":"rgba(46, 48, 55, 1)","--sjs-general-backcolor-dim-dark":"rgba(51, 53, 61, 1)","--sjs-general-forecolor-light":"rgba(125, 129, 143, 1)","--sjs-general-dim-forecolor-light":"rgba(125, 130, 148, 1)","--sjs-primary-backcolor":"rgba(58, 202, 211, 1)","--sjs-primary-backcolor-light":"rgba(67, 70, 80, 1)","--sjs-primary-backcolor-dark":"rgba(92, 224, 233, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 2px 0px 0px rgba(33, 35, 43, 1)","--sjs-shadow-inner":"0px -2px 0px 0px rgba(33, 35, 43, 1)","--sjs-border-light":"rgba(65, 69, 83, 1)","--sjs-border-default":"rgba(97, 101, 118, 1)"},"playful-dark":{"--sjs-general-backcolor":"rgba(38, 38, 38, 1)","--sjs-general-backcolor-dark":"rgba(48, 48, 48, 1)","--sjs-general-backcolor-dim":"rgba(28, 28, 28, 1)","--sjs-general-backcolor-dim-light":"rgba(48, 48, 48, 1)","--sjs-general-backcolor-dim-dark":"rgba(58, 58, 58, 1)","--sjs-primary-backcolor":"rgba(243, 87, 134, 1)","--sjs-primary-backcolor-light":"rgba(255, 255, 255, 0.05)","--sjs-primary-backcolor-dark":"rgba(250, 118, 157, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 2px rgba(64, 64, 64, 1),0px 2px 0px 2px rgba(64, 64, 64, 1)","--sjs-shadow-medium":"0px 8px 0px 2px rgba(64, 64, 64, 1),0px 0px 0px 2px rgba(64, 64, 64, 1)","--sjs-shadow-large":"0px 0px 0px 0px rgba(0, 0, 0, 0.1)","--sjs-shadow-inner":"0px 2px 0px 2px rgba(64, 64, 64, 1),0px 0px 0px 2px rgba(64, 64, 64, 1)","--sjs-border-light":"rgba(255, 255, 255, 0.12)","--sjs-border-default":"rgba(255, 255, 255, 0.12)"},"ultra-dark":{"--sjs-general-backcolor":"rgba(255, 216, 77, 1)","--sjs-general-backcolor-dark":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim":"rgba(0, 0, 0, 1)","--sjs-general-backcolor-dim-light":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim-dark":"rgba(255, 255, 255, 1)","--sjs-general-forecolor":"rgba(0, 0, 0, 1)","--sjs-general-forecolor-light":"rgba(0, 0, 0, 1)","--sjs-general-dim-forecolor":"rgba(255, 255, 255, 1)","--sjs-general-dim-forecolor-light":"rgba(255, 255, 255, 1)","--sjs-primary-backcolor":"rgba(0, 0, 0, 1)","--sjs-primary-backcolor-light":"rgba(255, 255, 255, 1)","--sjs-primary-backcolor-dark":"rgba(53, 53, 53, 1)","--sjs-primary-forecolor":"rgba(255, 255, 255, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-shadow-small":"0px 0px 0px 2px rgba(0, 0, 0, 1)","--sjs-shadow-medium":"0px 0px 0px 2px rgba(0, 0, 0, 1)","--sjs-shadow-large":"0px 6px 0px 0px rgba(0, 0, 0, 1)","--sjs-shadow-inner":"0px -2px 0px 2px rgba(0, 0, 0, 1),0px 0px 0px 2px rgba(0, 0, 0, 1)","--sjs-border-light":"rgba(232, 192, 51, 1)","--sjs-border-default":"rgba(0, 0, 0, 1)"},"default-lw":{"--sjs-general-backcolor-dim":"rgba(255, 255, 255, 1)"},"contrast-lw":{"--sjs-general-backcolor-dim":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim-light":"rgba(238, 238, 238, 1)"},"plain-lw":{"--sjs-general-backcolor":"rgba(231, 240, 255, 1)","--sjs-general-backcolor-dark":"rgba(220, 232, 252, 1)","--sjs-general-backcolor-dim":"rgba(231, 240, 255, 1)","--sjs-general-backcolor-dim-light":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim-dark":"rgba(220, 232, 252, 1)"},"simple-lw":{"--sjs-general-backcolor-dim":"rgba(246, 246, 246, 1)"},"double-lw":{"--sjs-general-backcolor-dim":"rgba(245, 245, 245, 1)"},"bulk-lw":{"--sjs-general-backcolor-dim":"rgba(255, 255, 255, 1)"},"pseudo-3d-lw":{"--sjs-general-backcolor-dim":"rgba(255, 255, 255, 1)","--sjs-general-dim-forecolor":"rgba(0, 0, 0, 0.91)","--sjs-general-dim-forecolor-light":"rgba(0, 0, 0, 0.45)"},"playful-lw":{"--sjs-general-backcolor-dim":"rgba(248, 248, 248, 1)"},"ultra-lw":{"--sjs-general-backcolor-dim":"rgba(255, 255, 255, 1)"},"default-dark-lw":{"--sjs-general-backcolor-dim":"rgba(48, 48, 48, 1)"},"contrast-dark-lw":{"--sjs-general-backcolor-dim":"rgba(48, 48, 48, 1)","--sjs-general-backcolor-dim-light":"rgba(33, 33, 33, 1)"},"plain-dark-lw":{"--sjs-general-backcolor-dim":"rgba(43, 48, 63, 1)"},"simple-dark-lw":{"--sjs-general-backcolor-dim":"rgba(48, 48, 48, 1)"},"double-dark-lw":{"--sjs-general-backcolor-dim":"rgba(52, 52, 52, 1)"},"bulk-dark-lw":{"--sjs-general-backcolor-dim":"rgba(39, 40, 50, 1)"},"pseudo-3d-dark-lw":{"--sjs-general-backcolor-dim":"rgba(53, 55, 63, 1)"},"ultra-dark-lw":{"--sjs-general-backcolor-dim":"rgba(255, 216, 77, 1)","--sjs-general-dim-forecolor":"rgba(0, 0, 0, 1)","--sjs-general-dim-forecolor-light":"rgba(0, 0, 0, 1)"},"dark-designer":{"--sjs-primary-backcolor":"rgba(36, 197, 164, 1)","--sjs-primary-backcolor-light":"rgba(36, 197, 164, 0.1)","--sjs-primary-backcolor-dark":"rgba(44, 206, 173, 1)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px"}}')},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){var i={"./add-lg.svg":33,"./add.svg":34,"./add_16x16.svg":35,"./apply.svg":36,"./arrow-down.svg":37,"./arrow-left.svg":38,"./arrow-left_16x16.svg":39,"./arrow-right.svg":40,"./arrow-right_16x16.svg":41,"./arrow-up.svg":42,"./boolean.svg":43,"./change-question-type_16x16.svg":44,"./checkbox.svg":45,"./checked.svg":46,"./clear.svg":47,"./clear_16x16.svg":48,"./collapse-detail-light_16x16.svg":49,"./collapse-detail_16x16.svg":50,"./collapse-panel.svg":51,"./collapse_16x16.svg":52,"./color-picker.svg":53,"./comment.svg":54,"./default.svg":55,"./delete_16x16.svg":56,"./description-hide.svg":57,"./description.svg":58,"./device-desktop.svg":59,"./device-phone.svg":60,"./device-rotate.svg":61,"./device-tablet.svg":62,"./download.svg":63,"./drag-area-indicator.svg":64,"./drag-area-indicator_24x16.svg":65,"./drop-down-arrow.svg":66,"./drop-down-arrow_16x16.svg":67,"./dropdown.svg":68,"./duplicate_16x16.svg":69,"./edit.svg":70,"./edit_16x16.svg":71,"./editing-finish.svg":72,"./expand-detail-light_16x16.svg":73,"./expand-detail_16x16.svg":74,"./expand-panel.svg":75,"./expand_16x16.svg":76,"./export.svg":77,"./expression.svg":78,"./fast-entry.svg":79,"./file.svg":80,"./html.svg":81,"./image.svg":82,"./imagepicker.svg":83,"./import.svg":84,"./invisible-items.svg":85,"./keyboard-dragging.svg":86,"./language.svg":87,"./load.svg":88,"./logic-collapse.svg":89,"./logic-expand.svg":90,"./logo.svg":91,"./matrix.svg":92,"./matrixdropdown.svg":93,"./matrixdynamic.svg":94,"./multipletext.svg":95,"./next_16x16.svg":96,"./panel.svg":97,"./paneldynamic.svg":98,"./preview.svg":99,"./previous_16x16.svg":100,"./radiogroup.svg":101,"./ranking.svg":102,"./rating.svg":103,"./redo.svg":104,"./remove_16x16.svg":105,"./reset.svg":106,"./save.svg":107,"./select-page.svg":108,"./settings.svg":109,"./settings_16x16.svg":110,"./signaturepad.svg":111,"./switch-active_16x16.svg":112,"./switch-inactive_16x16.svg":113,"./tagbox.svg":114,"./text.svg":115,"./theme.svg":116,"./toolbox.svg":117,"./undo.svg":118,"./visible.svg":119,"./wizard.svg":120};function n(e){var t=r(e);return o(t)}function r(e){if(!o.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}n.keys=function(){return Object.keys(i)},n.resolve=r,e.exports=n,n.id=32},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13 11H17V13H13V17H11V13H7V11H11V7H13V11ZM24 12C24 18.6 18.6 24 12 24C5.4 24 0 18.6 0 12C0 5.4 5.4 0 12 0C18.6 0 24 5.4 24 12ZM22 12C22 6.5 17.5 2 12 2C6.5 2 2 6.5 2 12C2 17.5 6.5 22 12 22C17.5 22 22 17.5 22 12Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13 11H17V13H13V17H11V13H7V11H11V7H13V11ZM23 12C23 18.1 18.1 23 12 23C5.9 23 1 18.1 1 12C1 5.9 5.9 1 12 1C18.1 1 23 5.9 23 12ZM21 12C21 7 17 3 12 3C7 3 3 7 3 12C3 17 7 21 12 21C17 21 21 17 21 12Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M9 7H12V9H9V12H7V9H4V7H7V4H9V7ZM16 8C16 12.4 12.4 16 8 16C3.6 16 0 12.4 0 8C0 3.6 3.6 0 8 0C12.4 0 16 3.6 16 8ZM14 8C14 4.7 11.3 2 8 2C4.7 2 2 4.7 2 8C2 11.3 4.7 14 8 14C11.3 14 14 11.3 14 8Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 1C5.9 1 1 5.9 1 12C1 18.1 5.9 23 12 23C18.1 23 23 18.1 23 12C23 5.9 18.1 1 12 1ZM12 21C7 21 3 17 3 12C3 7 7 3 12 3C17 3 21 7 21 12C21 17 17 21 12 21ZM16.3 8L17.7 9.4L10 17.1L6.3 13.4L7.7 12L10 14.3L16.3 8Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17.01 11.59L13.01 15.59V6H11.01V15.59L7.00998 11.59L5.59998 13L12.01 19.41L18.43 13L17.01 11.59Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M10.4 2.60001L11.8 4.00001L4.8 11H22V13H4.8L11.8 20L10.4 21.4L1 12L10.4 2.60001Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M15 8.99999H4.39998L8.69998 13.3L7.29998 14.7L0.599976 7.99999L7.29998 1.29999L8.69998 2.69999L4.39998 6.99999H15V8.99999V8.99999Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13.6 2.60001L12.2 4.00001L19.2 11H2V13H19.2L12.2 20L13.6 21.4L23 12L13.6 2.60001Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M1 6.99999H11.6L7.3 2.69999L8.7 1.29999L15.4 7.99999L8.7 14.7L7.3 13.3L11.6 8.99999H1V6.99999Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M18.43 11.01L12.01 4.60001L5.59998 11.01L7.00998 12.43L11.01 8.43001V18.01H13.01V8.43001L17.01 12.43L18.43 11.01Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 11H17C19.8 11 22 8.8 22 6C22 3.2 19.8 1 17 1H7C4.2 1 2 3.2 2 6C2 8.8 4.2 11 7 11ZM7 3H17C18.7 3 20 4.3 20 6C20 7.7 18.7 9 17 9H7C5.3 9 4 7.7 4 6C4 4.3 5.3 3 7 3ZM5 6C5 4.9 5.9 4 7 4C8.1 4 9 4.9 9 6C9 7.1 8.1 8 7 8C5.9 8 5 7.1 5 6ZM19 18C19 19.1 18.1 20 17 20C15.9 20 15 19.1 15 18C15 16.9 15.9 16 17 16C18.1 16 19 16.9 19 18ZM17 13H7C4.2 13 2 15.2 2 18C2 20.8 4.2 23 7 23H17C19.8 23 22 20.8 22 18C22 15.2 19.8 13 17 13ZM17 21H7C5.3 21 4 19.7 4 18C4 16.3 5.3 15 7 15H17C18.7 15 20 16.3 20 18C20 19.7 18.7 21 17 21Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M15 2V7H10L12 5C11.1 3.8 9.6 3 8 3C5.2 3 3 5.2 3 8H1C1 4.1 4.1 1 8 1C10.2 1 12.1 2 13.4 3.6L15 2ZM8 13C6.4 13 4.9 12.2 4 11L6 9H1V14L2.6 12.4C3.9 14 5.8 15 8 15C11.9 15 15 11.9 15 8H13C13 10.8 10.8 13 8 13Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M19 8.90001L21 6.10001V19C21 20.1 20.1 21 19 21H5C3.9 21 3 20.1 3 19V5.00001C3 3.90001 3.9 3.00001 5 3.00001H19C19 3.00001 19 3.00001 19.1 3.00001L20.8 0.600006L22.4 1.80001L11.1 17.5L6.6 13L8 11.6L10.9 14.5L17.7 5.00001H5V19H19V8.90001Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9 20.1L1 12L3.1 9.9L9 15.9L20.9 4L23 6.1L9 20.1Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22.6 8.6L16.4 2.4C16 2 15.5 1.8 15 1.8C14.5 1.8 14 2 13.6 2.4L1.4 14.6C0.600003 15.4 0.600003 16.6 1.4 17.4L6 22H12L22.6 11.4C23.3 10.6 23.3 9.3 22.6 8.6ZM11.1 20H6.8L2.8 16L6.2 12.6L12.4 18.8L11.1 20ZM13.8 17.4L7.6 11.2L15 3.8L21.2 10L13.8 17.4ZM16 20H23V22H14L16 20Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13.35 3.34999L12.65 2.64999L8.05002 7.24999L3.35002 2.64999L2.65002 3.34999L7.25002 8.04999L2.65002 12.65L3.35002 13.35L8.05002 8.74999L12.65 13.35L13.35 12.65L8.75002 8.04999L13.35 3.34999Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13 7H3V9H13V7Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M12 9H4V7H12V9ZM16 0V16H0V0H16ZM14 2H2V14H14V2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13 5.6L19.4 12L13 18.4L11.6 17L15.6 13H2V11H15.6L11.6 7L13 5.6ZM20 2V22H22V2H20Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M2 6L3 5L8 10L13 5L14 6L8 12L2 6Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M3.31 15.0002C2.69 15.0002 2.11 14.7602 1.68 14.3202C0.780005 13.4202 0.780005 11.9502 1.68 11.0502L2.45 10.2802C2.45 10.1802 2.44 10.0802 2.44 9.98023C2.44 9.02023 2.81 8.12023 3.49 7.44023L5.6 5.33023C5.37 5.04023 5.25 4.68023 5.25 4.31023C5.25 3.86023 5.42 3.44023 5.74 3.12023C6.06 2.80023 6.48 2.63023 6.92 2.63023C7.29 2.63023 7.65 2.75023 7.94 2.98023L8.88 2.04023C9.56 1.36023 10.46 0.990234 11.41 0.990234C12.36 0.990234 13.27 1.36023 13.95 2.04023C14.63 2.72023 15 3.62023 15 4.58023C15 5.54023 14.63 6.44023 13.95 7.12023L12.94 8.13023C13.04 8.34023 13.09 8.58023 13.09 8.82023C13.09 9.27023 12.92 9.69023 12.6 10.0002C12.28 10.3102 11.86 10.4902 11.42 10.4902C11.18 10.4902 10.94 10.4402 10.73 10.3402L8.56 12.5102C7.88 13.1902 6.98 13.5602 6.03 13.5602C5.93 13.5602 5.83 13.5602 5.73 13.5402L4.97 14.3002C4.53 14.7402 3.95 14.9802 3.34 14.9802L3.31 15.0002Z" fill="black" fill-opacity="0.15"></path><path d="M14.0001 4.57969C14.0001 3.88969 13.7301 3.23969 13.2401 2.74969C12.2301 1.73969 10.5901 1.73969 9.58006 2.74969L7.94006 4.38969L7.39006 3.83969C7.13006 3.57969 6.70006 3.57969 6.44006 3.83969C6.18006 4.09969 6.18006 4.52969 6.44006 4.78969L6.99006 5.33969L4.18006 8.14969C3.69006 8.63969 3.42006 9.28969 3.42006 9.97969C3.42006 10.1997 3.46006 10.4097 3.51006 10.6197L2.38006 11.7497C1.87006 12.2597 1.87006 13.0897 2.38006 13.6097C2.64006 13.8697 2.97006 13.9897 3.31006 13.9897C3.65006 13.9897 3.98006 13.8597 4.24006 13.6097L5.37006 12.4797C5.58006 12.5297 5.79006 12.5697 6.01006 12.5697C6.70006 12.5697 7.35006 12.2997 7.84006 11.8097L10.6501 8.99969L10.9401 9.28969C11.0701 9.41969 11.2401 9.48969 11.4201 9.48969C11.6001 9.48969 11.7701 9.41969 11.9001 9.28969C12.1601 9.02969 12.1601 8.59969 11.9001 8.33969L11.6101 8.04969L13.2501 6.40969C13.7401 5.91969 14.0101 5.26969 14.0101 4.57969H14.0001ZM6.89006 10.8597C6.42006 11.3297 5.61006 11.3297 5.14006 10.8597C4.91006 10.6297 4.78006 10.3197 4.78006 9.98969C4.78006 9.65969 4.91006 9.34969 5.14006 9.11969L7.95006 6.30969L9.70006 8.05969L6.89006 10.8697V10.8597Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 3H4C2.9 3 2 3.9 2 5V19C2 20.1 2.9 21 4 21H20C21.1 21 22 20.1 22 19V5C22 3.9 21.1 3 20 3ZM20 19H4V5H20V19ZM18 9H6V7H18V9ZM18 13H6V11H18V13ZM12 17H6V15H12V17Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 4C16.41 4 20 7.14 20 11C19.9901 11.928 19.7826 12.8433 19.3911 13.6847C18.9997 14.5262 18.4334 15.2746 17.73 15.88C17.5103 16.0801 17.338 16.3266 17.2256 16.6017C17.1132 16.8767 17.0634 17.1733 17.08 17.47C16.7752 17.2972 16.4304 17.2076 16.08 17.21C15.8237 17.212 15.5698 17.2594 15.33 17.35C14.2722 17.7789 13.1415 17.9996 12 18C7.59 18 4 14.86 4 11C4 7.14 7.59 4 12 4ZM12 2C6.48 2 2 6 2 11C2 16 6.48 20 12 20C13.4012 19.9996 14.7894 19.7314 16.09 19.21L20 22L19.07 17.36C19.9796 16.5667 20.711 15.5899 21.216 14.4937C21.721 13.3975 21.9882 12.2069 22 11C22 6 17.52 2 12 2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M15 2H14H11V1C11 0.4 10.6 0 10 0H7C6.4 0 6 0.4 6 1V2H3H2V4H3V14C3 15.1 3.9 16 5 16H12C13.1 16 14 15.1 14 14V4H15V2ZM7 1H10V2H7V1ZM12 14H5V4H12V14ZM7 13H6V5H7V13ZM9 13H8V5H9V13ZM11 13H10V5H11V13Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2.3 3.7L3.6 5C2 6.9 1 9.3 1 12C1 18.1 5.9 23 12 23C14.7 23 17.1 22 19 20.4L20.3 21.7L21.7 20.3L3.7 2.3L2.3 3.7ZM12 21C7 21 3 17 3 12C3 9.9 3.7 7.9 5 6.4L10.8 12.2C10.7 12.3 10.6 12.4 10.6 12.5C10.5 12.7 10.4 13 10.4 13.3C10.4 13.6 10.5 13.9 10.6 14.1C10.7 14.3 10.8 14.5 10.9 14.8C11 15 11.2 15.1 11.4 15.1C11.5 15.1 11.5 15.1 11.6 15.1H11.7C11.8 15.1 11.9 15.1 12.1 15C12.4 14.9 12.6 14.7 12.6 14.5V14.4V14.1L17.5 19C16.1 20.3 14.1 21 12 21ZM7.8 4.1L6.3 2.6C8 1.6 9.9 1 12 1C18.1 1 23 5.9 23 12C23 14.1 22.4 16 21.4 17.7L19.9 16.2C20.6 15 21 13.5 21 12C21 7 17 3 12 3C10.5 3 9 3.4 7.8 4.1ZM13.5 9.8C13.5 9.7 13.6 9.6 13.6 9.4C13.6 9 13.5 8.6 13.2 8.4C12.8 8 12.4 7.9 12 7.9C11.9 7.9 11.8 7.9 11.6 7.9L10.1 6.4C10.2 6.4 10.2 6.3 10.3 6.3C11.5 5.9 12.7 5.9 13.6 6.1C14.1 6.2 14.5 6.4 14.9 6.6C15.6 7.3 16 8.1 16 9.3C16 10.1 15.7 10.8 15.2 11.4L13.5 9.8ZM11.8 15.9C12.5 15.9 13 16.2 13.3 16.8C13.4 17 13.4 17.2 13.4 17.4C13.4 17.8 13.2 18.2 13 18.5C12.7 18.8 12.3 18.9 11.9 18.9C11.5 18.9 11.1 18.7 10.8 18.5C10.5 18.2 10.4 17.8 10.4 17.4C10.4 17 10.6 16.6 10.8 16.3C11 16 11.4 15.9 11.8 15.9Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 1C5.9 1 1 5.9 1 12C1 18.1 5.9 23 12 23C18.1 23 23 18.1 23 12C23 5.9 18.1 1 12 1ZM12 21C7 21 3 17 3 12C3 7 7 3 12 3C17 3 21 7 21 12C21 17 17 21 12 21ZM13.3 16.8C13.4 17 13.4 17.2 13.4 17.4C13.4 17.8 13.2 18.2 13 18.5C12.7 18.8 12.3 18.9 11.9 18.9C11.5 18.9 11.1 18.7 10.8 18.5C10.5 18.2 10.4 17.8 10.4 17.4C10.4 17 10.6 16.6 10.8 16.3C11.1 16 11.5 15.8 11.9 15.8C12.5 15.9 13 16.2 13.3 16.8ZM16 9.3C16 10.4 15.5 11.2 14.6 11.9C14.4 12.1 14.1 12.2 13.9 12.4L13.3 12.8C13 13 12.9 13.1 12.9 13.1C12.8 13.2 12.8 13.3 12.8 13.4C12.8 13.6 12.7 13.8 12.7 14.1V14.4V14.5C12.6 14.7 12.4 14.9 12.2 15C12 15.1 11.9 15.1 11.8 15.1H11.7C11.6 15.1 11.6 15.1 11.5 15.1C11.3 15 11.1 14.9 11 14.8C10.9 14.6 10.7 14.4 10.7 14.1C10.6 13.8 10.5 13.6 10.5 13.3C10.5 13 10.6 12.7 10.7 12.5C10.8 12.3 11 12.1 11.2 11.9C11.4 11.7 11.6 11.6 11.8 11.5L12.4 11.2C13 10.9 13.2 10.7 13.3 10.6C13.6 10.3 13.7 9.9 13.7 9.5C13.7 9.1 13.6 8.7 13.3 8.5C12.8 8 12.4 7.9 12 7.9C10.9 7.9 10.6 8.4 10.6 8.8C10.4 9.3 10.4 9.4 10.4 9.4V9.6C10.4 9.7 10.4 9.7 10.4 9.8L10.5 10.2L10.2 10.3C9.6 10.6 9.1 10.6 8.7 10.4C8.6 10.3 8.4 10.1 8.3 10C8.1 9.7 8 9.4 8 9C8 8.6 8.1 8.3 8.2 8C8.3 7.7 8.5 7.5 8.7 7.3C8.9 7.1 9.1 6.9 9.4 6.7C9.7 6.6 10 6.4 10.3 6.3C11.5 5.9 12.7 5.9 13.6 6.1C14.1 6.2 14.5 6.4 14.9 6.6C15.6 7.3 16 8.1 16 9.3Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22 17V2H2V17H10V19C10 19.7956 9.68393 20.5587 9.12132 21.1213C8.55871 21.6839 7.79565 22 7 22H17C16.2044 22 15.4413 21.6839 14.8787 21.1213C14.3161 20.5587 14 19.7956 14 19V17H22ZM4 4H20V15H4V4Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M16 18H8V6H16V18ZM16 2H8C7.46957 2 6.96086 2.21071 6.58579 2.58579C6.21071 2.96086 6 3.46957 6 4V20C6 20.5304 6.21071 21.0391 6.58579 21.4142C6.96086 21.7893 7.46957 22 8 22H16C16.5304 22 17.0391 21.7893 17.4142 21.4142C17.7893 21.0391 18 20.5304 18 20V4C18 3.46957 17.7893 2.96086 17.4142 2.58579C17.0391 2.21071 16.5304 2 16 2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M23.41 5.99591L18 11.4059L16.59 9.99591L19.59 6.99591H17C13.5522 6.99591 10.2456 8.36555 7.80761 10.8035C5.36964 13.2415 4 16.5481 4 19.9959V21.9959H2V19.9959C2 16.0177 3.58035 12.2024 6.3934 9.38931C9.20644 6.57626 13.0218 4.99591 17 4.99591H19.59L16.59 1.99591L18 0.585907L23.41 5.99591Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 18H4V6H20V18ZM21 4H3C2.46957 4 1.96086 4.21071 1.58579 4.58579C1.21071 4.96086 1 5.46957 1 6V18C1 18.5304 1.21071 19.0391 1.58579 19.4142C1.96086 19.7893 2.46957 20 3 20H21C21.5304 20 22.0391 19.7893 22.4142 19.4142C22.7893 19.0391 23 18.5304 23 18V6C23 5.46957 22.7893 4.96086 22.4142 4.58579C22.0391 4.21071 21.5304 4 21 4Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 18.41L4.59 11L6 9.59L11 14.59V2H13V14.59L18 9.59L19.41 11L12 18.41ZM2 20V22H22V20H2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13 6C13 4.9 13.9 4 15 4C16.1 4 17 4.9 17 6C17 7.1 16.1 8 15 8C13.9 8 13 7.1 13 6ZM9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM9 10C7.9 10 7 10.9 7 12C7 13.1 7.9 14 9 14C10.1 14 11 13.1 11 12C11 10.9 10.1 10 9 10ZM15 16C13.9 16 13 16.9 13 18C13 19.1 13.9 20 15 20C16.1 20 17 19.1 17 18C17 16.9 16.1 16 15 16ZM9 16C7.9 16 7 16.9 7 18C7 19.1 7.9 20 9 20C10.1 20 11 19.1 11 18C11 16.9 10.1 16 9 16Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 16" xmlns="http://www.w3.org/2000/svg"><path d="M18 9C19.1 9 20 9.9 20 11C20 12.1 19.1 13 18 13C16.9 13 16 12.1 16 11C16 9.9 16.9 9 18 9ZM20 5C20 3.9 19.1 3 18 3C16.9 3 16 3.9 16 5C16 6.1 16.9 7 18 7C19.1 7 20 6.1 20 5ZM14 11C14 9.9 13.1 9 12 9C10.9 9 10 9.9 10 11C10 12.1 10.9 13 12 13C13.1 13 14 12.1 14 11ZM14 5C14 3.9 13.1 3 12 3C10.9 3 10 3.9 10 5C10 6.1 10.9 7 12 7C13.1 7 14 6.1 14 5ZM8 11C8 9.9 7.1 9 6 9C4.9 9 4 9.9 4 11C4 12.1 4.9 13 6 13C7.1 13 8 12.1 8 11ZM8 5C8 3.9 7.1 3 6 3C4.9 3 4 3.9 4 5C4 6.1 4.9 7 6 7C7.1 7 8 6.1 8 5Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 15L17 10H7L12 15Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8 11L13 6H3L8 11Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 2H4C2.9 2 2 2.9 2 4V6C2 7.1 2.9 8 4 8V20C4 21.1 4.9 22 6 22H20C21.1 22 22 21.1 22 20V8V6V4C22 2.9 21.1 2 20 2ZM20 20H6V8H20V20ZM4 6V4H20V6H4ZM18 12H8V10H18V12ZM18 16H8V14H18V16Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_9500_71113)"><path d="M14 0H6C5.46957 0 4.96086 0.210714 4.58579 0.585786C4.21071 0.960859 4 1.46957 4 2V4H2C1.46957 4 0.960859 4.21071 0.585786 4.58579C0.210714 4.96086 0 5.46957 0 6L0 14C0 14.5304 0.210714 15.0391 0.585786 15.4142C0.960859 15.7893 1.46957 16 2 16H10C10.5304 16 11.0391 15.7893 11.4142 15.4142C11.7893 15.0391 12 14.5304 12 14V12H14C14.5304 12 15.0391 11.7893 15.4142 11.4142C15.7893 11.0391 16 10.5304 16 10V2C16 1.46957 15.7893 0.960859 15.4142 0.585786C15.0391 0.210714 14.5304 0 14 0V0ZM10 14H2V6H10V14ZM14 10H12V6C12 5.46957 11.7893 4.96086 11.4142 4.58579C11.0391 4.21071 10.5304 4 10 4H6V2H14V10Z"></path></g><defs><clipPath id="clip0_9500_71113"><rect width="16" height="16"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M21.9 4.8L19.1 2C18.5 1.5 17.8 1.2 17 1.2C16.2 1.2 15.5 1.5 14.9 2.1L4.6 12.3C2.9 14 2 16.3 2 18.7V21C2 21.6 2.4 22 3 22H5.3C7.7 22 10 21.1 11.7 19.4L21.9 9.1C23.1 7.9 23.1 6 21.9 4.8ZM10.2 17.9C8.9 19.2 7.1 20 5.3 20H4V18.7C4 16.8 4.7 15.1 6.1 13.8L12.3 7.6L16.5 11.8L10.2 17.9ZM20.5 7.7L17.8 10.4L13.6 6.2L16.3 3.5C16.5 3.2 16.8 3.2 17 3.2C17.2 3.2 17.5 3.2 17.7 3.5L20.5 6.3C20.9 6.6 20.9 7.3 20.5 7.7Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_2693_58208)"><path d="M15.3 2.8L13.2 0.7C12.7 0.2 12.2 0 11.6 0C11 0 10.4 0.2 10 0.7L2 8.6C0.7 9.9 0 11.7 0 13.5V15.3C0 15.7 0.3 16 0.8 16H2.6C4.4 16 6.2 15.3 7.5 14L15.4 6.1C16.2 5.2 16.2 3.7 15.3 2.8ZM6 12.6C5.1 13.5 3.8 14 2.5 14H2V13.5C2 12.2 2.5 10.9 3.4 10L8 5.4L10.6 8L6 12.6ZM13.9 4.7L12 6.6L9.4 4L11.3 2.1C11.4 2 11.5 2 11.6 2C11.7 2 11.7 2 11.8 2.1L13.9 4.2C14 4.3 14 4.5 13.9 4.7Z"></path></g><defs><clipPath id="clip0_2693_58208"><rect width="16" height="16"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2.3 3.7L7.8 9.2L4.6 12.4C2.9 14.1 2 16.4 2 18.8V21.1C2 21.7 2.4 22.1 3 22.1H5.3C7.7 22.1 10 21.2 11.7 19.5L14.9 16.3L20.4 21.8L21.8 20.4L3.8 2.4L2.3 3.7ZM10.2 17.9C8.9 19.2 7.1 20 5.3 20H4V18.7C4 16.8 4.7 15.1 6.1 13.8L9.3 10.6L13.5 14.8L10.2 17.9ZM21.9 9.1L17.2 13.8L15.8 12.4L20.5 7.7C20.9 7.3 20.9 6.7 20.5 6.3L17.7 3.5C17.5 3.2 17.2 3.2 17 3.2C16.8 3.2 16.5 3.2 16.3 3.5L11.6 8.2L10.2 6.8L14.9 2.1C15.5 1.5 16.2 1.2 17 1.2C17.8 1.2 18.5 1.5 19.1 2.1L21.9 4.9C23.1 6 23.1 7.9 21.9 9.1Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13 7H9V3H7V7H3V9H7V13H9V9H13V7Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M7 9H4V7H7V4H9V7H12V9H9V12H7V9ZM16 0V16H0V0H16ZM14 2H2V14H14V2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M19.9959 2H14.9959V22H21.9959V2H19.9959ZM19.9959 20H16.9959V4H19.9959V20ZM4.40588 11H12.9959V13H4.40588L8.40588 17L6.99588 18.41L0.585876 12L6.99588 5.59L8.40588 7L4.40588 11Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M6 14L5 13L10 8L5 3L6 2L12 8L6 14Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 10.4059L4.59 8.99591L12 1.58591L19.41 8.99591L18 10.4059L13 5.40591V17.9959H11V5.40591L6 10.4059ZM2 19.9959V21.9959H22V19.9959H2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 0.5C19.4 0.2 18.7 0 17.8 0C15.9 0 14.3 0.8 13 2.3C11.5 4.1 10.1 7.1 9 11.5H6.2L5.8 13H8.5L8.3 14C8.2 14.4 8.1 14.9 7.9 15.7C7.7 16.4 7.6 17.1 7.5 17.6C6.8 20.6 6.1 21.9 5.6 22.4C5.6 22.1 5.5 21.8 5.2 21.6C4.7 21.3 3.8 21.2 3.3 21.8C3.1 22 3 22.4 3 22.7C3 23.1 3.1 23.4 3.4 23.6C3.7 23.9 4.2 24 4.8 24C5.4 24 6 23.9 6.5 23.6C7.9 23 9 21.7 9.8 19.6C10.2 18.5 10.8 16.7 11.4 14.1L11.7 12.9H15.1L15.5 11.4H12.1C13.1 7.2 14.2 4.2 15.3 2.7C15.6 2.3 15.9 2 16.2 1.8C16.6 1.5 16.8 1.5 17 1.5C17.2 1.5 17.4 1.5 17.7 1.6C17.5 1.9 17.5 2.2 17.5 2.5C17.5 2.9 17.7 3.3 18 3.6C18.7 4.1 19.8 4.1 20.5 3.6C20.8 3.2 21 2.8 21 2.3C21 1.5 20.7 0.9 20 0.5Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13 5H2V3H13V5ZM10 7H2V9H10V7ZM2 17H10V15H2V17ZM13 11H2V13H13V11ZM23.4 14.9L17 21.3C16 22.4 14.5 23 13 23H11.6C11.3 23 11 22.7 11 22.4V21C11 19.5 11.6 18.1 12.7 17L19.1 10.6C19.4 10.2 19.9 10 20.4 10C20.9 10 21.4 10.2 21.7 10.6L23.4 12.3C24.2 13 24.2 14.2 23.4 14.9ZM21.9 13.6L20.3 12L14 18.3C13.4 19.1 13 20 13 21C14 21 14.9 20.6 15.6 19.9L21.9 13.6Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22 9V7C22 5.9 21.1 5 20 5H12L10 3H4C2.9 3 2 3.9 2 5V9V10V21H22L24 9H22ZM4 5H9.2L10.6 6.4L11.2 7H12H20V9H4V5ZM20.3 19H4V11H21.6L20.3 19Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7.85 6.64999L3.35 11.95L7.85 17.35L6.25 18.65L0.75 11.95L6.25 5.34999L7.85 6.64999ZM17.85 5.34999L16.25 6.64999L20.75 11.95L16.25 17.35L17.75 18.65L23.25 12.05L17.85 5.34999ZM8.15 20.65L10.05 21.25L16.05 3.24999L14.15 2.64999L8.15 20.65Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 2H4C2.9 2 2 2.9 2 4V20C2 21.1 2.9 22 4 22H20C21.1 22 22 21.1 22 20V4C22 2.9 21.1 2 20 2ZM20 20H4V4H20V20ZM7 8C7 6.9 7.9 6 9 6C10.1 6 11 6.9 11 8C11 9.1 10.1 10 9 10C7.9 10 7 9.1 7 8ZM19 19H5L9 14L11 15L14 12L19 19Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17 5H4C2.9 5 2 5.9 2 7V20C2 21.1 2.9 22 4 22H17C18.1 22 19 21.1 19 20V7C19 5.9 18.1 5 17 5ZM17 20H4V7H17V20ZM6 11C6 9.9 6.9 9 8 9C9.1 9 10 9.9 10 11C10 12.1 9.1 13 8 13C6.9 13 6 12.1 6 11ZM16 19H5L16 14V19ZM22 4V17C22 18.1 21.1 19 20 19V17V4H7H5C5 2.9 5.9 2 7 2H20C21.1 2 22 2.9 22 4Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 18.41L4.59 11L6 9.59L11 14.59V2H13V14.59L18 9.59L19.41 11L12 18.41ZM2 20V22H22V20H2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 7.003C12.4641 7.01107 12.9249 7.08171 13.37 7.213L11.54 9.053C10.9155 9.15262 10.3384 9.44704 9.89125 9.89423C9.44406 10.3414 9.14964 10.9185 9.05002 11.543L7.21002 13.373C7.07873 12.9279 7.00809 12.467 7.00002 12.003C7.00002 10.6769 7.5268 9.40515 8.46449 8.46747C9.40217 7.52978 10.6739 7.003 12 7.003ZM5.40002 15.183C4.39516 14.2466 3.52369 13.1766 2.81002 12.003C5.10002 8.223 8.47002 6.003 12 6.003C12.765 6.0082 13.5255 6.11925 14.26 6.333L15.86 4.733C14.6291 4.25486 13.3206 4.0074 12 4.003C7.24002 4.003 3.05002 7.173 0.52002 12.003C1.41557 13.7255 2.59165 15.2868 4.00002 16.623L5.40002 15.183ZM23.48 12.003C21 16.833 16.76 20.003 12 20.003C10.1707 19.9916 8.37315 19.5242 6.77002 18.643L2.71002 22.713L1.29002 21.293L21.29 1.293L22.71 2.713L18.94 6.473C20.8367 7.96509 22.3858 9.8521 23.48 12.003ZM14.7 10.723L10.7 14.723C11.1058 14.9158 11.5508 15.0116 12 15.003C12.7957 15.003 13.5587 14.6869 14.1213 14.1243C14.6839 13.5617 15 12.7986 15 12.003C14.9993 11.559 14.8967 11.1211 14.7 10.723ZM21.19 12.003C20.243 10.4087 18.9887 9.01851 17.5 7.913L16.16 9.263C16.7052 10.073 16.9975 11.0266 17 12.003C17 13.3291 16.4732 14.6009 15.5356 15.5385C14.5979 16.4762 13.3261 17.003 12 17.003C11.0237 17.0005 10.07 16.7081 9.26002 16.163L8.26002 17.163C9.43056 17.7122 10.707 17.9989 12 18.003C15.53 18.003 18.9 15.783 21.19 12.003Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17 5L12 0L7 5H11V9H13V5H17Z"></path><path d="M13 19V15H11V19H7L12 24L17 19H13Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17.75 8H15.25L13.35 13.08C12.2029 12.2588 11.2439 11.2027 10.537 9.98187C9.83 8.76107 9.39127 7.40364 9.25 6H14V4H9V2H7V4H2V6H6.91C6.73189 7.75797 6.09115 9.43736 5.05302 10.8672C4.01489 12.2971 2.61643 13.4263 1 14.14C1.32315 14.7296 1.69441 15.2915 2.11 15.82C4.82764 14.5445 6.96846 12.2966 8.11 9.52C9.02641 11.7596 10.5985 13.6698 12.62 15L10 22H12.42L13.79 18.13H19.16L20.56 22H23L17.75 8ZM14.46 16.16L15.73 12.53C16.0406 11.7049 16.2945 10.8596 16.49 10C16.55 10.26 16.67 10.66 16.84 11.21C17.01 11.76 17.14 12.15 17.24 12.41L18.55 16.2L14.46 16.16Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M21.93 9H21V7C21 6.46957 20.7893 5.96086 20.4142 5.58579C20.0391 5.21071 19.5304 5 19 5H10L8 3H4C3.46957 3 2.96086 3.21071 2.58579 3.58579C2.21071 3.96086 2 4.46957 2 5L2 21H21L23.89 11.63C23.9916 11.3244 24.0179 10.9988 23.9667 10.6809C23.9155 10.363 23.7882 10.0621 23.5958 9.80392C23.4034 9.54571 23.1514 9.33779 22.8614 9.19782C22.5714 9.05786 22.2519 8.99 21.93 9ZM4 5H7.17L8.59 6.41L9.17 7H19V9H6L4 15V5ZM22 11L19.54 19H4.77L7.44 11H22Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_252_57732)"><path d="M19 29.2996L20.4 30.6996L22.7 28.3996V33.9996H24.7V28.3996L27 30.6996L28.4 29.2996L23.7 24.5996L19 29.2996Z"></path><path d="M24.7 19.6V14H22.7V19.6L20.4 17.3L19 18.7L23.7 23.4L28.4 18.7L27 17.3L24.7 19.6Z"></path></g><defs><clipPath id="clip0_252_57732"><rect width="9.4" height="20" fill="white" transform="translate(19 14)"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_252_57727)"><path d="M19 17.7L20.4 19.1L22.7 16.8V22.4H24.7V16.8L27 19.1L28.4 17.7L23.7 13L19 17.7Z"></path><path d="M24.7 32.0004V26.4004H22.7V32.0004L20.4 29.7004L19 31.1004L23.7 35.8004L28.4 31.1004L27 29.7004L24.7 32.0004Z"></path></g><defs><clipPath id="clip0_252_57727"><rect width="9.4" height="22.8" fill="white" transform="translate(19 13)"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M28 0H4C1.79 0 0 1.79 0 4V28C0 30.21 1.79 32 4 32H28C30.21 32 32 30.21 32 28V4C32 1.79 30.21 0 28 0ZM30 28C30 29.1 29.1 30 28 30H4C2.9 30 2 29.1 2 28V4C2 2.9 2.9 2 4 2H28C29.1 2 30 2.9 30 4V28ZM6 9C6 7.34 7.34 6 9 6C10.66 6 12 7.34 12 9C12 10.66 10.66 12 9 12C7.34 12 6 10.66 6 9ZM19 16L28 28H4L11 19L15 21L19 16Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 1C3.2 1 1 3.2 1 6C1 8.8 3.2 11 6 11C8.8 11 11 8.8 11 6C11 3.2 8.8 1 6 1ZM6 9C4.3 9 3 7.7 3 6C3 4.3 4.3 3 6 3C7.7 3 9 4.3 9 6C9 7.7 7.7 9 6 9ZM8 6C8 7.1 7.1 8 6 8C4.9 8 4 7.1 4 6C4 4.9 4.9 4 6 4C7.1 4 8 4.9 8 6ZM20 18C20 19.1 19.1 20 18 20C16.9 20 16 19.1 16 18C16 16.9 16.9 16 18 16C19.1 16 20 16.9 20 18ZM6 13C3.2 13 1 15.2 1 18C1 20.8 3.2 23 6 23C8.8 23 11 20.8 11 18C11 15.2 8.8 13 6 13ZM6 21C4.3 21 3 19.7 3 18C3 16.3 4.3 15 6 15C7.7 15 9 16.3 9 18C9 19.7 7.7 21 6 21ZM18 11C20.8 11 23 8.8 23 6C23 3.2 20.8 1 18 1C15.2 1 13 3.2 13 6C13 8.8 15.2 11 18 11ZM18 3C19.7 3 21 4.3 21 6C21 7.7 19.7 9 18 9C16.3 9 15 7.7 15 6C15 4.3 16.3 3 18 3ZM18 13C15.2 13 13 15.2 13 18C13 20.8 15.2 23 18 23C20.8 23 23 20.8 23 18C23 15.2 20.8 13 18 13ZM18 21C16.3 21 15 19.7 15 18C15 16.3 16.3 15 18 15C19.7 15 21 16.3 21 18C21 19.7 19.7 21 18 21Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 4C7 5.7 5.7 7 4 7C2.3 7 1 5.7 1 4C1 2.3 2.3 1 4 1C5.7 1 7 2.3 7 4ZM15 4C15 5.7 13.7 7 12 7C10.3 7 9 5.7 9 4C9 2.3 10.3 1 12 1C13.7 1 15 2.3 15 4ZM13 4C13 3.4 12.6 3 12 3C11.4 3 11 3.4 11 4C11 4.6 11.4 5 12 5C12.6 5 13 4.6 13 4ZM17 4C17 2.3 18.3 1 20 1C21.7 1 23 2.3 23 4C23 5.7 21.7 7 20 7C18.3 7 17 5.7 17 4ZM19 4C19 4.6 19.4 5 20 5C20.6 5 21 4.6 21 4C21 3.4 20.6 3 20 3C19.4 3 19 3.4 19 4ZM7 12C7 13.7 5.7 15 4 15C2.3 15 1 13.7 1 12C1 10.3 2.3 9 4 9C5.7 9 7 10.3 7 12ZM5 12C5 11.4 4.6 11 4 11C3.4 11 3 11.4 3 12C3 12.6 3.4 13 4 13C4.6 13 5 12.6 5 12ZM12 9C10.3 9 9 10.3 9 12C9 13.7 10.3 15 12 15C13.7 15 15 13.7 15 12C15 10.3 13.7 9 12 9ZM20 9C18.3 9 17 10.3 17 12C17 13.7 18.3 15 20 15C21.7 15 23 13.7 23 12C23 10.3 21.7 9 20 9ZM4 17C2.3 17 1 18.3 1 20C1 21.7 2.3 23 4 23C5.7 23 7 21.7 7 20C7 18.3 5.7 17 4 17ZM12 17C10.3 17 9 18.3 9 20C9 21.7 10.3 23 12 23C13.7 23 15 21.7 15 20C15 18.3 13.7 17 12 17ZM23 20C23 21.7 21.7 23 20 23C18.3 23 17 21.7 17 20C17 18.3 18.3 17 20 17C21.7 17 23 18.3 23 20ZM21 20C21 19.4 20.6 19 20 19C19.4 19 19 19.4 19 20C19 20.6 19.4 21 20 21C20.6 21 21 20.6 21 20Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 4C7 5.7 5.7 7 4 7C2.3 7 1 5.7 1 4C1 2.3 2.3 1 4 1C5.7 1 7 2.3 7 4ZM15 4C15 5.7 13.7 7 12 7C10.3 7 9 5.7 9 4C9 2.3 10.3 1 12 1C13.7 1 15 2.3 15 4ZM13 4C13 3.4 12.6 3 12 3C11.4 3 11 3.4 11 4C11 4.6 11.4 5 12 5C12.6 5 13 4.6 13 4ZM17 4C17 2.3 18.3 1 20 1C21.7 1 23 2.3 23 4C23 5.7 21.7 7 20 7C18.3 7 17 5.7 17 4ZM19 4C19 4.6 19.4 5 20 5C20.6 5 21 4.6 21 4C21 3.4 20.6 3 20 3C19.4 3 19 3.4 19 4ZM7 12C7 13.7 5.7 15 4 15C2.3 15 1 13.7 1 12C1 10.3 2.3 9 4 9C5.7 9 7 10.3 7 12ZM5 12C5 11.4 4.6 11 4 11C3.4 11 3 11.4 3 12C3 12.6 3.4 13 4 13C4.6 13 5 12.6 5 12ZM12 9C10.3 9 9 10.3 9 12C9 13.7 10.3 15 12 15C13.7 15 15 13.7 15 12C15 10.3 13.7 9 12 9ZM20 9C18.3 9 17 10.3 17 12C17 13.7 18.3 15 20 15C21.7 15 23 13.7 23 12C23 10.3 21.7 9 20 9ZM5 17H3V19H1V21H3V23H5V21H7V19H5V17Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 1H4C2.9 1 2 1.9 2 3V9C2 10.1 2.9 11 4 11H20C21.1 11 22 10.1 22 9V3C22 1.9 21.1 1 20 1ZM20 9H4V3H20V9ZM14 7H6V5H14V7ZM20 13H4C2.9 13 2 13.9 2 15V21C2 22.1 2.9 23 4 23H20C21.1 23 22 22.1 22 21V15C22 13.9 21.1 13 20 13ZM20 21H4V15H20V21ZM14 19H6V17H14V19Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M5.64648 12.6465L6.34648 13.3465L11.7465 8.04648L6.34648 2.64648L5.64648 3.34648L10.2465 8.04648L5.64648 12.6465Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9 2V4H4V9H2V4C2 2.9 2.9 2 4 2H9ZM20 2H15V4H20V9H22V4C22 2.9 21.1 2 20 2ZM4 20V15H2V20C2 21.1 2.9 22 4 22H9V20H4ZM20 20H15V22H20C21.1 22 22 21.1 22 20V15H20V20Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9 2V4H4V9H2V4C2 3.46957 2.21071 2.96086 2.58579 2.58579C2.96086 2.21071 3.46957 2 4 2H9ZM20 2H15V4H20V9H22V4C22 3.46957 21.7893 2.96086 21.4142 2.58579C21.0391 2.21071 20.5304 2 20 2ZM4 20V15H2V20C2 20.5304 2.21071 21.0391 2.58579 21.4142C2.96086 21.7893 3.46957 22 4 22H9V20H4ZM20 20H15V22H20C20.5304 22 21.0391 21.7893 21.4142 21.4142C21.7893 21.0391 22 20.5304 22 20V15H20V20ZM17 13H15V11H13V13H11V15H13V17H15V15H17V13Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 3C13.78 3 15.5201 3.52784 17.0001 4.51677C18.4802 5.50571 19.6337 6.91131 20.3149 8.55585C20.9961 10.2004 21.1743 12.01 20.8271 13.7558C20.4798 15.5016 19.6226 17.1053 18.364 18.364C17.1053 19.6226 15.5016 20.4798 13.7558 20.8271C12.01 21.1743 10.2004 20.9961 8.55585 20.3149C6.91132 19.6337 5.50571 18.4802 4.51678 17.0001C3.52785 15.5201 3.00001 13.78 3.00001 12C3.00001 9.61305 3.94822 7.32387 5.63604 5.63604C7.32387 3.94821 9.61306 3 12 3ZM12 1C9.82441 1 7.69767 1.64514 5.88873 2.85383C4.07979 4.06253 2.66989 5.78049 1.83733 7.79048C1.00477 9.80047 0.786929 12.0122 1.21137 14.146C1.6358 16.2798 2.68345 18.2398 4.22183 19.7782C5.76021 21.3166 7.72022 22.3642 9.85401 22.7886C11.9878 23.2131 14.1995 22.9952 16.2095 22.1627C18.2195 21.3301 19.9375 19.9202 21.1462 18.1113C22.3549 16.3023 23 14.1756 23 12C23 9.08262 21.8411 6.28473 19.7782 4.22183C17.7153 2.15893 14.9174 1 12 1ZM16 12L10 8V16L16 12Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M10.393 12.6465L5.69297 8.04651L10.393 3.34651L9.69297 2.64651L4.29297 8.04651L9.69297 13.3465L10.393 12.6465Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 4C16.4 4 20 7.6 20 12C20 16.4 16.4 20 12 20C7.6 20 4 16.4 4 12C4 7.6 7.6 4 12 4ZM12 2C6.5 2 2 6.5 2 12C2 17.5 6.5 22 12 22C17.5 22 22 17.5 22 12C22 6.5 17.5 2 12 2ZM12 10C13.1 10 14 10.9 14 12C14 13.1 13.1 14 12 14C10.9 14 10 13.1 10 12C10 10.9 10.9 10 12 10ZM12 8C9.8 8 8 9.8 8 12C8 14.2 9.8 16 12 16C14.2 16 16 14.2 16 12C16 9.8 14.2 8 12 8Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22 4H2V21H14V16H18V11H22V4ZM12 19H4V16H12V19ZM16 14H4V11H16V14ZM20 9H4V6H20V9Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0)"><path d="M12 6.8L12.9 9.7L13.3 11.1H14.8H17.8L15.4 12.9L14.2 13.8L14.6 15.2L15.5 18.1L13.1 16.3L12 15.3L10.8 16.2L8.4 18L9.3 15.1L9.7 13.7L8.5 12.8L6.1 11H9.1H10.6L11 9.6L12 6.8ZM12 0.300003L9.2 9H0L7.4 14.4L4.6 23.1L12 17.7L19.4 23.1L16.6 14.4L24 9H14.8L12 0.300003Z"></path></g><defs><clipPath id="clip0"><rect width="24" height="24"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 8.00001H19.6L15.6 4.00001L17 2.60001L23.4 9.00001L17 15.4L15.6 14L19.6 10H7C4.8 10 3 11.8 3 14C3 16.2 4.8 18 7 18H8V20H7C3.7 20 1 17.3 1 14C1 10.7 3.7 8.00001 7 8.00001Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M12 7V9H4V7H12ZM16 8C16 12.4 12.4 16 8 16C3.6 16 0 12.4 0 8C0 3.6 3.6 0 8 0C12.4 0 16 3.6 16 8ZM14 8C14 4.7 11.3 2 8 2C4.7 2 2 4.7 2 8C2 11.3 4.7 14 8 14C11.3 14 14 11.3 14 8Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.01 2.993C11.8 2.993 11.59 3.023 11.37 3.043L12.71 1.703L11.3 0.292999L7.59 4.003L11.3 7.713L12.71 6.303L11.46 5.053C11.64 5.043 11.82 5.013 12 5.013C15.86 5.013 19 8.153 19 12.013C19 15.873 15.86 19.013 12 19.013C8.14 19.013 5 15.873 5 12.013C5 11.463 4.55 11.013 4 11.013C3.45 11.013 3 11.463 3 12.013C3 16.973 7.04 21.013 12 21.013C16.96 21.013 21 16.973 21 12.013C21 7.053 16.97 2.993 12.01 2.993Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 2H4L2 4V20C2 20.5304 2.21071 21.0391 2.58579 21.4142C2.96086 21.7893 3.46957 22 4 22H20C20.5304 22 21.0391 21.7893 21.4142 21.4142C21.7893 21.0391 22 20.5304 22 20V4C22 3.46957 21.7893 2.96086 21.4142 2.58579C21.0391 2.21071 20.5304 2 20 2ZM15 4V6H9V4H15ZM8 20V15H16V20H8ZM20 20H18V13H6V20H4V4.83L4.83 4H7V8H17V4H20V20Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M23 11H19.9C19.4 7.4 16.6 4.5 13 4.1V1H11V4.1C7.4 4.5 4.5 7.4 4.1 11H1V13H4.1C4.6 16.6 7.4 19.5 11 19.9V23H13V19.9C16.6 19.4 19.5 16.6 19.9 13H23V11ZM12 18C8.7 18 6 15.3 6 12C6 8.7 8.7 6 12 6C15.3 6 18 8.7 18 12C18 15.3 15.3 18 12 18Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9.9 4C9.4 2.3 7.9 1 6 1C3.8 1 2 2.8 2 5C2 7.2 3.8 9 6 9C7.9 9 9.4 7.7 9.9 6H22V4H9.9ZM6 7C4.9 7 4 6.1 4 5C4 3.9 4.9 3 6 3C7.1 3 8 3.9 8 5C8 6.1 7.1 7 6 7ZM9 15C7.1 15 5.6 16.3 5.1 18H2V20H5.1C5.5 21.7 7.1 23 9 23C10.9 23 12.4 21.7 12.9 20H22V18H12.9C12.4 16.3 10.9 15 9 15ZM9 21C7.9 21 7 20.1 7 19C7 17.9 7.9 17 9 17C10.1 17 11 17.9 11 19C11 20.1 10.1 21 9 21ZM18 8C16.1 8 14.6 9.3 14.1 11H2V13H14.1C14.5 14.7 16.1 16 18 16C20.2 16 22 14.2 22 12C22 9.8 20.2 8 18 8ZM18 14C16.9 14 16 13.1 16 12C16 10.9 16.9 10 18 10C19.1 10 20 10.9 20 12C20 13.1 19.1 14 18 14Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M6.8 2C6.4 0.8 5.3 0 4 0C2.3 0 1 1.3 1 3C1 4.7 2.3 6 4 6C5.3 6 6.4 5.2 6.8 4H15V2H6.8ZM4 4C3.4 4 3 3.6 3 3C3 2.4 3.4 2 4 2C4.6 2 5 2.4 5 3C5 3.6 4.6 4 4 4ZM12 5C10.7 5 9.6 5.8 9.2 7H1V9H9.2C9.6 10.2 10.7 11 12 11C13.7 11 15 9.7 15 8C15 6.3 13.7 5 12 5ZM12 9C11.4 9 11 8.6 11 8C11 7.4 11.4 7 12 7C12.6 7 13 7.4 13 8C13 8.6 12.6 9 12 9ZM6 10C4.7 10 3.6 10.8 3.2 12H1V14H3.2C3.6 15.2 4.7 16 6 16C7.3 16 8.4 15.2 8.8 14H15V12H8.8C8.4 10.8 7.3 10 6 10ZM6 14C5.4 14 5 13.6 5 13C5 12.4 5.4 12 6 12C6.6 12 7 12.4 7 13C7 13.6 6.6 14 6 14Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M24 17V19H9.1C9.5 18.4 9.9 17.7 10.2 17H24ZM11.9 9.00001C11 13.7 8.6 19.6 5 22.6C3.8 23.6 2 22.6 2 21.1C2 20.4 2.1 19.7 2.2 19H0V17H2.8C4.3 12.9 7.6 9.10001 10.2 7.60001C10.4 6.10001 10.4 4.80001 10.2 3.90001C9.9 3.30001 9.7 3.00001 9.6 3.00001C9.4 3.00001 7.8 2.90001 3.8 8.70001L2.2 7.60001C5.5 2.80001 7.9 0.700007 9.9 1.00001C12 1.20001 12.5 4.60001 12.2 6.90001C14.3 7.00001 14.8 8.20001 14.9 10.3C16.2 9.10001 18.1 7.90001 19.2 9.20001C20.8 8.90001 22.1 10.4 22.9 11.5L21.3 12.7C20.4 11.4 19.8 11.2 19.6 11.2C19.5 11.2 19.5 11.3 19.4 11.4C19 12 18.6 12.8 18 13.7C17.7 14.1 17.2 14.3 16.7 14.1C15.5 13.5 16.5 12.1 16.8 11.2C15.8 12 14.4 13.4 13.9 14.8C13.8 15.5 13.3 16.3 12.5 16.1C11.6 15.9 11.7 14.9 12 14.2C13.3 9.80001 12.5 9.00001 12.5 9.00001C12.5 8.90001 12.2 8.80001 11.9 9.00001ZM9.5 10.4C6.9 12.8 4.1 17.1 4 20.8C6.6 18.5 8.5 14.3 9.5 10.4Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M11 5C12.7 5 14 6.3 14 8C14 9.7 12.7 11 11 11H5C3.3 11 2 9.7 2 8C2 6.3 3.3 5 5 5H11ZM11 3H5C2.2 3 0 5.2 0 8C0 10.8 2.2 13 5 13H11C13.8 13 16 10.8 16 8C16 5.2 13.8 3 11 3ZM11 6C9.9 6 9 6.9 9 8C9 9.1 9.9 10 11 10C12.1 10 13 9.1 13 8C13 6.9 12.1 6 11 6Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M11 5C12.7 5 14 6.3 14 8C14 9.7 12.7 11 11 11H5C3.3 11 2 9.7 2 8C2 6.3 3.3 5 5 5H11ZM11 3H5C2.2 3 0 5.2 0 8C0 10.8 2.2 13 5 13H11C13.8 13 16 10.8 16 8C16 5.2 13.8 3 11 3ZM5 6C3.9 6 3 6.9 3 8C3 9.1 3.9 10 5 10C6.1 10 7 9.1 7 8C7 6.9 6.1 6 5 6Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22 7V6C22 4.9 21.1 4 20 4H16C14.9 4 14 4.9 14 6V7C14 8.1 14.9 9 16 9H20C21.1 9 22 8.1 22 7ZM20 7H16V6H20V7ZM2 6V7C2 8.1 2.9 9 4 9H11C12.1 9 13 8.1 13 7V6C13 4.9 12.1 4 11 4H4C2.9 4 2 4.9 2 6ZM4 6H11V7H4V6ZM9 12V13C9 14.1 9.9 15 11 15H20C21.1 15 22 14.1 22 13V12C22 10.9 21.1 10 20 10H11C9.9 10 9 10.9 9 12ZM11 12H20V13H11V12ZM2 18V19C2 20.1 2.9 21 4 21H15C16.1 21 17 20.1 17 19V18C17 16.9 16.1 16 15 16H4C2.9 16 2 16.9 2 18ZM4 18H15V19H4V18ZM2 12V13C2 14.1 2.9 15 4 15H6C7.1 15 8 14.1 8 13V12C8 10.9 7.1 10 6 10H4C2.9 10 2 10.9 2 12ZM4 12H6V13H4V12Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 6H4C2.9 6 2 6.9 2 8V16C2 17.1 2.9 18 4 18H20C21.1 18 22 17.1 22 16V8C22 6.9 21.1 6 20 6ZM20 16H4V8H20V16ZM14 13H6V11H14V13Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M24 21.4201C23.9387 22.1566 23.5894 22.8394 23.0278 23.3202C22.4662 23.8011 21.7376 24.0413 21 23.9888C20.2624 24.0413 19.5338 23.8011 18.9722 23.3202C18.4106 22.8394 18.0613 22.1566 18 21.4201C18 18.8513 21 16.2826 21 14.9932C21 16.2826 24 18.8513 24 21.4201ZM22 12.9942L11 1.99951L8.71 4.2884L10.12 5.70771L11 4.82814L18.17 11.9946L5.64 15.8028L2.83 12.9942L7.71 8.11653L9.29 9.70576C9.38296 9.79944 9.49356 9.8738 9.61542 9.92455C9.73728 9.97529 9.86799 10.0014 10 10.0014C10.132 10.0014 10.2627 9.97529 10.3846 9.92455C10.5064 9.8738 10.617 9.79944 10.71 9.70576C10.8037 9.61284 10.8781 9.5023 10.9289 9.3805C10.9797 9.2587 11.0058 9.12805 11.0058 8.99611C11.0058 8.86416 10.9797 8.73352 10.9289 8.61172C10.8781 8.48992 10.8037 8.37937 10.71 8.28645L3.71 1.28986C3.5217 1.10165 3.2663 0.995911 3 0.995911C2.7337 0.995911 2.4783 1.10165 2.29 1.28986C2.1017 1.47807 1.99591 1.73334 1.99591 1.99951C1.99591 2.26569 2.1017 2.52096 2.29 2.70917L6.29 6.70722L0 12.9942L10 22.9893L18 14.9932L22 12.9942Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M21 4H16V2C16 1.46957 15.7893 0.960859 15.4142 0.585786C15.0391 0.210714 14.5304 0 14 0L10 0C9.46957 0 8.96086 0.210714 8.58579 0.585786C8.21071 0.960859 8 1.46957 8 2V4H3C2.46957 4 1.96086 4.21071 1.58579 4.58579C1.21071 4.96086 1 5.46957 1 6V12H2V20C2 20.5304 2.21071 21.0391 2.58579 21.4142C2.96086 21.7893 3.46957 22 4 22H20C20.5304 22 21.0391 21.7893 21.4142 21.4142C21.7893 21.0391 22 20.5304 22 20V12H23V6C23 5.46957 22.7893 4.96086 22.4142 4.58579C22.0391 4.21071 21.5304 4 21 4ZM10 2H14V4H10V2ZM20 20H4V12H9V16H15V12H20V20ZM11 14V10H13V14H11ZM21 10H15V8H9V10H3V6H21V10Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17 8.00001H4.40001L8.40001 4.00001L7.00001 2.60001L0.600006 9.00001L7.00001 15.4L8.40001 14L4.40001 10H17C19.2 10 21 11.8 21 14C21 16.2 19.2 18 17 18H16V20H17C20.3 20 23 17.3 23 14C23 10.7 20.3 8.00001 17 8.00001Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 4C7.2 4 3 7.2 0.5 12C3 16.8 7.2 20 12 20C16.8 20 20.9 16.8 23.5 12C20.9 7.2 16.7 4 12 4ZM12 18C8.5 18 5.1 15.8 2.8 12C5.1 8.2 8.5 6 12 6C15.5 6 18.9 8.2 21.2 12C18.9 15.8 15.5 18 12 18ZM12 7C9.2 7 7 9.2 7 12C7 14.8 9.2 17 12 17C14.8 17 17 14.8 17 12C17 9.2 14.7 7 12 7ZM12 15C10.3 15 9 13.7 9 12C9 11.7 9 11.5 9.1 11.3L12 12L10.3 9.5C10.8 9.2 11.3 9 12 9C13.7 9 15 10.3 15 12C15 13.7 13.6 15 12 15Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7.7 16.3C8.1 16.7 8.1 17.3 7.7 17.7L3.7 21.7C3.5 21.9 3.3 22 3 22C2.7 22 2.5 21.9 2.3 21.7C1.9 21.3 1.9 20.7 2.3 20.3L6.3 16.3C6.7 15.9 7.3 15.9 7.7 16.3ZM20.5 10L23 13.7L18.6 14.6L17.7 19L14 16.5L10.3 19L9.4 14.6L5 13.7L7.5 10L5 6.3L9.4 5.4L10.3 1L14 3.5L17.7 1L18.6 5.4L23 6.3L20.5 10ZM18.1 10L18.8 8.9L19.6 7.7L18.1 7.4L16.8 7.1L16.5 5.8L16.2 4.3L15 5.1L14 5.9L12.9 5.2L11.7 4.3L11.4 5.8L11.1 7.1L9.8 7.4L8.3 7.7L9.1 8.9L9.9 10L9.2 11.1L8.4 12.3L9.9 12.6L11.2 12.9L11.5 14.2L11.8 15.7L13 14.9L14.1 14.2L15.2 14.9L16.4 15.7L16.7 14.2L17 12.9L18.3 12.6L19.8 12.3L19 11.1L18.1 10Z"></path></svg>'},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},,function(e,t,o){"use strict";o.r(t),o.d(t,"Version",(function(){return Hi})),o.d(t,"enStrings",(function(){return n})),o.d(t,"editorLocalization",(function(){return H})),o.d(t,"defaultStrings",(function(){return F})),o.d(t,"localization",(function(){return H})),o.d(t,"QuestionConvertMode",(function(){return i})),o.d(t,"settings",(function(){return a})),o.d(t,"EmptySurveyCreatorOptions",(function(){return s})),o.d(t,"CreatorAction",(function(){return fo})),o.d(t,"TabbedMenuItem",(function(){return yo})),o.d(t,"TabbedMenuContainer",(function(){return vo})),o.d(t,"ToolbarActionContainer",(function(){return bo})),o.d(t,"CreatorEvent",(function(){return wo})),o.d(t,"CreatorBase",(function(){return Co})),o.d(t,"SurveyCreatorModel",(function(){return xo})),o.d(t,"StylesManager",(function(){return To})),o.d(t,"initializeDesignTimeSurveyModel",(function(){return So})),o.d(t,"editableStringRendererName",(function(){return Eo})),o.d(t,"getElementWrapperComponentName",(function(){return Oo})),o.d(t,"getQuestionContentWrapperComponentName",(function(){return Io})),o.d(t,"getElementWrapperComponentData",(function(){return Vo})),o.d(t,"getItemValueWrapperComponentName",(function(){return No})),o.d(t,"getItemValueWrapperComponentData",(function(){return Ao})),o.d(t,"isStringEditable",(function(){return _o})),o.d(t,"isTextInput",(function(){return jo})),o.d(t,"registerAdorner",(function(){return Lo})),o.d(t,"removeAdorners",(function(){return ko})),o.d(t,"CreatorResponsivityManager",(function(){return Zt})),o.d(t,"EmbedModel",(function(){return ue})),o.d(t,"TabEmbedPlugin",(function(){return ce})),o.d(t,"AceJsonEditorModel",(function(){return he})),o.d(t,"TabJsonEditorAcePlugin",(function(){return ge})),o.d(t,"JsonEditorBaseModel",(function(){return pe})),o.d(t,"TabJsonEditorBasePlugin",(function(){return de})),o.d(t,"TextareaJsonEditorModel",(function(){return me})),o.d(t,"TabJsonEditorTextareaPlugin",(function(){return fe})),o.d(t,"TestSurveyTabViewModel",(function(){return we})),o.d(t,"TabTestPlugin",(function(){return Ce})),o.d(t,"createColor",(function(){return Do})),o.d(t,"createBoxShadow",(function(){return Ro})),o.d(t,"parseBoxShadow",(function(){return Bo})),o.d(t,"DefaultFonts",(function(){return ro})),o.d(t,"fontsettingsToCssVariable",(function(){return ao})),o.d(t,"fontsettingsFromCssVariable",(function(){return so})),o.d(t,"elementSettingsToCssVariable",(function(){return lo})),o.d(t,"elementSettingsFromCssVariable",(function(){return uo})),o.d(t,"Themes",(function(){return co})),o.d(t,"PredefinedThemes",(function(){return po})),o.d(t,"PredefinedColors",(function(){return ho})),o.d(t,"ThemeSurveyTabViewModel",(function(){return go})),o.d(t,"TabThemePlugin",(function(){return mo})),o.d(t,"initLogicOperator",(function(){return Ae})),o.d(t,"LogicEvent",(function(){return _e})),o.d(t,"SurveyLogic",(function(){return je})),o.d(t,"TranslationItemBase",(function(){return pt})),o.d(t,"TranslationItemString",(function(){return dt})),o.d(t,"TranslationItem",(function(){return ht})),o.d(t,"TranslationGroup",(function(){return gt})),o.d(t,"Translation",(function(){return mt})),o.d(t,"translationCss",(function(){return ct})),o.d(t,"TabTranslationPlugin",(function(){return ft})),o.d(t,"initialSettingsAllowShowEmptyTitleInDesignMode",(function(){return Ut})),o.d(t,"TabDesignerViewModel",(function(){return Gt})),o.d(t,"TabDesignerPlugin",(function(){return zt})),o.d(t,"SurveyLogicUI",(function(){return It})),o.d(t,"TabLogicPlugin",(function(){return Vt})),o.d(t,"logicCss",(function(){return yt})),o.d(t,"ToolboxToolViewModel",(function(){return qo})),o.d(t,"PageNavigatorViewModel",(function(){return Ho})),o.d(t,"PageAdorner",(function(){return Fo})),o.d(t,"RowViewModel",(function(){return Uo})),o.d(t,"QuestionAdornerViewModel",(function(){return Go})),o.d(t,"QuestionDropdownAdornerViewModel",(function(){return zo})),o.d(t,"QuestionImageAdornerViewModel",(function(){return Zo})),o.d(t,"QuestionRatingAdornerViewModel",(function(){return Jo})),o.d(t,"ItemValueWrapperViewModel",(function(){return Wo})),o.d(t,"ImageItemValueWrapperViewModel",(function(){return Ko})),o.d(t,"MatrixCellWrapperEditSurvey",(function(){return Xo})),o.d(t,"MatrixCellWrapperViewModel",(function(){return Yo})),o.d(t,"SurveySimulatorModel",(function(){return ye})),o.d(t,"DEFAULT_MONITOR_DPI",(function(){return ve})),o.d(t,"simulatorDevices",(function(){return be})),o.d(t,"SurveyResultsItemModel",(function(){return $o})),o.d(t,"SurveyResultsModel",(function(){return ti})),o.d(t,"LogoImageViewModel",(function(){return oi})),o.d(t,"StringItemsNavigatorBase",(function(){return Xt})),o.d(t,"StringEditorConnector",(function(){return io})),o.d(t,"StringEditorViewModelBase",(function(){return no})),o.d(t,"QuestionEmbeddedSurveyModel",(function(){return ii})),o.d(t,"QuestionLinkValueModel",(function(){return ni})),o.d(t,"EditorLocalization",(function(){return q})),o.d(t,"getLocString",(function(){return Q})),o.d(t,"SurveyJSON5",(function(){return Z})),o.d(t,"QuestionSpinEditorModel",(function(){return ri})),o.d(t,"QuestionColorModel",(function(){return ai})),o.d(t,"QuestionFileEditorModel",(function(){return si})),o.d(t,"setSurveyJSONForPropertyGrid",(function(){return He})),o.d(t,"PropertyEditorSetupValue",(function(){return Qe})),o.d(t,"PropertyGridEditorCollection",(function(){return Fe})),o.d(t,"PropertyGridTitleActionsCreator",(function(){return Ue})),o.d(t,"PropertyJSONGenerator",(function(){return Ge})),o.d(t,"PropertyGridModel",(function(){return ze})),o.d(t,"PropertyGridEditor",(function(){return Ze})),o.d(t,"PropertyGridEditorBoolean",(function(){return Je})),o.d(t,"PropertyGridEditorStringBase",(function(){return We})),o.d(t,"PropertyGridEditorString",(function(){return Ke})),o.d(t,"PropertyGridLinkEditor",(function(){return Xe})),o.d(t,"PropertyGridEditorNumber",(function(){return Ye})),o.d(t,"PropertyGridEditorImageSize",(function(){return $e})),o.d(t,"PropertyGridEditorText",(function(){return et})),o.d(t,"PropertyGridEditorHtml",(function(){return tt})),o.d(t,"PropertyGridEditorColor",(function(){return ot})),o.d(t,"PropertyGridEditorStringArray",(function(){return it})),o.d(t,"PropertyGridEditorDropdown",(function(){return nt})),o.d(t,"PropertyGridEditorSet",(function(){return rt})),o.d(t,"PropertyGridEditorPage",(function(){return at})),o.d(t,"PropertyGridEditorQuestion",(function(){return st})),o.d(t,"PropertyGridEditorQuestionSelectBase",(function(){return lt})),o.d(t,"PropertyGridEditorQuestionValue",(function(){return ut})),o.d(t,"PropertyGridEditorExpression",(function(){return li})),o.d(t,"PropertyGridEditorCondition",(function(){return ui})),o.d(t,"PropertyGridEditorMatrix",(function(){return di})),o.d(t,"PropertyGridEditorMatrixItemValues",(function(){return hi})),o.d(t,"PropertyGridEditorMatrixRateValues",(function(){return gi})),o.d(t,"PropertyGridEditorMatrixColumns",(function(){return mi})),o.d(t,"PropertyGridEditorMatrixPages",(function(){return fi})),o.d(t,"PropertyGridEditorMatrixCalculatedValues",(function(){return yi})),o.d(t,"PropertyGridEditorMatrixHtmlConditions",(function(){return vi})),o.d(t,"PropertyGridEditorMatrixUrlConditions",(function(){return bi})),o.d(t,"PropertyGridEditorMatrixMutlipleTextItems",(function(){return wi})),o.d(t,"PropertyGridEditorMatrixMultipleTypes",(function(){return Ci})),o.d(t,"PropertyGridEditorMatrixValidators",(function(){return xi})),o.d(t,"PropertyGridEditorMatrixTriggers",(function(){return Ti})),o.d(t,"PropertyGridEditorBindings",(function(){return Pi})),o.d(t,"PropertyGridViewModel",(function(){return Ht})),o.d(t,"ObjectSelectorItem",(function(){return Rt})),o.d(t,"ObjectSelector",(function(){return Bt})),o.d(t,"ObjectSelectorModel",(function(){return qt})),o.d(t,"PropertyGridEditorQuestionRestfull",(function(){return Oi})),o.d(t,"PropertyGridValueEditorBase",(function(){return Li})),o.d(t,"PropertyGridCellsEditor",(function(){return ki})),o.d(t,"PropertyGridValueEditor",(function(){return Mi})),o.d(t,"PropertyGridRowValueEditor",(function(){return Di})),o.d(t,"PropertyGridPanelValueEditor",(function(){return Ri})),o.d(t,"PropertyGridTriggerValueEditor",(function(){return Bi})),o.d(t,"PropertyGridTriggerValueInLogicEditor",(function(){return qi})),o.d(t,"propertyGridCss",(function(){return se})),o.d(t,"QuestionConverter",(function(){return X})),o.d(t,"svgBundle",(function(){})),o.d(t,"SurveyTextWorkerError",(function(){return ee})),o.d(t,"SurveyTextWorkerParserError",(function(){return te})),o.d(t,"SurveyTextWorkerJsonError",(function(){return oe})),o.d(t,"SurveyTextWorker",(function(){return ie})),o.d(t,"JsonDuplicateNameError",(function(){return ne})),o.d(t,"QuestionToolboxCategory",(function(){return J})),o.d(t,"QuestionToolboxItem",(function(){return W})),o.d(t,"QuestionToolbox",(function(){return K})),o.d(t,"SidebarModel",(function(){return Kt})),o.d(t,"SidebarTabModel",(function(){return Jt})),o.d(t,"getNextItemValue",(function(){return p})),o.d(t,"getNextItemText",(function(){return d})),o.d(t,"getNextValue",(function(){return h})),o.d(t,"findParentNode",(function(){return g})),o.d(t,"focusFirstControl",(function(){return m})),o.d(t,"getFirstNonTextElement",(function(){return f})),o.d(t,"getNodesFromKoComponentInfo",(function(){return y})),o.d(t,"propertyExists",(function(){return v})),o.d(t,"isPropertyVisible",(function(){return b})),o.d(t,"toggleHovered",(function(){return w})),o.d(t,"clearNewLines",(function(){return C})),o.d(t,"select",(function(){return x})),o.d(t,"copyObject",(function(){return T})),o.d(t,"copyCssClasses",(function(){return S})),o.d(t,"assignDefaultV2Classes",(function(){return P})),o.d(t,"wrapTextByCurlyBraces",(function(){return E})),o.d(t,"capitalize",(function(){return O})),o.d(t,"notShortCircuitAnd",(function(){return I})),o.d(t,"imageMimeTypes",(function(){return V})),o.d(t,"getAcceptedTypesByContentMode",(function(){return N})),o.d(t,"getQuestionFromObj",(function(){return A})),o.d(t,"ingectAlpha",(function(){return _})),o.d(t,"convertRgbaToString",(function(){return j})),o.d(t,"parseRgbaFromString",(function(){return L})),o.d(t,"parseColor",(function(){return k})),o.d(t,"HSBToRGB",(function(){return M})),o.d(t,"RGBToHSB",(function(){return D})),o.d(t,"assign",(function(){return R})),o.d(t,"ColorCalculator",(function(){return B})),o.d(t,"SurveyQuestionEditorDefinition",(function(){return Me})),o.d(t,"ObjType",(function(){return Y})),o.d(t,"SurveyHelper",(function(){return re})),o.d(t,"ResizeManager",(function(){return Wt})),o.d(t,"UndoRedoPlugin",(function(){return kt})),o.d(t,"undoRedoTransaction",(function(){return Mt})),o.d(t,"ignoreUndoRedo",(function(){return Dt})),o.d(t,"UndoRedoManager",(function(){return Nt})),o.d(t,"Transaction",(function(){return At})),o.d(t,"UndoRedoAction",(function(){return _t})),o.d(t,"UndoRedoArrayAction",(function(){return jt})),o.d(t,"PagesController",(function(){return Qt}));var i,n={survey:{edit:"Edit",externalHelpLink:"Watch and learn how to create surveys",externalHelpLinkUrl:"https://www.youtube.com/channel/UCH2ru9okIcooNZfpIbyq4qQ?view_as=subscriber",dropQuestion:"Please drop a question here from the Toolbox.",addLogicItem:"Create a rule to customize the flow of the survey.",copy:"Copy",duplicate:"Duplicate",addToToolbox:"Add to toolbox",deletePanel:"Delete Panel",deleteQuestion:"Delete Question",convertTo:"Convert to",drag:"Drag element",license:"PLEASE PURCHASE A DEVELOPER LICENSE TO BE ABLE TO USE SURVEY CREATOR IN YOUR APP"},qt:{default:"Default",checkbox:"Checkboxes",comment:"Long Text",imagepicker:"Image Picker",ranking:"Ranking",image:"Image",dropdown:"Dropdown",tagbox:"Multi-Select Dropdown",file:"File Upload",html:"HTML",matrix:"Single-Select Matrix",matrixdropdown:"Multi-Select Matrix",matrixdynamic:"Dynamic Matrix",multipletext:"Multiple Textboxes",panel:"Panel",paneldynamic:"Dynamic Panel",radiogroup:"Radio Button Group",rating:"Rating Scale",text:"Single-Line Input",boolean:"Yes/No (Boolean)",expression:"Expression (read-only)",signaturepad:"Signature",buttongroup:"Button Group"},ed:{defaultLocale:"Default ({0})",survey:"Survey",settings:"Settings",settingsTooltip:"Open settings",surveySettings:"Survey Settings",surveySettingsTooltip:"Open survey settings",showPanel:"Show Panel",hidePanel:"Hide Panel",prevSelected:"Select previous",nextSelected:"Select next",surveyTypeName:"Survey",pageTypeName:"Page",panelTypeName:"Panel",questionTypeName:"Question",columnTypeName:"Column",addNewPage:"Add New Page",moveRight:"Scroll to the Right",moveLeft:"Scroll to the Left",deletePage:"Delete Page",editPage:"Edit Page",edit:"Edit",newPageName:"page",newQuestionName:"question",newPanelName:"panel",newTextItemName:"text",testSurvey:"Preview",themeSurvey:"Themes",defaultV2Theme:"Default",modernTheme:"Modern",defaultTheme:"Default (legacy)",testSurveyAgain:"Preview Survey Again",testSurveyWidth:"Survey width: ",navigateToMsg:"You had to navigate to",logic:"Logic",embedSurvey:"Embed Survey",translation:"Translation",saveSurvey:"Save Survey",saveSurveyTooltip:"Save Survey",designer:"Designer",jsonEditor:"JSON Editor",jsonHideErrors:"Hide errors",jsonShowErrors:"Show errors",undo:"Undo",redo:"Redo",undoTooltip:"Undo last change",redoTooltip:"Redo the change",showMoreChoices:"Show more",showLessChoices:"Show less",copy:"Copy",cut:"Cut",paste:"Paste",copyTooltip:"Copy selection to clipboard",cutTooltip:"Cut selection to clipboard",pasteTooltip:"Paste from clipboard",options:"Options",generateValidJSON:"Generate Valid JSON",generateReadableJSON:"Generate Readable JSON",toolbox:"Toolbox","property-grid":"Properties",propertyGridFilteredTextPlaceholder:"Type to search...",toolboxGeneralCategory:"General",toolboxChoiceCategory:"Choice Questions",toolboxTextCategory:"Text Input Questions",toolboxContainersCategory:"Containers",toolboxMatrixCategory:"Matrix Questions",toolboxMiscCategory:"Misc",correctJSON:"Please correct JSON.",surveyResults:"Survey Results ",surveyResultsTable:"As Table",surveyResultsJson:"As JSON",resultsTitle:"Question Title",resultsName:"Question Name",resultsValue:"Answer Value",resultsDisplayValue:"Display Value",modified:"Modified",saving:"Saving",saved:"Saved",propertyEditorError:"Error",saveError:"Error! Editor content is not saved.",translationPropertyGridTitle:"Language Settings",themePropertyGridTitle:"Theme Settings",translationLanguages:"Languages",translationAddLanguage:"Select language to translate",translationShowAllStrings:"All Strings",translationShowUsedStringsOnly:"Used Strings Only",translationShowAllPages:"All Pages",translationNoStrings:"No strings to translate. Please, change the filter.",translationExportToSCVButton:"Export to CSV",translationImportFromSCVButton:"Import from CSV",translationMergeLocaleWithDefault:"Merge {0} with default locale",translationPlaceHolder:"Translation...",themeExportButton:"Export",themeImportButton:"Import",bold:"Bold",italic:"Italic",underline:"Underline",addNewQuestion:"Add Question",selectPage:"Select page...",carryForwardChoicesCopied:"Choices are copied from",htmlPlaceHolder:"HTML content will be here.",panelPlaceHolder:"Drop a question from the toolbox here.",surveyPlaceHolder:"The survey is empty. Drag an element from the toolbox or click the button below.",imagePlaceHolder:"Drag and drop an image here or click the button below and choose an image to upload",imageChooseImage:"Choose Image",addNewTypeQuestion:"Add {0}",chooseLogoPlaceholder:"[LOGO]",auto:"auto",choices_Item:"Item ",lg:{addNewItem:"Add New Rule",empty_tab:"Create a rule to customize the flow of the survey.",page_visibilityName:"Show (hide) page",page_enableName:"Enable (disable) page",panel_visibilityName:"Show (hide) panel",panel_enableName:"Enable (disable) panel",question_visibilityName:"Show (hide) question",question_enableName:"Enable (disable) question",question_requireName:"Make question required",column_visibilityName:"Show (hide) column",column_enableName:"Enable (disable) column",column_requireName:"Make column required",trigger_completeName:"Complete survey",trigger_setvalueName:"Set answer",trigger_copyvalueName:"Copy answer",trigger_skipName:"Skip to question",trigger_runExpressionName:"Run expression",completedHtmlOnConditionName:'Set "Survey Complete" page markup',page_visibilityDescription:"Make the page visible when the logic expression returns true. Otherwise keep it invisible.",panel_visibilityDescription:"Make the panel visible when the logic expression returns true. Otherwise keep it invisible.",panel_enableDescription:"Make the panel, and all elements inside it, enable when the logic expression returns true. Otherwise keep them disabled.",question_visibilityDescription:"Make the question visible when the logic expression returns true. Otherwise keep it invisible.",question_enableDescription:"Make the question enable when the logic expression returns true. Otherwise keep it disabled.",question_requireDescription:"Question becomes required when the logic expression returns true.",trigger_completeDescription:"When the logic expression returns true then the survey becomes completed and an end-user see the 'Thank you page'.",trigger_setvalueDescription:"When question values, that are used in the logic expression, are changed and the logic expression returns true, then the value is set to the selected question.",trigger_copyvalueDescription:"When question values, that are used in the logic expression, are changed and the logic expression returns true, then the value of one selected question is copied to another selected question.",trigger_skipDescription:"When the logic expression returns true then the survey skip to / focus the selected question.",trigger_runExpressionDescription:"When the logic expression returns true, then the custom expression is performed. You may optionally set this expression result into the selected question",completedHtmlOnConditionDescription:"If the logic expression returns true, then the default text for the 'Thank you page' is changed to the given one.",itemExpressionText:"When expression: '{0}' returns true",itemEmptyExpressionText:"New rule",page_visibilityText:"make page {0} visible",panel_visibilityText:"make panel {0} visible",panel_enableText:"make panel {0} enable",question_visibilityText:"make question {0} visible",question_enableText:"make question {0} enable",question_requireText:"make question {0} required",column_visibilityText:"make column {0} of question {1} visible",column_enableText:"make column {0} of question {1} enable",column_requireText:"make column {0} of question {1} required",trigger_completeText:"survey becomes completed",trigger_setvalueText:"set into question: {0} value {1}",trigger_setvalueEmptyText:"clear question value: {0}",trigger_copyvalueText:"copy into question: {0} value from question {1}",trigger_skipText:"survey skip to the question {0}",trigger_runExpressionText1:"run expression: '{0}'",trigger_runExpressionText2:" and set its result into question: {0}",completedHtmlOnConditionText:"show custom text for the 'Thank you page'.",showAllQuestions:"All Questions",showAllActionTypes:"All Action Types",conditions:"Condition(s)",actions:"Action(s)",expressionEditorTitle:"Define condition(s)",actionsEditorTitle:"Define action(s)",deleteAction:"Delete Action",addNewAction:"Add Action",selectedActionCaption:"Select action...",expressionInvalid:"The logic expression is empty or invalid. Please correct it.",noActionError:"Please, add at least one action.",actionInvalid:"Please, fix problems in your action(s).",uncompletedRule_title:"Logical rules are incomplete",uncompletedRule_text:"You have not completed some of the logical rules. If you leave the tab now, the changes will be lost. Do you still want to leave the tab without completing the changes?",uncompletedRule_apply:"Yes",uncompletedRule_cancel:"No, I want to complete the rules",expressionSetup:"",actionsSetup:""}},pe:{apply:"Apply",ok:"OK",save:"Save",clear:"Clear",saveTooltip:"Save",cancel:"Cancel",set:"Set",reset:"Reset",change:"Change",refresh:"Refresh",close:"Close",delete:"Delete",add:"Add",addNew:"Add New",addItem:"Click to add an item...",removeItem:"Click to remove the item...",dragItem:"Drag the item",addOther:"Other",addSelectAll:"Select All",addNone:"None",removeAll:"Remove All",edit:"Edit",back:"Return without saving",backTooltip:"Return without saving",saveAndBack:"Save and return",saveAndBackTooltip:"Save and return",doneEditing:"Done",editChoices:"Edit Choices",showChoices:"Show Choices",move:"Move",empty:"<empty>",emptyValue:"Value is empty",fastEntry:"Manual Entry",fastEntryNonUniqueError:"Value '{0}' is not unique",fastEntryChoicesCountError:"Please limit the number of items from {0} to {1}",fastEntryPlaceholder:"You can set data in the following format:\nvalue1|text\nvalue2",formEntry:"Form Entry",testService:"Test the service",itemSelectorEmpty:"Please select the element",conditionActionEmpty:"Please select the action",conditionSelectQuestion:"Select question...",conditionSelectPage:"Select page...",conditionSelectPanel:"Select panel...",conditionValueQuestionTitle:"Please enter/select the value",expressionHelp:"Use curly brackets to access answers: `{question1} + {question2}`. Expressions also support functions: `iif()`, `today()`, `age()`, `min()`, `max()`, `count()`, `avg()`, and others",aceEditorHelp:"Press ctrl+space to get expression completion hint",aceEditorRowTitle:"Current row",aceEditorPanelTitle:"Current panel",showMore:"For more details please check the documentation",assistantTitle:"Available questions",cellsEmptyRowsColumns:"There is should be at least one column or row",showPreviewBeforeComplete:"Preview answers before submitting the survey",overridingPropertyPrefix:"Set by ",propertyIsEmpty:"Please enter a value",propertyIsNoUnique:"Please enter a unique value",propertyNameIsNotUnique:"Please enter a unique name",propertyNameIsIncorrect:'Do not use reserved words: "item", "choice", "panel", "row".',listIsEmpty:"No items have been added yet","listIsEmpty@choices":"No choices have been added yet","addNew@choices":"Add a choice",expressionIsEmpty:"Expression is empty",value:"Value",text:"Text",rowid:"Row ID",imageLink:"Image or video URL",columnEdit:"Edit column: {0}",itemEdit:"Edit item: {0}",url:"Service URL",path:"Path to data within the service",valueName:"Store answers in the following JSON field",choicesbyurl:{valueName:"Get values from the following JSON field"},titleName:"Get display texts from the following JSON field",imageLinkName:"Get image URLs from the following JSON field",allowEmptyResponse:"Allow empty response",titlePlaceholder:"Title",surveyTitlePlaceholder:"Survey Title",pageTitlePlaceholder:"Page {num}",descriptionPlaceholder:"Description",surveyDescriptionPlaceholder:"Description",pageDescriptionPlaceholder:"Description",showOtherItem:"Allow the Other option",otherText:"Other option text",showNoneItem:"Allow the None option",noneText:"None option text",showSelectAllItem:"Allow the Select All option",selectAllText:"Select All option text",choicesMin:"Minimum value for auto-generated items",choicesMax:"Maximum value for auto-generated items",choicesStep:"Step for auto-generated items",name:"Name",title:"Title",cellType:"Cell type",colCount:"Column count",choicesOrder:"Choices sort order",visible:"Visible",isRequired:"Required",isAllRowRequired:"Require answer for all rows",requiredErrorText:'"Required" error message',startWithNewLine:"Display the question on a new line",rows:"Rows",cols:"Columns",placeholder:"Input area placeholder",showPreview:"Show preview area",storeDataAsText:"Store file content in JSON result as text",maxSize:"Maximum file size (in bytes)",imageHeight:"Image height",imageWidth:"Image width",rowCount:"Row count",columnLayout:"Columns layout",addRowLocation:"Add Row button location",addRowText:"Add Row button text",removeRowText:"Remove Row button text",rateMin:"Minimum rate value",rateMax:"Maximum rate value",rateStep:"Rate step",minRateDescription:"Minimum rate value description",maxRateDescription:"Maximum rate value description",inputType:"Input type",optionsCaption:"Option placeholder",defaultValue:"Default Answer",cellsDefaultRow:"Default texts",surveyEditorTitle:"Edit survey settings",qEditorTitle:"Edit: {0}",maxLength:"Maximum length (in characters)",buildExpression:"Build",editExpression:"Edit",and:"and",or:"or",remove:"Remove",addCondition:"Add Condition",emptyLogicPopupMessage:"Select a question to start configuring conditions.",if:"If",then:"then",setToName:"Target question",fromName:"Question to copy answer from",gotoName:"Question to skip to",ruleIsNotSet:"Rule is incorrect",includeIntoResult:"Include into survey results",showTitle:"Show the title",expandCollapseTitle:"Expand/collapse title",locale:"Survey language",simulator:"Select device type",landscapeOrientation:"Switch to landscape orientation",portraitOrientation:"Switch to portrait orientation",mode:"Editable or read-only",clearInvisibleValues:"Clear invisible values",cookieName:"Cookie name",sendResultOnPageNext:"Save partial survey results in progress",storeOthersAsComment:"Store the Others value in a separate field",showPageTitles:"Show page titles",showPageNumbers:"Show page numbers",pagePrevText:"Previous Page button text",pageNextText:"Next Page button text",completeText:"Complete Survey button text",previewText:"Preview Answers button text",editText:"Edit Answer button text",startSurveyText:"Start Survey button text",showNavigationButtons:"Navigation buttons location",showPrevButton:"Show the Previous Page button",firstPageIsStarted:"First page is a start page",showCompletedPage:"Show the Survey Complete page",goNextPageAutomatic:"Proceed to the next page automatically",showProgressBar:"Progress bar location",questionTitleLocation:"Question title location",requiredText:"Required symbol(s)",questionStartIndex:"Start index (number or letter)",showQuestionNumbers:"Question numbering",questionTitleTemplate:"Question title template, default is: '{no}. {require} {title}'",questionErrorLocation:"Error message location",focusFirstQuestionAutomatic:"Focus first question on a new page",questionsOrder:"Element order on the page",maxTimeToFinish:"Time limit to finish the survey (in seconds)",maxTimeToFinishPage:"Time limit to finish one page (in seconds)",image:{imageHeight:"Image height (in CSS-accepted values)",imageWidth:"Image width (in CSS-accepted values)"},page:{maxTimeToFinish:"Time limit to finish the page (in seconds)"},question:{page:"Parent page"},showTimerPanel:"Timer location",showTimerPanelMode:"Timer mode",renderMode:"Panel display mode",allowAddPanel:"Allow adding panels",allowRemovePanel:"Allow removing panels",noEntriesText:"Empty entries text",panelAddText:"Add Panel button text",panelRemoveText:"Remove Panel button text",isSinglePage:"Show all elements on one page",html:"HTML markup",expression:"Expression",setValue:"Answer",dataFormat:"Image format",allowAddRows:"Allow adding rows",allowRemoveRows:"Allow removing rows",allowRowsDragAndDrop:"Allow row drag and drop",responsiveImageSizeHelp:"Does not apply if you specify the exact image width or height.",minImageWidth:"Minimum image width",maxImageWidth:"Maximum image width",minImageHeight:"Minimum image height",maxImageHeight:"Maximum image height",minValue:"Minimum value",maxValue:"Maximum value",minLength:"Minimum length (in characters)",allowDigits:"Allow digits",minCount:"Minimum count",maxCount:"Maximum count",regex:"Regular expression",surveyvalidator:{text:"Error message",expression:"Validation expression"},totalText:"Total row text",totalType:"Total type",totalExpression:"Total expression",totalDisplayStyle:"Total value display style",totalCurrency:"Currency",totalFormat:"Formatted string",logo:"Logo (URL or base64-encoded string)",questionsOnPageMode:"Survey structure",maxTextLength:"Maximum answer length (in characters)",maxOthersLength:"Maximum comment length (in characters)",autoGrowComment:"Auto-expand comment area if necessary",allowResizeComment:"Allow users to resize text areas",textUpdateMode:"Update text question value",focusOnFirstError:"Set focus on the first invalid answer",checkErrorsMode:"Run validation",navigateToUrl:"Navigate to URL",navigateToUrlOnCondition:"Dynamic URL",completedBeforeHtml:"Markup to show if the user already filled out this survey",completedHtml:"Survey Complete page markup",completedHtmlOnCondition:"Dynamic Survey Complete page markup",loadingHtml:"Markup to show while survey model is loading",commentText:"Comment area text",autocomplete:"Autocomplete type",labelTrue:'"True" label',labelFalse:'"False" label',allowClear:"Show the Clear button",displayStyle:"Value display style",format:"Formatted string",maximumFractionDigits:"Maximum fractional digits",minimumFractionDigits:"Minimum fractional digits",useGrouping:"Display grouping separators",allowMultiple:"Allow multiple files",allowImagesPreview:"Preview images",acceptedTypes:"Accepted file types",waitForUpload:"Wait for the upload to complete",needConfirmRemoveFile:"Confirm file deletion",detailPanelMode:"Detail panel location",minRowCount:"Minimum row count",maxRowCount:"Maximum row count",confirmDelete:"Confirm row deletion",confirmDeleteText:"Confirmation message",paneldynamic:{confirmDelete:"Confirm panel deletion"},panelCount:"Initial panel count",minPanelCount:"Minimum panel count",maxPanelCount:"Maximum panel count",panelsState:"Inner panel expand state",templateDescription:"Description template",templateTitle:"Title template",panelPrevText:"Previous Panel button tooltip",panelNextText:"Next Panel button tooltip",showRangeInProgress:"Show progress bar",templateTitleLocation:"Question title location",panelRemoveButtonLocation:"Remove Panel button location",hideIfRowsEmpty:"Hide the question if there are no rows",hideColumnsIfEmpty:"Hide columns if there are no rows",rateValues:"Custom rate values",rateCount:"Rate count",rateDisplayMode:"Rate display mode",autoGenerate:"How to specify rate values?",hideIfChoicesEmpty:"Hide the question if it contains no choices",hideNumber:"Hide question number",minWidth:"Minimum width (in CSS-accepted values)",maxWidth:"Maximum width (in CSS-accepted values)",width:"Width (in CSS-accepted values)",showHeader:"Show column headers",horizontalScroll:"Show horizontal scrollbar",columnMinWidth:"Minimum column width (in CSS-accepted values)",rowTitleWidth:"Row header width (in CSS-accepted values)",valueTrue:'"True" value',valueFalse:'"False" value',minErrorText:'"Value is below minimum" error message',maxErrorText:'"Value exceeds maximum" error message',otherErrorText:'"Empty comment" error message',keyDuplicationError:'"Non-unique key value" error message',maxSelectedChoices:"Maximum selected choices",showClearButton:"Show the Clear button",showNumber:"Show panel number",logoWidth:"Logo width (in CSS-accepted values)",logoHeight:"Logo height (in CSS-accepted values)",readOnly:"Read-only",enableIf:"Editable if",emptyRowsText:'"No rows" message',size:"Input field size (in characters)",separateSpecialChoices:"Separate special choices (None, Other, Select All)",choicesFromQuestion:"Copy choices from the following question",choicesFromQuestionMode:"Which choices to copy?",showCommentArea:"Show the comment area",commentPlaceholder:"Comment area placeholder",displayRateDescriptionsAsExtremeItems:"Display rate descriptions as extreme values",rowsOrder:"Row order",columnsLayout:"Column layout",columnColCount:"Nested column count",state:"Panel expand state",correctAnswer:"Correct Answer",defaultPanelValue:"Default Values",cells:"Cell Texts",keyName:"Key column",itemvalue:{text:"Alt text"},logoPosition:"Logo position",addLogo:"Add logo...",changeLogo:"Change logo...",logoPositions:{none:"Remove logo",left:"Left",right:"Right",top:"On the top",bottom:"In the bottom"},tabs:{general:"General",fileOptions:"Options",html:"HTML Editor",columns:"Columns",rows:"Rows",choices:"Choices",items:"Items",visibleIf:"Visible If",enableIf:"Editable If",requiredIf:"Required If",rateValues:"Rate Values",choicesByUrl:"Choices from a RESTful Service",matrixChoices:"Default Choices",multipleTextItems:"Text Inputs",numbering:"Numbering",validators:"Validators",navigation:"Navigation",question:"Question",pages:"Pages",timer:"Timer/Quiz",calculatedValues:"Calculated Values",triggers:"Triggers",templateTitle:"Title template",totals:"Totals",logic:"Logic",layout:"Layout",data:"Data",validation:"Validation",cells:"Cell Texts",showOnCompleted:"Survey Complete",logo:"Logo in Survey Title",slider:"Slider",expression:"Expression",others:"Others"},editProperty:"Edit property '{0}'",items:"Items",choicesVisibleIf:"Choices are visible if",choicesEnableIf:"Choices are selectable if",columnsEnableIf:"Columns are visible if",rowsEnableIf:"Rows are visible if",indent:"Add indents",panel:{indent:"Add outer indents"},innerIndent:"Add inner indents",defaultValueFromLastRow:"Take default values from the last row",defaultValueFromLastPanel:"Take default values from the last panel",enterNewValue:"Please, enter the value.",noquestions:"There are no questions in the survey.",createtrigger:"Please create a trigger",titleKeyboardAdornerTip:"Press enter button to edit",keyboardAdornerTip:"Press enter button to edit item, press delete button to delete item, press alt plus arrow up or arrow down to move item",triggerOn:"On ",triggerMakePagesVisible:"Make pages visible",triggerMakeQuestionsVisible:"Make elements visible",triggerCompleteText:"Complete the survey if succeed.",triggerNotSet:"The trigger is not set",triggerRunIf:"Run if",triggerSetToName:"Change value of: ",triggerFromName:"Copy value from: ",triggerRunExpression:"Run this Expression",triggerSetValue:"to: ",triggerGotoName:"Go to the question",triggerIsVariable:"Do not put the variable into the survey result.",triggerRunExpressionEmpty:"Please enter a valid expression",emptyExpressionPlaceHolder:"Type expression here...",noFile:"No file choosen",clearIfInvisible:"Clear the value if the question becomes hidden",valuePropertyName:"Value property name",searchEnabled:"Enable search",hideSelectedItems:"Hide selected items",closeOnSelect:"Close the dropdown after selection",signatureWidth:"Signature width",signatureHeight:"Signature height",verticalAlign:"Vertical alignment",alternateRows:"Alternate rows",columnsVisibleIf:"Columns are visible if",rowsVisibleIf:"Rows are visible if",otherPlaceholder:"Comment area placeholder"},pv:{true:"true",false:"false",inherit:"Inherit",show:"Visible",hide:"Hidden",default:"Inherit",initial:"Initial",random:"Random",collapsed:"Collapsed",expanded:"Expanded",none:"None",asc:"Ascending",desc:"Descending",indeterminate:"Indeterminate",decimal:"decimal",currency:"currency",percent:"percent",firstExpanded:"First panel is expanded",off:"Hide question numbers",onpanel:"Start on each panel",onPanel:"Start on each panel",onSurvey:"Continue throughout the survey",list:"List",progressTop:"Panel navigator + Progress bar at the top",progressBottom:"Panel navigator + Progress bar at the bottom",progressTopBottom:"Panel navigator + Progress bar at the top and bottom",tab:"Tabs",horizontal:"Horizontal",vertical:"Vertical",top:"Top",bottom:"Bottom",topBottom:"Top and bottom",both:"Both",left:"Left",right:"Right",color:"color",date:"date",datetime:"datetime","datetime-local":"datetime-local",email:"email",month:"month",number:"number",password:"password",range:"range",tel:"tel",text:"text",time:"time",url:"url",week:"week",hidden:"Hidden",on:"Continue from the previous page",onPage:"Start on each page",edit:"Editable",display:"Read-only",onComplete:"When the survey is completed",onHidden:"When the question becomes hidden",onHiddenContainer:"When the question or its panel/page becomes hidden",clearInvisibleValues:{none:"Never"},inputType:{color:"Color",date:"Date","datetime-local":"Date and Time",email:"Email",month:"Month",number:"Number",password:"Password",range:"Range",tel:"Phone Number",text:"Text",time:"Time",url:"URL",week:"Week"},all:"All",page:"Page",survey:"Survey",onNextPage:"When switching to the next page",onValueChanged:"After an answer is changed",onValueChanging:"Before an answer is changed",standard:"Original structure",singlePage:"All questions on a single page",questionPerPage:"Each question on an individual page",noPreview:"No preview",showAllQuestions:"Show all questions",showAnsweredQuestions:"Show answered questions only",pages:"Completed pages",questions:"Answered questions",requiredQuestions:"Answered required questions",correctQuestions:"Valid answers",buttons:"Completed pages (button UI)",underInput:"Under the input",underTitle:"Under the title",onBlur:"On blur",onTyping:"While typing",underRow:"Under the row",underRowSingle:"Under the row, only one panel is visible",showNavigationButtons:{none:"Hidden"},showProgressBar:{off:"Hidden"},showTimerPanel:{none:"Hidden"},showTimerPanelMode:{all:"Both"},detailPanelMode:{none:"Hidden"},addRowLocation:{default:"Depends on matrix layout"},panelsState:{default:"Users cannot expand or collapse panels",collapsed:"All panels are collapsed",expanded:"All panels are expanded"},widthMode:{auto:"Auto",static:"Static",responsive:"Responsive"},imageFit:{none:"None",contain:"Contain",cover:"Cover",fill:"Fill"},contentMode:{auto:"Auto",image:"Image",video:"Video",youtube:"YouTube"},displayMode:{auto:"Auto",buttons:"Buttons",dropdown:"Dropdown"},rateColorMode:{default:"Default"},autoGenerate:{true:"Generate",false:"Enter manually"},rateType:{labels:"Labels",stars:"Stars",smileys:"Smileys"}},op:{empty:"Empty",notempty:"Not empty",equal:"Equals",notequal:"Does not equal",contains:"Contains",notcontains:"Does not contain",anyof:"Any of",allof:"All of",greater:"Greater than",less:"Less than",greaterorequal:"Greater than or equal to",lessorequal:"Less than or equal to",and:"and",or:"or"},ew:{angular:"Use Angular version",jquery:"Use jQuery version",knockout:"Use Knockout version",react:"Use React version",vue:"Use Vue version",bootstrap:"For bootstrap framework",modern:"Modern theme",default:"Default theme",orange:"Orange theme",darkblue:"Darkblue theme",darkrose:"Darkrose theme",stone:"Stone theme",winter:"Winter theme",winterstone:"Winter-Stone theme",showOnPage:"Show survey on a page",showInWindow:"Show survey in a window",loadFromServer:"Load Survey JSON from server",titleScript:"Scripts and styles",titleHtml:"HTML",titleJavaScript:"JavaScript"},ts:{selectPage:"Select the page to test it",showInvisibleElements:"Show invisible elements",hideInvisibleElements:"Hide invisible elements"},validators:{answercountvalidator:"Answer count",emailvalidator:"Email",expressionvalidator:"Expression",numericvalidator:"Number",regexvalidator:"Regex",textvalidator:"Text"},triggers:{completetrigger:"Complete survey",setvaluetrigger:"Set answer",copyvaluetrigger:"Copy answer",skiptrigger:"Skip to question",runexpressiontrigger:"Run expression",visibletrigger:"change visibility (deprecated)"},pehelp:{cookieName:"Cookies prevent users from filling out the same survey twice.",size:"Resizes the visible area of the input field. Please use the <b>Validation → Maximum length</b> setting to limit the input length.",format:"Use {0} as a placeholder for the actual value.",totalText:"Visible only when at least one column has Total type or Total expression.",acceptedTypes:"Refer to the [accept](https://www.w3schools.com/tags/att_input_accept.asp) attribute description for more information.",columnColCount:"Applicable only to Radiogroup and Checkbox cell types.",autocomplete:"Refer to the [autocomplete](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) attribute description for more information.",valueName:"If you do not set this property, the answer will be stored in a field specified by the Name property.",choicesbyurl:{valueName:" "},keyName:'If the specified column contains identical values, the survey throws the "Non-unique key value" error.'},p:{title:{name:"title",title:"Leave it empty, if it is the same as 'Name'"},multiSelect:"Allow multiple selection",showLabel:"Show image captions",value:"Value",tabAlign:"Tab alignment",description:"Description",logoFit:"Logo fit",pages:"Pages",questions:"Questions",triggers:"Triggers",calculatedValues:"Calculated values",surveyId:"Survey id",surveyPostId:"Survey post id",surveyShowDataSaving:"Survey show data saving",questionDescriptionLocation:"Question description location",progressBarType:"Progress bar type",showTOC:"Show TOC",tocLocation:"Toc location",questionTitlePattern:"Question title pattern",widthMode:"Width mode",showBrandInfo:"Show brand info",useDisplayValuesInDynamicTexts:"Use display values in dynamic texts",visibleIf:"Visible if",titleLocation:"Title location",descriptionLocation:"Description location",defaultValueExpression:"Default value expression",requiredIf:"Required if",validators:"Validators",bindings:"Bindings",renderAs:"Render as",attachOriginalItems:"Attach original items",choices:"Choices",choicesByUrl:"Choices by url",currency:"Currency",cellHint:"Cell hint",isUnique:"Is unique",showInMultipleColumns:"Show in multiple columns",totalMaximumFractionDigits:"Total maximum fraction digits",totalMinimumFractionDigits:"Total minimum fraction digits",columns:"Columns",detailElements:"Detail elements",allowAdaptiveActions:"Allow adaptive actions",defaultRowValue:"Default row value",detailPanelShowOnAdding:"Detail panel show on adding",choicesLazyLoadEnabled:"Choices lazy load enabled",choicesLazyLoadPageSize:"Choices lazy load page size",inputFieldComponent:"Input field component",itemComponent:"Item component",min:"Min",max:"Max",minValueExpression:"Min value expression",maxValueExpression:"Max value expression",step:"Step",dataList:"Data list",itemSize:"Item size",elements:"Elements",content:"Content",navigationButtonsVisibility:"Navigation buttons visibility",navigationTitle:"Navigation title",navigationDescription:"Navigation description",longTap:"Long tap",autoGrow:"Auto grow",allowResize:"Allow resizing",acceptCarriageReturn:"Accept carriage return",displayMode:"Display mode",rateType:"Rate type",label:"Label",contentMode:"Content mode",imageFit:"Image fit",altText:"Alt text",height:"Height",penColor:"Pen color",backgroundColor:"Background color",templateElements:"Template elements",operator:"Operator",isVariable:"Is variable",runExpression:"Run expression",showCaption:"Show caption",iconName:"Icon name",iconSize:"Icon size"},theme:{"--background":"Background color","--background-dim-light":"Background dim light color","--primary-foreground":"Primary foreground color","--foreground":"Foreground color","--base-unit":"Base unit",groupGeneral:"General",groupAdvanced:"Advanced",themeName:"Theme",themeMode:"Question appearance",themeModePanels:"Default",themeModeLightweight:"Without Panels",themePaletteLight:"Light",themePaletteDark:"Dark",primaryColor:"Accent color",primaryDefaultColor:"Default",primaryDarkColor:"Hover",primaryLightColor:"Selected",backgroundDimColor:"Background color",backgroundImage:"Background image",backgroundImageFitAuto:"Auto",backgroundImageFitCover:"Cover",backgroundImageFitContain:"Contain",backgroundOpacity:"Opacity",backgroundImageAttachmentFixed:"Fixed",backgroundImageAttachmentScroll:"Scroll",panelBackgroundTransparency:"Panel background opacity",questionBackgroundTransparency:"Question background opacity",questionPanel:"Panel background and corner radius",questionTitle:"Question title font",questionDescription:"Question description font",editorPanel:"Input element",editorFont:"Input element font",backcolor:"Default background",hovercolor:"Hover background",borderDecoration:"Border decoration",accentBackground:"Accent background",accentForeground:"Accent foreground",primaryForecolor:"Default color",primaryForecolorLight:"Disabled color",linesColors:"Minor line colors",borderDefault:"Darker",borderLight:"Lighter",fontFamily:"Font family",fontSize:"Font size",color:"Color",size:"Size",fontWeightRegular:"Regular",fontWeightHeavy:"Heavy",fontWeightSemiBold:"Semi-bold",fontWeightBold:"Bold",scale:"Scale",cornerRadius:"Corner radius",surveyTitle:"Survey title font",pageTitle:"Page title font",pageDescription:"Page description font",boxShadowX:"X",boxShadowY:"Y",boxShadowAddRule:"Add Shadow Effect",opacity:"Opacity",boxShadowBlur:"Blur",boxShadowSpread:"Spread",boxShadowDrop:"Drop",boxShadowInner:"Inner",questionShadow:"Shadow effects",editorShadow:"Input element shadow effects",names:{default:"Default",contrast:"Contrast",plain:"Plain",simple:"Simple",blank:"Blank",double:"Double",bulk:"Bulk","pseudo-3d":"Pseudo 3D",playful:"Playful",ultra:"Ultra"},colors:{teal:"Teal",blue:"Blue",purple:"Purple",orchid:"Orchid",tulip:"Tulip",brown:"Brown",green:"Green"}}},r=o(0);!function(e){e[e.AllTypes=0]="AllTypes",e[e.CompatibleTypes=1]="CompatibleTypes"}(i||(i={}));var a={translation:{sortByName:!1,exportPrefix:"",maximumSelectedLocales:7,exportFileName:"survey_translation.csv"},theme:{exportFileName:"survey_theme.json",fontFamily:"Open Sans"},operators:{empty:[],notempty:[],equal:["!file"],notequal:["!file"],contains:["checkbox","text","comment"],notcontains:["checkbox","text","comment"],anyof:["selectbase"],allof:["checkbox"],greater:["!checkbox","!imagepicker","!boolean","!file"],less:["!checkbox","!imagepicker","!boolean","!file"],greaterorequal:["!checkbox","!imagepicker","!boolean","!file"],lessorequal:["!checkbox","!imagepicker","!boolean","!file"]},defaultNewSurveyJSON:{},designer:{defaultAddQuestionType:"text",showAddQuestionButton:!0},logic:{get defaultOperator(){return a.logic.defaultOperators.default},set defaultOperator(e){a.logic.defaultOperators.default=e},defaultOperators:{default:"equal",checkbox:"allof",tagbox:"allof"},visibleActions:[],logicItemTitleMaxChars:50,openBracket:"{",closeBracket:"}",updateExpressionsOnChanging:{questionName:!0,columnName:!0,choiceValue:!0}},questionConvertMode:i.AllTypes,propertyGrid:{useButtonGroup:!0,maxCharsInButtonGroup:25,showNavigationButtons:!1,maximumColumnsCount:0,maximumChoicesCount:0,maximumRowsCount:0,maximumRateValues:0,generalTabName:"general",defaultExpandedTabName:"general"},toolbox:{defaultJSON:{dropdown:{choices:["Item 1","Item 2","Item 3"]},tagbox:{choices:["Item 1","Item 2","Item 3"]},checkbox:{choices:["Item 1","Item 2","Item 3"]},radiogroup:{choices:["Item 1","Item 2","Item 3"]},ranking:{choices:["Item 1","Item 2","Item 3"]},imagepicker:{imageFit:"cover",choices:[{value:"Image 1",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/lion.jpg"},{value:"Image 2",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/giraffe.jpg"},{value:"Image 3",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/panda.jpg"},{value:"Image 4",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/camel.jpg"}]},image:{imageFit:"cover",imageHeight:"auto",imageWidth:"100%"}}},notifications:{lifetime:2e3},autoSave:{delay:500},dragDrop:{restrictDragQuestionBetweenPages:!1,allowDragToTheSameLine:!0},layout:{showTabs:!0,showToolbar:!0,allowCollapseSidebar:!0},jsonEditor:{indentation:1}},s=function(){function e(){this.isMobileView=!1,this.allowEditExpressionsInTextEditor=!0,this.maximumColumnsCount=a.propertyGrid.maximumColumnsCount,this.maximumChoicesCount=a.propertyGrid.maximumChoicesCount,this.maximumRowsCount=a.propertyGrid.maximumRowsCount,this.maximumRateValues=a.propertyGrid.maximumRateValues}return e.prototype.getProcessedTranslationItemText=function(e,t,o,i){return o},e.prototype.getObjectDisplayName=function(e,t,o,i){return i},e.prototype.onCanShowPropertyCallback=function(e,t,o,i,n){return!0},e.prototype.onPropertyGridSurveyCreatedCallback=function(e,t){},e.prototype.onPropertyEditorCreatedCallback=function(e,t,o){},e.prototype.onPropertyEditorUpdateTitleActionsCallback=function(e,t,o,i){},e.prototype.onPropertyGridShowModalCallback=function(e,t,o,i,n){},e.prototype.onIsPropertyReadOnlyCallback=function(e,t,o,i,n){return o},e.prototype.onCanDeleteItemCallback=function(e,t,o){return o},e.prototype.onCollectionItemDeletingCallback=function(e,t,o,i){return!0},e.prototype.onCollectionItemAllowingCallback=function(e,t,o,i,n){},e.prototype.onItemValueAddedCallback=function(e,t,o,i){},e.prototype.onMatrixDropdownColumnAddedCallback=function(e,t,o){},e.prototype.onSetPropertyEditorOptionsCallback=function(e,t,o){},e.prototype.onGetErrorTextOnValidationCallback=function(e,t,o){return null},e.prototype.onValueChangingCallback=function(e){},e.prototype.onGetElementEditorTitleCallback=function(e,t){return t},e.prototype.startUndoRedoTransaction=function(){},e.prototype.stopUndoRedoTransaction=function(){},e.prototype.createSurvey=function(e,t,o){return new r.SurveyModel(e)},e.prototype.onConditionQuestionsGetListCallback=function(e,t,o,i){return"asc"},e.prototype.onConditionGetTitleCallback=function(e,t){return t},e.prototype.isConditionOperatorEnabled=function(e,t,o){return o},e.prototype.onLogicGetTitleCallback=function(e,t,o,i){return o},e.prototype.getTranslationExportedText=function(e,t,o,i,n){return n},e.prototype.uploadFiles=function(e,t,o){},e}();function l(e){if(!e)return"";for(var t="",o=e.length-1;o>=0;o--){if(e[o]>="0"&&e[o]<="9")t=e[o]+t;else if(t)return t;if(10==t.length)break}return t}r.StylesManager.applyTheme("defaultV2");var u={true:"false",True:"False",TRUE:"FALSE",false:"true",False:"True",FALSE:"TRUE",yes:"no",Yes:"No",YES:"NO",no:"yes",No:"Yes",NO:"YES"};function c(e,t){t=t.toString();for(var o=0;o<e.length;o++)if(e[o]&&e[o].toString()===t)return!0;return!1}function p(e,t){return h(e,t.map((function(e){return e.value})))}function d(e){var t=e.length;if(0===t)return"";if(!e[t-1].text||e[t-1].text===e[t-1].value)return"";var o=[];e.forEach((function(e){e.hasText&&o.push(e.text)})),e.map((function(e){return e.text}));var i=h("",o);return i?i.toString():""}function h(e,t){if(t.length>0)var o=function(e){return u[e]?u[e]:null}(t[t.length-1]);if(o&&t.indexOf(o)<0)return o;for(var i,n="",r=-1,a=t.length-1;a>=0;a--)if(t[a]){var s=t[a].toString();if(n=l(s)){r=s.lastIndexOf(n),i=t[a];break}}if(r>-1){var p,d=parseInt(n),h=i===d;do{if(h)p=++d;else{for(var g=(d++).toString();n.length>g.length;)g="0"+g;p=s.substring(0,r)+g+s.substring(r+n.length)}}while(c(t,p));return p}return e||(e=t[t.length-1]),e+1}function g(e,t){for(var o=t;o&&!o.classList.contains(e);)o=o.parentElement;return o}function m(e){for(var t=0;t<e.length;t++)if("function"==typeof e[t].getElementsByClassName){var o=e[t].getElementsByClassName("svd-focusable");if(0===o.length&&-1!==e[t].className.indexOf("svd-focusable")&&(o=[e[t]]),o.length>0){var i=o[0];if("a"!==i.tagName.toLowerCase()){i.focus({preventScroll:!0});break}}}}function f(e){if(e&&e.length){for(var t=0;t<e.length;t++)if("#text"!=e[t].nodeName&&"#comment"!=e[t].nodeName)return e[t];return null}}function y(e){var t=e.element,o=[];if(8!==t.nodeType)return t.childNodes;for(;t=t.nextSibling;)3!==t.nodeType&&o.push(t);return o}function v(e,t){var o=!0;e&&"function"==typeof e.getType&&(o=!!r.Serializer.findProperty(e.getType(),t));return o}function b(e,t){var o=!0;if(e&&"function"==typeof e.getType){var i=r.Serializer.findProperty(e.getType(),t);o=!i||i.visible}return o}function w(e,t,o){void 0===o&&(o=0);function i(e,o){void 0===o&&(o=null);var i=(t.className||"").split(" ");o&&-1==i.indexOf(o)||-1==i.indexOf(e)&&(t.className+=" "+e)}e.__svc_question_processed||"mouseover"!==e.type?(t.className=(t.className||"").replace(" svc-hovered-ready",""),t.className=(t.className||"").replace(" svc-hovered","")):(o?(i("svc-hovered-ready"),setTimeout((function(){i("svc-hovered","svc-hovered-ready")}),o)):i("svc-hovered"),e.__svc_question_processed=!0)}function C(e){return e.replace(new RegExp("(\\r\\n|\\n|\\r)","gm"),"")}function x(e){var t,o;window&&(window.getSelection&&document.createRange?(o=window.getSelection(),(t=document.createRange()).selectNodeContents(e),o.removeAllRanges(),o.addRange(t)):document.selection&&document.body.createTextRange&&((t=document.body.createTextRange()).moveToElementText(e),t.select()))}function T(e,t){for(var o in t){var i=t[o];"object"==typeof i&&(i={},this.copyObject(i,t[o])),e[o]=i}}function S(e,t){t&&("string"==typeof t||t instanceof String?e.root=t:T(e,t))}function P(e,t){S(e,r.defaultV2Css.question),S(e,r.defaultV2Css[t])}function E(e){return a.logic.openBracket+e+a.logic.closeBracket}function O(e){return e?e=(e=e.replace(/[\s]+/g," ")).replace(/([\s]|^)(\S)/g,(function(e,t,o){return t+o.toUpperCase()})):e}function I(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.every((function(e){return!0===e}))}var V="image/png, image/gif, image/jpeg, image/apng, image/avif, image/svg+xml, image/webp";function N(e){return["auto","image"].indexOf(e)>-1?V:"video"==e?"video/*":""}function A(e){return e instanceof r.MatrixDropdownColumn?e.templateQuestion:e}function _(e,t){if(e&&void 0!==t)return"rgba("+parseInt(e.slice(1,3),16)+", "+parseInt(e.slice(3,5),16)+", "+parseInt(e.slice(5,7),16)+", "+t+")"}function j(e,t){return"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"}function L(e){var t=e.match(/\((.*)\)/);return t?t[1].split(",").map((function(e){return parseFloat(e)})):[]}function k(e){var t=L(e);if(0!==t.length){var o=1;return 4==t.length&&(o=t.pop()),{color:t.reduce((function(e,t){var o=t.toString(16);return e+(1==o.length?"0"+o:o)}),"#"),opacity:100*o}}return{color:e,opacity:100}}function M(e,t,o){t/=100,o/=100;var i=function(t){return(t+e/60)%6},n=function(e){return o*(1-t*Math.max(0,Math.min(i(e),4-i(e),1)))};return[Math.round(255*n(5)),Math.round(255*n(3)),Math.round(255*n(1))]}function D(e,t,o){e/=255,t/=255,o/=255;var i=Math.max(e,t,o),n=i-Math.min(e,t,o),r=0===n?0:n&&i===e?(t-o)/n:i===t?2+(o-e)/n:4+(e-t)/n;return[60*(r<0?r+6:r),i&&n/i*100,100*i]}function R(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var o=(e||[]).filter((function(e){return!!e}));if(!(o.length<=1))if(2!=o.length)for(var i=1;i<o.length;i++)R(o[0],o[i]);else Object.keys(o[1]).forEach((function(e){return o[0][e]=o[1][e]}))}var B=function(){function e(){this.colorSettings={baseColorAlpha:1,darkColorAlpha:1,lightColorAlpha:1,deltaDarkColor:0,deltaLightColor:0,newColorLight:"",newColorDark:""}}return e.prototype.initialize=function(e,t,o){var i=L(e),n=L(o),r=L(t);this.colorSettings.baseColorAlpha=i[3],this.colorSettings.darkColorAlpha=n[3],this.colorSettings.lightColorAlpha=r[3];var a=D(i[0],i[1],i[2]),s=D(n[0],n[1],n[2]),l=D(r[0],r[1],r[2]);this.colorSettings.deltaDarkColor=a[2]-s[2],this.colorSettings.deltaLightColor=a[2]-l[2]},e.prototype.calculateColors=function(e){var t=L(e);0===t.length&&(t=L(_(e,1)));var o=D(t[0],t[1],t[2]),i=M(o[0],o[1],o[2]-this.colorSettings.deltaDarkColor),n=M(o[0],o[1],o[2]-this.colorSettings.deltaLightColor);this.colorSettings.newColorLight=j(n,this.colorSettings.lightColorAlpha),this.colorSettings.newColorDark=j(i,this.colorSettings.darkColorAlpha)},e}(),q=function(){function e(){this.camelCaseBreaking=!0,this.currentLocale="",this.locales={},this.peByClass={},this.peHelpByClass={}}return e.prototype.reset=function(){this.peByClass={},this.peHelpByClass={}},e.prototype.getString=function(e,t){void 0===t&&(t=null);for(var o=this.getLocale(t),i=this.getLocale("en"),n=e.split("."),r=o,a=0;a<n.length;a++)if(!(r=r[n[a]])&&""!==r)return o===i?n[a]:this.getString(e,"en");return r},e.prototype.hasString=function(e,t){void 0===t&&(t=null);for(var o=this.getLocale(t),i=e.split("."),n=o,r=0;r<i.length;r++)if(!(n=n[i[r]])&&""!==n)return!1;return!0},e.prototype.getLocaleName=function(e,t){void 0===t&&(t=null);var o=r.surveyLocalization.localeNames;t||(t=r.surveyLocalization.defaultLocale);var i=e?O(o[e]):H.getString("ed.defaultLocale").format(O(o[t]));return i||e},e.prototype.getPropertyName=function(e,t){void 0===t&&(t=null);var o=this.getProperty(e,t),i=o.name;return i?i!=e?i:this.getAutoPropertyName(i,t):o},e.prototype.getPropertyTitle=function(e){var t=this.getProperty(e);return t.title?t.title:""},e.prototype.getPropertyNameInEditor=function(e,t,o){void 0===o&&(o=null);var i=this.getPropertyInfoInEditorByType(e,t,this.peByClass,"pe");return i||(i=this.getString("pe."+t)),i!==t?i:this.getPropertyName(t,o)},e.prototype.getPropertyHelpInEditor=function(e,t,o){void 0===o&&(o=void 0);var i=this.getPropertyInfoInEditorByType(e,t,this.peHelpByClass,"pehelp");if(i)return" "===i?null:i;var n=this.getLocale();return n&&n.pehelp&&(i=n.pehelp[t]),i||(o&&n.pe?n.pe[o+"Help"]:void 0)},e.prototype.getPropertyInfoInEditorByType=function(e,t,o,i){if(e){var n=o[e];for(void 0===n&&(n=this.getObjInEditorByType(e,o,i));n;){if(n.props[t])return n.props[t];n=n.parent}}},e.prototype.getObjInEditorByType=function(e,t,o){if(e){t[e];var i=this.getLocale(),n=i?i[o]:void 0;if(n){for(var a=r.Serializer.findClass(e),s=[],l=void 0;a;){var u=a.name;if(l=t[e])break;if(s.push(u),n[u]){l={props:n[u],parent:this.getObjInEditorByType(a.parentName,t,o)};break}if(!a.parentName)break;a=r.Serializer.findClass(a.parentName)}for(var c=0;c<s.length;c++)t[s[c]]=l;return l}}},e.prototype.getProperty=function(e,t){void 0===t&&(t=null);var o=this.getString("p."+e);if(o!==e)return o;var i=e.indexOf("_");return i<-1?this.getAutoPropertyName(o,t):(e=e.substring(i+1),(o=this.getString("p."+e))!==e?o:this.getAutoPropertyName(o,t))},e.prototype.convertToCamelCase=function(e,t){if(void 0===t&&(t=!1),!e)return e;if((e=e.trim()).indexOf(" ")>-1)return e;for(var o=!1,i=0;i<e.length;i++)if(e[i]!==e[i].toUpperCase()){o=!0;break}if(!o)return e;var n=e[0].toUpperCase(),r=!1,a=function(t){return!(t>=e.length)&&e[t].toUpperCase()===e[t]};for(i=1;i<e.length;i++){!r&&a(i)&&(n+=" "),n+=!r&&!a(i+1)?e[i].toLowerCase():e[i],r=a(i)}return t&&(n=n.toLowerCase()),n},e.prototype.getAutoPropertyName=function(e,t){return void 0===t&&(t=null),t||(e&&this.camelCaseBreaking?this.convertToCamelCase(e):e)},e.prototype.getPropertyValueInEditor=function(e,t){var o=this.getLocale();if(o&&o.pv&&o.pv[e]){var i=o.pv[e][t];if(i)return i}return this.getPropertyValue(t)},e.prototype.getPropertyValue=function(e,t){return void 0===t&&(t=null),this.getValueInternal(e,"pv",t)},e.prototype.getValidatorName=function(e,t){return void 0===t&&(t=null),this.getValueInternal(e,"validators",t)},e.prototype.getTriggerName=function(e,t){return void 0===t&&(t=null),this.getValueInternal(e,"triggers",t)},e.prototype.getLocale=function(e){e||(e=this.currentLocale);var t=e?this.locales[e]:F;return t||(t=F),t},e.prototype.getValueInternal=function(e,t,o){if(void 0===o&&(o=null),""===e||null==e)return"";e=e.toString();var i=this.getLocale(o),n=i[t]?i[t][e]:null;return n||(n=F[t][e]),n||(this.camelCaseBreaking?this.convertToCamelCase(e,!1):e)},e.prototype.getLocales=function(){var e=[];for(var t in e.push(""),this.locales)e.push(t);return e},e}(),H=new q;function Q(e,t){return void 0===t&&(t=null),H.getString(e,t)}r.surveyLocalization.onGetExternalString=function(e,t){var o=H.getString(e,t);return o!==e?o:""};var F=n,U=function(e,t,o,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,o,a):n(t,o))||a);return r>3&&a&&Object.defineProperty(t,o,a),a},G=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e};function z(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);function i(){this.constructor=e}e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var Z=function(){function e(e){void 0===e&&(e=0),this.parseType=e}return e.prototype.parse=function(e,t,o,i){var n;return void 0===t&&(t=null),void 0===o&&(o=0),void 0===i&&(i=-1),this.text=String(e),this.at=o,this.endAt=i,this.ch=" ",n=this.value(),this.white(),this.ch&&this.error("Syntax error"),"function"==typeof t?function e(o,i){var n,r,a=o[i];if(a&&"object"==typeof a)for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(void 0!==(r=e(a,n))?a[n]=r:delete a[n]);return t.call(o,i,a)}({"":n},""):n},e.prototype.error=function(e){var t=new SyntaxError;throw t.message=e,t.at=this.at,t},e.prototype.next=function(e){return void 0===e&&(e=null),e&&e!==this.ch&&this.error("Expected '"+e+"' instead of '"+this.ch+"'"),this.ch=this.chartAt(),this.at+=1,this.ch},e.prototype.peek=function(){return this.chartAt()},e.prototype.chartAt=function(){return this.endAt>-1&&this.at>=this.endAt?"":this.text.charAt(this.at)},e.prototype.identifier=function(){var e=this.ch;for("_"!==this.ch&&"$"!==this.ch&&(this.ch<"a"||this.ch>"z")&&(this.ch<"A"||this.ch>"Z")&&this.error("Bad identifier");this.next()&&("_"===this.ch||"$"===this.ch||this.ch>="a"&&this.ch<="z"||this.ch>="A"&&this.ch<="Z"||this.ch>="0"&&this.ch<="9");)e+=this.ch;return e},e.prototype.number=function(){var e,t="",o="",i=10;if("-"!==this.ch&&"+"!==this.ch||(t=this.ch,this.next(this.ch)),"I"===this.ch)return("number"!=typeof(e=this.word())||isNaN(e))&&this.error("Unexpected word for number"),"-"===t?-e:e;if("N"===this.ch)return e=this.word(),isNaN(e)||this.error("expected word to be NaN"),e;switch("0"===this.ch&&(o+=this.ch,this.next(),"x"===this.ch||"X"===this.ch?(o+=this.ch,this.next(),i=16):this.ch>="0"&&this.ch<="9"&&this.error("Octal literal")),i){case 10:for(;this.ch>="0"&&this.ch<="9";)o+=this.ch,this.next();if("."===this.ch)for(o+=".";this.next()&&this.ch>="0"&&this.ch<="9";)o+=this.ch;if("e"===this.ch||"E"===this.ch)for(o+=this.ch,this.next(),"-"!==this.ch&&"+"!==this.ch||(o+=this.ch,this.next());this.ch>="0"&&this.ch<="9";)o+=this.ch,this.next();break;case 16:for(;this.ch>="0"&&this.ch<="9"||this.ch>="A"&&this.ch<="F"||this.ch>="a"&&this.ch<="f";)o+=this.ch,this.next()}if(e="-"===t?-o:+o,isFinite(e))return e;this.error("Bad number")},e.prototype.string=function(){var t,o,i,n,r="";if('"'===this.ch||"'"===this.ch)for(i=this.ch;this.next();){if(this.ch===i)return this.next(),r;if("\\"===this.ch)if(this.next(),"u"===this.ch){for(n=0,o=0;o<4&&(t=parseInt(this.next(),16),isFinite(t));o+=1)n=16*n+t;r+=String.fromCharCode(n)}else if("\r"===this.ch)"\n"===this.peek()&&this.next();else{if("string"!=typeof e.escapee[this.ch])break;r+=e.escapee[this.ch]}else{if("\n"===this.ch)break;r+=this.ch}}this.error("Bad string")},e.prototype.inlineComment=function(){"/"!==this.ch&&this.error("Not an inline comment");do{if(this.next(),"\n"===this.ch||"\r"===this.ch)return void this.next()}while(this.ch)},e.prototype.blockComment=function(){"*"!==this.ch&&this.error("Not a block comment");do{for(this.next();"*"===this.ch;)if(this.next("*"),"/"===this.ch)return void this.next("/")}while(this.ch);this.error("Unterminated block comment")},e.prototype.comment=function(){"/"!==this.ch&&this.error("Not a comment"),this.next("/"),"/"===this.ch?this.inlineComment():"*"===this.ch?this.blockComment():this.error("Unrecognized comment")},e.prototype.white=function(){for(;this.ch;)if("/"===this.ch)this.comment();else{if(!(e.ws.indexOf(this.ch)>=0))return;this.next()}},e.prototype.word=function(){switch(this.ch){case"t":return this.next("t"),this.next("r"),this.next("u"),this.next("e"),!0;case"f":return this.next("f"),this.next("a"),this.next("l"),this.next("s"),this.next("e"),!1;case"n":return this.next("n"),this.next("u"),this.next("l"),this.next("l"),null;case"I":return this.next("I"),this.next("n"),this.next("f"),this.next("i"),this.next("n"),this.next("i"),this.next("t"),this.next("y"),1/0;case"N":return this.next("N"),this.next("a"),this.next("N"),NaN}this.error("Unexpected '"+this.ch+"'")},e.prototype.array=function(){var e=[];if("["===this.ch)for(this.next("["),this.white();this.ch;){if("]"===this.ch)return this.next("]"),e;if(","===this.ch?this.error("Missing array element"):e.push(this.value()),this.white(),","!==this.ch)return this.next("]"),e;this.next(","),this.white()}this.error("Bad array")},e.prototype.object=function(){var t,o,i=!0,n={};if(this.parseType>0&&(n[e.positionName]={start:this.at-1}),"{"===this.ch)for(this.next("{"),this.white(),o=this.at-1;this.ch;){if("}"===this.ch)return this.parseType>0&&(n[e.positionName].end=o),this.next("}"),n;if(t='"'===this.ch||"'"===this.ch?this.string():this.identifier(),this.white(),this.parseType>1&&(n[e.positionName][t]={start:o,valueStart:this.at}),this.next(":"),n[t]=this.value(),this.parseType>1&&(o=this.at-1,n[e.positionName][t].valueEnd=o,n[e.positionName][t].end=o),this.white(),","!==this.ch)return this.parseType>1&&(n[e.positionName][t].valueEnd--,n[e.positionName][t].end--),this.parseType>0&&(n[e.positionName].end=this.at-1),this.next("}"),n;this.parseType>1&&(n[e.positionName][t].valueEnd--,i||n[e.positionName][t].end--),this.next(","),this.white(),i=!1}this.error("Bad object")},e.prototype.value=function(){switch(this.white(),this.ch){case"{":return this.object();case"[":return this.array();case'"':case"'":return this.string();case"-":case"+":case".":return this.number();default:return this.ch>="0"&&this.ch<="9"?this.number():this.word()}},e.prototype.stringify=function(e,t,o){if(void 0===t&&(t=null),void 0===o&&(o=null),t&&"function"!=typeof t&&!this.isArray(t))throw new Error("Replacer must be a function or an array");this.replacer=t,this.indentStr=this.getIndent(o),this.objStack=[];var i={"":e};return void 0===e?this.getReplacedValueOrUndefined(i,"",!0):this.internalStringify(i,"",!0)},e.prototype.getIndent=function(e){if(e){if("string"==typeof e)return e;if("number"==typeof e&&e>=0)return this.makeIndent(" ",e,!0)}return""},e.prototype.getReplacedValueOrUndefined=function(e,t,o){var i=e[t];return i&&i.toJSON&&"function"==typeof i.toJSON&&(i=i.toJSON()),"function"==typeof this.replacer?this.replacer.call(e,t,i):this.replacer?o||this.isArray(e)||this.replacer.indexOf(t)>=0?i:void 0:i},e.prototype.isWordChar=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"_"===e||"$"===e},e.prototype.isWordStart=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"_"===e||"$"===e},e.prototype.isWord=function(e){if("string"!=typeof e)return!1;if(!this.isWordStart(e[0]))return!1;for(var t=1,o=e.length;t<o;){if(!this.isWordChar(e[t]))return!1;t++}return!0},e.prototype.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},e.prototype.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},e.prototype.isNaN=function(e){return"number"==typeof e&&e!=e},e.prototype.checkForCircular=function(e){for(var t=0;t<this.objStack.length;t++)if(this.objStack[t]===e)throw new TypeError("Converting circular structure to JSON")},e.prototype.makeIndent=function(e,t,o){if(void 0===o&&(o=!1),!e)return"";e.length>10&&(e=e.substring(0,10));for(var i=o?"":"\n",n=0;n<t;n++)i+=e;return i},e.prototype.escapeString=function(t){return e.escapable.lastIndex=0,e.escapable.test(t)?'"'+t.replace(e.escapable,(function(t){var o=e.meta[t];return"string"==typeof o?o:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'},e.prototype.internalStringify=function(e,t,o){var i,n,r=this.getReplacedValueOrUndefined(e,t,o);switch(r&&!this.isDate(r)&&(r=r.valueOf()),typeof r){case"boolean":return r.toString();case"number":return isNaN(r)||!isFinite(r)?"null":r.toString();case"string":return this.escapeString(r.toString());case"object":if(null===r)return"null";if(this.isArray(r)){this.checkForCircular(r),i="[",this.objStack.push(r);for(var a=0;a<r.length;a++)n=this.internalStringify(r,a,!1),i+=this.makeIndent(this.indentStr,this.objStack.length),i+=null==n?"null":n,a<r.length-1?i+=",":this.indentStr&&(i+="\n");this.objStack.pop(),i+=this.makeIndent(this.indentStr,this.objStack.length,!0)+"]"}else{this.checkForCircular(r),i="{";var s=!1;for(var l in this.objStack.push(r),r)if(r.hasOwnProperty(l)){var u=this.internalStringify(r,l,!1);if(o=!1,null!=u)i+=this.makeIndent(this.indentStr,this.objStack.length),s=!0,i+=(this.isWord(l)?l:this.escapeString(l))+":"+(this.indentStr?" ":"")+u+","}this.objStack.pop(),i=s?i.substring(0,i.length-1)+this.makeIndent(this.indentStr,this.objStack.length)+"}":"{}"}return i;default:return}},e.positionName="pos",e.escapee={"'":"'",'"':'"',"\\":"\\","/":"/","\n":"",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},e.ws=[" ","\t","\r","\n","\v","\f"," ","\ufeff"],e.cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e.escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e.meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},e}(),J=function(e){function t(t){var o=e.call(this)||this;return o.toolbox=t,o}return z(t,e),t.prototype.toggleState=function(){this.toolbox&&this.toolbox.toggleCategoryState(this.name)},U([Object(r.property)()],t.prototype,"name",void 0),U([Object(r.propertyArray)()],t.prototype,"items",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"collapsed",void 0),t}(r.Base),W=function(e){function t(t){var o=e.call(this,t)||this;return o.item=t,o}return z(t,e),t.prototype.toJSON=function(){return this.item},t}(r.Action),K=function(e){function t(t,o,i){void 0===t&&(t=null),void 0===o&&(o=null),void 0===i&&(i=!1);var n=e.call(this)||this;return n.supportedQuestions=t,n.creator=o,n._orderedQuestions=["radiogroup","rating","checkbox","dropdown","tagbox","boolean","file","imagepicker","ranking","text","comment","multipletext","panel","paneldynamic","matrix","matrixdropdown","matrixdynamic","html","expression","image","signaturepad"],n.copiedItemMaxCount=3,n.allowExpandMultipleCategoriesValue=!1,n.keepAllCategoriesExpandedValue=!1,n.createDefaultItems(t,i),n.initDotsItem(),n}return z(t,e),t.getQuestionDefaultSettings=function(e){if(a.toolbox&&a.toolbox.defaultJSON)return a.toolbox.defaultJSON[e]},Object.defineProperty(t.prototype,"orderedQuestions",{get:function(){return this._orderedQuestions},set:function(e){this._orderedQuestions=e,this.reorderItems()},enumerable:!1,configurable:!0}),t.prototype.initDotsItem=function(){var e=this;this.dotsItem.popupModel.horizontalPosition="right",this.dotsItem.popupModel.verticalPosition="top",this.dragOrClickHelper=new r.DragOrClickHelper((function(t,o,i){var n=e.creator.getJSONForNewElement(i.json);e.dotsItem.popupModel.toggleVisibility(),e.dragDropHelper.startDragToolboxItem(t,n,i.title)})),this.hiddenItemsListModel.onPointerDown=function(t,o){e.creator.readOnly||e.dragOrClickHelper.onPointerDown(t,o)},this.dotsItem.popupModel.cssClass="svc-toolbox-popup"},t.prototype.getDefaultQuestionCategories=function(){var e=this,o={};return Object.keys(t.defaultCategories).forEach((function(i){t.defaultCategories[i].forEach((function(t){e.supportedQuestions&&-1==e.supportedQuestions.indexOf(t)||(o[t]=Q("ed."+i))}))})),o},t.prototype.onActiveCategoryChanged=function(e){for(var t=this.categories,o=0;o<t.length;o++){var i=t[o];i.collapsed=i.name!==e}},t.prototype.setLocation=function(e){"sidebar"===e?this.visibleActions.forEach((function(e){return e.mode="small"})):this.dotsItem.popupModel.horizontalPosition="right"==this.creator.toolboxLocation?"left":"right"},Object.defineProperty(t.prototype,"jsonText",{get:function(){return JSON.stringify(this.actions)},set:function(e){this.actions=e?JSON.parse(e):[],this.onItemsChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"copiedJsonText",{get:function(){return JSON.stringify(this.copiedItems)},set:function(e){var t=e?JSON.parse(e):[];this.clearCopiedItems();for(var o=0;o<t.length;o++)t[o].isCopied=!0,this.addItem(t[o])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"items",{get:function(){return this.actions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemNames",{get:function(){for(var e=[],t=0;t<this.items.length;t++)e.push(this.items[t].name);return e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"copiedItems",{get:function(){for(var e=[],t=0;t<this.actions.length;t++)this.actions[t].isCopied&&e.push(this.actions[t]);return e},enumerable:!1,configurable:!0}),t.prototype.addItems=function(e,t){void 0===t&&(t=!1),t&&this.clearItems();for(var o=0;o<e.length;o++)this.actions.push(this.getActionByItem(e[o]));this.onItemsChanged()},t.prototype.addCopiedItem=function(e,o){void 0===o&&(o=null),o||(o={});var i=o.name?o.name:e.name,n=o.title?o.title:i,r={id:i,name:i,title:n,tooltip:o.tooltip?o.tooltip:n,isCopied:!1!==o.isCopied,iconName:o.iconName?o.iconName:t.defaultIconName,json:o.json?o.json:this.getQuestionJSON(e),category:o.category?o.category:""};if(!this.replaceItem(r)){var a=this.copiedItems;this.copiedItemMaxCount>0&&a.length==this.copiedItemMaxCount&&this.removeItem(a[this.copiedItemMaxCount-1].name),this.addItem(r)}},t.prototype.getActionByItem=function(e){return e instanceof W?e:(e.iconName=e.iconName?e.iconName:t.defaultIconName,new W(e))},t.prototype.addItem=function(e,t){this.correctItem(e);var o=this.getActionByItem(e);void 0===t?this.actions.push(o):this.actions.splice(t,0,o),this.onItemsChanged()},t.prototype.correctItem=function(e){e.title||(e.title=e.name),e.tooltip||(e.tooltip=e.title)},Object.defineProperty(t.prototype,"dragDropHelper",{get:function(){return this.creator.dragDropSurveyElements},enumerable:!1,configurable:!0}),t.prototype.replaceItem=function(e){this.correctItem(e);var t=this.indexOf(e.name);if(!(t<0))return this.actions[t]=this.getActionByItem(e),this.onItemsChanged(),!0},t.prototype.removeItem=function(e){var t=this.indexOf(e);return!(t<0)&&(this.actions.splice(t,1),this.onItemsChanged(),!0)},t.prototype.clearItems=function(){this.actions=[],this.onItemsChanged()},t.prototype.clearCopiedItems=function(){for(var e=this.copiedItems,t=0;t<e.length;t++)this.removeItem(e[t].name)},t.prototype.getItemByName=function(e){var t=this.indexOf(e);return t>-1?this.actions[t]:null},Object.defineProperty(t.prototype,"allowExpandMultipleCategories",{get:function(){return this.allowExpandMultipleCategoriesValue},set:function(e){this.allowExpandMultipleCategoriesValue=e,this.updateCategoriesState()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keepAllCategoriesExpanded",{get:function(){return this.keepAllCategoriesExpandedValue||!this.showCategoryTitlesValue},set:function(e){this.keepAllCategoriesExpandedValue=e,this.canCollapseCategories=!this.keepAllCategoriesExpanded,this.updateCategoriesState()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showCategoryTitles",{get:function(){return this.showCategoryTitlesValue},set:function(e){this.showCategoryTitlesValue=e,this.updateCategoriesState()},enumerable:!1,configurable:!0}),t.prototype.updateTitles=function(){this.actions.forEach((function(e){var t=H.getString("qt."+e.name);t&&(e.title=t,e.tooltip=t)}))},t.prototype.updateCategoriesState=function(){this.allowExpandMultipleCategories||this.keepAllCategoriesExpanded?(this.activeCategory="",this.keepAllCategoriesExpandedValue&&this.expandAllCategories()):this.categories.length>0&&(this.activeCategory=this.categories[0].name)},t.prototype.changeCategory=function(e,t){this.changeCategories([{name:e,category:t}])},t.prototype.changeCategories=function(e){for(var t=0;t<e.length;t++){var o=e[t],i=this.getItemByName(o.name);i&&(i.category=o.category)}this.onItemsChanged()},t.prototype.removeCategories=function(){var e=r.ElementFactory.Instance.getAllTypes();this.changeCategories(e.map((function(e){return{name:e,category:null}}))),this.onItemsChanged()},t.prototype.toggleCategoryState=function(e){if(!this.keepAllCategoriesExpanded)if(this.allowExpandMultipleCategories){var t=this.getCategoryByName(e);t&&(t.collapsed=!t.collapsed)}else this.activeCategory=e},t.prototype.expandCategory=function(e){if(this.allowExpandMultipleCategories){var t=this.getCategoryByName(e);t&&(t.collapsed=!1)}else this.canCollapseCategories&&(this.activeCategory=e)},t.prototype.collapseCategory=function(e){if(this.allowExpandMultipleCategories){var t=this.getCategoryByName(e);t&&(t.collapsed=!0)}},t.prototype.expandAllCategories=function(){this.expandCollapseAllCategories(!1)},t.prototype.collapseAllCategories=function(){this.expandCollapseAllCategories(!0)},t.prototype.hiddenItemSelected=function(e){this.creator.clickToolboxItem(e.json)},t.prototype.expandCollapseAllCategories=function(e){for(var t=this.categories,o=0;o<t.length;o++)t[o].collapsed=e},t.prototype.getCategoryByName=function(e){for(var t=this.categories,o=0;o<t.length;o++){var i=t[o];if(i.name===e)return i}return null},t.prototype.onItemsChanged=function(){for(var e=new Array,t={},o=this.activeCategory,i=0;i<this.actions.length;i++){var n=this.actions[i],r=n.category?n.category:H.getString("ed.toolboxGeneralCategory");if(!t[r]){var a=this.createCategory();a.name=r,a.collapsed=r!==o&&!this.keepAllCategoriesExpanded,t[r]=a,e.push(a)}t[r].items.push(n)}this.categories=e,this.keepAllCategoriesExpanded||(this.allowExpandMultipleCategories?e.length>0&&(e[0].collapsed=!1):o&&t[o]?this.activeCategory=o:this.activeCategory=e.length>0?e[0].name:"");var s=[];this.categories.forEach((function(e){s=s.concat(e.items)})),this.actions=s,this.hasCategories=e.length>1,this.updateItemSeparators(),this.raiseUpdate(!1)},t.prototype.createCategory=function(){return new J(this)},t.prototype.indexOf=function(e){for(var t=0;t<this.actions.length;t++)if(this.actions[t].name==e)return t;return-1},t.prototype.updateItemSeparators=function(){(this.hasCategories?this.categories:[{items:this.actions}]).forEach((function(e,t){(e.items||[]).forEach((function(e,o){e.needSeparator=0!==t&&0==o,e.innerItem&&(e.innerItem.needSeparator=e.needSeparator)}))}))},t.prototype.reorderItems=function(){var e=this;this.actions.sort((function(t,o){var i=e._orderedQuestions.indexOf(t.name);-1===i&&(i=Number.MAX_VALUE);var n=e._orderedQuestions.indexOf(o.name);return-1===n&&(n=Number.MAX_VALUE),i-n})),this.onItemsChanged()},t.prototype.createDefaultItems=function(e,t){this.clearItems();for(var o=this.getQuestionTypes(e),i=t?this.getDefaultQuestionCategories():{},n=0;n<o.length;n++){var a=o[n],s=r.ElementFactory.Instance.createElement(a,"q1");s||(s=r.Serializer.createClass(a));var l=this.getQuestionJSON(s),u=H.getString("qt."+a),c={id:a,name:a,iconName:"icon-"+a,title:u,tooltip:u,json:l,isCopied:!1,category:i[a]||""};this.actions.push(this.getActionByItem(c))}this.registerCustomWidgets(),this.registerComponentQuestions(),this.onItemsChanged()},t.prototype.registerCustomWidgets=function(){var e=r.CustomWidgetCollection.Instance;if(e.getActivatedBy)for(var t=e.widgets,o=0;o<t.length;o++)t[o].canShowInToolbox&&this.addItemFromJSON(t[o].widgetJson)},t.prototype.registerComponentQuestions=function(){for(var e=this.getComponentItems(),t=0;t<e.length;t++)this.addItemFromJSON(e[t].json)},t.prototype.getComponentItems=function(){var e=void 0;if(e||(e=r.ComponentCollection),!e)return[];var t=e.Instance.items;return t||[]},t.prototype.addItemFromJSON=function(e){if(!1!==e.showInToolbox){var o=e.iconName?e.iconName:t.defaultIconName,i=H.getString("qt."+e.name);i&&i!=e.name||(i=e.title),i||(i=e.name);var n=e.defaultJSON?e.defaultJSON:{};n.type||(n.type=e.name);var a=e.category?e.category:"",s=new r.Action({id:e.name,name:e.name,iconName:o,title:i,tooltip:i,json:n,isCopied:!1,category:a}),l=this.getActionByItem(s),u=this.getActionById(s.id);if(u)this.actions.splice(this.actions.indexOf(u),1,l);else{var c=Array.isArray(this.supportedQuestions)?this.supportedQuestions.indexOf(s.id):-1;c>-1?this.actions.splice(c,0,l):this.actions.push(l)}}},t.prototype.getQuestionJSON=function(e){var o=(new r.JsonObject).toJsonObject(e);o.type=e.getType();var i=t.getQuestionDefaultSettings(o.type);if(i)for(var n in i)o[n]=i[n];return o},t.prototype.isHiddenCustomWidget=function(e){var t=r.CustomWidgetCollection.Instance.getCustomWidgetByName(e);return!!t&&!t.showInToolbox},t.prototype.getQuestionTypes=function(e){var o=r.ElementFactory.Instance.getAllTypes();e&&0!=e.length||(e=o);for(var i=[],n=0;n<this.orderedQuestions.length;n++){var a=this.orderedQuestions[n];e.indexOf(a)>-1&&o.indexOf(a)>-1&&i.push(a)}for(n=0;n<e.length;n++){var s=e[n];i.indexOf(s)<0&&t.hiddenTypes.indexOf(s)<0&&o.indexOf(s)>-1&&!this.isHiddenCustomWidget(s)&&i.push(s)}return i},t.prototype.dispose=function(){},t.hiddenTypes=["buttongroup","linkvalue","embeddedsurvey","spinedit","color","fileedit"],t.defaultIconName="icon-default",t.defaultCategories={toolboxChoiceCategory:["radiogroup","rating","checkbox","dropdown","tagbox","boolean","file","imagepicker","ranking"],toolboxTextCategory:["text","comment","multipletext"],toolboxContainersCategory:["panel","paneldynamic"],toolboxMatrixCategory:["matrix","matrixdropdown","matrixdynamic"],toolboxMiscCategory:["html","expression","image","signaturepad"]},U([Object(r.property)({defaultValue:!1})],t.prototype,"showCategoryTitlesValue",void 0),U([Object(r.propertyArray)()],t.prototype,"categories",void 0),U([Object(r.property)({defaultValue:"",onSet:function(e,t){t.onActiveCategoryChanged(e)}})],t.prototype,"activeCategory",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"hasCategories",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"canCollapseCategories",void 0),U([Object(r.property)({defaultValue:!1,onSet:function(e,t){t.hasCategories&&t.showCategoryTitles&&(e?(t.isResponsivenessDisabled=!1,t.raiseUpdate(!0)):(t.isResponsivenessDisabled=!0,t.setActionsMode("large")))}})],t.prototype,"isCompact",void 0),U([Object(r.property)()],t.prototype,"forceCompact",void 0),t}(r.AdaptiveActionContainer),X=function(){function e(){}return e.addConvertInfo=function(t,o){e.convertInfo[t]||(e.convertInfo[t]=[]),e.convertInfo[t].push(o)},e.getConvertToClasses=function(t,o,n){void 0===o&&(o=null),void 0===n&&(n=!1);var s=a.questionConvertMode==i.AllTypes?function(e,t){void 0===t&&(t=!1);if("panel"===e)return t?["panel","paneldynamic"]:["paneldynamic"];for(var o=r.Serializer.getChildrenClasses("question",!0),i=[],n=0;n<o.length;n++)(t||o[n].name!==e)&&i.push(o[n].name);"paneldynamic"===e&&i.push("panel");var a=r.CustomWidgetCollection.Instance.widgets;for(n=0;n<a.length;n++)(t||a[n].name!==e)&&i.push(a[n].name);return i}(t,n):e.convertInfo[t];if(!s)return[];if(Array.isArray(o)&&o.length>0){var l=[];s.forEach((function(e){return l.push(e)})),s=o.filter((function(e){return l.indexOf(e)>=0}))}return s||[]},e.convertObject=function(t,o,i){if(void 0===i&&(i=null),!t||!t.parent||o==t.getType())return null;var n=K.getQuestionDefaultSettings(o),a=r.QuestionFactory.Instance.createQuestion(o,t.name);a||(a=r.Serializer.createClass(o,{})),a instanceof r.QuestionSelectBase&&(null==n?void 0:n.choices)&&(a.choices=null),a.name=t.name;var s=a.toJSON(),l=t.toJSON();for(var u in l)s[u]=l[u];e.updateJSON(s,o,t.getType(),i),a.fromJSON(s),e.removeValidators(a);var c=t.parent,p=c.elements.indexOf(t);return c.isConverting=!0,c.removeElement(t),c.addElement(a,p),delete c.isConverting,a.onSurveyLoad(),a},e.updateJSON=function(t,o,i,n){e.updateJSONFromQuestionDefaultSettings(t,o,n),e.updateJSONForRating(t,o,n),e.updateJSONForMatrices(t,o,i),e.updateJSONForPanels(t,o,i),e.updateJSONForBarrating(t,o)},e.updateJSONFromQuestionDefaultSettings=function(e,t,o){var i=K.getQuestionDefaultSettings(t);if(i)if("image"!==t||e.imageLink||(e.imageLink=i.imageLink),"imagepicker"===t||"dropdown"===t||"checkbox"===t||"radiogroup"===t||"ranking"===t)e.choices||(e.choices=i.choices);else for(var n in i)o&&o[n]||(e[n]=i[n])},e.updateJSONForMatrices=function(e,t,o){r.Serializer.isDescendantOf(t,"matrix")&&r.Serializer.isDescendantOf(o,"matrixdropdownbase")&&e.columns&&(e.columns=e.columns.map((function(e){return e.title?{value:e.name,text:e.title}:e.name}))),r.Serializer.isDescendantOf(t,"matrixdropdownbase")&&r.Serializer.isDescendantOf(o,"matrix")&&e.columns&&(e.columns=e.columns.map((function(e){return{name:e.value||e,title:e.text}})))},e.updateJSONForRating=function(e,t,o){"rating"===t&&e.choices&&(o&&o.choices&&r.Helpers.isArraysEqual(o.choices,e.choices)||(e.rateValues=e.choices)),e.rateValues&&!r.Serializer.isDescendantOf(t,"matrixdropdownbase")&&(e.choices=e.rateValues)},e.updateJSONForBarrating=function(e,t){"barrating"===t&&(e.choices=[1,2,3,4,5])},e.updateJSONForPanels=function(e,t,o){r.Serializer.isDescendantOf(t,"paneldynamic")&&r.Serializer.isDescendantOf(o,"panel")&&e.elements&&(e.templateElements=e.elements,delete e.elements),r.Serializer.isDescendantOf(t,"panel")&&r.Serializer.isDescendantOf(o,"paneldynamic")&&e.templateElements&&(e.elements=e.templateElements,delete e.templateElements)},e.removeValidators=function(e){var t=e.validators;if(Array.isArray(t)&&0!==t.length)for(var o=e.getSupportedValidators(),i=t.length-1;i>=0;i--){var n=t[i].getType().replace("validator","");o.indexOf(n)<0&&t.splice(i,1)}},e.convertInfo={},e}();!function(){for(var e=r.Serializer.getChildrenClasses("selectbase",!0),t=0;t<e.length;t++)for(var o=0;o<e.length;o++)t!=o&&X.addConvertInfo(e[t].name,e[o].name);X.addConvertInfo("text","comment"),X.addConvertInfo("comment","text")}();var Y,$=function(e){function t(t){var o=e.call(this)||this;return o.setDesignMode(!0),o.fromJSON(t),o}return z(t,e),t}(r.SurveyModel),ee=function(e,t){this.at=e,this.text=t,this.rowAt=-1,this.columnAt=-1},te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.getErrorType=function(){return"parseerror"},t}(ee),oe=function(e){function t(t){var o=e.call(this,t.at,t.getFullDescription())||this;return o.elementStart=t.at,o.elementEnd=t.end,o.errorType=t.type,o.propertyName=t.propertyName,o}return z(t,e),t.prototype.getErrorType=function(){return this.errorType},t.prototype.correctAt=function(e){this.at<0||(this.propertyName&&"unknownproperty"===this.errorType&&(this.at=this.getCorrectAtForUnknowProperty(e)),"duplicatename"===this.errorType&&(this.at=this.getCorrectAtForDuplicateName(e)))},t.prototype.getCorrectAtForUnknowProperty=function(e){var t=this.getNewIndex(e,this.propertyName);return t>-1?t:this.at},t.prototype.getCorrectAtForDuplicateName=function(e){var t=this.getNewIndex(e,"name:");return t<0&&(t=this.getNewIndex(e,'"name":')),t>-1?t:this.at},t.prototype.getNewIndex=function(e,t){var o=e.indexOf(t,this.at);return o>-1&&(this.elementEnd<0||o<this.elementEnd)?o:-1},t}(ee),ie=function(){function e(e){this.text=e,this.text&&""!=this.text.trim()||(this.text="{}"),this.errors=[],this.process()}return Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isJsonCorrect",{get:function(){return 0===this.errors.length&&null!==this.surveyValue},enumerable:!1,configurable:!0}),e.prototype.process=function(){var e=this;try{this.jsonValue=new Z(1).parse(this.text)}catch(i){this.errors.push(new te(i.at,i.message))}if(null!=this.jsonValue){this.updateJsonPositions(this.jsonValue),this.surveyValue=new $(this.jsonValue);var t=this.surveyValue.jsonErrors;if(Array.isArray(t))for(var o=0;o<t.length;o++){var i=new oe(t[o]);i.correctAt(this.text),this.errors.push(i)}this.getDuplicatedNamesErrors().forEach((function(t){return e.errors.push(t)}))}this.setErrorsPositionByChartAt()},e.prototype.updateJsonPositions=function(e){for(var t in e.pos.self=e,e){var o=e[t];o&&o.pos&&(e.pos[t]=o.pos,this.updateJsonPositions(o))}},e.prototype.setErrorsPositionByChartAt=function(){if(0!==this.errors.length){this.errors.sort((function(e,t){return e.at>t.at?1:e.at<t.at?-1:0}));for(var e={row:0,column:0},t=0,o=0;o<this.errors.length;o++){var i=this.errors[o].at;e=this.getPostionByChartAt(e,t,i);var n=this.errors[o];i==n.at&&(n.columnAt=e.column,n.rowAt=e.row),t=i}}},e.prototype.getPostionByChartAt=function(t,o,i){for(var n={row:t.row,column:t.column},r=o;r<i;)this.text.charAt(r)==e.newLineChar?(n.row++,n.column=0):n.column++,r++;return n},e.prototype.getDuplicatedNamesErrors=function(){var e=this,t=[];return this.getDuplicatedElements().forEach((function(o){var i=new oe(e.createDuplicatedError(o));i.correctAt(e.text),i&&t.push(i)})),t},e.prototype.getDuplicatedElements=function(){var e=this,t=[],o={};return this.survey.pages.forEach((function(i){return e.checkDuplicatedElement(i,o,t)})),this.survey.getAllPanels().forEach((function(i){return e.checkDuplicatedElement(i,o,t)})),this.survey.getAllQuestions().forEach((function(i){return e.checkDuplicatedElement(i,o,t)})),t},e.prototype.checkDuplicatedElement=function(e,t,o){var i=e.name;t[i]?o.push(e):t[i]=!0},e.prototype.createDuplicatedError=function(e){var t=e.pos;if(t){var o=new r.JsonError("duplicatename","The name: '"+e.name+"' is duplicated.");return o.at=t.start,o.end=t.end,o.element=e,o}},e}(),ne=function(e){function t(t){var o=e.call(this,"duplicatename","The name: '"+t.name+"' is duplicated.")||this;return o.element=t,o}return z(t,e),t}(r.JsonError);!function(e){e[e.Unknown=0]="Unknown",e[e.Survey=1]="Survey",e[e.Page=2]="Page",e[e.Panel=3]="Panel",e[e.Question=4]="Question",e[e.Column=5]="Column"}(Y||(Y={}));var re=function(){function e(){}return e.getNewPageName=function(t){return e.getNewName(t,H.getString("ed.newPageName"))},e.isPageNameAutoGenerated=function(t){return e.isNameAutoGenerated(t,H.getString("ed.newPageName"))},e.getNewQuestionName=function(t){return e.getNewName(t,H.getString("ed.newQuestionName"))},e.getNewPanelName=function(t){return e.getNewName(t,H.getString("ed.newPanelName"))},e.generateNewName=function(e){for(var t=e.length;t>0&&e[t-1]>="0"&&e[t-1]<="9";)t--;var o=e.substring(0,t),i=0;return t<e.length&&(i=parseInt(e.substring(t))),o+ ++i},e.getNewName=function(e,t){for(var o={},i=0;i<e.length;i++)o[e[i].name]=!0;for(var n=1;o[t+n.toString()];)n++;return t+n.toString()},e.isNameAutoGenerated=function(e,t){if(!e||e.length<t.length)return!1;var o=e.substring(t.length);return r.Helpers.isNumber(o)},e.getObjectType=function(e){return e&&e.getType?"page"==e.getType()?Y.Page:"panel"==e.getType()?Y.Panel:"survey"==e.getType()?Y.Survey:"matrixdropdowncolumn"==e.getType()?Y.Column:e.name?Y.Question:Y.Unknown:Y.Unknown},e.getObjectTypeStr=function(t){var o=e.getObjectType(t);return o===Y.Survey?"survey":o===Y.Page?"page":o===Y.Panel?"panel":o===Y.Question?"question":o===Y.Column?"column":"unknown"},e.getObjectName=function(t,o){return void 0===o&&(o=!1),e.getObjectType(t)===Y.Survey?H.getString("ed.surveyTypeName"):o&&t.title?t.title:o&&t.text?t.text:t.name?t.name:""},e.getElements=function(e,t){return void 0===t&&(t=!1),e?e.getElementsInDesign?e.getElementsInDesign(t):e.elements?e.elements:[]:[]},e.isPropertyVisible=function(e,t,o,i,n,r){if(void 0===o&&(o=null),void 0===i&&(i=null),void 0===n&&(n=null),void 0===r&&(r=null),!t||!t.visible)return!1;if(i&&t.showMode&&i!==t.showMode)return!1;if(t.isVisible&&e.getLayoutType&&!t.isVisible(e.getLayoutType(),null))return!1;var a=o?function(e,t){return o.onCanShowPropertyCallback(e,t,i,n,r)}:null;return!(a&&!a(e,t))},e.scrollIntoViewIfNeeded=function(t){if(t&&t.scrollIntoView){var o=t.getBoundingClientRect(),i=e.getScrollableDiv(t);if(i){var n=i.clientHeight;if(o.top<i.offsetTop)t.scrollIntoView(!0);else{var r=n+i.offsetTop;o.bottom>r&&o.height<n&&t.scrollIntoView(!1)}}}},e.getScrollableDiv=function(e){for(;e;){if(e.id&&e.id.indexOf("scrollableDiv")>-1)return e;if(!e.offsetParent)return null;e=e.offsetParent}return null},e.moveItemInArray=function(t,o,i){if(!t||t.length<2)return!1;if(i<0||i>=t.length)return!1;var n=t.indexOf(o);if(n<0||n==i)return!1;for(var r=0;r<t.length;r++)e.disableSelectingObj(t[r]);t.splice(n,1),t.splice(i,0,o);for(r=0;r<t.length;r++)e.enableSelectingObj(t[r]);return!0},e.applyItemValueArray=function(e,t){if(t&&0!=t.length){if(e.length>t.length&&e.splice(t.length,e.length-t.length),e.length<t.length){for(var o=[],i=e.length;i<t.length;i++)o.push(t[i]);e.splice.apply(e,[e.length,0].concat(o))}for(i=0;i<e.length;i++)e[i].value!=t[i].value&&(e[i].value=t[i].value),e[i].text=t[i].hasText?t[i].text:""}else e.splice(0,e.length)},e.disableSelectingObj=function(e){e.disableSelecting=!0},e.enableSelectingObj=function(e){delete e.disableSelecting},e.canSelectObj=function(e){return!e||!0!==e.disableSelecting},e.warnNonSupported=function(t,o){var i=E(t)+" is not supported in V2.";o&&(i+=" Use the '"+o+"' property instead"),e.warnText(i)},e.warnText=function(e){console.warn(e)},e.deleteConditionProperties=function(e){delete e.visible,delete e.visibleIf,delete e.readOnly,delete e.enableIf,delete e.valueName,delete e.choicesVisibleIf,delete e.choicesEnableIf,delete e.width,delete e.minWidth,delete e.maxWidth},e.updateQuestionJson=function(t){if(t.storeOthersAsComment=!1,e.deleteConditionProperties(t),t.choices)for(var o=0;o<t.choices.length;o++)e.deleteConditionProperties(t.choices[o])},e.convertMatrixRowsToText=function(e){return e.filter((function(e){return!e.cells[0].hasError})).map((function(e){return e.cells.map((function(e){return e.value||""})).join(r.ItemValue.Separator).replace(/\|$/,"")})).join("\n")},e.convertItemValuesToText=function(e){var t="";return e.forEach((function(e){t&&(t+="\n"),t+=e.value,e.pureText&&(t+=r.ItemValue.Separator+e.pureText)})),t},e.convertTextToItemValues=function(e,t,o){var i=[];if(!e)return i;for(var n=e.split("\n"),a=0;a<n.length;a++)if(n[a]){var s=n[a].split(r.ItemValue.Separator),l=r.Serializer.createClass(o);t.forEach((function(e,t){l[e.name]=s[t]})),i.push(l)}return i},e.sortItems=function(e,t){void 0===t&&(t="text");var o=function(e,t){for(var o="";t<e.length&&e[t]>="0"&&e[t]<="9";)o+=e[t],t++;return parseFloat(o)};e.sort((function(e,i){for(var n=e[t]?e[t]:"",r=i[t]?i[t]:"",a=0;a<n.length&&a<r.length&&n[a]===r[a];)a++;if(a<n.length&&a<r.length){for(;a>0&&n[a-1]>="0"&&n[a-1]<="9";)a--;var s=o(n,a),l=o(r,a);if(s<l)return-1;if(s>l)return 1}return n.localeCompare(r)}))},e.getQuestionContextIndexInfo=function(e,t){void 0===t&&(t="");for(var o=["row","panel"],i=0;i<o.length;i++){var n=t+o[i]+".",r=e.indexOf(n);if(r>-1)return{index:r,name:n}}},e.isSupportCellEditor=function(e){for(var t=["selectbase","boolean","rating"],o=0;o<t.length;o++)if(r.Serializer.isDescendantOf(e,t[o]))return!0;return!1},e}(),ae=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.items=[],o}return z(t,e),Object.defineProperty(t.prototype,"hasPrev",{get:function(){return this.currentIndex>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasNext",{get:function(){var e=this.currentIndex;return e>-1&&e<this.items.length-1},enumerable:!1,configurable:!0}),t.prototype.hasInHistory=function(e){return this.getIndex(e)>-1},t.prototype.prev=function(){this.selectElement(this.currentIndex-1)},t.prototype.next=function(){this.selectElement(this.currentIndex+1)},t.prototype.reset=function(){this.items=[],this.creator.selectedElement&&this.onObjSelected(this.creator.selectedElement)},t.prototype.selectFromAction=function(e,t){var o=this.currentIndex;o>-1&&o<this.items.length&&(this.items[o].propertyName=t),this.creator.selectElement(e)},t.prototype.onObjSelected=function(e){if(!this.isChangingInternally){var t=this.currentIndex;t>-1&&this.items.splice(t,1),this.items.push({obj:e})}},Object.defineProperty(t.prototype,"currentIndex",{get:function(){return this.getIndex(this.creator.selectedElement)},enumerable:!1,configurable:!0}),t.prototype.getIndex=function(e){if(!e)return-1;this.updateItems();for(var t=0;t<this.items.length;t++)if(this.items[t].obj==e)return t;return-1},t.prototype.selectElement=function(e){if(!(e<0||e>=this.items.length)){this.isChangingInternally=!0;var t=this.items[e];this.creator.selectElement(t.obj,t.propertyName),this.isChangingInternally=!1}},t.prototype.updateItems=function(){for(var e=this.items.length-1;e>=0;e--){var t=this.items[e].obj;!t||!t.isDisposed&&t.inSurvey||this.items.splice(e,1)}},t}(r.Base),se={root:"spg-root-modern",container:"spg-container-modern",header:"spg-title spg-container-modern__title",body:"spg-body",bodyEmpty:"spg-body spg-body--empty",footer:"spg-footer spg-body__footer spg-clearfix",title:"",description:"",logo:"spg-logo",logoImage:"spg-logo__image",headerText:"spg-header__text",navigationButton:"",completedPage:"spg-completedpage",navigation:{complete:"spg-btn spg-footer__complete-btn",prev:"spg-btn spg-footer__prev-btn",next:"spg-btn spg-footer__next-btn",start:"spg-btn spg-footer__start-btn",preview:"spg-btn spg-footer__preview-btn",edit:"spg-btn spg-footer__edit-btn"},panel:{title:"spg-title spg-panel__title",titleExpandable:"spg-panel__title--expandable",titleOnExpand:"spg-panel__title--expanded",titleOnError:"spg-panel__title--error",description:"spg-description spg-panel__description",container:"spg-panel spg-row__panel",content:"spg-panel__content",icon:"spg-panel__icon",iconExpanded:"spg-panel__icon--expanded",footer:"spg-panel__footer",requiredText:"spg-panel__required-text"},paneldynamic:{root:"spg-paneldynamic",navigation:"spg-paneldynamic__navigation",title:"spg-title spg-question__title",button:"spg-action-button spg-action-button--text",buttonRemove:"spg-action-button--danger",buttonAdd:"spg-paneldynamic__add-btn",progressTop:"spg-paneldynamic__progress spg-paneldynamic__progress--top",progressBottom:"spg-paneldynamic__progress spg-paneldynamic__progress--bottom",buttonPrev:"spg-paneldynamic__prev-btn",buttonNext:"spg-paneldynamic__next-btn",progressContainer:"spg-paneldynamic__progress-container",progress:"spg-progress",progressBar:"spg-progress__bar",progressText:"spg-paneldynamic__progress-text",panelFooter:"spg-panel__footer",separator:"spg-paneldynamic__separator"},progress:"spg-progress spg-body__progress",progressBar:"spg-progress__bar",progressText:"spg-progress__text",progressTextInBar:"spg-hidden",page:{root:"spg-page spg-body__page",title:"spg-title spg-page__title",description:"spg-description spg-page__description"},pageTitle:"spg-title spg-page__title",pageDescription:"spg-description spg-page__description",row:"spg-row spg-clearfix",rowMultiple:"spg-row--multiple",question:{mainRoot:"spg-question spg-row__question",flowRoot:"spg-question spg-row__question spg-row__question--flow",asCell:"spg-table__cell",header:"spg-question__header",headerLeft:"spg-question__header--location--left",headerTop:"spg-question__header--location--top",headerBottom:"spg-question__header--location--bottom",content:"spg-question__content",contentLeft:"spg-question__content--left",titleLeftRoot:"spg-question--location--left",titleOnAnswer:"spg-question__title--answer",titleOnError:"spg-question__title--error",title:"spg-title spg-question__title",requiredText:"spg-question__required-text",number:"spg-question__num",description:"spg-description spg-question__description",descriptionUnderInput:"spg-description spg-question__description",comment:"spg-comment",required:"spg-question--required",titleRequired:"spg-question__title--required",indent:0,footer:"spg-question__footer",formGroup:"spg-question__form-group",hasError:"",disabled:"spg-question--disabled"},image:{root:"spg-image",image:"sv_image_image"},error:{root:"spg-question__erbox",icon:"spg-question__erbox-icon",item:"",locationTop:"spg-question__erbox--location--top",locationBottom:"spg-question__erbox--location--bottom"},checkbox:{root:"spg-selectbase",item:"spg-item spg-checkbox spg-selectbase__item",itemSelectAll:"spg-checkbox--selectall",itemNone:"spg-checkbox--none",itemDisabled:"spg-item--disabled spg-checkbox--disabled",itemChecked:"spg-checkbox--checked",itemHover:"spg-checkbox--allowhover",itemInline:"spg-selectbase__item--inline",label:"spg-selectbase__label",itemSvgIconId:"#icon-v2check",labelChecked:"",itemControl:"spg-checkbox__control",itemDecorator:"spg-checkbox__svg",controlLabel:"spg-checkbox__caption",materialDecorator:"spg-checkbox__rectangle",other:"spg-comment spg-question__other",column:"spg-selectbase__column"},radiogroup:{root:"spg-selectbase",item:"spg-item spg-radio spg-selectbase__item",itemInline:"spg-selectbase__item--inline",label:"spg-selectbase__label",labelChecked:"",itemDisabled:"spg-item--disabled spg-radio--disabled",itemChecked:"spg-radio--checked",itemHover:"spg-radio--allowhover",itemControl:"spg-visuallyhidden spg-item__control",itemDecorator:"spg-item__svg spg-radio__svg",controlLabel:"spg-item__control-label",materialDecorator:"spg-item__decorator spg-radio__decorator",other:"spg-comment spg-question__other",clearButton:"spg-btn spg-selectbase__clear-btn",column:"spg-selectbase__column"},boolean:{mainRoot:"spg-question spg-row__question spg-question--boolean",rootCheckbox:"spg-selectbase",checkboxItem:"spg-checkbox",checkboxItemChecked:"spg-checkbox--checked",checkboxitemIndeterminate:"spg-checkbox--indeterminate",checkboxItemDisabled:"spg-checkbox--disabled",svgIconId:"#icon-v2check",checkboxLabel:"spg-selectbase__label",controlCheckbox:"spg-checkbox__control",checkboxControlLabel:"spg-checkbox__caption",checkboxItemDecorator:"spg-checkbox__svg",checkboxMaterialDecorator:"spg-checkbox__rectangle"},text:{root:"spg-input spg-text",small:"spg-row__question--small",content:"spg-question__content spg-text__content",remainingCharacterCounter:"spg-remaining-character-counter",onError:"spg-input--error"},multipletext:{root:"spg-multipletext",item:"spg-multipletext__item",itemTitle:"spg-multipletext__item-title",content:"spg-multipletext__content spg-text__content",row:"spg-multipletext__row",cell:"spg-multipletext__cell"},dropdown:{root:"",popup:"",small:"spg-row__question--small sd-row__question--small",control:"spg-input spg-dropdown sd-input sd-dropdown",filterStringInput:"sd-dropdown__filter-string-input spg-dropdown__filter-string-input",other:"spg-comment spg-question__other",onError:"spg-input--error",selectWrapper:"sv-dropdown_select-wrapper spg-dropdown_select-wrapper",chevronButton:"sd-dropdown_chevron-button spg-dropdown_chevron-button",chevronButtonSvg:"sd-dropdown_chevron-button-svg",chevronButtonIconId:"icon-chevron"},imagepicker:{root:"spg-imagepicker",item:"spg-imagepicker__item",itemInline:"spg-imagepicker__item--inline",itemChecked:"spg-imagepicker__item--checked",itemDisabled:"spg-imagepicker__item--disabled",itemHover:"spg-imagepicker__item--allowhover",label:"spg-imagepicker__label",itemControl:"spg-imagepicker__control",image:"spg-imagepicker__image",itemText:"spg-imagepicker__text",clearButton:"spg-btn",other:"spg-comment spg-question__other"},matrix:{tableWrapper:"spg-matrix spg-table-wrapper",root:"spg-table",rowError:"spg-matrix__row--error",cell:"spg-table__cell spg-matrix__cell",headerCell:"spg-table__cell spg-table__cell--header",label:"spg-item spg-radio spg-matrix__label",itemValue:"spg-visuallyhidden spg-item__control spg-radio__control",itemChecked:"spg-radio--checked",itemDisabled:"spg-item--disabled spg-radio--disabled",itemHover:"spg-radio--allowhover",materialDecorator:"spg-item__decorator spg-radio__decorator",itemDecorator:"spg-item__svg spg-radio__svg",cellText:"spg-matrix__text",cellTextSelected:"spg-matrix__text--checked",cellTextDisabled:"spg-matrix__text--disabled"},matrixdropdown:{tableWrapper:"spg-table-wrapper",root:"spg-table",cell:"spg-table__cell",headerCell:"spg-table__cell spg-table__cell--header"},matrixdynamic:{tableWrapper:"spg-table-wrapper",root:"spg-table spg-matrixdynamic",content:"spg-matrixdynamic__content spg-text__content",cell:"spg-table__cell",headerCell:"spg-table__cell spg-table__cell--header",button:"spg-btn",detailRow:"spg-table__row spg-table__row--detail",detailButton:"spg-table__cell--detail-button",detailButtonExpanded:"spg-table__cell--detail-button--expanded",detailIcon:"spg-detail-panel__icon",detailIconExpanded:"spg-detail-panel__icon--expanded",detailPanelCell:"spg-table__cell--detail-panel",actionsCell:"spg-table__cell spg-table__cell--actions",buttonAdd:"spg-matrixdynamic__add-btn spg-action-button spg-action-button--large",buttonRemove:"spg-matrixdynamic__remove-btn",iconAdd:"",iconRemove:"",dragElementDecorator:"spg-drag-element__svg",iconDragElement:"#icon-drag-area-indicator",iconDrag:"spg-matrixdynamic__drag-element",footer:"",dragDropGhostPositionTop:"spg-matrixdynamic__drag-drop-ghost-position-top",dragDropGhostPositionBottom:"spg-matrixdynamic__drag-drop-ghost-position-bottom",emptyRowsSection:"spg-matrixdynamic__placeholder",emptyRowsText:"spg-matrixdynamic__placeholder-text",cellQuestionWrapper:"spg-table__question-wrapper"},rating:{root:"spg-rating",item:"spg-rating__item",selected:"spg-rating__item--selected",minText:"spg-rating__min-text",itemText:"spg-rating__item-text",maxText:"spg-rating__max-text",disabled:"spg-rating--disabled"},comment:{root:"spg-input spg-comment",content:"spg-question__content spg-comment__content",remainingCharacterCounter:"spg-remaining-character-counter",small:"spg-row__question--small",onError:"spg-input--error"},expression:"",file:{root:"spg-file",other:"spg-comment spg-question__other",placeholderInput:"spg-visuallyhidden",preview:"spg-file__preview",fileSign:"spg-hidden",fileSignBottom:"spg-file__sign",fileDecorator:"spg-file__decorator",fileInput:"spg-visuallyhidden",noFileChosen:"spg-description spg-file__no-file-chosen",chooseFile:"spg-btn spg-file__choose-btn",disabled:"spg-file__choose-btn--disabled",removeButton:"spg-hidden",removeButtonBottom:"spg-btn spg-file__clean-btn",removeFile:"spg-hidden",removeFileSvg:"spg-file__remove-svg",wrapper:"spg-file__wrapper"},signaturepad:{root:"spg-signaturepad sjs_sp_container",small:"spg-row__question--small",controls:"sjs_sp_controls",clearButton:"sjs_sp_clear"},propertygrid_bindings:{content:"spg-question__content spg-question__nopadding spg-question-group"},propertygrid_restfull:{content:"spg-question__content spg-question__nopadding"},saveData:{root:"",saving:"",error:"",success:"",saveAgainButton:""},window:{root:"sv_window",body:"sv_window_content",header:{root:"sv_window_title",title:"",button:"",buttonExpanded:"",buttonCollapsed:""}},actionBar:{root:"spg-action-bar",item:"spg-action-button",itemPressed:"spg-action-button--pressed",itemAsIcon:"spg-action-button--icon",itemIcon:"spg-action-button__icon",itemTitle:"spg-action-button__title"},spinedit:{root:"spg-input spg-spin-editor spg-input-container",control:"spg-spin-editor__input spg-input-container__input",buttonsContainer:"spg-input-container__buttons-container",arrowButton:"spg-input__edit-button",increaseButtonIcon:"icon-arrow-up",decreaseButtonIcon:"icon-arrow-down"},color:{root:"spg-input spg-color-editor spg-input-container",swatch:"spg-color-editor__color-swatch",swatchDisabled:"spg-color-editor__color-swatch--disabled",colorInput:"spg-color-editor__color-input",control:"spg-color-editor__input spg-input-container__input",colorDropdown:"spg-input__edit-button",colorDropdownIcon:"icon-drop-down-arrow",colorItem:"spg-color-editor__color-item",swatchIcon:"icon-color-picker"},fileedit:{root:"spg-input spg-input-container spg-file-edit",control:"spg-input-container__input",buttonsContainer:"spg-input-container__buttons-container",chooseButtonIcon:"icon-file",clearButtonIcon:"icon-clear",fileInput:"sd-visuallyhidden",clearButton:"spg-input__edit-button",chooseButton:"spg-input__edit-button spg-file-edit__choose-button",chooseButtonDisabled:"spg-input__edit-button--disabled"},linkvalue:{content:"spg-link"}},le={pages:[{name:"embed",elements:[{type:"dropdown",name:"framework",width:"284px",minWidth:"284px",maxWidth:"284px",titleLocation:"hidden",defaultValue:"jquery",choices:[{value:"angular",text:"Use Angular version"},{value:"jquery",text:"Use jQuery version"},{value:"knockout",text:"Use Knockout version"},{value:"react",text:"Use React version"},{value:"vue",text:"Use Vue version"}],showOptionsCaption:!1},{type:"dropdown",name:"theme",width:"284px",minWidth:"284px",maxWidth:"284px",startWithNewLine:!1,titleLocation:"hidden",defaultValue:"defaultV2",choices:[{value:"defaultV2",text:"DefaultV2 theme"},{value:"modern",text:"Modern theme"},{value:"default",text:"Default theme"},{value:"orange",text:"Orange theme"},{value:"darkblue",text:"Darkblue theme"},{value:"darkrose",text:"Darkrose theme"},{value:"stone",text:"Stone theme"},{value:"winter",text:"Winter theme"},{value:"winterstone",text:"Winter-Stone theme"},{value:"bootstrap",text:"For bootstrap framework"}],showOptionsCaption:!1},{type:"dropdown",name:"show",width:"284px",minWidth:"284px",maxWidth:"284px",startWithNewLine:!1,titleLocation:"hidden",defaultValue:"page",choices:[{value:"page",text:"Show survey on a page"},{value:"window",text:"Show survey in a window"}],showOptionsCaption:!1},{type:"expression",name:"scripts_expression",visible:!1,expression:"surveyjsEmbedScriptsMarkup({framework}, {theme})"},{type:"comment",name:"scripts",description:"Scripts and styles",readOnly:!0},{type:"expression",name:"html_expression",visible:!1,expression:"surveyjsEmbedHtmlMarkup({framework}, {show})"},{type:"comment",name:"html",visibleIf:"{framework} <> 'knockout' or {show} <> 'window'",description:"HTML",readOnly:!0,rows:1},{type:"expression",name:"javascript_expression",visible:!1,expression:"surveyjsEmbedJavascriptMarkup({framework}, {theme}, {show})"},{type:"comment",name:"javascript",description:"JavaScript",readOnly:!0,rows:14}]}],triggers:[{type:"copyvalue",expression:"{scripts_expression} notempty",setToName:"scripts",fromName:"scripts_expression"},{type:"copyvalue",expression:"{html_expression} notempty",setToName:"html",fromName:"html_expression"},{type:"copyvalue",expression:"{javascript_expression} notempty",setToName:"javascript",fromName:"javascript_expression"}],showNavigationButtons:"none"};o(4);var ue=function(e){function t(t){var o=e.call(this)||this;return r.FunctionFactory.Instance.register("surveyjsEmbedScriptsMarkup",(function(e){var t=e[0],o=e[1],i="";return i="jquery"===t?'<script src="https://unpkg.com/jquery"><\/script>':"\x3c!-- Your platform ("+t+") scripts --\x3e",i+="\n\n","bootstrap"!==o&&(i+='<link href="https://unpkg.com/survey-'+t+"@"+r.Version+"/"+(["defaultV2","modern"].indexOf(o)>-1?o:"survey")+'.css" type="text/css" rel="stylesheet"/>'),i+'\n<script src="https://unpkg.com/survey-'+t+"@"+r.Version+"/survey."+("knockout"!==t?t:"ko")+'.min.js"><\/script>'})),r.FunctionFactory.Instance.register("surveyjsEmbedHtmlMarkup",(function(e){var t=e[0],o=e[1];switch(t){case"angular":return"<ng-app></ng-app>";case"vue":return'<div id="surveyContainer"><survey'+("window"===o?"-window":"")+' :survey="survey"/></div>';default:return'<div id="surveyContainer"></div>'}})),r.FunctionFactory.Instance.register("surveyjsEmbedJavascriptMarkup",(function(e){var o=e[0],i=e[1],n=e[2],r='Survey.StylesManager.applyTheme("'+i+'");\n\n';r+="var surveyJSON = "+JSON.stringify(t.JSON)+";\n\n",r+='function sendDataToServer(survey) {\n //send Ajax request to your web server\n alert("The results are: " + JSON.stringify(survey.data));\n}\n\n';var a="window"===n?"Window":"";switch(o){case"angular":r+='@Component({\n selector: "ng-app",\n template: \'<div id="surveyElement"></div>\'\n})',r+="\nexport class AppComponent {\n ngOnInit() {\n var survey = new Survey.Model(surveyJSON);\n survey.onComplete.add(sendDataToServer);\n Survey.Survey"+a+'NG.render("surveyElement", { model: survey });\n }\n}';break;case"jquery":r+="var survey = new Survey.Model(surveyJSON);\n",r+='$("#surveyContainer").Survey'+a+"({\n model: survey,\n onComplete: sendDataToServer\n});";break;case"knockout":r+="var survey = new Survey.Survey"+a+"(surveyJSON);\n",r+="window"===n?"survey.show();\n":"",r+="survey.onComplete.add(sendDataToServer);\n",r+="window"!==n?'survey.render("surveyContainer");':"";break;case"react":r+="ReactDOM.render(<Survey.Survey"+a+' json={ surveyJSON } onComplete={ sendDataToServer } />, document.getElementById("surveyContainer"));';break;case"vue":r+='var survey = new Survey.Model(surveyJSON);\nsurvey.onComplete.add(sendDataToServer);\nnew Vue({ el: "#surveyContainer", data: { survey: survey } });'}return r})),o.survey=t.createSurvey(le,"embed"),o.survey.getCss().list={},o.survey.css=se,r.settings.readOnlyCommentRenderMode="default",o.survey.onUpdateQuestionCssClasses.add((function(e,t){"comment"===t.question.getType()&&(t.cssClasses.title="sv-question-embed__title")})),o}return z(t,e),U([Object(r.property)()],t.prototype,"survey",void 0),t}(r.Base),ce=function(){function e(e){this.creator=e,e.addPluginTab("embed",this,"ed.embedSurvey")}return e.prototype.activate=function(){this.model=new ue(this.creator)},e.prototype.deactivate=function(){return this.model=void 0,!0},e}(),pe=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.isJSONChanged=!1,o.isProcessingImmediately=!1,o.jsonEditorChangedTimeoutId=-1,o}return z(t,e),Object.defineProperty(t.prototype,"text",{get:function(){return this.getText()},set:function(e){this.setText(e)},enumerable:!1,configurable:!0}),t.prototype.onEditorActivated=function(){},t.prototype.onPluginActivate=function(){this.text=this.creator.text,this.onEditorActivated(),this.isJSONChanged=!1},t.prototype.onTextChanged=function(){if(-1!==this.jsonEditorChangedTimeoutId&&clearTimeout(this.jsonEditorChangedTimeoutId),this.isProcessingImmediately)this.jsonEditorChangedTimeoutId=-1;else{var e=this;window&&(this.jsonEditorChangedTimeoutId=window.setTimeout((function(){e.jsonEditorChangedTimeoutId=-1,e.processErrors(e.text)}),t.updateTextTimeout))}},t.prototype.processErrors=function(e){var t=new ie(e);this.setErrors(t.errors)},Object.defineProperty(t.prototype,"readOnly",{get:function(){return this.creator.readOnly},enumerable:!1,configurable:!0}),t.updateTextTimeout=1e3,t}(r.Base),de=function(){function e(e){this.creator=e}return e.prototype.activate=function(){this.model=this.createModel(this.creator)},e.prototype.deactivate=function(){if(this.model){if(!new ie(this.model.text).isJsonCorrect)return!1;!this.model.readOnly&&this.model.isJSONChanged&&(this.creator.selectedElement=void 0,this.creator.text=this.model.text,this.creator.selectedElement=this.creator.survey,this.creator.setModified({type:"JSON_EDITOR"})),this.model=void 0}return!0},e}();o(5);var he=function(e){function t(t){var o=e.call(this,t)||this;return o.aceCanUndo=!1,o.aceCanRedo=!1,o}return z(t,e),t.prototype.getText=function(){return this.aceEditor?this.aceEditor.getValue():""},t.prototype.setText=function(e){this.isProcessingImmediately=!0,this.aceEditor.setValue(e),this.aceEditor.renderer.updateFull(!0),this.aceEditor.getSession().getUndoManager().reset(),this.processErrors(e),this.isProcessingImmediately=!1},t.prototype.init=function(e){var o,i;this.aceEditor=e;var n=null===(i=null===(o=window.ace)||void 0===o?void 0:o.define)||void 0===i?void 0:i.modules;if(n&&n["ace/ext/searchbox"]||this.aceEditor.commands.removeCommand("find"),this.aceEditor.setReadOnly(this.readOnly),t.aceBasePath)try{window.ace.config.set("basePath",t.aceBasePath),this.aceEditor.session.setMode("ace/mode/json")}catch(e){}var r=this;this.aceEditor.setShowPrintMargin(!1),this.aceEditor.getSession().on("change",(function(){r.onTextChanged()})),this.aceEditor.getSession().setUseWorker(!0),ie.newLineChar=this.aceEditor.session.doc.getNewLineCharacter(),this.onPluginActivate()},t.prototype.updateUndoRedoState=function(){var e=this.aceEditor.getSession().getUndoManager();this.aceCanUndo=e.hasUndo(),this.aceCanRedo=e.hasRedo(),!0===this.aceEditor.isFocused()&&(this.isJSONChanged=!e.isClean())},t.prototype.onTextChanged=function(){this.updateUndoRedoState(),e.prototype.onTextChanged.call(this)},t.prototype.createAnnotations=function(e){for(var t=[],o=0;o<e.length;o++){var i=e[o],n={row:i.rowAt,column:i.columnAt,text:i.text,type:"error"};t.push(n)}return t},t.prototype.setErrors=function(e){this.aceEditor.getSession().setAnnotations(this.createAnnotations(e))},t.prototype.onEditorActivated=function(){this.aceEditor.getSession().getUndoManager().markClean(),this.updateUndoRedoState(),this.aceEditor.focus()},t.aceBasePath="",U([Object(r.property)()],t.prototype,"aceCanUndo",void 0),U([Object(r.property)()],t.prototype,"aceCanRedo",void 0),t}(pe),ge=function(e){function t(t){var o=e.call(this,t)||this;return t.addPluginTab("editor",o,Q("ed.jsonEditor"),"svc-tab-json-editor-ace"),o}return z(t,e),t.prototype.createModel=function(e){return new he(e)},t.hasAceEditor=function(){return void 0!==window.ace},t}(de);o(6);var me=function(e){function t(t){var o=e.call(this,t)||this;return o.ariaLabel=Q("ed.jsonEditor"),o.onPluginActivate(),o}return z(t,e),t.prototype.checkKey=function(e,t){if("Tab"===t.key){t.preventDefault();var o=t.target,i=o.selectionStart,n=o.selectionEnd;o.value=o.value.substring(0,i)+"\t"+o.value.substring(n),o.selectionStart=o.selectionEnd=i+1,t.stopPropagation()}return!0},t.prototype.getText=function(){return this._text},t.prototype.setText=function(e){this.isProcessingImmediately=!0,this._text=e,this.processErrors(e),this.isProcessingImmediately=!1},Object.defineProperty(t.prototype,"errorButtonText",{get:function(){return this.canShowErrors?Q("ed.jsonHideErrors"):Q("ed.jsonShowErrors")},enumerable:!1,configurable:!0}),t.prototype.toggleErrors=function(){this.canShowErrors=!this.canShowErrors},Object.defineProperty(t.prototype,"userFriendlyErrors",{get:function(){if(0===this._errors.length)return[];for(var e=[],t=0;t<this._errors.length-1;t++)e[t]=this._errors[t].text,e[t]+="\n\n";return e[this._errors.length-1]=this._errors[this._errors.length-1].text,e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"errors",{get:function(){return this._errors},enumerable:!1,configurable:!0}),t.prototype.onTextChanged=function(){this.isJSONChanged=!0,e.prototype.onTextChanged.call(this)},t.prototype.setErrors=function(e){this._errors=e},U([Object(r.property)({defaultValue:"",onSet:function(e,t){return t.onTextChanged()}})],t.prototype,"_text",void 0),U([Object(r.propertyArray)()],t.prototype,"_errors",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"canShowErrors",void 0),t}(pe),fe=function(e){function t(t){var o=e.call(this,t)||this;return t.addPluginTab("editor",o,Q("ed.jsonEditor"),"svc-tab-json-editor-textarea"),o}return z(t,e),t.prototype.createModel=function(e){return new me(e)},t}(de);o(7);var ye=function(e){function t(){var t=e.call(this)||this;return t.activateZoom=function(){document.addEventListener("keydown",t.listenTryToZoom),document.addEventListener("wheel",t.listenTryToZoomWithWheel,{passive:!1})},t.deactivateZoom=function(){document.removeEventListener("keydown",t.listenTryToZoom),document.removeEventListener("wheel",t.listenTryToZoomWithWheel)},t.listenTryToZoomWithWheel=function(e){return t.tryToZoomWithWheel(e,e)},t.listenTryToZoom=function(e){return t.tryToZoom(e,e)},t}return z(t,e),Object.defineProperty(t.prototype,"zoomScale",{get:function(){return this.currZoomScale},enumerable:!1,configurable:!0}),t.prototype.tryToZoomWithWheel=function(e,t){var o=t.deltaY;return(t.ctrlKey||t.metaKey)&&(o<0?this.zoomSimulator("up",t):this.zoomSimulator("down",t)),!0},t.prototype.tryToZoom=function(e,t){return(t.ctrlKey||t.metaKey)&&(107!=t.keyCode&&187!=t.keyCode||this.zoomSimulator("up",t),109!=t.keyCode&&189!=t.keyCode||this.zoomSimulator("down",t),48!=t.keyCode&&96!=t.keyCode||this.zoomSimulator("zero",t)),!0},t.prototype.changeZoomScale=function(e){var t="up"===e?1.01:"down"===e?1/1.01:1;this.currZoomScale="zero"===e?1:this.currZoomScale*t},t.prototype.zoomSimulator=function(e,t){t.preventDefault(),this.changeZoomScale(e);var o=document.getElementById("svd-simulator-wrapper");o&&(o.style.transform="scale("+this.currZoomScale+")"),t.stopPropagation()},t.prototype.resetZoomParameters=function(){this.currZoomScale=1;var e=document.getElementById("svd-simulator-wrapper");e&&(e.style.transform="")},Object.defineProperty(t.prototype,"activeDevice",{get:function(){return this.device},set:function(e){this.device=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"landscapeOrientation",{get:function(){return this.landscape},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasFrame",{get:function(){var e=be[this.activeDevice];return this.simulatorEnabled&&"desktop"!==e.deviceType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"simulatorFrame",{get:function(){if(this.hasFrame){var e=be[this.activeDevice],t=(this.landscapeOrientation?e.height:e.width)/e.cssPixelRatio,o=(this.landscapeOrientation?e.width:e.height)/e.cssPixelRatio,i=1*((this.landscapeOrientation?e.frameHeight:e.frameWidth)/e.cssPixelRatio),n=1*((this.landscapeOrientation?e.frameWidth:e.frameHeight)/e.cssPixelRatio);return{scale:(this.simulatorScaleEnabled,1),frameWidth:i,frameHeight:n,landscapedFrameWidth:this.landscapeOrientation?n:i,landscapedFrameHeight:this.landscapeOrientation?i:n,deviceWidth:t,deviceHeight:o,cssClass:e.cssClass+(this.landscapeOrientation?" svd-simulator-frame-landscape":"")}}},enumerable:!1,configurable:!0}),t.prototype.getRootCss=function(){return(new r.CssClassBuilder).append("svd-simulator-main").append("svd-simulator-main--frame",this.hasFrame).append("svd-simulator-main--desktop","desktop"===this.device).append("svd-simulator-main--running",this.isRunning).toString()},U([Object(r.property)({defaultValue:!0})],t.prototype,"landscape",void 0),U([Object(r.property)()],t.prototype,"survey",void 0),U([Object(r.property)({defaultValue:"desktop"})],t.prototype,"device",void 0),U([Object(r.property)({defaultValue:"l"})],t.prototype,"orientation",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"considerDPI",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"isRunning",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"simulatorEnabled",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"simulatorScaleEnabled",void 0),t}(r.Base),ve=96*("undefined"!=typeof window?window.devicePixelRatio:1),be={desktop:{deviceType:"desktop",title:"Desktop"},iPhone6:{cssPixelRatio:2,ppi:326,width:750,height:1334,frameWidth:960,frameHeight:1750,deviceType:"phone",title:"iPhone 6",cssClass:"svd-simulator-iphone6"},iPhone6plus:{cssPixelRatio:2.6,ppi:401,width:1080,height:1920,frameWidth:1330,frameHeight:2550,deviceType:"phone",title:"iPhone 6 Plus",cssClass:"svd-simulator-iphone6plus"},iPhone8:{cssPixelRatio:2,ppi:326,width:750,height:1334,frameWidth:990,frameHeight:1860,deviceType:"phone",title:"iPhone 8",cssClass:"svd-simulator-iphone8"},iPhone8plus:{cssPixelRatio:3,ppi:401,width:1080,height:1920,frameWidth:1330,frameHeight:2550,deviceType:"phone",title:"iPhone 8 Plus",cssClass:"svd-simulator-iphone8plus"},iPhoneX:{cssPixelRatio:3,ppi:458,width:1125,height:2436,frameWidth:1330,frameHeight:2680,deviceType:"phone",title:"iPhone X",cssClass:"svd-simulator-iphonex"},iPhoneXmax:{cssPixelRatio:3,ppi:458,width:1242,height:2688,frameWidth:1410,frameHeight:2980,deviceType:"phone",title:"iPhone X Max",cssClass:"svd-simulator-iphonexmax"},iPad:{cssPixelRatio:2,ppi:264,width:1536,height:2048,frameWidth:1837,frameHeight:2563,deviceType:"tablet",title:"iPad",cssClass:"svd-simulator-ipad"},iPadMini:{cssPixelRatio:2,ppi:326,width:1536,height:2048,frameWidth:1890,frameHeight:2600,deviceType:"tablet",title:"iPad Mini",cssClass:"svd-simulator-ipadmini"},iPadPro:{cssPixelRatio:2,ppi:264,width:1688,height:2388,frameWidth:2008,frameHeight:2980,deviceType:"tablet",title:'iPad Pro 11"',cssClass:"svd-simulator-ipadpro"},iPadPro13:{cssPixelRatio:2,ppi:264,width:2048,height:2732,frameWidth:2360,frameHeight:3300,deviceType:"tablet",title:'iPad Pro 12,9"',cssClass:"svd-simulator-ipadpro13"},androidPhone:{cssPixelRatio:2,ppi:316,width:720,height:1280,frameWidth:850,frameHeight:1630,deviceType:"phone",title:"Android Phone",cssClass:"svd-simulator-androidphone"},androidTablet:{cssPixelRatio:1.5,ppi:149,width:800,height:1280,frameWidth:1070,frameHeight:1480,deviceType:"tablet",title:"Android Tablet",cssClass:"svd-simulator-androidtablet"},win10Phone:{cssPixelRatio:2,ppi:294,width:720,height:1280,frameWidth:1152,frameHeight:2030,deviceType:"phone",title:"Windows 10 Phone",cssClass:"svd-simulator-win10phone"},msSurface:{cssPixelRatio:1,ppi:148,width:768,height:1366,frameWidth:1040,frameHeight:1620,deviceType:"tablet",title:"MS Surface",cssClass:"svd-simulator-mssurface"},genericPhone:{cssPixelRatio:1,deviceType:"phone",title:"",cssClass:"svd-simulator-genphone"}};o(8);var we=function(e){function t(t,o){void 0===o&&(o=r.defaultV2Css);var i=e.call(this)||this;return i.surveyProvider=t,i.startTheme=o,i.pages=new r.ActionContainer,i.simulator=new ye,i}return z(t,e),Object.defineProperty(t.prototype,"activeLanguage",{get:function(){return this.getPropertyValue("activeLanguage",this.survey.locale||r.surveyLocalization.defaultLocale)},set:function(e){e!==this.activeLanguage&&(this.setPropertyValue("activeLanguage",e),this.survey.locale=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.simulator.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageActions",{get:function(){return this.pages.actions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPageToolbarVisible",{get:function(){return this.pages.visibleActions.length>0&&!this.surveyProvider.isMobileView},enumerable:!1,configurable:!0}),t.prototype.updateSimulatorSurvey=function(e,t){var o=this,i=this.surveyProvider.createSurvey(e||{},"test");this.surveyProvider.showThemeTab?i.applyTheme(this.surveyProvider.theme):i.setCss(t,!1),this.simulator.survey=i,this.onSurveyCreatedCallback&&this.onSurveyCreatedCallback(this.survey);var n=this;this.survey.onComplete.add((function(e){n.isRunning=!1})),this.survey.onNavigateToUrl&&this.survey.onNavigateToUrl.add((function(e,t){var o=t.url;if(t.url="",o){var i=Q("ed.navigateToMsg")+" '"+o+"'.";this.surveyProvider?this.surveyProvider.notify(i):alert(i)}})),this.survey.onStarted.add((function(e){n.setActivePageItem(n.simulator.survey.activePage,!0)})),this.survey.onCurrentPageChanged.add((function(e,t){n.activePage=t.newCurrentPage,n.setActivePageItem(t.oldCurrentPage,!1),n.setActivePageItem(t.newCurrentPage,!0)})),this.survey.onPageVisibleChanged.add((function(e,t){n.updatePageItem(t.page)})),this.survey.onPopupVisibleChanged.add((function(e,t){t.visible?o.onScrollCallback=function(){t.popup.toggleVisibility()}:o.onScrollCallback=void 0}))},t.prototype.setJSON=function(e,t){this.json=e,null!=e&&e.cookieName&&delete e.cookieName,this.updateSimulatorSurvey(e,t)},t.prototype.initialize=function(e,t){this.setJSON(e,this.startTheme),this.updatePageList(),void 0!==t.showPagesInTestSurveyTab&&(this.showPagesInTestSurveyTab=t.showPagesInTestSurveyTab),this.buildActions()},t.prototype.updatePageItem=function(e){var t=this.getPageItemByPage(e);t&&(t.enabled=e.isVisible)},t.prototype.getCurrentPageItem=function(){return this.pageListItems[this.survey.pages.indexOf(this.survey.activePage)]},t.prototype.getSelectPageTitle=function(){return this.activePage&&this.getPageTitle(this.activePage,"preview-tab:selected-page","survey-tester-selected")||Q("ts.selectPage")},t.prototype.getPageTitle=function(e,t,o){void 0===t&&(t="preview-tab:page-list"),void 0===o&&(o="survey-tester");var i=this.surveyProvider.getObjectDisplayName(e,t,o,e.title);if(i===e.name&&0===i.indexOf("page")){var n=this.survey.pages.indexOf(e);return H.getString("ed.pageTypeName")+" "+(n+1)}return i},t.prototype.updatePageList=function(){for(var e=[],t=0;t<this.survey.pages.length;t++){var o=this.survey.pages[t];e.push({id:o.name,data:o,title:this.getPageTitle(o),enabled:o.isVisible,visible:!0})}this.pageListItems=e},t.prototype.show=function(){this.showInvisibleElements=!1,this.activePage=this.survey.activePage,this.survey.locale=this.activeLanguage,this.isRunning=!0},t.prototype.testAgain=function(){this.setJSON(this.json,this.simulator.survey.css),this.updatePageList(),this.show()},t.prototype.buildActions=function(){var e=this,t=[],o=function(t){var o=e.survey.currentPageNo,i=o+(t?1:-1);"starting"===e.survey.state&&t&&(i=0);var n=e.survey.visiblePages[i];!t&&0===o&&e.survey.firstPageIsStarted&&e.survey.pages.length>0&&(n=e.survey.pages[0]);var r=e.survey.pages.indexOf(n);e.activePage=e.survey.pages[r],e.selectPageAction.data.selectedItem=e.pageListItems[r]};this.prevPageAction&&(this.prevPageAction.visible=new r.ComputedUpdater((function(){return I(e.isRunning,"test"===e.surveyProvider.activeTab,e.pageListItems.length>1)})),this.prevPageAction.iconName=new r.ComputedUpdater((function(){return e.surveyProvider.isMobileView?"icon-arrow-left":"icon-arrow-left_16x16"})),this.prevPageAction.iconSize=new r.ComputedUpdater((function(){return e.surveyProvider.isMobileView?24:16})),this.prevPageAction.action=function(){return o(!1)},t.push(this.prevPageAction)),this.selectPageAction=Object(r.createDropdownActionModel)({id:"pageSelector",css:"svc-page-selector",title:this.getSelectPageTitle(),visible:this.isRunning&&this.pageListItems.length>1&&this.showPagesInTestSurveyTab},{items:this.pageListItems,allowSelection:!0,selectedItem:this.getCurrentPageItem(),onSelectionChanged:function(t){e.activePage=t.data},verticalPosition:"top",horizontalPosition:"center"}),t.push(this.selectPageAction),this.nextPageAction&&(this.nextPageAction.visible=new r.ComputedUpdater((function(){return I(e.isRunning,"test"===e.surveyProvider.activeTab,e.pageListItems.length>1)})),this.nextPageAction.iconName=new r.ComputedUpdater((function(){return e.surveyProvider.isMobileView?"icon-arrow-right":"icon-arrow-right_16x16"})),this.nextPageAction.iconSize=new r.ComputedUpdater((function(){return e.surveyProvider.isMobileView?24:16})),this.nextPageAction.action=function(){return o(!0)},t.push(this.nextPageAction)),this.pages.actions=t,this.pages.containerCss="sv-action-bar--pages",this.updatePrevNextPageActionState()},t.prototype.setActivePageItem=function(e,t){var o=this.getPageItemByPage(e);o&&(o.active=t)},t.prototype.getPageItemByPage=function(e){for(var t=this.pageListItems,o=0;o<t.length;o++)if(t[o].data===e)return t[o];return null},t.prototype.updateResultsTemplate=function(e){this.simulator.survey.setCss(e,!1),this.simulator.survey.render()},t.prototype.setTheme=function(e,t){var o=t.filter((function(t){return t.name===e})),i=r.defaultV2Css;o.length>0&&(i=o[0].theme),this.isRunning?this.updateSimulatorSurvey(this.json,i):this.updateResultsTemplate(i)},t.prototype.onPropertyValueChanged=function(t,o,i){e.prototype.onPropertyValueChanged.call(this,t,o,i),this.pages.hasActions&&("activePage"===t&&(this.updatePrevNextPageActionState(),this.selectPageAction.title=this.getSelectPageTitle()),"isRunning"!==t&&"pageListItems"!==t&&"showPagesInTestSurveyTab"!==t||(this.selectPageAction.popupModel.contentComponentData.model.items=this.pageListItems,this.selectPageAction.popupModel.contentComponentData.model.selectedItem=this.getCurrentPageItem(),this.selectPageAction.visible=this.isRunning&&this.pageListItems.length>1&&this.showPagesInTestSurveyTab))},t.prototype.updatePrevNextPageActionState=function(){if(this.prevPageAction&&this.survey){var e=this.survey.firstPageIsStarted&&"starting"!==this.survey.state||!this.survey.firstPageIsStarted&&!this.survey.isFirstPage;this.prevPageAction.css=e?"sv-action-bar-item--secondary":"",this.prevPageAction.enabled=e;var t=this.survey&&this.survey.visiblePages.indexOf(this.activePage)!==this.survey.visiblePages.length-1;this.nextPageAction.css=t?"sv-action-bar-item--secondary":"",this.nextPageAction.enabled=t}},t.prototype.onScroll=function(){return this.onScrollCallback&&this.onScrollCallback(),!0},U([Object(r.property)({defaultValue:!1,onSet:function(e,t){t.simulator.survey.showInvisibleElements=e}})],t.prototype,"showInvisibleElements",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"showPagesInTestSurveyTab",void 0),U([Object(r.property)({defaultValue:!0,onSet:function(e,t){t.simulator&&(t.simulator.isRunning=e)}})],t.prototype,"isRunning",void 0),U([Object(r.propertyArray)()],t.prototype,"pageListItems",void 0),U([Object(r.property)({onSet:function(e,t){if(e){var o=t.simulator.survey;o.firstPageIsStarted&&(e===o.pages[0]?o.clear(!1,!0):"starting"==o.state&&o.setPropertyValue("isStartedState",!1)),"starting"!==o.state&&(o.currentPage=e)}t.updatePrevNextPageActionState()}})],t.prototype,"activePage",void 0),t}(r.Base),Ce=function(){function e(e){this.creator=e,this.simulatorTheme=r.surveyCss[r.defaultV2ThemeName],e.addPluginTab("test",this,"ed.testSurvey"),this.setPreviewTheme(this.creator.themeForPreview),this.createActions().forEach((function(t){return e.toolbar.actions.push(t)}))}return e.prototype.getSimulatorDevicesTitle=function(){return this.model?be[this.model.simulator.device].title||Q("pe.simulator"):""},e.prototype.setDevice=function(e){this.model.simulator.device=e,this.model.simulator.resetZoomParameters();var t=be[this.model.simulator.device].deviceType;this.orientationSelectorAction.enabled="desktop"!=t,this.deviceSelectorAction.iconName="icon-device-"+t,this.deviceSelectorAction.title=Q("pe.simulator")},e.prototype.setDefaultLanguageOption=function(e){var t=this,o=!0===e||"all"===e||"auto"===e&&this.model.survey.getUsedLocales().length>1;this.languageSelectorAction.visible=o;var i=[];o&&(i=this.getLanguages("all"!==e?this.model.survey.getUsedLocales():null)),this.languageSelectorAction.popupModel.contentComponentData.model.setItems(i),this.languageSelectorAction.data.selectedItem=i.filter((function(e){return e.id===t.model.activeLanguage}))[0]},e.prototype.getLanguages=function(e){void 0===e&&(e=null);for(var t=[],o=e&&e.length>1?e:r.surveyLocalization.getLocales(),i=0;i<o.length;i++){var n=o[i];t.push({id:n,title:H.getLocaleName(n)})}return t},e.prototype.updateActions=function(){this.languageSelectorAction.title=H.getLocaleName(this.model.activeLanguage),this.languageSelectorAction.visible=!0,this.creator.showSimulatorInTestSurveyTab&&(this.setDevice(this.model.simulator.device),this.deviceSelectorAction.data.selectedItem={id:this.model.simulator.device},this.orientationSelectorAction.title=Q("pe.portraitOrientation")),this.creator.showInvisibleElementsInTestSurveyTab&&(this.invisibleToggleAction.css=this.model.showInvisibleElements?"sv-action-bar-item--active":"",this.invisibleToggleAction.visible=this.model.isRunning),null!=this.creator.showDefaultLanguageInTestSurveyTab&&this.setDefaultLanguageOption(this.creator.showDefaultLanguageInTestSurveyTab)},e.prototype.setPreviewTheme=function(e){this.simulatorTheme=r.surveyCss[e]||r.surveyCss[r.defaultV2ThemeName]},e.prototype.activate=function(){var e=this;this.model=new we(this.creator,this.simulatorTheme),this.model.onSurveyCreatedCallback=function(t){e.creator.onTestSurveyCreated&&e.creator.onTestSurveyCreated.fire(e.creator,{survey:t})},this.model.simulator.landscape="portrait"!=this.creator.previewOrientation,this.update()},e.prototype.update=function(){var e=this;if(this.model){var t={showPagesInTestSurveyTab:this.creator.showPagesInTestSurveyTab};this.model.testAgainAction=this.testAgainAction,this.model.prevPageAction=this.prevPageAction,this.model.nextPageAction=this.nextPageAction,this.model.initialize(this.creator.JSON,t),this.updateActions(),this.model.show(),this.model.onPropertyChanged.add((function(t,o){"isRunning"===o.name&&(e.invisibleToggleAction&&(e.invisibleToggleAction.visible=e.model.isRunning),e.testAgainAction.visible=!e.model.isRunning)}))}},e.prototype.deactivate=function(){return this.model&&(this.simulatorTheme=this.model.simulator.survey.css,this.model.onSurveyCreatedCallback=void 0,this.model=void 0),this.languageSelectorAction.visible=!1,this.testAgainAction.visible=!1,this.invisibleToggleAction&&(this.invisibleToggleAction.visible=!1),!0},e.prototype.getAvailableThemes=function(e){for(var t=[],o=0;o<e.length;o++){var i=e[o],n=new r.Action({id:i.name+"_themeSwitcher",locTitleName:this.getThemeLocName(i.name)});n.value=i.name,t.push(n)}return t},e.prototype.getThemeLocName=function(e){return"ed."+e+"Theme"},e.prototype.createActions=function(){var e=this,t=[];if(this.testAgainAction=new r.Action({id:"testSurveyAgain",visible:!1,locTitleName:"ed.testSurveyAgain",action:function(){e.model.testAgain()}}),this.creator.showSimulatorInTestSurveyTab){var o=Object.keys(be).filter((function(e){return!!be[e].title})).map((function(e){return{id:e,title:be[e].title}}));this.deviceSelectorAction=Object(r.createDropdownActionModel)({id:"deviceSelector",iconName:"icon-device-desktop",mode:"small",visible:new r.ComputedUpdater((function(){return I("test"===e.creator.activeTab,e.creator.showSimulatorInTestSurveyTab)}))},{items:o,allowSelection:!0,onSelectionChanged:function(t){e.setDevice(t.id)},horizontalPosition:"center",onHide:function(){e.deviceSelectorAction.enabled=!0},onShow:function(){e.deviceSelectorAction.enabled=!1}}),t.push(this.deviceSelectorAction),this.orientationSelectorAction=new r.Action({id:"orientationSelector",iconName:"icon-device-rotate",mode:"small",visible:new r.ComputedUpdater((function(){return I("test"===e.creator.activeTab,e.creator.showSimulatorInTestSurveyTab)})),action:function(){e.model.simulator.landscape=!e.model.simulator.landscape,e.orientationSelectorAction.title=Q(e.model.simulator.landscape?"pe.portraitOrientation":"pe.landscapeOrientation")}}),t.push(this.orientationSelectorAction)}this.creator.showInvisibleElementsInTestSurveyTab&&(this.invisibleToggleAction=new r.Action({id:"showInvisible",iconName:"icon-invisible-items",mode:"small",needSeparator:new r.ComputedUpdater((function(){return!e.creator.isMobileView})),locTitleName:"ts.showInvisibleElements",visible:!1,action:function(){e.model.showInvisibleElements=!e.model.showInvisibleElements,e.invisibleToggleAction.css=e.model.showInvisibleElements?"sv-action-bar-item--active":"",e.invisibleToggleAction.title=Q(e.model.showInvisibleElements?"ts.hideInvisibleElements":"ts.showInvisibleElements")}}),t.push(this.invisibleToggleAction));var i=r.StylesManager.getIncludedThemeCss(),n=["defaultV2","modern","default"];i=i.sort((function(e,t){return n.indexOf(e.name)>n.indexOf(t.name)?1:-1}));var a,s=this.getAvailableThemes(i);if(this.creator.allowChangeThemeInPreview&&s.length>1&&!this.creator.showThemeTab){this.changeThemeModel=new r.ListModel(s,(function(t){e.model&&e.model.setTheme(t.value,i),e.changeThemeAction.locTitleName=e.getThemeLocName(t.value),e.changeThemeAction.locStrsChanged(),e.changeThemePopupModel.toggleVisibility()}),!0),this.changeThemeModel.locOwner=this.creator,this.changeThemePopupModel=new r.PopupModel("sv-list",{model:this.changeThemeModel},"bottom","center");this.changeThemeAction=new r.Action({id:"themeSwitcher",iconName:"icon-theme",component:"sv-action-bar-item-dropdown",mode:"large",locTitleName:this.getThemeLocName((a=i.filter((function(t){return t.theme.root===e.simulatorTheme.root})),a.length>0?a[0].name:"defaultV2")),needSeparator:!0,visible:new r.ComputedUpdater((function(){return I(e.creator.showSimulatorInTestSurveyTab,"test"===e.creator.activeTab)})),action:function(){e.changeThemePopupModel.toggleVisibility()},popupModel:this.changeThemePopupModel}),t.push(this.changeThemeAction)}return this.languageSelectorAction=Object(r.createDropdownActionModel)({id:"languageSelector",iconName:"icon-language",visible:!1,mode:new r.ComputedUpdater((function(){return e.creator.isMobileView?"small":"large"}))},{items:[],allowSelection:!0,onSelectionChanged:function(t){e.model.activeLanguage=t.id,e.languageSelectorAction.title=H.getLocaleName(t.id)},horizontalPosition:"center",onHide:function(){e.languageSelectorAction.enabled=!0},onShow:function(){e.languageSelectorAction.enabled=!1}}),t.push(this.languageSelectorAction),this.designerAction=new r.Action({id:"svd-designer",iconName:"icon-preview",needSeparator:!0,action:function(){e.creator.makeNewViewActive("designer")},active:new r.ComputedUpdater((function(){return"test"===e.creator.activeTab})),visible:new r.ComputedUpdater((function(){return"test"===e.creator.activeTab})),locTitleName:"ed.designer",showTitle:!1}),this.prevPageAction=new r.Action({id:"prevPage",iconName:"icon-arrow-left_16x16",visible:!1}),this.nextPageAction=new r.Action({id:"nextPage",iconName:"icon-arrow-right_16x16",visible:!1}),t},e.prototype.addFooterActions=function(){this.creator.footerToolbar.actions.push(this.testAgainAction),this.invisibleToggleAction&&this.creator.footerToolbar.actions.push(this.invisibleToggleAction),this.languageSelectorAction&&this.creator.footerToolbar.actions.push(this.languageSelectorAction),this.creator.footerToolbar.actions.push(this.prevPageAction),this.creator.footerToolbar.actions.push(this.nextPageAction),this.creator.footerToolbar.actions.push(this.designerAction)},e}(),xe=function(){function e(e,t){void 0===t&&(t=null),this.survey=e,this.options=t}return e.prototype.toDisplayText=function(e){if(!this.survey)return e;this.showTitles=!!this.options&&1==this.options.showTitlesInExpressions;var t=(new r.ConditionsParser).parseExpression(e);if(!t)return e;if(t.getType)return this.toDisplayTextCore(t);if(!this.showTitles)return e;var o=[];return t.setVariables(o),this.replaceVariables(e,o)},e.prototype.toExpression=function(e){return this.toDisplayTextCore(e)},e.prototype.toDisplayTextCore=function(e){this.currentQuestion=null;var t=this,o=!0,i=function(e){var n=o;return o=!1,t.showTitles&&"variable"==e.getType()?t.getQuestionText(e):t.showTitles&&"const"==e.getType()?t.getDisplayText(e):"binary"==e.getType()?(t.proceedBinary(e),t.getDisplayBinary(e,n,i)):"unary"==e.getType()?t.getDisplayUnary(e,i):void 0};return e.toString(i)},e.prototype.getQuestionText=function(e){var t=this.getQuestionByName(e.variable);return t&&t.title?E(t.title):e.variable},e.prototype.getDisplayText=function(e){if(this.currentQuestion){var t=this.currentQuestion.getDisplayValue(!0,e.correctValue);return t?new r.Const(t).toString():void 0}},e.prototype.getDisplayOperand=function(e,t){return e?e.toString(t):""},e.prototype.getDisplayOperator=function(t){var o=e.operatorText[t];return o||H.getString("op."+t)},e.prototype.getDisplayBinary=function(e,t,o){return(t?"":"(")+this.getDisplayOperand(e.leftOperand,o)+" "+this.getDisplayOperator(e.operator)+" "+this.getDisplayOperand(e.rightOperand,o)+(t?"":")")},e.prototype.getDisplayUnary=function(e,t){var o=e.expression.toString(t),i=this.getDisplayOperator(e.operator);return"empty"==e.operator||"notempty"==e.operator?o+" "+i:i+" "+o},e.prototype.proceedBinary=function(e){e.isArithmetic||e.isConjunction?this.currentQuestion=null:(this.currentQuestion=this.getQuestionFromOperands(e.leftOperand,e.rightOperand),this.currentQuestion||(this.currentQuestion=this.getQuestionFromOperands(e.rightOperand,e.leftOperand)))},e.prototype.getQuestionFromOperands=function(e,t){if(!e||!t)return null;if("variable"!=e.getType())return null;var o=t.getType();return"const"!=o&&"function"!=o&&"array"!=o?null:this.getQuestionByName(e.variable)},e.prototype.replaceVariables=function(e,t){for(var o=0;o<t.length;o++)e=this.replaceVariable(e,t[o]);return e},e.prototype.replaceVariable=function(e,t){var o=this.getQuestionByName(t);return o&&o.title?e.replace(E(t),E(o.title)):e},e.prototype.getQuestionByName=function(e){return this.survey?this.survey.getQuestionByValueName(e):null},e.operatorText={less:"<",lessorequal:"<=",greater:">",greaterorequal:">=",equal:"==",notequal:"!=",plus:"+",minus:"-",mul:"*",div:"/",power:"^",mod:"%",negate:"!"},e}(),Te=function(){function e(){}return e.prototype.remove=function(e,t){var o=(new r.ConditionsParser).parseExpression(e);if(!o)return e;if(this.wasRemoved=!1,o.getType){var i=this.processOperand(o,t);return this.wasRemoved?i?i.toString():"":e}return e},e.prototype.processOperand=function(e,t){return e?"variable"==e.getType()?this.processVariable(e,t):"unary"==e.getType()?this.processUnary(e,t):"binary"==e.getType()?this.proceedBinary(e,t):e:null},e.prototype.processVariable=function(e,t){return e.variable!==t?e:(this.wasRemoved=!0,null)},e.prototype.processUnary=function(e,t){return this.processOperand(e.expression,t)?e:(this.wasRemoved=!0,null)},e.prototype.proceedBinary=function(e,t){var o=this.processOperand(e.leftOperand,t),i=this.processOperand(e.rightOperand,t);if(o&&i)return o!==e.leftOperand||i!==e.rightOperand?new r.BinaryOperand(e.operator,o,i,e.isArithmetic):e;if(!o&&!i)return null;var n=o||i;return"binary"==n.getType()?n:null},e}(),Se=function(){function e(e){this.constChanges=[],this.operand=(new r.ConditionsParser).parseExpression(e)}return e.prototype.update=function(e,t,o){this.updateOperand(this.operand,e.toLocaleLowerCase(),t,o)},Object.defineProperty(e.prototype,"isModified",{get:function(){return this.constChanges.length>0},enumerable:!1,configurable:!0}),e.prototype.toString=function(){var e=this,t=!0,o=function(i){var n=t;return t=!1,"const"===i.getType()?e.constToString(i):"binary"===i.getType()?e.binaryToString(i,n,o):void 0};return this.operand.toString(o)},e.prototype.constToString=function(e){for(var t=0;t<this.constChanges.length;t++)if(this.constChanges[t].op===e)return this.constChanges[t].val;return e.toString()},e.prototype.binaryToString=function(e,t,o){return(t?"":"(")+this.operandToString(e.leftOperand,o)+" "+this.operatorToString(e.operator)+" "+this.operandToString(e.rightOperand,o)+(t?"":")")},e.prototype.operandToString=function(e,t){return e?e.toString(t):""},e.prototype.operatorToString=function(t){var o=e.operatorText[t];return o||t},e.prototype.updateOperand=function(e,t,o,i){if("binary"==e.getType()){var n=e;n.isConjunction?(this.updateOperand(n.leftOperand,t,o,i),this.updateOperand(n.rightOperand,t,o,i)):this.hasVarName(n.leftOperand,t)?this.updateOperandConst(n.rightOperand,o,i):this.hasVarName(n.rightOperand,t)&&this.updateOperandConst(n.leftOperand,o,i)}},e.prototype.hasVarName=function(e,t){if(e&&"variable"===e.getType())return e.variable.toLowerCase()===t},e.prototype.updateOperandConst=function(e,t,o){var i=this;if("array"===e.getType()){var n=e;Array.isArray(n.values)&&n.values.forEach((function(e){return i.updateOperandConst(e,t,o)}))}if("const"===e.getType()){var a=e;r.Helpers.isTwoValueEquals(a.correctValue,t)&&(o=this.getCorrectNewValue(a,o),this.constChanges.push({op:e,val:o}))}},e.prototype.getCorrectNewValue=function(e,t){var o=e.toString();return!o||r.Helpers.isTwoValueEquals(e.correctValue,o)||'"'!==o[0]&&"'"!==o[0]?t:o[0]+t+o[0]},e.operatorText={less:"<",lessorequal:"<=",greater:">",greaterorequal:">=",equal:"=",notequal:"!=",plus:"+",minus:"-",mul:"*",div:"/",power:"^",mod:"%",negate:"!"},e}();function Pe(e,t,o,i){var n=new Se(e);return n.update(t,o,i),n.isModified?n.toString():e}function Ee(e){return H.getString("ed.lg."+e)}var Oe=function(){function e(e,t,o){void 0===o&&(o=null),this.logicType=e,this.survey=t,this.options=o,this.mergeWithBaseClass()}return e.expressionToDisplayText=function(e,t,o){return new xe(e,t).toDisplayText(o)},e.prototype.mergeWithBaseClass=function(){if(this.logicType.baseClass){var e=Ie.baseTypes[this.logicType.baseClass];if(e)for(var t in e)this.logicType[t]||(this.logicType[t]=e[t])}},Object.defineProperty(e.prototype,"name",{get:function(){return this.logicType.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseClass",{get:function(){return this.logicType.baseClass},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"propertyName",{get:function(){return this.logicType.propertyName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasVisibleElements",{get:function(){return!0!==this.logicType.isInvisible},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dynamicPropertyName",{get:function(){return this.logicType.dynamicPropertyName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dependedOnPropertyName",{get:function(){return this.logicType.dependedOnPropertyName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visible",{get:function(){return!!this.showInUI&&(!this.logicType.showIf||this.logicType.showIf(this.survey))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showTitlesInExpression",{get:function(){return!!this.options&&this.options.showTitlesInExpressions},enumerable:!1,configurable:!0}),e.prototype.createNewObj=function(e){var t=r.Serializer.createClass(this.baseClass);return e&&t.fromJSON(e.toJSON()),t.survey=this.survey,t.setOwner&&t.setOwner(this.survey),t},e.prototype.cloneElement=function(e){return this.isTrigger?this.createNewObj(e):e},e.prototype.areElementsEqual=function(e,t){return e===t||!(!this.isTrigger||e.getType()!==t.getType())&&r.Helpers.isTwoValueEquals(e.toJSON(),t.toJSON())},e.prototype.saveNewElement=function(e){var t=this.logicType.getCollection?this.logicType.getCollection(this.survey):null;!t&&this.isTrigger&&(t=this.survey.triggers),t&&t.indexOf(e)<0&&t.push(e)},Object.defineProperty(e.prototype,"showInUI",{get:function(){return!1!==this.logicType.showInUI},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUniqueItem",{get:function(){return!0===this.logicType.isUniqueItem},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"questionNames",{get:function(){return this.logicType.questionNames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"displayName",{get:function(){return Ee(this.name+"Name")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"description",{get:function(){return Ee(this.name+"Description")},enumerable:!1,configurable:!0}),e.prototype.getParentElement=function(e){return this.logicType.getParentElement?this.logicType.getParentElement(e):null},Object.defineProperty(e.prototype,"hasSelectorChoices",{get:function(){return!!this.logicType.getSelectorChoices},enumerable:!1,configurable:!0}),e.prototype.getSelectorChoices=function(e,t){return this.hasSelectorChoices?this.logicType.getSelectorChoices(e,t):null},e.prototype.getDisplayText=function(e){var t=Ee(this.name+"Text");if(this.logicType.getDisplayText)return this.logicType.getDisplayText(e,t,this);this.logicType.getElementName&&(e=this.getElementByName(this.logicType.getElementName(e)));var o=this.getElementDisplayName(e);if(o){var i=this.getParentElement(e),n=this.getElementDisplayName(i);return t.format(o,n)}return t},e.prototype.getElementDisplayName=function(e){if(!e)return"";var t="";return this.showTitlesInExpression&&(t=e.title),t||(t=e.name||""),E(t)},e.prototype.getElementByName=function(e){if(!this.survey)return null;var t=this.survey.getQuestionByName(e);return t||this.survey.getPageByName(e)},e.prototype.formatElName=function(e){var t=this.getElementByName(e);return this.getElementDisplayName(t)},e.prototype.formatExpression=function(t){return e.expressionToDisplayText(this.survey,this.options,t)},e.prototype.supportContext=function(e){return!!this.logicType.supportContext&&this.logicType.supportContext(e)},Object.defineProperty(e.prototype,"isTrigger",{get:function(){return!!this.baseClass&&this.baseClass.indexOf("trigger")>-1},enumerable:!1,configurable:!0}),e}();var Ie=function(){function e(){}return e.baseTypes={panel:{showIf:function(e){return e.getAllPanels().length>0},getSelectorChoices:function(e,t){return e.getAllPanels()}},question:{showIf:function(e){return e.getAllQuestions().length>0},supportContext:function(e){return Array.isArray(e.templateElements)},getParentElement:function(e){return e?e.parentQuestion:null},getSelectorChoices:function(e,t){for(var o=new Array,i=e.getAllQuestions(),n=function(e){o.push(e),e.isPanel&&e.elements.forEach((function(e){return n(e)}))},a=0;a<i.length;a++){var s=i[a];t||o.push(s),s instanceof r.QuestionPanelDynamicModel&&(!t||t===s)&&s.templateElements.forEach((function(e){return n(e)}))}return o}},matrixdropdowncolumn:{showIf:function(e){return function(e){for(var t=e.getAllQuestions(),o=0;o<t.length;o++){var i=t[o];if(i instanceof r.QuestionMatrixDropdownModelBase&&i.columns.length>0)return!0}return!1}(e)},supportContext:function(e){return Array.isArray(e.columns)},getParentElement:function(e){return e?e.colOwner:null},getSelectorChoices:function(e,t){for(var o=[],i=e.getAllQuestions(),n=0;n<i.length;n++){var a=i[n];if(a instanceof r.QuestionMatrixDropdownModelBase&&(!t||t===a))for(var s=a.columns,l=0;l<s.length;l++)o.push(s[l])}return o}}},e.types=[{name:"page_visibility",baseClass:"page",propertyName:"visibleIf",showIf:function(e){return e.pages.length>1},getSelectorChoices:function(e,t){return e.pages}},{name:"page_enable",baseClass:"page",propertyName:"enableIf",showIf:function(e){return e.pages.length>1},getSelectorChoices:function(e,t){return e.pages}},{name:"panel_visibility",baseClass:"panel",propertyName:"visibleIf"},{name:"panel_enable",baseClass:"panel",propertyName:"enableIf"},{name:"question_visibility",baseClass:"question",propertyName:"visibleIf"},{name:"question_enable",baseClass:"question",propertyName:"enableIf"},{name:"question_require",baseClass:"question",propertyName:"requiredIf"},{name:"column_visibility",baseClass:"matrixdropdowncolumn",propertyName:"visibleIf"},{name:"column_enable",baseClass:"matrixdropdowncolumn",propertyName:"enableIf"},{name:"column_require",baseClass:"matrixdropdowncolumn",propertyName:"requiredIf"},{name:"expression_expression",baseClass:"expression",propertyName:"expression",showInUI:!1},{name:"matrixdropdowncolumn_totalExpression",baseClass:"matrixdropdowncolumn",propertyName:"totalExpression",showInUI:!1},{name:"trigger_complete",baseClass:"completetrigger",propertyName:"expression",isUniqueItem:!0,isInvisible:!0},{name:"trigger_setvalue",baseClass:"setvaluetrigger",propertyName:"expression",dynamicPropertyName:"setValue",dependedOnPropertyName:"setToName",questionNames:["setToName"],getDisplayText:function(e,t,o){return r.Helpers.isValueEmpty(e.setValue)&&(t=Ee("trigger_setvalueEmptyText")),t.format(o.formatElName(e.setToName),e.setValue)}},{name:"trigger_copyvalue",baseClass:"copyvaluetrigger",propertyName:"expression",questionNames:["setToName","fromName"],getDisplayText:function(e,t,o){return t.format(o.formatElName(e.setToName),o.formatElName(e.fromName))}},{name:"trigger_skip",baseClass:"skiptrigger",propertyName:"expression",questionNames:["gotoName"],isUniqueItem:!0,getElementName:function(e){return e.gotoName}},{name:"trigger_runExpression",baseClass:"runexpressiontrigger",propertyName:"expression",questionNames:["setToName"],getDisplayText:function(e,t,o){var i=Ee("trigger_runExpressionText1");(i=i.format(o.formatExpression(e.runExpression)),e.setToName)&&(i+=Ee("trigger_runExpressionText2").format(o.formatElName(e.setToName)));return i}},{name:"completedHtmlOnCondition",baseClass:"htmlconditionitem",propertyName:"expression",isUniqueItem:!0,getCollection:function(e){return e.completedHtmlOnCondition}},{name:"trigger_runExpression_Expression",baseClass:"runexpressiontrigger",propertyName:"runExpression",showInUI:!1},{name:"question_expressionValidator",baseClass:"expressionvalidator",propertyName:"expression",showInUI:!1},{name:"matrix_rowsVisibleIf",baseClass:"matrix",propertyName:"rowsVisibleIf",showInUI:!1},{name:"matrix_columnsVisibleIf",baseClass:"matrix",propertyName:"columnsVisibleIf",showInUI:!1},{name:"matrixdropdown_rowsVisibleIf",baseClass:"matrixdropdown",propertyName:"rowsVisibleIf",showInUI:!1},{name:"select_choicesVisibleIf",baseClass:"selectbase",propertyName:"choicesVisibleIf",showInUI:!1},{name:"select_choicesEnableIf",baseClass:"selectbase",propertyName:"choicesEnableIf",showInUI:!1},{name:"itemvalue_visibleIf",baseClass:"itemvalue",propertyName:"visibleIf",showInUI:!1},{name:"itemvalue_enableIf",baseClass:"itemvalue",propertyName:"enableIf",showInUI:!1},{name:"calculatedValue",baseClass:"calculatedvalue",propertyName:"expression",showInUI:!1}],e}(),Ve=function(){function e(e,t,o){this.surveyValue=o,this.logicTypeValue=e,this.elementValue=t}return Object.defineProperty(e.prototype,"logicType",{get:function(){return this.logicTypeValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.elementValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return this.element&&this.logicType?this.logicType.getParentElement(this.element):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),e.prototype.apply=function(e,t){if(void 0===t&&(t=!1),this.element&&this.logicType&&(this.element[this.logicType.propertyName]=e,!e&&r.Serializer.isDescendantOf(this.element.getType(),"surveytrigger"))){var o=this.survey.triggers.indexOf(this.element);o>-1&&this.survey.triggers.splice(o,1)}},e.prototype.renameQuestion=function(e,t){if(this.element)for(var o=this.questionNames,i=0;i<o.length;i++){var n=this.element[o[i]];n&&n.toLowerCase()==e.toLowerCase()&&(this.element[o[i]]=t)}},e.prototype.clone=function(){var t=this.logicType.cloneElement(this.element);return new e(this.logicType,t,this.survey)},e.prototype.equals=function(e){return this.logicType===e.logicType&&this.logicType.areElementsEqual(this.element,e.element)},Object.defineProperty(e.prototype,"name",{get:function(){return this.logicType?this.logicType.displayName:""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logicTypeName",{get:function(){return this.logicType?this.logicType.name:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logicTypeDescription",{get:function(){return this.logicType?this.logicType.description:""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this.logicType?this.logicType.getDisplayText(this.element):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deleteActionText",{get:function(){return Ee("deleteAction")},enumerable:!1,configurable:!0}),e.prototype.getLocString=function(e){return H.getString(e)},e.prototype.isSuitableByQuestionName=function(e){var t=this.elementName===e||0===this.elementName.indexOf(e+".");return t||(t=this.questionNamesValues.filter((function(t){return t===e||0===t.indexOf(e+".")})).length>0),t},e.prototype.isSuitableByLogicType=function(e){return!this.logicTypeName||e===this.logicTypeName},e.prototype.addQuestionNames=function(e){var t=this.elementOwnerName;this.elementName&&-1===e.indexOf(t)&&e.push(t),this.questionNamesValues.forEach((function(t){t&&-1===e.indexOf(t)&&e.push(t)}))},Object.defineProperty(e.prototype,"questionNames",{get:function(){return this.logicType&&this.logicType.questionNames?this.logicType.questionNames:[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elementName",{get:function(){if(!this.element)return"";var e="",t=this.getOwnerElement();return t&&t!==this.element&&(e=t.name+"."),e+this.element.name||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elementOwnerName",{get:function(){var e=this.getOwnerElement();return e&&e.name||""},enumerable:!1,configurable:!0}),e.prototype.getOwnerElement=function(){if(!this.element)return null;var e=this.parentElement;return e||this.element},Object.defineProperty(e.prototype,"questionNamesValues",{get:function(){var e=this;return this.questionNames.map((function(t){return e.element[t]}))},enumerable:!1,configurable:!0}),e}(),Ne=function(){function e(t,o){void 0===o&&(o=""),this.owner=t,this.expression=o,this.idValue=++e.counter,this.isNew=!1,this.isModified=!1,this.actionsValue=[],this.removedActions=[]}return Object.defineProperty(e.prototype,"actions",{get:function(){return this.actionsValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this.idValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return"logicItem"+this.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"survey",{get:function(){return this.owner.survey},enumerable:!1,configurable:!0}),e.prototype.getVisibleLogicTypes=function(){return this.owner.getVisibleLogicTypes()},Object.defineProperty(e.prototype,"expressionText",{get:function(){var e=this.getExpressionAsDisplayText();return e||H.getString("ed.lg.itemEmptyExpressionText")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"actionsText",{get:function(){return this.actions.map((function(e){return e.text})).join(", ")},enumerable:!1,configurable:!0}),e.prototype.getDisplayText=function(){var e=this.getExpressionAsDisplayText(),t="";return this.actions.forEach((function(e){t+=", "+e.text})),e&&t?(this.ifText+" "+e+t).replace(new RegExp("({|})","gm"),"'"):H.getString("ed.lg.itemEmptyExpressionText")},e.prototype.edit=function(){this.owner&&this.owner.editItem(this)},e.prototype.remove=function(){this.owner&&this.owner.removeItem(this)},Object.defineProperty(e.prototype,"isReadOnly",{get:function(){return!!this.owner&&this.owner.readOnly},enumerable:!1,configurable:!0}),e.prototype.addNewAction=function(e){this.actions.push(e)},e.prototype.removeAction=function(e){this.replaceActionCore(null,e)},e.prototype.replaceAction=function(e,t){t?this.replaceActionCore(e,t):this.addNewAction(e)},e.prototype.clone=function(){for(var t=new e(this.owner,this.expression),o=0;o<this.actions.length;o++)t.addNewAction(this.actions[o].clone());return t},e.prototype.equals=function(e){if(this.expression!==e.expression)return!1;if(this.actions.length!==e.actions.length)return!1;for(var t=0;t<this.actions.length;t++)if(!this.actions[t].equals(e.actions[t]))return!1;return!0},e.prototype.replaceActionCore=function(e,t){this.removedActions.push(t);var o=this.actions.indexOf(t);o>-1&&(e?this.actions.splice(o,1,e):this.actions.splice(o,1))},e.prototype.apply=function(e){e?this.removeSameActions():this.removeActions();for(var t=0;t<this.removedActions.length;t++)this.removedActions[t].apply("");this.removedActions=[],this.applyExpression(e,!1)},e.prototype.renameQuestion=function(e,t){if(e&&t){this.renameQuestionInExpression(e,t,[a.logic.closeBracket,".","["]);for(var o=this.actions,i=0;i<o.length;i++)o[i].renameQuestion(e,t)}},e.prototype.renameColumn=function(e,t,o){if(this.canUpdateExpressionByQuestion(e)){this.actions[0].parentElement===e&&this.renameQuestionInExpression("row."+o,"row."+t.name,[a.logic.closeBracket]);var i=e.rows;if(Array.isArray(i)&&this.isQuestionInExpression(e))for(var n=this.getItemValueQuestionName(e)+".",s=0;s<i.length;s++)if(!r.Helpers.isValueEmpty(i[s].value)){var l=i[s].value.toString()+".";this.renameQuestionInExpression(n+l+o,n+l+t.name,[a.logic.closeBracket])}}},e.prototype.renameItemValue=function(e,t,o){if(this.canUpdateExpressionByQuestion(e)&&(!e.parentQuestion||(Array.isArray(e.parentQuestion.rows)&&this.renameDropdownColumnItemValue(e,t,o),this.actions[0].parentElement===e.parentQuestion))&&this.isQuestionInExpression(e)){var i=this.getItemValueQuestionName(e).toLocaleLowerCase(),n=e.rows,a=this.expression;if(Array.isArray(n))for(var s=0;s<n.length;s++){if(!r.Helpers.isValueEmpty(n[s].value))a=Pe(a,i+("."+n[s].value.toString()),o,t.value)}else a=Pe(a,i,o,t.value);a!=this.expression&&this.applyExpression(a,!0)}},e.prototype.renameDropdownColumnItemValue=function(e,t,o){var i=e.parentQuestion;if(this.isQuestionInExpression(i)){var n="."+e.getValueName();if(this.isStrContainsInExpression(n+a.logic.closeBracket)){for(var s=i.getValueName()+".",l=i.rows,u=this.expression,c=0;c<l.length;c++){if(!r.Helpers.isValueEmpty(l[c].value))u=Pe(u,s+l[c].value.toString()+n,o,t.value)}u!=this.expression&&this.applyExpression(u,!0)}}},e.prototype.renameRowValue=function(e,t,o){if(this.canUpdateExpressionByQuestion(e)&&this.isQuestionInExpression(e)){var i=this.getItemValueQuestionName(e);this.renameQuestionInExpression(i+"."+o.toString(),i+"."+t.value.toString(),[a.logic.closeBracket,"."])}},e.prototype.canUpdateExpressionByQuestion=function(e){return!!this.expression&&!!e.name&&this.actions.length>0},e.prototype.isQuestionInExpression=function(e){return this.isStrContainsInExpression(this.getItemValueQuestionName(e).toLocaleLowerCase())},e.prototype.isStrContainsInExpression=function(e){return!!e&&this.expression.toLocaleLowerCase().indexOf(e.toLocaleLowerCase())>-1},e.prototype.getItemValueQuestionName=function(e){var t=e.getValueName();if(e.parentQuestion){if(e.parentQuestion.isDescendantOf("paneldynamic"))return"panel."+t;if(e.parentQuestion.isDescendantOf("matrixdropdownbase"))return"row."+t}return t},e.prototype.removeQuestion=function(e){this.removeQuestionInExpression(e)},e.prototype.getQuestionNames=function(){var e=[];return this.getQuestionNamesFromExpression(e),this.getQuestionNamesFromActions(e),e},e.prototype.getActionTypes=function(){return this.actions.map((function(e){return e.logicTypeName}))},e.prototype.getContext=function(){var e=this.expression;if(!e)return null;if(!re.getQuestionContextIndexInfo(e,"{"))return null;for(var t=0;t<this.actions.length;t++){var o=this.actions[t].parentElement;if(o)return o}return null},e.prototype.getQuestionNamesFromExpression=function(e){new r.ConditionRunner(this.expression).getVariables().forEach((function(t){-1===e.indexOf(t)&&e.push(t)}))},e.prototype.getQuestionNamesFromActions=function(e){this.actions.forEach((function(t){return t.addQuestionNames(e)}))},e.prototype.getExpressionAsDisplayText=function(){return this.owner?this.owner.getExpressionAsDisplayText(this.expression):this.expression},Object.defineProperty(e.prototype,"editText",{get:function(){return H.getString("pe.edit")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deleteText",{get:function(){return H.getString("pe.delete")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ifText",{get:function(){return H.getString("pe.if")},enumerable:!1,configurable:!0}),e.prototype.isSuitable=function(e,t){return void 0===t&&(t=""),!e&&!t||(e?t?(this.isSuitableInExpression(e)||this.isSuitableByNameInActions(e))&&this.isSuitableByLogicTypeInActions(t):this.isSuitableInExpression(e)||this.isSuitableByNameInActions(e):this.isSuitableByLogicTypeInActions(t))},e.prototype.isSuitableInExpression=function(e){return-1!==this.expression.indexOf(E(e))||-1!==this.expression.indexOf("'"+e+".")},e.prototype.isSuitableByNameInActions=function(e){return this.actions.some((function(t){return t.isSuitableByQuestionName(e)}))},e.prototype.isSuitableByLogicTypeInActions=function(e){return this.actions.some((function(t){return t.isSuitableByLogicType(e)}))},e.prototype.renameQuestionInExpression=function(e,t,o){var i=this;if(this.expression&&(e=e.toLowerCase(),this.isStrContainsInExpression(e))){var n=a.logic.openBracket;e=n+e,t=n+t;var r=this.expression;o.forEach((function(o){r=i.renameQuestionInExpressionCore(r,r.toLocaleLowerCase(),e+o,t+o)})),r!=this.expression&&this.applyExpression(r,!0)}},e.prototype.renameQuestionInExpressionCore=function(e,t,o,i){for(var n=t.lastIndexOf(o,t.length);n>-1;)e=e.substring(0,n)+i+e.substring(n+o.length),n=(t=t.substring(0,n)).lastIndexOf(o,n);return e},e.prototype.removeQuestionInExpression=function(e){if(this.expression){var t=(new Te).remove(this.expression,e);t!=this.expression&&this.applyExpression(t,!0)}},e.prototype.applyExpression=function(e,t){this.expression=e;for(var o=this.actions,i=0;i<o.length;i++)o[i].apply(e,t)},e.prototype.removeActions=function(){for(var e=this.actions,t=e.length-1;t>=0;t--)this.removeAction(e[t])},e.prototype.removeSameActions=function(){for(var e=this.actions,t=e.length-1;t>=0;t--)for(var o=t-1;o>=0;o--)if(e[t].equals(e[o])){this.removeAction(e[t]);break}},e.counter=0,e}();function Ae(e){e.popupModel.isFocusedContent=!0,e.popupModel.setWidthByTarget=!1,e.dropdownListModel.listModel.searchEnabled=e.searchEnabled}o(9);var _e=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t}(r.EventBase),je=function(e){function t(t,o){void 0===o&&(o=null);var i=e.call(this)||this;return i.survey=t,i.options=o,i.invisibleItems=[],i.onLogicItemSaved=new _e,i.onLogicItemValidation=new _e,i.onLogicItemRemoving=new _e,i.onLogicItemRemoved=new _e,i.options||(i.options=new s),i.readOnly=i.optionsReadOnly,i.update(),i}return z(t,e),Object.defineProperty(t,"visibleActions",{get:function(){return a.logic.visibleActions},set:function(e){a.logic.visibleActions=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"types",{get:function(){return Ie.types},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.onEndEditing(),this.survey=void 0},Object.defineProperty(t.prototype,"editableItem",{get:function(){return this.editableItemValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mode",{get:function(){return this.modeValue},set:function(e){if(this.modeValue!==e){var t=this.mode;this.modeValue=e,this.errorText="","view"!=e||"edit"!=t&&"new"!=t||this.onEndEditing()}},enumerable:!1,configurable:!0}),t.prototype.getLocString=function(e){return H.getString(e)},t.prototype.getTypeByName=function(e){for(var t=0;t<this.logicTypes.length;t++)if(this.logicTypes[t].name==e)return this.logicTypes[t];return null},t.prototype.update=function(e,t){void 0===e&&(e=null),void 0===t&&(t=null),e&&(this.survey=e),t&&(this.options=t),this.logicTypes=this.createLogicTypes(),this.updateVisibleItems(),this.invisibleItems=this.buildItems(!1),this.readOnly=this.optionsReadOnly,this.mode="view"},t.prototype.updateVisibleItems=function(){this.items=this.buildItems(!0),this.editableItemValue=null},Object.defineProperty(t.prototype,"optionsReadOnly",{get:function(){return!!this.options&&this.options.readOnly},enumerable:!1,configurable:!0}),t.prototype.saveEditableItem=function(){if(!this.editableItem||this.hasError())return!1;this.options&&this.options.startUndoRedoTransaction(),this.onEditableItemApply();var e=this.items.indexOf(this.editableItem)<0;e&&this.items.push(this.editableItem);var t=!e||this.editableItem.isNew;return this.editableItem.isNew=!1,this.onItemChanged(this.editableItem,t?"new":"modify"),this.options&&this.options.stopUndoRedoTransaction(),this.onLogicItemSaved.fire(this,{item:this.editableItem}),!0},t.prototype.saveEditableItemAndBack=function(){var e=this.saveEditableItem();return e&&(this.mode="view"),e},t.prototype.onEditableItemApply=function(){},t.prototype.onItemChanged=function(e,t){this.onChangedCallback&&this.onChangedCallback(e,t)},t.prototype.renameQuestion=function(e,t){this.items.forEach((function(o){return o.renameQuestion(e,t)})),this.invisibleItems.forEach((function(o){return o.renameQuestion(e,t)}))},t.prototype.renameItemValue=function(e,t){var o=this.getItemValueQuestion(e,t);o&&(this.items.forEach((function(i){return i.renameItemValue(o,e,t)})),this.invisibleItems.forEach((function(i){return i.renameItemValue(o,e,t)})))},t.prototype.renameRowValue=function(e,t){var o=this.getItemValueQuestion(e,t);o&&(this.items.forEach((function(i){return i.renameRowValue(o,e,t)})),this.invisibleItems.forEach((function(i){return i.renameRowValue(o,e,t)})))},t.prototype.renameColumn=function(e,t){var o=e.colOwner;o&&o.isQuestion&&(this.items.forEach((function(i){return i.renameColumn(o,e,t)})),this.invisibleItems.forEach((function(i){return i.renameColumn(o,e,t)})))},t.prototype.getItemValueQuestion=function(e,t){if(!e.locOwner||r.Helpers.isValueEmpty(t)||r.Helpers.isValueEmpty(e.value))return null;var o=e.locOwner;return o.isQuestion?o:null},t.prototype.removeQuestion=function(e){this.removeQuestionCore(e,this.items),this.removeQuestionCore(e,this.invisibleItems)},t.prototype.hasError=function(){if(!this.editableItem)return!1;if(this.hasErrorInUI())return!0;var e=new r.ExpressionRunner(this.getExpressionText()),t={item:this.editableItem,error:"",usedNamesInExpression:e.getVariables(),actions:this.getEditingActions()};this.onLogicItemValidation.fire(this,t),this.errorText=t.error;var o=this.survey.creator;return this.errorText&&o&&o.notify(this.errorText,"error"),!!this.errorText},t.prototype.getUsedQuestions=function(){var e=this,t={};this.items.forEach((function(o){o.getQuestionNames().forEach((function(o){var i=e.survey.getQuestionByName(o);i&&!t[o]&&(t[o]=i)}))}));var o=[];return Object.keys(t).forEach((function(e){t[e]&&o.push(t[e])})),o},t.prototype.getUsedActionTypes=function(){var e=this,t={};this.items.forEach((function(o){o.getActionTypes().forEach((function(o){t[o]||(t[o]=e.logicTypes.filter((function(e){return e.name==o}))[0])}))}));var o=[];return Object.keys(t).forEach((function(e){t[e]&&o.push(t[e])})),o},t.prototype.hasErrorInUI=function(){return!1},t.prototype.getExpressionText=function(){return""},t.prototype.getEditingActions=function(){return[]},t.prototype.onReadOnlyChanged=function(){},t.prototype.removeQuestionCore=function(e,t){for(var o=0;o<t.length;o++)t[o].removeQuestion(e)},t.prototype.addNew=function(){this.options&&this.options.startUndoRedoTransaction();var e=new Ne(this);e.isNew=!0,this.items.push(e),this.editItemCore(e),this.options&&this.options.stopUndoRedoTransaction()},t.prototype.editItem=function(e){this.options&&this.options.startUndoRedoTransaction(),this.editItemCore(e),this.options&&this.options.stopUndoRedoTransaction()},t.prototype.editItemCore=function(e){this.editableItemValue=e,this.onStartEditing(),this.mode=e.isNew?"new":"edit"},t.prototype.onStartEditing=function(){},t.prototype.onEndEditing=function(){this.editableItemValue=null},t.prototype.canRemoveItem=function(e){var t={item:e,allowRemove:!0};return this.onLogicItemRemoving.fire(this,t),t.allowRemove},t.prototype.removeItem=function(e,t){if(void 0===t&&(t=!0),!t||this.canRemoveItem(e)){this.options&&this.options.startUndoRedoTransaction(),e.apply("");var o=this.items.indexOf(e);o>-1&&this.items.splice(o,1),this.onItemChanged(e,"delete"),this.options&&this.options.stopUndoRedoTransaction(),this.onLogicItemRemoved.fire(this,{item:e})}},t.prototype.addAction=function(e,t){void 0===t&&(t=null);var o=this.createNewAction(e,t);return this.editableItem.addNewAction(o),o},t.prototype.addNewAction=function(){return this.addAction(null,null)},t.prototype.createNewAction=function(e,t){return new Ve(e,t,this.survey)},t.prototype.getVisibleLogicTypes=function(){for(var e=[],t=this.logicTypes,o=0;o<t.length;o++)t[o].visible&&e.push(t[o]);return e},t.prototype.removeAction=function(e){this.editableItem&&(this.editableItem.removeAction(e),0==this.editableItem.actions.length&&this.addNewAction())},t.prototype.getExpressionAsDisplayText=function(e){return Oe.expressionToDisplayText(this.survey,this.options,e)},t.prototype.buildItems=function(e){for(var t=[],o={},i=this.getAllElements(),n=0;n<i.length;n++)this.buildItemsByElement(i[n],t,o,e);return t},t.prototype.getAllElements=function(){var e=[];return this.AddElements(this.survey.pages,e),this.AddElements(Ie.baseTypes.question.getSelectorChoices(this.survey,null),e),this.AddElements(this.survey.getAllPanels(),e),this.AddElements(this.survey.triggers,e),this.AddElements(this.survey.completedHtmlOnCondition,e),this.AddElements(this.survey.calculatedValues,e),this.AddElements(Ie.baseTypes.matrixdropdowncolumn.getSelectorChoices(this.survey,null),e),this.AddElements(this.getValidators(),e),this.AddElements(this.getItemValues(),e),e},t.prototype.getValidators=function(){for(var e=[],t=this.survey.getAllQuestions(),o=0;o<t.length;o++)this.AddElements(t[o].validators,e);return e},t.prototype.getItemValues=function(){for(var e=[],t=this.survey.getAllQuestions(),o=0;o<t.length;o++){var i=t[o],n=i.choices;if(n){var a=r.Serializer.findProperty(i.getType(),"choices");a&&"itemvalue[]"===a.type&&this.AddElements(n,e)}}return e},t.prototype.AddElements=function(e,t){for(var o=0;o<e.length;o++)t.push(e[o])},t.prototype.buildItemsByElement=function(e,t,o,i){for(var n=this.getElementAllTypes(e),a=0;a<this.logicTypes.length;a++){var s=this.logicTypes[a];if(s.showInUI===i){var l=e[s.propertyName];if(n.indexOf(s.baseClass)>-1&&!r.Helpers.isValueEmpty(l)){var u=this.getLogicItemHashKey(l,e),c=o[u];c||(c=new Ne(this,l),o[u]=c,t.push(c));var p=this.createNewAction(s,e);c.addNewAction(p)}}}},t.prototype.getLogicItemHashKey=function(e,t){var o=this.getParentQuestion(t);return(o?"@"+o.name:"")+e.replace(" ","").toLowerCase()},t.prototype.getParentQuestion=function(e){var t=e.parentQuestion;return t||(e.isDescendantOf("matrixdropdowncolumn")?e.colOwner:null)},t.prototype.getElementAllTypes=function(e){var t=[],o=e.getType();for(t.push(o);o&&"base"!=o;){var i=r.Serializer.findClass(o);if(!i)break;(o=i.parentName)&&t.push(o)}return t},t.prototype.createLogicTypes=function(){for(var e=[],o=t.visibleActions,i=0;i<t.types.length;i++)o.length>0&&o.indexOf(t.types[i].name)<0||e.push(new Oe(t.types[i],this.survey,this.options));return e},U([Object(r.propertyArray)()],t.prototype,"items",void 0),U([Object(r.propertyArray)()],t.prototype,"logicTypes",void 0),U([Object(r.property)()],t.prototype,"errorText",void 0),U([Object(r.property)({onSet:function(e,t){t.onReadOnlyChanged()}})],t.prototype,"readOnly",void 0),U([Object(r.property)()],t.prototype,"placeholderHtml",void 0),t}(r.Base),Le=o(1),ke=function(){function e(e){this.objValue=e,this.editableObjValue=this.createEditableObj()}return e.isCopyObject=function(e){return!!e&&e.isCopy},e.getSurvey=function(t){if(t instanceof r.SurveyModel||t&&t.getType&&"survey"==t.getType())return e.getOriginalSurvey(t);if(t instanceof r.MatrixDropdownColumn&&t.colOwner)return t.colOwner.survey;if(t){if(t.survey)return e.getOriginalSurvey(t.survey);if(t.owner)return e.getSurvey(t.owner);if(t.errorOwner)return e.getSurvey(t.errorOwner);if(t.locOwner)return e.getSurvey(t.locOwner)}var o=e.getOriginalObject(t);return o&&o!==t?e.getSurvey(o):null},e.getOriginalObject=function(e){return e&&e.originalObj?e.originalObj:e},e.getOriginalSurvey=function(t){return e.getOriginalObject(t)},Object.defineProperty(e.prototype,"obj",{get:function(){return this.objValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"editableObj",{get:function(){return this.editableObjValue},enumerable:!1,configurable:!0}),e.prototype.isPropertyChanged=function(e){return"pages"!=e&&!r.Helpers.isTwoValueEquals(this.obj[e],this.editableObj[e])},e.prototype.apply=function(e){this.isPropertyChanged(e)&&(this.obj[e]=this.editableObj[e])},e.prototype.reset=function(){this.assignProperties(this.editableObj)},e.prototype.applyAll=function(e){void 0===e&&(e=[]);for(var t=this.getProperties(e),o=0;o<t.length;o++)this.apply(t[o])},e.prototype.getProperties=function(e){var t=[],o=this.getObjJson(this.editableObj),i=this.getObjJson(this.obj);for(var n in o)e.indexOf(n)>-1||t.push(n);for(var n in i)e.indexOf(n)>-1||t.indexOf(n)>-1||t.push(n);return t},e.prototype.createEditableObj=function(){var e=this.obj.getType(),t=r.Serializer.createClass(e);return null==t&&"survey"==e&&(t=new r.SurveyModel),this.assignProperties(t),"matrixdropdowncolumn"==e&&(t.colOwner=this.obj.colOwner),"survey"!=e&&(t.setSurveyImpl?t.setSurveyImpl(this.obj.survey):this.obj.survey&&!t.survey&&(t.survey=this.obj.survey)),this.obj.parent&&(t.parent=this.obj.parent),t.isCopy=!0,t.originalObj=this.obj,t},e.prototype.assignProperties=function(e){(new r.JsonObject).toObject(this.getObjJson(),e)},e.prototype.getObjJson=function(e){void 0===e&&(e=null),e||(e=this.obj);var t=new r.JsonObject;return t.lightSerializing=!0,t.toJsonObject(e)},e}(),Me=function(){function e(){}return e.definition={question:{properties:["name","title","description","visible","isRequired","readOnly","showCommentArea","commentText","commentPlaceholder",{name:"visibleIf",tab:"logic"},{name:"enableIf",tab:"logic"},{name:"requiredIf",tab:"logic"},{name:"bindings",tab:"logic"},{name:"defaultValueExpression",tab:"logic"},{name:"page",tab:"layout"},{name:"startWithNewLine",tab:"layout"},{name:"hideNumber",tab:"layout"},{name:"state",tab:"layout"},{name:"titleLocation",tab:"layout"},{name:"descriptionLocation",tab:"layout"},{name:"indent",tab:"layout"},{name:"width",tab:"layout"},{name:"minWidth",tab:"layout"},{name:"maxWidth",tab:"layout"},{name:"valueName",tab:"data"},{name:"defaultValue",tab:"data"},{name:"correctAnswer",tab:"data"},{name:"useDisplayValuesInDynamicTexts",tab:"data"},{name:"clearIfInvisible",tab:"data"},{name:"requiredErrorText",tab:"validation"},{name:"validators",tab:"validation"}],tabs:[{name:"logic",index:100},{name:"layout",index:200},{name:"data",index:300},{name:"validation",index:400}]},comment:{properties:[{name:"rows",tab:"layout"},{name:"cols",tab:"layout"},"placeholder",{name:"maxLength",tab:"validation"},{name:"textUpdateMode",tab:"data"},{name:"autoGrow",tab:"layout"},{name:"allowResize",tab:"layout"}]},file:{properties:["allowMultiple","allowImagesPreview","acceptedTypes",{name:"showPreview"},{name:"storeDataAsText"},"maxSize","imageHeight","imageWidth","waitForUpload","needConfirmRemoveFile"]},html:{properties:["html"]},matrixdropdownbase:{properties:["cellType","optionsCaption","detailPanelMode","detailPanelShowOnAdding",{name:"showHeader",tab:"layout"},{name:"showColumnHeader",tab:"layout"},{name:"verticalAlign",tab:"layout"},{name:"alternateRows",tab:"layout"},{name:"columnsVisibleIf",tab:"logic"},{name:"columnLayout",tab:"layout"},{name:"horizontalScroll",tab:"layout"},{name:"columnColCount",tab:"layout"},{name:"columnMinWidth",tab:"layout"}],tabs:[{name:"columns",index:10},{name:"rows",index:11},{name:"choices",index:12}]},matrixdynamic:{properties:["allowAddRows","allowRemoveRows","allowRowsDragAndDrop","rowCount","minRowCount","maxRowCount","addRowLocation","addRowText","removeRowText","confirmDelete","confirmDeleteText","placeholder",{name:"hideColumnsIfEmpty",tab:"columns"},{name:"emptyRowsText",tab:"columns"},{name:"defaultRowValue",tab:"data"},{name:"defaultValueFromLastRow",tab:"data"},{name:"keyName",tab:"validation"},{name:"keyDuplicationError",tab:"validation"}]},matrixdropdown:{properties:["totalText","placeholder",{name:"hideIfRowsEmpty",tab:"rows"},{name:"rowsVisibleIf",tab:"logic"},{name:"rowTitleWidth",tab:"layout"},{name:"keyDuplicationError",tab:"validation"}]},matrix:{properties:[{name:"isAllRowRequired",tab:"validation"},{name:"showHeader",tab:"layout"},{name:"showColumnHeader",tab:"layout"},{name:"verticalAlign",tab:"layout"},{name:"alternateRows",tab:"layout"},{name:"rowsOrder",tab:"rows"},{name:"hideIfRowsEmpty",tab:"rows"},{name:"columnsVisibleIf",tab:"logic"},{name:"rowsVisibleIf",tab:"logic"},{name:"columnMinWidth",tab:"layout"},{name:"rowTitleWidth",tab:"layout"}],tabs:[{name:"columns",index:10},{name:"rows",index:11},{name:"cells",index:500}]},multipletext:{properties:[{name:"colCount",tab:"layout"},{name:"itemSize",tab:"layout"}],tabs:[{name:"items",index:10}]},rating:{properties:[{name:"displayMode",tab:"layout"},{name:"rateCount",tab:"rateValues"},{name:"rateMin",tab:"rateValues"},{name:"rateMax",tab:"rateValues"},{name:"rateStep",tab:"rateValues"},{name:"minRateDescription",tab:"rateValues"},{name:"maxRateDescription",tab:"rateValues"},{name:"displayRateDescriptionsAsExtremeItems",tab:"rateValues"}],tabs:[{name:"rateValues",index:10}]},selectbase:{properties:[{name:"choicesFromQuestion",tab:"choices"},{name:"choicesFromQuestionMode",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"colCount",tab:"layout"},{name:"showOtherItem",tab:"choices"},{name:"otherText",tab:"choices"},{name:"otherPlaceholder",tab:"choices"},{name:"showNoneItem",tab:"choices"},{name:"noneText",tab:"choices"},{name:"hideIfChoicesEmpty",tab:"logic"},{name:"choicesVisibleIf",tab:"logic"},{name:"choicesEnableIf",tab:"logic"},{name:"otherErrorText",tab:"validation"},{name:"separateSpecialChoices",tab:"choices"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},checkbox:{properties:[{name:"showSelectAllItem",tab:"choices"},{name:"selectAllText",tab:"choices"},{name:"maxSelectedChoices",tab:"choices"},{name:"separateSpecialChoices",tab:"choices"}]},radiogroup:{properties:[{name:"showClearButton",tab:"choices"},{name:"separateSpecialChoices",tab:"choices"}]},dropdown:{properties:["placeholder","autocomplete",{name:"choicesMin",tab:"choices"},{name:"choicesMax",tab:"choices"},{name:"choicesStep",tab:"choices"},{name:"allowClear",tab:"choices"}]},tagbox:{properties:["closeOnSelect","placeholder",{name:"searchEnabled",tab:"choices"},{name:"hideSelectedItems",tab:"choices"},{name:"allowClear",tab:"choices"}]},imagepicker:{properties:["contentMode","imageFit","isResponsive","minImageWidth","maxImageWidth","minImageHeight","maxImageHeight",{name:"imageHeight",placeholder:"auto"},{name:"imageWidth",placeholder:"auto"},"multiSelect","showLabel"]},image:{properties:["imageLink","contentMode","imageFit",{name:"imageHeight",placeholder:"auto"},{name:"imageWidth",placeholder:"auto"},"text"]},"itemvalue[]@choices":{properties:[{name:"visibleIf"},{name:"enableIf"}],tabs:[{name:"general"}]},"itemvalue[]@rows":{properties:[{name:"visibleIf"},{name:"enableIf"}],tabs:[{name:"general"}]},"itemvalue[]@columns":{properties:[{name:"visibleIf"},{name:"enableIf"}],tabs:[{name:"general"}]},text:{properties:["inputType","min","max","step","placeholder","autocomplete","dataList",{name:"minValueExpression",tab:"logic"},{name:"maxValueExpression",tab:"logic"},{name:"size",tab:"layout"},{name:"maxLength",tab:"validation"},{name:"minErrorText",tab:"validation"},{name:"maxErrorText",tab:"validation"},{name:"textUpdateMode",tab:"data"}]},boolean:{properties:["label","labelTrue","labelFalse","showTitle",{name:"valueTrue",tab:"data"},{name:"valueFalse",tab:"data"}]},expression:{properties:["expression","currency","displayStyle","format","maximumFractionDigits","minimumFractionDigits","useGrouping"]},matrixdropdowncolumn:{properties:["name","title"]},"matrixdropdowncolumn@default":{properties:["cellType","name","title","isRequired","readOnly","isUnique","showInMultipleColumns","width","minWidth",{name:"visibleIf",tab:"logic"},{name:"enableIf",tab:"logic"},{name:"requiredIf",tab:"logic"},{name:"defaultValueExpression",tab:"logic"},{name:"totalType",tab:"totals"},{name:"totalDisplayStyle",tab:"totals"},{name:"totalCurrency",tab:"totals"},{name:"totalFormat",tab:"totals"},{name:"totalExpression",tab:"totals"}],tabs:[{name:"general",index:5},{name:"logic",index:20},{name:"totals",index:40}]},"matrixdropdowncolumn@checkbox":{properties:[{name:"showOtherItem",tab:"choices"},{name:"otherText",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"colCount",tab:"choices"},{name:"showSelectAllItem",tab:"choices"},{name:"showNoneItem",tab:"choices"},{name:"noneText",tab:"choices"},{name:"maxSelectedChoices",tab:"choices"},{name:"selectAllText",tab:"choices"},{name:"choicesVisibleIf",tab:"logic"},{name:"choicesEnableIf",tab:"logic"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},"matrixdropdowncolumn@radiogroup":{properties:[{name:"showOtherItem",tab:"choices"},{name:"otherText",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"colCount",tab:"choices"},{name:"showNoneItem",tab:"choices"},{name:"noneText",tab:"choices"},{name:"choicesVisibleIf",tab:"logic"},{name:"choicesEnableIf",tab:"logic"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},"matrixdropdowncolumn@dropdown":{properties:[{name:"showOtherItem",tab:"choices"},{name:"otherText",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"optionsCaption",tab:"choices"},{name:"showNoneItem",tab:"choices"},{name:"noneText",tab:"choices"},{name:"choicesVisibleIf",tab:"logic"},{name:"choicesEnableIf",tab:"logic"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},"matrixdropdowncolumn@text":{properties:["inputType","min","max","step","placeholder","dataList","maxLength"],tabs:[{name:"validators",index:10}]},"matrixdropdowncolumn@comment":{properties:["rows","placeholder","maxLength"],tabs:[{name:"validators",index:10}]},"matrixdropdowncolumn@boolean":{properties:["defaultValue","labelTrue","labelFalse","valueTrue","valueFalse"]},"matrixdropdowncolumn@expression":{properties:["displayStyle","currency"],tabs:[{name:"expression",index:10}]},"matrixdropdowncolumn@rating":{properties:["rateValues",{name:"rateType",tab:"rateValues"},{name:"rateCount",tab:"rateValues"},{name:"rateColorMode",tab:"rateValues"},{name:"scaleColorMode",tab:"rateValues"},{name:"autoGenerate",tab:"rateValues"},{name:"rateMin",tab:"rateValues"},{name:"rateMax",tab:"rateValues"},{name:"rateStep",tab:"rateValues"},{name:"minRateDescription",tab:"rateValues"},{name:"maxRateDescription",tab:"rateValues"},{name:"displayRateDescriptionsAsExtremeItems",tab:"rateValues"}],tabs:[{name:"rateValues",index:5}]},multipletextitem:{properties:["inputType","name","title","isRequired","maxLength","size","placeholder","requiredErrorText","validators"]},"multipletext@items":{properties:["name","title"]},calculatedvalue:{properties:["name","expression","includeIntoResult"]},"calculatedvalue@items":{properties:["name","expression"]},paneldynamic:{properties:["renderMode","templateTabTitle","tabAlign","panelCount","minPanelCount","maxPanelCount","panelsState",{name:"allowAddPanel"},{name:"allowRemovePanel"},"panelAddText","panelRemoveText","templateTitle","templateDescription","noEntriesText","confirmDelete","confirmDeleteText","panelPrevText","panelNextText","showQuestionNumbers","showRangeInProgress",{name:"defaultPanelValue",tab:"data"},{name:"defaultValueFromLastPanel",tab:"data"},{name:"templateTitleLocation",tab:"layout"},{name:"panelRemoveButtonLocation",tab:"layout"},{name:"keyName",tab:"validation"},{name:"keyDuplicationError",tab:"validation"}]},panelbase:{properties:["name","title","description","visible","readOnly",{name:"visibleIf",tab:"logic"},{name:"enableIf",tab:"logic"},{name:"requiredIf",tab:"logic"},{name:"questionTitleLocation",tab:"layout"}],tabs:[{name:"logic",index:100},{name:"layout",index:200},{name:"data",index:300},{name:"validation",index:400}]},panel:{properties:["isRequired",{name:"requiredErrorText",tab:"validation"},{name:"page",tab:"layout"},{name:"startWithNewLine",tab:"layout"},{name:"state",tab:"layout"},{name:"questionsOrder",tab:"layout"},{name:"indent",tab:"layout"},{name:"innerIndent",tab:"layout"},{name:"width",tab:"layout"},{name:"showNumber",tab:"numbering"},{name:"showQuestionNumbers",tab:"numbering"},{name:"questionStartIndex",tab:"numbering"},{name:"minWidth",tab:"layout"},{name:"maxWidth",tab:"layout"}],tabs:[{name:"numbering",index:350}]},page:{properties:["navigationTitle","navigationDescription","maxTimeToFinish",{name:"questionsOrder",tab:"layout"},{name:"navigationButtonsVisibility",tab:"layout"}]},survey:{properties:["title","description","showTitle","locale","mode","cookieName","widthMode","width",{name:"showPreviewBeforeComplete",tab:"navigation"},{name:"pagePrevText",tab:"navigation"},{name:"pageNextText",tab:"navigation"},{name:"completeText",tab:"navigation"},{name:"previewText",tab:"navigation"},{name:"editText",tab:"navigation"},{name:"startSurveyText",tab:"navigation"},{name:"showNavigationButtons",tab:"navigation"},{name:"showPrevButton",tab:"navigation"},{name:"firstPageIsStarted",tab:"navigation"},{name:"goNextPageAutomatic",tab:"navigation"},{name:"showProgressBar",tab:"navigation"},{name:"progressBarType",tab:"navigation"},{name:"questionsOnPageMode",tab:"navigation"},{name:"showTOC",tab:"navigation"},{name:"tocLocation",tab:"navigation"},{name:"questionTitleLocation",tab:"question"},{name:"questionDescriptionLocation",tab:"question"},{name:"showQuestionNumbers",tab:"question"},{name:"questionTitlePattern",tab:"question"},{name:"requiredText",tab:"question"},{name:"questionStartIndex",tab:"question"},{name:"questionErrorLocation",tab:"question"},{name:"focusFirstQuestionAutomatic",tab:"question"},{name:"questionsOrder",tab:"question"},{name:"maxTextLength",tab:"question"},{name:"maxOthersLength",tab:"question"},{name:"autoGrowComment",tab:"question"},{name:"allowResizeComment",tab:"question"},{name:"showPageTitles",tab:"pages"},{name:"showPageNumbers",tab:"pages"},{name:"calculatedValues",tab:"logic"},{name:"triggers",tab:"logic"},{name:"clearInvisibleValues",tab:"data"},{name:"textUpdateMode",tab:"data"},{name:"sendResultOnPageNext",tab:"data"},{name:"storeOthersAsComment",tab:"data"},{name:"focusOnFirstError",tab:"validation"},{name:"checkErrorsMode",tab:"validation"},{name:"navigateToUrl",tab:"showOnCompleted"},{name:"showCompletedPage",tab:"showOnCompleted"},{name:"completedHtml",tab:"showOnCompleted"},{name:"navigateToUrlOnCondition",tab:"showOnCompleted"},{name:"completedHtmlOnCondition",tab:"showOnCompleted"},{name:"loadingHtml",tab:"showOnCompleted"},{name:"completedBeforeHtml",tab:"showOnCompleted"},{name:"maxTimeToFinish",tab:"timer"},{name:"maxTimeToFinishPage",tab:"timer"},{name:"showTimerPanel",tab:"timer"},{name:"showTimerPanelMode",tab:"timer"},{name:"logo",tab:"logo"},{name:"logoPosition",tab:"logo"},{name:"logoWidth",tab:"logo"},{name:"logoHeight",tab:"logo"},{name:"logoFit",tab:"logo"}],tabs:[{name:"logo",index:50},{name:"navigation",index:100},{name:"question",index:200},{name:"pages",index:250},{name:"logic",index:300},{name:"data",index:400},{name:"validation",index:500},{name:"showOnCompleted",index:600},{name:"timer",index:700}]},"page@survey":{properties:["name","title"]}},e}(),De=function(){function e(){}return Object.defineProperty(e.prototype,"name",{get:function(){return this.property?this.property.name:""},enumerable:!1,configurable:!0}),e}(),Re=function(){this.visible=!0,this.index=0,this.properties=[]},Be=function(){function e(e,t,o,i,n,a){void 0===t&&(t=null),void 0===o&&(o=null),void 0===i&&(i=null),void 0===n&&(n=null),void 0===a&&(a=null),this.obj=e,this.options=t,this.parentObj=n,this.parentProperty=a,this.tabs=[],this.showModeValue=i,this.properties=r.Serializer.getPropertiesByObj(this.obj),this.fillPropertiesHash(),this.buildTabs(o)}return e.prototype.getProperty=function(e){var t=this.propertiesHash[e];return t&&t.visible?t.property:null},Object.defineProperty(e.prototype,"showMode",{get:function(){return this.showModeValue?this.showModeValue:"form"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEmpty",{get:function(){for(var e=0;e<this.tabs.length;e++)if(this.tabs[e].visible&&this.tabs[e].properties.length>0)return!1;return!0},enumerable:!1,configurable:!0}),e.prototype.fillPropertiesHash=function(){this.propertiesHash={};for(var e=0;e<this.properties.length;e++){var t=this.properties[e];this.propertiesHash[t.name]={property:t,visible:re.isPropertyVisible(this.obj,t,this.options,this.showMode,this.parentObj,this.parentProperty)}}},e.prototype.isJSONPropertyVisible=function(e){var t=this.propertiesHash[e.name];return!!t&&t.visible},e.prototype.getTabByName=function(e){for(var t=0;t<this.tabs.length;t++)if(this.tabs[t].name==e)return this.tabs[t];return null},e.prototype.getTabs=function(){return this.tabs},e.prototype.getProperties=function(e){for(var t=[],o=0;o<e.properties.length;o++)t.push(e.properties[o].property);return t},e.prototype.buildTabs=function(e){e||(e=this.obj.getType());for(var t=this.getAllDefinitionsByClass(e),o=[],i=t.length-1;i>=0;i--){for(var n=t[i],r=n.tabs?n.tabs.length-1:-1;r>=0;r--)o.indexOf(n.tabs[r].name)>-1||this.addPropertyIntoTab(n.tabs[r],!0)&&o.push(n.tabs[r].name);for(r=n.properties?n.properties.length-1:-1;r>=0;r--){var a=n.properties[r].name||n.properties[r];-1===o.indexOf(a)&&(o.push(a),this.addPropertyIntoTab(n.properties[r]))}}for(i=this.tabs.length-1;i>=0;i--)this.movePropertiesToNextProperties(this.tabs[i].properties),this.tabs[i].visible?this.sortProperties(this.tabs[i].properties):this.tabs.splice(i,1);this.tabs.sort((function(e,t){return e.index<t.index?-1:e.index>t.index?1:0}))},e.prototype.addPropertyIntoTab=function(e,t){if(void 0===t&&(t=!1),t){var o=this.getTabOrCreate(e.name);e.index>0&&(o.index=e.index),!1===e.visible&&(o.visible=!1),e.title&&(o.title=e.title)}var i="string"==typeof e,n=i?e:e.name,r=this.propertiesHash[n];if(!r)return!1;if(!i&&!1===e.visible)return!1;if(!r.visible&&(i||!i&&!0!==e.visible))return!1;var s=t?e.name:a.propertyGrid.generalTabName;t||i||!e.tab||(s=e.tab);var l=new De;return l.property=r.property,l.category=!i&&e.category?e.category:"",l.title=!i&&e.title?e.title:"",l.onSameLine=this.isPropertyOnSameLine(r.property.nextToProperty),l.createdFromTabName=t,this.getTabOrCreate(s).properties.unshift(l),!0},e.prototype.movePropertiesToNextProperties=function(e){for(var t=[].concat(e),o=0;o<t.length;o++){var i=this.getNextToNameProperty(t[o].property),n=this.getTabByPropertyName(i);if(n){var r=this.getPropertyByNameInTab(n,i),a=n.properties.indexOf(r);n.properties.splice(a+1,0,t[o]),e.splice(e.indexOf(t[o]),1)}}},e.prototype.getTabByPropertyName=function(e){if(!e)return null;this.isPropertyOnSameLine(e)&&(e=e.substring(1));for(var t=0;t<this.tabs.length;t++)if(this.getPropertyByNameInTab(this.tabs[t],e))return this.tabs[t];return null},e.prototype.getNextToNameProperty=function(e){return e.nextToProperty?this.isPropertyOnSameLine(e.nextToProperty)?e.nextToProperty.substring(1):e.nextToProperty:""},e.prototype.isPropertyOnSameLine=function(e){return!!e&&"*"===e[0]},e.prototype.getPropertyByNameInTab=function(e,t){for(var o=e.properties,i=0;i<o.length;i++)if(o[i].name==t)return o[i];return null},e.prototype.getTabOrCreate=function(e){for(var t=0;t<this.tabs.length;t++)if(this.tabs[t].name==e)return this.tabs[t];var o=new Re;return o.name=e,e==a.propertyGrid.generalTabName&&(o.index=-1),this.tabs.unshift(o),o},e.prototype.setUsedProperties=function(e,t){for(var o=0;o<e.length;o++){var i=e[o].properties;if(Array.isArray(i))for(var n=0;n<i.length;n++){t[i[n].name?i[n].name:i[n]]=!0}}},e.prototype.getAllDefinitionsByClass=function(e){var t=[],o={};if(e.indexOf("@")>-1&&Me.definition[e]){var i=e.substring(0,e.indexOf("@")+1)+"default";return i!=e&&Me.definition[i]&&t.push(Me.definition[i]),t.push(Me.definition[e]),this.setUsedProperties(t,o),this.addNonTabProperties(t,o,!0),t}for(var n=e,s=!1;n;){var l=r.Serializer.findClass(n);if(!l)break;var u=Me.definition[l.name];if(u){if(u.properties)for(var c=0;c<u.properties.length;){var p=u.properties[c],d="string"==typeof p?p:p.name,h=a.propertyGrid.generalTabName;"string"!=typeof p&&p.tab&&(h=p.tab);var g=this.propertiesHash[d]?this.propertiesHash[d].property:null,m=this.getJsonPropertyCategory(g);m&&m!==h?u.properties.splice(c,1):(o[d]=!0,c++)}if(u.tabs)for(c=0;c<u.tabs.length;c++)s=s||"others"==u.tabs[c].name,o[u.tabs[c].name]=!0;t.unshift(u)}n=l.parentName}return s||this.addNonTabProperties(t,o),t},e.prototype.getJsonPropertyCategory=function(e){return e&&e.category?e.category:null},e.prototype.addNonTabProperties=function(e,t,o){void 0===o&&(o=!1);for(var i={properties:[],tabs:[]},n=[],r=0;r<this.properties.length;r++){var s=this.properties[r];if(!(!this.isJSONPropertyVisible(s)||t[s.name]||o&&"form"!==s.showMode)){var l=this.getJsonPropertyCategory(s),u=l||(0==e.length?a.propertyGrid.generalTabName:"others");if(n.indexOf(u)<0&&u!=a.propertyGrid.generalTabName&&(n.push(u),i.tabs.push({name:u,index:"others"==u?1e3:10*n.length})),s.categoryIndex>-1&&n.indexOf(u)>-1)for(var c=0;c<i.tabs.length;c++)i.tabs[c].name==u&&(i.tabs[c].index=s.categoryIndex);i.properties.push({name:this.properties[r].name,tab:u})}}i.properties.length>0&&e.push(i)},e.prototype.sortProperties=function(e){if(Array.isArray(e))for(var t=[].concat(e),o=0;o<t.length;o++){var i=t[o].property.visibleIndex;if(t[o].createdFromTabName&&i<0&&(i=0),!(i<0)){var n=e.indexOf(t[o]);n>-1&&e.splice(n,1),i<e.length?e.splice(i,0,t[o]):e.push(t[o])}}},e}(),qe=function(){function e(){}return e.prototype.parse=function(t){e.boldRegEx||(e.boldRegEx=/\*{2}(.*?)\*{2}/gm,e.italicRegEx=/\_(.*?)\_/gm,e.codeRegEx=/\`(.*?)\`/gm,e.linkRegEx=/\[(.+)\]\(([^ ]+?)( "(.+)")?\)/);var o=function(e,t,o,n){if(!t)return e;var r=e.indexOf(t);if(i(e,r))return e;var a=t.substring(n.length,t.length),s="<span class='"+o+"'>"+(a=a.substring(0,a.length-n.length))+"</span>";return e.replace(t,s)},i=function(e,t){for(var o=!1,i=t-1;i>0;i--){if(" "===e[i]||"\n"===e[i])return!1;if("]"===e[i]&&o)return!0;o="("===e[i]}return!1};return t=this.replace(e.boldRegEx,t,"spg-bold","**",o),t=this.replace(e.italicRegEx,t,"spg-italic","_",o),t=this.replace(e.codeRegEx,t,"spg-code","`",o),t=this.replace(e.linkRegEx,t,"spg-link","",(function(e,t,o,i){if(!t)return e;var n=t.indexOf("](");if(n<0)return e;var r=t.substring(1,n),a="<a class='"+o+"' target='_blank' href='"+t.substring(n+2,t.length-1)+"'>"+r+"</a>";return e.replace(t,a)})),t=this.addLineBreaks(t)},e.prototype.replace=function(e,t,o,i,n){var r=t.match(e);if(!Array.isArray(r)||0==r.length)return t;for(var a=0;a<r.length;a++)t=n(t,r[a],o,i);return t},e.prototype.addLineBreaks=function(e){return e.indexOf("\n")<0?e:e.split("\n").join("<br/>")},e}();function He(e,t,o){void 0===t&&(t=!0),void 0===o&&(o=!0),e.showNavigationButtons="none",e.showPageTitles=!1,e.focusFirstQuestionAutomatic=!1,e.showQuestionNumbers="off",o&&(e.questionTitleLocation="left"),e.showProgressBar="off",t&&(e.textUpdateMode="onTyping"),e.requiredText=""}r.FunctionFactory.Instance.register("propertyVisibleIf",(function(e){return!!(this.question&&this.question.obj&&this.question.property)&&this.question.property.visibleIf(this.question.obj)})),r.FunctionFactory.Instance.register("propertyEnableIf",(function(e){return!!(this.question&&this.question.obj&&this.question.property)&&!this.question.obj[this.question.property.overridingProperty]}));var Qe=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=!0),this.options=e,this.options||(this.options=new s),t&&this.setupSurvey()}return e.prototype.setupSurvey=function(){this.editSurveyValue=this.createSurvey()},Object.defineProperty(e.prototype,"editSurvey",{get:function(){return this.editSurveyValue},enumerable:!1,configurable:!0}),e.prototype.hasErrors=function(){return this.editSurvey.hasErrors(!0,!0)},e.prototype.createSurvey=function(){var e=this.getSurveyJSON();return He(e,!0,!1),this.options.createSurvey(e,this.getSurveyCreationReason())},e.prototype.dispose=function(){this.editSurvey&&this.editSurvey.dispose()},e}(),Fe={editors:new Array,fitHash:{},clearHash:function(){this.fitHash={}},register:function(e){this.editors.push(e)},getEditor:function(e,t){if(!e)return null;if(t)for(var o=this.editors.length-1;o>=0;o--){var i=this.editors[o];if(i.fit(e,t))return i}var n=this.fitHash[e.id];if(n)return n;var r=this.isEditorFit(e);return r||this.isEditorFit(e,!0)},isEditorFit:function(e,t){void 0===t&&(t=!1);for(var o=this.editors.length-1;o>=0;o--){var i=this.editors[o];if(!t&&i.fit(e)||t&&i.isDefault&&i.isDefault())return this.fitHash[e.id]=i,i}return null},getJSON:function(e,t,o,i){var n=this.getEditor(t,i);return n?n.getJSON(e,t,o):null},onCreated:function(e,t,o,i){var n=this.getEditor(o);n&&n.onCreated&&n.onCreated(e,t,o,i)},onSetup:function(e,t,o,i){var n=this.getEditor(o);n&&n.onSetup&&n.onSetup(e,t,o,i)},validateValue:function(e,t,o,i){var n=this.getEditor(o);return n&&n.validateValue?n.validateValue(e,t,o,i):""},onAfterRenderQuestion:function(e,t,o){var i=this.getEditor(t);i&&i.onAfterRenderQuestion&&i.onAfterRenderQuestion(e,t,o)},onMatrixCellCreated:function(e,t,o){var i=this.getEditor(t);i&&i.onMatrixCellCreated&&i.onMatrixCellCreated(o.question.obj,o)},onMatrixCellValueChanged:function(e,t,o){var i=this.getEditor(t);i&&i.onMatrixCellValueChanged&&i.onMatrixCellValueChanged(e,o);var n=o.row;if(n){var r=n.getQuestionByName(o.columnName);r&&n.runCondition({},{question:r})}},onMatrixAllowRemoveRow:function(e,t,o){var i=this.getEditor(t);return!i||!i.onMatrixAllowRemoveRow||i.onMatrixAllowRemoveRow(e,o)},onGetMatrixRowAction:function(e,t,o,i){var n=this.getEditor(t);n&&n.onGetMatrixRowAction&&n.onGetMatrixRowAction(e,o,i)},onUpdateQuestionCssClasses:function(e,t,o){var i=this.getEditor(t);i&&i.onUpdateQuestionCssClasses&&i.onUpdateQuestionCssClasses(e,o)},onGetQuestionTitleActions:function(e,t,o){var i=this.getEditor(t);i&&i.onGetQuestionTitleActions&&i.onGetQuestionTitleActions(e,o)},onValueChanged:function(e,t,o){var i=this.getEditor(t);i&&i.onValueChanged&&i.onValueChanged(e,t,o)},onMasterValueChanged:function(e,t,o){var i=this.getEditor(t);i&&i.onMasterValueChanged&&i.onMasterValueChanged(e,t,o)}},Ue=function(){function e(e,t){this.obj=e,this.options=t}return e.prototype.onGetQuestionTitleActions=function(e){var t=e.question,o=t.property,i=Fe.getEditor(o);if(i){var n=[],r=!t.isReadOnly;!!i.clearPropertyValue&&(!i.canClearPropertyValue||i.canClearPropertyValue(this.obj,o,t,this.options))&&n.push(this.createClearValueAction(i,o,t,r)),!1!==t.allowBatchEdit&&i.createPropertyEditorSetup&&(r&&(r=!i.isPropertyEditorSetupEnabled||i.isPropertyEditorSetupEnabled(this.obj,o,e.question,this.options)),n.push(this.createEditorSetupAction(i,o,t,r)));var a=this.createPropertyHelpAction(t);a&&n.push(a),n.length>0&&(e.titleActions=n)}},e.prototype.createClearValueAction=function(e,t,o,i){var n=this;return{id:"property-grid-clear",title:Q("pe.clear"),showTitle:!1,iconName:"icon-clear",innerCss:"spg-action-button--danger",enabled:i,visible:new r.ComputedUpdater((function(){var e=o.obj[t.name];return Array.isArray(e)?e.length>0:!!e})),action:function(){e.clearPropertyValue(o.obj,t,o,n.options)}}},e.prototype.showModalPropertyEditor=function(e,t,o){return e.showModalPropertyEditor(e,t,o,this.options)},e.prototype.createEditorSetupAction=function(e,t,o,i){var n=this;return{id:"property-grid-setup",iconName:t.isArray?"icon-fast-entry":"icon-wizard",enabled:i,title:Q("pe.edit"),showTitle:!1,action:function(){return n.showModalPropertyEditor(e,t,o)}}},e.prototype.createPropertyHelpAction=function(e){var t=this;if(!e.description)return null;var o=new r.Action({title:"",tooltip:e.description,id:"property-grid-help",iconName:this.getHelpActionIconName(e),showTitle:!1,action:function(){e.descriptionLocation="hidden"!=e.descriptionLocation?"hidden":"underTitle",o.iconName=t.getHelpActionIconName(e)}});return o},e.prototype.getHelpActionIconName=function(e){return"hidden"!=e.descriptionLocation?"icon-description-hide":"icon-description"},e}(),Ge=function(){function e(e,t,o,i,n){void 0===t&&(t=null),void 0===o&&(o=null),void 0===i&&(i=null),void 0===n&&(n=null),this.obj=e,this.options=t,this.parentObj=o,this.parentProperty=i,this.properties=n}return e.isPropertyReadOnly=function(e,t,o,i,n){var r=e.readOnly;return t&&o&&(r=t.onIsPropertyReadOnlyCallback(o,e,r,i,n)),r},e.getClassNameProperty=function(e){if(e&&e.getClassNameProperty)return e.getClassNameProperty()},e.prototype.toJSON=function(e,t){return void 0===e&&(e=!1),void 0===t&&(t=void 0),this.createJSON(e,t)},e.prototype.createColumnsJSON=function(e,t){for(var o=[],i=0;i<t.length;i++){var n=this.getColumnPropertyJSON(e,t[i]);n&&o.push(n)}return o},e.prototype.setupObjPanel=function(e,t,o){void 0===t&&(t=!1),void 0===o&&(o=void 0),e.fromJSON(this.toJSON(t,o)),this.onQuestionsCreated(e)},e.prototype.onQuestionsCreated=function(e){for(var t=r.Serializer.getPropertiesByObj(this.obj),o={},i=0;i<t.length;i++)o[t[i].name]=t[i];var n=e.questions;for(i=0;i<n.length;i++){var a=n[i],s=o[a.name];a.property=s,a.obj=this.obj,a.options=this.options;var l=this.getVisibilityOnEvent(s),u=this.isPropertyReadOnly(s);if(a.readOnly=a.readOnly||u,a.visible=a.visible&&l,s.visibleIf&&l&&(a.visibleIf="propertyVisibleIf() = true"),s.overridingProperty&&a.visible){a.onUpdateCssClassesCallback=function(e){e.questionWrapper="spg-boolean-wrapper--overriding"},u||(a.enableIf="propertyEnableIf() = true");var c=this.createOverridingQuestion(e,a,s.overridingProperty);a.parent.addElement(c,a.parent.elements.indexOf(a)+1)}a.descriptionLocation="hidden";var p=H.getPropertyHelpInEditor(this.obj.getType(),s.name,s.type);p&&(a.description=p),Fe.onCreated(this.obj,a,s,this.options),this.options.onPropertyEditorCreatedCallback(this.obj,s,a)}},e.prototype.getVisibilityOnEvent=function(e,t){return void 0===t&&(t=""),this.options.onCanShowPropertyCallback(this.obj,e,t,this.parentObj,this.parentProperty)},e.prototype.isPropertyReadOnly=function(t){return e.isPropertyReadOnly(t,this.options,this.obj,this.parentObj,this.parentProperty)},e.prototype.createOverridingQuestion=function(e,t,o){var i=r.Serializer.createClass("linkvalue");i.name=t.name+"_overridingProperty",i.startWithNewLine=!1,i.property=t.property,i.obj=t.obj,i.visibleIf="propertyEnableIf() = false";var n=e.getQuestionByName(o),a=n?n.title:o;return i.linkValueText=H.getString("pe.overridingPropertyPrefix")+a,i.titleLocation="hidden",i.onUpdateCssClassesCallback=function(e){e.questionWrapper="spg-link-wrapper--overriding"},n&&(i.linkClickCallback=function(){n.focus()}),i},e.prototype.getClasPropName=function(){if(this.parentObj&&this.parentProperty)return this.parentProperty.name;var t=e.getClassNameProperty(this.obj);return t&&this.obj[t]?this.obj[t]:void 0},e.prototype.createJSON=function(e,t){void 0===t&&(t=void 0);var o=void 0,i=this.getClasPropName();i&&("itemvalue"===(o=this.obj.getType())&&(o+="[]"),o+="@"+i);for(var n=new Be(this.obj,null,o,void 0,this.parentObj,this.parentProperty).getTabs(),r={},s=0;s<n.length;s++)!1!==n[s].visible&&(r[n[s].name]=this.createPanelProps(n[s],t));var l={elements:[]};for(var u in r)if(u==a.propertyGrid.generalTabName&&e){var c=r[u].elements;for(s=0;s<c.length;s++)l.elements.push(c[s])}else l.elements.push(r[u]);return l},e.prototype.createPanelProps=function(e,t){for(var o=this.createPanelJSON(e.name,e.title),i=0;i<e.properties.length;i++){var n=e.properties[i],r=this.createQuestionJSON(n.property,n.title,!1,t);n.onSameLine&&(r.startWithNewLine=!1,this.updateQuestionJSONOnSameLine(r),o.elements.length>0&&this.updateQuestionJSONOnSameLine(o.elements[o.elements.length-1])),r&&o.elements.push(r)}return o},e.prototype.updateQuestionJSONOnSameLine=function(e){e.titleLocation="left",e.minWidth="50px"},e.prototype.createPanelJSON=function(e,t){return{type:"panel",name:e,title:this.getPanelTitle(e,t),state:"collapsed",elements:[]}},e.prototype.createQuestionJSON=function(e,t,o,i){var n;if(void 0===o&&(o=!1),!this.isPropertyVisible(e,o?"list":"")&&o)return null;var r=Fe.getJSON(this.obj,e,this.options,i);if(!r)return null;r.name=e.name,r.visible=e.visible,r.isReadOnly=e.readOnly,r.isRequired=e.isRequired,r.requiredErrorText=H.getString("pe.propertyIsEmpty"),r.title=this.getQuestionTitle(e,t),["page","panelbase"].indexOf(e.className)&&"name"===r.name&&(r.isRequired=!0,r.requiredErrorText=H.getString("pe.propertyIsEmpty"));var a=null===(n=Me.definition[this.obj.getType()])||void 0===n?void 0:n.properties.filter((function(t){return t.name===e.name}))[0];return"object"==typeof a&&a.placeholder&&(r.placeholder=H.getString("pe."+a.placeholder)),r},e.prototype.getColumnPropertyJSON=function(e,t){if(!e)return null;var o=r.Serializer.findProperty(e,t);if(!o)return null;var i=this.createQuestionJSON(o,"",!0,void 0);return i?(i.name=o.name,i.title=this.getQuestionTitle(o,""),o.isUnique&&(i.isUnique=o.isUnique),i.type&&(i.cellType=i.type,delete i.type),"buttongroup"===i.cellType&&(i.cellType="dropdown"),o.visibleIf&&(i.visibleIf="propertyVisibleIf() = true"),i.isReadOnly&&(i.readOnly=i.isReadOnly,delete i.isReadOnly),i):null},e.prototype.isPropertyVisible=function(e,t){return!!e.visible&&(!t||!e.showMode||t==e.showMode)},e.prototype.getPanelTitle=function(e,t){return t||H.getString("pe.tabs."+e)},e.prototype.getQuestionTitle=function(e,t){return e.displayName?e.displayName:t&&t!==e.name?t:H.getPropertyNameInEditor(this.obj.getType(),e.name)},e}(),ze=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=new s),this.isCellCreating=!1,this.options=t,this.options.enableLinkFileEditor&&Fe.register(new Xe),this.obj=e}return e.prototype.refresh=function(){this.setObj(this.objValue)},Object.defineProperty(e.prototype,"obj",{get:function(){return this.objValue},set:function(e){this.objValue!==e&&this.setObj(e)},enumerable:!1,configurable:!0}),e.prototype.selectProperty=function(e,t){if(void 0===t&&(t=!0),this.survey){var o=this.survey.getQuestionByName(e);if(o){for(var i=this.survey.getAllPanels(),n=0;n<i.length;n++){var r=i[n];r===o.parent?r.expand():r.collapse()}t&&o.focus()}}},e.prototype.setObjFromAction=function(e,t){this.changedFromActionCallback?this.changedFromActionCallback(e,t):this.setObj(e)},e.prototype.setObj=function(e){var t=this;this.objValue=e,this.classNameProperty=this.obj?Ge.getClassNameProperty(this.obj):"",this.classNameValue=this.classNameProperty?this.obj[this.classNameProperty]:void 0,this.titleActionsCreator=this.obj?new Ue(this.obj,this.options):void 0;var o=this.getSurveyJSON();this.options.readOnly&&(o.mode="display"),this.surveyValue&&(this.surveyValue.onValidateQuestion.clear(),this.surveyValue.onValueChanging.clear(),this.surveyValue.onValueChanged.clear(),this.surveyValue.onMatrixCellValueChanging.clear(),this.surveyValue.onMatrixCellValidate.clear(),this.surveyValue.onMatrixCellValueChanged.clear(),this.surveyValue.editingObj=void 0,this.surveyValue.data={},this.surveyValue.dispose()),this.surveyValue=this.createSurvey(o),this.surveyValue.questionErrorLocation="bottom",this.surveyValue.getCss().list={},this.surveyValue.css=se;var i=this.surveyValue.createNewPage("p1");this.obj&&(new Ge(this.obj,this.options).setupObjPanel(i,!1),this.survey.enterKeyAction="loseFocus",this.survey.addPage(i),this.survey.getAllQuestions().forEach((function(e){Fe.onSetup(t.obj,e,e.property,t.options)})),this.survey.checkErrorsMode="onValueChanging",this.survey.onValueChanged.add((function(e,o){t.onValueChanged(o)})),this.survey.onValueChanging.add((function(e,o){t.onValueChanging(o)})),this.survey.onValidateQuestion.add((function(e,o){t.onValidateQuestion(o)})),this.survey.onGetQuestionTitleActions.add((function(e,o){t.titleActionsCreator.onGetQuestionTitleActions(o),t.onGetQuestionTitleActions(o);var i=o.question;t.options.onPropertyEditorUpdateTitleActionsCallback(t.obj,i.property,i,o.titleActions)})),this.survey.onGetPanelTitleActions.add((function(e,t){t.titleActions.splice(0,t.titleActions.length)})),this.survey.onMatrixCellCreated.add((function(e,o){t.onMatrixCellCreated(o)})),this.survey.onMatrixCellValueChanging.add((function(e,o){t.onMatrixCellValueChanging(o)})),this.survey.onMatrixCellValidate.add((function(e,o){t.onMatrixCellValidate(o)})),this.survey.onMatrixCellValueChanged.add((function(e,o){t.onMatrixCellValueChanged(o)})),this.survey.onMatrixAllowRemoveRow.add((function(e,o){o.allow=t.getMatrixAllowRemoveRow(o.question,o.row)})),this.survey.onMatrixRowRemoving.add((function(e,o){o.allow=t.getMatrixOnRowRemoving(o.question,o.row)})),this.survey.onMatrixRowAdded.add((function(e,o){t.onMatrixRowAdded(o)})),this.survey.onGetMatrixRowActions.add((function(e,o){t.onGetMatrixRowAction(o)})),this.survey.onUpdateQuestionCssClasses.add((function(e,o){t.onUpdateQuestionCssClasses(o)})),this.survey.onAfterRenderQuestion.add((function(e,o){t.onAfterRenderQuestion(o)})),this.survey.onTextMarkdown.add((function(e,t){var o;"description"===t.name&&(t.html=(o=t.text,(new qe).parse(o)))})),this.survey.editingObj=this.obj,this.objValueChangedCallback&&this.objValueChangedCallback(),this.updateDependedPropertiesEditors(),this.survey.onFocusInPanel.add((function(e,o){if(t.currentlySelectedPanel!==o.panel){var i=o.panel.getFirstQuestionToFocus(!1,!0);t.currentlySelectedProperty=i?i.name:"",t.currentlySelectedPanel=o.panel}})),this.survey.onFocusInQuestion.add((function(e,o){t.currentlySelectedProperty=o.question.name,t.currentlySelectedPanel=o.question.parent})),this.survey.onUploadFiles.add((function(e,o){var i="image"==o.question.obj.getType()?o.question.obj:"imageitemvalue"==o.question.obj.getType()?o.question.obj.locOwner:void 0;t.options.uploadFiles(o.files,i,(function(e,t){return o.callback(e,[{content:t,file:o.files[0]}])}))})),this.survey.getAllQuestions().map((function(e){return e.allowRootStyle=!1})),this.survey.onQuestionCreated.add((function(e,t){t.question.allowRootStyle=!1})),this.options.onPropertyGridSurveyCreatedCallback(this.obj,this.survey))},Object.defineProperty(e.prototype,"options",{get:function(){return this.optionsValue},set:function(e){this.optionsValue=e||new s},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),e.prototype.validate=function(){if(this.survey)return!this.survey.hasErrors(!0,!0)},e.prototype.collapseCategory=function(e){var t=this.survey.getPanelByName(e);t&&t.collapse()},e.prototype.expandCategory=function(e){var t=this.survey.getPanelByName(e);t&&t.expand()},e.prototype.collapseAllCategories=function(){for(var e=this.survey.getAllPanels(),t=0;t<e.length;t++)e[t].collapse()},e.prototype.expandAllCategories=function(){for(var e=this.survey.getAllPanels(),t=0;t<e.length;t++)e[t].expand()},e.prototype.createSurvey=function(e){return this.options.createSurvey(e,"property-grid")},e.prototype.getSurveyJSON=function(){var e={};return He(e,!0,!1),e},e.prototype.validateQuestionValue=function(e,t,o,i){if(t.isRequired&&(r.Helpers.isValueEmpty(i)||t.valueChangingEmpty))return this.getErrorTextOnValidate(H.getString("pe.propertyIsEmpty"),o.name,e,i);if(this.isPropNameInValid(e,o,i)||t.nameHasError)return this.getErrorTextOnValidate(H.getString("pe.propertyNameIsIncorrect"),o.name,e,i);var n=Fe.validateValue(e,t,o,i);return this.getErrorTextOnValidate(n,o.name,e,i)},e.prototype.getErrorTextOnValidate=function(e,t,o,i){var n=this.options.onGetErrorTextOnValidationCallback(t,o,i);return n||e},e.prototype.onValidateQuestion=function(e){var t=e.question;t&&t.property&&(e.error=this.validateQuestionValue(this.obj,t,t.property,e.value))},e.prototype.onValueChanging=function(e){var t=e.question;if(t&&t.property&&!r.Helpers.isTwoValueEquals(e.value,e.oldValue)){var o={obj:this.obj,propertyName:t.property.name,value:e.oldValue,newValue:e.value,doValidation:!1};if(this.options.onValueChangingCallback(o),e.value=o.newValue,t.property.isRequired){var i=r.Helpers.isValueEmpty(e.value);t.valueChangingEmpty=i}var n=this.isPropNameInValid(this.obj,t.property,e.value);t.nameHasError=n}},e.prototype.isPropNameInValid=function(e,t,o){return!(!e.isQuestion||"name"!==t.name||!o)&&(o=o.toLowerCase(),["item","choice","row","panel"].indexOf(o)>-1)},e.prototype.onValueChanged=function(e){var t=this,o=e.question;if(o&&o.property&&(o.valueChangingEmpty=!1,o.nameHasError=!1,this.changeDependedProperties(o,(function(e){return t.survey.getQuestionByName(e)}),(function(e){return t.survey.getValue(e)})),Fe.onValueChanged(this.obj,o.property,o),this.classNameProperty&&e.name===this.classNameProperty&&this.classNameValue!==e.value&&(this.setObj(this.obj),this.survey))){var i=this.survey.getQuestionByName(e.name);i&&i.focus()}},e.prototype.changeDependedProperties=function(e,t,o){var i=e.property;if(i){var n=i.getDependedProperties();if(n)for(var a=0;a<n.length;a++){var s=n[a],l=t(s);if(l){this.updateDependedPropertiesEditor(l);var u=o(s);r.Helpers.isTwoValueEquals(l.value,u)||(l.value=u),Fe.onMasterValueChanged(e.obj,l.property,l)}}}},e.prototype.updateDependedPropertiesEditor=function(e){var t=e.obj;if(t){var o=e.property;o&&o.onPropertyEditorUpdate&&o.onPropertyEditorUpdate(t,e)}},e.prototype.updateDependedPropertiesEditors=function(){for(var e=this.survey.getAllQuestions(),t=0;t<e.length;t++)this.updateDependedPropertiesEditor(e[t])},e.prototype.onAfterRenderQuestion=function(e){Fe.onAfterRenderQuestion(this.obj,e.question.property,e)},e.prototype.onMatrixCellCreated=function(e){this.isCellCreating=!0,Fe.onMatrixCellCreated(this.obj,e.question.property,e),this.isCellCreating=!1;var t=e.row.editingObj;if(t){var o=r.Serializer.findProperty(t.getType(),e.columnName);if(o){var i=this.getMatrixAllowEditRow(e.question,e.row);e.cellQuestion.readOnly=!i||Ge.isPropertyReadOnly(o,this.options,t,this.obj,e.question.property)}}},e.prototype.onMatrixCellValueChanging=function(e){if(!this.isCellCreating){var t={obj:e.row.editingObj,propertyName:e.columnName,value:e.oldValue,newValue:e.value,doValidation:!1};this.options.onValueChangingCallback(t),e.value=t.newValue}},e.prototype.onMatrixCellValidate=function(e){if(!this.isCellCreating){var t=e.row.getQuestionByColumnName(e.columnName);t&&t.property&&(e.error=this.validateQuestionValue(e.row.editingObj,t,t.property,e.value))}},e.prototype.onGetMatrixRowAction=function(e){var t=this;Fe.onGetMatrixRowAction(this.obj,e.question.property,e,(function(o){t.setObjFromAction(o,e.question.name)}))},e.prototype.onUpdateQuestionCssClasses=function(e){Fe.onUpdateQuestionCssClasses(this.obj,e.question.property,e)},e.prototype.onGetQuestionTitleActions=function(e){Fe.onGetQuestionTitleActions(this.obj,e.question.property,e)},e.prototype.onMatrixCellValueChanged=function(e){if(!this.isCellCreating){var t=e.row.getQuestionByName(e.columnName);t&&this.changeDependedProperties(t,(function(t){return e.row.getQuestionByName(t)}),(function(t){return e.row.getValue(t)})),Fe.onMatrixCellValueChanged(this.obj,e.question.property,e)}},e.prototype.getMatrixAllowRemoveRow=function(e,t){return void 0===t.allowDeleteRow&&this.calculateMatrixAllowOperations(e,t),t.allowDeleteRow},e.prototype.getMatrixOnRowRemoving=function(e,t){return this.options.onCollectionItemDeletingCallback(this.obj,e.property,e.value,t.editingObj)},e.prototype.getMatrixAllowEditRow=function(e,t){return!e.readOnly&&(void 0===t.allowEditRow&&this.calculateMatrixAllowOperations(e,t),t.allowEditRow)},e.prototype.calculateMatrixAllowOperations=function(e,t){var o={allowDelete:this.onMatrixAllowRemoveRow(e,t),allowEdit:!0,allowAdd:void 0};this.options.onCollectionItemAllowingCallback(this.obj,e.property,e.value,t.editingObj,o),t.allowDeleteRow=o.allowDelete,t.allowEditRow=o.allowEdit},e.prototype.onMatrixAllowRemoveRow=function(e,t){var o=Fe.onMatrixAllowRemoveRow(this.obj,e.property,t);return this.options.onCanDeleteItemCallback(this.obj,t.editingObj,o)},e.prototype.onMatrixRowAdded=function(e){var t=e.row.editingObj;r.Serializer.isDescendantOf(t.getType(),"itemvalue")&&this.options.onItemValueAddedCallback(this.obj,e.question.property.name,e.row.editingObj,e.question.value),r.Serializer.isDescendantOf(t.getType(),"matrixdropdowncolumn")&&this.options.onMatrixDropdownColumnAddedCallback(this.obj,e.row.editingObj,e.question.value)},e}(),Ze=function(){function e(){}return e.prototype.showModalPropertyEditor=function(e,t,o,i,n){var a=this,s=o.obj,l=e.createPropertyEditorSetup(s,t,o,i);if(!l)return null;if("condition"!==t.type&&(l.editSurvey.css=r.defaultV2Css),o.isReadOnly&&(l.editSurvey.mode="display"),!r.settings.showModal)return l;var u=r.surveyLocalization.currentLocale,c=H.currentLocale;r.surveyLocalization.currentLocale=c;var p=r.settings.showModal("survey",{survey:l.editSurvey,model:l.editSurvey},(function(){return a.onModalPropertyEditorClosed(e,t,o,i,"apply"),n&&n("apply"),l.apply()}),(function(){a.onModalPropertyEditorClosed(e,t,o,i,"cancel"),n&&n("cancel")}),"sv-property-editor",o.title,i.isMobileView?"overlay":"popup");if(o.isReadOnly){var d=p.footerToolbar.getActionById("apply");d&&(d.visible=!1)}return p.locale=c,r.surveyLocalization.currentLocale=u,this.onModalPropertyEditorShown(e,t,o,i),i.onPropertyGridShowModalCallback(s,t,o,l,p),l},e.prototype.onModalPropertyEditorShown=function(e,t,o,i){},e.prototype.onModalPropertyEditorClosed=function(e,t,o,i,n){},e.prototype.isSupportGrouping=function(){return!1},e.prototype.hasPreviousElementForGrouping=function(e){if(!e||!e.parent)return!1;var t=e.parent.elements.indexOf(e);if(!(t<1)){var o=e.parent.elements[t-1],i=e.parent.elements[t-2];return o.getType()===e.getType()||t>1&&!o.startWithNewLine&&i.property===o.property&&i.getType()===e.getType()}},e.prototype.onUpdateQuestionCssClasses=function(e,t){this.isSupportGrouping()&&this.hasPreviousElementForGrouping(t.question)&&(t.cssClasses.mainRoot+=" spg-row-narrow__question")},e}(),Je=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e,t){return"boolean"==e.type||"switch"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"boolean",default:!1,renderAs:"checkbox",titleLocation:"hidden"}},t.prototype.isSupportGrouping=function(){return!0},t}(Ze),We=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.updateMaxLength=function(e,t){return e.maxLength>0&&(t.maxLength=e.maxLength),t},t.prototype.onCreated=function(e,t,o,i){t.disableNativeUndoRedo=!0},t}(Ze),Ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"string"==e.type},t.prototype.isDefault=function(){return!0},t.prototype.getJSON=function(e,t,o){var i=this.updateMaxLength(t,{type:"text"});return t.isRequired&&(i.textUpdateMode="onBlur"),t.dataList&&(i.dataList=t.dataList),i},t}(We),Xe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return["logo","imageLink"].indexOf(e.name)>-1},t.prototype.getJSON=function(e,t,o){return{type:"fileedit",storeDataAsText:!1}},t.prototype.onCreated=function(e,t,o,i){if(["image"].indexOf(e.getType())>-1){var n=e;n.registerFunctionOnPropertyValueChanged("contentMode",(function(e){t.acceptedTypes=N(e)})),t.acceptedTypes=N(n.contentMode)}else t.acceptedTypes=N("image")},t}(Ze),Ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"number"==e.type||"responsiveImageSize"==e.type},t.prototype.getJSON=function(e,t,o){var i={type:"text",inputType:"number",textUpdateMode:"onBlur"};return void 0!==t.minValue&&(i.min=t.minValue),void 0!==t.maxValue&&(i.max=t.maxValue),i},t}(Ze),$e=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"string"==e.type&&("imageHeight"==e.name||"imageWidth"==e.name)},t.prototype.isDefault=function(){return!1},t.prototype.onCreated=function(e,t,o){t.valueFromDataCallback=function(t){var o,i,n,a;return(o=e.imageHeight,i=e.imageWidth,n=r.Serializer.findProperty(e.getType(),"imageHeight"),a=r.Serializer.findProperty(e.getType(),"imageWidth"),!(!n&&!a)&&n.isDefaultValue(o)&&a.isDefaultValue(i))?void 0:t}},t}(Ke),et=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"text"===e.type},t.prototype.getJSON=function(e,t,o){return this.updateMaxLength(t,{type:"comment"})},t}(We),tt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"html"===e.type},t.prototype.getJSON=function(e,t,o){return this.updateMaxLength(t,{type:"comment"})},t}(We),ot=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"color"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"text",inputType:"color"}},t}(Ze),it=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"string[]"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"comment"}},t.prototype.onCreated=function(e,t,o){t.valueFromDataCallback=function(e){return Array.isArray(e)?e.join("\n"):""},t.valueToDataCallback=function(e){return e?Array.isArray(e)&&!e.split?e:e.split("\n"):[]}},t}(Ze),nt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return this.isLocaleProp(e)||e.hasChoices},t.prototype.getJSON=function(e,t,o){var i=this.getChoices(e,t),n={type:this.renderAsButtonGroup(t,i)?"buttongroup":"dropdown",choices:i,showOptionsCaption:!1};return this.updateObjBasedOnEmptyValueItem(t,i,n),n},t.prototype.getChoices=function(e,t){return t.getChoices(e,(function(e){}))},t.prototype.updateObjBasedOnEmptyValueItem=function(e,t,o){var i=this.getEmptyJsonItemValue(e,t);i&&(o.showOptionsCaption=!0,o.allowClear=!0,i.text&&(o.optionsCaption=i.text))},Object.defineProperty(t.prototype,"canRenderAsButtonGroup",{get:function(){return a.propertyGrid.useButtonGroup},enumerable:!1,configurable:!0}),t.prototype.renderAsButtonGroup=function(e,t){if(this.isLocaleProp(e))return!1;if(!this.canRenderAsButtonGroup||!t||0==t.length||t.length>4)return!1;for(var o=0,i=0;i<t.length;i++){var n=this.getLocalizedText(e,t[i].value?t[i].value:t[i]);o+=n?n.length:0}return o<a.propertyGrid.maxCharsInButtonGroup},t.prototype.onCreated=function(e,t,o){this.setChoices(e,t,o),t.displayValueCallback=function(e){return e||t.optionsCaption}},t.prototype.onMasterValueChanged=function(e,t,o){this.setChoices(e,o,t),o.isEmpty()||r.ItemValue.getItemByValue(o.choices,o.value)||o.clearValue()},t.prototype.setChoicesCore=function(e,t,o){o&&Array.isArray(o)&&0!=o.length&&(this.updateObjBasedOnEmptyValueItem(t,o,e),e.choices=this.choicesFromPropChoices(t,o))},t.prototype.isLocaleProp=function(e){return"locale"===e.name},t.prototype.getLocalizedText=function(e,t){var o;if(this.isLocaleProp(e)&&(o=H.getLocaleName(t)))return o;if("cellType"===e.name&&(o=H.getString("qt."+t)))return o;return null===t?null:H.getPropertyValueInEditor(e.name,t)},t.prototype.choicesFromPropChoices=function(e,t){for(var o=[],i=0;i<t.length;i++){var n=this.getJsonItem(e,t[i]);r.Helpers.isValueEmpty(n.value)||o.push(n)}return o},t.prototype.getJsonItem=function(e,t){var o={value:void 0!==t.value?t.value:t},i=t.text?t.text:"";return i||(i=this.getLocalizedText(e,o.value)),i&&i!=o.value&&(o.text=i),o},t.prototype.setChoices=function(e,t,o){var i=this,n=o.getChoices(e,(function(e){i.setChoicesCore(t,o,e)}));this.setChoicesCore(t,o,n)},t.prototype.getEmptyJsonItemValue=function(e,t){if(!t)return null;for(var o=0;o<t.length;o++){var i=t[o],n=void 0!==i.value?i.value:i;if(r.Helpers.isValueEmpty(n))return this.getJsonItem(e,i)}return null},t}(Ze),rt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"set"==e.type||"multiplevalues"==e.type},t.prototype.getJSON=function(t,o,i){var n=e.prototype.getJSON.call(this,t,o,i),a=!!r.Serializer.findClass("tagbox");return n.type=a?"tagbox":"checkbox",n.hasSelectAll=!a,n},t}(nt),at=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return e.hasChoices&&"page"==e.name},Object.defineProperty(t.prototype,"canRenderAsButtonGroup",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.onCreated=function(t,o,i){e.prototype.onCreated.call(this,t,o,i),o.valueFromDataCallback=function(e){return e?e.name:""},o.valueToDataCallback=function(e){if(e&&t&&t.getSurvey())return t.getSurvey().getPageByName(e)}},t}(nt),st=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"question"==e.type},t.prototype.getJSON=function(e,t,o){var i={type:"dropdown",optionsCaption:H.getString("pe.conditionSelectQuestion"),choices:this.getChoices(e,t,o)};return"question"==t.type&&(i.allowClear=!1),i},t.prototype.getChoices=function(e,t,o){var i=this,n=ke.getSurvey(e);if(!n)return[];var r=this.getQuestions(n,e);r||(r=[]);var a=!!o&&o.showTitlesInExpressions,s=r.map((function(e){var t=a?e.locTitle.renderedHtml:e.name;return o&&(t=o.getObjectDisplayName(e,"property-grid:property-editor","property-editor",t)),{value:i.getItemValue(e),text:t}}));return re.sortItems(s),s},t.prototype.getQuestions=function(e,t){return e.getAllQuestions()},t.prototype.getItemValue=function(e){return e.name},t}(Ze),lt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"question_selectbase"==e.type},t.prototype.getQuestions=function(t,o){for(var i=e.prototype.getQuestions.call(this,t,o),n=[],a=0;a<i.length;a++)i[a]!==o&&r.Serializer.isDescendantOf(i[a].getType(),"selectbase")&&n.push(i[a]);return n},t}(st),ut=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"questionvalue"==e.type},t.prototype.getItemValue=function(e){return e.getValueName()},t.prototype.getQuestions=function(t,o){return e.prototype.getQuestions.call(this,t,o).filter((function(e){return!r.Serializer.isDescendantOf(e.getType(),"nonvalue")}))},t}(st);Fe.register(new Je),Fe.register(new Ke),Fe.register(new Ye),Fe.register(new ot),Fe.register(new et),Fe.register(new tt),Fe.register(new nt),Fe.register(new rt),Fe.register(new at),Fe.register(new it),Fe.register(new st),Fe.register(new ut),Fe.register(new lt),Fe.register(new $e),r.QuestionFactory.Instance.registerQuestion("buttongroup",(function(e){return new r.QuestionButtonGroupModel(e)}));var ct={root:"st-root-modern",container:"st-container-modern",header:"st-title st-container-modern__title",body:"st-body",bodyEmpty:"st-body st-body--empty",footer:"st-footer st-body__footer st-clearfix",title:"",description:"",logo:"st-logo",logoImage:"st-logo__image",headerText:"st-header__text",navigationButton:"",completedPage:"st-completedpage",navigation:{complete:"st-btn st-footer__complete-btn",prev:"st-btn st-footer__prev-btn",next:"st-btn st-footer__next-btn",start:"st-btn st-footer__start-btn",preview:"st-btn st-footer__preview-btn",edit:"st-btn st-footer__edit-btn"},panel:{title:"st-title st-panel__title",titleExpandable:"st-panel__title--expandable",titleOnExpand:"st-panel__title--expanded",titleOnError:"st-panel__title--error",description:"st-description st-panel__description",container:"st-element st-panel st-row__panel",content:"st-panel__content",icon:"st-panel__icon",iconExpanded:"st-panel__icon--expanded",footer:"st-panel__footer",requiredText:"st-panel__required-text"},paneldynamic:{root:"st-paneldynamic",navigation:"st-paneldynamic__navigation",title:"st-title st-question__title",button:"st-btn",buttonRemove:"st-paneldynamic__remove-btn",buttonAdd:"st-paneldynamic__add-btn",progressTop:"st-paneldynamic__progress st-paneldynamic__progress--top",progressBottom:"st-paneldynamic__progress st-paneldynamic__progress--bottom",buttonPrev:"st-paneldynamic__prev-btn",buttonNext:"st-paneldynamic__next-btn",progressContainer:"st-paneldynamic__progress-container",progress:"st-progress",progressBar:"st-progress__bar",progressText:"st-paneldynamic__progress-text",separator:"st-paneldynamic__separator",panelWrapper:"st-paneldynamic__panel-wrapper",panelWrapperInRow:"st-paneldynamic__panel-wrapper--in-row"},progress:"st-progress st-body__progress",progressBar:"st-progress__bar",progressText:"st-progress__text",progressTextInBar:"st-hidden",page:{root:"st-page st-body__page",title:"st-title st-page__title",description:"st-description st-page__description"},pageTitle:"st-title st-page__title",pageDescription:"st-description st-page__description",row:"st-row st-clearfix",question:{mainRoot:"st-element st-question st-row__question",flowRoot:"st-element st-question st-row__question st-row__question--flow",asCell:"st-table__cell",header:"st-question__header",headerLeft:"st-question__header--location--left",headerTop:"st-question__header--location--top",headerBottom:"st-question__header--location--bottom",content:"st-question__content",contentLeft:"st-question__content--left",titleLeftRoot:"",titleOnAnswer:"st-question__title--answer",titleOnError:"st-question__title--error",title:"st-title st-question__title",requiredText:"st-question__required-text",number:"st-question__num",description:"st-description st-question__description",descriptionUnderInput:"st-description st-question__description",comment:"st-comment",required:"st-question--required",titleRequired:"st-question__title--required",indent:20,footer:"st-question__footer",formGroup:"st-question__form-group",hasError:"",disabled:"st-question--disabled"},image:{root:"st-image",image:"sv_image_image"},error:{root:"st-question__erbox",icon:"",item:"",locationTop:"st-question__erbox--location--top",locationBottom:"st-question__erbox--location--bottom"},checkbox:{root:"st-selectbase",item:"st-item st-checkbox st-selectbase__item",itemSelectAll:"st-checkbox--selectall",itemNone:"st-checkbox--none",itemDisabled:"st-item--disabled st-checkbox--disabled",itemChecked:"st-item--checked st-checkbox--checked",itemHover:"st-item--allowhover st-checkbox--allowhover",itemInline:"st-selectbase__item--inline",label:"st-selectbase__label",labelChecked:"",itemControl:"st-visuallyhidden st-item__control st-checkbox__control",itemDecorator:"st-item__svg st-checkbox__svg",controlLabel:"st-item__control-label",materialDecorator:"st-item__decorator st-checkbox__decorator",other:"st-comment st-question__other",column:"st-selectbase__column"},radiogroup:{root:"st-selectbase",item:"st-item st-radio st-selectbase__item",itemInline:"st-selectbase__item--inline",label:"st-selectbase__label",labelChecked:"",itemDisabled:"st-item--disabled st-radio--disabled",itemChecked:"st-item--checked st-radio--checked",itemHover:"st-item--allowhover st-radio--allowhover",itemControl:"st-visuallyhidden st-item__control st-radio__control",itemDecorator:"st-item__svg st-radio__svg",controlLabel:"st-item__control-label",materialDecorator:"st-item__decorator st-radio__decorator",other:"st-comment st-question__other",clearButton:"st-btn st-selectbase__clear-btn",column:"st-selectbase__column"},boolean:{mainRoot:"st-question st-row__question st-question--boolean",root:"",item:"st-boolean",control:"st-boolean__control st-visuallyhidden",itemChecked:"st-boolean--checked",itemIndeterminate:"st-boolean--indeterminate",itemDisabled:"st-boolean--disabled",label:"st-boolean__label",switch:"st-boolean__switch",disabledLabel:"st-checkbox__label--disabled",itemDecorator:"st-checkbox__hidden",materialDecorator:"st-checkbox__rectangle",sliderText:"",slider:"st-boolean__thumb"},text:{root:"st-input st-text",small:"st-row__question--small",controlDisabled:"st-input--disabled",onError:"st-input--error"},multipletext:{root:"st-multipletext",item:"st-multipletext__item",itemTitle:"st-multipletext__item-title",row:"st-multipletext__row",cell:"st-multipletext__cell"},dropdown:{root:"st-selectbase",small:"st-row__question--small",control:"st-input st-dropdown",other:"st-comment st-question__other",onError:"st-input--error",label:"st-selectbase__label",item:"st-item st-radio st-selectbase__item",itemDisabled:"st-item--disabled st-radio--disabled",itemChecked:"st-item--checked st-radio--checked",itemHover:"st-item--allowhover st-radio--allowhover",itemControl:"st-visuallyhidden st-item__control st-radio__control",itemDecorator:"st-item__svg st-radio__svg",controlDisabled:"st-input--disabled",controlLabel:"st-item__control-label",materialDecorator:"st-item__decorator st-radio__decorator"},imagepicker:{root:"st-imagepicker",item:"st-imagepicker__item",itemInline:"st-imagepicker__item--inline",itemChecked:"st-imagepicker__item--checked",itemDisabled:"st-imagepicker__item--disabled",itemHover:"st-imagepicker__item--allowhover",label:"st-imagepicker__label",itemControl:"st-imagepicker__control",image:"st-imagepicker__image",itemText:"st-imagepicker__text",clearButton:"st-btn",other:"st-comment st-question__other"},matrix:{mainRoot:"st-question st-row__question st-scrollable",tableWrapper:"st-matrix",root:"st-table",rowError:"st-matrix__row--error",cell:"st-table__cell st-matrix__cell",headerCell:"st-table__cell st-table__cell--header",label:"st-item st-radio st-matrix__label",itemValue:"st-visuallyhidden st-item__control st-radio__control",itemChecked:"st-radio--checked",itemDisabled:"st-item--disabled st-radio--disabled",itemHover:"st-radio--allowhover",materialDecorator:"st-item__decorator st-radio__decorator",itemDecorator:"st-item__svg st-radio__svg",cellText:"st-matrix__text",cellTextSelected:"st-matrix__text--checked",cellTextDisabled:"st-matrix__text--disabled"},matrixdropdown:{mainRoot:"st-question st-row__question st-scrollable",root:"st-table",cell:"st-table__cell",headerCell:"st-table__cell st-table__cell--header"},matrixdynamic:{mainRoot:"st-question st-row__question st-scrollable",root:"st-table st-matrixdynamic",cell:"st-table__cell",headerCell:"st-table__cell st-table__cell--header",button:"st-btn",detailRow:"st-table__row st-table__row--detail",detailButton:"st-table__cell--detail-button",detailButtonExpanded:"st-table__cell--detail-button--expanded",detailIcon:"st-detail-panel__icon",detailIconExpanded:"st-detail-panel__icon--expanded",detailPanelCell:"st-table__cell--detail-panel",actionsCell:"st-table__cell st-table__cell--actions",buttonAdd:"st-matrixdynamic__add-btn",buttonRemove:"st-matrixdynamic__remove-btn",iconAdd:"",iconRemove:""},rating:{root:"st-rating",item:"st-rating__item",itemHover:"st-rating__item--allowhover",selected:"st-rating__item--selected",minText:"st-rating__item-text st-rating__min-text",itemText:"st-rating__item-text",maxText:"st-rating__item-text st-rating__max-text",itemDisabled:"st-rating__item--disabled"},comment:{root:"st-comment",small:"st-row__question--small"},expression:"",file:{root:"st-file",other:"st-comment st-question__other",placeholderInput:"st-visuallyhidden",preview:"st-file__preview",fileSign:"st-hidden",fileSignBottom:"st-file__sign",fileDecorator:"st-file__decorator",fileInput:"st-visuallyhidden",noFileChosen:"st-description st-file__no-file-chosen",chooseFile:"st-btn st-file__choose-btn",disabled:"st-file__choose-btn--disabled",removeButton:"st-hidden",removeButtonBottom:"st-btn st-file__clean-btn",removeFile:"st-hidden",removeFileSvg:"st-file__remove-svg",wrapper:"st-file__wrapper"},signaturepad:{root:"st-signaturepad sjs_sp_container",small:"st-row__question--small",controls:"sjs_sp_controls",placeholder:"sjs_sp_placeholder",clearButton:"sjs_sp_clear"},saveData:{root:"",saving:"",error:"",success:"",saveAgainButton:""},window:{root:"sv_window",body:"sv_window_content",header:{root:"sv_window_title",title:"",button:"",buttonExpanded:"",buttonCollapsed:""}}};o(10);var pt=function(e){function t(t,o){var i=e.call(this)||this;return i.name=t,i.translation=o,i}return z(t,e),Object.defineProperty(t.prototype,"isGroup",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.fillLocales=function(e){},t.prototype.mergeLocaleWithDefault=function(e){},t.prototype.makeObservable=function(){this.fireOnObjCreating()},t.prototype.deleteLocaleStrings=function(e){},t.prototype.fireOnObjCreating=function(e){void 0===e&&(e=null),this.translation&&(e||(e=this),this.translation.fireOnObjCreating(e))},t}(r.Base),dt=function(e){function t(t,o){var i=e.call(this)||this;return i.locString=t,i.locale=o,i.text=i.locString.getLocaleText(i.locale),i}return z(t,e),t.prototype.onPropertyValueChanged=function(t,o,i){e.prototype.onPropertyValueChanged.call(this,t,o,i),"text"===t&&this.locString.setLocaleText(this.locale,i)},t.prototype.getType=function(){return"translationitemstring"},U([Object(r.property)()],t.prototype,"text",void 0),U([Object(r.property)()],t.prototype,"placeholder",void 0),t}(r.Base),ht=function(e){function t(t,o,i,n,r,a){void 0===i&&(i=""),void 0===a&&(a=null);var s=e.call(this,t,n)||this;s.name=t,s.locString=o,s.defaultValue=i,s.context=r,s.property=a,s.translation&&(s.readOnly=s.translation.readOnly),s.hashValues={};var l=s;return s.afterRender=function(e,t){l.translation&&l.translation.translateItemAfterRender(l,e,t.locale)},s.fireOnObjCreating(),s}return z(t,e),Object.defineProperty(t.prototype,"maxLength",{get:function(){return this.property?this.property.maxLength:-1},enumerable:!1,configurable:!0}),t.prototype.makeObservable=function(){for(var t in e.prototype.makeObservable.call(this),this.hashValues)this.fireOnObjCreating(this.hashValues[t])},t.prototype.getType=function(){return"translationitem"},Object.defineProperty(t.prototype,"text",{get:function(){return this.customText?this.customText:this.localizableName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"localizableName",{get:function(){var e=this.context&&this.context.getType&&this.context.getType();return H.getPropertyNameInEditor(e,this.name)},enumerable:!1,configurable:!0}),t.prototype.getLocText=function(e){return this.locString.getLocaleText(e)},t.prototype.setLocText=function(e,t){this.locString.setLocaleText(e,t),this.translation.tranlationChangedCallback&&this.translation.tranlationChangedCallback(e,this.name,t,this.context)},t.prototype.values=function(e){if(!this.hashValues[e]){var t=new dt(this.locString,e);e||(t.placeholder=this.defaultValue),this.hashValues[e]=t,this.fireOnObjCreating(t)}return this.hashValues[e]},t.prototype.fillLocales=function(e){for(var t=this.getKeys(),o=0;o<t.length;o++){var i=t[o];i&&e.indexOf(i)<0&&i!==r.LocalizableString.defaultLocale&&e.push(i)}},t.prototype.toJSON=function(){var e=this.locString.getJson();return(e=this.correctJSON(e))&&"string"!=typeof e?e:{default:e}},t.prototype.correctJSON=function(e){if(!e||"string"==typeof e)return e;if(Array.isArray(e))return e.join("\n");for(var t in e)Array.isArray(e[t])&&(e[t]=e[t].join("\n"));return e},t.prototype.getKeys=function(){return this.locString.getLocales()},t.prototype.mergeLocaleWithDefault=function(e){var t=this.locString.getLocaleText(e);t&&(this.locString.setLocaleText("",t),this.locString.setLocaleText(e,null))},t.prototype.deleteLocaleStrings=function(e){this.setLocText(e,"")},t.prototype.getPlaceholder=function(e){var t=H.getString("ed.translationPlaceHolder",e);return this.context instanceof r.SurveyModel?r.surveyLocalization.getString(this.name,e)||t:this.context instanceof r.PageModel||"title"!==this.name?"choices"===this.context.ownerPropertyName&&"itemvalue"===this.context.getType()&&(this.getPlaceholderText(e)||this.getItemValuePlaceholderText())||t:this.getPlaceholderText(e)||this.context.name},t.prototype.getTextForExport=function(e){var t=this.locString.getLocaleText(e);return t||(e.indexOf("-")<0?"":this.getPlaceholderText(e))},t.prototype.getPlaceholderText=function(e){if(!e||"default"===e)return"";var t=this.getRootDialect(e);return this.locString.getLocaleText(t)},t.prototype.getRootDialect=function(e){var t=e.indexOf("-");return t<0||(e=e.substring(0,t))===r.surveyLocalization.defaultLocale?"":e},t.prototype.getItemValuePlaceholderText=function(){var e=this.context.value;return r.Helpers.isValueEmpty(e)?"":e.toString()},U([Object(r.property)({defaultValue:!1})],t.prototype,"readOnly",void 0),t}(pt),gt=function(e){function t(t,o,i,n,r){void 0===i&&(i=null),void 0===n&&(n=""),void 0===r&&(r=!1);var a=e.call(this,t,i)||this;return a.name=t,a.obj=o,a.text=n,a.hasIndent=r,a.isRootValue=!1,a.removeLocale=function(e){a.translation&&a.translation.removeLocale(e)},a.text||(a.text=t),a.reset(),a.fireOnObjCreating(),a}return z(t,e),t.prototype.getType=function(){return"translationgroup"},Object.defineProperty(t.prototype,"items",{get:function(){return this.itemValues},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locItems",{get:function(){return this.itemValues.filter((function(e){return e instanceof ht}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRoot",{get:function(){return this.isRootValue},enumerable:!1,configurable:!0}),t.prototype.setAsRoot=function(){this.isRootValue=!0},t.prototype.getItemByName=function(e){for(var t=0;t<this.itemValues.length;t++)if(this.itemValues[t].name==e)return this.itemValues[t];return null},Object.defineProperty(t.prototype,"groups",{get:function(){return this.itemValues.filter((function(e){return e instanceof t}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isGroup",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locales",{get:function(){return this.translation?this.translation.locales:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"removeLocaleText",{get:function(){return H.getString("pe.remove")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"localeCount",{get:function(){return Array.isArray(this.locales)?this.locales.length:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locWidth",{get:function(){var e=this.localeCount;return e<2?"100%":Math.floor(100/e).toString()+"%"},enumerable:!1,configurable:!0}),t.prototype.getLocaleName=function(e){return this.translation?this.translation.getLocaleName(e):H.getLocaleName(e)},t.prototype.reset=function(){this.itemValues=[],this.fillItems()},t.prototype.fillLocales=function(e){for(var t=0;t<this.items.length;t++)this.items[t].fillLocales(e)},t.prototype.makeObservable=function(){e.prototype.makeObservable.call(this);for(var t=0;t<this.items.length;t++)this.items[t].makeObservable()},Object.defineProperty(t.prototype,"showAllStrings",{get:function(){return!this.translation||this.translation.showAllStrings},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasItems",{get:function(){if(this.locItems.length>0)return!0;for(var e=this.groups,t=0;t<e.length;t++)if(e[t].hasItems)return!0;return!1},enumerable:!1,configurable:!0}),t.prototype.mergeLocaleWithDefault=function(e){this.itemValues.forEach((function(t){return t.mergeLocaleWithDefault(e)}))},t.prototype.deleteLocaleStrings=function(e){this.items.forEach((function(t){return t.deleteLocaleStrings(e)}))},t.prototype.fillItems=function(){if(this.isItemValueArray(this.obj))this.createItemValuesLocale();else if(this.obj&&this.obj.getType){for(var e=this.getLocalizedProperties(this.obj),o=0;o<e.length;o++){var i=e[o],n=this.createTranslationItem(this.obj,e[o]);n&&this.itemValues.push(n)}e=this.getArrayProperties(this.obj);for(o=0;o<e.length;o++){i=e[o];var r=this.obj[i.name];if(this.isItemValueArray(r)){if(this.canShowProperty(i,Array.isArray(r)&&r.length>0)){var a=new t(i.name,r,this.translation,H.getPropertyName(i.name),!0);a.hasItems&&this.itemValues.push(a)}}else this.createGroups(r,i)}this.sortItems()}},t.prototype.sortItems=function(){a.translation.sortByName&&this.itemValues.sort((function(e,t){return e.name?t.name?e.name.localeCompare(t.name):1:-1}))},t.prototype.getLocalizedProperties=function(e){for(var t=[],o=r.Serializer.getPropertiesByObj(e),i=0;i<o.length;i++){var n=o[i];n.isSerializable&&n.isLocalizable&&(!n.readOnly&&n.visible&&t.push(n))}return t},t.prototype.getArrayProperties=function(e){for(var t=[],o=r.Serializer.getPropertiesByObj(e),i=0;i<o.length;i++){var n=o[i];if(!1!==n.isSerializable){var a=e[n.name];a&&Array.isArray(a)&&a.length>0&&t.push(n)}}return t},t.prototype.canShowProperty=function(e,t){return!(this.translation&&!this.translation.canShowProperty(this.obj,e,t))},t.prototype.createTranslationItem=function(e,t){var o=this.getDefaultValue(e,t),i=e[t.serializationProperty];return i&&(this.showAllStrings||o||!i.isEmpty)&&this.canShowProperty(t,i.isEmpty)?new ht(t.name,i,o,this.translation,e,t):null},t.prototype.getDefaultValue=function(e,t){if("title"==t.name&&t.isLocalizable&&t.serializationProperty){var o=e[t.serializationProperty];if(o&&"page"!=e.getType()&&(o.onGetTextCallback||o.onRenderedHtmlCallback))return e.name}return""},t.prototype.isItemValueArray=function(e){return!!e&&Array.isArray(e)&&e.length>0&&!!e[0]&&!!e[0].getType&&!!e[0].setData&&!!e[0].setLocText},t.prototype.createGroups=function(e,o){for(var i=0;i<e.length;i++){var n=e[i];if(n&&n.getType){var r=n.name,a=r;if(!r){var s="["+i.toString()+"]";r=o.name+s,a=H.getPropertyName(o.name)+s}var l=new t(r,n,this.translation,a);l.hasItems&&this.itemValues.push(l)}}},t.prototype.createItemValuesLocale=function(){for(var e=0;e<this.obj.length;e++){var t=this.obj[e];if(this.showAllStrings||!t.locText.isEmpty||isNaN(t.value)){var o=new ht(t.value,t.locText,t.value,this.translation,t);this.itemValues.push(o),this.addCustomPropertiesForItemValue(this.obj[e],o)}}},t.prototype.addCustomPropertiesForItemValue=function(e,t){for(var o=this.getLocalizedProperties(e),i=0;i<o.length;i++)if("text"!=o[i].name){var n=this.createTranslationItem(e,o[i]);n&&(n.customText=t.text+" ("+n.localizableName+")",n.name=e.value+"."+n.name,this.itemValues.push(n))}},U([Object(r.property)({defaultValue:!0})],t.prototype,"showHeader",void 0),t}(pt),mt=function(e){function t(t,o,i){void 0===o&&(o=null),void 0===i&&(i=!0);var n=e.call(this)||this;n.options=o,n.hasUI=i,n.chooseLanguageActions=[],n.options||(n.options=new s);var r=n;return n.exportToCSVFileUI=function(){r.exportToSCVFile(a.translation.exportFileName)},n.importFromCSVFileUI=function(e){e.files.length<1||(r.importFromCSVFile(e.files[0]),e.value="")},n.settingsSurveyValue=n.createSettingsSurvey(),n.surveyValue=t,n.setupToolbarItems(),n.updateChooseLanguageActions(),n}return z(t,e),t.prototype.getProcessedTranslationItemText=function(e,t,o,i){return this.options.getProcessedTranslationItemText(e,t,o,i)},t.prototype.getType=function(){return"translation"},t.prototype.makeObservable=function(e){this.onBaseObjCreatingCallback=e,this.fireOnObjCreating(this),this.root.makeObservable()},t.prototype.fireOnObjCreating=function(e){this.onBaseObjCreatingCallback&&this.onBaseObjCreatingCallback(e)},Object.defineProperty(t.prototype,"settingsSurvey",{get:function(){return this.settingsSurveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"localesQuestion",{get:function(){return this.settingsSurvey.getQuestionByName("locales")},enumerable:!1,configurable:!0}),t.prototype.deleteLocaleStrings=function(e){this.root||this.reset(),this.root&&this.root.deleteLocaleStrings(e)},t.prototype.createSettingsSurvey=function(){var e=this,t=this.getSettingsSurveyJSON();He(t);var o=this.options.createSurvey(t,"translation_settings");return o.css=se,o.css.root+=" st-properties",o.onValueChanged.add((function(t,o){"locales"==o.name&&e.updateLocales()})),o.onGetPanelTitleActions.add((function(t,o){"languages"==o.panel.name&&(o.titleActions=[e.addLanguageAction])})),o},t.prototype.calcIsChooseLanguageEnabled=function(){this.isChooseLanguageEnabled=this.chooseLanguageActions.filter((function(e){return e.visible})).length>0},t.prototype.updateLocales=function(){if(this.localesQuestion){var e=[""],t=this.localesQuestion.value;Array.isArray(t)||(t=[]);for(var o=0;o<t.length;o++)e.push(t[o]);this.locales=e,this.canMergeLocaleWithDefault=this.hasLocale(this.defaultLocale)}},t.prototype.getSettingsSurveyJSON=function(){var e=this.getLocaleName("");return{elements:[{type:"panel",name:"languages",elements:[{type:"checkbox",name:"defaultLanguage",titleLocation:"hidden",readOnly:!0,choices:[e],defaultValue:[e]},{type:"checkbox",name:"locales",choicesVisibleIf:"{selLocales} contains {item}",titleLocation:"hidden",maxSelectedChoices:a.translation.maximumSelectedLocales}],title:H.getString("ed.translationLanguages")}]}},t.prototype.getSurveyLocales=function(){for(var e=new Array,t=r.surveyLocalization.supportedLocales,o=Array.isArray(t)&&t.length>0?t:r.surveyLocalization.getLocales(),i={},n=0;n<o.length;n++)this.addLocaleIntoChoices(o[n],e,i);(o=this.settingsSurvey.getValue("selLocales"))||(o=[]);for(n=0;n<o.length;n++)this.addLocaleIntoChoices(o[n],e,i);return[e,o]},t.prototype.updateSettingsSurveyLocales=function(){var e=this.getSurveyLocales(),t=e[0],o=e[1];this.localesQuestion.choices=t;var i=[];o||(o=[]);for(var n=0;n<o.length;n++)this.localeInitialVisibleCallback&&!this.localeInitialVisibleCallback(o[n])||i.push(o[n]);var r=a.translation.maximumSelectedLocales;r>0&&i.length>r&&i.splice(r),this.localesQuestion.value=i},t.prototype.resetStringsSurvey=function(){this.hasUI&&(this.stringsSurvey=this.createStringsSurvey(),this.stringsHeaderSurvey=this.createStringsHeaderSurvey(),this.updateReadOnly())},t.prototype.createStringsSurvey=function(){var e=this,t={autoGrowComment:!0,allowResizeComment:!1};He(t,!1);var o=this.options.createSurvey(t,"translation_strings");o.lazyRendering=!0,o.skeletonComponentName="sd-translation-line-skeleton",o.startLoadingFromJson(),o.css=ct,o.addNewPage("page"),this.addTranslationGroupIntoStringsSurvey(o.pages[0],this.root,null),o.data=this.getStringsSurveyData(o),o.endLoadingFromJson();var i=function(e,t){var o=r.ItemValue.getItemByValue(e.rows,t);return o?o.translationData:null};return o.onMatrixCellCreated.add((function(t,o){if(o.cell.question instanceof r.QuestionCommentModel){var n=o.cell.question,a=i(o.question,o.row.name);e.setPlaceHolder(n,a,o.columnName);var s=!!a&&a.locString.getIsMultiple();n.acceptCarriageReturn=s,a&&(n.maxLength=a.maxLength),s||(n.rows=1)}})),o.onMatrixCellValueChanging.add((function(t,o){var n=i(o.question,o.row.name);n&&(o.value=e.getProcessedTranslationItemText(o.columnName,n.locString,o.value,n.context))})),o.onMatrixCellValueChanged.add((function(t,o){var n=i(o.question,o.row.name);if(n){n.setLocText(o.columnName,o.value);var r=o.columnName;o.row.cells.forEach((function(t){"default"!==r&&0!==t.column.name.indexOf(r+"-")||e.setPlaceHolder(t.question,n,t.column.name)}))}})),o.currentPage=o.pages[0],o},t.prototype.setPlaceHolder=function(e,t,o){e.placeholder=t.getPlaceholder(o)},t.prototype.createStringsHeaderSurvey=function(){var e={};He(e,!1);var t=this.options.createSurvey(e,"translation_strings_header");t.css=ct;var o=t.addNewPage("page"),i=r.Serializer.createClass("matrixdropdown");return i.name="stringsHeader",i.titleLocation="hidden",this.addLocaleColumns(i),o.addQuestion(i),t.currentPage=t.pages[0],t},t.prototype.addTranslationGroupIntoStringsSurvey=function(e,t,o){for(var i=0;i<t.items.length;i++)if(!t.items[i].isGroup){var n=t.items[i],a=r.Serializer.createClass("matrixdropdown");a.cellType="comment",a.titleLocation="hidden",a.name=this.getStringsSurveyQuestionName(t,o)+i,a.showHeader=!1,e.addQuestion(a),this.addLocaleColumns(a);var s=new r.ItemValue(n.name,n.text);s.translationData=n,a.rows.push(s)}for(i=0;i<t.items.length;i++)if(t.items[i].isGroup){n=t.items[i];var l=r.Serializer.createClass("panel");l.name=n.name,e.addElement(l),l.title=n.text,n.hasIndent&&(l.cssClasses.panel.content+=" st-panel-indent"),this.addTranslationGroupIntoStringsSurvey(l,n,t)}},t.prototype.addLocaleColumns=function(e){var t=this.getSelectedLocales();e.addColumn("default",this.getLocaleName(""));for(var o=0;o<t.length;o++)e.addColumn(t[o],this.getLocaleName(t[o]))},t.prototype.getStringsSurveyQuestionName=function(e,t){return null==t||e.obj.name==e.name?e.name+"_props":t.name+"_"+e.name},t.prototype.getStringsSurveyData=function(e){for(var t={},o=e.getAllQuestions(),i=0;i<o.length;i++)t[o[i].name]=this.getStringsQuestionData(o[i]);return t},t.prototype.getStringsQuestionData=function(e){for(var t={},o=0;o<e.rows.length;o++){var i=e.rows[o],n=i.translationData.toJSON();r.Helpers.isValueEmpty(n)||(t[i.value]=n)}return t},t.prototype.updateHeaderStringsSurveyColumns=function(){if(this.stringsHeaderSurvey){var e=this.stringsHeaderSurvey.getQuestionByName("stringsHeader");e.columns=[],this.addLocaleColumns(e)}},t.prototype.updateStringsSurveyColumns=function(){if(this.stringsSurvey)for(var e=this.stringsSurvey.getAllQuestions(),t=0;t<e.length;t++){var o=e[t];o.beginUpdate(),o.columns=[],this.addLocaleColumns(o),o.endUpdate()}},t.prototype.addLocaleIntoChoices=function(e,t,o){e&&!o[e]&&(o[e]=!0,t.push(new r.ItemValue(e,this.getLocaleName(e))))},t.prototype.addLocaleIntoValue=function(e,t){this.addLocaleIntoValueCore("selLocales",e),t&&this.addLocaleIntoValueCore("locales",e)},t.prototype.addLocaleIntoValueCore=function(e,t){if(t){var o=this.settingsSurvey.getValue(e);Array.isArray(o)||(o=[]),o.indexOf(t)<0&&("locales"!==e||o.length<a.translation.maximumSelectedLocales)&&(o.push(t),this.settingsSurvey.setValue(e,o))}},t.prototype.isLocaleVisible=function(e,t){return t!==r.surveyLocalization.defaultLocale&&e.indexOf(t)<0},t.prototype.setupToolbarItems=function(){var e=this;this.chooseLanguageActions=this.getSurveyLocales()[0].map((function(t){return new r.Action({id:t.value,title:e.getLocaleName(t.value),data:t})})),this.addLanguageAction=Object(r.createDropdownActionModel)({id:"svc-translation-choose-language",iconName:"icon-add",enabled:new r.ComputedUpdater((function(){return e.isChooseLanguageEnabled}))},{items:this.chooseLanguageActions,allowSelection:!1,onSelectionChanged:function(t){e.addLocale(t.id)}})},t.prototype.onPropertyValueChanged=function(t,o,i){e.prototype.onPropertyValueChanged.call(this,t,o,i),"canMergeLocaleWithDefault"===t&&(this.mergeLocaleWithDefaultText=this.getMergeLocaleWithDefaultText()),"locales"===t&&(this.updateHeaderStringsSurveyColumns(),this.updateStringsSurveyColumns())},t.prototype.getMergeLocaleWithDefaultText=function(){if(!this.canMergeLocaleWithDefault)return"";var e=this.getLocaleName(this.defaultLocale);return H.getString("ed.translationMergeLocaleWithDefault").format(e)},Object.defineProperty(t.prototype,"survey",{get:function(){return this.surveyValue},set:function(e){this.surveyValue=e,this.settingsSurvey.setValue("selLocales",[]),this.reset()},enumerable:!1,configurable:!0}),t.prototype.reset=function(e){void 0===e&&(e=!1);var t=this.filteredPage?this.filteredPage:this.survey,o=this.filteredPage?t.name:"survey";this.root=new gt(o,t,this),this.root.setAsRoot(),this.root.reset(),this.resetLocales(),this.isEmpty=!this.root.hasItems,this.updateSettingsSurveyLocales(),this.updateLocales(),this.resetStringsSurvey(),this.updateChooseLanguageActions()},t.prototype.updateReadOnly=function(){this.stringsSurvey&&(this.stringsSurvey.mode=this.readOnly?"display":"edit")},t.prototype.canShowProperty=function(e,t,o){var i=!o||re.isPropertyVisible(e,t,this.options);return this.translationStringVisibilityCallback?this.translationStringVisibilityCallback(e,t.name,i):i},Object.defineProperty(t.prototype,"defaultLocale",{get:function(){return r.surveyLocalization.defaultLocale},enumerable:!1,configurable:!0}),t.prototype.getLocaleName=function(e){return H.getLocaleName(e,this.defaultLocale)},t.prototype.removeLocale=function(e){if(this.hasLocale(e)){var t=this.locales.indexOf(e),o=this.locales;o.splice(t,1),this.locales=o,this.canMergeLocaleWithDefault=this.hasLocale(this.defaultLocale)}},t.prototype.hasLocale=function(e){for(var t=this.locales,o=0;o<t.length;o++)if(t[o]==e)return!0;return!1},t.prototype.addLocale=function(e){this.hasLocale(e)||this.addLocaleIntoValue(e,!0),this.updateChooseLanguageActions()},t.prototype.updateChooseLanguageActions=function(){var e=this,t=this.chooseLanguageActions,o=this.settingsSurvey.getValue("selLocales");o||(o=[]),Array.isArray(t)&&t.forEach((function(t){return t.visible=e.isLocaleVisible(o,t.data.value)})),this.calcIsChooseLanguageEnabled()},t.prototype.resetLocales=function(){var e=[""];this.root.fillLocales(e),this.setLocales(e)},t.prototype.getSelectedLocales=function(){var e=this.localesQuestion.value;return Array.isArray(e)?e:[]},t.prototype.setSelectedLocales=function(e){this.localesQuestion.value=e},Object.defineProperty(t.prototype,"noStringsText",{get:function(){return H.getString("ed.translationNoStrings")},enumerable:!1,configurable:!0}),t.prototype.exportToCSV=function(){this.root||this.reset();var e=[],o=[],i=this.locales;o.push("description ↓ - language →");for(var n=0;n<i.length;n++)o.push(i[n]?i[n]:"default");e.push(o);var r={};for(var s in this.fillItemsHash("",this.root,r),r){var l=[s],u=r[s];for(n=0;n<i.length;n++){var c=i[n],p=u.getTextForExport(c);p=p||0!=n?p:u.defaultValue,p=this.options.getTranslationExportedText(u.context,u.name,u.locString,c,p),l.push(p||0!=n?p:u.defaultValue)}e.push(l)}var d=a.translation.exportPrefix;return d||(d=""),d+Object(Le.unparse)(e,{quoteChar:'"',escapeChar:'"',delimiter:t.csvDelimiter,header:!0,newline:t.newLineDelimiter,skipEmptyLines:!1,columns:null})},t.prototype.importFromNestedArray=function(e){var o=this,i=e.shift().slice(1);"default"===i[0]&&(i[0]="");var n=new t(this.survey,this.options,!1);n.showAllStrings=!0;var r={};this.fillItemsHash("",n.root,r),e.forEach((function(e){var t=e.shift().trim();if(t){var n=r[t];n&&o.updateItemWithStrings(t,n,e,i)}})),this.reset(),this.importFinishedCallback&&this.importFinishedCallback()},t.prototype.exportToSCVFile=function(e){if(window){var t=this.exportToCSV(),o=new Blob([t],{type:"text/csv"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveBlob(o,e);else{var i=window.document.createElement("a");i.href=window.URL.createObjectURL(o),i.download=e,document.body.appendChild(i),i.click(),document.body.removeChild(i)}}},t.prototype.importFromCSVFile=function(e){var t=this;Object(Le.parse)(e,{complete:function(e,o){t.importFromNestedArray(e.data)}})},t.prototype.mergeLocaleWithDefault=function(){this.hasLocale(this.defaultLocale)&&(this.root.mergeLocaleWithDefault(this.defaultLocale),this.settingsSurveyValue.setValue("selLocales",[]),this.settingsSurveyValue.setValue("locales",[]),this.reset())},t.prototype.translateItemAfterRender=function(e,t,o){if(this.translateItemAfterRenderCallback){if(Array.isArray(t))for(var i=0;i<t.length;i++)if("TEXTAREA"==t[i].tagName){t=t[i];break}this.translateItemAfterRenderCallback(e,t,o)}},t.prototype.updateItemWithStrings=function(e,t,o,i){for(var n=0;n<o.length&&n<i.length;n++){var r=o[n].trim();r&&(this.importItemCallback&&(r=this.importItemCallback(e,i[n],r)),r&&(t.values(i[n]).text=r))}},t.prototype.fillItemsHash=function(e,t,o){var i=this,n=e?e+"."+t.name:t.name;t.locItems.forEach((function(e){o[n+"."+e.name]=e})),t.groups.forEach((function(e){return i.fillItemsHash(n,e,o)}))},t.prototype.setLocales=function(e){this.settingsSurvey.setValue("setLocales",[]),this.localesQuestion.value=[];for(var t=0;t<e.length;t++)this.addLocaleIntoValue(e[t],!1)},t.prototype.dispose=function(){this.isEmpty=!0,this.stringsSurvey&&(this.stringsSurvey.dispose(),this.stringsSurvey=void 0),this.stringsHeaderSurvey&&(this.stringsHeaderSurvey.dispose(),this.stringsHeaderSurvey=void 0),this.settingsSurveyValue&&(this.settingsSurveyValue.dispose(),this.settingsSurveyValue=void 0),this.importFinishedCallback=void 0,this.availableTranlationsChangedCallback=void 0,this.tranlationChangedCallback=void 0},t.csvDelimiter=",",t.newLineDelimiter="\n",U([Object(r.propertyArray)()],t.prototype,"locales",void 0),U([Object(r.property)()],t.prototype,"canMergeLocaleWithDefault",void 0),U([Object(r.property)()],t.prototype,"mergeLocaleWithDefaultText",void 0),U([Object(r.property)({defaultValue:!1,onSet:function(e,t){t.updateReadOnly()}})],t.prototype,"readOnly",void 0),U([Object(r.property)()],t.prototype,"root",void 0),U([Object(r.property)({defaultValue:!1,onSet:function(e,t){t.reset()}})],t.prototype,"showAllStrings",void 0),U([Object(r.property)({onSet:function(e,t){t.reset()}})],t.prototype,"filteredPage",void 0),U([Object(r.property)()],t.prototype,"stringsSurvey",void 0),U([Object(r.property)()],t.prototype,"stringsHeaderSurvey",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"isEmpty",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"isChooseLanguageEnabled",void 0),t}(r.Base),ft=function(){function e(e){this.creator=e,e.addPluginTab("translation",this),this.sidebarTab=this.creator.sidebar.addTab("translation"),this.sidebarTab.caption=H.getString("ed.translationPropertyGridTitle"),this.createActions().forEach((function(t){return e.toolbar.actions.push(t)}))}return e.prototype.activate=function(){var e=this;this.model=new mt(this.creator.survey,this.creator),this.model.readOnly=this.creator.readOnly,this.model.translationStringVisibilityCallback=function(t,o,i){var n={obj:t,propertyName:o,visible:i};return!e.creator.onTranslationStringVisibility.isEmpty&&e.creator.onTranslationStringVisibility.fire(e.creator,n),n.visible},this.model.localeInitialVisibleCallback=function(t){var o={locale:t,isSelected:!0};return e.creator.onTranslationLocaleInitiallySelected.fire(e.creator,o),o.isSelected},this.model.importItemCallback=function(t,o,i){var n={locale:o,name:t,text:i};return e.creator.onTranslationImportItem.fire(e.creator,n),n.text},this.model.importFinishedCallback=function(){e.creator.onTranslationImported.fire(e.creator,{})},this.sidebarTab.model=this.model.settingsSurvey,this.sidebarTab.componentName="survey-widget",this.creator.sidebar.activeTab=this.sidebarTab.id,this.mergeLocaleWithDefaultAction.title=this.createMergeLocaleWithDefaultActionTitleUpdater(),this.mergeLocaleWithDefaultAction.tooltip=this.createMergeLocaleWithDefaultActionTitleUpdater(),this.mergeLocaleWithDefaultAction.visible=this.model.canMergeLocaleWithDefault,this.filterPageAction.visible=this.creator.survey.pageCount>1,this.updateFilterPageAction(!0),this.filterStringsAction.visible=!0,this.updateFilterStrigsAction(!0),this.importCsvAction.visible=!0,this.exportCsvAction.visible=!0,this.filterPageAction.data.setItems([{id:null,title:this.showAllPagesText}].concat(this.creator.survey.pages.map((function(t){return{id:t.name,title:e.getPageDisplayText(t)}}))),!1),this.model.onPropertyChanged.add((function(t,o){"filteredPage"===o.name&&e.updateFilterPageAction(),"showAllStrings"===o.name&&e.updateFilterStrigsAction(),"canMergeLocaleWithDefault"===o.name&&(e.mergeLocaleWithDefaultAction.visible=e.model.canMergeLocaleWithDefault),"mergeLocaleWithDefaultText"===o.name&&(e.mergeLocaleWithDefaultAction.title=e.model.mergeLocaleWithDefaultText,e.mergeLocaleWithDefaultAction.tooltip=e.model.mergeLocaleWithDefaultText)})),this.model.reset()},e.prototype.update=function(){this.model&&(this.model.survey=this.creator.survey,this.model.filteredPage=null,this.updateFilterPageAction(!0))},e.prototype.deactivate=function(){return this.model&&this.model.dispose(),this.model=void 0,this.sidebarTab.visible=!1,this.filterStringsAction.visible=!1,this.filterPageAction.visible=!1,this.mergeLocaleWithDefaultAction.title=void 0,this.mergeLocaleWithDefaultAction.tooltip=void 0,this.mergeLocaleWithDefaultAction.visible=!1,this.importCsvAction.visible=!1,this.exportCsvAction.visible=!1,!0},e.prototype.createMergeLocaleWithDefaultActionTitleUpdater=function(){var e=this;return new r.ComputedUpdater((function(){var t=e.creator.locale;return t||(t="en"),H.getString("ed.translationMergeLocaleWithDefault").format(r.surveyLocalization.defaultLocale)}))},Object.defineProperty(e.prototype,"selectLanguageOptionsCaption",{get:function(){return H.getString("ed.translationAddLanguage")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showAllStringsText",{get:function(){return H.getString("ed.translationShowAllStrings")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showUsedStringsOnlyText",{get:function(){return H.getString("ed.translationShowUsedStringsOnly")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showAllPagesText",{get:function(){return H.getString("ed.translationShowAllPages")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"exportToCSVText",{get:function(){return H.getString("ed.translationExportToSCVButton")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"importFromCSVText",{get:function(){return H.getString("ed.translationImportFromSCVButton")},enumerable:!1,configurable:!0}),e.prototype.createActions=function(){var e=this,t=[];return this.createFilterPageAction(),t.push(this.filterPageAction),this.createFilterStringsAction(),t.push(this.filterStringsAction),this.mergeLocaleWithDefaultAction=new r.Action({id:"svd-translation-merge_locale_withdefault",visible:!1,component:"sv-action-bar-item",mode:"small",needSeparator:!0,action:function(){e.model.mergeLocaleWithDefault()}}),t.push(this.mergeLocaleWithDefaultAction),this.importCsvAction=new r.Action({id:"svc-translation-import",iconName:"icon-load",locTitleName:"ed.translationImportFromSCVButton",locTooltipName:"ed.translationImportFromSCVButton",visible:!1,mode:"small",component:"sv-action-bar-item",needSeparator:!0,action:function(){document&&(e.inputFileElement||(e.inputFileElement=document.createElement("input"),e.inputFileElement.type="file",e.inputFileElement.style.display="none",e.inputFileElement.onchange=function(){e.model.importFromCSVFileUI(e.inputFileElement)}),e.inputFileElement.click())}}),t.push(this.importCsvAction),this.exportCsvAction=new r.Action({id:"svc-translation-export",iconName:"icon-download",locTitleName:"ed.translationExportToSCVButton",locTooltipName:"ed.translationExportToSCVButton",visible:!1,mode:"small",component:"sv-action-bar-item",action:function(){e.model.exportToCSVFileUI()}}),t.push(this.exportCsvAction),t},e.prototype.createFilterPageAction=function(){var e=this;this.filterPageAction=Object(r.createDropdownActionModel)({id:"svc-translation-filter-page",title:this.getFilterPageActionTitle(),visible:!1,mode:"small"},{items:[{id:null,title:this.showAllPagesText}],allowSelection:!0,onSelectionChanged:function(t){e.model.filteredPage=t.id?e.creator.survey.getPageByName(t.id):null},horizontalPosition:"center"})},e.prototype.createFilterStringsAction=function(){var e=this;this.filterStringsAction=Object(r.createDropdownActionModel)({id:"svc-translation-show-all-strings",title:this.getFilterStringsActionTitle(),visible:!1,mode:"small"},{items:[{id:"show-all-strings",title:this.showAllStringsText},{id:"show-used-strings-only",title:this.showUsedStringsOnlyText}],allowSelection:!0,onSelectionChanged:function(t){e.model.showAllStrings="show-all-strings"===t.id},horizontalPosition:"center"})},e.prototype.updateFilterStrigsAction=function(e){void 0===e&&(e=!1);var t=this.getFilterStringsActionTitle();if(this.filterStringsAction.title=t,e){this.filterStringsAction.needSeparator=this.filterPageAction.visible;var o=this.filterStringsAction.data;o.selectedItem=o.actions.filter((function(e){return e.title===t}))[0]}},e.prototype.updateFilterPageAction=function(e){if(void 0===e&&(e=!1),this.filterPageAction.title=this.getFilterPageActionTitle(),e){var t=this.filterPageAction.data,o=this.model.filteredPage?this.model.filteredPage.name:null;t.selectedItem=t.actions.filter((function(e){return e.id===o}))[0]}},e.prototype.getFilterPageActionTitle=function(){return this.model&&this.model.filteredPage&&this.getPageDisplayText(this.model.filteredPage)||this.showAllPagesText},e.prototype.getFilterStringsActionTitle=function(){return this.model&&!this.model.showAllStrings?this.showUsedStringsOnlyText:this.showAllStringsText},e.prototype.getPageDisplayText=function(e){return this.creator.getObjectDisplayName(e,"translation-tab","survey-translation",e.title)},e}(),yt={root:"",container:"",header:"",body:"sl-body",bodyEmpty:"",footer:"",title:"",description:"",logo:"",logoImage:"",headerText:"",navigationButton:"",completedPage:"",navigation:{complete:"",prev:"",next:"",start:"",preview:"",edit:""},panel:{title:"",titleExpandable:"",titleOnExpand:"",titleOnError:"",description:"",container:"sl-panel",content:"",icon:"",iconExpanded:"",footer:"sl-panel__footer",requiredText:"sl-panel__required-text"},paneldynamic:{mainRoot:"",root:"",navigation:"",title:"",button:"",buttonRemove:"",buttonAdd:"svc-logic-operator sl-paneldynamic__add-btn",progressTop:"",progressBottom:"",buttonPrev:"",buttonNext:"",progressContainer:"",progress:"",progressBar:"",progressText:"",separator:"sv-hidden",panelWrapper:"",panelWrapperInRow:"sl-panel-wrapper--in-row"},progress:"",progressBar:"",progressText:"",progressTextInBar:"",page:{root:"",title:"",description:""},pageTitle:"",pageDescription:"",row:"sl-row",rowMultiple:"sl-row--multiple",question:{mainRoot:"sl-question",flowRoot:"",asCell:"",header:"sl-question__header",headerLeft:"sl-question__header--left",headerTop:"",headerBottom:"",content:"",contentLeft:"",titleLeftRoot:"",titleOnAnswer:"",titleOnError:"",title:"sl-question__title",requiredText:"sl-question__required-text",number:"",description:"",descriptionUnderInput:"",comment:"",required:"",titleRequired:"",indent:0,footer:"",formGroup:"",hasError:"",disabled:""},image:{root:""},error:{root:"",icon:"",item:"",locationTop:"",locationBottom:""},checkbox:{root:"",item:"",itemSelectAll:"",itemNone:"",itemDisabled:"",itemChecked:"",itemHover:"",itemInline:"",label:"",labelChecked:"",itemControl:"",itemDecorator:"",controlLabel:"",materialDecorator:"",other:"",column:""},radiogroup:{root:"",item:"",itemInline:"",label:"",labelChecked:"",itemDisabled:"",itemChecked:"",itemHover:"",itemControl:"",itemDecorator:"",controlLabel:"",materialDecorator:"",other:"",clearButton:"",column:""},boolean:{mainRoot:"",root:"",item:"",control:"",itemChecked:"",itemIndeterminate:"",itemDisabled:"",label:"",switch:"",disabledLabel:"",itemDecorator:"",materialDecorator:"",sliderText:"",slider:""},text:{root:"",small:"",controlDisabled:"",onError:""},multipletext:{root:"",item:"",itemTitle:"",row:"",cell:""},dropdown:{root:"",popup:"",small:"",control:"sl-dropdown",selectWrapper:"",other:"",onError:"",label:"",item:"",itemDisabled:"",itemChecked:"",itemHover:"",itemControl:"",itemDecorator:"",controlDisabled:"",controlLabel:"",materialDecorator:"",controlValue:"sl-dropdown__value",chevronButton:"",chevronButtonSvg:"",chevronButtonIconId:""},imagepicker:{root:"",item:"",itemInline:"",itemChecked:"",itemDisabled:"",itemHover:"",label:"",itemControl:"",image:"",itemText:"",clearButton:"",other:""},matrix:{mainRoot:"",tableWrapper:"",root:"",row:"",rowAdditional:"",rowError:"",cell:"",headerCell:"",label:"",itemValue:"",itemChecked:"",itemDisabled:"",itemHover:"",materialDecorator:"",itemDecorator:"",cellText:"",cellTextSelected:"",cellTextDisabled:""},matrixdropdown:{tableWrapper:"",mainRoot:"",root:"",row:"",rowAdditional:"",cell:"",headerCell:""},matrixdynamic:{tableWrapper:"",mainRoot:"sl-question st-row__question st-scrollable",root:"sl-table st-matrixdynamic",row:"sl-table__row",rowAdditional:"sl-table__row--additional",cell:"sl-table__cell",headerCell:"sl-table__cell st-table__cell--header",button:"sl-btn",detailRow:"sl-table__row st-table__row--detail",detailButton:"sl-table__cell--detail-button",detailButtonExpanded:"sl-table__cell--detail-button--expanded",detailIcon:"sl-detail-panel__icon",detailIconExpanded:"sl-detail-panel__icon--expanded",detailPanelCell:"sl-table__cell--detail-panel",actionsCell:"sl-table__cell sl-table__cell--actions st-table__cell--actions",buttonAdd:"sl-matrixdynamic__add-btn",buttonRemove:"sl-matrixdynamic__remove-btn",iconAdd:"",iconRemove:""},rating:{root:"",item:"",itemHover:"",selected:"",minText:"",itemText:"",maxText:"",itemDisabled:""},comment:{mainRoot:"",root:"spg-input spg-comment sl-comment",small:""},expression:"",file:{root:"",other:"",placeholderInput:"",preview:"",fileSign:"",fileSignBottom:"",fileDecorator:"",fileInput:"",noFileChosen:"",chooseFile:"",disabled:"",removeButton:"",removeButtonBottom:"",removeFile:"",removeFileSvg:"",wrapper:""},signaturepad:{root:"",small:"",controls:"",placeholder:"",clearButton:""},saveData:{root:"",saving:"",error:"",success:"",saveAgainButton:""},window:{root:"",body:"",header:{root:"",title:"",button:"",buttonExpanded:"",buttonCollapsed:""}},embeddedsurvey:{mainRoot:"sl-embedded-survey"},actionBar:r.defaultActionBarCss},vt=function(){this.conjunction="and",this.operator=a.logic.defaultOperators.default},bt=function(e){function t(t){var o=e.call(this)||this;return o.survey=t,o}return z(t,e),t.prototype.getOperatorText=function(){var e=this.operator;return"equal"==e?"=":"notequal"==e?"<>":"greater"==e?">":"less"==e?"<":"greaterorequal"==e?">=":"lessorequal"==e?"<=":e},t.prototype.getValueText=function(){var e=this.value;if(!e)return e;if(!Array.isArray(e))return this.valToText(e);for(var t="[",o=0;o<e.length;o++)t+=this.valToText(e[o]),o<e.length-1&&(t+=", ");return t+="]"},Object.defineProperty(t.prototype,"isValueRequired",{get:function(){return"empty"!==this.operator&&"notempty"!==this.operator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isReady",{get:function(){return!(!this.questionName||this.isValueRequired&&r.Helpers.isValueEmpty(this.value))},enumerable:!1,configurable:!0}),t.prototype.toExpression=function(){var e=E(this.getQuestionValueByName())+" "+this.getOperatorText();return this.isValueRequired&&(e+=" "+this.getValueText()),e},t.prototype.getQuestionValueByName=function(){var e=this.survey.getQuestionByName(this.questionName);return e&&e.name!=e.getValueName()&&this.questionName!=e.getValueName()?this.questionName.replace(e.name,e.getValueName()):this.questionName},t.prototype.valToText=function(e){return"true"==e||"false"==e||this.isNumeric(e)?e:"["==e[0]?e.replace(/(?!^)(['])(?!$)/g,"\\$1"):(this.isQuote(e[0])||(e="'"+e),this.isQuote(e[e.length-1])||(e+="'"),e.replace(/(?!^)(['"])(?!$)/g,"\\$1"))},t.prototype.isNumeric=function(e){return!("string"==typeof e&&e.length>1&&"0"===e[0]&&"x"!==e[1])&&!isNaN(e)},t.prototype.isQuote=function(e){return"'"==e||'"'==e},t}(vt),wt=function(){function e(e){void 0===e&&(e=null),this.hasValue=e}return e.prototype.build=function(e){if(!e)return[];var t;return(t=(new r.ConditionsParser).parseExpression(e))?this.buildEditorItems(t):[]},e.prototype.buildEditorItems=function(e){var t=[];return this.buildEditorItemsCore(e,t,"")||(t=[]),t},e.prototype.buildEditorItemsCore=function(e,t,o){if("unary"==e.getType())return this.buildEditorItemsAddUnaryOperand(e,t);if("binary"!==e.getType())return!1;var i=e;return!(i.isArithmetic&&!i.isConjunction)&&(i.isConjunction?this.buildEditorItemsAddConjunction(i,t,o):this.buildEditorItemsAddBinaryOperand(i,t))},e.prototype.buildEditorItemsAddConjunction=function(e,t,o){var i=e.conjunction;if("or"==i&&o&&o!=i)return!1;if(!this.buildEditorItemsCore(e.leftOperand,t,i))return!1;var n=t.length;return!!this.buildEditorItemsCore(e.rightOperand,t,i)&&(t[n].conjunction=e.conjunction,!0)},e.prototype.buildEditorItemsAddBinaryOperand=function(e,t){var o=this.getOperandByType(e,"variable"),i=this.getArrayValueFromOperand(e),n=i?null:this.getOperandByType(e,"const");if(!o||!n&&!i&&this.canShowValueByOperator(e.operator))return!1;if(!this.isVariableInSurvey(o.variable))return!1;var r=new vt;return r.questionName=o.variable,r.operator=e.leftOperand!==o?this.getOppositeOperator(e.operator):e.operator,i&&(r.value=i),n&&(r.value=n.correctValue),t.push(r),!0},e.prototype.isVariableInSurvey=function(e){return!this.hasValue||this.hasValue(e)},e.prototype.getArrayValueFromOperand=function(e){var t=this.getOperandByType(e,"array");if(!t||!t.values)return null;var o=t.values;if(!Array.isArray(o)||0==o.length)return null;for(var i=[],n=0;n<o.length;n++){var r=o[n];if(r){if("const"!=r.getType())return null;i.push(r.correctValue)}}return 0==i.length?null:i},e.prototype.buildEditorItemsAddUnaryOperand=function(e,t){var o=e.operator;if("empty"!==o&&"notempty"!=o)return!1;var i=e.expression;if(null==i||"variable"!=i.getType())return!1;var n=i.variable;if(!this.isVariableInSurvey(n))return!1;var r=new vt;return r.questionName=n,r.operator=o,t.push(r),!0},e.prototype.getOppositeOperator=function(e){return"less"==e?"greater":"greater"==e?"less":"lessorequal"==e?"greaterorequal":"greaterorequal"==e?"lessorequal":e},e.prototype.getOperandByType=function(e,t){return e.rightOperand?e.leftOperand.getType()!==t&&e.rightOperand.getType()!==t||e.leftOperand.getType()==t&&e.rightOperand.getType()==t?null:e.leftOperand.getType()==t?e.leftOperand:e.rightOperand:null},e.prototype.canShowValueByOperator=function(e){return"empty"!=e&&"notempty"!=e},e}();r.FunctionFactory.Instance.register("questionValueVisibleIf",(function(e){return 2===e.length&&(!(!e[0]||!e[1])&&("empty"!==e[1]&&"notempty"!==e[1]))}));var Ct=function(e){function t(t,o,i,n){void 0===o&&(o=null),void 0===i&&(i=null),void 0===n&&(n="");var r=e.call(this,i)||this;return r.propertyName=n,r.addConditionQuestionsHash={},r.isModalValue=!0,r.isSettingPanelValues=!1,r.calculatedValueQuestion=null,r.surveyValue=t,r.objectValue=o,r.panelValue=r.editSurvey.getQuestionByName("panel"),r.textEditorValue=r.editSurvey.getQuestionByName("textEditor"),r.options.maxLogicItemsInCondition&&(r.panel.maxPanelCount=r.options.maxLogicItemsInCondition),r.allConditionQuestions=r.createAllConditionQuestions(),r.editSurvey.onValueChanged.add((function(e,t){r.onValueChanged(t)})),r.editSurvey.onDynamicPanelAdded.add((function(e,t){r.onPanelAdded()})),r.editSurvey.onDynamicPanelRemoved.add((function(e,t){0==t.question.panelCount&&t.question.addPanel(),r.panel.panelCount>0&&(r.panel.panels[0].getQuestionByName("questionName").titleLocation="left")})),r.editSurvey.onDynamicPanelItemValueChanged.add((function(e,t){r.onPanelValueChanged(t.panel,t.name)})),r.editSurvey.css=yt,r.editSurvey.onUpdateQuestionCssClasses.add((function(e,t){r.onUpdateQuestionCssClasses(t)})),r.text=r.object&&r.propertyName?r.object[r.propertyName]:"",r.updatePlaceholderVisibileIf(),r}return z(t,e),t.canParseExpression=function(e){return!e||!!(new r.ConditionsParser).parseExpression(e)},t.canBuildExpression=function(e){return!e||!!t.canParseExpression(e)&&(new wt).build(e).length>0},t.isOperatorEnabled=function(e,o){if(!e)return!0;if(!o||0==o.length)return!0;for(var i=[],n=[],r=0;r<o.length;r++){var a=o[r];"!"==a[0]?n.push(a.substring(1)):i.push(a)}return t.isClassContains(e,i,n)},t.isClassContains=function(e,t,o){for(var i=r.Serializer.findClass(e);i;){if(t.indexOf(i.name)>-1)return!0;if(o.indexOf(i.name)>-1)return!1;i=i.parentName?r.Serializer.findClass(i.parentName):null}return 0==t.length},Object.defineProperty(t.prototype,"title",{get:function(){return this.panel.title},set:function(e){this.panel.title=e,this.textEditor.title=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isModal",{get:function(){return this.isModalValue},set:function(e){e!==this.isModalValue&&(this.isModalValue=e,this.updatePlaceholderVisibileIf())},enumerable:!1,configurable:!0}),t.prototype.updatePlaceholderVisibileIf=function(){if(this.panel){var e="";this.isModal&&(e="{panel.questionName} empty and {panelIndex} == 0"),this.panel.template.getQuestionByName("placeholder").visibleIf=e}},t.prototype.getSurveyJSON=function(){return{elements:[{type:"paneldynamic",titleLocation:"hidden",name:"panel",panelRemoveButtonLocation:"right",panelAddText:H.getString("pe.addCondition"),minPanelCount:1,maxPanelCount:1,startWithNewLine:!1,templateElements:[{name:"conjunction",type:"dropdown",renderAs:"logicoperator",titleLocation:"hidden",showOptionsCaption:!1,visibleIf:"{panelIndex} > 0",choices:[{value:"and",text:H.getString("pe.and")},{value:"or",text:H.getString("pe.or")}]},{name:"questionName",type:"dropdown",renderAs:"logicoperator",title:H.getString("pe.if"),titleLocation:"left",showOptionsCaption:!1,startWithNewLine:!1,isRequired:!0},{name:"operator",type:"dropdown",renderAs:"logicoperator",searchEnabled:!1,titleLocation:"hidden",startWithNewLine:!1,showOptionsCaption:!1,isRequired:!0,enableIf:"{panel.questionName} notempty"},{name:"removeAction",type:"linkvalue",titleLocation:"hidden",showOptionsCaption:!1,visible:!1,startWithNewLine:!1,showValueInLink:!1,allowClear:!1,showClear:!1},{name:"questionValue",type:"text",visible:!1},{name:"placeholder",type:"html",visible:!1,html:"<div class='svc-logic-placeholder'><span class=\"svc-logic-placeholder__text\">"+H.getString("pe.emptyLogicPopupMessage")+"<span></div>"}]},{type:"comment",titleLocation:"hidden",name:"textEditor",textUpdateMode:"onTyping",placeholder:H.getString("pe.emptyExpressionPlaceHolder"),visible:!1}]}},t.prototype.getSurveyCreationReason=function(){return"condition-builder"},Object.defineProperty(t.prototype,"text",{get:function(){return this.getText()},set:function(e){this.isModal||t.canBuildExpression(e)?(this.textEditor.value=e,this.showBuilder(e)):(this.panel.panelCount=0,this.showTextEditor(e))},enumerable:!1,configurable:!0}),t.prototype.isModified=function(e){if(this.textEditor.visible)return e!=this.text;var t=this.getEditorItems(),o=e?(new r.ConditionsParser).parseExpression(e):null;if(!o)return!(1==t.length&&!t[0].questionName);if(!this.isReady)return!0;var i=(new r.ConditionsParser).parseExpression(this.text);return!o.isEqual(i)},Object.defineProperty(t.prototype,"context",{get:function(){return this.contextValue},set:function(e){e!==this.context&&(this.contextValue=e,this.updateNamesOnContextChanged(),this.onContextChanged&&this.onContextChanged(e))},enumerable:!1,configurable:!0}),t.prototype.processText=function(e){this.panel.panelCount=0;var t=(new wt).build(e);this.buildPanels(t)},Object.defineProperty(t.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"object",{get:function(){return this.objectValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panel",{get:function(){return this.panelValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textEditor",{get:function(){return this.textEditorValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isReady",{get:function(){if(this.textEditor.visible)return t.canParseExpression(this.textEditor.value);for(var e=0;e<this.panel.panels.length;e++)if(!this.createEditorItemFromPanel(this.panel.panels[e]).isReady)return!1;return!0},enumerable:!1,configurable:!0}),t.prototype.isEmpty=function(){return 0===this.panel.panels.length||!(this.panel.panels.length>1)&&!this.createEditorItemFromPanel(this.panel.panels[0]).questionName},t.prototype.hasErrorInUI=function(){var e=this.survey.creator;return!this.isReady&&(this.hasErrors(),this.errorText=Ee("expressionInvalid"),e&&e.notify(this.errorText,"error"),!0)},t.prototype.apply=function(){return!this.hasErrorInUI()&&(this.object&&this.propertyName?(this.object[this.propertyName]=this.text,!0):void 0)},t.prototype.setIsFastEntry=function(e){e?this.showTextEditor(this.text):this.panel.visible||this.showBuilder(this.text)},t.prototype.buildPanels=function(e){this.panel.panelCount=e.length;for(var t=0;t<e.length;t++)this.setItemToPanel(e[t],this.panel.panels[t]);0==this.panel.panelCount&&this.panel.addPanel()},t.prototype.setupConditionOperator=function(e,o){var i=this,n=o.getQuestionByName("operator");n.choices=this.getOperators(),n.value=e.operator,n.onOpened.add((function(e,n){var r=o.getQuestionByName("questionName").value,s=i.getQuestionConditionJson(r),l=s?s.type:null;n.choices.forEach((function(e,o){var n=t.isOperatorEnabled(l,a.operators[e.value]);n=i.options.isConditionOperatorEnabled(r,e.value,n),e.setIsEnabled(n),e.setIsVisible(n)}))}))},t.prototype.setupConditionQuestionName=function(e,t){var o=t.getQuestionByName("questionName");o.choices=this.getConditionQuestions(),o.titleLocation=0==this.panel.panels.indexOf(t)?"left":"hidden";var i=this.getQuestionNameToPanel(e.questionName);this.getConditionQuestion(i)&&(o.value=i)},t.prototype.setupRemoveQuestion=function(e){var t=e.getQuestionByName("removeAction").parentQuestion,o=e.getQuestionByName("removeAction");o.linkClickCallback=function(){t&&t.removePanelUI(e)},o.linkSetButtonCssClasses="svc-logic-condition-remove svc-icon-remove",o.linkValueText=""},t.prototype.setItemToPanel=function(e,t){this.isSettingPanelValues=!0,t.getQuestionByName("conjunction").value=e.conjunction,this.setupConditionOperator(e,t),this.setupConditionQuestionName(e,t),t.getQuestionByName("questionValue")&&(t.getQuestionByName("questionValue").value=e.value,this.updateSurveyVariable(e)),this.setupRemoveQuestion(t),this.isSettingPanelValues=!1},t.prototype.updateSurveyVariable=function(e){this.editSurvey.setVariable(e.questionName,e.value)},t.prototype.getConditionQuestions=function(){if(!this.context)return this.allConditionQuestions;for(var e=[],t=0;t<this.allConditionQuestions.length;t++){var o=this.allConditionQuestions[t];o.context&&o.context!==this.context||e.push(o)}return e},t.prototype.getText=function(){if(this.textEditor.visible)return this.textEditor.value;for(var e="",t=this.getEditorItems(),o=0;o<t.length&&t[o].isReady;o++)e&&(e+=" "+t[o].conjunction+" "),e+=t[o].toExpression();return e},t.prototype.getEditorItems=function(){for(var e=[],t=0;t<this.panel.panels.length;t++)e.push(this.createEditorItemFromPanel(this.panel.panels[t]));return e},t.prototype.createEditorItemFromPanel=function(e){var t=new bt(this.survey);return t.conjunction=e.getQuestionByName("conjunction").value,t.questionName=this.getQuestionNameFromPanel(e.getQuestionByName("questionName").value),t.operator=e.getQuestionByName("operator").value,e.getQuestionByName("questionValue")&&(t.value=e.getQuestionByName("questionValue").value,this.updateSurveyVariable(t)),t},t.prototype.getQuestionNameFromPanel=function(e){if(!this.context||!e)return e;var t=this.context.getValueName()+".";return e.replace(t,"")},t.prototype.getContextIndexInfo=function(e,t){return void 0===t&&(t=""),re.getQuestionContextIndexInfo(e,t)},t.prototype.getQuestionNameToPanel=function(e){if(!this.context||!e)return e;var t=this.getContextIndexInfo(e);return t&&0===t.index?this.context.getValueName()+"."+e:e},t.prototype.getContextFromPanels=function(){if(this.object)return null;for(var e=0;e<this.panel.panels.length;e++){var t=this.panel.panels[e].getQuestionByName("questionName").value,o=this.getContextByQuestionName(t);if(o)return o}return null},t.prototype.updateNamesOnContextChanged=function(){for(var e=0;e<this.panel.panels.length;e++)this.panel.panels[e].getQuestionByName("questionName").choices=this.getConditionQuestions()},t.prototype.getContextByQuestionName=function(e){if(!e)return null;var t=this.getContextIndexInfo(e,".");return t?(e=e.substring(0,t.index),this.survey.getQuestionByValueName(e)):null},t.prototype.createAllConditionQuestions=function(){if(!this.survey)return[];var e=[],t=this.survey.getAllQuestions(),o=this.getContextObject(),i="acs";if(t.length>0){for(var n=0;n<t.length;n++){if(o!=(a=t[n])){var r=o||(!this.context||this.context===a);a.addConditionObjectsByContext(e,r)}}i=this.options.onConditionQuestionsGetListCallback(this.propertyName,this.object,this,e);for(n=0;n<e.length;n++){e[n].value=e[n].name;var a=e[n].question?e[n].question:e[n];if(!this.options.showTitlesInExpressions){var s=e[n].name,l=a.valueName;l&&0==s.indexOf(l)&&(s=s.replace(l,a.name)),e[n].text=this.options.getObjectDisplayName(a,"condition-editor","condition",s)}this.addConditionQuestionsHash[e[n].name]=a}}var u=this.survey.getVariableNames();return this.addSurveyCalculatedValues(u),this.addValuesIntoConditionQuestions(u,e),"asc"===i&&re.sortItems(e),e},t.prototype.getContextObject=function(){if(this.object&&this.object.isDescendantOf("itemvalue")){var e=this.object.locOwner;if(e&&e.getType)return e.locOwner&&e.locOwner.isDescendantOf("matrixdropdowncolumn")?e.locOwner:e}return this.object},t.prototype.addValuesIntoConditionQuestions=function(e,t){for(var o=0;o<e.length;o++){var i=e[o].name?e[o].name:e[o];this.addConditionQuestionsHash[i]=this.getCalculatedValueQuestion(),t.push({value:i,text:i,question:this.getCalculatedValueQuestion()})}},t.prototype.addSurveyCalculatedValues=function(e){this.survey.calculatedValues.forEach((function(t){e.indexOf(t.name)<0&&e.push(t.name)}))},t.prototype.getCalculatedValueQuestion=function(){return this.calculatedValueQuestion||(this.calculatedValueQuestion=r.Serializer.createClass("text"),this.calculatedValueQuestion.name="question"),this.calculatedValueQuestion},t.prototype.getOperators=function(){var e=[],t=a.operators;for(var o in t)e.push(new r.ItemValue(o,H.getString("op."+o)));return e},t.prototype.rebuildQuestionValue=function(e){e.getQuestionByName("questionValue")&&e.getQuestionByName("questionValue").clearValue();var t=this.getQuestionConditionJson(e.getQuestionByName("questionName").value,e.getQuestionByName("operator").value);t||(t={type:"text"}),t.isRequired=!0,re.updateQuestionJson(t),t.enableIf="{panel.questionName} notempty and {panel.operator} != 'empty' and {panel.operator} != 'notempty'";var o=r.Serializer.createClass(t.type);delete t.type,(new r.JsonObject).toObject(t,o),o||(o=r.Serializer.createClass("text",t));var i=e.getQuestionByName("questionValue");if(i&&e.removeElement(i),this.canShowQuestionValue(e)){var n=o.title;o.name="questionValue",o.visibleIf="questionValueVisibleIf({panel.questionName}, {panel.operator})",o.title=n,o.description="",o.titleLocation="top",o.hasComment=!1,e.addElement(o)}},t.prototype.rebuildQuestionValueOnOperandChanging=function(e){var t=this.getQuestionConditionJson(e.getQuestionByName("questionName").value,e.getQuestionByName("operator").value),o=e.getQuestionByName("questionValue");!o||!o.isReadOnly&&o.isVisible||o.clearValue(),!o||t&&t.type==o.getType()||this.rebuildQuestionValue(e)},t.prototype.canShowQuestionValue=function(e){var t=e.getQuestionByName("operator");if(!t)return!1;this.updateOperatorEnables(e);for(var o=t.choices,i=0;i<o.length;i++)if(o[i].isEnabled){var n=o[i].value;if("empty"!==n&&"notempty"!=n)return!0}return!1},t.prototype.getConditionQuestion=function(e){return this.addConditionQuestionsHash[e]},t.prototype.getQuestionConditionJson=function(e,o){var i="",n=this.getConditionQuestion(e);if(!n)return null;o||(o=this.getDefaultOperatorByQuestion(n)),0==e.indexOf(n.getValueName())&&(i=e.substring(n.getValueName().length));var r=this.getContextIndexInfo(e);r&&0==r.index&&(i=e.substring(r.name.length)),i||(i=e),i&&"."==i[0]&&(i=i.substring(1));var a=n&&n.getConditionJson?n.getConditionJson(o,i):null;return a?(a.choicesFromQuestion&&this.updateChoicesFromQuestion(a),"expression"==a.type&&(a.type="text"),"anyof"==o&&(t.isClassContains(a.type,["checkbox"],[])||(a.type="checkbox")),a):null},t.prototype.updateChoicesFromQuestion=function(e){var t=this.getConditionQuestion(e.choicesFromQuestion);if(t){delete e.choicesFromQuestion;var o=t.toJSON();o.choices&&(e.choices=o.choices),o.choicesByUrl&&(e.choicesByUrl=o.choicesByUrl)}},t.prototype.updateOperatorEnables=function(e){var o=e.getQuestionByName("questionName");if(o){var i=this.getQuestionConditionJson(o.value),n=i?i.type:null,r=e.getQuestionByName("operator");if(r){for(var s=r.choices,l=!0,u=r.value,c=0;c<s.length;c++){var p=t.isOperatorEnabled(n,a.operators[s[c].value]);s[c].setIsEnabled(p),s[c].setIsVisible(p),s[c].value==u&&(l=s[c].isEnabled)}l||(r.value=this.getFirstEnabledOperator(s))}}},t.prototype.updateQuestionsWidth=function(e){var t=e.getQuestionByName("questionValue"),o=e.getQuestionByName("conjunction"),i=e.getQuestionByName("questionName"),n=e.getQuestionByName("operator"),r=!!t&&!t.startWithNewLine,a=!o||!o.isVisible;a||(o.minWidth="50px",o.width="15%"),i.minWidth="50px",i.width=a?"40%":"25%",n.minWidth="50px",n.width=r?"25%":"60%",t&&(t.minWidth="50px",t.width=r?"35%":"")},Object.defineProperty(t.prototype,"defaultOperator",{get:function(){return a.logic.defaultOperators.default},enumerable:!1,configurable:!0}),t.prototype.getDefaultOperatorByQuestionName=function(e){return this.getDefaultOperatorByQuestion(this.getConditionQuestion(e))},t.prototype.getDefaultOperatorByQuestion=function(e){if(e){var t=a.logic.defaultOperators;if(t[e.getType()])return t[e.getType()]}return this.defaultOperator},t.prototype.getFirstEnabledOperator=function(e){for(var t=0;t<e.length;t++)if(e[t].isEnabled)return e[t].value;return this.defaultOperator},t.prototype.onPanelAdded=function(){this.setItemToPanel(new vt,this.panel.panels[this.panel.panels.length-1])},t.prototype.onPanelValueChanged=function(e,t){"questionName"==t&&(this.context=this.getContextFromPanels(),this.rebuildQuestionValue(e),this.isSettingPanelValues||(e.getQuestionByName("operator").value=this.getDefaultOperatorByQuestionName(e.getQuestionByName("questionName").value))),"operator"==t&&this.rebuildQuestionValueOnOperandChanging(e),this.updateOperatorEnables(e),this.updateQuestionsWidth(e)},t.prototype.onUpdateQuestionCssClasses=function(e){var t=e.cssClasses,o=e.question;t.answered="svc-logic-question--answered","conjunction"===o.name&&(o.allowRootStyle=!1,t.control+=" svc-logic-operator svc-logic-operator--conjunction "),"questionName"===o.name&&(o.allowRootStyle=!1,t.control+=" svc-logic-operator svc-logic-operator--question",t.error.root="svc-logic-operator__error",t.onError="svc-logic-operator--error"),"operator"===o.name&&(o.allowRootStyle=!1,t.control+=" svc-logic-operator svc-logic-operator--operator"),"removeAction"===o.name&&(o.allowRootStyle=!1,t.mainRoot+=" svc-logic-condition-remove-question"),("questionValue"===o.name||o.isContentElement)&&(P(t,o.getType()),t.mainRoot+=" svc-logic-question-value sd-element--with-frame",t.error.root="svc-logic-operator__error"),"panel"===o.name&&(t.root+=" svc-logic-paneldynamic",t.buttonAdd+=" svc-logic-operator--operator",t.iconRemove="svc-icon-remove",t.buttonRemove="svc-logic-paneldynamic__button svc-logic-paneldynamic__remove-btn",t.buttonRemoveRight="svc-logic-paneldynamic__remove-btn--right",t.buttonRemoveText="svc-logic-paneldynamic__button-remove-text")},t.prototype.onValueChanged=function(e){if("panel"===e.question.name&&e.value.length>0){var t=this.options.maxLogicItemsInCondition>0?this.options.maxLogicItemsInCondition:100;e.question.maxPanelCount=1!==e.value.length||e.value[0].questionName?t:1,this.panel.panels.forEach((function(t){t.getQuestionByName("removeAction").visible=1!==e.value.length}))}this.setTitle()},t.prototype.setTitle=function(){var e=this.isReady?this.text:"";this.title=this.options.onConditionGetTitleCallback(e,e||H.getString("pe.ruleIsNotSet"))},t.prototype.showTextEditor=function(e){this.panel.visible=!1,this.textEditor.value=e,this.textEditor.visible=!0},t.prototype.showBuilder=function(e){(this.isModal||this.getCanShowBuilder(e))&&(this.textEditor.visible=!1,this.processText(e),this.panel.visible=!0)},t.prototype.getCanShowBuilder=function(e){return t.canBuildExpression(e)},t}(Qe),xt=function(){function e(e,t,o){this.panel=e,this.initialLogicAction=t,this.logicType=o}return e.createActionModel=function(e,t,o,i){return o&&o.hasSelectorChoices?new Tt(e,t,o,i):new St(e,t,o)},e.prototype.updateCurrentLogicAction=function(e){return!1},e.prototype.afterUpdateInitialLogicAction=function(){},e.prototype.resetElements=function(){},e.prototype.getSelectedElement=function(){return null},e.prototype.updateInitialLogicAction=function(){this.initialLogicAction=this.currentLogicAction,this.afterUpdateInitialLogicAction&&this.afterUpdateInitialLogicAction()},e.prototype.setInitialElementValue=function(e,t,o){o&&0!==e.choices.filter((function(e){return e.value===o})).length?e.value=o:e.value=t&&t.logicType==this.logicType?t.elementName:void 0},e}(),Tt=function(e){function t(t,o,i,n){var r=e.call(this,t,o,i)||this;return r.selectorElementsHash=n,r}return z(t,e),t.prototype.getSelectorOptionsText=function(e){var t=e.baseClass,o="page"==t?"pe.conditionSelectPage":"panel"==t?"pe.conditionSelectPanel":"pe.conditionSelectQuestion";return H.getString(o)},t.prototype.getElementBySelectorName=function(e){var t=e.getQuestionByName("elementSelector").value;return t?this.selectorElementsHash[t]:null},t.prototype.updateCurrentLogicAction=function(e){var t=this.getElementBySelectorName(this.panel);return(!this.initialLogicAction||this.initialLogicAction.logicType!=this.logicType||!!t&&this.initialLogicAction.element!=t)&&(this.currentLogicAction=new Ve(this.logicType,t,e),!0)},t.prototype.resetElements=function(){this.panel.getQuestionByName("elementSelector").visible=!1},t.prototype.updatePanelElements=function(e,t){var o=this.panel.getQuestionByName("elementSelector");o.visible=!0,o.choices=t,o.allowClear=!1,o.optionsCaption=this.getSelectorOptionsText(this.logicType),this.setInitialElementValue(o,this.initialLogicAction,e)},t.prototype.getSelectedElement=function(){return this.panel.getQuestionByName("elementSelector").value},t}(xt),St=function(e){function t(t,o,i){var n=e.call(this,t,o,i)||this;return n.isTrigger=!0,n}return z(t,e),t.prototype.recreateQuestion=function(e,t,o,i){var n=o?e.getQuestionByName(o):null;if(n){var a=e.getElementByName("triggerEditorPanel"),s=r.Serializer.createClass("panel");new Ge(t,i).setupObjPanel(s,!0,"logic");var l=s.getQuestionByName(o);if(l){var u=a.elements.indexOf(n);a.addElement(l,u),n.delete()}"setValue"===l.name&&this.updateSetValueQuestion(l),this.updateVisibilityPanel(a),s.dispose()}},t.prototype.updateSetValueQuestion=function(e){var t=e.obj,o=t.getSurvey();if(o||(o=t.owner),t.setToName&&o){var i=o.getQuestionByValueName(t.setToName);e.title=i.title,e.titleLocation="top"}},t.prototype.updateRunExpressionQuestion=function(e){e.titleLocation="hidden",e.placeholder=H.getString("pe.emptyExpressionPlaceHolder")},t.prototype.createElementPanelObj=function(){var e=this.initialLogicAction,t=e&&e.logicType==this.logicType?e.element:null,o=this.logicType.createNewObj(t);return this.setPanelObj(o),o},t.prototype.getQuestions=function(){var e=this,t=this.panel.getElementByName("triggerQuestionsPanel");return 0!==t.elements.length&&this.logicType.questionNames?t.elements.filter((function(t){return-1!==e.logicType.questionNames.indexOf(t.name)})):null},t.prototype.resetPanel=function(e){var t=this.panel.getElementByName(e);t.questions.forEach((function(e){e.clearValue()})),t.elements.splice(0,t.elements.length),t.visible=!1},t.prototype.updateVisibilityPanel=function(e){e.elements.length>0?e.visible=e.elements.filter((function(e){return e.visible})).length>0:e.visible=!1},t.prototype.updatePanelQuestionsValue=function(e){var t=this;e.onSurveyLoad(),e.questions.forEach((function(e){r.Helpers.isValueEmpty(t.panelObj[e.getValueName()])||(e.value=t.panelObj[e.getValueName()])}))},t.prototype.afterUpdateInitialLogicAction=function(){this.setPanelObj(this.initialLogicAction.element),this.panelObj&&this.logicType.saveNewElement(this.panelObj)},t.prototype.updateCurrentLogicAction=function(e){if(!(!this.initialLogicAction||this.initialLogicAction.logicType!=this.logicType)){for(var t=this.initialLogicAction.element,o=this.panelObj.toJSON(),i=Object.keys(o),n=Object.keys(t.toJSON()),r=[],a=0;a<n.length;a++){var s=n[a];i.indexOf(s)<0&&r.push(s)}t.fromJSON(o),this.currentLogicAction=this.initialLogicAction;for(a=0;a<r.length;a++)t[r[a]]=void 0;return!1}return this.currentLogicAction=new Ve(this.logicType,this.panelObj,e),!0},t.prototype.updatePanel=function(e,t,o,i){this.panelObj&&(this.panelObj[e]=t,this.logicType&&this.logicType.dependedOnPropertyName===e&&this.recreateQuestion(this.panel,this.panelObj,this.logicType.dynamicPropertyName,o),this.panel.runCondition(i.getAllValues(),{survey:i}))},t.prototype.setPanelObj=function(e){var t=this,o=this.panelObj;o&&(o.onPropertyValueChangedCallback=void 0),this.panelObj=e,e&&(e.onPropertyValueChangedCallback=function(e,i,n,r,a){if(t.panel&&!t.panel.isDisposed){var s=t.panel.getQuestionByName(e);s&&(s.value=n)}else o.onPropertyValueChangedCallback=void 0})},t.prototype.resetElements=function(){this.setPanelObj(null),this.resetPanel("triggerQuestionsPanel"),this.resetPanel("triggerEditorPanel")},t.prototype.updatePanelElements=function(e,t){var o=this,i=this.panel.getElementByName("triggerEditorPanel"),n=this.panel.getElementByName("triggerQuestionsPanel"),r=this.createElementPanelObj();new Ge(r,t).setupObjPanel(i,!0,"logic"),i.title="";var a=i.getQuestionByName("runExpression");(a&&this.updateRunExpressionQuestion(a),this.logicType.questionNames)&&i.elements.filter((function(e){return-1!==o.logicType.questionNames.indexOf(e.name)})).forEach((function(e){var t=e;"dropdown"===t.getType()&&(t.allowClear=!1,t.renderAs="logicoperator"),n.addQuestion(t)}));i.getElementByName(this.logicType.propertyName).visible=!1,this.updateVisibilityPanel(n),this.updatePanelQuestionsValue(n),this.updateVisibilityPanel(i),this.updatePanelQuestionsValue(i);var s=this.getQuestions();s&&e&&s.forEach((function(t){o.setInitialElementValue(t,o.initialLogicAction,e),e=null}))},t.prototype.getSelectedElement=function(){var e=this.getQuestions();if(e){var t=e[0];return!!t&&t.value}},t}(xt);r.FunctionFactory.Instance.register("logicTypeVisibleIf",(function(e){if(!this.question||!this.question.parentQuestion||1!=e.length)return!0;var t=this.question.parentQuestion.panels;if(t.length<2)return!0;for(var o=0;o<t.length;o++){var i=t[o].getQuestionByName("logicTypeName");if(i!=this.question&&i.value==e[0])return!1}return!0}));var Pt=function(e){function t(t,o){void 0===o&&(o=null);var i=e.call(this,o)||this;return i.options=o,i.initialSelectedElements={},i.isModifiedValue=!1,i.selectorElementsHash={},i.options||(i.options=new s),i.editSurvey.onDynamicPanelItemValueChanged.add((function(e,t){"logicTypeName"==t.name&&i.onLogicTypeChanged(t.panel);var o=i.getActionModelByPanel(t.panel);o.isTrigger&&o.updatePanel(t.name,t.value,i.options,i.editSurvey)})),i.editSurvey.onDynamicPanelRemoved.add((function(e,t){if(!i.isBuildingPanels){var o=i.getActionModelByPanel(t.panel);o&&o.initialLogicAction&&i.editableItem.removeAction(o.initialLogicAction),0==i.panel.panelCount&&i.panel.addPanel(),i.panel.panelCount>0&&(i.panels[0].getQuestionByName("logicTypeName").title=H.getString("pe.then"))}})),i.editSurvey.onDynamicPanelAdded.add((function(e,t){if(!i.isBuildingPanels){var o=i.panels[i.panel.panelCount-1];i.onPanelAdded(o,null)}})),i.editSurvey.css=yt,i.editSurvey.onUpdateQuestionCssClasses.add((function(e,t){i.onUpdateQuestionCssClasses(t)})),i.editSurvey.onUpdatePanelCssClasses.add((function(e,t){i.onUpdatePanelCssClasses(t)})),i.editSurvey.onQuestionAdded.add((function(e,t){i.onQuestionAdded(t)})),i.editSurvey.onGetQuestionTitleActions.add((function(e,t){i.onGetQuestionTitleActions(t)})),i.editSurvey.onValueChanged.add((function(e,t){i.onValueChanged(t)})),i.setEditableItem(t),i}return z(t,e),Object.defineProperty(t.prototype,"editableItem",{get:function(){return this.editableItemValue},enumerable:!1,configurable:!0}),t.prototype.setEditableItem=function(e){this.editableItemValue=e,this.buildInitialSelectedElements(),this.buildPanels(),this.resetModified()},Object.defineProperty(t.prototype,"survey",{get:function(){return this.editableItem.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isModified",{get:function(){return this.isModifiedValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panel",{get:function(){return this.editSurvey.getQuestionByName("panel")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panels",{get:function(){return this.panel.panels},enumerable:!1,configurable:!0}),t.prototype.getActionModelByPanel=function(e){return e.actionModel},t.prototype.setActionModelByPanel=function(e,t){e.actionModel=t},Object.defineProperty(t.prototype,"context",{get:function(){return this.contextValue},set:function(e){e!==this.context&&(this.contextValue=e,this.updatePanelsOnContextChanged())},enumerable:!1,configurable:!0}),t.prototype.getLogicTypeByPanel=function(e){return this.getLogicTypeByName(e.getQuestionByName("logicTypeName").value)},t.prototype.getSurveyJSON=function(){return{clearInvisibleValues:"onHidden",elements:[{type:"paneldynamic",name:"panel",title:Ee("actionsEditorTitle"),titleLocation:"hidden",panelAddText:Ee("addNewAction"),panelRemoveButtonLocation:"right",panelCount:0,minPanelCount:1,maxPanelCount:1,templateElements:[{name:"logicTypeName",type:"dropdown",renderAs:"logicoperator",searchEnabled:!1,allowClear:!1,title:H.getString("pe.then"),titleLocation:"left",isRequired:!0,optionsCaption:Ee("selectedActionCaption"),requiredErrorText:this.getLocString("pe.conditionActionEmpty")},{name:"logicTypeDescription",type:"html",startWithNewLine:!1,visible:!1},{name:"elementSelector",type:"dropdown",renderAs:"logicoperator",allowClear:!1,titleLocation:"hidden",isRequired:!0,startWithNewLine:!1,visible:!1},{name:"triggerQuestionsPanel",type:"panel",startWithNewLine:!1,visible:!1},{name:"removeAction",type:"linkvalue",titleLocation:"hidden",showOptionsCaption:!1,visible:!1,startWithNewLine:!1,showValueInLink:!1,allowClear:!1,showClear:!1},{name:"triggerEditorPanel",type:"panel",visible:!1}]}]}},t.prototype.getSurveyCreationReason=function(){return"logic-item-editor"},t.prototype.resetModified=function(){this.isModifiedValue=!1},t.prototype.isEmpty=function(){return 0===this.panels.length||!(this.panels.length>1)&&!this.getActionModelByPanel(this.panels[0])},t.prototype.apply=function(){if(this.editSurvey.hasErrors())return!1;for(var e=0;e<this.panels.length;e++)this.applyPanel(this.panels[e]);return this.resetModified(),!0},t.prototype.getEditingActions=function(){var e=this;return this.panels.map((function(t){var o=e.getActionModelByPanel(t);return o.updateCurrentLogicAction(e.survey),o.currentLogicAction||o.initialLogicAction})).filter((function(e){return!!e}))},t.prototype.onUpdateQuestionCssClasses=function(e){var t=e.cssClasses,o=e.question;t.answered="svc-logic-question--answered","logicTypeName"===o.name&&(o.allowRootStyle=!1,t.control+=" svc-logic-operator svc-logic-operator--action",t.error.root="svc-logic-operator__error",t.onError="svc-logic-operator--error"),"elementSelector"!==o.name&&"setToName"!==o.name&&"fromName"!==o.name&&"gotoName"!==o.name||(o.allowRootStyle=!1,t.control+=" svc-logic-operator svc-logic-operator--question",t.error.root="svc-logic-operator__error",t.onError="svc-logic-operator--error"),"setToName"!==o.name&&"fromName"!==o.name||(o.allowRootStyle=!1,o.titleLocation="left",o.startWithNewLine=!1,t.error.root="svc-logic-operator__error",t.onError="svc-logic-operator--error"),("setValue"===o.name||o.isContentElement)&&(P(t,o.getType()),t.mainRoot+=" svc-logic-question-value sd-element--with-frame"),"removeAction"===o.name&&(o.allowRootStyle=!1,t.mainRoot+=" svc-logic-condition-remove-question"),"panel"===o.name&&(t.root+=" svc-logic-paneldynamic",t.buttonAdd+=" svc-logic-operator--action ",t.iconRemove="svc-icon-remove",t.buttonRemove="svc-logic-paneldynamic__button svc-logic-paneldynamic__remove-btn",t.buttonRemoveRight="svc-logic-paneldynamic__remove-btn--right",t.buttonRemoveText="svc-logic-paneldynamic__button-remove-text")},t.prototype.onUpdatePanelCssClasses=function(e){"triggerEditorPanel"===e.panel.name&&(e.cssClasses.panel.container+=" svc-logic_trigger-editor"),"triggerQuestionsPanel"===e.panel.name&&(e.panel.allowRootStyle=!1,e.cssClasses.panel.container+=" svc-logic_trigger-questions")},t.prototype.onValueChanged=function(e){this.isModifiedValue=!0,e.question.maxPanelCount=1!==e.value.length||e.value[0].logicTypeName?100:1,this.panels.forEach((function(t){t.getQuestionByName("removeAction").visible=1!==e.value.length}))},t.prototype.onQuestionAdded=function(e){"setToName"!==e.question.name&&"fromName"!==e.question.name||(e.question.titleLocation="left",e.question.startWithNewLine=!1)},t.prototype.onGetQuestionTitleActions=function(e){"setValue"===e.question.name&&(e.titleActions=[])},t.prototype.applyPanel=function(e){var t=this.getActionModelByPanel(e);t.updateCurrentLogicAction(this.survey)&&(this.editableItem.replaceAction(t.currentLogicAction,t.initialLogicAction),t.updateInitialLogicAction())},t.prototype.buildInitialSelectedElements=function(){if(this.initialSelectedElements={},this.editableItem)for(var e=0;e<this.editableItem.actions.length;e++){var t=this.editableItem.actions[e];if(this.isElementSelectorVisible(t.logicType)){var o=t.logicTypeName;this.initialSelectedElements[o]||(this.initialSelectedElements[o]=[]),this.initialSelectedElements[o].push(t.element)}}},t.prototype.buildPanels=function(){if(this.panel.panelCount=0,this.editableItem){this.logicTypeChoices=this.getLogicTypeChoices();for(var e=0;e<this.editableItem.actions.length;e++)this.onPanelAdded(this.panel.addPanel(),this.editableItem.actions[e]);0==this.panel.panelCount&&this.onPanelAdded(this.panel.addPanel(),null)}},t.prototype.onPanelAdded=function(e,t){var o=e.getQuestionByName("logicTypeName");if(o.title=this.panel.panelCount>1?H.getString("pe.and"):H.getString("pe.then"),o.choices=this.logicTypeChoices,o.allowClear=!1,t){var i=xt.createActionModel(e,t,this.getLogicTypeByName(t.logicTypeName),this.selectorElementsHash);this.setActionModelByPanel(e,i),o.value=t.logicTypeName}var n=e.getQuestionByName("removeAction"),r=n.parentQuestion;return n.linkClickCallback=function(){r&&r.removePanelUI(e)},n.linkSetButtonCssClasses="svc-logic-condition-remove svc-icon-remove",n.linkValueText="",e},t.prototype.updatePanelsOnContextChanged=function(){if(this.logicTypeChoices=this.getLogicTypeChoices(),this.context)for(var e=this.panels.length-1;e>=0;e--){var t=this.panels[e];this.isPanelSupportContext(t)||(0===e&&1===this.panels.length?t.getQuestionByName("logicTypeName").clearValue():this.panel.removePanel(e))}for(e=0;e<this.panels.length;e++)this.updateSelectorOnContextChanged(this.panels[e])},t.prototype.isPanelSupportContext=function(e){var t=this.getLogicTypeByPanel(e);return!!t&&t.supportContext(this.context)},t.prototype.updateSelectorOnContextChanged=function(e){var t=e.getQuestionByName("logicTypeName");t.choices=this.logicTypeChoices,t.allowClear=!1;var o=this.getLogicTypeByPanel(e);if(this.isElementSelectorVisible(o)){var i=e.getQuestionByName("elementSelector");i.choices=this.getSelectorChoices(o),i.allowClear=!1}},t.prototype.getLogicTypeChoices=function(){for(var e=[],t=this.editableItem.getVisibleLogicTypes(),o=0;o<t.length;o++){var i=t[o];if(!this.context||i.supportContext(this.context)){var n=new r.ItemValue(i.name,i.displayName);i.isUniqueItem&&(n.visibleIf="logicTypeVisibleIf({item})"),e.push(n)}}return e},t.prototype.onLogicTypeChanged=function(e){var t=this.getLogicTypeByPanel(e);e.getQuestionByName("logicTypeDescription").html=t?t.description:"";var o,i=this.getActionModelByPanel(e);if(i&&(o=i.getSelectedElement(),i.resetElements()),t){var n=xt.createActionModel(e,i?i.initialLogicAction:null,t,this.selectorElementsHash);this.setActionModelByPanel(e,n),n.isTrigger?n.updatePanelElements(o,this.options):n.updatePanelElements(o,this.getSelectorChoices(n.logicType))}},t.prototype.getLogicTypeByName=function(e){if(!e)return null;for(var t=this.editableItem.getVisibleLogicTypes(),o=0;o<t.length;o++)if(t[o].name==e)return t[o];return null},t.prototype.isElementSelectorVisible=function(e){return!!e&&e.hasSelectorChoices},t.prototype.getLocString=function(e){return H.getString(e)},t.prototype.getElementText=function(e,t){var o="";return t&&(o=e.locTitle.renderedHtml),o||(o=e.name),e.isQuestion&&(o=this.options.getObjectDisplayName(e,"logic-tab:question-selector","condition",o)),o},t.prototype.getSelectorChoices=function(e){if(!e.hasSelectorChoices)return[];for(var t=e.getSelectorChoices(this.survey,this.context),o=[],i=this.options.showTitlesInExpressions,n=0;n<t.length;n++){var a="",s="",l=t[n],u=e.getParentElement(l);u&&(a=u.name+".",s=this.getElementText(u,i)+".");var c=this.getElementText(l,i),p=a+l.name,d=new r.ItemValue(p,s+c);this.selectorElementsHash[p]=l,l[e.propertyName]&&!this.isElementInInitialSelection(e.name,l)&&(d.enableIf="1=2",d.visibleIf="1=2"),o.push(d)}return re.sortItems(o),o},t.prototype.isElementInInitialSelection=function(e,t){return!!this.initialSelectedElements[e]&&this.initialSelectedElements[e].indexOf(t)>-1},t}(Qe);function Et(e,t){if(!Array.isArray(e))return null;for(var o=0;o<e.length;o++)if(e[o].id===t)return e[o];return null}function Ot(e,t,o){var i=Et(t,"remove-row");i&&(i.component="sv-action-bar-item",i.iconName="icon-delete",i.innerCss="spg-action-button spg-action-button--danger",i.title=e.removeRowText,i.showTitle=!1,i.visibleIndex=10,i.action=function(){e.removeRowUI(o)})}o(11);var It=function(e){function t(t,o){void 0===o&&(o=null);var i=e.call(this,t,o)||this;return i.survey=t,i.options=o,i.itemUIHash={},i.options||(i.options=new s),i.setupToolbarItems(),i.update(),i}return z(t,e),t.prototype.update=function(t,o){var i=this;void 0===t&&(t=null),void 0===o&&(o=null),e.prototype.update.call(this,t,o);var n=this.options.createSurvey(this.getLogicItemSurveyJSON(),"logic-items");n.css=yt,this.itemsSurveyValue=n,this.itemsSurvey.onMatrixRowRemoving.add((function(e,t){var o=i.visibleItems[t.rowIndex];t.allow=i.canRemoveItem(o)})),this.itemsSurvey.onMatrixRowRemoved.add((function(e,t){var o=i.visibleItems[t.rowIndex],n=o===i.editableItem;i.removeItem(o,!1),n&&(i.mode="view",i.updateNewActionState()),i.expressionEditorCanShowBuilder=!!i.editableItem})),this.itemsSurvey.onGetMatrixRowActions.add((function(e,t){!function(e,t,o){var i=Et(t,"show-detail");if(i){i.component="sv-action-bar-item",i.iconName="icon-logic-expand",i.innerCss="sl-table__action-button sl-table__detail-button",i.iconSize=48,i.showTitle=!1,i.action=function(){o.showHideDetailPanelClick()};var n=function(){i.iconName=o.isDetailPanelShowing?"icon-logic-collapse":"icon-logic-expand"};e.registerFunctionOnPropertyValueChanged("isRowShowing"+o.id,n),n()}}(t.question,t.actions,t.row),function(e,t,o){Ot(e,t,o);var i=Et(t,"remove-row");i&&(i.css="sl-table__action-button sl-table__remove-button")}(t.question,t.actions,t.row)})),this.updateItemsSurveyData(),this.onReadOnlyChanged()},t.prototype.dispose=function(){for(var t in e.prototype.dispose.call(this),this.itemUIHash){var o=this.itemUIHash[t];o.expressionEditor.dispose(),o.itemEditor.dispose()}this.itemUIHash={}},t.prototype.addNewUI=function(){0!=this.items.length&&this.items[this.items.length-1].isNew||this.addNew();var e=this.matrixItems.visibleRows;e[e.length-1].showDetailPanel()},t.prototype.toggleExpressionEditorIsFastEntry=function(){this.expressionEditorIsFastEntry=!this.expressionEditorIsFastEntry,this.expressionEditor&&this.expressionEditor.setIsFastEntry(this.expressionEditorIsFastEntry)},t.prototype.updateEditableItemIsModifiedState=function(){this.editableItem&&(this.editableItem.isModified=!!this.itemEditor&&!!this.expressionEditor&&(this.itemEditor.isModified||this.expressionEditor.isModified(this.editableItem.expression)))},t.prototype.getUnsavedItems=function(){for(var e=[],t=0;t<this.visibleItems.length;t++){var o=this.visibleItems[t],i=this.findLogicItemUI(o);i&&(o.isNew?i.expressionEditor.isEmpty()&&i.itemEditor.isEmpty()||e.push(o):o.isModified&&e.push(o))}return e},t.prototype.getErroredItem=function(e){for(var t=0;t<e.length;t++){var o=e[t];if(this.isErroredItem(o))return o}return null},t.prototype.isErroredItem=function(e){var t=this.findLogicItemUI(e);return!!t&&(t.expressionEditor.hasErrors()||t.itemEditor.hasErrors())},t.prototype.showErroredItem=function(e){var t=this.visibleItems.indexOf(e),o=this.matrixItems.visibleRows,i=t>-1&&t<o.length?o[t]:null;i&&(o.forEach((function(e){return e.hideDetailPanel()})),this.mode="view",i.showDetailPanel(),this.hasErrorInUI())},t.prototype.saveItem=function(e){this.isErroredItem(e)||(this.options&&this.options.startUndoRedoTransaction(),this.doItemApply(e),this.options&&this.options.stopUndoRedoTransaction())},t.prototype.tryLeaveUI=function(e){var t=this;this.updateEditableItemIsModifiedState();var o=this.getUnsavedItems();if(0===o.length)return e&&e(!0),!0;var i=this.getErroredItem(o),n=function(){o.forEach((function(e){return t.saveItem(e)})),e&&e(!0)};if(!i)return n(),!0;var r=function(){t.showErroredItem(i),e&&e(!1)};return this.confirmLeavingOnError(n,r)?void 0:(r(),!1)},t.prototype.confirmLeavingOnError=function(e,t){if(!r.settings.showModal)return!1;var o=new r.LocalizableString(void 0);o.text=this.getLocString("ed.lg.uncompletedRule_text");var i=r.settings.showModal("sv-string-viewer",{locStr:o,locString:o,model:o},(function(){return e(),!0}),(function(){return t(),!0}),void 0,this.getLocString("ed.lg.uncompletedRule_title"),"popup"),n=i.footerToolbar,a=n.getActionById("apply");return n.getActionById("cancel").title=this.getLocString("ed.lg.uncompletedRule_cancel"),a.title=this.getLocString("ed.lg.uncompletedRule_apply"),a.innerCss+=" svc-logic-tab__leave-apply-button",i.width="800px",!0},t.prototype.onPropertyValueChanged=function(t,o,i){e.prototype.onPropertyValueChanged.call(this,t,o,i),"items"===t&&this.updateItemsSurveyData()},t.prototype.onReadOnlyChanged=function(){var e=this;this.itemsSurvey&&(this.itemsSurvey.mode=this.readOnly?"display":"edit",Object.keys(this.itemUIHash||{}).forEach((function(t){e.updateEditModeLogicItem(e.itemUIHash[t])})))},Object.defineProperty(t.prototype,"expressionEditor",{get:function(){return this.expressionEditorValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemEditor",{get:function(){return this.itemEditorValue},enumerable:!1,configurable:!0}),t.prototype.getExpressionEditor=function(e){return this.getLogicItemUI(e).expressionEditor},t.prototype.getLogicItemEditor=function(e){return this.getLogicItemUI(e).itemEditor},t.prototype.updateEditModeLogicItem=function(e){e&&(e.expressionEditor.editSurvey.mode=this.readOnly?"display":"edit",e.itemEditor.editSurvey.mode=this.readOnly?"display":"edit")},t.prototype.getLogicItemUI=function(e){var t=this.findLogicItemUI(e);if(!t){var o=e.getContext();t={expressionEditor:this.createExpressionPropertyEditor(),itemEditor:new Pt(e,this.options)},this.updateEditModeLogicItem(t),t.expressionEditor.context=o,t.itemEditor.context=o,t.expressionEditor.text=e.expression,t.expressionEditor.onContextChanged=function(e){t.itemEditor.context=e},this.itemUIHash[e.id]=t}return t},t.prototype.findLogicItemUI=function(e){return this.itemUIHash[e.id]},Object.defineProperty(t.prototype,"expressionSurvey",{get:function(){return this.expressionEditor.editSurvey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemEditorSurvey",{get:function(){return this.itemEditor.editSurvey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemsSurvey",{get:function(){return this.itemsSurveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasItems",{get:function(){return this.items.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"matrixItems",{get:function(){return this.itemsSurvey.getQuestionByName("items")},enumerable:!1,configurable:!0}),t.prototype.onStartEditing=function(){e.prototype.onStartEditing.call(this),this.expressionEditorValue=this.getExpressionEditor(this.editableItem),this.itemEditorValue=this.getLogicItemEditor(this.editableItem),this.expressionEditorIsFastEntry=!1,this.expressionEditor.setIsFastEntry(this.expressionEditorIsFastEntry),this.expressionEditorCanShowBuilder=Ct.canBuildExpression(this.expressionEditor.text)},t.prototype.onEndEditing=function(){this.updateEditableItemIsModifiedState(),e.prototype.onEndEditing.call(this),this.expressionEditorValue=null,this.itemEditorValue=null},t.prototype.onEditableItemApply=function(){this.doItemApply(this.editableItem),this.editableItem.isSuitable(this.questionFilter,this.actionTypeFilter)?this.updateItemsSurveyData():(this.questionFilter="",this.actionTypeFilter="")},t.prototype.doItemApply=function(e){var t=this.findLogicItemUI(e);t&&(t.expressionEditor.apply(),t.itemEditor.apply(),e.apply(t.expressionEditor.text),e.actions.length!=t.itemEditor.panels.length&&t.itemEditor.setEditableItem(e),t.itemEditor.resetModified(),e.isNew=!1)},t.prototype.hasErrorInUI=function(){var e=this.survey.creator;return this.expressionEditor.hasErrorInUI()?(this.errorText=this.expressionEditor.errorText,!0):!!this.itemEditor.hasErrors()&&(this.errorText=Ee("actionInvalid"),e&&e.notify(this.errorText,"error"),!0)},t.prototype.getExpressionText=function(){return this.expressionEditor.text},t.prototype.getEditingActions=function(){return this.itemEditor.getEditingActions()},t.prototype.getLogicItemSurveyJSON=function(){var e=this.survey.creator,t=e&&e.useTableViewInLogicTab?this.getTwoColumnsLayout():this.getOneColumnLayout();return He(t),t},t.prototype.getTwoColumnsLayout=function(){return{elements:[{type:"matrixdynamic",name:"items",titleLocation:"hidden",detailPanelMode:"underRowSingle",allowAddRows:!1,allowAdaptiveActions:!1,rowCount:0,columns:[{cellType:"linkvalue",name:"conditions",title:this.getLocString("ed.lg.conditions")},{cellType:"linkvalue",name:"actions",title:this.getLocString("ed.lg.actions")}]}]}},t.prototype.getOneColumnLayout=function(){return{elements:[{type:"matrixdynamic",name:"items",titleLocation:"hidden",showColumnHeader:!1,detailPanelMode:"underRowSingle",allowAddRows:!1,allowAdaptiveActions:!1,rowCount:0,showHeader:!1,columns:[{cellType:"linkvalue",name:"rules",showTooltip:!0,width:"100%"}]}]}},t.prototype.createExpressionPropertyEditor=function(){var e=this,t=new Ct(this.survey,null,this.options);return t.isModal=!1,t.editSurvey.onValueChanged.add((function(t,o){"textEditor"===o.name&&(e.expressionEditorCanShowBuilder=Ct.canBuildExpression(o.value))})),t},t.prototype.getVisibleItems=function(){var e=this;return this.items.filter((function(t){return t.isNew||t.isSuitable(e.questionFilter,e.actionTypeFilter)}))},t.prototype.getDataFromItem=function(e){var t=this.survey.creator;return t&&t.useTableViewInLogicTab?{conditions:e.expressionText,actions:e.actionsText}:{rules:this.getLogicItemDisplayText(e)}},t.prototype.getLogicItemDisplayText=function(e){var t=e.getDisplayText();return this.options?this.options.onLogicGetTitleCallback(e.expression,e.expressionText,t,e):t},t.prototype.updateItemsSurveyData=function(){var e=this;if(this.itemsSurvey){var t=[];this.visibleItems=this.getVisibleItems(),this.visibleItems.forEach((function(o){t.push(e.getDataFromItem(o))})),this.matrixItems.onHasDetailPanelCallback=function(e){return!0},this.matrixItems.onCreateDetailPanelCallback=function(t,o){t.onDetailPanelShowingChanged=function(){if(e.expressionEditorCanShowBuilder=t.isDetailPanelShowing,t.isDetailPanelShowing){if("view"===e.mode){var i=e.visibleItems[t.rowIndex-1];e.editItem(i)}var n=o.getQuestionByName("conditions"),r=o.getQuestionByName("actions");n.embeddedSurvey=e.expressionEditor.editSurvey,r.embeddedSurvey=e.itemEditorValue.editSurvey,e.updateRowIsAdditionalClasses(t.rowIndex-1,!1)}else e.mode="view",e.updateRenderedRows();e.updateNewActionState()},o.addNewQuestion("embeddedsurvey","conditions"),o.addNewQuestion("embeddedsurvey","actions"),o.footerActions.push({id:"saveDetailPanel",innerCss:"sl-panel__done-button",title:e.getLocString("pe.doneEditing"),action:function(){e.saveEditableItem()&&t.hideDetailPanel(!0)}})},this.matrixItems.onCellCreatedCallback=function(e){e.cell.question.linkClickCallback=function(){e.row.isDetailPanelShowing?e.row.hideDetailPanel():e.row.showDetailPanel()},e.cell.question.showClear=!1,e.cell.question.allowClear=!1},this.matrixItems.value=t,this.updateRenderedRows()}},t.prototype.updateRenderedRows=function(){var e=this;this.visibleItems.forEach((function(t,o){e.updateRowIsAdditionalClasses(o,e.visibleItems[o].isModified||e.visibleItems[o].isNew)}))},t.prototype.updateRowIsAdditionalClasses=function(e,t){this.matrixItems.renderedTable&&(this.matrixItems.renderedTable.rows[e].isAdditionalClasses=t)},t.prototype.updateNewActionState=function(){this.addNewButton.enabled="new"!==this.mode},t.prototype.setupToolbarItems=function(){var e=this;this.addNewButton=new r.Action({id:"svd-logic-addNew",title:this.addNewText,tooltip:this.addNewText,component:"sv-action-bar-item",enabled:!0,action:function(){e.addNewUI()}})},Object.defineProperty(t.prototype,"addNewText",{get:function(){return Ee("addNewItem")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"emptyTabPlaceholder",{get:function(){return Ee("empty_tab")},enumerable:!1,configurable:!0}),U([Object(r.property)()],t.prototype,"itemsSurveyValue",void 0),U([Object(r.property)()],t.prototype,"expressionEditorIsFastEntry",void 0),U([Object(r.property)()],t.prototype,"expressionEditorCanShowBuilder",void 0),U([Object(r.property)({onSet:function(e,t){t.updateItemsSurveyData()}})],t.prototype,"questionFilter",void 0),U([Object(r.property)({onSet:function(e,t){t.updateItemsSurveyData()}})],t.prototype,"actionTypeFilter",void 0),t}(je),Vt=function(){function e(e){this.creator=e,e.addPluginTab("logic",this),this.createActions().forEach((function(t){return e.toolbar.actions.push(t)}))}return e.prototype.activate=function(){var e=this;this.model=new It(this.creator.survey,this.creator),this.filterQuestionAction.title=this.createFilterQuestionTitleUpdater(),this.filterQuestionAction.visible=!0,this.filterActionTypeAction.title=this.createFilterTypeTitleUpdater(),this.filterActionTypeAction.visible=!0,this.fastEntryAction&&(this.fastEntryAction.visible=!0,this.fastEntryAction.active=this.model.expressionEditorIsFastEntry,this.fastEntryAction.enabled=!1),this.model.onPropertyChanged.add((function(t,o){e.fastEntryAction&&"expressionEditorIsFastEntry"===o.name&&(e.fastEntryAction.active=e.model.expressionEditorIsFastEntry),e.fastEntryAction&&"expressionEditorCanShowBuilder"===o.name&&(e.fastEntryAction.enabled=e.model.expressionEditorCanShowBuilder)}))},e.prototype.createFilterTypeTitleUpdater=function(){var e=this;return new r.ComputedUpdater((function(){var t=e.creator.locale;t||(t="en");var o=e.model.actionTypeFilter,i=e.showAllActionTypesText;return o?e.model.getTypeByName(o).displayName:i}))},e.prototype.createFilterQuestionTitleUpdater=function(){var e=this;return new r.ComputedUpdater((function(){var t=e.creator.locale;t||(t="en");var o=e.model.questionFilter,i=e.showAllQuestionsText;return o||i}))},e.prototype.update=function(){this.model&&this.model.update(this.creator.survey)},e.prototype.canDeactivateAsync=function(e){var t=this;this.model?this.model.tryLeaveUI((function(o){o?e():t.creator.notify(H.getString("ed.lg.expressionInvalid"),"error")})):e()},e.prototype.deactivate=function(){return this.disposeObjs(),!0},e.prototype.dispose=function(){this.disposeObjs()},e.prototype.disposeObjs=function(){this.filterActionTypeAction.title=void 0,this.filterQuestionAction.title=void 0,this.model&&(this.model.dispose(),this.model=void 0),this.filterQuestionAction.visible=!1,this.filterActionTypeAction.visible=!1,this.fastEntryAction&&(this.fastEntryAction.visible=!1)},e.prototype.createActions=function(){var e=this,t=[],o=new r.ListModel([{id:null,title:this.showAllQuestionsText}],(function(t){e.model.questionFilter=t.id?t.id:"",i.toggleVisibility()}),!0);o.locOwner=this.creator;var i=new r.PopupModel("sv-list",{model:o},"bottom","center",void 0,void 0,void 0,void 0,void 0,(function(){var t=e.model.getUsedQuestions().map((function(t){return{id:t.name,title:e.creator.getObjectDisplayName(t,"logic-tab:question-filter","condition",t.name)}}));re.sortItems(t,"title"),i.contentComponentData.model.setItems([{id:null,title:e.showAllQuestionsText}].concat(t))}));this.filterQuestionAction=new r.Action({id:"svc-logic-filter-question",visible:!1,component:"sv-action-bar-item-dropdown",popupModel:i,action:function(){i.toggleVisibility()}}),t.push(this.filterQuestionAction);var n=new r.ListModel([{id:null,title:this.showAllActionTypesText}],(function(t){e.model.actionTypeFilter=t.id?t.id:"",a.toggleVisibility()}),!0);n.locOwner=this.creator;var a=new r.PopupModel("sv-list",{model:n},"bottom","center",void 0,void 0,void 0,void 0,void 0,(function(){var t=e.model.getUsedActionTypes().map((function(e){return{id:e.name,title:e.displayName}}));re.sortItems(t,"title"),a.contentComponentData.model.setItems([{id:null,title:e.showAllActionTypesText}].concat(t))}));return this.filterActionTypeAction=new r.Action({id:"svc-logic-filter-actiontype",visible:!1,component:"sv-action-bar-item-dropdown",popupModel:a,action:function(){a.toggleVisibility()}}),t.push(this.filterActionTypeAction),this.creator.allowEditExpressionsInTextEditor&&(this.fastEntryAction=new r.Action({id:"svc-logic-fast-entry",iconName:"icon-fast-entry",locTitleName:"pe.fastEntry",visible:!1,component:"sv-action-bar-item",action:function(){e.model.toggleExpressionEditorIsFastEntry()}}),t.push(this.fastEntryAction)),t},Object.defineProperty(e.prototype,"showAllQuestionsText",{get:function(){return Ee("showAllQuestions")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showAllActionTypesText",{get:function(){return Ee("showAllActionTypes")},enumerable:!1,configurable:!0}),e}(),Nt=function(){function e(){this._ignoreChanges=!1,this._isExecuting=!1,this._preparingTransaction=null,this._transactions=[],this._currentTransactionIndex=-1,this.transactionCounter=0}return e.prototype.onPropertyValueChanged=function(e,t,o,i,n){if(!ke.isCopyObject(i)&&!this.isIgnoring&&!0!==i.ignoreUndoRedo){var r=this._preparingTransaction,a=n?new jt(e,i,n):new _t(e,t,o,i);if(!r)return(r=new At(e)).addAction(a),void this._addTransaction(r);r.addAction(a)}},e.prototype.isCorrectProperty=function(e,t){var o=r.Serializer.getOriginalProperty(e,t);return!!o&&o.isSerializable},e.prototype.tryMergeTransaction=function(e,t,o){if("name"===t)return!1;var i=this._getCurrentTransaction();return!(!i||0==i.actions.length)&&i.actions[i.actions.length-1].tryMerge(e,t,o)},e.prototype.isCopyObject=function(e){},e.prototype._cutOffTail=function(){this._currentTransactionIndex+1!==this._transactions.length&&(this._transactions.length=this._currentTransactionIndex+1)},Object.defineProperty(e.prototype,"isIgnoring",{get:function(){return this._ignoreChanges||this._isExecuting},enumerable:!1,configurable:!0}),e.prototype._addTransaction=function(e){e.isEmpty()||(this._cutOffTail(),this._transactions[this._currentTransactionIndex]!==e&&(this._transactions.push(e),this._currentTransactionIndex++),this.canUndoRedoCallback())},e.prototype._getCurrentTransaction=function(){var e=this._currentTransactionIndex;return this._transactions[e]},e.prototype._getNextTransaction=function(){var e=this._currentTransactionIndex;return this._transactions[e+1]},e.prototype.notifyChangesFinished=function(e,t){void 0===t&&(t=!1),e.actions.length>0&&this.changesFinishedCallback&&this.changesFinishedCallback(e.actions,t)},e.prototype.canUndoRedoCallback=function(){},e.prototype.startTransaction=function(e){this.isIgnoring||(this.transactionCounter++,this._preparingTransaction||(this._preparingTransaction=new At(e)))},e.prototype.stopTransaction=function(){this.isIgnoring||(this.transactionCounter>0&&this.transactionCounter--,!this._preparingTransaction||this.transactionCounter>0||(this._addTransaction(this._preparingTransaction),0===this.transactionCounter&&this.notifyChangesFinished(this._preparingTransaction),this._preparingTransaction=null))},e.prototype.setUndoCallbackForTransaction=function(e){this._preparingTransaction&&(this._preparingTransaction.undoCallback=e)},Object.defineProperty(e.prototype,"isProcessingUndoRedo",{get:function(){return!0===this._isExecuting},enumerable:!1,configurable:!0}),e.prototype.canUndo=function(){return!!this._getCurrentTransaction()},e.prototype.undo=function(){var e=this._getCurrentTransaction();this.canUndo()&&(this._isExecuting=!0,e.rollback(),this._isExecuting=!1,this._currentTransactionIndex--,this.canUndoRedoCallback(),this.notifyChangesFinished(e,!0))},e.prototype.canRedo=function(){return!!this._getNextTransaction()},e.prototype.redo=function(){var e=this._getNextTransaction();this.canRedo()&&(this._isExecuting=!0,e.apply(),this._isExecuting=!1,this._currentTransactionIndex++,this.canUndoRedoCallback(),this.notifyChangesFinished(e))},e.prototype.suspend=function(){this._ignoreChanges=!0},e.prototype.resume=function(){this._ignoreChanges=!1},e}(),At=function(){function e(e){this._name=e,this._actions=[],this.undoCallback=function(){}}return e.prototype.apply=function(){for(var e=this._actions,t=0;t<e.length;t++){e[t].apply()}},e.prototype.rollback=function(){for(var e=this._actions,t=e.length-1;t>=0;t--){e[t].rollback()}this.undoCallback()},e.prototype.addAction=function(e){this._actions.push(e)},e.prototype.isEmpty=function(){return 0===this._actions.length},Object.defineProperty(e.prototype,"actions",{get:function(){return this._actions},enumerable:!1,configurable:!0}),e}(),_t=function(){function e(e,t,o,i){this._propertyName=e,this._oldValue=t,this._newValue=o,this._sender=i,this.tickCount=(new Date).getTime()}return e.prototype.apply=function(){this._sender[this._propertyName]=this._newValue},e.prototype.rollback=function(){this._sender[this._propertyName]=this._oldValue},e.prototype.getChanges=function(e){return void 0===e&&(e=!1),{object:this._sender,propertyName:this._propertyName,oldValue:e?this._newValue:this._oldValue,newValue:e?this._oldValue:this._newValue}},e.prototype.getDeletedElement=function(e){},e.prototype.getInsertedElement=function(e){},e.prototype.getIndex=function(){return-1},e.prototype.tryMerge=function(t,o,i){if(t!==this._sender||o!==this._propertyName||i==this._oldValue)return!1;var n=r.Serializer.getOriginalProperty(t,o);return!(!n||"string"!==n.type&&"text"!==n.type)&&(!((new Date).getTime()-this.tickCount>e.maximumMergeTime)&&(this._newValue=i,!0))},e.maximumMergeTime=1e3,e}(),jt=function(){function e(e,t,o){this._propertyName=e,this._sender=t,this._index=0,this._itemsToAdd=[],this._deletedItems=[],this._index=o.index,this._itemsToAdd=o.itemsToAdd,this._deletedItems=o.deletedItems}return e.prototype.apply=function(){this.rollback()},e.prototype.rollback=function(){var e=this._sender[this._propertyName],t=this._index,o=this._itemsToAdd.length,i=[].concat(this._deletedItems);this._deletedItems=e.splice.apply(e,[t,o].concat(i)),this._itemsToAdd=[].concat(i)},e.prototype.getChanges=function(){return{object:this._sender,propertyName:this._propertyName,oldValue:this._deletedItems,newValue:this._itemsToAdd}},e.prototype.getDeletedElement=function(e){return this.getMovedElement(this._deletedItems,this._itemsToAdd,e)},e.prototype.getInsertedElement=function(e){return this.getMovedElement(this._itemsToAdd,this._deletedItems,e)},e.prototype.getIndex=function(){return this._index},e.prototype.getMovedElement=function(e,t,o){var i=o?t:e;if(Array.isArray(i)&&1===i.length)return i[0]},e.prototype.tryMerge=function(e,t,o){return!1},e}(),Lt=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.undoRedoManager=void 0,o.onBeforeUndo=new wo,o.onBeforeRedo=new wo,o.onAfterUndo=new wo,o.onAfterRedo=new wo,o.updateSurvey(),o}return z(t,e),t.prototype.onSurveyPropertyValueChangedCallback=function(e,t,o,i,n){this.undoRedoManager&&this.undoRedoManager.isCorrectProperty(i,e)&&(this.undoRedoManager.tryMergeTransaction(i,e,o)?this.creator.notifySurveyPropertyChanged({name:e,target:i,oldValue:t,newValue:o}):(this.undoRedoManager.startTransaction(e+" changed"),this.undoRedoManager.onPropertyValueChanged(e,t,o,i,n),this.creator.updateElementsOnLocaleChanged(i,e),this.creator.updateConditionsOnNameChanged(i,e,t),this.undoRedoManager.stopTransaction()))},t.prototype.updateSurvey=function(){var e=this,t=this.creator.survey;t&&(t.onPropertyValueChangedCallback=function(t,o,i,n,r){e.onSurveyPropertyValueChangedCallback(t,o,i,n,r)}),this.undoRedoManager=new Nt,this.undoRedoManager.changesFinishedCallback=function(t,o){if(!e.notifySurveyMoveItem(t,o))for(var i=t.length-1;i>=0;i--){var n=t[i];if(n){var r=n.getChanges(o);e.creator.notifySurveyPropertyChanged({name:r.propertyName,target:r.object,oldValue:r.oldValue,newValue:r.newValue})}}},this.undoRedoManager.canUndoRedoCallback=function(){e.updateUndeRedoActions()}},t.prototype.notifySurveyMoveItem=function(e,t){e.length;var o=e[0],i=e[1];if(!o||!i)return!1;var n=o.getChanges(t),r=i.getChanges(t);if(n.object!==r.object||n.propertyName!==r.propertyName)return!1;var a=o.getDeletedElement(t),s=o.getInsertedElement(t),l=i.getDeletedElement(t),u=i.getInsertedElement(t);if(a===s||a!==u&&s!==l)return!1;var c=a?o.getIndex():i.getIndex(),p=s?o.getIndex():i.getIndex();return this.creator.notifySurveyItemMoved({arrayName:n.propertyName,parent:n.object,element:a||s,indexFrom:t?p:c,indexTo:t?c:p}),!0},t.prototype.selectElementAfterUndo=function(){this.selectElementAfterUndoCore(this.creator.selectedElement)},t.prototype.selectElementAfterUndoCore=function(e){!e||e.isDisposed||!e.getSurvey()||this.creator.isObjQuestion(e)&&!e.parent?this.creator.selectElement(this.creator.survey):this.creator.selectElement(e)},t.prototype.undo=function(){if(this.undoRedoManager){this.undoRedoManager.suspend();var e={canUndo:this.undoRedoManager.canUndo()};if(this.onBeforeUndo.fire(this.creator,e),this.creator.onBeforeUndo.fire(this.creator,e),e.canUndo){var t=this.undoRedoManager.undo();this.onAfterUndo.fire(this.creator,{state:t}),this.creator.onAfterUndo.fire(this.creator,{state:t}),this.selectElementAfterUndo()}this.undoRedoManager.resume()}},t.prototype.redo=function(){if(this.undoRedoManager){var e={canRedo:this.undoRedoManager.canRedo()};if(this.onBeforeRedo.fire(this.creator,e),this.creator.onBeforeRedo.fire(this.creator,e),e.canRedo){var t=this.undoRedoManager.redo();this.onAfterRedo.fire(this.creator,{state:t}),this.creator.onAfterRedo.fire(this.creator,{state:t}),this.selectElementAfterUndo()}}},t.prototype.startTransaction=function(e){void 0===e&&(e=""),this.undoRedoManager&&this.undoRedoManager.startTransaction(e)},t.prototype.stopTransaction=function(){this.undoRedoManager&&this.undoRedoManager.stopTransaction()},t.prototype.createActions=function(){var e=this,t=[];return this.undoAction=new r.Action({id:"action-undo",iconName:"icon-undo",locTitleName:"ed.undo",showTitle:!1,visible:new r.ComputedUpdater((function(){return"designer"===e.creator.activeTab})),action:function(){return e.undo()}}),this.redoAction=new r.Action({id:"action-redo",iconName:"icon-redo",locTitleName:"ed.redo",showTitle:!1,visible:new r.ComputedUpdater((function(){return"designer"===e.creator.activeTab})),action:function(){return e.redo()}}),t.push(this.undoAction),t.push(this.redoAction),this.updateUndeRedoActions(),t},t.prototype.updateUndeRedoActions=function(){this.undoAction.enabled=this.undoRedoManager.canUndo(),this.redoAction.enabled=this.undoRedoManager.canRedo()},U([Object(r.property)()],t.prototype,"undoRedoManager",void 0),t}(r.Base),kt=function(){function e(e){var t=this;this.creator=e,this.model=void 0,this.model=new Lt(e),this.model.createActions().forEach((function(t){return e.toolbar.actions.push(t)})),e.registerShortcut("undo",{hotKey:{ctrlKey:!0,keyCode:90},macOsHotkey:{keyCode:90},execute:function(){return t.model.undo()}}),e.registerShortcut("redo",{hotKey:{ctrlKey:!0,keyCode:89},macOsHotkey:{keyCode:89},execute:function(){return t.model.redo()}})}return e.prototype.activate=function(){},e.prototype.deactivate=function(){return!0},e.prototype.update=function(){},e.prototype.addFooterActions=function(){this.model.undoAction&&this.creator.footerToolbar.actions.push(this.model.undoAction),this.model.redoAction&&this.creator.footerToolbar.actions.push(this.model.redoAction)},e}();function Mt(e,t){return void 0===t&&(t="undoRedoManager"),function(o,i,n){var r=n.value;return n.value=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=this[t];try{a&&a.startTransaction(e||i);var s=r.apply(this,o);return s}finally{a&&a.stopTransaction()}},n}}function Dt(e){return void 0===e&&(e="undoRedoManager"),function(t,o,i){var n=i.value;return i.value=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];var i=this[e];try{i&&i.suspend();var r=n.apply(this,t);return r}finally{i&&i.resume()}},i}}var Rt=function(e){function t(t,o,i,n){var r=e.call(this,{id:"sv_item_selector_"+t.toString(),title:i})||this;return r.data=o,r.level=n,r}return z(t,e),t.prototype.hasText=function(e){return!e||(this.textInLow||(this.textInLow=this.title.toLocaleLowerCase()),this.textInLow.indexOf(e)>-1)},t}(r.Action),Bt=function(){function e(e,t,o){void 0===o&&(o=void 0),this.creator=e,this.getObjectDisplayName=o,this.surveyValue=t,this.rebuild()}return Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this.itemsValue},enumerable:!1,configurable:!0}),e.prototype.getItemByObj=function(e){for(var t=this.items,o=0;o<t.length;o++)if(t[o].data===e)return t[o];return null},e.prototype.filterByText=function(e){this.filteredTextInLow=e?e.toLocaleLowerCase():"",this.updateItemsVisibility()},e.prototype.rebuild=function(){var e=[];this.deepestLevel=0;var t=this.createItem(this.survey,null);e.push(t);for(var o=0;o<this.survey.pages.length;o++){var i=this.survey.pages[o],n=t;if(!this.creator||"single"!==this.creator.pageEditMode){var r=this.createItem(i,t);e.push(r),n=r}this.buildElements(e,this.getElements(i),n)}this.itemsValue=e},e.prototype.updateItemsVisibility=function(){for(var e=this.deepestLevel;e>=0;e--)this.updateItemsLevelVisibility(e)},e.prototype.updateItemsLevelVisibility=function(e){for(var t=0;t<this.items.length;t++){var o=this.items[t];o.level===e&&(o.visible=this.hasVisibleChildren(t)||o.hasText(this.filteredTextInLow))}},e.prototype.hasVisibleChildren=function(e){for(var t=this.items[e].level,o=e+1;o<this.items.length;o++){if(this.items[o].level<=t)return!1;if(this.items[o].visible)return!0}return!1},e.prototype.getElements=function(e){return re.getElements(e)},e.prototype.buildElements=function(e,t,o){for(var i=0;i<t.length;i++){var n=t[i],r=this.createItem(n,o);e.push(r),this.buildElements(e,this.getElements(n),r)}},e.prototype.createItem=function(t,o){var i=new Rt(e.uniqueId++,t,this.getText(t),null!=o?o.level+1:0);return i.level>this.deepestLevel&&(this.deepestLevel=i.level),i},e.prototype.getText=function(e){return this.getObjectDisplayName?this.getObjectDisplayName(e,"property-grid-header:element-list","property-grid",void 0):re.getObjectName(e,!1)},e.uniqueId=0,e}(),qt=function(e){function t(t,o){void 0===o&&(o=void 0);var i=e.call(this)||this;return i.creator=t,i.getObjectDisplayName=o,i}return z(t,e),Object.defineProperty(t.prototype,"list",{get:function(){return this.listModelValue},enumerable:!1,configurable:!0}),t.prototype.show=function(e,t,o){var i=this;this.selector=new Bt(this.creator,e,this.getObjectDisplayName);var n=this.selector.getItemByObj(t);this.listModelValue?(this.listModelValue.setItems(this.selector.items),this.listModelValue.selectedItem=n):this.listModelValue=new r.ListModel(this.selector.items,(function(e){o(e.data)}),!0,n,(function(e){i.selector.filterByText(e)})),this.isVisible=!0},t.prototype.refresh=function(){this.listModelValue.refresh()},U([Object(r.property)()],t.prototype,"isVisible",void 0),t}(r.Base),Ht=function(e){function t(t,o){var i=e.call(this)||this;return i.propertyGridModel=t,i.creator=o,i.selectedElementName=i.getTitle(),i.propertyGridModel.objValueChangedCallback=function(){i.onSurveyChanged()},i.propertyGridModel.changedFromActionCallback=function(e,t){i.selectionController&&i.selectionController.selectFromAction(e,t)},i.initActions(),i.creator.onPropertyChanged.add((function(e,t){"sidebarLocation"===t.name&&(i.selectorPopupModel.horizontalPosition="right"==i.creator.sidebarLocation?"left":"right")})),i.onSurveyChanged(),i}return z(t,e),t.prototype.onPropertyValueChanged=function(t,o,i){e.prototype.onPropertyValueChanged.call(this,t,o,i),this.nextSelectionAction&&"hasNext"===t&&(this.nextSelectionAction.enabled=this.hasNext),this.prevSelectionAction&&"hasPrev"===t&&(this.prevSelectionAction.enabled=this.hasPrev)},Object.defineProperty(t.prototype,"selectionController",{get:function(){return this.creator.selectionHistoryController},enumerable:!1,configurable:!0}),t.prototype.onSurveyChanged=function(){var e=this;this.survey=this.propertyGridModel.survey,this.survey&&this.survey.onValueChanged.add((function(t,o){"name"!=o.name&&"title"!=o.name||e.updateTitle()})),this.updateTitle(),this.selectionController&&(this.hasPrev=this.selectionController.hasPrev,this.hasNext=this.selectionController.hasNext)},t.prototype.updateTitle=function(){var e=this.getTitle();this.selectedElementName=e,this.objectSelectionAction.title=this.selectedElementName},t.prototype.getTitle=function(){var e=this.getSelectedObj();if(!e)return"";var t=re.getObjectName(e,this.propertyGridModel.options.showObjectTitles);return this.propertyGridModel.options.getObjectDisplayName(e,"property-grid-header:selected-element","property-grid-title",t)},t.prototype.getSelectedObj=function(){return this.propertyGridModel.obj},t.prototype.initActions=function(){var e=this;a.propertyGrid.showNavigationButtons&&(this.prevSelectionAction=new r.Action({id:"svd-grid-history-prev",iconName:"icon-arrow-left",component:"sv-action-bar-item",title:Q("ed.prevSelected"),showTitle:!1,enabled:this.hasPrev,action:function(){e.selectionController.prev()}}),this.nextSelectionAction=new r.Action({id:"svd-grid-history-next",iconName:"icon-arrow-right",component:"sv-action-bar-item",title:Q("ed.nextSelected"),showTitle:!1,enabled:this.hasNext,action:function(){e.selectionController.next()}}));var t=new qt(this.creator,(function(t,o,i,n){return e.propertyGridModel.options.getObjectDisplayName(t,o,i,n)}));this.selectorPopupModel=new r.PopupModel("svc-object-selector",{model:t},"bottom","center"),this.selectorPopupModel.cssClass+=" svc-object-selector",this.objectSelectionAction=new r.Action({id:"svd-grid-object-selector",title:this.selectedElementName,css:"sv-action--object-selector sv-action-bar-item--secondary",component:"sv-action-bar-item-dropdown",action:function(){e.selectorPopupModel.displayMode=e.creator.isMobileView?"overlay":"popup",t.show(e.selectionController.creator.survey,e.propertyGridModel.obj,(function(t){e.selectionController.selectFromAction(t,"name"),e.selectorPopupModel.toggleVisibility()})),e.selectorPopupModel.toggleVisibility(),t.list.scrollToSelectedItem()},popupModel:this.selectorPopupModel})},U([Object(r.property)()],t.prototype,"hasPrev",void 0),U([Object(r.property)()],t.prototype,"hasNext",void 0),U([Object(r.property)()],t.prototype,"survey",void 0),U([Object(r.property)()],t.prototype,"selectedElementName",void 0),t}(r.Base),Qt=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.onPagesChanged=o.addEvent(),o.onCurrentPageChanged=o.addEvent(),o.currentPageChangedFunc=function(e,t){o.page2Display=o.survey.currentPage,o.onCurrentPageChanged.fire(o,{})},o.onSurveyChanged(),o}return z(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.creator.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pages",{get:function(){return this.survey.pages},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentPage",{get:function(){return this.survey.currentPage},set:function(e){this.survey.currentPage=e,this.page2Display=e},enumerable:!1,configurable:!0}),t.prototype.selectPage=function(e){this.currentPage=e,this.creator.selectElement(e)},t.prototype.getDisplayName=function(e){return e?this.creator.getObjectDisplayName(e,"page-selector"):""},t.prototype.raisePagesChanged=function(){this.page2Display=this.survey.currentPage,this.onPagesChanged.fire(this,{})},t.prototype.onSurveyChanged=function(){this.removeFunctions(),this.surveyValue=this.creator.survey,this.surveyValue&&(this.raisePagesChanged(),this.page2Display=this.survey.currentPage,this.surveyValue.onCurrentPageChanged.add(this.currentPageChangedFunc))},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.removeFunctions()},t.prototype.removeFunctions=function(){this.surveyValue&&!this.surveyValue.isDisposed&&this.surveyValue.onCurrentPageChanged.remove(this.currentPageChangedFunc)},U([Object(r.property)()],t.prototype,"page2Display",void 0),t}(r.Base);var Ft=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isEdge=!1,t.isSide=!1,t.prevIsEdge=null,t.dragOverIndicatorElement=null,t.isDraggedElementSelected=!1,t.doBanDropHere=function(){t.removeDragOverMarker(t.dragOverIndicatorElement),t.removeDragOverMarker(t.dropTarget)},t.doDrop=function(){var e;if(t.dropTarget){var o=t.parentElement,i=t.draggedElement,n=t.draggedElement,a=(null===(e=t.dragOverIndicatorElement)||void 0===e?void 0:e.isPanel)?t.dragOverIndicatorElement:t.dropTarget,s=o.dragDropFindRow(a),l=t.getElementIndexInPanel(a,s);t.dragOverLocation!==r.DragTypeOverMeEnum.Right&&t.dragOverLocation!==r.DragTypeOverMeEnum.Bottom||l++;var u=[],c=[],p=n&&n.parent&&n.parent.dragDropFindRow(n);if(p&&p.elements.length>1&&(u.push(n),p.elements[0]===n&&u.push(p.elements[1])),s){var d=(t.dragOverIndicatorElement||t.dropTarget).dragTypeOverMe;d===r.DragTypeOverMeEnum.Left?(c.push(a),0===s.elements.indexOf(a)||0===s.elements.indexOf(n)&&1===s.elements.indexOf(a)?u.push(i):c.push(i)):d===r.DragTypeOverMeEnum.Right?(c.push(i),0===s.elements.indexOf(a)&&u.push(i)):s.elements.length>1?(u.push(i),d===r.DragTypeOverMeEnum.Top?l=t.getElementIndexInPanel(s.elements[0],s):d===r.DragTypeOverMeEnum.Bottom&&(l=t.getElementIndexInPanel(s.elements[s.elements.length-1],s)+1)):u.push(i)}if(n&&n.parent)o.survey.startMovingQuestion(),!!s&&s.panel==n.parent?(t.moveElementInPanel(s.panel,n,i,l),s.panel.updateRows(),l=-1):n.parent.removeElement(n);return t.isEdge||t.isSide||!a.isPanel&&!a.isPage?s&&l>-1&&(s.panel.addElement(i,l),s.panel.updateRows()):(a.addElement(i),a.updateRows()),o.survey.stopMovingQuestion(),u.map((function(e){e.startWithNewLine=!0})),c.map((function(e){e.startWithNewLine=!1})),i}},t}return z(t,e),Object.defineProperty(t.prototype,"draggedElementType",{get:function(){return"survey-element"},enumerable:!1,configurable:!0}),t.prototype.startDragToolboxItem=function(e,t,o){var i=this.createElementFromJson(t);i.toolboxItemTitle=o,this.startDrag(e,i,null,null,!0)},t.prototype.startDragSurveyElement=function(e,t,o){this.isDraggedElementSelected=o,this.startDrag(e,t)},t.prototype.getShortcutText=function(t){return t.toolboxItemTitle||e.prototype.getShortcutText.call(this,t)},t.prototype.createDraggedElementShortcut=function(e,t,o){var i=document.createElement("div"),n=document.createElement("span");return n.className="svc-dragged-element-shortcut__text",n.innerText=e,i.appendChild(this.createDraggedElementIcon()),i.appendChild(n),i.className=this.getDraggedElementClass(),i},t.prototype.createDraggedElementIcon=function(){var e=document.createElement("span"),t='<svg class="sv-svg-icon" role="img" style="width: 24px; height: 24px;"><use xlink:href="#icon-'+this.draggedElement.getType()+'"></use></svg>';return e.className="svc-dragged-element-shortcut__icon",e.innerHTML=t,e},t.prototype.getDraggedElementClass=function(){var e="svc-dragged-element-shortcut";return this.isDraggedElementSelected&&(e+=" svc-dragged-element-shortcut--selected"),e},t.prototype.createElementFromJson=function(e){var t=this.createNewElement(e);return t.setSurveyImpl?t.setSurveyImpl(this.survey):t.setData(this.survey),t.renderWidth="100%",t},t.prototype.createNewElement=function(e){var t=r.Serializer.createClass(e.type);return(new r.JsonObject).toObject(e,t),t},t.prototype.findDropTargetNodeByDragOverNode=function(e){if(e.closest(".svc-row--ghost")){var t="[data-sv-drop-target-survey-element='sv-drag-drop-ghost-survey-element-name']",o=e.closest(t)||e.querySelector(t);if(o)return o}return e.closest(this.dropTargetDataAttributeName)},t.prototype.getDropTargetByDataAttributeValue=function(e,o,i){if(this.removeDragOverMarker(this.dragOverIndicatorElement),this.dragOverIndicatorElement=null,!e){var n=o.parentElement.closest(this.dropTargetDataAttributeName);e=this.getDataAttributeValueByNode(n)}if(!e)throw new Error("Can't find drop target survey element name");if(e===t.ghostSurveyElementName)return this.prevDropTarget;if("newGhostPage"===e)return t.newGhostPage;var r,a,s=this.survey.getPageByName(e);if(s)return 0!==s.elements.length?null:s;if(this.survey.pages.forEach((function(t){var o=t.getElementByName(e);o&&(r=o,a=o)})),"paneldynamic"!==r.getType()||this.isEdge||this.isSide||(r=r.template),"matrixdropdown"!==r.getType()&&"matrixdynamic"!==r.getType()||"none"===r.detailPanelMode||this.isEdge||this.isSide?r.isPanel&&(r=this.getPanelDropTarget(o,r,i)):r=r.detailPanel,!r.page){var l=o.parentElement.closest("[data-sv-drop-target-page]");e=l.dataset.svDropTargetPage;var u=this.survey.getPageByName(e);r.__page=u}return this.dragOverIndicatorElement=a,r},t.prototype.isDropTargetValid=function(e,o){return!!e&&(e!==this.draggedElement&&(("paneldynamic"!==this.draggedElement.getType()||e!==this.draggedElement.template)&&(!t.restrictDragQuestionBetweenPages||!this.shouldRestricDragQuestionBetweenPages(e))))},t.prototype.shouldRestricDragQuestionBetweenPages=function(e){var t=this.draggedElement.page,o=e.isPage?e:e.page;return t&&t!==o},t.prototype.getPanelDropTarget=function(e,t,o){return this.isEdge||0===t.questions.length||(e=this.findDeepestDropTargetChild(e),t=this.getDropTargetByNode(e,o)),t},t.prototype.findDeepestDropTargetChild=function(e){for(var t=this.dropTargetDataAttributeName,o=e;e;)o=e,e=e.querySelector(t);return o},t.prototype.dragOverCore=function(e,t,o,i){if(void 0===o&&(o=!1),void 0===i&&(i=!1),this.removeDragOverMarker(this.dragOverIndicatorElement),this.removeDragOverMarker(this.dropTarget),e!==this.draggedElement){this.dropTarget=e,this.dragOverLocation=t,this.isEdge=o,this.isSide=i,this.parentElement=this.dropTarget.isPage?this.dropTarget:this.dropTarget.page||this.dropTarget.__page;var n=this.dragOverIndicatorElement||this.dropTarget;if(this.isEdge||this.isSide||!this.isDragOverInsideEmptyPanel()){var a=this.parentElement.dragDropFindRow(n);a&&a.elements.length>1&&(this.dragOverLocation===r.DragTypeOverMeEnum.Top||this.dragOverLocation===r.DragTypeOverMeEnum.Bottom)?(a.dragTypeOverMe=this.dragOverLocation,this.dragOverIndicatorElement=a):n.dragTypeOverMe=this.dragOverLocation}else n.dragTypeOverMe=r.DragTypeOverMeEnum.InsideEmptyPanel}else this.allowDropHere=!1},t.prototype.dragOver=function(e){var t=this.findDropTargetNodeFromPoint(e.clientX,e.clientY);if(t){this.isEdge=function(e,t){var o=e.getBoundingClientRect();return t-o.top<=Ft.edgeHeight||o.bottom-t<=Ft.edgeHeight}(t,e.clientY),this.isSide=function(e,t){var o=e.getBoundingClientRect();return t-o.left<=Ft.edgeHeight||o.right-t<=Ft.edgeHeight}(t,e.clientX);var o=this.getDropTargetByNode(t,e);if(this.isDropTargetValid(o,t)){this.allowDropHere=!0;var i=function(e,t,o){var i=o.getBoundingClientRect(),n=i.height/i.width,s=e-i.x,l=t-i.y;return a.dragDrop.allowDragToTheSameLine?l>=n*s?l>=-n*s+i.height?r.DragTypeOverMeEnum.Bottom:r.DragTypeOverMeEnum.Left:l>=-n*s+i.height?r.DragTypeOverMeEnum.Right:r.DragTypeOverMeEnum.Top:l>=i.height/2?r.DragTypeOverMeEnum.Bottom:r.DragTypeOverMeEnum.Top}(e.clientX,e.clientY,t);this.dragOverCore(o,i,this.isEdge,this.isSide)}else this.banDropHere()}else this.banDropHere()},t.prototype.onStartDrag=function(){this.draggedElement.isDragMe=!0},t.prototype.getElementIndexInPanel=function(e,t){if(!t)return-1;var o=t.elements.indexOf(e);if(0==t.index)return o;var i=t.panel.rows[t.index-1],n=i.elements[i.elements.length-1];return o+t.panel.elements.indexOf(n)+1},t.prototype.moveElementInPanel=function(e,t,o,i){var n=t.parent.elements.indexOf(t);i>n&&i--,t===o&&n===i||(e.removeElement(t),e.addElement(o,i))},t.prototype.removeDragOverMarker=function(e){var t;e&&(e.dragTypeOverMe=null);var o=null===(t=this.parentElement)||void 0===t?void 0:t.dragDropFindRow(e);o&&(o.dragTypeOverMe=null)},t.prototype.clear=function(){this.isEdge=null,this.isSide=null,this.removeDragOverMarker(this.prevDropTarget),this.removeDragOverMarker(this.dropTarget),this.removeDragOverMarker(this.dragOverIndicatorElement),this.draggedElement&&(this.draggedElement.isDragMe=!1),e.prototype.clear.call(this)},t.prototype.getTargetParent=function(e){var t=e.isPage||e.isPanel?e:e.parent;return"paneldynamic"===e.getType()&&(t=e.templateValue),t},t.prototype.getTargetRow=function(e){var t;return this.getTargetParent(e).rows.forEach((function(o){-1!==o.elements.indexOf(e)&&(t=o)})),t},t.prototype.isDragOverInsideEmptyPanel=function(){var e=this.dropTarget.isPanel&&0===this.dropTarget.questions.length,t=!this.isEdge&&!this.isSide;return e&&t},t.newGhostPage=null,t.restrictDragQuestionBetweenPages=!1,t.edgeHeight=30,t.nestedPanelDepth=-1,t.ghostSurveyElementName="sv-drag-drop-ghost-survey-element-name",t}(r.DragDropCore);o(12);var Ut=r.settings.allowShowEmptyTitleInDesignMode,Gt=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.pagesControllerValue=new Qt(t),o.initSurvey(),o}return z(t,e),t.prototype.createNewPage=function(){var e=this,t=this.survey.createNewPage("");t.ignoreUndoRedo=!0,this.creator.setNewNames(t),t.onFirstRendering(),t.updateCustomWidgets(),t.setWasShown(!0),t.setSurveyImpl(this.survey),t.updateElementCss();var o=function(i,n){"elements"===n.name&&t.elements.length>0&&e.creator.addPage(t,!0,(function(){return t.onPropertyChanged.remove(o),t.showTitle=!0,t.showDescription=!0,delete t.ignoreUndoRedo,!(e.survey.pages.indexOf(t)>-1)}))};t.num=this.survey.pages.length+1,t.onPropertyChanged.add(o),this.newPage=t,Ft.newGhostPage=t},Object.defineProperty(t.prototype,"canShowNewPage",{get:function(){if(!this.survey||"single"===this.creator.pageEditMode||!this.creator.allowModifyPages)return!1;if("bypage"===this.creator.pageEditMode)return!0;var e=this.survey.pages;return 0===e.length||e[e.length-1].elements.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.creator.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pagesController",{get:function(){return this.pagesControllerValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isToolboxVisible",{get:function(){return this.creator.showToolboxValue&&("right"===this.creator.toolboxLocation||"left"===this.creator.toolboxLocation)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholderText",{get:function(){return Q("ed.surveyPlaceHolder")},enumerable:!1,configurable:!0}),t.prototype.onDesignerSurveyPropertyChanged=function(e,t){if(e&&!this.isUpdatingNewPage){if(this.isUpdatingNewPage=!0,"elements"===t&&e.isDescendantOf("page")){var o=!1;0===e.elements.length&&(o=this.checkLastPageToDelete()),this.checkNewPage(o)}"pages"===t&&e.isDescendantOf("survey")&&this.checkNewPage(!0),this.isUpdatingNewPage=!1}},t.prototype.calculateDesignerCss=function(){return this.survey.css.container+" "+this.survey.css.container+"--"+this.survey.calculatedWidthMode},t.prototype.initSurvey=function(){var e=this;this.survey&&(this.showNewPage=!1,this.newPage=void 0,this.checkNewPage(!1),this.cssUpdater&&this.cssUpdater.dispose(),this.cssUpdater=new r.ComputedUpdater((function(){return e.calculateDesignerCss()})),this.designerCss=this.cssUpdater,this.pagesController.onSurveyChanged())},t.prototype.checkNewPage=function(e){var t=0===this.survey.getAllQuestions().length&&0===this.survey.pageCount;if(this.showPlaceholder=t,this.pageCount=this.survey.pageCount,this.showPlaceholder||this.canShowNewPage){var o=this.survey.pages;(!this.newPage||o.length>0&&this.newPage===o[o.length-1])&&(this.createNewPage(),this.showNewPage=!0),this.newPage.showTitle=!t,this.newPage.showDescription=!t}else this.showNewPage=!1,this.newPage=void 0;e&&(this.newPage&&(this.newPage.num=this.survey.pages.length+1,this.newPage.name=re.getNewPageName(this.survey.pages)),this.pagesController.raisePagesChanged())},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.cssUpdater&&this.cssUpdater.dispose()},t.prototype.checkLastPageToDelete=function(){if(0===this.survey.pageCount)return!1;if(1===this.survey.pageCount&&!this.creator.isInitialSurveyEmpty)return!1;var e=this.survey.pages[this.survey.pageCount-1];if(e.elements.length>0||e.isConverting)return!1;if(!re.isPageNameAutoGenerated(e.name))return!1;var t=e.toJSON();for(var o in delete t.name,t)return!1;return e.delete(),0===this.survey.pageCount&&this.creator.selectElement(this.survey),!0},t.prototype.clickDesigner=function(){this.creator.selectedElement=this.creator.survey},t.prototype.getRootCss=function(){var e=this.survey.css.root;return(this.creator.showPageNavigator&&this.survey.pageCount>1||"bypage"===this.creator.pageEditMode)&&(e+=" svc-tab-designer--with-page-navigator"),this.showPlaceholder&&(e+=" svc-tab-designer--with-place-holder"),e},U([Object(r.property)()],t.prototype,"newPage",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"showNewPage",void 0),U([Object(r.property)()],t.prototype,"pageCount",void 0),U([Object(r.property)()],t.prototype,"designerCss",void 0),U([Object(r.property)()],t.prototype,"showPlaceholder",void 0),t}(r.Base),zt=function(){function e(e){var t=this;this.creator=e,e.addPluginTab("designer",this);var o=new ze(e.survey,e);this.propertyGrid=new Ht(o,e),this.propertyGridTab=this.creator.sidebar.addTab("propertyGrid","svc-property-grid",this.propertyGrid,(function(){var e=[];return t.propertyGrid.prevSelectionAction&&(t.propertyGrid.prevSelectionAction.visible=t.createVisibleUpdater(),e.push(t.propertyGrid.prevSelectionAction)),t.propertyGrid.nextSelectionAction&&(t.propertyGrid.nextSelectionAction.visible=t.createVisibleUpdater(),e.push(t.propertyGrid.nextSelectionAction)),t.propertyGrid.objectSelectionAction&&(t.propertyGrid.objectSelectionAction.visible=t.createVisibleUpdater(),e.push(t.propertyGrid.objectSelectionAction)),e})),this.toolboxTab=this.creator.sidebar.addTab("toolbox","svc-toolbox",e),this.creator.onPropertyChanged.add((function(e,o){"isMobileView"===o.name&&t.updatePropertyGridTabCaption(),"toolboxLocation"===o.name&&(t.toolboxTab.visible&&"sidebar"!==o.newVal&&(t.propertyGridTab.visible=!0),t.toolboxTab.visible="sidebar"===o.newVal)})),this.propertyGrid.onPropertyChanged.add((function(e,o){"selectedElementName"===o.name&&t.updatePropertyGridTabCaption()})),this.createActions().forEach((function(t){return e.toolbar.actions.push(t)})),e.registerShortcut("delete",{hotKey:{keyCode:46},macOsHotkey:{keyCode:46},execute:function(){return t.creator.deleteCurrentElement()}})}return Object.defineProperty(e.prototype,"isSurveySelected",{get:function(){return this.creator.isElementSelected(this.creator.survey)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSettingsActive",{get:function(){return this.creator.showSidebar&&this.isSurveySelected},enumerable:!1,configurable:!0}),e.prototype.createVisibleUpdater=function(){var e=this;return new r.ComputedUpdater((function(){return"designer"===e.creator.activeTab}))},e.prototype.updatePropertyGridTabCaption=function(){this.propertyGridTab.caption=this.creator.isMobileView?this.propertyGrid.selectedElementName:""},e.prototype.activate=function(){this.model=new Gt(this.creator),this.creator.sidebar.activeTab=this.propertyGridTab.id,this.creator.focusElement(void 0,!0)},e.prototype.deactivate=function(){return this.model=void 0,this.propertyGridTab.visible=!1,!0},e.prototype.onDesignerSurveyPropertyChanged=function(e,t){this.model&&this.model.onDesignerSurveyPropertyChanged(e,t)},e.prototype.update=function(){this.model&&this.model.initSurvey()},e.prototype.createActions=function(){var e=this,t=[],o=new r.Action({id:"svd-toolbox",iconName:"icon-toolbox",needSeparator:!0,action:function(){e.creator.showSidebar||e.creator.setShowSidebar(!0,!0),e.creator.sidebar.activeTab="toolbox"},active:new r.ComputedUpdater((function(){return"toolbox"===e.creator.sidebar.activeTab})),visible:new r.ComputedUpdater((function(){return I("designer"===e.creator.activeTab,e.creator.showToolbox,"sidebar"===e.creator.toolboxLocation)})),title:"Toolbox",showTitle:!1});return this.surveySettingsAction=new r.Action({id:"svd-settings",iconName:"icon-settings",needSeparator:new r.ComputedUpdater((function(){return I("sidebar"!==e.creator.toolboxLocation,!e.creator.isMobileView)})),action:function(){e.selectSurvey()},active:new r.ComputedUpdater((function(){return I(e.creator.sidebar.activeTab===e.propertyGridTab.id,e.isSurveySelected)})),pressed:new r.ComputedUpdater((function(){return I(e.creator.sidebar.activeTab===e.propertyGridTab.id,e.isSurveySelected)})),visible:this.createVisibleUpdater(),locTitleName:"ed.surveySettings",locTooltipName:"ed.surveySettingsTooltip",showTitle:!1}),this.saveSurveyAction=new r.Action({id:"svd-save",iconName:"icon-save",action:function(){return e.creator.doSave()},active:!1,enabled:!1,visible:new r.ComputedUpdater((function(){return I("designer"===e.creator.activeTab,e.creator.showSaveButton)})),locTitleName:"ed.saveSurvey",locTooltipName:"ed.saveSurveyTooltip",showTitle:!1}),this.previewAction=new r.Action({id:"svd-preview",iconName:"icon-preview",needSeparator:!0,action:function(){e.creator.makeNewViewActive("test")},visible:this.createVisibleUpdater(),locTitleName:"ed.testSurvey",showTitle:!1}),t.push(this.saveSurveyAction),t.push(o),t.push(this.surveySettingsAction),this.creator.onSelectedElementChanged.add((function(t,o){e.surveySettingsAction.active=e.isSettingsActive,e.surveySettingsAction.pressed=e.isSettingsActive})),this.creator.onShowSidebarVisibilityChanged.add((function(t,o){e.surveySettingsAction.active=e.isSettingsActive,e.surveySettingsAction.pressed=e.isSettingsActive})),t},e.prototype.selectSurvey=function(){this.creator.showSidebar||this.creator.setShowSidebar(!0,!0),this.creator.selectElement(this.creator.survey),this.creator.sidebar.activeTab=this.propertyGridTab.id},e.prototype.addFooterActions=function(){this.creator.footerToolbar.actions.push(this.surveySettingsAction),this.creator.footerToolbar.actions.push(this.previewAction)},e}();o(13);var Zt=function(){function e(e,t){var o=this;this.container=e,this.creator=t,this.resizeObserver=void 0,"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((function(e){return o.process()})),this.resizeObserver.observe(this.findCorrectParent(this.container)),this.process(),"xs"!=this.currentWidth&&"s"!=this.currentWidth&&"m"!==this.currentWidth||this.creator.setShowSidebar(!1))}return e.prototype.getScreenWidth=function(){var t,o=this;return Object.keys(e.screenSizeBreakpoints).forEach((function(i){var n=e.screenSizeBreakpoints[i];!t&&o.container&&n&&o.container.offsetWidth>=n&&(t=i)})),t||"xs"},e.prototype.initMobileView=function(){this.creator.showTabs=!1,this.creator.showToolbar=!1,this.creator.isMobileView=!0},e.prototype.resetMobileView=function(){this.creator.showTabs=void 0,this.creator.showToolbar=void 0,this.creator.isMobileView=void 0},e.prototype.procesShowToolbox=function(e){e&&!this.creator.showToolbox&&void 0!==this.prevShowToolbox?(this.creator.showToolbox=this.prevShowToolbox,this.prevShowToolbox=void 0):!e&&this.creator.showToolbox&&void 0===this.prevShowToolbox&&(this.prevShowToolbox=this.creator.showToolbox,this.creator.showToolbox=!1)},e.prototype.procesShowPageNavigator=function(e){"bypage"!==this.creator.pageEditMode?e&&!this.creator.showPageNavigator&&void 0!==this.prevShowPageNavigator?(this.creator.showPageNavigator=this.prevShowPageNavigator,this.prevShowPageNavigator=void 0):!e&&this.creator.showPageNavigator&&void 0===this.prevShowPageNavigator&&(this.prevShowPageNavigator=this.creator.showPageNavigator,this.creator.showPageNavigator=!1):this.creator.showPageNavigator=!0},e.prototype.findCorrectParent=function(e){return(null===window||void 0===window?void 0:window.getComputedStyle)&&"inline"===window.getComputedStyle(e.parentElement).display?this.findCorrectParent(e.parentElement):e.parentElement},e.prototype._process=function(e,t,o){this.creator.updateToolboxIsCompact(e),this.procesShowToolbox(t),this.procesShowPageNavigator(t),this.creator.sidebar.flyoutMode=o,this.creator.sidebar.visible&&!o&&(this.creator.sidebar.collapsedManually=!1),this.creator.sidebar.visible&&!this.creator.sidebar.expandedManually&&o&&"right"!=this.creator.toolboxLocation&&this.creator.sidebar.collapseSidebar(),this.creator.sidebar.visible||this.creator.sidebar.collapsedManually||o||"right"==this.creator.toolboxLocation||this.creator.sidebar.expandSidebar()},e.prototype.process=function(){this.currentWidth=this.getScreenWidth(),"xl"===this.currentWidth||"xxl"===this.currentWidth?this._process(!1,!0,!1):"l"===this.currentWidth?this._process(!0,!0,!1):"m"===this.currentWidth?this._process(!0,!0,!0):this._process(!0,!1,!0),"xs"==this.currentWidth?this.initMobileView():this.resetMobileView()},e.prototype.dispose=function(){this.resizeObserver&&this.resizeObserver.disconnect()},e.screenSizeBreakpoints={xxl:1800,xl:1500,l:1200,m:900,s:600},e}(),Jt=function(e){function t(t,o,i,n){var r=e.call(this)||this;return r.id=t,r.sidePanel=o,i&&(r.componentName=i),n&&(r.model=n),r}return z(t,e),U([Object(r.property)({onSet:function(e,t){t.sidePanel.headerText=t.caption}})],t.prototype,"caption",void 0),U([Object(r.property)({onSet:function(e,t){t.sidePanel.updateHasVisibleTabs()}})],t.prototype,"visible",void 0),U([Object(r.property)()],t.prototype,"model",void 0),U([Object(r.property)()],t.prototype,"componentName",void 0),t}(r.Base),Wt=function(){function e(e,t){var o=this;this.container=e,this.events={mousedown:{touch:"touchend",mouse:"mousedown",pointer:"pointerdown"},mouseup:{touch:"touchstart",mouse:"mouseup",pointer:"pointerup"},mousemove:{touch:"touchmove",mouse:"mousemove",pointer:"pointermove"}},this.onMouseDownListener=function(e){window&&(e.preventDefault(),o.originalWidth=o.getStyleValue(o.container,"width"),o.originalMouseX=e.pageX,o.currentResizer=e.target,window.addEventListener(o.getMouseEvent("mousemove"),o.resize),window.addEventListener(o.getMouseEvent("mouseup"),o.stopResize))},this.resize=function(e){var t=o.originalWidth,i=e.pageX-o.originalMouseX;o.currentResizer==o.westResizer?t-=i:t+=i,t>o.maxWidth?t=o.maxWidth:t<o.minWidth&&(t=o.minWidth),o.container.style.width=t+"px"},this.stopResize=function(e){window&&(window.removeEventListener(o.getMouseEvent("mousemove"),o.resize),window.removeEventListener(o.getMouseEvent("mouseup"),o.stopResize))},this.init(e),this.setHandles(t)}return e.prototype.setHandles=function(e){var t=!1,o=!1,i=e.split(",");i.forEach((function(e){return e.trim()})),((i=i.filter((function(e){return!!e})))||[]).forEach((function(e){"w"==e&&(t=!0),"e"==e&&(o=!0)})),this.westResizer.style.display=t?"block":"none",this.eastResizer.style.display=o?"block":"none"},e.prototype.getStyleValue=function(e,t){return window?parseFloat(window.getComputedStyle(e).getPropertyValue(t).replace("px","")):0},e.prototype.isEventSupported=function(e){var t=document.createElement("div"),o=(e="on"+e)in t;return o||(t.setAttribute(e,"return;"),o="function"==typeof t[e]),t=null,o},e.prototype.getEventPrefix=function(){return void 0===this.mouseDevice&&(this.isEventSupported("pointerdown")?this.mouseDevice="pointer":this.isEventSupported("touchstart")?this.mouseDevice="touch":this.isEventSupported("mousedown")&&(this.mouseDevice="mouse")),this.mouseDevice},e.prototype.getMouseEvent=function(e){return this.events[e][this.getEventPrefix()]},e.prototype.init=function(e){this.westResizer=this.createrResizerElement("svc-resizer svc-resizer-west"),this.eastResizer=this.createrResizerElement("svc-resizer svc-resizer-east"),this.minWidth=this.getStyleValue(e,"min-width"),this.maxWidth=this.getStyleValue(e,"max-width"),e.insertBefore(this.westResizer,e.children[0]),e.appendChild(this.eastResizer)},e.prototype.createrResizerElement=function(e){var t=document.createElement("div");return t.className=e,t.addEventListener(this.getMouseEvent("mousedown"),this.onMouseDownListener),t},e.prototype.dispose=function(){this.eastResizer.removeEventListener(this.getMouseEvent("mousedown"),this.onMouseDownListener),this.eastResizer.remove(),this.eastResizer=void 0,this.westResizer.removeEventListener(this.getMouseEvent("mousedown"),this.onMouseDownListener),this.westResizer.remove(),this.westResizer=void 0},e}(),Kt=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.toolbar=new r.AdaptiveActionContainer,o.onSidebarVisibilityChanged=function(e,t){o.isDisposed||(o.visible=t.show)},o.creator.onShowSidebarVisibilityChanged.add(o.onSidebarVisibilityChanged),o.creator.onPropertyChanged.add((function(e,t){"sidebarLocation"===t.name&&o.resizeManager&&o.resizeManager.setHandles(o.getCurrentHandles())})),o.visible=o.creator.showSidebar,o.createActions(),o}return z(t,e),Object.defineProperty(t.prototype,"flyoutPanelMode",{get:function(){return this.visible&&this.flyoutMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"closeText",{get:function(){return Q("pe.close")},enumerable:!1,configurable:!0}),t.prototype.getTabById=function(e){return this.tabs.filter((function(t){return t.id===e}))[0]},t.prototype.createActions=function(){var e=this;this._collapseAction=new r.Action({id:"svd-grid-hide",iconName:"icon-collapse-panel",css:"svd-grid-hide",locTitleName:"ed.hidePanel",showTitle:!1,visible:new r.ComputedUpdater((function(){return I(!I(!e.creator.allowCollapseSidebar,!e.flyoutMode),e.visible)})),action:function(){e.collapseSidebar(),e.flyoutMode?e.creator.focusElement(e.creator.selectedElement,!0):(e.collapsedManually=!0,e.expandedManually=!1)}}),this.toolbar.actions.push(this._collapseAction),this.creator.allowCollapseSidebar&&(this._expandAction=new r.Action({id:"svd-grid-expand",iconName:"icon-expand-panel",css:"svd-grid-expand",needSeparator:!0,action:function(){e.expandSidebar(),e.flyoutMode||(e.collapsedManually=!1,e.expandedManually=e.flyoutMode)},locTitleName:"ed.showPanel",visible:new r.ComputedUpdater((function(){return I(e.hasVisibleTabs,!e.visible)})),showTitle:!1}))},t.prototype.getCurrentHandles=function(){return"right"==this.creator.sidebarLocation?"w":"e"},t.prototype.getExpandAction=function(){return this._expandAction},t.prototype.collapseSidebar=function(){this.creator.setShowSidebar(!1)},t.prototype.expandSidebar=function(){this.creator.setShowSidebar(!0)},t.prototype.addTab=function(e,t,o,i){var n=this,r=new Jt(e,this,t,o);return this.tabs.push(r),i&&(i()||[]).forEach((function(e){return n.toolbar.actions.push(e)})),r},t.prototype.updateHasVisibleTabs=function(){this.hasVisibleTabs=(this.tabs||[]).filter((function(e){return e.visible})).length>0},t.prototype.dispose=function(){this.creator&&!this.isDisposed&&this.creator.onShowSidebarVisibilityChanged.remove(this.onSidebarVisibilityChanged),e.prototype.dispose.call(this)},t.prototype.initResizeManager=function(e){this.resizeManager=new Wt(e,this.getCurrentHandles())},t.prototype.resetResizeManager=function(){this.resizeManager&&(this.resizeManager.dispose(),this.resizeManager=void 0)},U([Object(r.propertyArray)()],t.prototype,"tabs",void 0),U([Object(r.property)()],t.prototype,"headerText",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"visible",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"collapsedManually",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"expandedManually",void 0),U([Object(r.property)()],t.prototype,"hasVisibleTabs",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"flyoutMode",void 0),U([Object(r.property)({onSet:function(e,t){t.tabs.forEach((function(e){return e.visible=!1})),t._activeTab=t.tabs.filter((function(t){return t.id===e}))[0],t._activeTab&&(t.headerText=t._activeTab.caption,t._activeTab.visible=!0)}})],t.prototype,"activeTab",void 0),t}(r.Base),Xt=function(){function e(e){this.question=e}return e.createItemsNavigator=function(e){return e instanceof r.QuestionImagePickerModel?null:e instanceof r.QuestionMultipleTextModel?new $t(e):e instanceof r.QuestionMatrixDropdownModel?new to(e):e instanceof r.QuestionMatrixDynamicModel?new oo(e):e instanceof r.QuestionMatrixModel?new eo(e):e instanceof r.QuestionSelectBase?new Yt(e):null},e.prototype.addNewItems=function(e,t,o){var i=this,n=e.slice(0,t).concat(o.map((function(e){return t=e,i.question.createItemValue?i.question.createItemValue(t):new r.ItemValue(t);var t}))).concat(e.slice(t+1));this.question[this.getItemsPropertyName(e)]=n},e.prototype.setEventsForItem=function(e,t,o){var i=this,n=io.get(this.getItemLocString(t,o));n.onEditComplete.clear(),n.onEditComplete.add((function(){var n=t.indexOf(o);n>=0&&n<t.length-1&&io.get(i.getItemLocString(t,t[n+1])).activateEditor(),n==t.length-1&&(i.addNewItem(e,t),io.get(i.getItemLocString(t,t[t.length-1])).setAutoFocus(),io.get(i.getItemLocString(t,t[t.length-1])).activateEditor())})),n.onBackspaceEmptyString.clear(),n.onBackspaceEmptyString.add((function(){var e=t.indexOf(o),n=null;if(-1!==e){if(0==e&&t.length>=2&&(n=t[1]),e>0&&(n=t[e-1]),n){var r=io.get(i.getItemLocString(t,n));r.setAutoFocus(),r.activateEditor()}t.splice(e,1)}})),n.onTextChanging.clear(),n.onTextChanging.add((function(e,n){var r=n.value.split(/\r?\n/).filter((function(e){return!!e}));if(!(r.length<=1)){n.cancel=!0;var a=t.indexOf(o);i.addNewItems(t,a,r);var s=a+r.length;s>=t.length&&(s=t.length-1),io.get(i.getItemLocString(t,t[s])).setAutoFocus(),io.get(i.getItemLocString(t,t[s])).activateEditor()}}))},e.setQuestion=function(t){var o=t.element,i=e.createItemsNavigator(o);if(i){var n=t.creator,r=io.get(o.locTitle),a=i.getItemSets(),s=a[0];r.hasEditCompleteHandler||(r.onEditComplete.add((function(){s.length&&io.get(i.getItemLocString(s,s[0])).activateEditor()})),r.hasEditCompleteHandler=!0),a.forEach((function(e){e.forEach((function(t){i.setEventsForItem(n,e,t)}));var t=i.getItemsPropertyName(e);o.onPropertyChanged.add((function(o,r){r.name==t&&e.forEach((function(t){i.setEventsForItem(n,e,t)}))}))}))}return!!i},e}(),Yt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.getItemLocString=function(e,t){return t.locText},t.prototype.getItemSets=function(){return[this.question.choices]},t.prototype.addNewItem=function(e,t,o){void 0===o&&(o=null);var i=e.createNewItemValue(this.question);o&&(i.value=o)},t.prototype.getItemsPropertyName=function(e){return"choices"},t}(Xt),$t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.getItemLocString=function(e,t){return t.locTitle},t.prototype.getItemSets=function(){return[this.question.items]},t.prototype.addNewItem=function(e,t,o){void 0===o&&(o=null),this.question.addItem(o||h("text",t.map((function(e){return e.name}))))},t.prototype.getItemsPropertyName=function(e){return"items"},t.prototype.addNewItems=function(e,t,o){var i=e.slice(0,t).concat(o.map((function(e){return new r.MultipleTextItemModel(e)}))).concat(e.slice(t+1));this.question[this.getItemsPropertyName(e)]=i},t}(Xt),eo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.getItemLocString=function(e,t){return t.locText},t.prototype.getItemSets=function(){return[this.question.columns,this.question.rows]},t.prototype.addNewItem=function(e,t,o){void 0===o&&(o=null),t==this.question.columns&&this.question.addColumn(o||h("Column ",t.map((function(e){return e.value})))),t==this.question.rows&&this.question.rows.push(o||new r.ItemValue(h("Row ",t.map((function(e){return e.value})))))},t.prototype.getItemsPropertyName=function(e){return e==this.question.columns?"columns":e==this.question.rows?"rows":void 0},t}(Xt),to=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.getItemLocString=function(e,t){return e==this.question.columns?t.locTitle:t.locText},t.prototype.addNewItems=function(t,o,i){if(t==this.question.columns){var n=t.slice(0,o).concat(i.map((function(e){return new r.MatrixDropdownColumn(e)}))).concat(t.slice(o+1));this.question[this.getItemsPropertyName(t)]=n}else e.prototype.addNewItems.call(this,t,o,i)},t}(eo),oo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.getItemSets=function(){return[this.question.columns]},t}(to),io=function(e){function t(t){var o=e.call(this)||this;return o.locString=t,o.hasEditCompleteHandler=!1,o.onDoActivate=new r.EventBase,o.onTextChanging=new r.EventBase,o.onEditComplete=new r.EventBase,o.onBackspaceEmptyString=new r.EventBase,o}return z(t,e),t.get=function(e){return e._stringEditorConnector||(e._stringEditorConnector=new t(e)),e._stringEditorConnector},t.prototype.setAutoFocus=function(){this.focusOnEditor=!0},t.prototype.activateEditor=function(){this.onDoActivate.fire(this.locString,{})},t}(r.Base),no=function(e){function t(t,o){var i=e.call(this)||this;return i.locString=t,i.creator=o,i.blurredByEscape=!1,i.focusedProgram=!1,i.characterCounter=new r.CharacterCounter,i.justFocused=!1,i.connector=io.get(t),i.connector.onDoActivate.add((function(){i.activate()})),i.checkMarkdownToTextConversion(i.locString.owner,i.locString.name),i}return z(t,e),t.prototype.afterRender=function(){this.connector.focusOnEditor&&this.activate()&&(this.connector.focusOnEditor=!1)},t.prototype.activate=function(){var e=this.getEditorElement();return!(!e||null==e.offsetParent)&&(e.focus(),x(e),!0)},t.prototype.setLocString=function(e){var t=this;this.locString=e,this.connector=io.get(e),this.connector.onDoActivate.add((function(){t.activate()}))},t.prototype.checkConstraints=function(e){this.maxLength>0&&e.keyCode>=32&&((e.target.innerText||"").length>=this.maxLength&&e.preventDefault());(e.ctrlKey||e.metaKey)&&-1!==[89,90].indexOf(e.keyCode)&&(e.stopImmediatePropagation(),e.preventDefault())},t.prototype.onClick=function(e){e.stopPropagation()},t.prototype.onFocus=function(e){this.focusedProgram||(this.valueBeforeEdit=this.locString.hasHtml?e.target.innerHTML:e.target.innerText,this.focusedProgram=!1),this.maxLength>0&&this.characterCounter.updateRemainingCharacterCounter(this.valueBeforeEdit,this.maxLength),this.creator.selectFromStringEditor=!0,e.target.parentElement.click(),e.target.spellcheck=!0,e.target.setAttribute("tabindex",-1),this.focused=!0,this.justFocused=!0},t.prototype.checkMarkdownToTextConversion=function(e,t){var o={element:e,text:null,name:t,html:""};this.creator&&(this.creator.onHtmlToMarkdown.fire(this.creator,o),this.editAsText=null===o.text)},t.prototype.onCompositionStart=function(e){this.compostionInProgress=!0},t.prototype.onInput=function(e){var t;if(this.maxLength>0){var o=e.target.innerText||"";this.characterCounter.updateRemainingCharacterCounter(o,this.maxLength)}if(this.editAsText&&!this.compostionInProgress){var i={value:null===(t=e.target)||void 0===t?void 0:t.innerText,cancel:null};if(this.connector.onTextChanging.fire(this,i),i.cancel)return;Object(r.sanitizeEditableContent)(e.target),this.maxLength>=0&&e.target.innerText.length>this.maxLength&&(e.target.innerText=e.target.innerText.substring(0,this.maxLength))}},t.prototype.onCompositionEnd=function(e){this.compostionInProgress=!1,this.onInput(e)},t.prototype.onBlur=function(e){if(e.target.removeAttribute("tabindex"),this.blurredByEscape)return this.blurredByEscape=!1,this.locString.hasHtml?e.target.innerHTML=this.valueBeforeEdit:e.target.innerText=this.valueBeforeEdit,this.errorText=null,this.focused=!1,void(null===window||void 0===window||window.getSelection().removeAllRanges());var t=null;if(!this.editAsText){var o={element:this.locString.owner,text:null,name:this.locString.name,html:e.target.innerHTML};this.creator.onHtmlToMarkdown.fire(this.creator,o),t=o.text}var i=t||C(this.locString.hasHtml?e.target.innerHTML:e.target.innerText),n=this.locString.owner,a={obj:n,propertyName:this.locString.name,value:this.locString.text,newValue:i,doValidation:!1};if(this.creator.onValueChangingCallback(a),i=a.newValue,this.errorText=this.creator.onGetErrorTextOnValidationCallback(this.locString.name,n,i),!this.errorText&&!i){var s=n.getPropertyByName&&n.getPropertyByName(this.locString.name);s&&s.isRequired&&(this.errorText=H.getString("pe.propertyIsEmpty"))}if(this.locString.text==i||!this.locString.text&&i==this.locString.calculatedText)this.locString.hasHtml?e.target.innerHTML=this.locString.renderedHtml:e.target.innerText=this.locString.renderedHtml,this.locString.strChanged();else{if(this.errorText)return this.creator.notify(this.errorText,"error"),this.focusedProgram=!0,e.target.innerText=i,void e.target.focus();if(this.locString.owner instanceof r.ItemValue&&this.creator.inplaceEditForValues){var l=this.locString.owner;if(l.value!==i){if(l.locOwner&&l.ownerPropertyName){var u=l.locOwner[l.ownerPropertyName];Array.isArray(u)&&r.ItemValue.getItemByValue(u,i)&&(i=p(i,u),e&&e.target&&(e.target.innerText=i))}l.value=i}}else{var c=this.locString.storeDefaultText;this.locString.storeDefaultText=!1,this.locString.text=i,this.locString.storeDefaultText=c}}this.focused=!1,null===window||void 0===window||window.getSelection().removeAllRanges()},t.prototype.done=function(e){e.stopImmediatePropagation(),e.preventDefault()},t.prototype.onPaste=function(e){if(this.editAsText){e.preventDefault();var t=e.clipboardData.getData("text/plain");document.execCommand("insertHTML",!1,t)}},t.prototype.onKeyDown=function(e){return 13!==e.keyCode||!this.editAsText&&e.shiftKey||(this.blurEditor(),e.ctrlKey||e.metaKey||this.connector.onEditComplete.fire(this,{}),this.done(e)),27===e.keyCode&&(this.blurredByEscape=!0,this.blurEditor(),this.done(e)),8!==e.keyCode||e.target.innerText||(this.done(e),this.connector.onBackspaceEmptyString.fire(this,{})),this.checkConstraints(e),!0},t.prototype.onKeyUp=function(e){return 9===e.keyCode&&e.target===document.activeElement&&x(e.target),!0},t.prototype.onMouseUp=function(e){return!this.justFocused||(this.justFocused=!1,!!window&&((window.getSelection().focusNode&&window.getSelection().focusNode.parentElement!==e.target||0==window.getSelection().toString().length)&&x(e.target),!1))},t.prototype.findProperty=function(){if(this.locString.owner.getType){var e=this.locString.owner.getType();if(this.locString.name)return r.Serializer.findProperty(e,this.locString.name)}},Object.defineProperty(t.prototype,"maxLength",{get:function(){var e=this.findProperty();return!e||e.maxLength<=0?-1:e.maxLength},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholder",{get:function(){var e=this;if(this.placeholderValue)return this.placeholderValue;var t=this.findProperty();if(!t||!t.placeholder)return"";var o=H.getString(t.placeholder);if(o){var i=/\{([^}]+)\}/g;this.placeholderValue=new r.ComputedUpdater((function(){for(var t=o,n=i.exec(t);null!=n;)t=t.replace(i,(function(t){return""+(e.locString.owner&&e.locString.owner[n[1]])})),n=i.exec(t);return t}))}return this.placeholderValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contentEditable",{get:function(){return this.creator.isCanModifyProperty(this.locString.owner,this.locString.name)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showCharacterCounter",{get:function(){return-1!==this.maxLength},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getCharacterCounterClass",{get:function(){return"svc-remaining-character-counter"},enumerable:!1,configurable:!0}),t.prototype.className=function(e){return(new r.CssClassBuilder).append("svc-string-editor").append("svc-string-editor--hidden",""==e&&""==this.placeholder).append("svc-string-editor--readonly",!this.contentEditable).append("svc-string-editor--error",!!this.errorText).toString()},U([Object(r.property)()],t.prototype,"errorText",void 0),U([Object(r.property)()],t.prototype,"focused",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"editAsText",void 0),U([Object(r.property)()],t.prototype,"placeholderValue",void 0),t}(r.Base),ro=["Open Sans","Arial, sans-serif","Brush Script MT, cursive","Courier New, monospace","Garamond, serif","Georgia, serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"];function ao(e,t){Object.keys(e.value).forEach((function(o){var i,n=e.contentPanel.getQuestionByName(o);t["--sjs-font-"+e.name.toLocaleLowerCase()+"-"+o]=e.value[o]+((null===(i=n.unit)||void 0===i?void 0:i.toString())||"")}))}function so(e,t,o){var i={};return Object.keys(t).filter((function(t){return-1!==t.indexOf(e.name.toLocaleLowerCase())})).forEach((function(e){var o=e.split("-").pop();i[o]=t[e]})),0!==Object.keys(i).length?e.value=i:o&&(e.contentPanel.getQuestionByName("color").value=o),i}function lo(e,t){Object.keys(e.value).forEach((function(o){"corner"!==o&&(t["--sjs-"+e.name.toLocaleLowerCase()+"-"+o]=e.value[o])}))}function uo(e,t,o,i){var n={};return Object.keys(t).filter((function(t){return-1!==t.indexOf(e.name.toLocaleLowerCase())})).forEach((function(e){var o=e.split("-").pop();"cornerRadius"===o?n.corner=parseFloat(t[e].toString()):n[o]=t[e]})),0===Object.keys(n).length?(e.contentPanel.getQuestionByName("backcolor").value=o,e.contentPanel.getQuestionByName("hovercolor").value=i):e.value=n,n}r.ComponentCollection.Instance.add({name:"fontsettings",showInToolbox:!1,elementsJSON:[{type:"dropdown",name:"family",title:Q("theme.fontFamily"),titleLocation:"left",descriptionLocation:"hidden",choices:[].concat(ro),allowClear:!1},{type:"buttongroup",name:"weight",titleLocation:"hidden",descriptionLocation:"hidden",choices:[{value:"400",text:Q("theme.fontWeightRegular")},{value:"600",text:Q("theme.fontWeightSemiBold")},{value:"700",text:Q("theme.fontWeightBold")},{value:"800",text:Q("theme.fontWeightHeavy")}]},{type:"colorsettings",name:"color",colorTitle:Q("theme.color"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"},{type:"spinedit",name:"size",title:Q("theme.size"),titleLocation:"left",descriptionLocation:"hidden",unit:"px",min:0}],onInit:function(){},onCreated:function(e){e.contentPanel.getQuestionByName("color").visible="surveyTitle"!==e.name},onValueChanged:function(e,t,o){}}),r.ComponentCollection.Instance.add({name:"elementsettings",showInToolbox:!1,elementsJSON:[{type:"colorsettings",name:"backcolor",colorTitle:Q("theme.backcolor"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"},{type:"colorsettings",name:"hovercolor",colorTitle:Q("theme.hovercolor"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"},{type:"spinedit",name:"corner",title:Q("theme.cornerRadius"),titleLocation:"left",descriptionLocation:"hidden",unit:"px",min:0},{type:"expression",name:"cornerRadius",expression:"iif({composite.corner} notempty, {composite.corner} + 'px', '')",visible:!1}],onInit:function(){},onCreated:function(e){},onValueChanged:function(e,t,o){}}),o(14);var co=o(15),po=["default","contrast","plain","simple","blank","double","bulk","pseudo-3d","playful","ultra"],ho={light:{teal:"rgba(11, 128, 128, 1)",blue:"rgba(39, 114, 203, 1)",purple:"rgba(122, 70, 187, 1)",orchid:"rgba(178, 61, 153, 1)",tulip:"rgba(191, 76, 97, 1)",brown:"rgba(177, 94, 47, 1)",green:"rgba(11, 134, 75, 1)"},dark:{teal:"rgba(22, 198, 187, 1)",blue:"rgba(109, 183, 252, 1)",purple:"rgba(173, 144, 255, 1)",orchid:"rgba(232, 113, 220, 1)",tulip:"rgba(245, 131, 151, 1)",brown:"rgba(252, 187, 89, 1)",green:"rgba(140, 204, 90, 1)"}},go=function(e){function t(t,o){void 0===o&&(o=r.defaultV2Css);var i=e.call(this)||this;i.surveyProvider=t,i.startTheme=o,i.pages=new r.ActionContainer,i.themeChanges={},i.colorCalculator=new B,i.blockChanges=!1,i.blockThemeChangedNotifications=0,i.simulator=new ye,i.loadTheme(i.surveyProvider.theme),i.themeEditorSurveyValue=i.createThemeEditorSurvey();var n=i;return i.exportToFileUI=function(){n.exportToFile(a.theme.exportFileName)},i.importFromFileUI=function(e){e.files.length<1||(n.importFromFile(e.files[0]),e.value="")},i}return z(t,e),t.prototype.getFullThemeName=function(e){return"light"===this.themePalette?e||this.themeName:(e||this.themeName)+"-"+this.themePalette},Object.defineProperty(t.prototype,"themeVariables",{get:function(){return co[this.getFullThemeName()]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeLanguage",{get:function(){return this.getPropertyValue("activeLanguage",this.survey.locale||r.surveyLocalization.defaultLocale)},set:function(e){e!==this.activeLanguage&&(this.setPropertyValue("activeLanguage",e),this.survey.locale=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.simulator.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageActions",{get:function(){return this.pages.actions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPageToolbarVisible",{get:function(){return this.pages.visibleActions.length>0&&!this.surveyProvider.isMobileView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"themeEditorSurvey",{get:function(){return this.themeEditorSurveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTheme",{get:function(){return this.surveyProvider.theme},enumerable:!1,configurable:!0}),t.prototype.applySelectedTheme=function(){var e={};R(e,co[this.getFullThemeName("default")],co[this.getFullThemeName()]),this.survey.isCompact&&R(e,co[this.getFullThemeName()+"-lw"]),R(e,this.themeChanges),this.currentTheme.cssVariables=e,this.loadThemeIntoPropertyGrid(this.themeEditorSurvey),this.setThemeToSurvey()},t.prototype.loadTheme=function(e){this.themeName=e.themeName,this.themePalette=e.colorPalette,this.themeMode=e.isPanelless?"lightweight":void 0,this.backgroundImage=e.backgroundImage,this.backgroundImageFit=e.backgroundImageFit,this.backgroundImageAttachment=e.backgroundImageAttachment;var t=this.getFullThemeName();if(!co[t]){co[t]=e;var o=this.themeEditorSurvey.getQuestionByName("themeName");o.choices=o.choices.concat(new r.ItemValue(e.themeName))}var i={};R(i,this.themeVariables,e.cssVariables),e.cssVariables=i},t.prototype.updateSimulatorSurvey=function(e,t){var o=this.surveyProvider.createSurvey(e||{},"theme");o.setCss(t,!1),this.simulator.survey=o,this.setThemeToSurvey(),this.onSurveyCreatedCallback&&this.onSurveyCreatedCallback(this.survey);var i=this;this.survey.onComplete.add((function(e){i.isRunning=!1})),this.survey.onNavigateToUrl&&this.survey.onNavigateToUrl.add((function(e,t){var o=t.url;if(t.url="",o){var i=Q("ed.navigateToMsg")+" '"+o+"'.";this.surveyProvider?this.surveyProvider.notify(i):alert(i)}})),this.survey.onStarted.add((function(e){i.setActivePageItem(i.simulator.survey.activePage,!0)})),this.survey.onCurrentPageChanged.add((function(e,t){i.activePage=t.newCurrentPage,i.setActivePageItem(t.oldCurrentPage,!1),i.setActivePageItem(t.newCurrentPage,!0)})),this.survey.onPageVisibleChanged.add((function(e,t){i.updatePageItem(t.page)}))},t.prototype.exportToFile=function(e){if(window){var t=JSON.stringify(this.currentTheme,null,4),o=new Blob([t],{type:"application/json"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveBlob(o,e);else{var i=window.document.createElement("a");i.href=window.URL.createObjectURL(o),i.download=e,document.body.appendChild(i),i.click(),document.body.removeChild(i)}}},t.prototype.importFromFile=function(e){var t=this,o=new FileReader;o.onload=function(e){var i=JSON.parse(o.result);t.setThemeFromFile(i)},o.readAsText(e)},t.prototype.setThemeFromFile=function(e){this.surveyProvider.theme=e,this.loadTheme(e),this.loadThemeIntoPropertyGrid(this.themeEditorSurvey),this.initializeColorCalculator(),this.setThemeToSurvey()},t.prototype.setJSON=function(e,t){this.json=e,null!=e&&e.cookieName&&delete e.cookieName,this.updateSimulatorSurvey(e,t)},t.prototype.initialize=function(e,t){this.blockThemeChangedNotifications+=1;try{this.setJSON(e,this.startTheme),this.updatePageList(),void 0!==t.showPagesInTestSurveyTab&&(this.showPagesInTestSurveyTab=t.showPagesInTestSurveyTab),this.buildActions()}finally{this.blockThemeChangedNotifications-=1}},t.prototype.updatePageItem=function(e){var t=this.getPageItemByPage(e);t&&(t.enabled=e.isVisible)},t.prototype.getCurrentPageItem=function(){return this.pageListItems[this.survey.pages.indexOf(this.survey.activePage)]},t.prototype.getSelectPageTitle=function(){return this.activePage&&this.getPageTitle(this.activePage,"preview-tab:selected-page","survey-tester-selected")||Q("ts.selectPage")},t.prototype.getPageTitle=function(e,t,o){void 0===t&&(t="preview-tab:page-list"),void 0===o&&(o="survey-tester");var i=this.surveyProvider.getObjectDisplayName(e,t,o,e.title);if(i===e.name&&0===i.indexOf("page")){var n=this.survey.pages.indexOf(e);return H.getString("ed.pageTypeName")+" "+(n+1)}return i},t.prototype.updatePageList=function(){for(var e=[],t=0;t<this.survey.pages.length;t++){var o=this.survey.pages[t];e.push({id:o.name,data:o,title:this.getPageTitle(o),enabled:o.isVisible,visible:!0})}this.pageListItems=e},t.prototype.resetTheme=function(){this.themeChanges={},this.applySelectedTheme(),"default"===this.themeName&&"panels"===this.themeMode&&"light"===this.themePalette&&(this.surveyProvider.isThemePristine=!0)},t.prototype.show=function(){this.showInvisibleElements=!1,this.activePage=this.survey.activePage,this.survey.locale=this.activeLanguage,this.isRunning=!0},t.prototype.testAgain=function(){this.setJSON(this.json,this.simulator.survey.css),this.updatePageList(),this.show()},t.prototype.buildActions=function(){var e=this,t=[],o=function(t){var o=e.survey.currentPageNo,i=o+(t?1:-1);"starting"===e.survey.state&&t&&(i=0);var n=e.survey.visiblePages[i];!t&&0===o&&e.survey.firstPageIsStarted&&e.survey.pages.length>0&&(n=e.survey.pages[0]);var r=e.survey.pages.indexOf(n);e.activePage=e.survey.pages[r],e.selectPageAction.data.selectedItem=e.pageListItems[r]};this.prevPageAction&&(this.prevPageAction.visible=new r.ComputedUpdater((function(){return I(e.isRunning,"test"===e.surveyProvider.activeTab,e.pageListItems.length>1)})),this.prevPageAction.iconName=new r.ComputedUpdater((function(){return e.surveyProvider.isMobileView?"icon-arrow-left":"icon-arrow-left_16x16"})),this.prevPageAction.iconSize=new r.ComputedUpdater((function(){return e.surveyProvider.isMobileView?24:16})),this.prevPageAction.action=function(){return o(!1)},t.push(this.prevPageAction)),this.selectPageAction=Object(r.createDropdownActionModel)({id:"pageSelector",css:"svc-page-selector",title:this.getSelectPageTitle(),visible:this.isRunning&&this.pageListItems.length>1&&this.showPagesInTestSurveyTab},{items:this.pageListItems,allowSelection:!0,selectedItem:this.getCurrentPageItem(),onSelectionChanged:function(t){e.activePage=t.data},verticalPosition:"top",horizontalPosition:"center"}),t.push(this.selectPageAction),this.nextPageAction&&(this.nextPageAction.visible=new r.ComputedUpdater((function(){return I(e.isRunning,"test"===e.surveyProvider.activeTab,e.pageListItems.length>1)})),this.nextPageAction.iconName=new r.ComputedUpdater((function(){return e.surveyProvider.isMobileView?"icon-arrow-right":"icon-arrow-right_16x16"})),this.nextPageAction.iconSize=new r.ComputedUpdater((function(){return e.surveyProvider.isMobileView?24:16})),this.nextPageAction.action=function(){return o(!0)},t.push(this.nextPageAction)),this.pages.actions=t,this.pages.containerCss="sv-action-bar--pages",this.updatePrevNextPageActionState()},t.prototype.setActivePageItem=function(e,t){var o=this.getPageItemByPage(e);o&&(o.active=t)},t.prototype.getPageItemByPage=function(e){for(var t=this.pageListItems,o=0;o<t.length;o++)if(t[o].data===e)return t[o];return null},t.prototype.updateResultsTemplate=function(e){this.simulator.survey.setCss(e,!1),this.simulator.survey.render()},t.prototype.setTheme=function(e,t){var o=t.filter((function(t){return t.name===e})),i=r.defaultV2Css;o.length>0&&(i=o[0].theme),this.isRunning?this.updateSimulatorSurvey(this.json,i):this.updateResultsTemplate(i)},t.prototype.onPropertyValueChanged=function(t,o,i){e.prototype.onPropertyValueChanged.call(this,t,o,i),this.pages.hasActions&&("activePage"===t&&(this.updatePrevNextPageActionState(),this.selectPageAction.title=this.getSelectPageTitle()),"isRunning"!==t&&"pageListItems"!==t&&"showPagesInTestSurveyTab"!==t||(this.selectPageAction.popupModel.contentComponentData.model.items=this.pageListItems,this.selectPageAction.popupModel.contentComponentData.model.selectedItem=this.getCurrentPageItem(),this.selectPageAction.visible=this.isRunning&&this.pageListItems.length>1&&this.showPagesInTestSurveyTab))},t.prototype.updatePrevNextPageActionState=function(){if(this.prevPageAction&&this.survey){var e=this.survey.firstPageIsStarted&&"starting"!==this.survey.state||!this.survey.firstPageIsStarted&&!this.survey.isFirstPage;this.prevPageAction.css=e?"sv-action-bar-item--secondary":"",this.prevPageAction.enabled=e;var t=this.survey&&this.survey.visiblePages.indexOf(this.activePage)!==this.survey.visiblePages.length-1;this.nextPageAction.css=t?"sv-action-bar-item--secondary":"",this.nextPageAction.enabled=t}},t.prototype.initializeColorCalculator=function(){this.currentTheme.cssVariables["--sjs-primary-backcolor"]&&this.currentTheme.cssVariables["--sjs-primary-backcolor-light"]&&this.currentTheme.cssVariables["--sjs-primary-backcolor-dark"]&&this.colorCalculator.initialize(this.currentTheme.cssVariables["--sjs-primary-backcolor"],this.currentTheme.cssVariables["--sjs-primary-backcolor-light"],this.currentTheme.cssVariables["--sjs-primary-backcolor-dark"])},t.prototype.createThemeEditorSurvey=function(){var e=this,t=this.getThemeEditorSurveyJSON();He(t,!0,!1);var o=this.surveyProvider.createSurvey(t,"theme_editor");o.getCss().list={};var i=G({},se);return i.root+=" spg-theme-builder-root",o.css=i,this.loadThemeIntoPropertyGrid(o),this.initializeColorCalculator(),o.onValueChanged.add((function(t,i){var n,r;if(!e.blockChanges){if(0===i.name.indexOf("--")&&(e.themeChanges[i.name]=i.value),-1!==["themeName","themeMode","themePalette"].indexOf(i.name))return e[i.name]=i.value,e.initializeColorCalculator(),void("themeMode"===i.name?(e.survey.isCompact="lightweight"===i.value,e.currentTheme.isPanelless="lightweight"===i.value,e.applySelectedTheme()):(e.currentTheme.themeName=e.themeName,e.currentTheme.colorPalette=e.themePalette,e.resetTheme()));if(-1===["backgroundImage","backgroundImageFit","backgroundImageAttachment"].indexOf(i.name)){if("backgroundOpacity"===i.name)return e.survey.backgroundOpacity=i.value/100,void(e.currentTheme.backgroundOpacity=i.value/100);if(e.blockThemeChangedNotifications+=1,"commonScale"==i.name&&e.survey.triggerResponsiveness(!0),"--sjs-primary-backcolor"===i.name&&(e.colorCalculator.calculateColors(i.value),e.themeChanges["--sjs-primary-backcolor"]=i.value,e.themeChanges["--sjs-primary-backcolor-light"]=e.colorCalculator.colorSettings.newColorLight,e.themeChanges["--sjs-primary-backcolor-dark"]=e.colorCalculator.colorSettings.newColorDark,e.themeEditorSurvey.setValue("--sjs-primary-backcolor-light",e.colorCalculator.colorSettings.newColorLight),e.themeEditorSurvey.setValue("--sjs-primary-backcolor-dark",e.colorCalculator.colorSettings.newColorDark)),"questionBackgroundTransparency"===i.name||"editorPanel"===i.name){var a=k(o.getValue("--sjs-general-backcolor-dim-light")).color,s=o.getValue("questionBackgroundTransparency");e.themeChanges["--sjs-editor-background"]=_(a,s/100)}if("panelBackgroundTransparency"===i.name||"questionPanel"===i.name){a=k(o.getValue("--sjs-general-backcolor")).color;var l=o.getValue("panelBackgroundTransparency");e.themeChanges["--sjs-question-background"]=_(a,l/100)}"fontsettings"===(null===(n=i.question)||void 0===n?void 0:n.getType())&&ao(i.question,e.themeChanges),"elementsettings"===(null===(r=i.question)||void 0===r?void 0:r.getType())&&lo(i.question,e.themeChanges);var u={};R(u,e.currentTheme.cssVariables,e.themeChanges),e.currentTheme.cssVariables=u,e.blockThemeChangedNotifications-=1,e.setThemeToSurvey()}else e[i.name]=i.value}})),o.getAllQuestions().forEach((function(e){return e.allowRootStyle=!1})),o.onQuestionCreated.add((function(e,t){t.question.allowRootStyle=!1})),o},t.prototype.loadThemeIntoPropertyGrid=function(e){this.blockChanges=!0;try{e.clear(!0),e.mergeData(this.currentTheme.cssVariables),e.setValue("themeName",this.themeName),e.setValue("themeMode",this.themeMode),e.setValue("themePalette",this.themePalette),this.updatePGEditors(e)}finally{this.blockChanges=!1}},t.prototype.updatePGEditors=function(e){var t=this,o={};R(o,this.currentTheme.cssVariables),e.getQuestionByName("backgroundImage").value=this.backgroundImage,e.getQuestionByName("backgroundImageFit").value=this.backgroundImageFit,e.getQuestionByName("backgroundImageAttachment").value=this.backgroundImageAttachment,uo(e.getQuestionByName("questionPanel"),o,o["--sjs-general-backcolor"],o["--sjs-general-backcolor-dark"]),uo(e.getQuestionByName("editorPanel"),o,o["--sjs-general-backcolor-dim-light"],o["--sjs-general-backcolor-dim-dark"]),so(e.getQuestionByName("surveyTitle"),o),so(e.getQuestionByName("pageTitle"),o,o["--sjs-general-dim-forecolor"]),so(e.getQuestionByName("pageDescription"),o,o["--sjs-general-dim-forecolor-light"]),so(e.getQuestionByName("questionTitle"),o,o["--sjs-general-forecolor"]),so(e.getQuestionByName("questionDescription"),o,o["--sjs-general-forecolor-light"]),so(e.getQuestionByName("editorFont"),o),e.getAllQuestions().forEach((function(e){-1!==["color","colorsettings"].indexOf(e.getType())&&(e.choices=Object.keys(ho[t.themePalette]).map((function(e){return new r.ItemValue(ho[t.themePalette][e],Q("theme.colors."+e))})))}))},t.prototype.setThemeToSurvey=function(e){e&&(this.surveyProvider.theme=e),this.survey.applyTheme(this.surveyProvider.theme),0==this.blockThemeChangedNotifications&&this.surveyProvider.raiseThemeChanged()},t.prototype.getThemeEditorSurveyJSON=function(){return{clearInvisibleValues:"none",elements:[{type:"panel",state:"expanded",title:Q("theme.groupGeneral"),elements:[{type:"panel",elements:[{type:"dropdown",name:"themeName",title:Q("theme.themeName"),descriptionLocation:"hidden",choices:po.map((function(e){return{value:e,text:Q("theme.names."+e)}})),defaultValue:"default",allowClear:!1},{type:"buttongroup",name:"themePalette",titleLocation:"hidden",choices:[{value:"light",text:Q("theme.themePaletteLight")},{value:"dark",text:Q("theme.themePaletteDark")}],defaultValue:"light"},{type:"buttongroup",name:"themeMode",title:Q("theme.themeMode"),choices:[{value:"panels",text:Q("theme.themeModePanels")},{value:"lightweight",text:Q("theme.themeModeLightweight")}],defaultValue:"panels"}]},{type:"panel",elements:[{type:"color",name:"--sjs-primary-backcolor",title:Q("theme.primaryColor"),descriptionLocation:"hidden"},{type:"color",name:"--sjs-general-backcolor-dim",title:Q("theme.backgroundDimColor"),descriptionLocation:"hidden"},{type:"panel",name:"background",title:Q("theme.backgroundImage"),elements:[{type:"fileedit",name:"backgroundImage",titleLocation:"hidden",acceptedTypes:"image/*",placeholder:"Browse..."},{type:"buttongroup",name:"backgroundImageFit",enableIf:"{backgroundImage} notempty",titleLocation:"hidden",choices:[{value:"auto",text:Q("theme.backgroundImageFitAuto")},{value:"contain",text:Q("theme.backgroundImageFitContain")},{value:"cover",text:Q("theme.backgroundImageFitCover")}],defaultValue:"cover"},{type:"buttongroup",name:"backgroundImageAttachment",enableIf:"{backgroundImage} notempty",titleLocation:"hidden",choices:[{value:"fixed",text:Q("theme.backgroundImageAttachmentFixed")},{value:"scroll",text:Q("theme.backgroundImageAttachmentScroll")}],defaultValue:"scroll"},{type:"spinedit",name:"backgroundOpacity",enableIf:"{backgroundImage} notempty",titleLocation:"left",title:Q("theme.backgroundOpacity"),descriptionLocation:"hidden",unit:"%",defaultValue:100,min:0,max:100,step:5}]},{type:"spinedit",name:"panelBackgroundTransparency",title:Q("theme.panelBackgroundTransparency"),descriptionLocation:"hidden",unit:"%",defaultValue:100,min:0,max:100,step:5},{type:"spinedit",name:"questionBackgroundTransparency",title:Q("theme.questionBackgroundTransparency"),descriptionLocation:"hidden",unit:"%",defaultValue:100,min:0,max:100,step:5}]},{type:"panel",elements:[{type:"dropdown",name:"--font-family",title:Q("theme.fontFamily"),descriptionLocation:"hidden",choices:[].concat(ro),defaultValue:"Open Sans",allowClear:!1},{type:"spinedit",name:"--font-size",title:Q("theme.fontSize"),descriptionLocation:"hidden",unit:"%",defaultValue:100,min:0,step:5},{type:"expression",name:"--sjs-font-size",expression:'{--font-size}*16/100+"px"',visible:!1}]},{type:"panel",elements:[{type:"spinedit",name:"commonScale",title:Q("theme.scale"),descriptionLocation:"hidden",unit:"%",defaultValue:100,min:0,step:5},{type:"expression",name:"--sjs-base-unit",expression:'{commonScale}*8/100+"px"',visible:!1},{type:"spinedit",name:"cornerRadius",title:Q("theme.cornerRadius"),descriptionLocation:"hidden",unit:"px",defaultValue:4,min:0},{type:"expression",name:"--sjs-corner-radius",expression:'{cornerRadius}+"px"',visible:!1}]}]},{type:"panel",title:Q("theme.groupAdvanced"),state:"collapsed",elements:[{type:"panel",elements:[{type:"color",name:"--sjs-general-backcolor-dim",title:Q("theme.backgroundDimColor"),descriptionLocation:"hidden"},{type:"panel",title:Q("theme.accentBackground"),elements:[{type:"colorsettings",name:"--sjs-primary-backcolor",colorTitle:Q("theme.primaryDefaultColor"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"},{type:"colorsettings",name:"--sjs-primary-backcolor-dark",colorTitle:Q("theme.primaryDarkColor"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"},{type:"colorsettings",name:"--sjs-primary-backcolor-light",colorTitle:Q("theme.primaryLightColor"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"}]},{type:"panel",title:Q("theme.accentForeground"),elements:[{type:"colorsettings",name:"--sjs-primary-forecolor",colorTitle:Q("theme.primaryForecolor"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"},{type:"colorsettings",name:"--sjs-primary-forecolor-light",colorTitle:Q("theme.primaryForecolorLight"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"}]}]},{type:"panel",elements:[{type:"fontSettings",name:"surveyTitle",title:Q("theme.surveyTitle"),descriptionLocation:"hidden",defaultValue:{family:a.theme.fontFamily,color:"rgba(22, 22, 22, 1)",weight:"700",size:32}},{type:"fontSettings",name:"pageTitle",title:Q("theme.pageTitle"),descriptionLocation:"hidden",defaultValue:{family:a.theme.fontFamily,color:"rgba(22, 22, 22, 1)",weight:"700",size:24}},{type:"fontSettings",name:"pageDescription",title:Q("theme.pageDescription"),descriptionLocation:"hidden",defaultValue:{family:a.theme.fontFamily,color:"rgba(22, 22, 22, 1)",weight:"400",size:16}}]},{type:"panel",elements:[{type:"elementSettings",name:"questionPanel",title:Q("theme.questionPanel"),descriptionLocation:"hidden",defaultValue:{backcolor:"rgba(255, 255, 255, 1)",hovercolor:"rgba(248, 248, 248, 1)",corner:4}},{type:"boxshadowsettings",name:"--sjs-shadow-small",descriptionLocation:"hidden",title:Q("theme.questionShadow"),defaultValue:{x:0,y:1,blur:2,spread:0,isInset:!1,color:"rgba(0, 0, 0, 0.15)"}},{type:"expression",name:"--sjs-general-backcolor",expression:"{questionPanel.backcolor}",visible:!1},{type:"fontSettings",name:"questionTitle",title:Q("theme.questionTitle"),descriptionLocation:"hidden",defaultValue:{family:a.theme.fontFamily,color:"rgba(22, 22, 22, 1)",weight:"600",size:16}},{type:"fontSettings",name:"questionDescription",title:Q("theme.questionDescription"),descriptionLocation:"hidden",defaultValue:{family:a.theme.fontFamily,color:"rgba(22, 22, 22, 1)",weight:"400",size:16}}]},{type:"panel",elements:[{type:"elementSettings",name:"editorPanel",title:Q("theme.editorPanel"),descriptionLocation:"hidden",defaultValue:{backcolor:"rgba(255, 255, 255, 1)",hovercolor:"rgba(248, 248, 248, 1)",corner:4}},{type:"boxshadowsettings",name:"--sjs-shadow-inner",descriptionLocation:"hidden",title:Q("theme.editorShadow"),defaultValue:{x:0,y:1,blur:2,spread:0,isInset:!0,color:"rgba(0, 0, 0, 0.15)"}},{type:"expression",name:"--sjs-general-backcolor-dim-light",expression:"{editorPanel.backcolor}",visible:!1},{type:"fontSettings",name:"editorFont",title:Q("theme.editorFont"),descriptionLocation:"hidden",defaultValue:{family:a.theme.fontFamily,color:"rgba(22, 22, 22, 1)",weight:"400",size:16}}]},{type:"panel",elements:[{type:"panel",title:Q("theme.linesColors"),elements:[{type:"colorsettings",name:"--sjs-border-default",colorTitle:Q("theme.borderDefault"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"},{type:"colorsettings",name:"--sjs-border-light",colorTitle:Q("theme.borderLight"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"}]}]}]}]}},U([Object(r.property)({defaultValue:!1,onSet:function(e,t){t.simulator.survey.showInvisibleElements=e}})],t.prototype,"showInvisibleElements",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"showPagesInTestSurveyTab",void 0),U([Object(r.property)({defaultValue:!0,onSet:function(e,t){t.simulator&&(t.simulator.isRunning=e)}})],t.prototype,"isRunning",void 0),U([Object(r.propertyArray)()],t.prototype,"pageListItems",void 0),U([Object(r.property)({onSet:function(e,t){if(e){var o=t.simulator.survey;o.firstPageIsStarted&&(e===o.pages[0]?o.clear(!1,!0):"starting"==o.state&&o.setPropertyValue("isStartedState",!1)),"starting"!==o.state&&(o.currentPage=e)}t.updatePrevNextPageActionState()}})],t.prototype,"activePage",void 0),U([Object(r.property)({onSet:function(e,t){t.survey&&(t.survey.backgroundImage=e),t.currentTheme.backgroundImage=e}})],t.prototype,"backgroundImage",void 0),U([Object(r.property)({defaultValue:"cover",onSet:function(e,t){t.survey&&(t.survey.backgroundImageFit=e),t.currentTheme.backgroundImageFit=e}})],t.prototype,"backgroundImageFit",void 0),U([Object(r.property)({defaultValue:"scroll",onSet:function(e,t){t.survey&&(t.survey.backgroundImageAttachment=e),t.currentTheme.backgroundImageAttachment=e}})],t.prototype,"backgroundImageAttachment",void 0),U([Object(r.property)({defaultValue:"default"})],t.prototype,"themeName",void 0),U([Object(r.property)({defaultValue:"light"})],t.prototype,"themePalette",void 0),U([Object(r.property)({defaultValue:"panels"})],t.prototype,"themeMode",void 0),t}(r.Base),mo=function(){function e(e){this.creator=e,this.simulatorTheme=r.surveyCss[r.defaultV2ThemeName],e.addPluginTab("theme",this,"ed.themeSurvey"),this.simulatorTheme=r.surveyCss[r.defaultV2ThemeName],this.createActions().forEach((function(t){return e.toolbar.actions.push(t)})),this.sidebarTab=this.creator.sidebar.addTab("theme"),this.sidebarTab.caption=H.getString("ed.themePropertyGridTitle")}return e.prototype.getSimulatorDevicesTitle=function(){return this.model?be[this.model.simulator.device].title||Q("pe.simulator"):""},e.prototype.setDevice=function(e){this.model.simulator.device=e,this.model.simulator.resetZoomParameters();var t=be[this.model.simulator.device].deviceType;this.orientationSelectorAction.enabled="desktop"!=t,this.deviceSelectorAction.iconName="icon-device-"+t,this.deviceSelectorAction.title=Q("pe.simulator")},e.prototype.updateActions=function(){this.creator.showSimulatorInTestSurveyTab&&(this.setDevice(this.model.simulator.device),this.deviceSelectorAction.data.selectedItem={id:this.model.simulator.device},this.orientationSelectorAction.title=Q("pe.portraitOrientation")),this.creator.showInvisibleElementsInTestSurveyTab&&(this.invisibleToggleAction.css=this.model.showInvisibleElements?"sv-action-bar-item--active":"",this.invisibleToggleAction.visible=this.model.isRunning)},e.prototype.activate=function(){this.model=new go(this.creator,this.simulatorTheme),this.model.simulator.landscape="portrait"!=this.creator.previewOrientation,this.update(),this.sidebarTab.model=this.model.themeEditorSurvey,this.sidebarTab.componentName="survey-widget",this.creator.sidebar.activeTab=this.sidebarTab.id,this.resetTheme.visible=!0,this.importAction.visible=!0,this.exportAction.visible=!0},e.prototype.update=function(){var e=this;if(this.model){var t={showPagesInTestSurveyTab:this.creator.showPagesInTestSurveyTab};this.model.testAgainAction=this.testAgainAction,this.model.prevPageAction=this.prevPageAction,this.model.nextPageAction=this.nextPageAction,this.model.initialize(this.creator.JSON,t),this.updateActions(),this.model.show(),this.model.onPropertyChanged.add((function(t,o){"isRunning"===o.name&&(e.invisibleToggleAction&&(e.invisibleToggleAction.visible=e.model.isRunning),e.testAgainAction.visible=!e.model.isRunning)}))}},e.prototype.deactivate=function(){return this.model&&(this.simulatorTheme=this.model.simulator.survey.css,this.model.onSurveyCreatedCallback=void 0,this.model=void 0),this.sidebarTab.visible=!1,this.testAgainAction.visible=!1,this.resetTheme.visible=!1,this.importAction.visible=!1,this.exportAction.visible=!1,this.invisibleToggleAction&&(this.invisibleToggleAction.visible=!1),!0},e.prototype.createActions=function(){var e=this,t=[];if(this.testAgainAction=new r.Action({id:"testSurveyAgain",visible:!1,locTitleName:"ed.testSurveyAgain",action:function(){e.model.testAgain()}}),this.creator.showSimulatorInTestSurveyTab){var o=Object.keys(be).filter((function(e){return!!be[e].title})).map((function(e){return{id:e,title:be[e].title}}));this.deviceSelectorAction=Object(r.createDropdownActionModel)({id:"deviceSelector",iconName:"icon-device-desktop",mode:"small",visible:new r.ComputedUpdater((function(){return I("theme"===e.creator.activeTab,e.creator.showSimulatorInTestSurveyTab)}))},{items:o,allowSelection:!0,onSelectionChanged:function(t){e.setDevice(t.id)},horizontalPosition:"center",onHide:function(){e.deviceSelectorAction.enabled=!0},onShow:function(){e.deviceSelectorAction.enabled=!1}}),t.push(this.deviceSelectorAction),this.orientationSelectorAction=new r.Action({id:"orientationSelector",iconName:"icon-device-rotate",mode:"small",visible:new r.ComputedUpdater((function(){return I("theme"===e.creator.activeTab,e.creator.showSimulatorInTestSurveyTab)})),action:function(){e.model.simulator.landscape=!e.model.simulator.landscape,e.orientationSelectorAction.title=Q(e.model.simulator.landscape?"pe.portraitOrientation":"pe.landscapeOrientation")}}),t.push(this.orientationSelectorAction)}return this.creator.showInvisibleElementsInTestSurveyTab&&(this.invisibleToggleAction=new r.Action({id:"showInvisible",iconName:"icon-invisible-items",mode:"small",needSeparator:new r.ComputedUpdater((function(){return!e.creator.isMobileView})),locTitleName:"ts.showInvisibleElements",visible:!1,action:function(){e.model.showInvisibleElements=!e.model.showInvisibleElements,e.invisibleToggleAction.css=e.model.showInvisibleElements?"sv-action-bar-item--active":"",e.invisibleToggleAction.title=Q(e.model.showInvisibleElements?"ts.hideInvisibleElements":"ts.showInvisibleElements")}}),t.push(this.invisibleToggleAction)),this.designerAction=new r.Action({id:"svd-designer",iconName:"icon-preview",needSeparator:!0,action:function(){e.creator.makeNewViewActive("designer")},active:new r.ComputedUpdater((function(){return"theme"===e.creator.activeTab})),visible:new r.ComputedUpdater((function(){return"theme"===e.creator.activeTab})),locTitleName:"ed.designer",showTitle:!1}),this.prevPageAction=new r.Action({id:"prevPage",iconName:"icon-arrow-left_16x16",visible:!1}),this.nextPageAction=new r.Action({id:"nextPage",iconName:"icon-arrow-right_16x16",visible:!1}),this.resetTheme=new r.Action({id:"resetTheme",iconName:"icon-reset",mode:"small",visible:new r.ComputedUpdater((function(){return"theme"===e.creator.activeTab})),action:function(){e.model.resetTheme()}}),t.push(this.resetTheme),this.importAction=new r.Action({id:"svc-theme-import",iconName:"icon-load",locTitleName:"ed.themeImportButton",locTooltipName:"ed.themeImportButton",visible:!1,mode:"small",component:"sv-action-bar-item",needSeparator:!0,action:function(){document&&(e.inputFileElement||(e.inputFileElement=document.createElement("input"),e.inputFileElement.type="file",e.inputFileElement.style.display="none",e.inputFileElement.onchange=function(){e.model.importFromFileUI(e.inputFileElement)}),e.inputFileElement.click())}}),t.push(this.importAction),this.exportAction=new r.Action({id:"svc-theme-export",iconName:"icon-download",locTitleName:"ed.themeExportButton",locTooltipName:"ed.themeExportButton",visible:!1,mode:"small",component:"sv-action-bar-item",action:function(){e.model.exportToFileUI()}}),t.push(this.exportAction),t},e.prototype.addFooterActions=function(){this.creator.footerToolbar.actions.push(this.testAgainAction),this.invisibleToggleAction&&this.creator.footerToolbar.actions.push(this.invisibleToggleAction),this.creator.footerToolbar.actions.push(this.prevPageAction),this.creator.footerToolbar.actions.push(this.nextPageAction),this.creator.footerToolbar.actions.push(this.designerAction)},e}();o(16),o(17),o(18);var fo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t}(r.Action),yo=function(e){function t(t){return e.call(this,t)||this}return z(t,e),t}(r.Action),vo=function(e){function t(){var t=e.call(this)||this;return t.dotsItem.popupModel.horizontalPosition="center",t.minVisibleItemsCount=1,t}return z(t,e),t}(r.AdaptiveActionContainer),bo=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o}return z(t,e),t.prototype.getRenderedActions=function(){var e=this.actions,t=this.creator.sidebar.getExpandAction(),o=e.indexOf(t);return-1!==o&&(e.splice(o,1),e.push(t)),e},t}(r.ActionContainer),wo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t}(r.EventBase),Co=function(e){function t(t,o){var i=e.call(this)||this;i.options=t,i.startEditTitleOnQuestionAdded=!0,i.isRTLValue=!1,i.alwaySaveTextInPropertyEditorsValue=!1,i.pageEditModeValue="standard",i.newQuestions=[],i.newPanels=[],i.plugins={},i.onElementDeleting=new wo,i.onGetPropertyReadOnly=new wo,i.onSurveyInstanceCreated=new wo,i.onGetObjectDisplayName=new wo,i.onHtmlToMarkdown=new wo,i.onElementAllowOperations=new wo,i.onDefineElementMenuItems=new wo,i.onShowingProperty=new wo,i.onCanShowProperty=i.onShowingProperty,i.onPropertyGridSurveyCreated=new wo,i.onPropertyEditorCreated=new wo,i.onPropertyEditorUpdateTitleActions=new wo,i.onPropertyGridShowModal=new wo,i.onCanDeleteItem=new wo,i.onCollectionItemDeleting=new wo,i.onCollectionItemAllowOperations=new wo,i.onItemValueAdded=new wo,i.onMatrixColumnAdded=new wo,i.onSetPropertyEditorOptions=new wo,i.onGenerateNewName=new wo,i.onPropertyValidationCustomError=new wo,i.onPropertyValueChanging=new wo,i.onSurveyPropertyValueChanged=new wo,i.onConditionQuestionsGetList=new wo,i.onConditionGetTitle=new wo,i.onGetConditionOperator=new wo,i.onLogicItemDisplayText=new wo,i.onModified=new wo,i.onQuestionAdded=new wo,i.onPanelAdded=new wo,i.onPageAdded=new wo,i.onGetPageActions=new wo,i.onDesignerSurveyCreated=new wo,i.onPreviewSurveyCreated=new wo,i.onTestSurveyCreated=i.onPreviewSurveyCreated,i.onNotify=new wo,i.onSelectedElementChanging=new wo,i.onSelectedElementChanged=new wo,i.onOpenFileChooser=new wo,i.onUploadFile=new wo,i.onTranslationStringVisibility=new wo,i.onTranslationLocaleInitiallySelected=new wo,i.onTranslationImportItem=new wo,i.onTranslationImported=new wo,i.onTranslationExportItem=new wo,i.onTranslationItemChanging=new wo,i.onDragDropAllow=new wo,i.maxLogicItemsInCondition=-1,i.showObjectTitles=!1,i.maxVisibleChoices=10,i.showTitlesInExpressions=!1,i.allowEditExpressionsInTextEditor=!0,i.maximumColumnsCount=a.propertyGrid.maximumColumnsCount,i.maximumChoicesCount=a.propertyGrid.maximumChoicesCount,i.maximumRowsCount=a.propertyGrid.maximumRowsCount,i.maximumRateValues=a.propertyGrid.maximumRateValues,i.showPagesInTestSurveyTab=!0,i.showSimulatorInTestSurveyTab=!0,i.themeForPreview="defaultV2",i._theme={cssVariables:{}},i._allowModifyPages=!0,i.showDefaultLanguageInTestSurveyTab="auto",i.showInvisibleElementsInTestSurveyTab=!0,i.showPageSelectorInToolbar=!1,i.allowChangeThemeInPreview=!0,i.showErrorOnFailedSave=!0,i.onActiveTabChanging=new wo,i.onActiveTabChanged=new wo,i.showSidebarValue=!0,i.onShowSidebarVisibilityChanged=new wo,i.onShowPropertyGridVisiblityChanged=new wo,i.onBeforeUndo=new wo,i.onBeforeRedo=new wo,i.onAfterUndo=new wo,i.onAfterRedo=new wo,i.onPageAdding=new wo,i.onDragStart=new r.Event,i.onBeforeDrop=i.onDragStart,i.onDragEnd=new r.Event,i.onAfterDrop=i.onDragEnd,i.onStateChanged=new wo,i.notifier=new r.Notifier({root:"svc-notifier",info:"svc-notifier--info",error:"svc-notifier--error",success:"svc-notifier--success",button:"",shown:"svc-notifier--shown"}),i.onKeyDownHandler=function(e){var t,o;Object.keys(i.shortcuts||{}).forEach((function(n){t=i.shortcuts[n],(o=e.metaKey?t.macOsHotkey:t.hotKey)&&!!o.ctrlKey==!!e.ctrlKey&&!!o.shiftKey==!!e.shiftKey&&o.keyCode===e.keyCode&&(o.keyCode<48&&jo(e.target)||t.execute(i.selectElement))}))},i.shortcuts={},i.autoSaveDelay=a.autoSave.delay,i.autoSaveTimerId=null,i.saveNo=0,(o||"string"==typeof i.options||i.options instanceof String)&&(i.options=o||{},re.warnText("Creator constructor has one parameter, as creator options, in V2.")),i.previewOrientation=t.previewOrientation,i.toolbarValue=new bo(i),i.toolbarValue.locOwner=i,i.tabbedMenu=new vo,i.tabbedMenu.locOwner=i,i.selectionHistoryControllerValue=new ae(i),i.sidebar=new Kt(i),i.setOptions(i.options),i.patchMetadata(),i.initSurveyWithJSON(void 0,!1),i.toolbox=new K(i.options&&i.options.questionTypes?i.options.questionTypes:null,i,!0),i.updateToolboxIsCompact(),i.initTabs(),i.initDragDrop();var n=i.sidebar.getExpandAction();return n&&i.toolbar.actions.push(n),i}return z(t,e),t.prototype.getMarkdownHtml=function(e,t){return null},t.prototype.getRenderer=function(e){return null},t.prototype.getRendererContext=function(e){return e},t.prototype.getProcessedText=function(e){return e},t.prototype.getLocale=function(){return this.locale},Object.defineProperty(t.prototype,"showPreviewTab",{get:function(){return this.showTestSurveyTab},set:function(e){this.showTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowEditSurveyTitle",{get:function(){return this.getPropertyValue("allowEditSurveyTitle",!0)},set:function(e){this.setPropertyVisibility("survey",e,"title","description","logo","showTitle","logoWidth","logoHeight"),this.setPropertyValue("allowEditSurveyTitle",e),this.designerPropertyGrid&&this.designerPropertyGrid.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showSurveyTitle",{get:function(){return this.allowEditSurveyTitle},set:function(e){this.allowEditSurveyTitle=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"licenseText",{get:function(){return this.getLocString("survey.license")},enumerable:!1,configurable:!0}),t.prototype.changePageModifications=function(e){void 0===e&&(e=!1),this.setPropertyVisibility("survey",e,"pages"),this.setPropertyVisibility("question",e,"page"),this.setPropertyVisibility("panel",e,"page"),this.showJSONEditorTab=!0===this.options.showJSONEditorTab},Object.defineProperty(t.prototype,"pageEditMode",{get:function(){return this.pageEditModeValue},set:function(e){this.pageEditModeValue=e;var t="single"!==this.pageEditModeValue;this.changePageModifications(t),r.settings.allowShowEmptyTitleInDesignMode=t,r.settings.allowShowEmptyDescriptionInDesignMode=t,"bypage"===this.pageEditModeValue&&(this.showPageNavigator=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolbarItems",{get:function(){return this.toolbarValue.actions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolbar",{get:function(){return this.toolbarValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showingViewName",{get:function(){return this.activeTab},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isDesignerShowing",{get:function(){return"designer"===this.activeTab},enumerable:!1,configurable:!0}),t.prototype.showDesigner=function(){this.activeTab="designer"},Object.defineProperty(t.prototype,"isTestSurveyShowing",{get:function(){return this.isPreviewShowing},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPreviewShowing",{get:function(){return"test"===this.activeTab},enumerable:!1,configurable:!0}),t.prototype.showTestSurvey=function(){this.showPreview()},t.prototype.showPreview=function(){this.activeTab="test"},t.prototype.addPluginTab=function(e,t,o,i,n){var r=this,a=o?0==o.indexOf("ed.")?o:"":"ed."+e;a&&(o=void 0);var s=new yo({id:e,locTitleName:a,title:o,componentContent:i||"svc-tab-"+e,data:t,action:function(){r.makeNewViewActive(e)},active:this.viewType===e,disableHide:this.viewType===e});n>=0&&n<this.tabs.length?this.tabs.splice(n,0,s):this.tabs.push(s),this.addPlugin(e,t)},t.prototype.addPlugin=function(e,t){this.plugins[e]=t},t.prototype.getPlugin=function(e){return this.plugins[e]},Object.defineProperty(t.prototype,"showPagesInPreviewTab",{get:function(){return this.showPagesInTestSurveyTab},set:function(e){this.showPagesInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showSimulatorInPreviewTab",{get:function(){return this.showSimulatorInTestSurveyTab},set:function(e){this.showSimulatorInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"theme",{get:function(){return this._theme},set:function(e){this._theme=e,this.raiseThemeChanged()},enumerable:!1,configurable:!0}),t.prototype.raiseThemeChanged=function(){this.isThemePristine=!1,this.hasPendingThemeChanges=!0;var e={propertyName:"theme",obj:this,value:this.theme,type:"THEME_MODIFIED"};this.setModified(e)},Object.defineProperty(t.prototype,"allowModifyPages",{get:function(){return this._allowModifyPages},set:function(e){this._allowModifyPages=e,this.changePageModifications(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showDefaultLanguageInPreviewTab",{get:function(){return this.showDefaultLanguageInTestSurveyTab},set:function(e){this.showDefaultLanguageInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showInvisibleElementsInPreviewTab",{get:function(){return this.showInvisibleElementsInTestSurveyTab},set:function(e){this.showInvisibleElementsInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabs",{get:function(){return this.tabbedMenu.actions},set:function(e){this.tabbedMenu.actions=e},enumerable:!1,configurable:!0}),t.prototype.getLocString=function(e){return H.getString(e)},t.prototype.onSetReadOnly=function(e){},Object.defineProperty(t.prototype,"locale",{get:function(){return this.getPropertyValue("locale",H.currentLocale)},set:function(e){if(H.currentLocale!==e){H.currentLocale=e,this.setPropertyValue("locale",e),this.toolbox.updateTitles(),this.refreshPlugin();var t=this.selectedElement;t&&(this.selectElement(null),this.selectElement(t)),this.locStrsChanged()}},enumerable:!1,configurable:!0}),t.prototype.locStrsChanged=function(){e.prototype.locStrsChanged.call(this),this.tabbedMenu.locStrsChanged(),this.toolbar.locStrsChanged()},t.prototype.refreshPlugin=function(){var e=this.currentPlugin;if(e){e.deactivate&&e.deactivate();var t=this.viewType;this.viewType="",e.activate(),this.viewType=t}},Object.defineProperty(t.prototype,"readOnly",{get:function(){return this.getPropertyValue("readOnly",!1)},set:function(e){var t=this.text;this.setPropertyValue("readOnly",e),this.onSetReadOnly(e),this.text=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRTL",{get:function(){return this.isRTLValue},set:function(e){this.isRTLValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeTab",{get:function(){return this.viewType},set:function(e){this.makeNewViewActive(e)},enumerable:!1,configurable:!0}),t.prototype.makeNewViewActive=function(e){var t=this;if(e==this.viewType)return!1;var o=this.currentPlugin;if(!o||!o.canDeactivateAsync)return this.switchViewType(e);o.canDeactivateAsync((function(){t.switchViewType(e)}))},t.prototype.switchViewType=function(e){var t={tabName:e,allow:!0};if(this.onActiveTabChanging.fire(this,t),t.allow){if(!this.canSwitchViewType())return!1;var o=this.activatePlugin(e);return this.viewType=e,this.onActiveTabChanged.fire(this,{tabName:e,plugin:o,model:o?o.model:void 0}),!0}},t.prototype.canSwitchViewType=function(){var e=this.currentPlugin;return!e||!e.deactivate||e.deactivate()},t.prototype.activatePlugin=function(e){var t=this.getPlugin(e);return t&&t.activate(),t},Object.defineProperty(t.prototype,"currentPlugin",{get:function(){return this.getPlugin(this.activeTab)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolboxCategories",{get:function(){return this.toolbox.categories},enumerable:!1,configurable:!0}),t.prototype.updateToolboxIsCompact=function(e){if(this.toolbox){var t=null!=e&&null!=e;void 0!==this.toolbox.forceCompact?this.toolbox.isCompact=this.toolbox.forceCompact:"right"==this.toolboxLocation?this.toolbox.isCompact=this.showSidebar||t&&e:t&&(this.toolbox.isCompact=e)}},Object.defineProperty(t.prototype,"showToolbox",{get:function(){return this.showToolboxValue},set:function(e){!0!==e&&!1!==e&&re.warnText("showToolbox is a boolean property now."),"none"===e||!1===e||"top"===e?this.showToolboxValue=!1:(!0===e||(this.toolboxLocation=e),this.showToolboxValue=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showSidebar",{get:function(){return this.showSidebarValue},set:function(e){!0===e||!1===e?this.showSidebar!==e&&(this.setShowSidebar(e,!0),this.onShowPropertyGridVisiblityChanged.isEmpty||(re.warnNonSupported("onShowPropertyGridVisiblityChanged","onShowSidebarVisibilityChanged"),this.onShowPropertyGridVisiblityChanged.fire(this,{show:e}))):re.warnText("showSidebar is a boolean property now.")},enumerable:!1,configurable:!0}),t.prototype.setShowSidebar=function(e,t){void 0===t&&(t=!1),this.showSidebarValue=e,t&&(e?this.sidebar.expandedManually=!0:this.sidebar.collapsedManually=!0),this.updateToolboxIsCompact(),this.onShowSidebarVisibilityChanged.fire(this,{show:e})},Object.defineProperty(t.prototype,"showPropertyGrid",{get:function(){return re.warnNonSupported("showPropertyGrid","showSidebar"),this.showSidebar},set:function(e){re.warnNonSupported("showPropertyGrid","showSidebar"),!0===e||!1===e?this.showSidebar=e:re.warnText("showSidebar is a boolean property.")},enumerable:!1,configurable:!0}),t.prototype.rightContainerActiveItem=function(e){re.warnNonSupported("rightContainerActiveItem")},t.prototype.leftContainerActiveItem=function(e){re.warnNonSupported("leftContainerActiveItem")},Object.defineProperty(t.prototype,"undoRedoManager",{get:function(){var e=this.getPlugin("undoredo");return e&&e.model.undoRedoManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"undoRedoController",{get:function(){var e=this.getPlugin("undoredo");return e&&e.model},enumerable:!1,configurable:!0}),t.prototype.startUndoRedoTransaction=function(e){void 0===e&&(e=""),this.undoRedoController&&this.undoRedoController.startTransaction(e)},t.prototype.stopUndoRedoTransaction=function(){this.undoRedoController&&this.undoRedoController.stopTransaction()},Object.defineProperty(t.prototype,"isProcessingUndoRedo",{get:function(){return this.undoRedoManager&&this.undoRedoManager.isProcessingUndoRedo},enumerable:!1,configurable:!0}),t.prototype.undo=function(){this.undoRedoController&&this.undoRedoController.undo()},t.prototype.redo=function(){this.undoRedoController&&this.undoRedoController.redo()},Object.defineProperty(t.prototype,"selectionHistoryController",{get:function(){return this.selectionHistoryControllerValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentPage",{get:function(){return this.survey.currentPage},set:function(e){this.survey.currentPage=e},enumerable:!1,configurable:!0}),t.prototype.addPage=function(e,t,o){void 0===t&&(t=!0);var i={page:e,allow:!0};if(this.onPageAdding.fire(this,i),!i.allow)return null;if(void 0===o||o()){var n=e;return n?this.survey.addPage(n):n=this.addNewPageIntoSurvey(),t&&this.selectElement(n),n}},t.prototype.addNewPageIntoSurvey=function(){var e=re.getNewPageName(this.survey.pages);return this.survey.addNewPage(e)},t.prototype.initTabs=function(){this.initPlugins(),this.initFooterToolbar(),this.tabs.length>0&&this.makeNewViewActive(this.tabs[0].id)},t.prototype.initPlugins=function(){this.addPlugin("undoredo",new kt(this)),this.showDesignerTab&&new zt(this),this.showPreviewTab&&new Ce(this),this.showThemeTab&&new mo(this),this.showLogicTab&&new Vt(this),this.showJSONEditorTab&&(ge.hasAceEditor()?new ge(this):new fe(this)),this.showEmbeddedSurveyTab&&new ce(this),this.showTranslationTab&&new ft(this)},t.prototype.initFooterToolbar=function(){var e=this;this.footerToolbar||(this.footerToolbar=new r.ActionContainer,["undoredo","designer","test"].forEach((function(t){var o=e.getPlugin(t);o&&o.addFooterActions&&o.addFooterActions()})))},t.prototype.getOptions=function(){return this.options||{}},t.prototype.setOptions=function(e){e||(e={});var t={showTestSurveyTab:"showPreviewTab",showDefaultLanguageInTestSurveyTab:"showDefaultLanguageInPreviewTab",showInvisibleElementsInPreviewTab:"showInvisibleElementsInTestSurveyTab"};for(var o in t)if(void 0!==e[o]){var i=t[o];void 0===e[i]&&(e[i]=e[o],delete e[o])}for(var o in this.options=e,e)this[o]=e[o]},t.prototype.setPropertyPlaceHolder=function(e,t,o){var i=r.Serializer.findProperty(e,t);i&&(i.placeholder=o)},t.prototype.setPropertyVisibility=function(e,t){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];if(Array.isArray(o))for(var n=0;n<o.length;n++){var a=r.Serializer.findProperty(e,o[n]);a&&(a.visible=t)}},t.prototype.patchMetadata=function(){this.setPropertyPlaceHolder("survey","title","pe.surveyTitlePlaceholder"),this.setPropertyPlaceHolder("survey","description","pe.surveyDescriptionPlaceholder"),this.setPropertyVisibility("survey",!1,"logoPosition"),"single"!==this.pageEditMode&&(this.setPropertyPlaceHolder("page","title","pe.pageTitlePlaceholder"),this.setPropertyPlaceHolder("page","description","pe.pageDescriptionPlaceholder"))},t.prototype.isCanModifyProperty=function(e,t){var o,i,n=r.Serializer.findProperty(e.getType(),t);if(e instanceof r.ItemValue){o=e.locOwner,i=r.Serializer.findProperty(o.getType(),e.ownerPropertyName||t);var a=!0;if(o instanceof r.QuestionSelectBase&&(a=o.isItemInList(e)),!1===this.getElementAllowOperations(o).allowEdit)return!1;var s={allowDelete:!0,allowEdit:a,allowAdd:!0};if(this.onCollectionItemAllowingCallback(o,n,o.getPropertyValue(null==i?void 0:i.name),e,s),!1===s.allowEdit)return!1;if(this.onIsPropertyReadOnlyCallback(o,i,null==i?void 0:i.readOnly,null,null))return!1}if(e instanceof r.SurveyElement&&!1===this.getElementAllowOperations(e).allowEdit)return!1;return!n||!this.onIsPropertyReadOnlyCallback(e,n,n.readOnly,o,i)},t.prototype.onIsPropertyReadOnlyCallback=function(e,t,o,i,n){var r=this.readOnly||o;if(this.onGetPropertyReadOnly.isEmpty)return r;var a={obj:e,property:t,readOnly:r,propertyName:t.name,parentObj:i,parentProperty:n};return this.onGetPropertyReadOnly.fire(this,a),a.readOnly},Object.defineProperty(t.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isInitialSurveyEmpty",{get:function(){return this.isInitialSurveyEmptyValue},enumerable:!1,configurable:!0}),t.prototype.initSurveyWithJSON=function(e,t){var o=this;e||(e={logoPosition:"right"}),this.existingPages={};var i=this.createSurvey({});i.css=r.defaultV2Css,i.setDesignMode(!0),i.lazyRendering=!0,i.setJsonObject(e),this.isInitialSurveyEmptyValue=i.isEmpty,i.isEmpty&&i.setJsonObject(this.getDefaultSurveyJson()),i.pages.forEach((function(e){o.existingPages[e.id]=!0})),this.onDesignerSurveyCreated.fire(this,{survey:i}),i.onQuestionAdded.add((function(e,t){o.doOnQuestionAdded(t.question,t.parentPanel)})),i.onPanelAdded.add((function(e,t){o.doOnPanelAdded(t.panel,t.parentPanel)})),i.onPageAdded.add((function(e,t){o.existingPages[t.page.id]||(o.existingPages[t.page.id]=!0,o.doOnPageAdded(t.page))})),i.onDragDropAllow.add((function(e,t){t.survey=e,o.onDragDropAllow.fire(o,t)})),this.setSurvey(i),this.updatePlugin(this.activeTab),"designer"!==this.activeTab&&this.updatePlugin("designer"),this.undoRedoController&&this.undoRedoController.updateSurvey()},t.prototype.updatePlugin=function(e){var t=this.getPlugin(this.activeTab);t&&t.update&&t.update()},t.prototype.initDragDrop=function(){this.initDragDropSurveyElements(),this.initDragDropChoices()},t.prototype.initDragDropSurveyElements=function(){var e=this;Ft.restrictDragQuestionBetweenPages=a.dragDrop.restrictDragQuestionBetweenPages,this.dragDropSurveyElements=new Ft(null,this);var t=!1;this.dragDropSurveyElements.onDragStart.add((function(o,i){t=!o.draggedElement.parent,e.onDragStart.fire(o,i),e.startUndoRedoTransaction("drag drop")})),this.dragDropSurveyElements.onDragEnd.add((function(o,i){e.stopUndoRedoTransaction();var n=t&&e.startEditTitleOnQuestionAdded;e.selectElement(i.draggedElement,void 0,!1,n),t=!1,e.onDragEnd.fire(o,i)}))},t.prototype.initDragDropChoices=function(){var e=this;this.dragDropChoices=new r.DragDropChoices(null,this),this.dragDropChoices.onDragStart.add((function(t,o){e.startUndoRedoTransaction("drag drop")})),this.dragDropChoices.onDragEnd.add((function(t,o){e.stopUndoRedoTransaction(),e.selectElement(o.draggedElement,void 0,!1)}))},t.prototype.updateElementsOnLocaleChanged=function(e,t){if("survey"===e.getType()&&"locale"===t)for(var o=this.survey.pages,i=0;i<o.length;i++)o[i].locStrsChanged()},t.prototype.updateConditionsOnNameChanged=function(e,t,o){if(this.isObjQuestion(e)){if("name"!==t||e.valueName||this.updateLogicOnQuestionNameChanged(o,e.name),"valueName"===t){var i=o||e.name,n=e.valueName?e.valueName:e.name;this.updateLogicOnQuestionNameChanged(i,n)}"name"===t&&e.isDescendantOf("selectbase")&&this.updateChoicesFromQuestionOnColumnNameChanged(o,e.name)}"name"===t&&e.isDescendantOf("matrixdropdowncolumn")&&this.updateLogicOnColumnNameChanged(e,o,e.name)},t.prototype.getSurveyLogicForUpdate=function(){return this.surveyLogicForUpdate&&this.surveyLogicForUpdate.survey!==this.survey&&(this.surveyLogicForUpdate=void 0),this.surveyLogicForUpdate||(this.surveyLogicForUpdate=this.createSurveyLogicForUpdate()),this.surveyLogicForUpdate},t.prototype.clearSurveyLogicForUpdate=function(e,t,o){!this.surveyLogicRenaming&&this.surveyLogicForUpdate&&e&&t&&this.needClearSurveyLogicForUpdate(e,t,o)&&(this.surveyLogicForUpdate=void 0)},t.prototype.needClearSurveyLogicForUpdate=function(e,t,o){if(Array.isArray(o))return!0;var i=r.Serializer.findProperty(e.getType(),t);return!!i&&["expression","condition","questionvalue","question"].indexOf(i.type)>-1},t.prototype.updateSurveyLogicValues=function(e,t,o){e&&t&&!r.Helpers.isValueEmpty(o)&&"value"===t&&e.isDescendantOf("itemvalue")&&this.updateSurveyLogicItemValue(e,o)},t.prototype.updateSurveyLogicItemValue=function(e,t){if(e.locOwner&&a.logic.updateExpressionsOnChanging.choiceValue&&!(["choices","rateValues","columns","rows"].indexOf(e.ownerPropertyName)<0)){this.surveyLogicRenaming=!0;var o=this.getSurveyLogicForUpdate();"rows"===e.ownerPropertyName?o.renameRowValue(e,t):o.renameItemValue(e,t),this.surveyLogicRenaming=!1}},t.prototype.createSurveyLogicForUpdate=function(){return new je(this.survey,this)},t.prototype.updateLogicOnQuestionNameChanged=function(e,t){e!==t&&a.logic.updateExpressionsOnChanging.questionName&&(this.surveyLogicRenaming=!0,this.getSurveyLogicForUpdate().renameQuestion(e,t),this.surveyLogicRenaming=!1)},t.prototype.updateLogicOnColumnNameChanged=function(e,t,o){t&&t!==o&&a.logic.updateExpressionsOnChanging.columnName&&(this.surveyLogicRenaming=!0,this.getSurveyLogicForUpdate().renameColumn(e,t),this.surveyLogicRenaming=!1)},t.prototype.updateChoicesFromQuestionOnColumnNameChanged=function(e,t){this.survey.getAllQuestions().forEach((function(o){o.choicesFromQuestion===e&&(o.choicesFromQuestion=t)}))},t.prototype.isObjQuestion=function(e){return this.isObjThisType(e,"question")},t.prototype.isObjPage=function(e){return this.isObjThisType(e,"page")},t.prototype.isObjThisType=function(e,t){for(var o=r.Serializer.findClass(e.getType());o&&o.parentName;){if(o.name===t)return!0;o=r.Serializer.findClass(o.parentName)}return!!o&&o.name===t},t.prototype.doOnQuestionAdded=function(e,t){e.name=this.generateUniqueName(e,e.name);var o={question:e,page:this.getPageByElement(e),reason:this.addNewElementReason};this.onQuestionAdded.fire(this,o)},t.prototype.doOnPanelAdded=function(e,t){var o={panel:e,page:this.getPageByElement(e),reason:this.addNewElementReason};this.onPanelAdded.fire(this,o)},t.prototype.doOnPageAdded=function(e){var t={page:e};this.onPageAdded.fire(this,t),this.setModified({type:"PAGE_ADDED",newValue:t.page})},t.prototype.getPageByElement=function(e){return this.survey.getPageByElement(e)},t.prototype.getDefaultSurveyJson=function(){var e=a.defaultNewSurveyJSON;return e.pages&&e.pages.length>0&&e.pages[0].name&&(e.pages[0].name=H.getString("ed.newPageName")+"1"),e},t.prototype.setSurvey=function(e){this.surveyValue&&this.surveyValue.dispose(),this.surveyValue=e,this.selectElement(e),this.selectionHistoryController.reset()},t.prototype.getSurveyTextFromDesigner=function(){if(!this.survey)return"";var e=this.survey.toJSON();e=this.singlePageJSON(e);var t=a.jsonEditor.indentation;return this.generateValidJSON?JSON.stringify(e,null,t):(new Z).stringify(e,null,t)},t.prototype.setTextValue=function(e){this.setSurveyJSONTextCallback&&this.setSurveyJSONTextCallback(e)},t.prototype.changeText=function(e,t){if(void 0===t&&(t=!1),this.setTextValue(e),e){var o=new ie(e);o.isJsonCorrect||o.survey?this.initSurveyWithJSON(o.survey.toJSON(),t):this.viewType="editor"}else this.initSurveyWithJSON(void 0,t)},Object.defineProperty(t.prototype,"text",{get:function(){return this.getSurveyJSONTextCallback?this.getSurveyJSONTextCallback().text:this.getSurveyTextFromDesigner()},set:function(e){this.changeText(e,!0)},enumerable:!1,configurable:!0}),t.prototype.getSurveyJSON=function(){if("editor"!=this.viewType)return(new r.JsonObject).toJsonObject(this.survey);var e=this.text,t=new ie(e);return t.isJsonCorrect?(new r.JsonObject).toJsonObject(t.survey):null},t.prototype.getObjectDisplayName=function(e,t,o,i){void 0===o&&(o=void 0),void 0===i&&(i=void 0),i||(i=re.getObjectName(e,this.showObjectTitles));var n={obj:e,displayName:i,area:t,reason:o};return this.onGetObjectDisplayName.fire(this,n),n.displayName},t.prototype.createSurvey=function(e,t){void 0===e&&(e={}),void 0===t&&(t="designer");var o=this.createSurveyCore(e,t);return"designer"!==t&&"modal-question-editor"!==t||So(o,this),o.needRenderIcons=!1,"designer"!=t&&"test"!=t&&(o.locale=H.currentLocale,e.clearInvisibleValues||(o.clearInvisibleValues="onComplete")),this.onSurveyInstanceCreated.fire(this,{survey:o,reason:t}),o},t.prototype.createSurveyCore=function(e,t){return void 0===e&&(e={}),new r.SurveyModel(e)},Object.defineProperty(t.prototype,"state",{get:function(){return this._stateValue?this._stateValue:""},enumerable:!1,configurable:!0}),t.prototype.setState=function(e){if(this._stateValue=e,this.onStateChanged.fire(this,{val:e}),e){this.notify(this.getLocString("ed."+e));var t=this.toolbarItems.filter((function(e){return"svd-save"===e.id}));Array.isArray(t)&&t.length>0&&(t[0].enabled="modified"===this.state,t[0].active="modified"===this.state)}},t.prototype.setModified=function(e){var t=this;void 0===e&&(e=null),this.setState("modified"),this.onModified.fire(this,e),this.isAutoSave&&this.doAutoSave("THEME_MODIFIED"===e.type?function(){return t.doSaveTheme()}:function(){return t.doSave()})},t.prototype.notifySurveyPropertyChanged=function(e){this.clearSurveyLogicForUpdate(e.target,e.name,e.newValue),this.updateSurveyLogicValues(e.target,e.name,e.oldValue);var t=this.currentPlugin;t&&t.onDesignerSurveyPropertyChanged&&t.onDesignerSurveyPropertyChanged(e.target,e.name),this.onSurveyPropertyValueChanged.isEmpty||(e.propertyName=e.name,e.obj=e.target,e.value=e.newValue,this.onSurveyPropertyValueChanged.fire(this,e)),e.type="PROPERTY_CHANGED",this.setModified(e)},t.prototype.notifySurveyItemMoved=function(e){e.type="ELEMENT_REORDERED",this.setModified(e)},t.prototype.notify=function(e,t){void 0===t&&(t="info"),this.onNotify.isEmpty?this.notifier.notify(e,t):this.onNotify.fire(this,{message:e})},t.prototype.convertQuestion=function(e,t){var o=X.convertObject(e,t,this.getDefaultElementJSON(e.getType()));return this.setModified({type:"QUESTION_CONVERTED",className:t,oldValue:e,newValue:o}),o},t.prototype.getDefaultElementJSON=function(e){if(!this.toolbox)return null;var t=this.toolbox.getItemByName(e);return t?t.json:null},t.prototype.singlePageJSON=function(e){if("single"===this.pageEditMode){var t=e.pages;Array.isArray(t)&&t.length>0&&(void 0!==t[0].elements&&(e.elements=t[0].elements),delete e.pages)}return e},Object.defineProperty(t.prototype,"JSON",{get:function(){var e=this.survey.toJSON();return this.singlePageJSON(e)},set:function(e){"editor"==this.viewType?this.setTextValue(JSON.stringify(e)):this.initSurveyWithJSON(e,!0)},enumerable:!1,configurable:!0}),t.prototype.loadSurvey=function(e){var t=this;(new r.dxSurveyService).loadSurvey(e,(function(e,o,i){e&&o&&(t.JSON=o)}))},t.prototype.doClickQuestionCore=function(e,t,o,i){void 0===t&&(t="ADDED_FROM_TOOLBOX"),void 0===o&&(o=-1),void 0===i&&(i=null),0==this.survey.pageCount&&this.addNewPageIntoSurvey();var n=this.currentPage;"bypage"===this.pageEditMode&&(n=this.getPlugin("designer").model.pagesController.page2Display);var r=this.getSelectedSurveyElement();r&&r.parent&&r.page==n&&r!==i&&(n=r.parent,o<0&&(o=n.elements.indexOf(r))>-1&&o++),i&&(n=i),this.addNewElementReason=t;var a=this.findRowByElement(r,n);e.setVisibleIndex(-1),a&&this.isRowMultiline(a)?this.addElemenMultiline(n,e,o,a):n.addElement(e,o),this.addNewElementReason="",this.setModified({type:t,question:e})},t.prototype.isRowMultiline=function(e){return e.elements.length>1},t.prototype.findRowByElement=function(e,t){return e?e.isPage?e.rows[e.rows.length-1]:t.rows.find((function(t){return-1!==t.elements.indexOf(e)})):null},t.prototype.addElemenMultiline=function(e,t,o,i){var n=i.elements.length,r=i.elements[n-1];r.startWithNewLine=!0,e.addElement(t,o),r.startWithNewLine=!1},t.prototype.setNewNames=function(e){this.newQuestions=[],this.newPanels=[],this.newQuestionChangedNames={},this.setNewNamesCore(e),this.updateNewElementExpressions(e)},t.prototype.updateNewElementExpressions=function(e){var t=this.createSurvey({},"updateNewElementExpressions");t.setDesignMode(!0),e.isPage?t.addPage(e):(t.addNewPage("p1"),t.pages[0].addElement(e));var o=new je(t);for(var i in this.newQuestionChangedNames)o.renameQuestion(i,this.newQuestionChangedNames[i])},t.prototype.getAllQuestions=function(){for(var e=[],t=0;t<this.survey.pages.length;t++)this.addElements(this.survey.pages[t].elements,!1,e);return this.addElements(this.newPanels,!1,e),this.addElements(this.newQuestions,!1,e),e},t.prototype.getAllPanels=function(){for(var e=[],t=0;t<this.survey.pages.length;t++)this.addElements(this.survey.pages[t].elements,!0,e);return this.addElements(this.newPanels,!0,e),this.addElements(this.newQuestions,!0,e),e},t.prototype.addElements=function(e,t,o){for(var i=0;i<e.length;i++)e[i].isPanel===t&&o.push(e[i]),this.addElements(re.getElements(e[i]),t,o)},t.prototype.getNewName=function(e,t){return"page"==e?re.getNewPageName(this.survey.pages):t?this.getNewPanelName():this.getNewQuestionName()},t.prototype.getNewQuestionName=function(){return re.getNewQuestionName(this.getAllQuestions())},t.prototype.getNewPanelName=function(){return re.getNewPanelName(this.getAllPanels())},t.prototype.setNewNamesCore=function(e){var t=e.getType(),o=this.getNewName(t,e.isPanel);if(o!=e.name&&(this.newQuestionChangedNames[e.name]=o,e.name=o),e.isPanel||"page"==t){e.isPanel&&this.newPanels.push(e);for(var i=e,n=0;n<i.elements.length;n++)this.setNewNamesCore(i.elements[n])}else this.newQuestions.push(e)},t.prototype.createNewElement=function(e){var t=r.Serializer.createClass(e.type);return(new r.JsonObject).toObject(e,t),this.setNewNames(t),t},t.prototype.copyElement=function(e){var t=(new r.JsonObject).toJsonObject(e);return t.type=e.getType(),this.createNewElement(t)},t.prototype.fastCopyQuestion=function(e){var t=this.copyElement(e),o=e.parent?e.parent.elements.indexOf(e)+1:-1;return this.doClickQuestionCore(t,"ELEMENT_COPIED",o),t},Object.defineProperty(t.prototype,"selectedElement",{get:function(){return this.selectedElementValue},set:function(e){this.selectElement(e)},enumerable:!1,configurable:!0}),t.prototype.deleteCurrentObject=function(){this.deleteCurrentElement()},t.prototype.deleteCurrentElement=function(){this.deleteObject(this.selectedElement)},t.prototype.deleteElement=function(e){this.deleteObject(e)},t.prototype.copyPage=function(e){var t=this,o=this.copyElement(e),i=this.survey.pages.indexOf(e);i>-1?this.survey.pages.splice(i+1,0,o):this.survey.pages.push(o),this.addNewElementReason="ELEMENT_COPIED",o.questions.forEach((function(e){return t.doOnQuestionAdded(e,e.parent)}));var n=o.getPanels();return Array.isArray(n)&&n.forEach((function(e){return t.doOnPanelAdded(e,e.parent)})),this.addNewElementReason="",o},t.prototype.deleteObjectCore=function(e){if(e.isPage){var t=this.getNextPage(e);this.survey.removePage(e),this.selectElement(t||this.survey)}else this.deletePanelOrQuestion(e);this.setModified({type:"OBJECT_DELETED",target:e}),this.updateConditionsOnRemove(e)},t.prototype.getNextPage=function(e){var t=this.survey.pages.indexOf(e);return t<0||1==this.survey.pages.length?null:(t==this.survey.pages.length-1?t--:t++,t<0||t>this.survey.pages.length-1?null:this.survey.pages[t])},t.prototype.deleteObject=function(e){var t={element:e,elementType:re.getObjectType(e),allowing:!0};this.onElementDeleting.fire(this,t),t.allowing&&this.deleteObjectCore(e)},t.prototype.updateConditionsOnRemove=function(e){if(re.getObjectType(e)==Y.Question)t=[e];else var t=e.questions;if(t)for(var o=new je(this.survey,this),i=0;i<t.length;i++)o.removeQuestion(t[i].getValueName())},t.prototype.isElementSelected=function(e){return!(!e||e.isDisposed)&&e.getPropertyValue("isSelectedInDesigner")},t.prototype.selectElement=function(e,t,o,i){if(void 0===o&&(o=!0),void 0===i&&(i=!1),!e||!e.isDisposed&&(!e.isQuestion&&!e.isPanel||e.parent)){var n=this.selectedElement;n!==e&&(this.selectedElementValue=this.onSelectingElement(e),n!==this.selectedElementValue&&(n&&!n.isDisposed&&n.setPropertyValue("isSelectedInDesigner",!1),this.selectedElementValue&&this.selectedElementValue.setPropertyValue("isSelectedInDesigner",!0))),(n!==e||t)&&this.selectionChanged(this.selectedElement,t,!!o);var r=this.getSelectedSurveyElement();n!==e&&document&&r&&this.focusElement(e,o,r,t,i)}},t.prototype.focusElement=function(e,t,o,i,n){void 0===o&&(o=null),void 0===i&&(i=null),void 0===n&&(n=null),o||(o=this.getSelectedSurveyElement()),setTimeout((function(){if(t&&o){var r=document.getElementById(o.id);if(r&&(r.scrollIntoView({block:"center"}),!i&&r.parentElement)){var a="string"==typeof t?r.parentElement.querySelector(t):r.parentElement;a&&a.focus()}}n&&e&&io.get(e.locTitle).activateEditor()}),100)},t.prototype.getSelectedSurveyElement=function(){var e=this.selectedElement;return e&&"survey"!=e.getType()&&e.isInteractiveDesignElement&&e.id?e:null},t.prototype.onSelectingElement=function(e){var t={newSelectedElement:e};return this.onSelectedElementChanging.fire(this,t),t.newSelectedElement},Object.defineProperty(t.prototype,"designerPropertyGrid",{get:function(){var e=this.sidebar.getTabById("propertyGrid");return e&&e.model?e.model.propertyGridModel:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propertyGrid",{get:function(){return this.designerPropertyGrid.survey},enumerable:!1,configurable:!0}),t.prototype.collapsePropertyGridCategory=function(e){this.designerPropertyGrid&&this.designerPropertyGrid.collapseCategory(e)},t.prototype.expandPropertyGridCategory=function(e){this.designerPropertyGrid&&this.designerPropertyGrid.expandCategory(e)},t.prototype.collapseAllPropertyGridCategories=function(){this.designerPropertyGrid&&this.designerPropertyGrid.collapseAllCategories()},t.prototype.expandAllPropertyGridCategories=function(){this.designerPropertyGrid&&this.designerPropertyGrid.expandAllCategories()},t.prototype.collapseAllPropertyTabs=function(){this.collapseAllPropertyGridCategories()},t.prototype.expandAllPropertyTabs=function(){this.expandAllPropertyGridCategories()},t.prototype.expandPropertyTab=function(e){this.expandPropertyGridCategory(e)},t.prototype.collapsePropertyTab=function(e){this.collapsePropertyGridCategory(e)},t.prototype.validateSelectedElement=function(){var e=!0;return this.selectedElement?(this.designerPropertyGrid&&(e=this.designerPropertyGrid.validate()),e):e},t.prototype.deleteLocaleStrings=function(e){new mt(this.survey).deleteLocaleStrings(e)},t.prototype.getPropertyGridExpandedCategory=function(){if(this.designerPropertyGrid){for(var e=this.designerPropertyGrid.survey.getAllPanels(),t=0;t<e.length;t++)if(e[t].isExpanded)return e[t].name;return""}},t.prototype.expandCategoryIfNeeded=function(){var e=a.propertyGrid.defaultExpandedTabName;if(e&&!this.getPropertyGridExpandedCategory()&&!this.survey.isEmpty){var t=this.designerPropertyGrid.survey.getPanelByName(e);t&&t.expand()}},t.prototype.selectionChanged=function(e,t,o){void 0===o&&(o=!0),this.survey.currentPage=this.getCurrentPageByElement(e),this.selectionHistoryController.onObjSelected(e),this.designerPropertyGrid&&(this.designerPropertyGrid.obj=e,t||(t=this.designerPropertyGrid.currentlySelectedProperty),t&&this.designerPropertyGrid.selectProperty(t,o||!this.selectFromStringEditor),this.expandCategoryIfNeeded(),this.selectFromStringEditor=!1);var i={newSelectedElement:e};this.onSelectedElementChanged.fire(this,i)},t.prototype.getCurrentPageByElement=function(e){if(e)return e.isPage?e:e.page?e.page:e.parentQuestion?this.getCurrentPageByElement(e.parentQuestion):void 0},t.prototype.clickToolboxItem=function(e,t,o){void 0===t&&(t=null),void 0===o&&(o="ADDED_FROM_TOOLBOX"),this.readOnly||(void 0===e.getType&&(e=this.createNewElement(e)),this.survey.lazyRendering=!1,this.doClickQuestionCore(e,o,-1,t),this.selectElement(e,null,!0,this.startEditTitleOnQuestionAdded))},t.prototype.getJSONForNewElement=function(e){var t=this.createNewElement(e);return(e=t.toJSON()).type=t.getType(),e},t.prototype.chooseFiles=function(e,t){if(this.onOpenFileChooser.isEmpty){if(!window||!window.FileReader)return;e.value="",e.onchange=function(o){if(window.FileReader&&e&&e.files&&!(e.files.length<1)){for(var i=[],n=0;n<e.files.length;n++)i.push(e.files[n]);t(i)}},e.click()}else this.onOpenFileChooser.fire(this,{input:e,callback:t})},t.prototype.uploadFiles=function(e,t,o){if(this.onUploadFile.isEmpty){var i=new FileReader;i.onload=function(e){o("success",i.result)},i.readAsDataURL(e[0])}else this.onUploadFile.fire(this,{question:t,files:e||[],callback:o})},t.prototype.initKeyboardShortcuts=function(e){e&&e.addEventListener("keydown",this.onKeyDownHandler)},t.prototype.removeKeyboardShortcuts=function(e){e&&e.removeEventListener("keydown",this.onKeyDownHandler)},t.prototype.registerShortcut=function(e,t){this.shortcuts[e]=t},t.prototype.unRegisterShortcut=function(e){delete this.shortcuts[e]},t.prototype.deletePanelOrQuestion=function(e){var t=e.parent,o=t.elements,i=o.indexOf(e);i==o.length-1&&i--,"single"===this.pageEditMode&&"page"===t.getType()&&(t=this.survey),e.delete(),this.selectElement(i>-1?o[i]:t)},t.prototype.onCanShowObjectProperty=function(e,t,o,i,n){var r={obj:e,property:t,canShow:!0,showMode:o,parentObj:i,parentProperty:n};return this.onCanShowProperty.fire(this,r),r.canShow},t.prototype.canDeleteItem=function(e,t,o){var i={obj:e,item:t,canDelete:o};return this.onCanDeleteItem.fire(this,i),i.canDelete},t.prototype.getErrorOnPropertyChanging=function(e,t,o){if("name"!==t)return null;if(re.getObjectType(e)===Y.Unknown)return null;return(re.getObjectType(e)===Y.Column?!!e.colOwner&&!this.isNameUniqueInArray(e.colOwner.columns,e,o):this.generateUniqueName(e,o)!==o)?this.getLocString("pe.propertyNameIsNotUnique"):null},t.prototype.generateUniqueName=function(e,t){var o={element:e,name:t,isUnique:!0};do{for(o.isUnique||(o.name=re.generateNewName(o.name));!this.isNameUnique(e,o.name);)o.name=re.generateNewName(o.name);o.isUnique=!0;var i=o.name;this.onGenerateNewName.fire(this,o),i!=o.name&&(o.isUnique=this.isNameUnique(e,o.name))}while(!o.isUnique);return o.name},t.prototype.isNameUnique=function(e,t){return!!this.isNameUniqueInArray(this.survey.pages,e,t)&&(!!this.isNameUniqueInArray(this.survey.getAllPanels(),e,t)&&this.isNameUniqueInArray(this.survey.getAllQuestions(),e,t))},t.prototype.isNameUniqueInArray=function(e,t,o){if(!Array.isArray(e))return!0;o=o.toLowerCase();for(var i=0;i<e.length;i++)if(e[i]!=t&&e[i].name.toLowerCase()==o)return!1;return!0},t.prototype.doPropertyGridChanged=function(){},Object.defineProperty(t.prototype,"alwaySaveTextInPropertyEditors",{get:function(){return this.alwaySaveTextInPropertyEditorsValue},set:function(e){this.alwaySaveTextInPropertyEditorsValue=e},enumerable:!1,configurable:!0}),t.prototype.onCanShowPropertyCallback=function(e,t,o,i,n){return void 0===o&&(o=null),this.onCanShowObjectProperty(e,t,o,i,n)},t.prototype.onPropertyGridSurveyCreatedCallback=function(e,t){var o={obj:e,survey:t};this.onPropertyGridSurveyCreated.fire(this,o)},t.prototype.onPropertyEditorCreatedCallback=function(e,t,o){var i={obj:e,property:t,editor:o};this.onPropertyEditorCreated.fire(this,i)},t.prototype.onPropertyEditorUpdateTitleActionsCallback=function(e,t,o,i){var n={obj:e,property:t,editor:o,titleActions:i};this.onPropertyEditorUpdateTitleActions.fire(this,n)},t.prototype.onPropertyGridShowModalCallback=function(e,t,o,i,n){var r={obj:e,property:t,editor:o,popupEditor:i,popupModel:n};this.onPropertyGridShowModal.fire(this,r)},t.prototype.onCanDeleteItemCallback=function(e,t,o){return this.canDeleteItem(e,t,o)},t.prototype.onCollectionItemDeletingCallback=function(e,t,o,i){if(this.onCollectionItemDeleting.isEmpty)return!0;var n={obj:e,property:t,propertyName:t.name,collection:o,item:i,allowDelete:!0};return this.onCollectionItemDeleting.fire(this,n),n.allowDelete},t.prototype.onCollectionItemAllowingCallback=function(e,t,o,i,n){if(!this.onCollectionItemAllowOperations.isEmpty){var r={obj:e,property:t,propertyName:t&&t.name,collection:o,item:i,allowEdit:n.allowEdit,allowDelete:n.allowDelete,allowAdd:n.allowAdd};this.onCollectionItemAllowOperations.fire(this,r),n.allowEdit=r.allowEdit,n.allowDelete=r.allowDelete,n.allowAdd=r.allowAdd}},t.prototype.onItemValueAddedCallback=function(e,t,o,i){var n={obj:e,propertyName:t,newItem:o,itemValues:i};this.onItemValueAdded.fire(this,n)},t.prototype.onMatrixDropdownColumnAddedCallback=function(e,t,o){var i={newColumn:t,matrix:e,columns:o};this.onMatrixColumnAdded.fire(this,i)},t.prototype.onSetPropertyEditorOptionsCallback=function(e,t,o){var i={propertyName:e,obj:t,editorOptions:o};this.onSetPropertyEditorOptions.fire(this,i)},t.prototype.onGetErrorTextOnValidationCallback=function(e,t,o){var i=this.getErrorOnPropertyChanging(t,e,o);if(i)return i;var n={propertyName:e,obj:t,value:o,error:""};return this.onPropertyValidationCustomError.fire(this,n),n.error},t.prototype.onValueChangingCallback=function(e){this.onPropertyValueChanging.fire(this,e)},t.prototype.onGetElementEditorTitleCallback=function(e,t){return t},t.prototype.onConditionQuestionsGetListCallback=function(e,t,o,i){if(this.onConditionQuestionsGetList.isEmpty)return"asc";var n={propertyName:e,obj:t,editor:o,sortOrder:"asc",list:i};if(this.onConditionQuestionsGetList.fire(this,n),n.list!==i){i.splice(0,i.length);for(var r=0;r<n.list.length;r++)i.push(n.list[r])}return n.sortOrder},t.prototype.onConditionGetTitleCallback=function(e,t){var o={expression:e,title:t};return this.onConditionGetTitle.fire(this,o),o.title},t.prototype.isConditionOperatorEnabled=function(e,t,o){if(this.onGetConditionOperator.isEmpty)return o;var i={questionName:e,operator:t,show:o};return this.onGetConditionOperator.fire(this,i),i.show},t.prototype.onLogicGetTitleCallback=function(e,t,o,i){if(this.onLogicItemDisplayText.isEmpty)return o;var n={expression:e,expressionText:t,text:o,logicItem:i};return this.onLogicItemDisplayText.fire(this,n),n.text},t.prototype.getProcessedTranslationItemText=function(e,t,o,i){if(this.onTranslationItemChanging.isEmpty)return o;var n={locale:e,obj:i,locString:t,newText:o};return this.onTranslationItemChanging.fire(this,n),n.newText},t.prototype.getTranslationExportedText=function(e,t,o,i,n){if(this.onTranslationExportItem.isEmpty)return n;var r={obj:e,locString:o,locale:i,text:n};return this.onTranslationExportItem.fire(this,r),r.text},t.prototype.doAutoSave=function(e){var t=this;if(void 0===e&&(e=function(){return t.doSave()}),this.autoSaveDelay<=0)e();else{this.autoSaveTimerId&&clearTimeout(this.autoSaveTimerId);var o=this;this.autoSaveTimerId=setTimeout((function(){clearTimeout(o.autoSaveTimerId),o.autoSaveTimerId=null,e()}),this.autoSaveDelay)}},t.prototype.doSave=function(){var e=this;this.setState("saving"),this.saveSurveyFunc&&(this.saveNo++,this.saveSurveyFunc(this.saveNo,(function(t,o){e.saveNo===t&&(o?e.setState("saved"):(e.setState("modified"),e.showErrorOnFailedSave&&e.notify(e.getLocString("ed.saveError"),"error")))})))},t.prototype.doSaveTheme=function(){var e=this;this.setState("saving"),this.hasPendingThemeChanges&&this.saveThemeFunc&&(this.saveNo++,this.saveThemeFunc(this.saveNo,(function(t,o){e.saveNo===t&&(o?(e.setState("saved"),e.hasPendingThemeChanges=!1):(e.setState("modified"),e.showErrorOnFailedSave&&e.notify(e.getLocString("ed.saveError"),"error")))})))},Object.defineProperty(t.prototype,"saveThemeFunc",{get:function(){return this.saveThemeFuncValue},set:function(e){this.saveThemeFuncValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"saveSurveyFunc",{get:function(){return this.saveSurveyFuncValue},set:function(e){this.saveSurveyFuncValue=e,this.showSaveButton=null!=e&&!this.isAutoSave},enumerable:!1,configurable:!0}),t.prototype.convertCurrentQuestion=function(e){var t=this.selectedElement;if(t&&t.getType()!==e){var o=re.getObjectType(t);o!==Y.Question&&o!==Y.Panel||(t=this.convertQuestion(t,e),this.selectElement(t,null,"#convertTo button"))}},t.prototype.getAddNewQuestionText=function(e){if(void 0===e&&(e=null),e||(e=this.currentAddQuestionType),e){var t=this.getLocString("ed.addNewTypeQuestion");if(t&&t.format)return t.format(this.toolbox.items.filter((function(t){return t.name==e}))[0].title)}return this.getLocString("ed.addNewQuestion")},Object.defineProperty(t.prototype,"addNewQuestionText",{get:function(){return this.getAddNewQuestionText()},enumerable:!1,configurable:!0}),t.prototype.getQuestionTypeSelectorModel=function(e,t){var o=this;void 0===t&&(t=null);var i=this.toolbox.items.map((function(e){return o.createIActionBarItemByClass(e.name,e.title,e.iconName,e.needSeparator)})),n=new r.ListModel(i,(function(i){o.currentAddQuestionType=i.id,o.addNewQuestionInPage(e,t),a.toggleVisibility()}),!1);n.locOwner=this;var a=new r.PopupModel("sv-list",{model:n},"bottom","center");return{iconName:"icon-more",title:this.getLocString("ed.addNewQuestion"),action:function(){a.displayMode=o.isMobileView?"overlay":"popup",a.toggleVisibility()},popupModel:a}},t.prototype.getUpdatedPageAdornerFooterActions=function(e,t){var o={page:e.page,addNewQuestion:function(t){e.addNewQuestion(e,void 0,t)},actions:t};return this.onGetPageActions.fire(this,o),o.actions},t.prototype.addNewQuestionInPage=function(e,t,o){void 0===t&&(t=null),void 0===o&&(o=null),o||(o=this.currentAddQuestionType),o||(o=a.designer.defaultAddQuestionType),e(o);var i={type:o},n=this.toolbox.getItemByName(o);n&&n.json&&(i=n.json);var r=this.createNewElement(i);this.clickToolboxItem(r,t,"ADDED_FROM_PAGEBUTTON")},t.prototype.createIActionBarItemByClass=function(e,t,o,i){var n=new r.Action({title:t,id:e,iconName:o});return n.needSeparator=i,n},t.prototype.onElementMenuItemsChanged=function(e,t){this.onDefineElementMenuItems.fire(this,{obj:e,items:t})},t.prototype.getElementAllowOperations=function(e){var t={obj:e,element:e,allowDelete:!0,allowCopy:!0,allowDragging:!0,allowChangeType:!0,allowChangeInputType:!0,allowChangeRequired:!0,allowEdit:void 0};return this.onElementAllowOperations.fire(this,t),t},t.prototype.getChoicesItemBaseTitle=function(){return this.getLocString("ed.choices_Item")||r.surveyLocalization.getString("choices_Item")},t.prototype.getNextItemValue=function(e){return p(this.getChoicesItemBaseTitle(),e.choices)},t.prototype.createNewItemValue=function(e,t,o){void 0===t&&(t=!0);var i=this.getNextItemValue(e),n=e.createItemValue(i);if(n.text=d(e.choices),e.choices.push(n),o&&o(n),t){var r=n.ownerPropertyName?n.ownerPropertyName:"choices";this.onItemValueAddedCallback(e,r,n,e.choices)}return n},t.prototype.onPropertyValueChanged=function(t,o,i){var n=this;e.prototype.onPropertyValueChanged.call(this,t,o,i),"viewType"===t&&this.tabs.forEach((function(e){var t=n.viewType===e.id;e.active=t,e.disableHide=t}))},t.prototype.initResponsivityManager=function(e){this.responsivityManager=new Zt(e,this)},t.prototype.resetResponsivityManager=function(){this.responsivityManager&&(this.responsivityManager.dispose(),this.responsivityManager=void 0)},t.prototype.dispose=function(){var t=this;this.isCreatorDisposed=!0,this.tabs=[],Object.keys(this.plugins).forEach((function(e){var o=t.plugins[e];"function"==typeof o.deactivate&&o.deactivate(),"function"==typeof o.dispose&&o.dispose()})),e.prototype.dispose.call(this)},U([Object(r.property)({defaultValue:!0})],t.prototype,"showDesignerTab",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"showJSONEditorTab",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"showTestSurveyTab",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"showThemeTab",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"showEmbeddedSurveyTab",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"showTranslationTab",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"showLogicTab",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"useTableViewInLogicTab",void 0),U([Object(r.property)({defaultValue:200})],t.prototype,"pageHoverDelay",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"inplaceEditForValues",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"haveCommercialLicense",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"isAutoSave",void 0),U([Object(r.property)()],t.prototype,"showOptions",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"showSearch",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"generateValidJSON",void 0),U([Object(r.property)({defaultValue:""})],t.prototype,"currentAddQuestionType",void 0),U([Object(r.property)({defaultValue:"landscape"})],t.prototype,"previewOrientation",void 0),U([Object(r.property)()],t.prototype,"surveyValue",void 0),U([Object(r.property)()],t.prototype,"viewType",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"hasPendingThemeChanges",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"isThemePristine",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"showToolboxValue",void 0),U([Mt()],t.prototype,"addPage",null),U([Dt()],t.prototype,"doOnQuestionAdded",null),U([Dt()],t.prototype,"doOnPanelAdded",null),U([Dt()],t.prototype,"doOnPageAdded",null),U([Mt()],t.prototype,"deleteObject",null),U([Object(r.property)({defaultValue:!1})],t.prototype,"showSaveButton",void 0),U([Mt()],t.prototype,"convertCurrentQuestion",null),U([Mt()],t.prototype,"addNewQuestionInPage",null),U([Object(r.property)({defaultValue:!1})],t.prototype,"showHeaderInEmptySurvey",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"showPageNavigator",void 0),U([Object(r.property)({getDefaultValue:function(){return a.layout.showTabs}})],t.prototype,"showTabs",void 0),U([Object(r.property)({getDefaultValue:function(){return a.layout.showToolbar}})],t.prototype,"showToolbar",void 0),U([Object(r.property)({getDefaultValue:function(){return a.layout.allowCollapseSidebar}})],t.prototype,"allowCollapseSidebar",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"isMobileView",void 0),U([Object(r.property)({defaultValue:"left",onSet:function(e,t){t.toolbox&&(t.toolbox.setLocation(e),t.updateToolboxIsCompact())}})],t.prototype,"toolboxLocation",void 0),U([Object(r.property)({defaultValue:"right"})],t.prototype,"sidebarLocation",void 0),U([Object(r.property)({defaultValue:!1,onSet:function(e,t){if(!e)throw new Error("Creator is disposed")}})],t.prototype,"isCreatorDisposed",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"enableLinkFileEditor",void 0),t}(r.Base),xo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t}(Co),To=function(){function e(){}return Object.defineProperty(e,"currentTheme",{get:function(){re.warnNonSupported("StylesManager")},set:function(e){re.warnNonSupported("StylesManager")},enumerable:!1,configurable:!0}),e.applyTheme=function(e){re.warnNonSupported("StylesManager")},e}();function So(e,t){e.creator=t,e.isPopupEditorContent=!1;var o=e.getElementWrapperComponentName;e.getElementWrapperComponentName=function(t,i){return Oo(t,i,e.isPopupEditorContent)||o.call(e,t,i)};var i=e.getQuestionContentWrapperComponentName;e.getQuestionContentWrapperComponentName=function(t,o){return Io(t)||i.call(e,t,o)};var n=e.getElementWrapperComponentData;e.getElementWrapperComponentData=function(o,i){return Vo(o,i,t)||n.call(e,o,i)},e.getRowWrapperComponentName=function(e){return"svc-row"},e.getRowWrapperComponentData=function(e){return{creator:t,row:e}},e.getItemValueWrapperComponentName=function(e,t){return No(e,t)},e.getItemValueWrapperComponentData=function(e,o){return Ao(e,o,t)},e.getRendererForString=function(e,o){if(!t.readOnly&&_o(e,o))return Eo},e.getRendererContextForString=function(e,o){return!t.readOnly&&_o(e,o.name)?{creator:t,element:e,locStr:o}:o}}function Po(e){for(var t=e;t;){if(t.isContentElement)return!0;t=t.parentQuestion}return!1}var Eo="svc-string-editor";function Oo(e,t,o){if("logo-image"===t)return"svc-logo-image";if("cell"===t||"column-header"===t||"row-header"===t)return"svc-matrix-cell";if(!Po(e)){if(e instanceof r.Question){var i=e.isDescendantOf("dropdown")||e.isDescendantOf("tagbox");return o?i?"svc-cell-dropdown-question":"svc-cell-question":e.customWidget?"svc-widget-question":i?"svc-dropdown-question":e.isDescendantOf("image")?"svc-image-question":"svc-question"}if(e instanceof r.PanelModel)return"svc-panel"}}function Io(e){if(e.isDescendantOf("rating")&&!Po(e))return"svc-rating-question-content"}function Vo(e,t,o){return"logo-image"===t?o:"cell"===t||"column-header"===t||"row-header"===t?{creator:o,element:e,question:e.question,row:e.row,column:e.column}:Oo(e,t,!1)?e instanceof r.Question||e instanceof r.PanelModel?o:null:void 0}function No(e,t){return Po(t)?r.SurveyModel.TemplateRendererComponentName:t.isDescendantOf("imagepicker")?"svc-image-item-value":"svc-item-value"}function Ao(e,t,o){return t.isContentElement?e:{creator:o,question:t,item:e}}function _o(e,t){return!(!!e.data&&e.parentQuestion instanceof r.QuestionMatrixDropdownModelBase)&&(!Po(e)||e.isEditableTemplateElement)}function jo(e){if(!e.tagName)return!1;var t=e.tagName.toLowerCase();return-1!==["input","textarea"].indexOf(t)||-1!==["span","div"].indexOf(t)&&e.isContentEditable}function Lo(e,t){re.warnNonSupported("registerAdorner","This functionality is no longer supported.")}function ko(e){void 0===e&&(e=void 0),re.warnNonSupported("removeAdorners","This functionality is no longer supported.")}function Mo(e,t,o){var i=e.contentPanel.questions[0];"colorTitleLocation"==t&&(i.titleLocation=o),"colorTitle"==t&&(i.title=o),"choices"==t&&(i.choices=o)}function Do(e){return _(e.color,e.opacity/100)}function Ro(e){return e.map((function(e){var t,o,i,n,r;return(1==e.isInset?"inset ":"")+(null!==(t=e.x)&&void 0!==t?t:0)+"px "+(null!==(o=e.y)&&void 0!==o?o:0)+"px "+(null!==(i=e.blur)&&void 0!==i?i:0)+"px "+(null!==(n=e.spread)&&void 0!==n?n:0)+"px "+(null!==(r=e.color)&&void 0!==r?r:"#000000")})).join(", ")}function Bo(e){return e.split(/,(?![^(]*\))/).map((function(e){var t=e.match(/#[a-zA-Z0-9]+|rgba?\(.*?\)/),o=e.indexOf("inset")>-1,i={};o&&(e=e.replace("inset","")),t&&(i.color=t[0]);var n=e.replace(/\s+/g," ").replace(/^\s|\s$/g,"").split(" ");return i.x=parseInt(n[0])||0,i.y=parseInt(n[1])||0,i.blur=parseInt(n[2])||0,i.spread=parseInt(n[3])||0,i.isInset=o,i}))}r.ComponentCollection.Instance.add({name:"colorsettings",showInToolbox:!1,elementsJSON:[{name:"color",type:"color",titleLocation:"hidden"},{name:"opacity",startWithNewLine:!1,type:"spinedit",title:Q("theme.opacity"),min:0,max:100,unit:"%",titleLocation:"left"}],onInit:function(){r.Serializer.addProperties("colorsettings",[{name:"choices:itemvalue[]"},{name:"colorTitleLocation:string",default:"hidden"},{name:"colorTitle:string"}])},onLoaded:function(e){Mo(e,"colorTitle",e.colorTitle),Mo(e,"colorTitleLocation",e.colorTitleLocation),Mo(e,"choices",e.choices)},onPropertyChanged:function(e,t,o){Mo(e,t,o)},valueToQuestion:function(e){return e?Do(e):""},valueFromQuestion:function(e){return"string"==typeof e?k(e):e},onCreated:function(e){e.contentPanel.questions.forEach((function(e){return e.allowRootStyle=!1}))}}),r.ComponentCollection.Instance.add({name:"boxshadowsettings",showInToolbox:!1,questionJSON:{type:"paneldynamic",minPanelCount:1,panelAddText:Q("theme.boxShadowAddRule"),templateElements:[{type:"spinedit",name:"x",unit:"px",title:Q("theme.boxShadowX"),titleLocation:"left"},{type:"spinedit",name:"y",unit:"px",startWithNewLine:!1,title:Q("theme.boxShadowY"),titleLocation:"left"},{type:"spinedit",name:"blur",unit:"px",title:Q("theme.boxShadowBlur"),min:0,titleLocation:"left"},{type:"spinedit",name:"spread",unit:"px",min:0,startWithNewLine:!1,title:Q("theme.boxShadowSpread"),titleLocation:"left"},{type:"colorsettings",name:"color",titleLocation:"hidden"},{type:"buttongroup",name:"isInset",titleLocation:"hidden",choices:[{text:Q("theme.boxShadowDrop"),value:!1},{text:Q("theme.boxShadowInner"),value:!0}]}]},onCreated:function(e){e.valueFromDataCallback=function(e){return"string"==typeof e?Bo(e):e},e.valueToDataCallback=function(e){return e?"string"==typeof e?e:Ro(Array.isArray(e)?e:[e]):""},e.contentQuestion.panels.forEach((function(e){return e.questions.forEach((function(e){return e.allowRootStyle=!1}))}))}});var qo=function(e){function t(t,o){var i=e.call(this)||this;return i.item=t,i.creator=o,i.click=function(e){i.allowAdd&&i.creator.clickToolboxItem(i.item.json)},i.onPointerUp=function(e){i._node.classList.remove("svc-toolbox__tool--pressed"),i._node=null,document.removeEventListener("pointerup",i.onPointerUp)},i.startDragToolboxItem=function(e,t){var o=i.creator.getJSONForNewElement(i.item.json);return i.dragDropHelper.startDragToolboxItem(e,o,i.item.title),!0},i.dragOrClickHelper=new r.DragOrClickHelper(i.startDragToolboxItem),i}return z(t,e),Object.defineProperty(t.prototype,"allowAdd",{get:function(){return!this.creator.readOnly},enumerable:!1,configurable:!0}),t.prototype.onPointerDown=function(e){if(this.allowAdd){if(0===this.item.id.indexOf("dotsItem-id"))return!0;this.dragOrClickHelper.onPointerDown(e),this._node=e.currentTarget,this._node.classList.add("svc-toolbox__tool--pressed"),document.addEventListener("pointerup",this.onPointerUp)}},Object.defineProperty(t.prototype,"dragDropHelper",{get:function(){return this.creator.dragDropSurveyElements},enumerable:!1,configurable:!0}),t}(r.Base);o(19),o(20);var Ho=function(e){function t(t,o){var i=e.call(this)||this;return i.pagesController=t,i.pageEditMode=o,i.pagesChangedFunc=function(e,t){i.buildItems()},i.currentPagesChangedFunc=function(e,t){i.currentPage=i.pagesController.currentPage},i.togglePageSelector=function(e){return i.popupModel.toggleVisibility()},i.icon="icon-select-page",i.pagesController.onPagesChanged.add(i.pagesChangedFunc),i.pagesController.onCurrentPageChanged.add(i.currentPagesChangedFunc),i.pageListModel=new r.ListModel([],(function(e){i.pagesController.selectPage(e.data),i.popupModel.toggleVisibility()}),!0),i.popupModel=new r.PopupModel("sv-list",{model:i.pageListModel}),i.pagesController&&(i.popupModel.horizontalPosition=i.pagesController.creator.toolboxLocation),i.popupModel.onShow=function(){i.pageListModel.selectedItem=i.getActionBarByPage(i.pagesController.currentPage),i.isPopupOpened=!0},i.popupModel.onHide=function(){i.isPopupOpened=!1},i.pagesController.creator.onPropertyChanged&&i.pagesController.creator.onPropertyChanged.add((function(e,t){"toolboxLocation"===t.name&&("sidebar"==i.pagesController.creator.toolboxLocation?i.popupModel.horizontalPosition="right":i.popupModel.horizontalPosition=i.pagesController.creator.toolboxLocation)})),i.buildItems(),i}return z(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.stopItemsContainerHeightObserver(),this.pagesController.onPagesChanged.remove(this.pagesChangedFunc),this.pagesController.onCurrentPageChanged.remove(this.currentPagesChangedFunc)},t.prototype.getActionBarByPage=function(e){for(var t=0;t<this.items.length;t++)if(this.items[t].data===e)return this.items[t];return null},t.prototype.setItems=function(e){this.items=e,this.pageListModel.setItems(e),this.visible=e.length>1||"bypage"===this.pageEditMode},t.prototype.buildItems=function(){this.currentPage=this.pagesController.currentPage||this.pagesController.pages[0];for(var e=[],t=this.pagesController.pages,o=0;o<t.length;o++)e.push(this.createActionBarItem(t[o]));if("bypage"===this.pagesController.creator.pageEditMode){var i=this.pagesController.creator.getPlugin("designer").model.newPage;i&&e.push(this.createActionBarItem(i))}this.setItems(e)},t.prototype.patchContainerOffset=function(e){for(;e;){if(-1!==e.className.indexOf("svc-tab-designer--with-page-navigator"))return void(e.offsetParent.scrollTop=0);e=e.parentElement}},t.prototype.createActionBarItem=function(e){var t=this,o={id:e.id,title:new r.ComputedUpdater((function(){var o=e.name,i=e.title;return t.pagesController?t.pagesController.getDisplayName(e):i||o}))};return o.active=new r.ComputedUpdater((function(){return e===t.currentPage})),o.action=function(o){t.scrollToPage(e)},o.data=e,this.createActionBarCore(o)},t.prototype.scrollToPage=function(e){var t=this;if("bypage"===this.pageEditMode)return this.pagesController.currentPage=e,this.currentPage=e,void this.pagesController.creator.selectElement(this.pagesController.currentPage);var o=document.getElementById(e.id);if(o){var i=this.pagesController.pages.indexOf(e)===this.pagesController.pages.length-1;this._scrollableContainer?(this._scrollableContainer.scrollTo(this._scrollableContainer.scrollLeft,o.offsetTop-20),this.patchContainerOffset(o),i&&setTimeout((function(){t._scrollableContainer.scrollTo(t._scrollableContainer.scrollLeft,o.offsetTop-20),t.patchContainerOffset(o)}),50)):(o.scrollIntoView({block:"start"}),this.patchContainerOffset(o),i&&setTimeout((function(){o.scrollIntoView({block:"start"}),t.patchContainerOffset(o)}),50))}},t.prototype.createActionBarCore=function(e){return new r.Action(e)},Object.defineProperty(t.prototype,"pageSelectorCaption",{get:function(){return Q("ed.selectPage")},enumerable:!1,configurable:!0}),t.prototype.onContainerScroll=function(e){var t=e.scrollTop,o=e.clientHeight,i=t+o,n=[],r=void 0,a=0;return this.pagesController.pages.forEach((function(e){var o=document.getElementById(e.id);if(o){var s=o.offsetTop,l=s+o.clientHeight;if(!(s<i||l>t))return;var u=s-t,c=i-l,p=o.clientHeight;u<0&&(p+=u),c<0&&(p+=c),(p/=o.clientHeight)>0&&(n.push({page:e,visiblePart:p}),p>a&&(a=p,r=e))}})),this.currentPage=r,n},t.prototype.stopItemsContainerHeightObserver=function(){this._itemsContainer=void 0,this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=void 0),this.isDisposed||(this.visibleItemsStartIndex=0,this.visibleItemsCount=Number.MAX_VALUE)},t.prototype.setScrollableContainer=function(e){this._scrollableContainer=e},t.prototype.setItemsContainer=function(e){var t=this;this.stopItemsContainerHeightObserver(),this._itemsContainer=e,this._resizeObserver=new ResizeObserver((function(e,o){return t.updateVisibleItems(e[0].contentBoxSize[0].blockSize)})),this._resizeObserver.observe(e)},t.prototype.updateVisibleItems=function(e){var o=e-t.PAGE_NAVIGATION_MENU_ITEM_HEIGHT;this.visibleItemsCount=Math.floor(o/t.PAGE_NAVIGATION_ITEM_HEIGHT);var i=this.pagesController.pages.indexOf(this.currentPage),n=0;i>=this.visibleItemsCount&&(n=this.items.length-i-1<this.visibleItemsCount/2?this.items.length-this.visibleItemsCount:i-Math.floor(this.visibleItemsCount/2)),this.visibleItemsStartIndex=n},Object.defineProperty(t.prototype,"visibleItems",{get:function(){return this.items.length<=this.visibleItemsCount?this.items:this.items.slice(this.visibleItemsStartIndex,this.visibleItemsStartIndex+this.visibleItemsCount)},enumerable:!1,configurable:!0}),t.PAGE_NAVIGATION_MENU_ITEM_HEIGHT=44,t.PAGE_NAVIGATION_ITEM_HEIGHT=36,U([Object(r.propertyArray)()],t.prototype,"items",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"visible",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"isPopupOpened",void 0),U([Object(r.property)({onSet:function(e,t){var o=t.pagesController.pages.indexOf(e);if(!(o>=t.visibleItemsStartIndex&&o<t.visibleItemsStartIndex+t.visibleItemsCount)){var i=t.visibleItemsStartIndex;if(o<t.visibleItemsStartIndex&&(i=o),o>=t.visibleItemsStartIndex+t.visibleItemsCount&&(i=o-t.visibleItemsCount+1),t.visibleItemsStartIndex!==i)if(t.visible&&t._itemsContainer){var n=t._itemsContainer.querySelectorAll(".svc-page-navigator__selector + div")[0];if(n){var r="svc-page-navigator__items--"+(t.visibleItemsStartIndex<i?"up":"down");n.className=r,setTimeout((function(){n.className="",t.visibleItemsStartIndex=i}),250)}}else t.visibleItemsStartIndex=i}}})],t.prototype,"currentPage",void 0),U([Object(r.property)({defaultValue:0})],t.prototype,"visibleItemsStartIndex",void 0),U([Object(r.property)({defaultValue:Number.MAX_VALUE})],t.prototype,"visibleItemsCount",void 0),t}(r.Base),Qo=function(e){function t(t,o){var i=e.call(this)||this;i.creator=t,i.surveyElement=o,i.selectedPropPageFunc=function(e,t){"isSelectedInDesigner"===t.name&&i.onElementSelectedChanged(t.newValue)},i.sidebarFlyoutModeChangedFunc=function(e,t){"flyoutMode"===t.name&&i.updateActionsProperties()},i.actionContainer=new r.AdaptiveActionContainer;var n=[];return i.buildActions(n),i.setSurveyElement(o),i.surveyElement&&(i.creator.sidebar.onPropertyChanged.add(i.sidebarFlyoutModeChangedFunc),i.creator.onElementMenuItemsChanged(i.surveyElement,n),i.actionContainer.setItems(n)),i.setShowAddQuestionButton(!0),i}return z(t,e),t.prototype.detachElement=function(e){e&&e.onPropertyChanged.remove(this.selectedPropPageFunc)},t.prototype.attachElement=function(e){e&&e.onPropertyChanged.add(this.selectedPropPageFunc)},t.prototype.setSurveyElement=function(e){this.detachElement(this.surveyElement),this.surveyElement=e,this.attachElement(this.surveyElement),this.updateActionsProperties()},t.prototype.checkActionProperties=function(){this.creator.isElementSelected(this.surveyElement)&&this.updateActionsProperties()},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.detachElement(this.surveyElement)},t.prototype.onElementSelectedChanged=function(e){e&&this.updateActionsProperties()},t.prototype.updateActionsProperties=function(){this.isDisposed||this.updateElementAllowOptions(this.creator.getElementAllowOperations(this.surveyElement),this.isOperationsAllow())},t.prototype.updateElementAllowOptions=function(e,t){this.allowDragging=t&&e.allowDragging,this.allowEditOption=null==e.allowEdit||!!e.allowEdit,this.updateActionVisibility("delete",t&&e.allowDelete),this.updateActionVisibility("duplicate",t&&e.allowCopy);var o=void 0!==e.allowEdit?t&&e.allowEdit:this.creator.sidebar.flyoutMode;this.updateActionVisibility("settings",o),this.setShowAddQuestionButton(!1!==e.allowEdit)},t.prototype.isOperationsAllow=function(){return!this.creator.readOnly},t.prototype.updateActionVisibility=function(e,t){var o=this.getActionById(e);o&&(o.visible=t)},t.prototype.getActionById=function(e){for(var t=this.actionContainer.actions,o=0;o<t.length;o++)if(t[o].id===e)return t[o];return null},t.prototype.buildActions=function(e){var t=this;e.push(new r.Action({id:"duplicate",iconName:"icon-duplicate_16x16",css:"sv-action-bar-item--secondary",locTitleName:"survey.duplicate",visibleIndex:10,iconSize:16,action:function(){t.duplicate()}})),e.push(new r.Action({id:"settings",iconName:"icon-settings_16x16",css:"sv-action-bar-item--secondary",locTitleName:"ed.settings",locTooltipName:"ed.settingsTooltip",visibleIndex:20,iconSize:16,action:function(){t.creator.setShowSidebar(!0,!0),t.creator.propertyGrid.getAllQuestions()[0].focus()}})),e.push(new r.Action({id:"delete",iconName:"icon-delete_16x16",css:"sv-action-bar-item--secondary",locTitleName:"pe.delete",visibleIndex:30,iconSize:16,action:function(){t.creator.deleteElement(t.surveyElement)}}))},Object.defineProperty(t.prototype,"allowEdit",{get:function(){return!!this.creator&&!this.creator.readOnly&&this.allowEditOption},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showAddQuestionButton",{get:function(){return this.getPropertyValue("showAddQuestionButton")},enumerable:!1,configurable:!0}),t.prototype.setShowAddQuestionButton=function(e){this.setPropertyValue("showAddQuestionButton",e&&this.allowEdit&&a.designer.showAddQuestionButton)},t.prototype.duplicate=function(){},U([Object(r.property)({defaultValue:!0})],t.prototype,"allowDragging",void 0),t}(r.Base);o(21);var Fo=function(e){function t(t,o){var i=e.call(this,t,o)||this;return i.addGhostPage=function(e){void 0===e&&(e=!0);var t=i.page;i.isGhost&&i.creator.addPage(t,e,(function(){return t.unRegisterFunctionOnPropertiesValueChanged(["title","description"]),t.name=re.getNewPageName(i.creator.survey.pages),!0}))&&(i.creator.survey.currentPage=t),e&&i.creator.selectElement(t)},i.actionContainer.sizeMode="small",i.questionTypeSelectorModel=i.creator.getQuestionTypeSelectorModel((function(e){i.currentAddQuestionType=e,i.addGhostPage()})),i.attachElement(o),i}return z(t,e),t.prototype.updateDragTypeOverMe=function(){this.dragTypeOverMe=this.page.dragTypeOverMe},t.prototype.attachElement=function(t){var o=this;e.prototype.attachElement.call(this,t),this.dragTypeOverMe=null,t&&(t.surveyChangedCallback=function(){o.isPageLive=!!t.survey},this.isGhost&&(this.updateActionsProperties(),t.registerFunctionOnPropertiesValueChanged(["title","description"],(function(){o.addGhostPage()})),this.patchPageForDragDrop(t,this.addGhostPage)),t.registerFunctionOnPropertiesValueChanged(["dragTypeOverMe"],(function(){o.updateDragTypeOverMe()})),t.onFirstRendering(),t.updateCustomWidgets(),t.setWasShown(!0),this.checkActionProperties(),this.dragTypeOverMe=t.dragTypeOverMe)},t.prototype.detachElement=function(t){t&&(t.unRegisterFunctionOnPropertiesValueChanged(["dragTypeOverMe"]),t.unRegisterFunctionOnPropertiesValueChanged(["title","description"]),t.surveyChangedCallback=void 0),e.prototype.detachElement.call(this,t),this.dragTypeOverMe=null},t.prototype.onElementSelectedChanged=function(t){e.prototype.onElementSelectedChanged.call(this,t),this.isSelected=t,t&&this.onPageSelectedCallback&&this.onPageSelectedCallback()},t.prototype.patchPageForDragDrop=function(e,t){e._isGhost=!0,e._addGhostPageViewModel=function(){delete e._isGhost,delete e._addGhostPageViewModel,t()}},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.detachElement(this.page),this.onPropertyValueChangedCallback=void 0},Object.defineProperty(t.prototype,"isGhost",{get:function(){return this.creator.survey.pages.indexOf(this.page)<0},enumerable:!1,configurable:!0}),t.prototype.isOperationsAllow=function(){return e.prototype.isOperationsAllow.call(this)&&!this.isGhost&&"single"!==this.creator.pageEditMode&&this.creator.allowModifyPages},t.prototype.getPage=function(){return this.surveyElement},Object.defineProperty(t.prototype,"page",{get:function(){return this.getPage()},enumerable:!1,configurable:!0}),t.prototype.addNewQuestion=function(e,t,o){var i=this;this.creator.addNewQuestionInPage((function(e){i.addGhostPage(!1),i.creator.survey.currentPage=i.page}),null,o||this.currentAddQuestionType||a.designer.defaultAddQuestionType)},t.prototype.select=function(e,t){e.isGhost||("single"!==e.creator.pageEditMode?(e.creator.selectElement(e.page,void 0,!1),this.onPageSelectedCallback&&this.onPageSelectedCallback()):e.creator.selectElement(e.creator.survey,void 0,!1)),t.stopPropagation(),t.cancelBubble=!0},Object.defineProperty(t.prototype,"css",{get:function(){var e="";return this.dragTypeOverMe&&0===this.page.elements.length&&this.creator.survey.pages.length>0&&(e="svc-page--drag-over-empty"),this.isGhost?e+" svc-page__content--new":(this.creator.isElementSelected(this.page)&&(e+=" svc-page__content--selected"),e)},enumerable:!1,configurable:!0}),t.prototype.hover=function(e,t){w(e,t,this.creator.pageHoverDelay)},t.prototype.hoverStopper=function(e,t){e.__svc_question_processed=!0},t.prototype.duplicate=function(){var e=this.creator.copyPage(this.page);this.creator.selectElement(e)},Object.defineProperty(t.prototype,"addNewQuestionText",{get:function(){return!this.currentAddQuestionType&&this.creator?this.creator.getLocString("ed.addNewQuestion"):this.creator?this.creator.getAddNewQuestionText(this.currentAddQuestionType):""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"footerActionsBar",{get:function(){var e=this;if(!this._footerActionsBar){this._footerActionsBar=new r.ActionContainer,this._footerActionsBar.containerCss="svc-page__footer",this._footerActionsBar.cssClasses={item:"svc-btn",itemTitle:"svc-text svc-text--normal svc-text--bold"};var t=[{css:"svc-add-new-question-action",visible:new r.ComputedUpdater((function(){return e.showAddQuestionButton})),component:"svc-add-new-question-btn",data:this}];t=this.creator.getUpdatedPageAdornerFooterActions(this,t),this.footerActionsBar.setItems(t)}return this._footerActionsBar},enumerable:!1,configurable:!0}),U([Object(r.property)({defaultValue:!1})],t.prototype,"isSelected",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"isPageLive",void 0),U([Object(r.property)({defaultValue:""})],t.prototype,"currentAddQuestionType",void 0),U([Object(r.property)({defaultValue:null})],t.prototype,"dragTypeOverMe",void 0),t}(Qo);o(22);var Uo=function(e){function t(t,o,i){var n=e.call(this)||this;return n.creator=t,n.row=o,n.templateData=i,n}return z(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){var e="svc-row";return 1===this.row.elements.length&&"sv-drag-drop-ghost-survey-element-name"===this.row.elements[0].name&&(e+=" svc-row--ghost"),this.row.dragTypeOverMe===r.DragTypeOverMeEnum.Top&&(e+=" svc-row--drag-over-top"),this.row.dragTypeOverMe===r.DragTypeOverMeEnum.Bottom&&(e+=" svc-row--drag-over-bottom"),e},enumerable:!1,configurable:!0}),t}(r.Base);o(23);var Go=function(e){function t(t,o,i){var n=e.call(this,t,o)||this;return n.templateData=i,n.startDragSurveyElement=function(e){var t=n.surveyElement,o=n.creator.selectedElement===t;return n.dragDropHelper.startDragSurveyElement(e,t,o),!0},n.questionTypeSelectorModel=n.creator.getQuestionTypeSelectorModel((function(e){n.currentAddQuestionType=e}),n.surveyElement instanceof r.PanelModelBase?n.surveyElement:null),n.actionContainer.sizeMode="small",o.isQuestion&&o.setCanShowOptionItemCallback&&o.setCanShowOptionItemCallback((function(e){return!t.readOnly&&(e!==n.surveyElement.newItem||(t.maximumChoicesCount<1||o.choices.length<t.maximumChoicesCount))})),n.checkActionProperties(),n.dragOrClickHelper=new r.DragOrClickHelper(n.startDragSurveyElement),Xt.setQuestion(n),n}return z(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this.surveyElement},enumerable:!1,configurable:!0}),t.prototype.select=function(e,t){if(e.surveyElement.isInteractiveDesignElement)return t.stopPropagation(),t.cancelBubble=!0,e.creator.selectElement(e.surveyElement,void 0,!1),!0},t.prototype.rootCss=function(){return this.surveyElement.isQuestion&&!this.surveyElement.startWithNewLine?" svc-question__adorner--start-with-new-line":""},t.prototype.css=function(){if(!this.surveyElement.isInteractiveDesignElement)return"";var e="svc-question__content";return e+="function"==typeof this.surveyElement.getType?" svc-question__content--"+this.surveyElement.getType():"",this.creator.isElementSelected(this.surveyElement)&&(e+=" svc-question__content--selected"),this.isEmptyElement&&(e+=" svc-question__content--empty"),this.isDragMe?e+=" svc-question__content--dragged":e=e.replace(" svc-question__content--dragged",""),this.dragTypeOverMe===r.DragTypeOverMeEnum.InsideEmptyPanel?e+=" svc-question__content--drag-over-inside":e=e.replace(" svc-question__content--drag-over-inside",""),this.dragTypeOverMe===r.DragTypeOverMeEnum.MultilineLeft||this.dragTypeOverMe===r.DragTypeOverMeEnum.Left?e+=" svc-question__content--drag-over-left":e=e.replace(" svc-question__content--drag-over-left",""),this.dragTypeOverMe===r.DragTypeOverMeEnum.MultilineRight||this.dragTypeOverMe===r.DragTypeOverMeEnum.Right?e+=" svc-question__content--drag-over-right":e=e.replace(" svc-question__content--drag-over-right",""),this.dragTypeOverMe===r.DragTypeOverMeEnum.Top?e+=" svc-question__content--drag-over-top":e=e.replace(" svc-question__content--drag-over-top",""),this.dragTypeOverMe===r.DragTypeOverMeEnum.Bottom?e+=" svc-question__content--drag-over-bottom":e=e.replace(" svc-question__content--drag-over-bottom",""),e},Object.defineProperty(t.prototype,"isDragMe",{get:function(){return this.surveyElement.isDragMe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dragTypeOverMe",{get:function(){return this.element.dragTypeOverMe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUsingCarryForward",{get:function(){var e;return null===(e=this.element)||void 0===e?void 0:e.isUsingCarryForward},enumerable:!1,configurable:!0}),t.prototype.createCarryForwardParams=function(){var e,t=this;if(!this.isUsingCarryForward)return null;var o=null===(e=this.element)||void 0===e?void 0:e.choicesFromQuestion;if(!o)return null;var i=this.creator.survey.getQuestionByName(o);return i?{question:i,text:this.creator.getLocString("ed.carryForwardChoicesCopied"),onClick:function(){t.creator.selectElement(i)}}:null},t.prototype.dispose=function(){this.surveyElement.unRegisterFunctionOnPropertyValueChanged("isRequired","isRequiredAdorner"),this.surveyElement.unRegisterFunctionOnPropertyValueChanged("inputType","inputTypeAdorner"),this.surveyElement.setCanShowOptionItemCallback&&this.surveyElement.setCanShowOptionItemCallback(void 0)},Object.defineProperty(t.prototype,"isDraggable",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.hover=function(e,t){this.surveyElement.isInteractiveDesignElement&&(this.updateActionsProperties(),w(e,t))},t.prototype.updateElementAllowOptions=function(t,o){e.prototype.updateElementAllowOptions.call(this,t,o),this.updateActionVisibility("convertTo",o&&t.allowChangeType),this.updateActionVisibilityByProp("isrequired","isRequired",o&&t.allowChangeRequired),this.updateActionVisibilityByProp("convertInputType","inputType",t.allowChangeInputType)},t.prototype.updateActionVisibilityByProp=function(e,t,o){var i=r.Serializer.findProperty(this.surveyElement.getType(),t);if(i){var n=this.creator.onIsPropertyReadOnlyCallback(this.surveyElement,i,i.readOnly,null,null);this.updateActionVisibility(e,o&&!n)}},Object.defineProperty(t.prototype,"isEmptyElement",{get:function(){if(this.surveyElement instanceof r.QuestionHtmlModel)return!this.surveyElement.html;if(this.surveyElement instanceof r.PanelModelBase){var e=this.surveyElement;return!e.rows||e.rows.length<=0||0===e.elements.length}return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholderText",{get:function(){return this.surveyElement instanceof r.QuestionHtmlModel?Q("ed.htmlPlaceHolder"):Q("ed.panelPlaceHolder")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dragDropHelper",{get:function(){return this.creator.dragDropSurveyElements},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRequired",{get:function(){return this.surveyElement.isRequired},set:function(e){this.surveyElement.isRequired=e},enumerable:!1,configurable:!0}),t.prototype.onPointerDown=function(e){this.dragOrClickHelper.onPointerDown(e)},t.prototype.getConvertToTypesActions=function(){var e=this,t=X.getConvertToClasses(this.currentType,this.creator.toolbox.itemNames,!0),o=[],i=null;return t.forEach((function(t){var n=e.creator.toolbox.items.filter((function(e){return e.name==t}))[0],r=i&&n.category!=i.category,a=e.creator.createIActionBarItemByClass(n.name,n.title,n.iconName,r);i=n,o.push(a)})),o},Object.defineProperty(t.prototype,"currentType",{get:function(){return this.surveyElement.getType()},enumerable:!1,configurable:!0}),t.prototype.createConvertToAction=function(){var e=this,t=this.getConvertToTypesActions(),o=t.length>0;return this.createDropdownModel("convertTo",t,o,0,this.currentType,(function(t){e.creator.convertCurrentQuestion(t.id)}))},t.prototype.createConvertInputType=function(){var e=this,t=null;if("text"===this.surveyElement.getType()&&(t=r.Serializer.findProperty("text","inputType")),"rating"===this.surveyElement.getType()&&(t=r.Serializer.findProperty("rating","rateDisplayMode")),!t||!b(this.surveyElement,t.name))return null;var o=t.name,i=this.surveyElement.getPropertyValue(o),n=t.getChoices(this.surveyElement,(function(e){})),a=[];n.forEach((function(e){a.push({id:e,title:H.getPropertyValueInEditor(t.name,e)})}));var s=this.createDropdownModel("convertInputType",a,!0,1,i,(function(t){e.surveyElement.setPropertyValue(o,t.id),s.title=t.title}));return this.surveyElement.registerFunctionOnPropertyValueChanged(o,(function(){var t=e.getSelectedItem(a,e.surveyElement.getPropertyValue(o));t&&(s.popupModel.contentComponentData.model.selectedItem=t,s.title=t.title)}),"inputTypeAdorner"),s.removePriority=1,s},t.prototype.getSelectedItem=function(e,t){var o=e.filter((function(e){return e.id===t}));return o.length>0?o[0]:void 0},t.prototype.createDropdownModel=function(e,t,o,i,n,a){var s=this,l=this.getSelectedItem(t,n),u=l?l.title:n,c=Object(r.createDropdownActionModel)({id:e,css:"sv-action--convertTo sv-action-bar-item--secondary",iconName:"icon-drop-down-arrow_16x16",iconSize:16,title:u,enabled:o,visibleIndex:i,disableShrink:!0,action:function(e){c.popupModel.displayMode=s.creator.isMobileView?"overlay":"popup"}},{items:t,onSelectionChanged:a,allowSelection:!0,selectedItem:l,horizontalPosition:"center"});return c},t.prototype.createRequiredAction=function(){var e=this;this.surveyElement.isRequired;var t=new r.Action({id:"isrequired",ariaChecked:new r.ComputedUpdater((function(){return e.isRequired})),ariaRole:"checkbox",css:this.isRequired?"sv-action-bar-item--secondary":"",title:this.creator.getLocString("pe.isRequired"),visibleIndex:20,iconName:this.isRequired?"icon-switch-active_16x16":"icon-switch-inactive_16x16",iconSize:16,action:function(){e.creator.isCanModifyProperty(e.surveyElement,"isRequired")&&(e.isRequired=!e.isRequired)}});return this.surveyElement.registerFunctionOnPropertyValueChanged("isRequired",(function(){t.iconName=e.isRequired?"icon-switch-active_16x16":"icon-switch-inactive_16x16",t.css=e.isRequired?"sv-action-bar-item--secondary":""}),"isRequiredAdorner"),t},t.prototype.buildActions=function(t){e.prototype.buildActions.call(this,t);var o=this.surveyElement;t.push(this.createConvertToAction());var i=this.createConvertInputType();i&&t.push(i),t[t.length-1].css+=" sv-action--convertTo-last",void 0!==o.isRequired&&v(o,"isRequired")&&b(o,"isRequired")&&t.push(this.createRequiredAction())},t.prototype.duplicate=function(){var e=this;setTimeout((function(){var t=e.creator.fastCopyQuestion(e.surveyElement);e.creator.selectElement(t)}),1)},t.prototype.addNewQuestion=function(){this.creator.addNewQuestionInPage((function(e){}),this.surveyElement instanceof r.PanelModelBase?this.surveyElement:null,this.currentAddQuestionType||a.designer.defaultAddQuestionType)},Object.defineProperty(t.prototype,"addNewQuestionText",{get:function(){return!this.currentAddQuestionType&&this.creator?this.creator.getLocString("ed.addNewQuestion"):this.creator?this.creator.getAddNewQuestionText(this.currentAddQuestionType):""},enumerable:!1,configurable:!0}),U([Object(r.property)()],t.prototype,"isDragged",void 0),U([Object(r.property)({defaultValue:""})],t.prototype,"currentAddQuestionType",void 0),t}(Qo);o(2);var zo=function(e){function t(t,o,i){var n=e.call(this,t,o,i)||this;return n.switchCollapse=function(){n.isCollapsed=!n.isCollapsed},n.surveyElement.registerFunctionOnPropertyValueChanged("isSelectedInDesigner",(function(){n.leftFocus()}),"dropdownCollapseChecker"),n.visibleCount=t.maxVisibleChoices,n.isCollapsed=n.isCollapsed&&n.needToCollapse,n}return z(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.surveyElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemComponent",{get:function(){return this.surveyElement.isDescendantOf("dropdown")?"survey-radiogroup-item":"survey-checkbox-item"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"needToCollapse",{get:function(){return this.visibleCount>0&&this.question.visibleChoices.length>this.visibleCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCollapseView",{get:function(){return this.isCollapsed},enumerable:!1,configurable:!0}),t.prototype.leftFocus=function(){this.creator.isElementSelected(this.surveyElement)||this.isCollapsed||(this.isCollapsed=this.needToCollapse)},t.prototype.getChoiceCss=function(){return(new r.CssClassBuilder).append("svc-question__dropdown-choice").append("svc-question__dropdown-choice--collapsed",this.isCollapsed&&this.needToCollapse).toString()},t.prototype.getRenderedItems=function(){return this.isCollapsed?this.question.visibleChoices.slice(0,this.visibleCount):this.question.visibleChoices},t.prototype.getButtonText=function(){return this.isCollapsed?H.getString("ed.showMoreChoices"):H.getString("ed.showLessChoices")},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.surveyElement.unRegisterFunctionOnPropertyValueChanged("isSelectedInDesigner","dropdownCollapseChecker")},U([Object(r.property)({defaultValue:!0})],t.prototype,"isCollapsed",void 0),U([Object(r.property)({defaultValue:-1})],t.prototype,"visibleCount",void 0),t}(Go);o(24);var Zo=function(e){function t(t,o,i,n){var r=e.call(this,t,o,i)||this;return r.questionRoot=n,r.isEmptyImageLink=!r.question.imageLink,r.surveyElement.registerFunctionOnPropertyValueChanged("imageLink",(function(){r.imageLinkValueChangedHandler()}),"imageLinkValueChanged"),r.initFilePresentationModel(),r}return z(t,e),t.prototype.initFilePresentationModel=function(){var e=this;this.filePresentationModel=r.Serializer.createClass("file",{name:this.question.name});var t=new r.SurveyModel;this.filePresentationModel.setSurveyImpl(t),this.filePresentationModel.forceIsInputReadOnly=!this.creator.isCanModifyProperty(this.question,"imageLink"),this.filePresentationModel.dragAreaPlaceholder=this.placeholderText,this.filePresentationModel.chooseButtonCaption=this.chooseImageText,this.filePresentationModel.acceptedTypes="image/*",this.filePresentationModel.storeDataAsText=!1,t.onUploadFiles.add((function(t,o){o.files[0]&&e.creator.uploadFiles(o.files,e.question,(function(t,o){e.question.imageLink=o}))}))},t.prototype.chooseFile=function(e){var t=e.questionRoot.getElementsByClassName("svc-choose-file-input")[0];e.creator.chooseFiles(t,(function(t){e.isUploading=!0,e.creator.uploadFiles(t,e.surveyElement,(function(t,o){e.surveyElement.imageLink=o,e.isUploading=!1}))}))},Object.defineProperty(t.prototype,"acceptedTypes",{get:function(){return N(this.surveyElement.contentMode)},enumerable:!1,configurable:!0}),t.prototype.imageLinkValueChangedHandler=function(){this.isEmptyImageLink=!this.question.imageLink,this.filePresentationModel.value=null,this.filePresentationModel.visible=!this.question.imageLink},Object.defineProperty(t.prototype,"isEmptyElement",{get:function(){return this.isEmptyImageLink},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.surveyElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholderText",{get:function(){return Q("ed.imagePlaceHolder")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"chooseImageText",{get:function(){return Q("ed.imageChooseImage")},enumerable:!1,configurable:!0}),U([Object(r.property)({defaultValue:!1})],t.prototype,"isUploading",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"isEmptyImageLink",void 0),t}(Go);o(25);var Jo=function(e){function t(t,o,i){var n=e.call(this)||this;return n.creator=t,n.surveyElement=o,n.templateData=i,n}return z(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return A(this.surveyElement)},enumerable:!1,configurable:!0}),t.useRateValues=function(e){return e.useRateValues()},t.prototype.addItem=function(e){if(e.allowAdd)if(t.useRateValues(e.element)){var o,i=e.element.rateValues.map((function(e){return e.value}));o=h(e.creator.getChoicesItemBaseTitle(),i);var n=new r.ItemValue(o);n.locOwner={getLocale:function(){return e.element.getLocale?e.element.getLocale():""},getMarkdownHtml:function(e){return e},getProcessedText:function(e){return e}},e.element.rateValues=e.element.rateValues.concat([n]);var a=e.element.rateValues;e.creator.onItemValueAddedCallback(e.element,"rateValues",a[a.length-1],a)}else e.element.rateMax+=e.element.rateStep},t.prototype.removeItem=function(e){if(e.allowRemove){var o=r.Serializer.findProperty(e.element.getType(),"rateValues"),i=e.element.rateValues&&e.element.rateValues.length-1,n=e.element.rateValues&&e.element.rateValues[i]||null;if(e.creator.onCollectionItemDeletingCallback(e.element,o,e.element.rateValues,n)){var a=e.element;t.useRateValues(e.element)||i!==a.rateValues.length-1?(t.useRateValues(e.element)||(a.rateValues=a.rateValues),a.rateValues.splice(i,1)):a.rateMax-=a.rateStep}}},t.allowAddForElement=function(e,o){return(o<1||o>r.settings.ratingMaximumRateValueCount)&&!t.useRateValues(e)&&(o=r.settings.ratingMaximumRateValueCount),"smileys"==e.rateDisplayMode&&(o<1||o>10)&&(o=10),o<1||e.rateCount<o},Object.defineProperty(t.prototype,"allowAdd",{get:function(){return this.canAddOrRemove()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableAdd",{get:function(){return this.allowAdd&&t.allowAddForElement(this.element,this.creator.maximumRateValues)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"addClassNames",{get:function(){return(new r.CssClassBuilder).append("svc-item-value-controls__button").append("svc-item-value-controls__button--disabled",!this.enableAdd).append("svc-item-value-controls__add").toString()},enumerable:!1,configurable:!0}),t.allowRemoveForElement=function(e){return e.rateCount>2},t.prototype.canAddOrRemove=function(){return this.creator.isCanModifyProperty(this.element,"rateValues")&&this.creator.isCanModifyProperty(this.element,"rateCount")&&(!this.element.autoGenerate||this.creator.isCanModifyProperty(this.element,"rateMax"))},Object.defineProperty(t.prototype,"allowRemove",{get:function(){return this.canAddOrRemove()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableRemove",{get:function(){return this.allowRemove&&t.allowRemoveForElement(this.element)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"removeClassNames",{get:function(){return(new r.CssClassBuilder).append("svc-item-value-controls__button").append("svc-item-value-controls__button--disabled",!this.enableRemove).append("svc-item-value-controls__remove").toString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"addTooltip",{get:function(){return Q("pe.addItem")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"removeTooltip",{get:function(){return Q("pe.removeItem")},enumerable:!1,configurable:!0}),t}(r.Base);o(26);var Wo=function(e){function t(t,o,i){var n=e.call(this)||this;n.creator=t,n.question=o,n.item=i,n.canTouchItems=!0,n.focusCameFromDown=!1,n.startDragItemValue=function(e,t){n.dragDropHelper.startDrag(e,n.item,n.question,t)},n.handleDragDropGhostPositionChanged=function(){n.ghostPosition=n.getGhostPosition(n.item),n.isDragDropGhost=n.item===n.dragDropHelper.draggedElement,n.item===n.dragDropHelper.prevDropTarget?(n.isDragDropMoveDown=n.item.isDragDropMoveDown,n.isDragDropMoveUp=n.item.isDragDropMoveUp):(n.isDragDropMoveDown=!1,n.isDragDropMoveUp=!1)},n.updateIsNew(o,i);var a=function(){n.updateIsNew(o,i)};return o.noneItem===i?o.registerFunctionOnPropertyValueChanged("showNoneItem",a):o.otherItem===i?o.registerFunctionOnPropertyValueChanged("showOtherItem",a):o.isDescendantOf("checkbox")&&o.selectAllItem===i?o.registerFunctionOnPropertyValueChanged("showSelectAllItem",a):n.isNew&&(o.visibleChoicesChangedCallback=function(){n.updateNewItemValue()},n.updateNewItemValue()),n.dragDropHelper.onGhostPositionChanged.add(n.handleDragDropGhostPositionChanged),n.dragOrClickHelper=new r.DragOrClickHelper(n.startDragItemValue),n.allowItemOperations={allowDelete:void 0,allowEdit:void 0,allowAdd:void 0},n.collectionProperty=r.Serializer.findProperty(o.getType(),n.collectionPropertyName),n.creator.onCollectionItemAllowingCallback(o,n.collectionProperty,o.visibleChoices,n.item,n.allowItemOperations),void 0===n.allowItemOperations.allowDelete&&(n.allowItemOperations.allowDelete=!0),void 0===n.allowItemOperations.allowAdd&&(n.allowItemOperations.allowAdd=!0),n.creator.isCanModifyProperty(o,"choices")||(n.canTouchItems=!1),n}return z(t,e),Object.defineProperty(t.prototype,"canBeDragged",{get:function(){return!this.isNew&&this.question.choices.indexOf(this.item)>-1},enumerable:!1,configurable:!0}),t.prototype.isBanStartDrag=function(e){return!this.isDraggable||("true"===e.target.getAttribute("contenteditable")||!this.canBeDragged)},t.prototype.updateNewItemValue=function(){this.creator&&this.question&&this.question.newItem&&(this.question.newItem.value=this.creator.getNextItemValue(this.question),this.question.newItem.text=d(this.question.choices))},Object.defineProperty(t.prototype,"collectionPropertyName",{get:function(){return this.item.ownerPropertyName?this.item.ownerPropertyName:"choices"},enumerable:!1,configurable:!0}),t.prototype.onPointerDown=function(e){return!!this.isBanStartDrag(e)||(this.dragOrClickHelper.onPointerDown(e),!1)},Object.defineProperty(t.prototype,"dragDropHelper",{get:function(){return this.creator.dragDropChoices},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.dragDropHelper.onGhostPositionChanged.remove(this.handleDragDropGhostPositionChanged)},t.prototype.getGhostPosition=function(e){return this.dragDropHelper.dropTarget!==e?null:this.dragDropHelper.isBottom?"bottom":"top"},Object.defineProperty(t.prototype,"isDraggable",{get:function(){return this.isDraggableItem(this.item)},enumerable:!1,configurable:!0}),t.prototype.isDraggableItem=function(e){return!(this.creator.readOnly||!this.canTouchItems)&&-1!==this.question.choices.indexOf(e)},t.prototype.add=function(e){e.question.noneItem!==e.item?e.question.otherItem!==e.item?e.question.isDescendantOf("checkbox")&&e.question.selectAllItem===e.item?e.question.hasSelectAll=!0:(this.addNewItem(e.item,e.question,e.creator),this.updateIsNew(e.question,e.item)):e.question.hasOther=!0:e.question.hasNone=!0},t.prototype.addNewItem=function(e,t,o){e.value="newitem";var i=o.createNewItemValue(t);this.updateNewItemValue(),io.get(i.locText).setAutoFocus()},t.prototype.remove=function(e){if(e.question.noneItem===e.item)e.question.hasNone=!1;else if(e.question.otherItem===e.item)e.question.hasOther=!1;else if(e.question.isDescendantOf("checkbox")&&e.question.selectAllItem===e.item)e.question.hasSelectAll=!1;else{var t=e.question.choices,o=t.indexOf(e.item);if(!this.creator.onCollectionItemDeletingCallback(e.question,this.collectionProperty,t,e.item))return;var i=this.findNextElementIndexToRemove(o);e.question.choices.splice(o,1),this.focusNextElementToRemove(i)}this.updateIsNew(e.question,e.item)},t.prototype.onFocusOut=function(e){this.question._lastActiveItemValueIndex=this.question.choices.indexOf(this.item)},t.prototype.findNextElementIndexToRemove=function(e){var t=0;return this.question.choices.length>0&&((t=e<this.question._lastActiveItemValueIndex?e-1:e)<0&&(t=0),t>=this.question.choices.length-2&&(t=this.question.choices.length-2)),t},t.prototype.focusNextElementToRemove=function(e){var t=this;setTimeout((function(){var o;null===(o=document.getElementById(t.question.id).querySelectorAll(".svc-item-value-controls__remove")[e])||void 0===o||o.focus()}),100)},t.prototype.updateIsNew=function(e,t){this.isNew=!e.isItemInList(t)},Object.defineProperty(t.prototype,"allowRemove",{get:function(){var e=!this.question.isItemInList(this.item);return!this.creator.readOnly&&this.canTouchItems&&this.allowItemOperations.allowDelete&&!e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tooltip",{get:function(){return Q(this.isNew?"pe.addItem":"pe.removeItem")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dragTooltip",{get:function(){return Q("pe.dragItem")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowAdd",{get:function(){var e=!this.question.isItemInList(this.item);return!this.creator.readOnly&&this.canTouchItems&&this.allowItemOperations.allowAdd&&e},enumerable:!1,configurable:!0}),t.prototype.select=function(e,t){e.question.inMatrixMode||(e.creator.selectElement(e.question,"choices",!1),t&&t.stopPropagation())},U([Object(r.property)({defaultValue:!1})],t.prototype,"isNew",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"isDragging",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"isDragDropGhost",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"isDragDropMoveDown",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"isDragDropMoveUp",void 0),U([Object(r.property)({defaultValue:null})],t.prototype,"ghostPosition",void 0),t}(r.Base);o(27);var Ko=function(e){function t(t,o,i,n,r){var a=e.call(this,t,o,i)||this;return a.question=o,a.item=i,a.templateData=n,a.itemsRoot=r,a.isChoosingNewFile=!1,a.onDragOver=function(e){a.isFileDragging=!0,e.dataTransfer.dropEffect="copy",e.preventDefault()},a.onDrop=function(e){a.isFileDragging=!1,e.preventDefault();var t=e.dataTransfer;if(t&&t.files&&!(t.files.length<1)){for(var o=[],i=0;i<t.files.length;i++)o.push(t.files[i]);a.uploadFiles(o)}},a.onDragLeave=function(e){a.isFileDragging=!1},a}return z(t,e),t.prototype.getRootCss=function(){return(new r.CssClassBuilder).append("svc-image-item-value-wrapper").append("svc-image-item-value").append("svc-image-item-value--new",this.isNew).append("svc-image-item-value-wrapper--ghost",this.isDragDropGhost).append("svc-image-item-value--file-dragging",this.isFileDragging).append("svc-image-item-value--single",this.getIsNewItemSingle()).toString()},t.prototype.getIsNewItemSingle=function(){return this.isNew&&0===this.question.choices.length},t.prototype.chooseFile=function(e){var t=e.itemsRoot.getElementsByClassName("svc-choose-file-input")[0];e.creator.chooseFiles(t,(function(t){e.isUploading=!0,e.creator.uploadFiles(t,e.question,(function(t,o){e.item.imageLink=o,e.isUploading=!1}))}))},t.prototype.uploadFiles=function(e){var t=this;this.isUploading=!0,this.creator.uploadFiles(e,this.question,(function(e,o){t.creator.createNewItemValue(t.question,t.isChoosingNewFile,(function(e){e.imageLink=o})),t.isChoosingNewFile=!1,t.isUploading=!1}))},t.prototype.chooseNewFile=function(e){var t=this,o=e.itemsRoot.getElementsByClassName("svc-choose-file-input")[0];e.creator.chooseFiles(o,(function(o){t.isChoosingNewFile=!0,e.uploadFiles(o)}))},Object.defineProperty(t.prototype,"acceptedTypes",{get:function(){return N(this.question.contentMode)},enumerable:!1,configurable:!0}),U([Object(r.property)({defaultValue:!1})],t.prototype,"isFileDragging",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"isUploading",void 0),t}(Wo);o(28);var Xo=function(){function e(e,t){this.cellQuestion=t,this.creator=e;var o=t.toJSON();o.type=t.getType(),this.surveyValue=e.createSurvey({questions:[o]},"modal-question-editor"),this.survey.css=r.defaultV2Css,this.survey.setDesignMode(!0),this.survey.isPopupEditorContent=!0,this.survey.showQuestionNumbers="none",this.survey.questionTitleLocation="hidden",this.question.setSurveyImpl(this.survey),this.question.inMatrixMode=!0}return Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"question",{get:function(){return this.survey.getAllQuestions()[0]},enumerable:!1,configurable:!0}),e.prototype.apply=function(){var e=this.cellQuestion.parentQuestion,t=e.getColumnByName(this.cellQuestion.name),o=t.toJSON(),i=o.cellType,n=this.survey.getAllQuestions()[0].toJSON();i&&(n.cellType=i),r.Helpers.isTwoValueEquals(n,o)||(t.fromJSON(n),e.onColumnCellTypeChanged(t),this.creator.setModified({type:"MATRIX_CELL_EDITOR",column:t}))},e}(),Yo=function(e){function t(t,o,i,n,r){var a=e.call(this)||this;return a.creator=t,a.templateData=o,a.question=i,a.row=n,a.column=r,a.onSelectionChanged=function(e,t){a.context&&a.context.getPropertyValue?a.isSelected=a.creator.isElementSelected(a.context):a.isSelected=!1},t.onSelectedElementChanged.add(a.onSelectionChanged),a}return z(t,e),t.prototype.editQuestion=function(e,t){var o=new Xo(e.creator,e.question);r.settings.showModal("svc-question-editor-content",{survey:o.survey,creator:this.creator},(function(){return o.apply(),!0}),void 0,"svc-matrix-cell__popup",e.question.name,this.creator.isMobileView?"overlay":"popup"),t.stopPropagation(),e.creator.selectElement(e.column)},Object.defineProperty(t.prototype,"context",{get:function(){return this.row||this.column||this.templateData},enumerable:!1,configurable:!0}),t.prototype.selectContext=function(e,t){if(e.row)return e.creator.selectElement(e.row.data,"rows",!1),void t.stopPropagation();"function"==typeof e.context.getType&&("itemvalue"===e.context.getType()?e.creator.selectElement(e.context.locOwner,e.context.ownerPropertyName,!1):e.creator.selectElement(e.context),t.stopPropagation())},Object.defineProperty(t.prototype,"isSupportCellEditor",{get:function(){return!(!this.question||!this.question.getType)&&re.isSupportCellEditor(this.question.getType())},enumerable:!1,configurable:!0}),t.prototype.hover=function(e,t){!this.row&&this.context&&this.context.getPropertyValue&&this.context.getType&&"itemvalue"!==this.context.getType()&&w(e,t)},t.prototype.dispose=function(){this.creator.onSelectedElementChanged.remove(this.onSelectionChanged)},U([Object(r.property)()],t.prototype,"isSelected",void 0),t}(r.Base);o(29);var $o=function(e){function t(t,o){var i=e.call(this)||this;return i._data=t,i._lvl=o,i.toggle=function(){i.collapsed=!i.collapsed},i.markerWidth=16,i.items=ei(t.data,o+1),i.lvl=o,i}return z(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this.items},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isNode",{get:function(){return this._data.isNode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._data.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this._data.title},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._data.value},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayValue",{get:function(){return this._data.displayValue},enumerable:!1,configurable:!0}),t.prototype.getString=function(e){return this._data.getString(e)},Object.defineProperty(t.prototype,"markerMargin",{get:function(){return(1.5+this.lvl)*this.markerWidth+"px"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textMargin",{get:function(){return(2.75+this.lvl)*this.markerWidth+"px"},enumerable:!1,configurable:!0}),U([Object(r.property)({defaultValue:!0})],t.prototype,"collapsed",void 0),U([Object(r.property)({defaultValue:0})],t.prototype,"lvl",void 0),U([Object(r.property)()],t.prototype,"items",void 0),t}(r.Base);function ei(e,t){return void 0===e&&(e=[]),e.filter((function(e){return!!e})).map((function(e){return new $o(e,t)}))}var ti=function(e){function t(t){var o=e.call(this)||this;o.survey=t,o.selectTableClick=function(){o.resultViewType="table"},o.selectJsonClick=function(){o.resultViewType="text"},o.resultText=JSON.stringify(t.data,null,4);var i=t.getPlainData({includeEmpty:!1,includeValues:!0});return o.resultData=ei(i,0),o}return z(t,e),t.prototype.getLocString=function(e){return H.getString(e)},Object.defineProperty(t.prototype,"surveyResultsText",{get:function(){return this.getLocString("ed.surveyResults")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"surveyResultsTableText",{get:function(){return this.getLocString("ed.surveyResultsTable")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"surveyResultsJsonText",{get:function(){return this.getLocString("ed.surveyResultsJson")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resultsTitle",{get:function(){return this.getLocString("ed.resultsTitle")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resultsName",{get:function(){return this.getLocString("ed.resultsName")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resultsValue",{get:function(){return this.getLocString("ed.resultsValue")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resultsDisplayValue",{get:function(){return this.getLocString("ed.resultsDisplayValue")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isTableSelected",{get:function(){return"table"===this.resultViewType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isJsonSelected",{get:function(){return"text"===this.resultViewType},enumerable:!1,configurable:!0}),U([Object(r.property)({defaultValue:"table"})],t.prototype,"resultViewType",void 0),U([Object(r.property)({defaultValue:""})],t.prototype,"resultText",void 0),U([Object(r.propertyArray)()],t.prototype,"resultData",void 0),t}(r.Base);o(30);var oi=function(e){function t(t,o){var i=e.call(this)||this;return i.creator=t,i.root=o,i}return z(t,e),Object.defineProperty(t.prototype,"allowEdit",{get:function(){return!this.creator.readOnly},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"containerCss",{get:function(){return(new r.CssClassBuilder).append("svc-logo-image-container").append("svc-logo-image-container--editable",this.allowEdit).toString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.creator.survey},enumerable:!1,configurable:!0}),t.prototype.uploadFile=function(e,t,o){e.isUploading=!0,e.creator.uploadFiles(o,void 0,(function(o,i){e.creator.survey.logo=i,t.value="",e.isUploading=!1}))},t.prototype.chooseFile=function(e){if(this.allowEdit){var t=e.root.getElementsByClassName("svc-choose-file-input")[0];0===t.files.length?e.creator.chooseFiles(t,(function(o){e.uploadFile(e,t,o)})):e.uploadFile(e,t,[t.files[0]])}},t.prototype.remove=function(e){e.creator.survey.logo=""},Object.defineProperty(t.prototype,"chooseLogoPlaceholder",{get:function(){return this.creator.getLocString("ed.chooseLogoPlaceholder")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"acceptedTypes",{get:function(){return N("image")},enumerable:!1,configurable:!0}),U([Object(r.property)({defaultValue:!1})],t.prototype,"isUploading",void 0),t}(r.Base),ii=function(e){function t(t){var o=e.call(this,t)||this;return o.onEmbeddedSurveyValueChanged=function(){},o}return z(t,e),Object.defineProperty(t.prototype,"embeddedSurvey",{get:function(){return this.embeddedSurveyValue},set:function(e){this.embeddedSurveyValue=e,this.onEmbeddedSurveyValueChanged()},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"embeddedsurvey"},t}(r.QuestionNonValue);r.Serializer.addClass("embeddedsurvey",[],(function(){return new ii("")}),"nonvalue"),r.QuestionFactory.Instance.registerQuestion("embeddedsurvey",(function(e){return new ii(e)})),o(31);var ni=function(e){function t(t,o){void 0===o&&(o=null);var i=e.call(this,t)||this,n=o&&!o.showValueInLink&&H.getString("pe.set")+" "+o.title||null;return i.linkValueText=n||H.getString("pe.emptyValue"),i}return z(t,e),t.prototype.onPropertyValueChanged=function(t,o,i){e.prototype.onPropertyValueChanged.call(this,t,o,i),"value"===t&&(this.updateLinkValueText(),this.allowClear&&(this.showClear=!r.Helpers.isValueEmpty(i)),this.updateIsClickable())},t.prototype.onReadOnlyChanged=function(){this.updateIsClickable(),e.prototype.onReadOnlyChanged.call(this)},t.prototype.updateIsClickable=function(){this.setPropertyValue("isClickable",!this.isReadOnly||!!this.isClickableCallback&&this.isClickableCallback())},Object.defineProperty(t.prototype,"ariaRole",{get:function(){return"button"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tooltip",{get:function(){return this.showTooltip?this.linkValueText:void 0},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"linkvalue"},t.prototype.doLinkClick=function(){this.linkClickCallback&&this.linkClickCallback()},t.prototype.doClearClick=function(){this.clearClickCallback&&this.clearClickCallback()},t.prototype.updateLinkValueText=function(){var e;e=this.showValueInLink?this.isEmpty()?H.getString("pe.emptyValue"):this.getObjDisplayValue():H.getString(this.isEmpty()?"pe.set":"pe.change")+" "+this.title,this.linkValueText=e},t.prototype.stringifyValue=function(e){return"string"!=typeof e?JSON.stringify(e):e},t.prototype.getObjDisplayValue=function(){var e=this.obj;if(!e||!e.getDisplayValue)return this.stringifyValue(this.value);var t=e.getDisplayValue(!0,this.value);return"string"!=typeof t?JSON.stringify(t):t},U([Object(r.property)({defaultValue:"svc-link-value-button svc-question-link__set-button"})],t.prototype,"linkSetButtonCssClasses",void 0),U([Object(r.property)({defaultValue:"svc-question-link__clear-button"})],t.prototype,"linkClearButtonCssClasses",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"isSelected",void 0),U([Object(r.property)()],t.prototype,"linkValueText",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"showClear",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"allowClear",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"showValueInLink",void 0),U([Object(r.property)({defaultValue:!1})],t.prototype,"showTooltip",void 0),U([Object(r.property)({defaultValue:!0})],t.prototype,"isClickable",void 0),t}(r.Question);r.Serializer.addClass("linkvalue",["showValueInLink",{name:"showTooltip: boolean",default:!1,visible:!1}],(function(e){return new ni("",e)}),"nonvalue"),r.QuestionFactory.Instance.registerQuestion("linkvalue",(function(e){return new ni(e)}));var ri=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._showUnitsInEditor=!0,t.onUpButtonMouseDown=function(){t.increase(),t.increaseTimer=setTimeout(t.onUpButtonMouseDown,200)},t.onDownButtonMouseDown=function(){t.decrease(),t.decreaseTimer=setTimeout(t.onDownButtonMouseDown,200)},t.onButtonMouseLeave=function(){t.onButtonMouseUp()},t.onButtonMouseUp=function(){clearTimeout(t.decreaseTimer),clearTimeout(t.increaseTimer)},t.onKeyDown=function(e){switch(e.key){case"ArrowUp":t.increase(),e.stopPropagation(),e.preventDefault();break;case"ArrowDown":t.decrease(),e.stopPropagation(),e.preventDefault()}},t.onInputKeyDown=function(e){"ArrowUp"!=e.key&&"ArrowDown"!=e.key||t.updateValueOnEvent(e)},t.onFocus=function(e){t._showUnitsInEditor=!1},t.onBlur=function(e){t._showUnitsInEditor=!0,"INPUT"==e.target.tagName&&t.updateValueOnEvent(e)},t}return z(t,e),t.prototype.parseValue=function(e){return{value:parseFloat(e.toString()),unit:e.toString().replace(/[^A-Za-z]/g,"")}},t.prototype.changeValue=function(e){var t=this.parseValue(this.renderedValue),o=Number(this.renderedStep||1),i=t.value;e?i+=o:i-=o,this.value=i},Object.defineProperty(t.prototype,"showUnitsInEditor",{get:function(){return!!this.unit&&this._showUnitsInEditor},enumerable:!1,configurable:!0}),t.prototype.correctValue=function(e){if(null==e||null==e)return e;var t=Number(this.renderedMax),o=Number(this.renderedMin);return e="string"==typeof e?parseFloat(e):e,isNaN(e)?e=isNaN(o)?0:o:e>t?e=t:e<o&&(e=o),e=Math.round(1e3*e)/1e3},t.prototype.setNewValue=function(t){e.prototype.setNewValue.call(this,this.correctValue(t))},Object.defineProperty(t.prototype,"renderedValue",{get:function(){var e,t,o=(null!==(t=null!==(e=this.value)&&void 0!==e?e:this.renderedMin)&&void 0!==t?t:0).toString();return this.showUnitsInEditor&&(o+=this.unit),o},enumerable:!1,configurable:!0}),t.prototype.increase=function(){this.changeValue(!0)},t.prototype.decrease=function(){this.changeValue(!1)},t.prototype.onBeforeInput=function(e){e.data&&!/[\d.]/.test(e.data)&&e.preventDefault()},t.prototype.getType=function(){return"spinedit"},Object.defineProperty(t.prototype,"isInputTextUpdate",{get:function(){return!1},enumerable:!1,configurable:!0}),U([Object(r.property)()],t.prototype,"unit",void 0),U([Object(r.property)()],t.prototype,"_showUnitsInEditor",void 0),t}(r.QuestionTextModel);r.Serializer.addClass("spinedit",["unit"],(function(){return new ri("")}),"text"),r.QuestionFactory.Instance.registerQuestion("spinedit",(function(e){return new ri(e)}));var ai=function(e){function t(t){var o=e.call(this,t)||this;return o.createItemValues("choices"),o.registerFunctionOnPropertyValueChanged("choices",(function(){o.updateChoices()})),o}return z(t,e),t.prototype.getCorrectedValue=function(e){if(null==e||null==e)return e;if(4===(e=((e=k(null!=e?e:"").color).match(/#(\d|\w){1,6}/)||["#000000"])[0]).length)for(var t=1;t<4;t++)e+=e[t];if(e.length<7){var o=e.length;for(t=0;t<7-o;t++)e+="0"}return e},t.prototype.setNewValue=function(t){this.resetRenderedValue(),e.prototype.setNewValue.call(this,this.getCorrectedValue(t)),this.updateRenderedValue()},t.prototype.onBeforeInput=function(e){e.data&&!/[\d\w(),#]/.test(e.data)&&e.preventDefault()},t.prototype.onColorInputChange=function(e){this.value=e.target.value},t.prototype.getType=function(){return"color"},t.prototype.resetRenderedValue=function(){this._renderedValue=void 0},t.prototype.updateRenderedValue=function(){if(this.value){var e=k(this.value||"");this._renderedValue=e.color}else this._renderedValue="#000000"},Object.defineProperty(t.prototype,"renderedValue",{get:function(){return this._renderedValue||this.updateRenderedValue(),this._renderedValue.toUpperCase()},enumerable:!1,configurable:!0}),t.prototype.getSwatchCss=function(){return(new r.CssClassBuilder).append(this.cssClasses.swatch).append(this.cssClasses.swatchDisabled,this.isInputReadOnly).toString()},t.prototype.getSwatchStyle=function(){return{backgroundColor:this.renderedValue}},Object.defineProperty(t.prototype,"isInputTextUpdate",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.onSurveyValueChanged=function(t){e.prototype.onSurveyValueChanged.call(this,t),this.updateRenderedValue()},Object.defineProperty(t.prototype,"dropdownAction",{get:function(){return this._dropdownAction||(this._dropdownAction=this.createDropdownAction()),this._dropdownAction},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"choices",{get:function(){return this.getPropertyValue("choices")},set:function(e){this.setPropertyValue("choices",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showDropdownAction",{get:function(){return!this.isValueEmpty(this.choices)},enumerable:!1,configurable:!0}),t.prototype.createDropdownAction=function(){var e=this,t=Object(r.createDropdownActionModelAdvanced)({enabled:new r.ComputedUpdater((function(){return!e.isInputReadOnly}))},{onSelectionChanged:function(t){e.value=t.value},items:this.choices},{showPointer:!1,verticalPosition:"bottom",horizontalPosition:"center"}),o=t.popupModel,i=o.contentComponentData.model;return o.setWidthByTarget=!0,o.positionMode="fixed",i.isItemSelected=function(t){return t.value==e.value},t},t.prototype.calcCssClasses=function(t){var o=e.prototype.calcCssClasses.call(this,t),i=this.dropdownAction;i.cssClasses={item:o.colorDropdown},i.iconName=o.colorDropdownIcon;var n=i.popupModel.contentComponentData.model;return n.cssClasses={},n.cssClasses={itemBody:n.cssClasses.itemBody+" "+o.colorItem},o},t.prototype.updateChoices=function(){this.dropdownAction.popupModel.contentComponentData.model.setItems(this.choices)},Object.defineProperty(t.prototype,"itemComponent",{get:function(){return"color-item"},enumerable:!1,configurable:!0}),U([Object(r.property)()],t.prototype,"unit",void 0),U([Object(r.property)()],t.prototype,"_renderedValue",void 0),t}(r.QuestionTextModel);r.Serializer.addClass("color",["unit","choices:itemvalue[]"],(function(){return new ai("")}),"text"),r.QuestionFactory.Instance.registerQuestion("color",(function(e){return new ai(e)}));var si=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.onChangeQuestionValue=function(e){},t.prototype.setNewValue=function(t){"object"==typeof t&&(this.stateChanged(this.isEmpty()?"empty":"loaded"),this.isLoadingFromJson||this.loadPreview(t),this.loadedFilesValue=t,t=this.previewValue[0].content),e.prototype.setNewValue.call(this,t)},t.prototype.loadPreview=function(t){"string"!=typeof t&&e.prototype.loadPreview.call(this,t)},Object.defineProperty(t.prototype,"allowMultiple",{get:function(){return!1},set:function(e){},enumerable:!1,configurable:!0}),t.prototype.clear=function(e,t){var o=this;if(void 0===t&&(t=!0),this.survey){var i=function(){t&&(o.value=void 0),o.errors=[],e&&e()};this.loadedFilesValue?(this.containsMultiplyFiles=!1,this.survey.clearFiles(this.loadedFilesValue,this.name,this.previewValue,null,(function(e,t){"success"===e&&i()}))):i()}},t.prototype.updateValueFromInputEvent=function(e){r.Helpers.isTwoValueEquals(e.target.value,this.value)||(this.clear(void 0,!1),this.loadedFilesValue=void 0,this.value=e.target.value)},t.prototype.onInputChange=function(e){e.target!==document.activeElement&&this.updateValueFromInputEvent(e)},t.prototype.onInputBlur=function(e){this.updateValueFromInputEvent(e)},t.prototype.getType=function(){return"fileedit"},t.prototype.getIsClearButtonDisabled=function(){return!this.value||this.isInputReadOnly},t.prototype.getChooseButtonCss=function(){return(new r.CssClassBuilder).append(this.cssClasses.chooseButton).append(this.cssClasses.chooseButtonDisabled,this.isInputReadOnly).toString()},t}(r.QuestionFileModel);r.Serializer.addClass("fileedit",[],(function(){return new si("")}),"file"),r.QuestionFactory.Instance.registerQuestion("fileedit",(function(e){return new si(e)}));var li=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"expression"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"comment",showOptionsCaption:!1}},t.prototype.clearPropertyValue=function(e,t,o,i){o.clearValue()},t}(Ze),ui=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"condition"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"comment",showOptionsCaption:!1,readOnly:!1===o.allowEditExpressionsInTextEditor}},t.prototype.createPropertyEditorSetup=function(e,t,o,i){return new Ct(e.getSurvey(),e,i,t.name)},t}(li);Fe.register(new li),Fe.register(new ui);var ci=function(e){function t(t,o,i,n){void 0===o&&(o=null),void 0===i&&(i="item"),void 0===n&&(n=[]);var r=e.call(this,o)||this;return r.choices=t,r.className=i,r.names=n,r.commentValue=r.editSurvey.getQuestionByName("question"),r.setComment(),r.editSurvey.getQuestionByName("question").placeholder=H.getString("pe.fastEntryPlaceholder"),r.editSurvey.onValidateQuestion.add((function(e,t){var o=r.options.maximumChoicesCount;if(o>0){var i=r.getChoicesCount();o<i&&(t.error=H.getString("pe.fastEntryChoicesCountError").format(i,o))}else if(r.isValueUnique){var n=r.getFirstUniqueValue();n&&(t.error=H.getString("pe.fastEntryNonUniqueError").format(n))}})),r}return z(t,e),t.calcBeforeApplyItemsArray=function(e,t,o){if(t&&0!=t.length){if(e.length>t.length&&e.splice(t.length,e.length-t.length),e.length<t.length){for(var i=[],n=e.length;n<t.length;n++)i.push(t[n]);e.splice.apply(e,[e.length,0].concat(i))}}else e.splice(0,e.length)},t.applyItemsArray=function(e,t,o){void 0===o&&(o=[]),this.calcBeforeApplyItemsArray(e,t,o);for(var i=0;i<e.length;i++)o.forEach((function(o){e[i][o]=t[i][o]}))},t.prototype.getSurveyJSON=function(){return{elements:[{type:"comment",name:"question",titleLocation:"hidden",rows:12}]}},t.prototype.getSurveyCreationReason=function(){return"fast-entry"},t.prototype.apply=function(){if(this.comment.isEmpty())return!1;if(this.editSurvey.hasErrors(!0))return!1;var e=this.convertTextToItemValues(this.comment.value);return t.applyItemsArray(this.choices,e,this.names),!0},t.prototype.convertTextToItemValues=function(e){var t=[];if(!e)return t;for(var o=e.split("\n"),i=0;i<o.length;i++)if(o[i]){var n=o[i].split(r.ItemValue.Separator),a=r.Serializer.createClass(this.className);this.names.forEach((function(e,t){a[e]=n[t]})),t.push(a)}return t},Object.defineProperty(t.prototype,"comment",{get:function(){return this.commentValue},enumerable:!1,configurable:!0}),t.prototype.getChoicesCount=function(){for(var e=this.comment.value.split("\n"),t=0,o=0;o<e.length;o++){e[o]&&t++}return t},Object.defineProperty(t.prototype,"isValueUnique",{get:function(){return!0===r.Serializer.findProperty("itemvalue","value").isUnique},enumerable:!1,configurable:!0}),t.prototype.getFirstUniqueValue=function(){for(var e=this.comment.value.split("\n"),t={},o=0;o<e.length;o++){var i=e[o];if(i){var n=i.split(r.ItemValue.Separator)[0];if(t[n])return n;t[n]=!0}}},t.prototype.setComment=function(){var e=this.convertItemValuesToText();this.comment.value=e},t.prototype.collectNames=function(e,t,o){var i="";return this.names.forEach((function(n){if("itemvalues"===t){if("value"==n)return;var a="text"==n?e.pureText:e[n]}else a=e[n];if(a){for(var s=0;s<o;s++)i+=r.ItemValue.Separator;i+=a,o=1}else o++})),i},t.prototype.convertItemValuesToText=function(){var e=this,t="";return this.choices.forEach((function(o){t&&(t+="\n"),t+=e.collectNames(o,"",0)})),t},t}(Qe),pi=function(e){function t(t,o,i,n){void 0===o&&(o=null),void 0===i&&(i="itemvalue"),void 0===n&&(n=["value","text"]);var r=e.call(this,t,o,i,n)||this;return r.choices=t,r.className=i,r.names=n,r}return z(t,e),t.applyItemValueArray=function(e,t,o){void 0===o&&(o=[]),this.calcBeforeApplyItemsArray(e,t,o);for(var i=0;i<e.length;i++)e[i].value!=t[i].value&&(e[i].value=t[i].value),e[i].text=t[i].hasText?t[i].text:"",o.forEach((function(o){"value"!=o&&"text"!=o&&(e[i][o]=t[i][o])}))},t.prototype.apply=function(){if(this.comment.isEmpty())return!1;if(this.editSurvey.hasErrors(!0))return!1;var e=this.convertTextToItemValues(this.comment.value);return t.applyItemValueArray(this.choices,e,this.names),!0},t.prototype.convertItemValuesToText=function(){var e=this,t="";return this.choices.forEach((function(o){t&&(t+="\n"),t+=o.value,t+=e.collectNames(o,"itemvalues",1)})),t},t}(ci);r.Serializer.addProperty("itemvalue",{name:"icon",isSerializable:!1,readOnly:!0,visibleIndex:0,visibleIf:function(e){return e&&"rateValues"===e.ownerPropertyName&&e.locOwner instanceof r.QuestionRatingModel&&"smileys"==e.locOwner.rateType}});var di=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.getNewColumnName=function(e,t,o){var i=[];if(Array.isArray(e))for(var n=0;n<e.length;n++)i.push(e[n][t]);return h(o,i)},t.prototype.onCreated=function(e,t,o){var i=this;t.onGetValueForNewRowCallBack=function(e){return i.createNewItem(e,o)},this.setupMatrixQuestion(e,t,o)},t.prototype.onSetup=function(e,t,o,i){var n=t;n.allowRowsDragAndDrop&&n.dragDropMatrixRows&&(n.dragDropMatrixRows.onDragStart.add((function(){i.startUndoRedoTransaction()})),n.dragDropMatrixRows.onDragEnd.add((function(){i.stopUndoRedoTransaction()})))},t.prototype.initializeAcceptedTypes=function(e,t){"imagepicker"===e.getType()&&"imageLink"==t.name&&"fileedit"==t.getType()&&(e.registerFunctionOnPropertyValueChanged("contentMode",(function(e){t.acceptedTypes=N(e)})),t.acceptedTypes=N(e.contentMode))},t.prototype.initializePlaceholder=function(e,t,o){var i="function"==typeof e.getType&&e.getType();"text"===t.getType()&&i&&("text"===o&&"itemvalue"===i&&(t.placeholder=new r.ComputedUpdater((function(){return e.value?e.value.toString():e.text}))),"title"===o&&"matrixdropdowncolumn"===i&&(t.placeholder=new r.ComputedUpdater((function(){return e.name?e.name:e.title}))))},t.prototype.onMatrixCellCreated=function(e,t){var o=t.row.editingObj;if(o){var i=t.cellQuestion;i.obj=o,this.initializeAcceptedTypes(e,i),this.initializePlaceholder(o,i,t.columnName),i.property=r.Serializer.findProperty(o.getType(),t.columnName)}},t.prototype.onMatrixCellValueChanged=function(e,t){var o=t.question.getColumnByName(t.columnName);o&&o.isUnique&&t.question.visibleRows.forEach((function(e){if(e!==t.row){var o=e.getQuestionByColumnName(t.columnName);o&&o.errors.length>0&&o.hasErrors()}}))},t.prototype.updateMatixActionsClasses=function(e){e.forEach((function(e){e.innerCss=(e.innerCss||"")+" spg-action-button--muted"}))},t.prototype.onGetMatrixRowAction=function(e,t,o){var i=this,n=t.question,r=t.row,a=t.actions;this.getEditItemAsStandAlone()&&a.push({id:"svd-grid-edit-column",iconName:"icon-edit",title:H.getString("pe.edit"),visibleIndex:0,showTitle:!1,location:"end",action:function(){var e=t.row.editingObj;o(e)}});var s=a.filter((function(e){return"show-detail"===e.id}))[0];Ot(n,a,r),s&&(s.component="sv-action-bar-item",s.iconName=this.getShowDetailActionIconName(r),s.showTitle=!1,s.location="end",s.ariaExpanded=r.isDetailPanelShowing,s.action=function(){r.showHideDetailPanelClick(),s.iconName=r.isDetailPanelShowing?"icon-editing-finish":"icon-edit"},s.visibleIndex=0,s.visible=this.hasPropertiesInDetail,r.onDetailPanelShowingChanged=function(){s.iconName=i.getShowDetailActionIconName(r),s.ariaExpanded=r.isDetailPanelShowing}),this.updateMatixActionsClasses(a)},t.prototype.getShowDetailActionIconName=function(e){return e.isDetailPanelShowing?"icon-editing-finish":"icon-edit"},t.prototype.onGetQuestionTitleActions=function(e,t){var o=t.question;t.titleActions.push({id:"add-item",iconName:"icon-add",title:o.addRowText,showTitle:!1,action:function(){o.addRow()},enabled:new r.ComputedUpdater((function(){return o.canAddRow}))})},t.prototype.createNewItem=function(e,o){var i=this.getBaseValue(o),n=this.getKeyValue();i||(i="item");var a=null;i&&n&&(a=t.getNewColumnName(e.value,n,i));var s=r.Serializer.createClass(this.getDefaultClassName(o),{});a&&(s[n]=a),this.getObjTypeName()&&(s[this.getObjTypeName()]=s.getType());var l=e.obj[o.name];return r.Serializer.isDescendantOf(s.getType(),"itemvalue")&&(s.text=d(l)),l.push(s),l!=e.value&&(e.value=l),s},t.prototype.getDefaultClassName=function(e){return e.className},t.prototype.getBaseValue=function(e){return e.getBaseValue()},t.prototype.getKeyValue=function(){return""},t.prototype.getColumnNames=function(e,t,o){var i=this.getPropertiesNames(e,t,o);return i&&i.length>0?i:this.getDefaultListProperties(t)},t.prototype.getColumnClassName=function(e,t){return t.className},t.prototype.getPropertiesNames=function(e,t,o){for(var i=[],n=this.getDefinedListProperties(e,t,o),r=0;r<n.length;r++)i.push(n[r].name);return 0==i.length&&(i=this.getDefaulColumnNames()),i},t.prototype.getDefinedListProperties=function(e,t,o){if(!t.className)return[];var i=r.Serializer.createClass(t.className);if(!i)return[];var n=new Be(i,o,this.getColumnClassName(e,t),"list",e,t);return 0==n.getTabs().length?[]:n.getTabs()[0].properties},t.prototype.getDefaultListProperties=function(e){var t=[];if(e&&e.className)for(var o=r.Serializer.getProperties(e.className),i=0;i<o.length;i++)this.isPropertyShownInList(o[i])&&t.push(o[i].name);return t.length>0?t:this.getDefaulColumnNames()},t.prototype.getDefaulColumnNames=function(){return[]},t.prototype.isPropertyShownInList=function(e){return e.visible&&"form"!==e.showMode},t.prototype.getObjTypeName=function(){return""},t.prototype.hasDetailPanel=function(){return!this.getEditItemAsStandAlone()},t.prototype.setupMatrixQuestion=function(e,t,o){var i=this;this.hasPropertiesInDetail=this.hasDetailPanel()&&this.calcHasPropertiesInDetail(t,o),t.onHasDetailPanelCallback=function(e){return!1!==e.allowEditRow&&i.hasPropertiesInDetail},t.onCreateDetailPanelRenderedRowCallback=function(e){e.cells=[e.cells[1]],e.cells[0].colSpans+=2};var n=t;if(t.onCreateDetailPanelCallback=function(e,t){new Ge(e.editingObj,n.options,n.obj,n.property).setupObjPanel(t,!0)},t.allowRowsDragAndDrop=this.getAllowRowDragDrop(o)&&!t.isReadOnly,n.options&&this.setupUsingOptions(e,t,n.options,o),o.uniquePropertyName){var r=t.getColumnByName(o.uniquePropertyName);r&&(r.isUnique=!0)}},t.prototype.getAllowRowDragDrop=function(e){return!1},t.prototype.calcHasPropertiesInDetail=function(e,t){if(!t.className)return!0;var o=r.Serializer.createClass(t.className);if(!o)return!0;var i=new r.PanelModel("");return new Ge(o,e.options,e.obj,t).setupObjPanel(i,!0),i.elements.length>0},t.prototype.getJSON=function(e,t,o){return this.getMatrixJSON(e,t,this.getColumnNames(e,t,o),o)},t.prototype.getMatrixJSON=function(e,t,o,i){var n=t.className;n||(n=t.baseClassName);var r=this.getColumnsJSON(e,t,o,i),a={type:"matrixdynamic",detailPanelMode:"underRow",cellType:"text",rowCount:0,columns:r,showHeader:r.length>2,hideColumnsIfEmpty:!0,addRowText:this.getAddRowText(t),keyDuplicationError:H.getString("pe.propertyIsNoUnique"),emptyRowsText:this.getEmptyRowsText(t)};this.getShowDetailPanelOnAdding()&&(a.detailPanelShowOnAdding=!0);var s=this.getMaximumRowCount(e,t,i);return s>0&&(a.maxRowCount=s),a},t.prototype.getEmptyRowsText=function(e){var t="pe.listIsEmpty",o=t+"@"+e.name;return H.hasString(o)&&(t=o),H.getString(t)},t.prototype.getMaximumRowCount=function(e,t,o){return-1},t.prototype.filterPropertyNames=function(e){return e},t.prototype.getColumnsJSON=function(e,t,o,i){var n=t.className;n||(n=t.baseClassName);for(var r=new Ge(e,i).createColumnsJSON(n,this.filterPropertyNames(o)),a=0;a<r.length;a++)"comment"==r[a].cellType&&(r[a].cellType="text");return r},t.prototype.getEditItemAsStandAlone=function(){return!1},t.prototype.getShowDetailPanelOnAdding=function(){return!1},t.prototype.getAddRowText=function(e){var t="pe.addNew@"+e.name;return H.hasString(t)?H.getString(t):H.getString("pe.addNew")},t.prototype.setupUsingOptions=function(e,t,o,i){var n={allowAddRemoveItems:!0,allowRemoveAllItems:!0,showTextView:!0,allowBatchEdit:!0};o.onSetPropertyEditorOptionsCallback(i.name,e,n),n.allowAddRemoveItems||(t.allowAddRows=!1,t.allowRemoveRows=!1),t.allowRemoveAllItems=n.allowRemoveAllItems,t.showTextView=n.showTextView,t.allowBatchEdit=n.allowBatchEdit},t}(Ze),hi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return e.isArray&&r.Serializer.isDescendantOf(e.className,"itemvalue")&&"rateValues"!=e.name},t.prototype.filterPropertyNames=function(e){return e.filter((function(e){return"icon"!=e}))},t.prototype.isPropertyEditorSetupEnabled=function(e,t,o,i){if(!1===o.showTextView)return!1;var n=o.getColumnByName("value"),r=o.value;return!!n&&n.isVisible&&!n.readOnly&&!this.hasMultipleLanguage(r)&&!this.hasVisibleIfOrEnableIf(r)},t.prototype.getAllowRowDragDrop=function(e){return!0},t.prototype.createPropertyEditorSetup=function(e,t,o,i){var n=o.columns.filter((function(e){return!e.readOnly})).map((function(e){return e.name}));return new pi(e[t.name],i,t.className,n)},t.prototype.canClearPropertyValue=function(e,t,o,i){return!1!==o.allowRemoveAllItems},t.prototype.clearPropertyValue=function(e,t,o,i){var n=e[t.name];Array.isArray(n)&&n.splice(0,n.length)},t.prototype.getColumnClassName=function(e,t){return e.getType()+"@"+t.name},t.prototype.getDefaulColumnNames=function(){return["value","text"]},t.prototype.getKeyValue=function(){return"value"},t.prototype.getMatrixJSON=function(t,o,i,n){var r=e.prototype.getMatrixJSON.call(this,t,o,i,n);return"rateValues"===o.name&&"icon"==r.columns[0].name&&(r.showHeader=r.columns>3),r},t.prototype.getMaximumRowCount=function(t,o,i){return"choices"===o.name?i.maximumChoicesCount:"rows"===o.name?i.maximumRowsCount:"columns"===o.name?i.maximumColumnsCount:"rateValues"===o.name?i.maximumRateValues:e.prototype.getMaximumRowCount.call(this,t,o,i)},t.prototype.hasMultipleLanguage=function(e){if(!e||!Array.isArray(e))return!1;for(var t=0;t<e.length;t++)if(e[t].locText.hasNonDefaultText())return!0;return!1},t.prototype.hasVisibleIfOrEnableIf=function(e){if(!e||!Array.isArray(e))return!1;for(var t=0;t<e.length;t++)if(e[t].visibleIf||e[t].enableIf)return!0;return!1},t.prototype.onMatrixCellCreated=function(t,o){function i(e,t){e.html='<div class="spg-smiley-icon"><svg><use xlink:href="#icon-'+t+'"></use></svg></div>'}e.prototype.onMatrixCellCreated.call(this,t,o),t instanceof r.QuestionRatingModel&&"icon"==o.columnName&&(i(o.cellQuestion,o.cellQuestion.value),o.cellQuestion.onPropertyChanged.add((function(e,t){"value"==t.name&&i(e,t.newValue)})))},t.prototype.onMatrixCellValueChanged=function(t,o){e.prototype.onMatrixCellValueChanged.call(this,t,o),t instanceof r.QuestionRatingModel&&"icon"==o.columnName&&(o.cellQuestion.html=o.cellQuestion.value)},t}(di),gi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return e.isArray&&r.Serializer.isDescendantOf(e.className,"itemvalue")&&"rateValues"==e.name},t.prototype.updateAllowAddRemove=function(e,t){e.allowRemoveRows=Jo.allowRemoveForElement(t),e.allowAddRows=Jo.allowAddForElement(t,e.maxRowCount)},t.prototype.onCreated=function(t,o,i){var n=this;e.prototype.onCreated.call(this,t,o,i);var r=o,a=A(t);this.updateAllowAddRemove(r,a),t.onPropertyChanged.add((function(e,t){"rateCount"!=t.name&&"rateDisplayMode"!=t.name||n.updateAllowAddRemove(r,a)}))},t.prototype.onGetQuestionTitleActions=function(t,o){var i=o.titleActions.filter((function(e){return"property-grid-clear"==e.id}))[0];i&&(i.visible=!1),e.prototype.onGetQuestionTitleActions.call(this,t,o)},t.prototype.filterPropertyNames=function(e){return e},t}(hi),mi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"matrixdropdowncolumns"==e.type},t.prototype.getEditItemAsStandAlone=function(){return!0},t.prototype.getDefaulColumnNames=function(){return["name","title"]},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"column"},t.prototype.getMaximumRowCount=function(e,t,o){return o.maximumColumnsCount},t.prototype.getAllowRowDragDrop=function(e){return!0},t}(di),fi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"surveypages"==e.type},t.prototype.onMatrixAllowRemoveRow=function(e,t){var o=t.editingObj;if(o&&o.survey)return o.survey.currentPage!==o},t.prototype.getColumnClassName=function(e,t){return"page@"+e.getType()},t.prototype.getDefaulColumnNames=function(){return["name","title"]},t.prototype.hasDetailPanel=function(){return!1},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"page"},t.prototype.getAllowRowDragDrop=function(e){return!0},t}(di),yi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"calculatedvalues"==e.type},t.prototype.getColumnClassName=function(e,t){return"calculatedvalue@items"},t.prototype.getDefaulColumnNames=function(){return["name"]},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"var"},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t.prototype.setupMatrixQuestion=function(t,o,i){e.prototype.setupMatrixQuestion.call(this,t,o,i),o.isUniqueCaseSensitive=!1},t}(di),vi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"htmlconditions"==e.type},t.prototype.getDefaulColumnNames=function(){return["html"]},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(di),bi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"urlconditions"==e.type},t.prototype.getDefaulColumnNames=function(){return["url"]},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(di),wi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"textitem[]"==e.type},t.prototype.getColumnClassName=function(e,t){return"multipletext@items"},t.prototype.getDefaulColumnNames=function(){return["name"]},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"item"},t.prototype.getAllowRowDragDrop=function(){return!0},t.prototype.createPropertyEditorSetup=function(e,t,o,i){var n=[];return o.columns.forEach((function(e){n.push(e.name)})),new ci(e[t.name],i,t.className,n)},t.prototype.onMatrixCellCreated=function(t,o){e.prototype.onMatrixCellCreated.call(this,t,o);var i=o.cellQuestion;if(o.row.editingObj){var n=o.row.editingObj.editor;n&&i.property&&n.registerFunctionOnPropertyValueChanged(i.property.name,(function(){i.value=n[i.property.name]}))}},t}(di),Ci=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.getColumnsJSON=function(t,o,i,n){var r=e.prototype.getColumnsJSON.call(this,t,o,i,n);return this.getObjTypeName()&&r.unshift({name:this.getObjTypeName(),cellType:"dropdown"}),r},t.prototype.onMatrixCellCreated=function(t,o){e.prototype.onMatrixCellCreated.call(this,t,o);var i=o.cellQuestion;o.columnName===this.getObjTypeName()&&(i.showOptionsCaption=!1,i.choices=this.getChoices(t),i.value=o.row.editingObj.getType())},t.prototype.onMatrixCellValueChanged=function(t,o){if(e.prototype.onMatrixCellValueChanged.call(this,t,o),o.columnName===this.getObjTypeName()){var i=o.question.visibleRows.indexOf(o.row);if(!(i<0)){var n=o.row.isDetailPanelShowing,a=o.row.editingObj.toJSON();delete a.type;var s=r.Serializer.createClass(o.value);s.fromJSON(a),s[this.getObjTypeName()]=s.getType(),o.row.hideDetailPanel(!0),o.question.value.splice(i,1,s),o.row.value=s,n&&o.row.showDetailPanel()}}},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(di),xi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"validators"==e.type},t.prototype.getObjTypeName=function(){return"validatorType"},t.prototype.getDefaultClassName=function(e){return"expressionvalidator"},t.prototype.getChoices=function(e){for(var t=this.getSupportedValidators(e),o=[],i=0;i<t.length;i++){var n=t[i]+"validator";o.push({value:n,text:H.getValidatorName(n)})}return o},t.prototype.getSupportedValidators=function(e){return e?e.getSupportedValidators?e.getSupportedValidators():e.getOriginalObj?this.getSupportedValidators(e.getOriginalObj()):[]:[]},t}(Ci),Ti=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.getAvailableTriggers=function(){return r.Serializer.getChildrenClasses("surveytrigger",!0).filter((function(e){return"visibletrigger"!==e.name}))},t.prototype.fit=function(e){return"triggers"==e.type},t.prototype.getObjTypeName=function(){return"triggerType"},t.prototype.getDefaultClassName=function(e){var t=this.getAvailableTriggers().map((function(e){return e.name}));return t.length?-1!==t.indexOf("runexpressiontrigger")?"runexpressiontrigger":t[0]:e.name},t.prototype.getAllowRowDragDrop=function(e){return!0},t.prototype.getChoices=function(e){return this.getAvailableTriggers().map((function(e){return{value:e.name,text:H.getTriggerName(e.name)}}))},t}(Ci);Fe.register(new hi),Fe.register(new gi),Fe.register(new mi),Fe.register(new fi),Fe.register(new yi),Fe.register(new vi),Fe.register(new bi),Fe.register(new wi),Fe.register(new xi),Fe.register(new Ti),Fe.register({fit:function(e){return"icon"===e.name&&"itemvalue"===e.classInfo.name},getJSON:function(e){return{type:"html"}}});var Si={name:"propertygrid_bindings",showInToolbox:!1,createElements:function(){}};r.ComponentCollection.Instance.getCustomQuestionByName(Si.name)||r.ComponentCollection.Instance.add(Si);var Pi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"bindings"==e.type},t.prototype.getJSON=function(){return{type:"propertygrid_bindings"}},t.prototype.onCreated=function(e,t,o,i){t.contentPanel.fromJSON({elements:this.getQuestions(e,i)}),t.valueFromDataCallback=function(t){if(!t&&e.bindings.getNames().length>0){for(var o={},i=0,n=e.bindings.getNames();i<n.length;i++){var r=n[i];o[r]=e.bindings.getValueNameByPropertyName(r)}return o}return t}},t.prototype.getQuestions=function(e,t){for(var o=[],i=0,n=e.bindings.getNames();i<n.length;i++){var r=n[i];o.push(this.getBindingJSON(r,e,t))}return o},t.prototype.getBindingJSON=function(e,t,o){var i=new r.JsonObjectProperty(null,"value");i.type="questionvalue";var n=Fe.getJSON(t,i,o);return n.titleLocation="left",n.descriptionLocation="hidden",n.minWidth="0px",n.name=e,n.title=H.getPropertyName(e),n},t}(Ze);Fe.register(new Pi);var Ei={name:"propertygrid_restfull",showInToolbox:!1,createElements:function(e){}};r.ComponentCollection.Instance.getCustomQuestionByName(Ei.name)||r.ComponentCollection.Instance.add(Ei);var Oi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"restfull"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"propertygrid_restfull",titleLocation:"hidden"}},t.prototype.onCreated=function(e,t,o,i){new Ge(e[o.name],i,e,o).setupObjPanel(t.contentPanel,!0)},t}(st);Fe.register(new Oi);var Ii=function(e){function t(t,o){void 0===o&&(o=null);var i=e.call(this,o)||this;return i.matrix=t,i.editMatrixValue=i.editSurvey.getQuestionByName("question"),i.buildColumns(),i.buildRows(),i.editMatrix.value=i.matrix.cells.getJson(),i}return z(t,e),t.prototype.getSurveyJSON=function(){return{elements:[{type:"matrixdropdown",name:"question",cellType:"comment"}]}},t.prototype.getSurveyCreationReason=function(){return"cells-editor"},Object.defineProperty(t.prototype,"editMatrix",{get:function(){return this.editMatrixValue},enumerable:!1,configurable:!0}),t.prototype.apply=function(){return this.matrix.cells.setJson(this.editMatrix.value),!0},t.prototype.buildColumns=function(){for(var e=this.matrix.columns,t=0;t<e.length;t++)this.editMatrix.addColumn(""+e[t].value,e[t].text)},t.prototype.buildRows=function(){this.editMatrix.rows.push(new r.ItemValue("default",H.getString("pe.cellsDefaultRow")));for(var e=this.matrix.rows,t=0;t<e.length;t++)this.editMatrix.rows.push(new r.ItemValue(e[t].value,e[t].text))},t}(Qe),Vi=function(e){function t(t,o,i){void 0===i&&(i=null);var n=e.call(this,i,!1)||this;return n.editQuestion=t,n.propertyName=o,n.setupSurvey(),n.question.value=n.getQuestionValue(),n}return z(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.editSurvey.getQuestionByName("question")},enumerable:!1,configurable:!0}),t.prototype.getSurveyJSON=function(){return{elements:[this.getQuestionJSON()]}},t.prototype.getQuestionJSON=function(){var e=this.editQuestion.toJSON();return e.name="question",e.title=e.title||this.editQuestion.name,e.type=this.editQuestion.getType(),"expression"==e.type&&(e.type="text"),e.cellType&&"matrixdropdowncolumn"==e.type&&(e.type=e.cellType,delete e.cellType),re.updateQuestionJson(e),e},t.prototype.getQuestionValue=function(){return this.editQuestion[this.propertyName]},t.prototype.getEditValue=function(){return this.question.value},t.prototype.getSurveyCreationReason=function(){return"default-value"},t.prototype.apply=function(){return this.editQuestion[this.propertyName]=this.getEditValue(),!0},t}(Qe),Ni=function(e){function t(t,o,i){void 0===i&&(i=null);var n=e.call(this,t,o,i)||this;return n.editQuestion=t,n.propertyName=o,n}return z(t,e),t.prototype.getQuestionValue=function(){var t=e.prototype.getQuestionValue.call(this);return t?(Array.isArray(t)||(t=[t]),t):t},t.prototype.getEditValue=function(){var t=e.prototype.getEditValue.call(this);return t&&Array.isArray(t)?0==t.length?null:t[0]:t},t}(Vi),Ai=function(e){function t(t,o,i){void 0===i&&(i=null);var n=e.call(this,t,o,i)||this;return n.editQuestion=t,n.propertyName=o,n}return z(t,e),t.prototype.getQuestionJSON=function(){var t=e.prototype.getQuestionJSON.call(this);return t.type="matrixdynamic",t.rowCount=1,t.minRowCount=1,t.maxRowCount=1,t.columnsLocation="vertical",t},t}(Ni),_i=function(e){function t(t,o,i){void 0===i&&(i=null);var n=e.call(this,t,o,i)||this;return n.editQuestion=t,n.propertyName=o,n}return z(t,e),t.prototype.getQuestionJSON=function(){var t=e.prototype.getQuestionJSON.call(this);return t.panelCount=1,t.minPanelCount=1,t.maxPanelCount=1,t},t}(Ni),ji=function(e){function t(t,o,i,n){void 0===n&&(n=null);var r=e.call(this,t,i,n)||this;return r.editQuestion=t,r.editObj=o,r.propertyName=i,r.question.value=r.getQuestionValue(),r}return z(t,e),t.prototype.getQuestionValue=function(){return this.editObj?this.editObj[this.propertyName]:null},t.prototype.apply=function(){return this.editObj[this.propertyName]=this.question.value,!0},t}(Vi),Li=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onCreated=function(e,o,i,n){var r=o;r.isClickableCallback=function(){return!r.isReadOnly||!t.isValueEmpty(r.value)},r.linkClickCallback=function(){t.showModalPropertyEditor(t,i,o,n,(function(){return r.isSelected=!1})),r.isSelected=!0},r.clearClickCallback=function(){t.clearPropertyValue(o.obj,i,o,null)}},t}return z(t,e),t.prototype.getJSON=function(e,t,o){return{type:"linkvalue",showValueInLink:!1,titleLocation:"hidden"}},t.prototype.clearPropertyValue=function(e,t,o,i){e[t.name]=void 0},t.prototype.isValueEmpty=function(e){return r.Helpers.isValueEmpty(e)},t.prototype.isSupportGrouping=function(){return!0},t}(Ze),ki=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"cells"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,i){return new Ii(e,i)},t.prototype.clearPropertyValue=function(e,t,o,i){e.cells.setJson(null)},t.prototype.isValueEmpty=function(e){return!e||r.Helpers.isValueEmpty(e.values)},t}(Li),Mi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"value"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,i){return new Vi(e,t.name,i)},t}(Li),Di=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"rowvalue"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,i){return new Ai(e,t.name,i)},t}(Li),Ri=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"panelvalue"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,i){return new _i(e,t.name,i)},t}(Li),Bi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e){return"triggervalue"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,i){var n=o.obj,r=this.getSetToNameQuestion(n);return new ji(r,n,t.name,i)},t.prototype.getSetToNameQuestion=function(e){var t=e.getSurvey();return t||(t=e.owner),e.setToName&&t?t.getQuestionByValueName(e.setToName):null},t}(Li),qi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.fit=function(e,t){return"logic"===t&&"triggervalue"==e.type},t.prototype.getJSON=function(e,t,o){var i=this.getSetToNameQuestion(e);if(!i)return{type:"linkvalue"};var n=i.toJSON();return n.type=i.getType(),re.updateQuestionJson(n),n},t}(Bi);Fe.register(new ki),Fe.register(new Mi),Fe.register(new Di),Fe.register(new Ri),Fe.register(new Bi),Fe.register(new qi);var Hi,Qi=o(32);r.SvgRegistry.registerIconsFromFolder(Qi),Hi="1.9.99",o(3),o(121),o(122),o(123),o(124),o(125),o(2),o(126),o(127),o(128),o(129),o(130),r.settings.supportCreatorV2=!0,Object(r.checkLibraryVersion)("1.9.99","survey-creator-core")}])}));
|