survey-creator-core 1.9.81 → 1.9.83

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator v1.9.81
2
+ * SurveyJS Creator v1.9.83
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,s={parse:function(o,i){var a=(i=i||{}).dynamicTyping||!1;if(C(a)&&(i.dynamicTypingFunction=a,a={}),i.dynamicTyping=a,i.transform=!!C(i.transform)&&i.transform,i.worker&&s.WORKERS_SUPPORTED){var l=function(){if(!s.WORKERS_SUPPORTED)return!1;var o,i,a=(o=t.URL||t.webkitURL||null,i=e.toString(),s.BLOB_URL||(s.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(a);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 s.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 c(i)):!0===o.readable&&C(o.read)&&C(o.on)?h=new d(i):(t.File&&o instanceof File||o instanceof Object)&&(h=new p(i)),h.stream(o)},unparse:function(e,t){var o=!1,i=!0,n=",",r="\r\n",a='"',l=a+a,u=!1,p=null,c=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||s.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&&(a=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");p=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+a),("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(c=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/)}}();var d=new RegExp(g(a),"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(p||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||p),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 s="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var a=Array.isArray(e)&&0<e.length,l=!Array.isArray(t[0]);if(a&&i){for(var u=0;u<e.length;u++)0<u&&(s+=n),s+=m(e[u],u);0<t.length&&(s+=r)}for(var p=0;p<t.length;p++){var c=a?e.length:t[p].length,d=!1,h=a?0===Object.keys(t[p]).length:0===t[p].length;if(o&&!a&&(d="greedy"===o?""===t[p].join("").trim():1===t[p].length&&0===t[p][0].length),"greedy"===o&&a){for(var g=[],f=0;f<c;f++){var y=l?e[f]:f;g.push(t[p][y])}d=""===g.join("").trim()}if(!d){for(var v=0;v<c;v++){0<v&&!h&&(s+=n);var b=a&&l?e[v]:v;s+=m(t[p][b],v)}p<t.length-1&&(!o||0<c&&!h)&&(s+=r)}}return s}function m(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);var i=!1;c&&"string"==typeof e&&c.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,s.BAD_DELIMITERS)||-1<r.indexOf(n)||" "===r.charAt(0)||" "===r.charAt(r.length-1))?a+r+a:r}}};if(s.RECORD_SEP=String.fromCharCode(30),s.UNIT_SEP=String.fromCharCode(31),s.BYTE_ORDER_MARK="\ufeff",s.BAD_DELIMITERS=["\r","\n",'"',s.BYTE_ORDER_MARK],s.WORKERS_SUPPORTED=!o&&!!t.Worker,s.NODE_STREAM_INPUT=1,s.LocalChunkSize=10485760,s.RemoteChunkSize=5242880,s.DefaultDelimiter=",",s.Parser=m,s.ParserHandle=h,s.NetworkStreamer=u,s.FileStreamer=p,s.StringStreamer=c,s.ReadableStreamStreamer=d,t.jQuery){var a=t.jQuery;a.fn.parse=function(e){var o=e.config||{},i=[];return this.each((function(e){if("INPUT"!==a(this).prop("tagName").toUpperCase()||"file"!==a(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:a.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=a.extend(l.instanceConfig,u.config))}else if("skip"===u)return void r()}var p=l.instanceConfig.complete;l.instanceConfig.complete=function(e){C(p)&&p(e,l.file,l.inputElem),r()},s.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 a=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var l=a.meta.cursor;this._finished||(this._partialLine=r.substring(l-this._baseIndex),this._baseIndex=l),a&&a.data&&(this._rowCount+=a.data.length);var u=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(i)t.postMessage({results:a,workerId:s.WORKER_ID,finished:u});else if(C(this._config.chunk)&&!o){if(this._config.chunk(a,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);a=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(a.data),this._completeResults.errors=this._completeResults.errors.concat(a.errors),this._completeResults.meta=a.meta),this._completed||!u||!C(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),u||a&&a.meta.paused||this._nextChunk(),a}this._halted=!0},this._sendError=function(e){C(this._config.error)?this._config.error(e):i&&this._config.error&&t.postMessage({workerId:s.WORKER_ID,error:e,finished:!1})}}function u(e){var t;(e=e||{}).chunkSize||(e.chunkSize=s.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 p(e){var t,o;(e=e||{}).chunkSize||(e.chunkSize=s.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 c(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,a=/^\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,p=0,c=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,S())x();else{if(x(),0===y.data.length)return;p+=t.data.length,e.preview&&p>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 '"+s.DefaultDelimiter+"'"),i=!1),e.skipEmptyLines&&(y.data=y.data.filter((function(e){return!w(e)}))),S()&&function(){if(y)if(Array.isArray(y.data[0])){for(var t=0;S()&&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,s=t[i];e.header&&(r=i>=f.length?"__parsed_extra":f[i]),e.transform&&(s=e.transform(s,r)),s=T(r,s),"__parsed_extra"===r?(n[r]=n[r]||[],n[r].push(s)):n[r]=s}return e.header&&(i>f.length?P("FieldMismatch","TooManyFields","Too many fields: expected "+f.length+" fields but parsed "+i,c+o):i<f.length&&P("FieldMismatch","TooFewFields","Too few fields: expected "+f.length+" fields but parsed "+i,c+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),c+=o,y}()}function S(){return e.header&&0===f.length}function T(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(a.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,a){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 s=0,a=0;a<i.length;a++)"\n"===i[a][0]&&s++;return s>=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 a,l,u,p;r=r||[",","\t","|",";",s.RECORD_SEP,s.UNIT_SEP];for(var c=0;c<r.length;c++){var d=r[c],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===p||p<g)&&1.99<g&&(l=h,a=d,p=g)}return{successful:!!(e.delimiter=a),bestDelimiter:a}}(n,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);u.successful?e.delimiter=u.bestDelimiter:(i=!0,e.delimiter=s.DefaultDelimiter),y.meta.delimiter=e.delimiter}var p=b(e);return e.preview&&e.header&&p.preview++,t=n,o=new m(p),y=o.parse(t,r,a),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,a=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<s.BAD_DELIMITERS.indexOf(o))&&(o=","),n===o)throw new Error("Comment character same as delimiter");!0===n?n="#":("string"!=typeof n||-1<s.BAD_DELIMITERS.indexOf(n))&&(n=!1),"\n"!==i&&"\r"!==i&&"\r\n"!==i&&(i="\n");var p=0,c=!1;this.parse=function(s,d,h){if("string"!=typeof s)throw new Error("Input must be a string");var m=s.length,f=o.length,y=i.length,v=n.length,b=C(r),w=[],x=[],S=[],T=p=0;if(!s)return G();if(e.header&&!d){var P=s.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 _=N,A=O[N]||0;for(0<A&&(I=!0,_=N+"_"+A),O[N]=A+1;E.includes(_);)_=_+"_"+A;E.push(_)}if(I){var L=s.split(i);L[0]=E.join(o),s=L.join(i)}}if(l||!1!==l&&-1===s.indexOf(t)){for(var M=s.split(i),j=0;j<M.length;j++){if(S=M[j],p+=S.length,j!==M.length-1)p+=i.length;else if(h)return G();if(!n||S.substring(0,v)!==n){if(b){if(w=[],Q(S.split(o)),J(),c)return G()}else Q(S.split(o));if(a&&a<=j)return w=w.slice(0,a),G(!0)}}return G()}for(var D=s.indexOf(o,p),R=s.indexOf(i,p),k=new RegExp(g(u)+g(t),"g"),q=s.indexOf(t,p);;)if(s[p]!==t)if(n&&0===S.length&&s.substring(p,p+v)===n){if(-1===R)return G();p=R+y,R=s.indexOf(i,p),D=s.indexOf(o,p)}else if(-1!==D&&(D<R||-1===R))S.push(s.substring(p,D)),p=D+f,D=s.indexOf(o,p);else{if(-1===R)break;if(S.push(s.substring(p,R)),Z(R+y),b&&(J(),c))return G();if(a&&w.length>=a)return G(!0)}else for(q=p,p++;;){if(-1===(q=s.indexOf(t,q+1)))return h||x.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:w.length,index:p}),U();if(q===m-1)return U(s.substring(p,q).replace(k,t));if(t!==u||s[q+1]!==u){if(t===u||0===q||s[q-1]!==u){-1!==D&&D<q+1&&(D=s.indexOf(o,q+1)),-1!==R&&R<q+1&&(R=s.indexOf(i,q+1));var H=F(-1===R?D:Math.min(D,R));if(s.substr(q+1+H,f)===o){S.push(s.substring(p,q).replace(k,t)),s[p=q+1+H+f]!==t&&(q=s.indexOf(t,p)),D=s.indexOf(o,p),R=s.indexOf(i,p);break}var B=F(R);if(s.substring(q+1+B,q+1+B+y)===i){if(S.push(s.substring(p,q).replace(k,t)),Z(q+1+B+y),D=s.indexOf(o,p),q=s.indexOf(t,p),b&&(J(),c))return G();if(a&&w.length>=a)return G(!0);break}x.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:w.length,index:p}),q++}}else q++}return U();function Q(e){w.push(e),T=p}function F(e){var t=0;if(-1!==e){var o=s.substring(q+1,e);o&&""===o.trim()&&(t=o.length)}return t}function U(e){return h||(void 0===e&&(e=s.substring(p)),S.push(e),p=m,Q(S),b&&J()),G()}function Z(e){p=e,Q(S),S=[],R=s.indexOf(i,p)}function G(e){return{data:w,errors:x,meta:{delimiter:o,linebreak:i,aborted:c,truncated:!!e,cursor:T+(d||0)}}}function J(){r(G()),w=[],x=[]}},this.abort=function(){c=!0},this.getCharIndex=function(){return p}}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 s=0;s<t.results.data.length&&(o.userStep({data:t.results.data[s],errors:t.results.errors,meta:t.results.meta},r),!i);s++);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===s.WORKER_ID&&o&&(s.WORKER_ID=o.workerId),"string"==typeof o.input)t.postMessage({workerId:s.WORKER_ID,results:s.parse(o.input,o.config),finished:!0});else if(t.File&&o.input instanceof File||o.input instanceof Object){var i=s.parse(o.input,o.config);i&&t.postMessage({workerId:s.WORKER_ID,results:i,finished:!0})}}),(u.prototype=Object.create(l.prototype)).constructor=u,(p.prototype=Object.create(l.prototype)).constructor=p,(c.prototype=Object.create(c.prototype)).constructor=c,(d.prototype=Object.create(l.prototype)).constructor=d,s})?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,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":30,"./add.svg":31,"./add_16x16.svg":32,"./apply.svg":33,"./arrow-down.svg":34,"./arrow-left.svg":35,"./arrow-left_16x16.svg":36,"./arrow-right.svg":37,"./arrow-right_16x16.svg":38,"./arrow-up.svg":39,"./boolean.svg":40,"./change-question-type_16x16.svg":41,"./checkbox.svg":42,"./checked.svg":43,"./clear.svg":44,"./clear_16x16.svg":45,"./collapse-detail-light_16x16.svg":46,"./collapse-detail_16x16.svg":47,"./collapse-panel.svg":48,"./collapse_16x16.svg":49,"./comment.svg":50,"./default.svg":51,"./delete_16x16.svg":52,"./description-hide.svg":53,"./description.svg":54,"./device-desktop.svg":55,"./device-phone.svg":56,"./device-rotate.svg":57,"./device-tablet.svg":58,"./download.svg":59,"./drag-area-indicator.svg":60,"./drag-area-indicator_24x16.svg":61,"./drop-down-arrow.svg":62,"./drop-down-arrow_16x16.svg":63,"./dropdown.svg":64,"./duplicate_16x16.svg":65,"./edit.svg":66,"./edit_16x16.svg":67,"./editing-finish.svg":68,"./expand-detail-light_16x16.svg":69,"./expand-detail_16x16.svg":70,"./expand-panel.svg":71,"./expand_16x16.svg":72,"./export.svg":73,"./expression.svg":74,"./fast-entry.svg":75,"./file.svg":76,"./html.svg":77,"./image.svg":78,"./imagepicker.svg":79,"./import.svg":80,"./invisible-items.svg":81,"./keyboard-dragging.svg":82,"./language.svg":83,"./load.svg":84,"./logic-collapse.svg":85,"./logic-expand.svg":86,"./logo.svg":87,"./matrix.svg":88,"./matrixdropdown.svg":89,"./matrixdynamic.svg":90,"./multipletext.svg":91,"./next_16x16.svg":92,"./panel.svg":93,"./paneldynamic.svg":94,"./preview.svg":95,"./previous_16x16.svg":96,"./radiogroup.svg":97,"./ranking.svg":98,"./rating.svg":99,"./redo.svg":100,"./remove_16x16.svg":101,"./save.svg":102,"./select-page.svg":103,"./settings.svg":104,"./settings_16x16.svg":105,"./signaturepad.svg":106,"./switch-active_16x16.svg":107,"./switch-inactive_16x16.svg":108,"./tagbox.svg":109,"./text.svg":110,"./theme.svg":111,"./toolbox.svg":112,"./undo.svg":113,"./visible.svg":114,"./wizard.svg":115};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=29},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 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="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 ri})),o.d(t,"enStrings",(function(){return n})),o.d(t,"editorLocalization",(function(){return N})),o.d(t,"defaultStrings",(function(){return A})),o.d(t,"localization",(function(){return N})),o.d(t,"QuestionConvertMode",(function(){return i})),o.d(t,"settings",(function(){return s})),o.d(t,"EmptySurveyCreatorOptions",(function(){return a})),o.d(t,"CreatorAction",(function(){return Bt})),o.d(t,"TabbedMenuItem",(function(){return Qt})),o.d(t,"TabbedMenuContainer",(function(){return Ft})),o.d(t,"ToolbarActionContainer",(function(){return Ut})),o.d(t,"CreatorEvent",(function(){return Zt})),o.d(t,"CreatorBase",(function(){return Gt})),o.d(t,"SurveyCreatorModel",(function(){return Jt})),o.d(t,"StylesManager",(function(){return zt})),o.d(t,"initializeDesignTimeSurveyModel",(function(){return Wt})),o.d(t,"editableStringRendererName",(function(){return Xt})),o.d(t,"getElementWrapperComponentName",(function(){return Yt})),o.d(t,"getQuestionContentWrapperComponentName",(function(){return $t})),o.d(t,"getElementWrapperComponentData",(function(){return eo})),o.d(t,"getItemValueWrapperComponentName",(function(){return to})),o.d(t,"getItemValueWrapperComponentData",(function(){return oo})),o.d(t,"isStringEditable",(function(){return io})),o.d(t,"isTextInput",(function(){return no})),o.d(t,"registerAdorner",(function(){return ro})),o.d(t,"removeAdorners",(function(){return so})),o.d(t,"CreatorResponsivityManager",(function(){return Vt})),o.d(t,"EmbedModel",(function(){return J})),o.d(t,"TabEmbedPlugin",(function(){return z})),o.d(t,"AceJsonEditorModel",(function(){return X})),o.d(t,"TabJsonEditorAcePlugin",(function(){return Y})),o.d(t,"JsonEditorBaseModel",(function(){return W})),o.d(t,"TabJsonEditorBasePlugin",(function(){return K})),o.d(t,"TextareaJsonEditorModel",(function(){return $})),o.d(t,"TabJsonEditorTextareaPlugin",(function(){return ee})),o.d(t,"TestSurveyTabViewModel",(function(){return ne})),o.d(t,"TabTestPlugin",(function(){return re})),o.d(t,"initLogicOperator",(function(){return me})),o.d(t,"LogicEvent",(function(){return fe})),o.d(t,"SurveyLogic",(function(){return ye})),o.d(t,"TranslationItemBase",(function(){return ze})),o.d(t,"TranslationItemString",(function(){return We})),o.d(t,"TranslationItem",(function(){return Ke})),o.d(t,"TranslationGroup",(function(){return Xe})),o.d(t,"Translation",(function(){return Ye})),o.d(t,"translationCss",(function(){return Je})),o.d(t,"TabTranslationPlugin",(function(){return $e})),o.d(t,"initialSettingsAllowShowEmptyTitleInDesignMode",(function(){return Et})),o.d(t,"TabDesignerViewModel",(function(){return Ot})),o.d(t,"TabDesignerPlugin",(function(){return It})),o.d(t,"SurveyLogicUI",(function(){return ct})),o.d(t,"TabLogicPlugin",(function(){return dt})),o.d(t,"logicCss",(function(){return et})),o.d(t,"ToolboxToolViewModel",(function(){return ao})),o.d(t,"PageNavigatorViewModel",(function(){return lo})),o.d(t,"PageAdorner",(function(){return po})),o.d(t,"RowViewModel",(function(){return co})),o.d(t,"QuestionAdornerViewModel",(function(){return ho})),o.d(t,"QuestionDropdownAdornerViewModel",(function(){return go})),o.d(t,"QuestionImageAdornerViewModel",(function(){return mo})),o.d(t,"QuestionRatingAdornerViewModel",(function(){return fo})),o.d(t,"ItemValueWrapperViewModel",(function(){return yo})),o.d(t,"ImageItemValueWrapperViewModel",(function(){return vo})),o.d(t,"MatrixCellWrapperEditSurvey",(function(){return bo})),o.d(t,"MatrixCellWrapperViewModel",(function(){return wo})),o.d(t,"SurveySimulatorModel",(function(){return te})),o.d(t,"DEFAULT_MONITOR_DPI",(function(){return oe})),o.d(t,"simulatorDevices",(function(){return ie})),o.d(t,"SurveyResultsItemModel",(function(){return Co})),o.d(t,"SurveyResultsModel",(function(){return So})),o.d(t,"LogoImageViewModel",(function(){return To})),o.d(t,"StringItemsNavigatorBase",(function(){return Lt})),o.d(t,"StringEditorConnector",(function(){return qt})),o.d(t,"StringEditorViewModelBase",(function(){return Ht})),o.d(t,"QuestionEmbeddedSurveyModel",(function(){return Po})),o.d(t,"QuestionLinkValueModel",(function(){return Eo})),o.d(t,"EditorLocalization",(function(){return V})),o.d(t,"getLocString",(function(){return _})),o.d(t,"SurveyJSON5",(function(){return j})),o.d(t,"setSurveyJSONForPropertyGrid",(function(){return Pe})),o.d(t,"PropertyEditorSetupValue",(function(){return Ee})),o.d(t,"PropertyGridEditorCollection",(function(){return Oe})),o.d(t,"PropertyGridTitleActionsCreator",(function(){return Ie})),o.d(t,"PropertyJSONGenerator",(function(){return Ve})),o.d(t,"PropertyGridModel",(function(){return Ne})),o.d(t,"PropertyGridEditor",(function(){return _e})),o.d(t,"PropertyGridEditorBoolean",(function(){return Ae})),o.d(t,"PropertyGridEditorStringBase",(function(){return Le})),o.d(t,"PropertyGridEditorString",(function(){return Me})),o.d(t,"PropertyGridEditorNumber",(function(){return je})),o.d(t,"PropertyGridEditorImageSize",(function(){return De})),o.d(t,"PropertyGridEditorText",(function(){return Re})),o.d(t,"PropertyGridEditorHtml",(function(){return ke})),o.d(t,"PropertyGridEditorColor",(function(){return qe})),o.d(t,"PropertyGridEditorStringArray",(function(){return He})),o.d(t,"PropertyGridEditorDropdown",(function(){return Be})),o.d(t,"PropertyGridEditorSet",(function(){return Qe})),o.d(t,"PropertyGridEditorPage",(function(){return Fe})),o.d(t,"PropertyGridEditorQuestion",(function(){return Ue})),o.d(t,"PropertyGridEditorQuestionSelectBase",(function(){return Ze})),o.d(t,"PropertyGridEditorQuestionValue",(function(){return Ge})),o.d(t,"PropertyGridEditorExpression",(function(){return Oo})),o.d(t,"PropertyGridEditorCondition",(function(){return Io})),o.d(t,"PropertyGridEditorMatrix",(function(){return _o})),o.d(t,"PropertyGridEditorMatrixItemValues",(function(){return Ao})),o.d(t,"PropertyGridEditorMatrixColumns",(function(){return Lo})),o.d(t,"PropertyGridEditorMatrixPages",(function(){return Mo})),o.d(t,"PropertyGridEditorMatrixCalculatedValues",(function(){return jo})),o.d(t,"PropertyGridEditorMatrixHtmlConditions",(function(){return Do})),o.d(t,"PropertyGridEditorMatrixUrlConditions",(function(){return Ro})),o.d(t,"PropertyGridEditorMatrixMutlipleTextItems",(function(){return ko})),o.d(t,"PropertyGridEditorMatrixMultipleTypes",(function(){return qo})),o.d(t,"PropertyGridEditorMatrixValidators",(function(){return Ho})),o.d(t,"PropertyGridEditorMatrixTriggers",(function(){return Bo})),o.d(t,"PropertyGridEditorBindings",(function(){return Fo})),o.d(t,"PropertyGridViewModel",(function(){return Tt})),o.d(t,"ObjectSelectorItem",(function(){return Ct})),o.d(t,"ObjectSelector",(function(){return xt})),o.d(t,"ObjectSelectorModel",(function(){return St})),o.d(t,"PropertyGridEditorQuestionRestfull",(function(){return Zo})),o.d(t,"PropertyGridValueEditorBase",(function(){return Yo})),o.d(t,"PropertyGridCellsEditor",(function(){return $o})),o.d(t,"PropertyGridValueEditor",(function(){return ei})),o.d(t,"PropertyGridRowValueEditor",(function(){return ti})),o.d(t,"PropertyGridPanelValueEditor",(function(){return oi})),o.d(t,"PropertyGridTriggerValueEditor",(function(){return ii})),o.d(t,"PropertyGridTriggerValueInLogicEditor",(function(){return ni})),o.d(t,"propertyGridCss",(function(){return Z})),o.d(t,"QuestionConverter",(function(){return q})),o.d(t,"svgBundle",(function(){})),o.d(t,"SurveyTextWorker",(function(){return Q})),o.d(t,"QuestionToolboxCategory",(function(){return D})),o.d(t,"QuestionToolboxItem",(function(){return R})),o.d(t,"QuestionToolbox",(function(){return k})),o.d(t,"SidebarModel",(function(){return At})),o.d(t,"SidebarTabModel",(function(){return Nt})),o.d(t,"getNextItemValue",(function(){return c})),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 S})),o.d(t,"copyCssClasses",(function(){return T})),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,"SurveyQuestionEditorDefinition",(function(){return we})),o.d(t,"ObjType",(function(){return H})),o.d(t,"SurveyHelper",(function(){return F})),o.d(t,"ResizeManager",(function(){return _t})),o.d(t,"UndoRedoPlugin",(function(){return vt})),o.d(t,"undoRedoTransaction",(function(){return bt})),o.d(t,"ignoreUndoRedo",(function(){return wt})),o.d(t,"UndoRedoManager",(function(){return ht})),o.d(t,"Transaction",(function(){return gt})),o.d(t,"UndoRedoAction",(function(){return mt})),o.d(t,"UndoRedoArrayAction",(function(){return ft})),o.d(t,"PagesController",(function(){return Pt}));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:"Checkbox",comment:"Comment",imagepicker:"Image Picker",ranking:"Ranking",image:"Image",dropdown:"Dropdown",tagbox:"Tag Box",file:"File",html:"HTML",matrix:"Single-Choice Matrix",matrixdropdown:"Multiple-Choice Matrix",matrixdynamic:"Dynamic Matrix",multipletext:"Multiple Text",panel:"Panel",paneldynamic:"Dynamic Panel",radiogroup:"Radiogroup",rating:"Rating",text:"Single Input",boolean:"Boolean",expression:"Expression (read-only)",signaturepad:"Signature Pad",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",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",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...",bold:"Bold",italic:"Italic",underline:"Underline",addNewQuestion:"Add Question",selectPage:"Select page...",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.",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_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).",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",propertyIsEmpty:"Please enter a value",propertyIsNoUnique:"Please enter a unique value",propertyNameIsNotUnique:"Please enter a unique name",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",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",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 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",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"},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"}},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.",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",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"}},r=o(0);!function(e){e[e.AllTypes=0]="AllTypes",e[e.CompatibleTypes=1]="CompatibleTypes"}(i||(i={}));var s={translation:{sortByName:!1,exportPrefix:"",maximumSelectedLocales:7,exportFileName:"survey_translation.csv"},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:{defaultOperator:"equal",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:{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:{imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/lion.jpg"}}},notifications:{lifetime:2e3},autoSave:{delay:500},dragDrop:{restrictDragQuestionBetweenPages:!1},layout:{showTabs:!0,showToolbar:!0,allowCollapseSidebar:!0},jsonEditor:{indentation:1}},a=function(){function e(){this.isMobileView=!1,this.allowEditExpressionsInTextEditor=!0,this.maximumColumnsCount=s.propertyGrid.maximumColumnsCount,this.maximumChoicesCount=s.propertyGrid.maximumChoicesCount,this.maximumRowsCount=s.propertyGrid.maximumRowsCount,this.maximumRateValues=s.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}();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 p(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 c(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,s=t.length-1;s>=0;s--)if(t[s]){var a=t[s].toString();if(n=l(a)){r=a.lastIndexOf(n),i=t[s];break}}if(r>-1){var c,d=parseInt(n),h=i===d;do{if(h)c=++d;else{for(var g=(d++).toString();n.length>g.length;)g="0"+g;c=a.substring(0,r)+g+a.substring(r+n.length)}}while(p(t,c));return c}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 S(e,t){for(var o in t){var i=t[o];"object"==typeof i&&(i={},this.copyObject(i,t[o])),e[o]=i}}function T(e,t){t&&("string"==typeof t||t instanceof String?e.root=t:S(e,t))}function P(e,t){T(e,r.defaultV2Css.question),T(e,r.defaultV2Css[t])}function E(e){return s.logic.openBracket+e+s.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=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,s=0;s<n.length;s++)if(!(r=r[n[s]])&&""!==r)return o===i?n[s]: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]):N.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 s=r.Serializer.findClass(e),a=[],l=void 0;s;){var u=s.name;if(l=t[e])break;if(a.push(u),n[u]){l={props:n[u],parent:this.getObjInEditorByType(s.parentName,t,o)};break}if(!s.parentName)break;s=r.Serializer.findClass(s.parentName)}for(var p=0;p<a.length;p++)t[a[p]]=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,s=function(t){return!(t>=e.length)&&e[t].toUpperCase()===e[t]};for(i=1;i<e.length;i++){!r&&s(i)&&(n+=" "),n+=!r&&!s(i+1)?e[i].toLowerCase():e[i],r=s(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]:A;return t||(t=A),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=A[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}(),N=new V;function _(e,t){return void 0===t&&(t=null),N.getString(e,t)}r.surveyLocalization.onGetExternalString=function(e,t){var o=N.getString(e,t);return o!==e?o:""};var A=n,L=function(e,t,o,i){var n,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,o,s):n(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};Object.assign;function M(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 j=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,s=o[i];if(s&&"object"==typeof s)for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(void 0!==(r=e(s,n))?s[n]=r:delete s[n]);return t.call(o,i,s)}({"":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 s=0;s<r.length;s++)n=this.internalStringify(r,s,!1),i+=this.makeIndent(this.indentStr,this.objStack.length),i+=null==n?"null":n,s<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 a=!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),a=!0,i+=(this.isWord(l)?l:this.escapeString(l))+":"+(this.indentStr?" ":"")+u+","}this.objStack.pop(),i=a?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}(),D=function(e){function t(t){var o=e.call(this)||this;return o.toolbox=t,o}return M(t,e),t.prototype.toggleState=function(){this.toolbox&&this.toolbox.toggleCategoryState(this.name)},L([Object(r.property)()],t.prototype,"name",void 0),L([Object(r.propertyArray)()],t.prototype,"items",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"collapsed",void 0),t}(r.Base),R=function(e){function t(t){var o=e.call(this,t)||this;return o.item=t,o}return M(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 M(t,e),t.getQuestionDefaultSettings=function(e){if(s.toolbox&&s.toolbox.defaultJSON)return s.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]=_("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 s=this.copiedItems;this.copiedItemMaxCount>0&&s.length==this.copiedItemMaxCount&&this.removeItem(s[this.copiedItemMaxCount-1].name),this.addItem(r)}},t.prototype.getActionByItem=function(e){return e instanceof R?e:(e.iconName=e.iconName?e.iconName:t.defaultIconName,new R(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=N.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:N.getString("ed.toolboxGeneralCategory");if(!t[r]){var s=this.createCategory();s.name=r,s.collapsed=r!==o&&!this.keepAllCategoriesExpanded,t[r]=s,e.push(s)}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 a=[];this.categories.forEach((function(e){a=a.concat(e.items)})),this.actions=a,this.hasCategories=e.length>1,this.updateItemSeparators(),this.raiseUpdate(!1)},t.prototype.createCategory=function(){return new D(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 s=o[n],a=r.ElementFactory.Instance.createElement(s,"q1");a||(a=r.Serializer.createClass(s));var l=this.getQuestionJSON(a),u=N.getString("qt."+s),p={id:s,name:s,iconName:"icon-"+s,title:u,tooltip:u,json:l,isCopied:!1,category:i[s]||""};this.actions.push(this.getActionByItem(p))}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=N.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 s=e.category?e.category:"",a=new r.Action({id:e.name,name:e.name,iconName:o,title:i,tooltip:i,json:n,isCopied:!1,category:s}),l=this.getActionByItem(a),u=this.getActionById(a.id);if(u)this.actions.splice(this.actions.indexOf(u),1,l);else{var p=Array.isArray(this.supportedQuestions)?this.supportedQuestions.indexOf(a.id):-1;p>-1?this.actions.splice(p,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.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 s=this.orderedQuestions[n];e.indexOf(s)>-1&&o.indexOf(s)>-1&&i.push(s)}for(n=0;n<e.length;n++){var a=e[n];i.indexOf(a)<0&&t.hiddenTypes.indexOf(a)<0&&o.indexOf(a)>-1&&i.push(a)}return i},t.prototype.dispose=function(){},t.hiddenTypes=["buttongroup","linkvalue","embeddedsurvey"],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"]},L([Object(r.property)({defaultValue:!1})],t.prototype,"showCategoryTitlesValue",void 0),L([Object(r.propertyArray)()],t.prototype,"categories",void 0),L([Object(r.property)({defaultValue:"",onSet:function(e,t){t.onActiveCategoryChanged(e)}})],t.prototype,"activeCategory",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"hasCategories",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"canCollapseCategories",void 0),L([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),L([Object(r.property)()],t.prototype,"forceCompact",void 0),t}(r.AdaptiveActionContainer),q=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 a=s.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 s=r.CustomWidgetCollection.Instance.widgets;for(n=0;n<s.length;n++)(t||s[n].name!==e)&&i.push(s[n].name);return i}(t,n):e.convertInfo[t];if(!a)return[];if(Array.isArray(o)&&o.length>0){var l=[];a.forEach((function(e){return l.push(e)})),a=o.filter((function(e){return l.indexOf(e)>=0}))}return a||[]},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),s=r.QuestionFactory.Instance.createQuestion(o,t.name);s||(s=r.Serializer.createClass(o,{})),s instanceof r.QuestionSelectBase&&(null==n?void 0:n.choices)&&(s.choices=null),s.name=t.name;var a=s.toJSON(),l=t.toJSON();for(var u in l)a[u]=l[u];e.updateJSON(a,o,t.getType(),i),s.fromJSON(a);var p=t.parent,c=p.elements.indexOf(t);return p.isConverting=!0,p.removeElement(t),p.addElement(s,c),delete p.isConverting,s.onSurveyLoad(),s},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.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.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.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&&q.addConvertInfo(e[t].name,e[o].name);q.addConvertInfo("text","comment"),q.addConvertInfo("comment","text")}();var H,B=function(e){function t(t){var o=e.call(this)||this;return o.setDesignMode(!0),o.fromJSON(t),o}return M(t,e),t}(r.SurveyModel),Q=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(){try{this.jsonValue=new j(1).parse(this.text)}catch(o){this.errors.push({pos:{start:o.at,end:-1},text:o.message})}if(null!=this.jsonValue){this.updateJsonPositions(this.jsonValue);var e=(new j).parse(this.text);if(this.surveyValue=new B(e),null!=this.surveyValue.jsonErrors)for(var t=0;t<this.surveyValue.jsonErrors.length;t++){var o=this.surveyValue.jsonErrors[t];this.errors.push({pos:{start:o.at,end:-1},text:o.getFullDescription()})}}this.surveyObjects=this.createSurveyObjects(),this.setEditorPositionByChartAt(this.surveyObjects),this.setEditorPositionByChartAt(this.errors)},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.createSurveyObjects=function(){var e=[];if(null==this.surveyValue)return e;for(var t=0;t<this.surveyValue.pages.length;t++){var o=this.surveyValue.pages[t];0!=t||o.pos||(o.pos=this.surveyValue.pos),e.push(o);for(var i=0;i<o.questions.length;i++)e.push(o.questions[i])}return e},e.prototype.setEditorPositionByChartAt=function(e){if(null!=e&&0!=e.length)for(var t={row:0,column:0},o=this.getAtArray(e),i=0,n=0;n<o.length;n++){var r=o[n].at;t=this.getPostionByChartAt(t,i,r);var s=o[n].obj;s.position||(s.position={}),r==s.pos.start?s.position.start=t:r==s.pos.end&&(s.position.end=t),i=r}},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.getAtArray=function(e){for(var t=[],o=0;o<e.length;o++){var i=e[o],n=i.pos;n&&(t.push({at:n.start,obj:i}),n.end>0&&t.push({at:n.end,obj:i}))}return t.sort((function(e,t){return e.at>t.at?1:e.at<t.at?-1:0}))},e}();!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"}(H||(H={}));var F=function(){function e(){}return e.getNewPageName=function(t){return e.getNewName(t,N.getString("ed.newPageName"))},e.isPageNameAutoGenerated=function(t){return e.isNameAutoGenerated(t,N.getString("ed.newPageName"))},e.getNewQuestionName=function(t){return e.getNewName(t,N.getString("ed.newQuestionName"))},e.getNewPanelName=function(t){return e.getNewName(t,N.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()?H.Page:"panel"==e.getType()?H.Panel:"survey"==e.getType()?H.Survey:"matrixdropdowncolumn"==e.getType()?H.Column:e.name?H.Question:H.Unknown:H.Unknown},e.getObjectTypeStr=function(t){var o=e.getObjectType(t);return o===H.Survey?"survey":o===H.Page?"page":o===H.Panel?"panel":o===H.Question?"question":o===H.Column?"column":"unknown"},e.getObjectName=function(t,o){return void 0===o&&(o=!1),e.getObjectType(t)===H.Survey?N.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 s=o?function(e,t){return o.onCanShowPropertyCallback(e,t,i,n,r)}:null;return!(s&&!s(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+="|"+e.pureText)})),t},e.convertTextToItemValues=function(e,t,o){var i=[];if(!e)return i;for(var n=e.split("\n"),s=0;s<n.length;s++)if(n[s]){var a=n[s].split(r.ItemValue.Separator),l=r.Serializer.createClass(o);t.forEach((function(e,t){l[e.name]=a[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]:"",s=0;s<n.length&&s<r.length&&n[s]===r[s];)s++;if(s<n.length&&s<r.length){for(;s>0&&n[s-1]>="0"&&n[s-1]<="9";)s--;var a=o(n,s),l=o(r,s);if(a<l)return-1;if(a>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}(),U=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.items=[],o}return M(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),Z={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-btn",buttonRemove:"spg-paneldynamic__remove-btn",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",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:"",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",selectWrapper:"",other:"spg-comment spg-question__other",onError:"spg-input--error"},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"},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"}},G={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(3);var J=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 s="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"+s+'NG.render("surveyElement", { model: survey });\n }\n}';break;case"jquery":r+="var survey = new Survey.Model(surveyJSON);\n",r+='$("#surveyContainer").Survey'+s+"({\n model: survey,\n onComplete: sendDataToServer\n});";break;case"knockout":r+="var survey = new Survey.Survey"+s+"(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"+s+' 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(G,"embed"),o.survey.getCss().list={},o.survey.css=Z,r.settings.readOnlyCommentRenderMode="default",o.survey.onUpdateQuestionCssClasses.add((function(e,t){"comment"===t.question.getType()&&(t.cssClasses.title="sv-question-embed__title")})),o}return M(t,e),L([Object(r.property)()],t.prototype,"survey",void 0),t}(r.Base),z=function(){function e(e){this.creator=e,e.addPluginTab("embed",this,"ed.embedSurvey")}return e.prototype.activate=function(){this.model=new J(this.creator)},e.prototype.deactivate=function(){return this.model=void 0,!0},e}(),W=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 M(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 Q(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),K=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 Q(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(4);var X=function(e){function t(t){var o=e.call(this,t)||this;return o.aceCanUndo=!1,o.aceCanRedo=!1,o}return M(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),Q.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.position.start.row,column:i.position.start.column,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="",L([Object(r.property)()],t.prototype,"aceCanUndo",void 0),L([Object(r.property)()],t.prototype,"aceCanRedo",void 0),t}(W),Y=function(e){function t(t){var o=e.call(this,t)||this;return t.addPluginTab("editor",o,_("ed.jsonEditor"),"svc-tab-json-editor-ace"),o}return M(t,e),t.prototype.createModel=function(e){return new X(e)},t.hasAceEditor=function(){return void 0!==window.ace},t}(K);o(5);var $=function(e){function t(t){var o=e.call(this,t)||this;return o.ariaLabel=_("ed.jsonEditor"),o.onPluginActivate(),o}return M(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?_("ed.jsonHideErrors"):_("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},L([Object(r.property)({defaultValue:"",onSet:function(e,t){return t.onTextChanged()}})],t.prototype,"_text",void 0),L([Object(r.propertyArray)()],t.prototype,"_errors",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"canShowErrors",void 0),t}(W),ee=function(e){function t(t){var o=e.call(this,t)||this;return t.addPluginTab("editor",o,_("ed.jsonEditor"),"svc-tab-json-editor-textarea"),o}return M(t,e),t.prototype.createModel=function(e){return new $(e)},t}(K);o(6);var te=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 M(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=ie[this.activeDevice];return this.simulatorEnabled&&"desktop"!==e.deviceType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"simulatorFrame",{get:function(){if(this.hasFrame){var e=ie[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()},L([Object(r.property)({defaultValue:!0})],t.prototype,"landscape",void 0),L([Object(r.property)()],t.prototype,"survey",void 0),L([Object(r.property)({defaultValue:"desktop"})],t.prototype,"device",void 0),L([Object(r.property)({defaultValue:"l"})],t.prototype,"orientation",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"considerDPI",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"isRunning",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"simulatorEnabled",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"simulatorScaleEnabled",void 0),t}(r.Base),oe=96*("undefined"!=typeof window?window.devicePixelRatio:1),ie={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(7);var ne=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 te,i}return M(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.surveyProvider.createSurvey(e||{},"test");o.setCss(t,!1),this.simulator.survey=o,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=_("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.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")||_("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 N.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}},L([Object(r.property)({defaultValue:!1,onSet:function(e,t){t.simulator.survey.showInvisibleElements=e}})],t.prototype,"showInvisibleElements",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"showPagesInTestSurveyTab",void 0),L([Object(r.property)({defaultValue:!0,onSet:function(e,t){t.simulator&&(t.simulator.isRunning=e)}})],t.prototype,"isRunning",void 0),L([Object(r.propertyArray)()],t.prototype,"pageListItems",void 0),L([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),re=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?ie[this.model.simulator.device].title||_("pe.simulator"):""},e.prototype.setDevice=function(e){this.model.simulator.device=e,this.model.simulator.resetZoomParameters();var t=ie[this.model.simulator.device].deviceType;this.orientationSelectorAction.enabled="desktop"!=t,this.deviceSelectorAction.iconName="icon-device-"+t,this.deviceSelectorAction.title=_("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:N.getLocaleName(n)})}return t},e.prototype.updateActions=function(){this.languageSelectorAction.title=N.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=_("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 ne(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(ie).filter((function(e){return!!ie[e].title})).map((function(e){return{id:e,title:ie[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=_(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=_(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 s,a=this.getAvailableThemes(i);if(this.creator.allowChangeThemeInPreview&&a.length>1){this.changeThemeModel=new r.ListModel(a,(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((s=i.filter((function(t){return t.theme.root===e.simulatorTheme.root})),s.length>0?s[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=N.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}(),se=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||N.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}(),ae=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}(),le=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 s=e;r.Helpers.isTwoValueEquals(s.correctValue,t)&&(o=this.getCorrectNewValue(s,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 ue(e,t,o,i){var n=new le(e);return n.update(t,o,i),n.isModified?n.toString():e}function pe(e){return N.getString("ed.lg."+e)}var ce=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 se(e,t).toDisplayText(o)},e.prototype.mergeWithBaseClass=function(){if(this.logicType.baseClass){var e=de.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 pe(this.name+"Name")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"description",{get:function(){return pe(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=pe(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 de=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)}))},s=0;s<i.length;s++){var a=i[s];t||o.push(a),a instanceof r.QuestionPanelDynamicModel&&(!t||t===a)&&a.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 s=i[n];if(s instanceof r.QuestionMatrixDropdownModelBase&&(!t||t===s))for(var a=s.columns,l=0;l<a.length;l++)o.push(a[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 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=pe("trigger_runExpressionText1");(i=i.format(o.formatExpression(e.runExpression)),e.setToName)&&(i+=pe("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}(),he=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 pe("deleteAction")},enumerable:!1,configurable:!0}),e.prototype.getLocString=function(e){return N.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}(),ge=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||N.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"),"'"):N.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,[s.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,[s.logic.closeBracket]);var i=e.rows;if(Array.isArray(i)&&this.isQuestionInExpression(e))for(var n=this.getItemValueQuestionName(e)+".",a=0;a<i.length;a++)if(!r.Helpers.isValueEmpty(i[a].value)){var l=i[a].value.toString()+".";this.renameQuestionInExpression(n+l+o,n+l+t.name,[s.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,s=this.expression;if(Array.isArray(n))for(var a=0;a<n.length;a++){if(!r.Helpers.isValueEmpty(n[a].value))s=ue(s,i+("."+n[a].value.toString()),o,t.value)}else s=ue(s,i,o,t.value);s!=this.expression&&this.applyExpression(s,!0)}},e.prototype.renameDropdownColumnItemValue=function(e,t,o){var i=e.parentQuestion;if(this.isQuestionInExpression(i)){var n="."+e.getValueName();if(this.isStrContainsInExpression(n+s.logic.closeBracket)){for(var a=i.getValueName()+".",l=i.rows,u=this.expression,p=0;p<l.length;p++){if(!r.Helpers.isValueEmpty(l[p].value))u=ue(u,a+l[p].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(),[s.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(!F.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 N.getString("pe.edit")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deleteText",{get:function(){return N.getString("pe.delete")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ifText",{get:function(){return N.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=s.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 ae).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 me(e){e.popupModel.isFocusedContent=!0,e.popupModel.setWidthByTarget=!1,e.dropdownListModel.listModel.searchEnabled=e.searchEnabled}o(8);var fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t}(r.EventBase),ye=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 fe,i.onLogicItemValidation=new fe,i.onLogicItemRemoving=new fe,i.onLogicItemRemoved=new fe,i.options||(i.options=new a),i.readOnly=i.optionsReadOnly,i.update(),i}return M(t,e),Object.defineProperty(t,"visibleActions",{get:function(){return s.logic.visibleActions},set:function(e){s.logic.visibleActions=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"types",{get:function(){return de.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 N.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!0;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 ge(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 he(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 ce.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(de.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(de.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 s=r.Serializer.findProperty(i.getType(),"choices");s&&"itemvalue[]"===s.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),s=0;s<this.logicTypes.length;s++){var a=this.logicTypes[s];if(a.showInUI===i){var l=e[a.propertyName];if(n.indexOf(a.baseClass)>-1&&!r.Helpers.isValueEmpty(l)){var u=this.getLogicItemHashKey(l,e),p=o[u];p||(p=new ge(this,l),o[u]=p,t.push(p));var c=this.createNewAction(a,e);p.addNewAction(c)}}}},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 ce(t.types[i],this.survey,this.options));return e},L([Object(r.propertyArray)()],t.prototype,"items",void 0),L([Object(r.propertyArray)()],t.prototype,"logicTypes",void 0),L([Object(r.property)()],t.prototype,"errorText",void 0),L([Object(r.property)({onSet:function(e,t){t.onReadOnlyChanged()}})],t.prototype,"readOnly",void 0),L([Object(r.property)()],t.prototype,"placeholderHtml",void 0),t}(r.Base),ve=o(1),be=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}(),we=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"}]},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:"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:"rateMin",tab:"rateValues"},{name:"rateMax",tab:"rateValues"},{name:"rateStep",tab:"rateValues"},{name:"minRateDescription",tab:"rateValues"},{name:"maxRateDescription",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","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:"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}(),Ce=function(){function e(){}return Object.defineProperty(e.prototype,"name",{get:function(){return this.property?this.property.name:""},enumerable:!1,configurable:!0}),e}(),xe=function(){this.visible=!0,this.index=0,this.properties=[]},Se=function(){function e(e,t,o,i,n,s){void 0===t&&(t=null),void 0===o&&(o=null),void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=null),this.obj=e,this.options=t,this.parentObj=n,this.parentProperty=s,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:F.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 s=n.properties[r].name||n.properties[r];-1===o.indexOf(s)&&(o.push(s),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 a=t?e.name:s.propertyGrid.generalTabName;t||i||!e.tab||(a=e.tab);var l=new Ce;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(a).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),s=n.properties.indexOf(r);n.properties.splice(s+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 xe;return o.name=e,e==s.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&&we.definition[e]){var i=e.substring(0,e.indexOf("@")+1)+"default";return i!=e&&we.definition[i]&&t.push(we.definition[i]),t.push(we.definition[e]),this.setUsedProperties(t,o),this.addNonTabProperties(t,o,!0),t}for(var n=e,a=!1;n;){var l=r.Serializer.findClass(n);if(!l)break;var u=we.definition[l.name];if(u){if(u.properties)for(var p=0;p<u.properties.length;){var c=u.properties[p],d="string"==typeof c?c:c.name,h=s.propertyGrid.generalTabName;"string"!=typeof c&&c.tab&&(h=c.tab);var g=this.propertiesHash[d]?this.propertiesHash[d].property:null,m=this.getJsonPropertyCategory(g);m&&m!==h?u.properties.splice(p,1):(o[d]=!0,p++)}if(u.tabs)for(p=0;p<u.tabs.length;p++)a=a||"others"==u.tabs[p].name,o[u.tabs[p].name]=!0;t.unshift(u)}n=l.parentName}return a||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 a=this.properties[r];if(!(!this.isJSONPropertyVisible(a)||t[a.name]||o&&"form"!==a.showMode)){var l=this.getJsonPropertyCategory(a),u=l||(0==e.length?s.propertyGrid.generalTabName:"others");if(n.indexOf(u)<0&&u!=s.propertyGrid.generalTabName&&(n.push(u),i.tabs.push({name:u,index:"others"==u?1e3:10*n.length})),a.categoryIndex>-1&&n.indexOf(u)>-1)for(var p=0;p<i.tabs.length;p++)i.tabs[p].name==u&&(i.tabs[p].index=a.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)){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}(),Te=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 s=t.substring(n.length,t.length),a="<span class='"+o+"'>"+(s=s.substring(0,s.length-n.length))+"</span>";return e.replace(t,a)},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),s="<a class='"+o+"' target='_blank' href='"+t.substring(n+2,t.length-1)+"'>"+r+"</a>";return e.replace(t,s)})),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 s=0;s<r.length;s++)t=n(t,r[s],o,i);return t},e.prototype.addLineBreaks=function(e){return e.indexOf("\n")<0?e:e.split("\n").join("<br/>")},e}();function Pe(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)}));var Ee=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=!0),this.options=e,this.options||(this.options=new a),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 Pe(e,!0,!1),this.options.createSurvey(e,this.getSurveyCreationReason())},e.prototype.dispose=function(){this.editSurvey&&this.editSurvey.dispose()},e}(),Oe={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)},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)}},Ie=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=Oe.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 s=this.createPropertyHelpAction(t);s&&n.push(s),n.length>0&&(e.titleActions=n)}},e.prototype.createClearValueAction=function(e,t,o,i){var n=this;return{id:"property-grid-clear",title:_("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:_("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}(),Ve=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 s=n[i],a=o[s.name];s.property=a,s.obj=this.obj,s.options=this.options;var l=this.getVisibilityOnEvent(a);s.readOnly=s.readOnly||this.isPropertyReadOnly(a),s.visible=s.visible&&l,a.visibleIf&&(s.visibleIf=l?"propertyVisibleIf() = true":""),s.descriptionLocation="hidden";var u=N.getPropertyHelpInEditor(this.obj.getType(),a.name,a.type);u&&(s.description=u),Oe.onCreated(this.obj,s,a,this.options),this.options.onPropertyEditorCreatedCallback(this.obj,a,s)}},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.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 Se(this.obj,null,o,void 0,this.parentObj,this.parentProperty).getTabs(),r={},a=0;a<n.length;a++)!1!==n[a].visible&&(r[n[a].name]=this.createPanelProps(n[a],t));var l={elements:[]};for(var u in r)if(u==s.propertyGrid.generalTabName&&e){var p=r[u].elements;for(a=0;a<p.length;a++)l.elements.push(p[a])}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=Oe.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=N.getString("pe.propertyIsEmpty"),r.title=this.getQuestionTitle(e,t);var s=null===(n=we.definition[this.obj.getType()])||void 0===n?void 0:n.properties.filter((function(t){return t.name===e.name}))[0];return"object"==typeof s&&s.placeholder&&(r.placeholder=N.getString("pe."+s.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||N.getString("pe.tabs."+e)},e.prototype.getQuestionTitle=function(e,t){return e.displayName?e.displayName:t&&t!==e.name?t:N.getPropertyNameInEditor(this.obj.getType(),e.name)},e}(),Ne=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=new a),this.isCellCreating=!1,this.options=t,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?Ve.getClassNameProperty(this.obj):"",this.classNameValue=this.classNameProperty?this.obj[this.classNameProperty]:void 0,this.titleActionsCreator=this.obj?new Ie(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.getCss().list={},this.surveyValue.css=Z;var i=this.surveyValue.createNewPage("p1");this.obj&&(new Ve(this.obj,this.options).setupObjPanel(i,!1),this.survey.addPage(i),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 Te).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.getAllQuestions().map((function(e){return e.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 a},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 Pe(e,!0,!1),e},e.prototype.validateQuestionValue=function(e,t,o,i){if(t.isRequired&&(r.Helpers.isValueEmpty(i)||t.valueChangingEmpty))return N.getString("pe.propertyIsEmpty");var n=Oe.validateValue(e,t,o,i);return n||this.options.onGetErrorTextOnValidationCallback(o.name,e,i)},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);i&&(e.value=e.oldValue),t.valueChangingEmpty=i}}},e.prototype.onValueChanged=function(e){var t=this,o=e.question;if(o&&o.property&&(o.valueChangingEmpty&&(o.valueChangingEmpty=!1),this.changeDependedProperties(o,(function(e){return t.survey.getQuestionByName(e)}),(function(e){return t.survey.getValue(e)})),Oe.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 s=0;s<n.length;s++){var a=n[s],l=t(a);if(l){this.updateDependedPropertiesEditor(l);var u=o(a);r.Helpers.isTwoValueEquals(l.value,u)||(l.value=u),Oe.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){Oe.onAfterRenderQuestion(this.obj,e.question.property,e)},e.prototype.onMatrixCellCreated=function(e){this.isCellCreating=!0,Oe.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||Ve.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;Oe.onGetMatrixRowAction(this.obj,e.question.property,e,(function(o){t.setObjFromAction(o,e.question.name)}))},e.prototype.onUpdateQuestionCssClasses=function(e){Oe.onUpdateQuestionCssClasses(this.obj,e.question.property,e)},e.prototype.onGetQuestionTitleActions=function(e){Oe.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)})),Oe.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=Oe.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}(),_e=function(){function e(){}return e.prototype.showModalPropertyEditor=function(e,t,o,i,n){var s=this,a=o.obj,l=e.createPropertyEditorSetup(a,t,o,i);if(!l)return null;if("condition"!==t.type&&(l.editSurvey.css=r.defaultV2Css),!r.settings.showModal)return l;var u=r.surveyLocalization.currentLocale,p=N.currentLocale;r.surveyLocalization.currentLocale=p;var c=r.settings.showModal("survey",{survey:l.editSurvey,model:l.editSurvey},(function(){return s.onModalPropertyEditorClosed(e,t,o,i,"apply"),n&&n("apply"),l.apply()}),(function(){s.onModalPropertyEditorClosed(e,t,o,i,"cancel"),n&&n("cancel")}),"sv-property-editor",o.title,i.isMobileView?"overlay":"popup");return c.locale=p,r.surveyLocalization.currentLocale=u,this.onModalPropertyEditorShown(e,t,o,i),i.onPropertyGridShowModalCallback(a,t,o,l,c),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.onUpdateQuestionCssClasses=function(e,t){if(this.isSupportGrouping()){var o=t.question;if(o&&o.parent){var i=o.parent.elements.indexOf(o);i<1||o.parent.elements[i-1].getType()===o.getType()&&(t.cssClasses.mainRoot+=" spg-row-narrow__question")}}},e}(),Ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(_e),Le=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.updateMaxLength=function(e,t){return e.maxLength>0&&(t.maxLength=e.maxLength),t},t}(_e),Me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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"name"==t.name&&(i.textUpdateMode="onBlur"),t.dataList&&(i.dataList=t.dataList),i},t}(Le),je=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(_e),De=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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,s;return(o=e.imageHeight,i=e.imageWidth,n=r.Serializer.findProperty(e.getType(),"imageHeight"),s=r.Serializer.findProperty(e.getType(),"imageWidth"),!(!n&&!s)&&n.isDefaultValue(o)&&s.isDefaultValue(i))?void 0:t}},t}(Me),Re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(Le),ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(Le),qe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.fit=function(e){return"color"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"text",inputType:"color"}},t}(_e),He=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(_e),Be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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 s.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<s.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=N.getLocaleName(t)))return o;if("cellType"===e.name&&(o=N.getString("qt."+t)))return o;return null===t?null:N.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}(_e),Qe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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),s=!!r.Serializer.findClass("tagbox");return n.type=s?"tagbox":"checkbox",n.hasSelectAll=!s,n},t}(Be),Fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(Be),Ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.fit=function(e){return"question"==e.type},t.prototype.getJSON=function(e,t,o){var i={type:"dropdown",optionsCaption:N.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=be.getSurvey(e);if(!n)return[];var r=this.getQuestions(n,e);r||(r=[]);var s=!!o&&o.showTitlesInExpressions,a=r.map((function(e){var t=s?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 F.sortItems(a),a},t.prototype.getQuestions=function(e,t){return e.getAllQuestions()},t.prototype.getItemValue=function(e){return e.name},t}(_e),Ze=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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=[],s=0;s<i.length;s++)i[s]!==o&&r.Serializer.isDescendantOf(i[s].getType(),"selectbase")&&n.push(i[s]);return n},t}(Ue),Ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(Ue);Oe.register(new Ae),Oe.register(new Me),Oe.register(new je),Oe.register(new qe),Oe.register(new Re),Oe.register(new ke),Oe.register(new Be),Oe.register(new Qe),Oe.register(new Fe),Oe.register(new He),Oe.register(new Ue),Oe.register(new Ge),Oe.register(new Ze),Oe.register(new De),r.QuestionFactory.Instance.registerQuestion("buttongroup",(function(e){return new r.QuestionButtonGroupModel(e)}));var Je={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",selectWrapper:"",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(9);var ze=function(e){function t(t,o){var i=e.call(this)||this;return i.name=t,i.translation=o,i}return M(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),We=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 M(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"},L([Object(r.property)()],t.prototype,"text",void 0),L([Object(r.property)()],t.prototype,"placeholder",void 0),t}(r.Base),Ke=function(e){function t(t,o,i,n,r,s){void 0===i&&(i=""),void 0===s&&(s=null);var a=e.call(this,t,n)||this;a.name=t,a.locString=o,a.defaultValue=i,a.context=r,a.property=s,a.translation&&(a.readOnly=a.translation.readOnly),a.hashValues={};var l=a;return a.afterRender=function(e,t){l.translation&&l.translation.translateItemAfterRender(l,e,t.locale)},a.fireOnObjCreating(),a}return M(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 N.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 We(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=N.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()},L([Object(r.property)({defaultValue:!1})],t.prototype,"readOnly",void 0),t}(ze),Xe=function(e){function t(t,o,i,n,r){void 0===i&&(i=null),void 0===n&&(n=""),void 0===r&&(r=!1);var s=e.call(this,t,i)||this;return s.name=t,s.obj=o,s.text=n,s.hasIndent=r,s.isRootValue=!1,s.removeLocale=function(e){s.translation&&s.translation.removeLocale(e)},s.text||(s.text=t),s.reset(),s.fireOnObjCreating(),s}return M(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 Ke}))},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 N.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):N.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 s=new t(i.name,r,this.translation,N.getPropertyName(i.name),!0);s.hasItems&&this.itemValues.push(s)}}else this.createGroups(r,i)}this.sortItems()}},t.prototype.sortItems=function(){s.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 s=e[n.name];s&&Array.isArray(s)&&s.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 Ke(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,s=r;if(!r){var a="["+i.toString()+"]";r=o.name+a,s=N.getPropertyName(o.name)+a}var l=new t(r,n,this.translation,s);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 Ke(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))}},L([Object(r.property)({defaultValue:!0})],t.prototype,"showHeader",void 0),t}(ze),Ye=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 a);var r=n;return n.exportToCSVFileUI=function(){r.exportToSCVFile(s.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 M(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();Pe(t);var o=this.options.createSurvey(t,"translation_settings");return o.css=Z,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:s.translation.maximumSelectedLocales}],title:N.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=s.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};Pe(t,!1);var o=this.options.createSurvey(t,"translation_strings");o.lazyRendering=!0,o.skeletonComponentName="sd-translation-line-skeleton",o.startLoadingFromJson(),o.css=Je,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,s=i(o.question,o.row.name);e.setPlaceHolder(n,s,o.columnName);var a=!!s&&s.locString.getIsMultiple();n.acceptCarriageReturn=a,s&&(n.maxLength=s.maxLength),a||(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={};Pe(e,!1);var t=this.options.createSurvey(e,"translation_strings_header");t.css=Je;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],s=r.Serializer.createClass("matrixdropdown");s.cellType="comment",s.titleLocation="hidden",s.name=this.getStringsSurveyQuestionName(t,o)+i,s.showHeader=!1,e.addQuestion(s),this.addLocaleColumns(s);var a=new r.ItemValue(n.name,n.text);a.translationData=n,s.rows.push(a)}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();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<s.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 N.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 Xe(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||F.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 N.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 N.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 a in this.fillItemsHash("",this.root,r),r){var l=[a],u=r[a];for(n=0;n<i.length;n++){var p=i[n],c=u.getTextForExport(p);c=c||0!=n?c:u.defaultValue,c=this.options.getTranslationExportedText(u.context,u.name,u.locString,p,c),l.push(c||0!=n?c:u.defaultValue)}e.push(l)}var d=s.translation.exportPrefix;return d||(d=""),d+Object(ve.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(ve.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",L([Object(r.propertyArray)()],t.prototype,"locales",void 0),L([Object(r.property)()],t.prototype,"canMergeLocaleWithDefault",void 0),L([Object(r.property)()],t.prototype,"mergeLocaleWithDefaultText",void 0),L([Object(r.property)({defaultValue:!1,onSet:function(e,t){t.updateReadOnly()}})],t.prototype,"readOnly",void 0),L([Object(r.property)()],t.prototype,"root",void 0),L([Object(r.property)({defaultValue:!1,onSet:function(e,t){t.reset()}})],t.prototype,"showAllStrings",void 0),L([Object(r.property)({onSet:function(e,t){t.reset()}})],t.prototype,"filteredPage",void 0),L([Object(r.property)()],t.prototype,"stringsSurvey",void 0),L([Object(r.property)()],t.prototype,"stringsHeaderSurvey",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"isEmpty",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"isChooseLanguageEnabled",void 0),t}(r.Base),$e=function(){function e(e){this.creator=e,e.addPluginTab("translation",this),this.sidebarTab=this.creator.sidebar.addTab("translation"),this.sidebarTab.caption=N.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 Ye(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"),N.getString("ed.translationMergeLocaleWithDefault").format(r.surveyLocalization.defaultLocale)}))},Object.defineProperty(e.prototype,"selectLanguageOptionsCaption",{get:function(){return N.getString("ed.translationAddLanguage")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showAllStringsText",{get:function(){return N.getString("ed.translationShowAllStrings")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showUsedStringsOnlyText",{get:function(){return N.getString("ed.translationShowUsedStringsOnly")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showAllPagesText",{get:function(){return N.getString("ed.translationShowAllPages")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"exportToCSVText",{get:function(){return N.getString("ed.translationExportToSCVButton")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"importFromCSVText",{get:function(){return N.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}(),et={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"},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},tt=function(){this.conjunction="and",this.operator=s.logic.defaultOperator},ot=function(e){function t(t){var o=e.call(this)||this;return o.survey=t,o}return M(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}(tt),it=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 tt;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 tt;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 nt=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=et,r.editSurvey.onUpdateQuestionCssClasses.add((function(e,t){r.onUpdateQuestionCssClasses(t)})),r.text=r.object&&r.propertyName?r.object[r.propertyName]:"",r.updatePlaceholderVisibileIf(),r}return M(t,e),t.canParseExpression=function(e){return!e||!!(new r.ConditionsParser).parseExpression(e)},t.canBuildExpression=function(e){return!e||!!t.canParseExpression(e)&&(new it).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 s=o[r];"!"==s[0]?n.push(s.substring(1)):i.push(s)}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.templateValue.getQuestionByName("placeholder").visibleIf=e}},t.prototype.getSurveyJSON=function(){return{elements:[{type:"paneldynamic",titleLocation:"hidden",name:"panel",panelRemoveButtonLocation:"right",panelAddText:N.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:N.getString("pe.and")},{value:"or",text:N.getString("pe.or")}]},{name:"questionName",type:"dropdown",renderAs:"logicoperator",title:N.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\">"+N.getString("pe.emptyLogicPopupMessage")+"<span></div>"}]},{type:"comment",titleLocation:"hidden",name:"textEditor",textUpdateMode:"onTyping",placeholder:N.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 it).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.hasErrorInUI=function(){var e=this.survey.creator;return!this.isReady&&(this.hasErrors(),this.errorText=pe("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=i.getQuestionConditionJson(o.getQuestionByName("questionName").value,i.defaultOperator),a=r?r.type:null;n.choices.forEach((function(e,o){var i=t.isOperatorEnabled(a,s.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 ot(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=""),F.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!=(s=t[n])){var r=o||(!this.context||this.context===s);s.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 s=e[n].question?e[n].question:e[n];if(!this.options.showTitlesInExpressions){var a=e[n].name,l=s.valueName;l&&0==a.indexOf(l)&&(a=a.replace(l,s.name)),e[n].text=this.options.getObjectDisplayName(s,"condition-editor","condition",a)}this.addConditionQuestionsHash[e[n].name]=s}}var u=this.survey.getVariableNames();return this.addSurveyCalculatedValues(u),this.addValuesIntoConditionQuestions(u,e),"asc"===i&&F.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=s.operators;for(var o in t)e.push(new r.ItemValue(o,N.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,F.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;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 s=n&&n.getConditionJson?n.getConditionJson(o,i):null;return s&&"expression"==s.type&&(s.type="text"),s&&"anyof"==o&&(t.isClassContains(s.type,["checkbox"],[])||(s.type="checkbox")),s||null},t.prototype.updateOperatorEnables=function(e){var o=e.getQuestionByName("questionName");if(o){var i=this.getQuestionConditionJson(o.value,this.defaultOperator),n=i?i.type:null,r=e.getQuestionByName("operator");if(r){for(var a=r.choices,l=!0,u=r.value,p=0;p<a.length;p++){var c=t.isOperatorEnabled(n,s.operators[a[p].value]);a[p].setIsEnabled(c),a[p].setIsVisible(c),a[p].value==u&&(l=a[p].isEnabled)}l||(r.value=this.getFirstEnabledOperator(a))}}},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,s=!o||!o.isVisible;s||(o.minWidth="50px",o.width="15%"),i.minWidth="50px",i.width=s?"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 s.logic.defaultOperator},enumerable:!1,configurable:!0}),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 tt,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.defaultOperator)),"operator"==t&&this.rebuildQuestionValueOnOperandChanging(e),this.updateOperatorEnables(e),this.updateQuestionsWidth(e)},t.prototype.onUpdateQuestionCssClasses=function(e){e.cssClasses.answered="svc-logic-question--answered","conjunction"===e.question.name&&(e.question.allowRootStyle=!1,e.cssClasses.control+=" svc-logic-operator svc-logic-operator--conjunction "),"questionName"===e.question.name&&(e.question.allowRootStyle=!1,e.cssClasses.control+=" svc-logic-operator svc-logic-operator--question",e.cssClasses.error.root="svc-logic-operator__error",e.cssClasses.onError="svc-logic-operator--error"),"operator"===e.question.name&&(e.question.allowRootStyle=!1,e.cssClasses.control+=" svc-logic-operator svc-logic-operator--operator"),"removeAction"===e.question.name&&(e.question.allowRootStyle=!1,e.cssClasses.mainRoot+=" svc-logic-condition-remove-question"),"questionValue"===e.question.name&&(P(e.cssClasses,e.question.getType()),e.cssClasses.mainRoot+=" svc-logic-question-value",e.cssClasses.error.root="svc-logic-operator__error"),"panel"===e.question.name&&(e.cssClasses.root+=" svc-logic-paneldynamic",e.cssClasses.buttonAdd+=" svc-logic-operator--operator",e.cssClasses.iconRemove="svc-icon-remove",e.cssClasses.buttonRemove="svc-logic-paneldynamic__button svc-logic-paneldynamic__remove-btn",e.cssClasses.buttonRemoveRight="svc-logic-paneldynamic__remove-btn--right",e.cssClasses.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||N.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}(Ee),rt=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 st(e,t,o,i):new at(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}(),st=function(e){function t(t,o,i,n){var r=e.call(this,t,o,i)||this;return r.selectorElementsHash=n,r}return M(t,e),t.prototype.getSelectorOptionsText=function(e){var t=e.baseClass,o="page"==t?"pe.conditionSelectPage":"panel"==t?"pe.conditionSelectPanel":"pe.conditionSelectQuestion";return N.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 he(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}(rt),at=function(e){function t(t,o,i){var n=e.call(this,t,o,i)||this;return n.isTrigger=!0,n}return M(t,e),t.prototype.recreateQuestion=function(e,t,o,i){var n=o?e.getQuestionByName(o):null;if(n){var s=e.getElementByName("triggerEditorPanel"),a=r.Serializer.createClass("panel");new Ve(t,i).setupObjPanel(a,!0,"logic");var l=a.getQuestionByName(o);if(l){var u=s.elements.indexOf(n);s.addElement(l,u),n.delete()}"setValue"===l.name&&this.updateSetValueQuestion(l),this.updateVisibilityPanel(s),a.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=N.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){return this.initialLogicAction&&this.initialLogicAction.logicType==this.logicType?(this.initialLogicAction.element.fromJSON(this.panelObj.toJSON()),this.currentLogicAction=this.initialLogicAction,!1):(this.currentLogicAction=new he(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,s){if(t.panel&&!t.panel.isDisposed){var a=t.panel.getQuestionByName(e);a&&(a.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 Ve(r,t).setupObjPanel(i,!0,"logic"),i.title="";var s=i.getQuestionByName("runExpression");(s&&this.updateRunExpressionQuestion(s),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 a=this.getQuestions();a&&e&&a.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}(rt);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 lt=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 a),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=N.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=et,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 M(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:pe("actionsEditorTitle"),titleLocation:"hidden",panelAddText:pe("addNewAction"),panelRemoveButtonLocation:"right",panelCount:0,minPanelCount:1,maxPanelCount:1,templateElements:[{name:"logicTypeName",type:"dropdown",renderAs:"logicoperator",searchEnabled:!1,allowClear:!1,title:N.getString("pe.then"),titleLocation:"left",isRequired:!0,optionsCaption:pe("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.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){e.cssClasses.answered="svc-logic-question--answered","logicTypeName"===e.question.name&&(e.question.allowRootStyle=!1,e.cssClasses.control+=" svc-logic-operator svc-logic-operator--action",e.cssClasses.error.root="svc-logic-operator__error",e.cssClasses.onError="svc-logic-operator--error"),"elementSelector"!==e.question.name&&"setToName"!==e.question.name&&"fromName"!==e.question.name&&"gotoName"!==e.question.name||(e.question.allowRootStyle=!1,e.cssClasses.control+=" svc-logic-operator svc-logic-operator--question",e.cssClasses.error.root="svc-logic-operator__error",e.cssClasses.onError="svc-logic-operator--error"),"setToName"!==e.question.name&&"fromName"!==e.question.name||(e.question.allowRootStyle=!1,e.question.titleLocation="left",e.question.startWithNewLine=!1,e.cssClasses.error.root="svc-logic-operator__error",e.cssClasses.onError="svc-logic-operator--error"),"setValue"===e.question.name&&(P(e.cssClasses,e.question.getType()),e.cssClasses.mainRoot+=" svc-logic-question-value"),"removeAction"===e.question.name&&(e.question.allowRootStyle=!1,e.cssClasses.mainRoot+=" svc-logic-condition-remove-question"),"panel"===e.question.name&&(e.cssClasses.root+=" svc-logic-paneldynamic",e.cssClasses.buttonAdd+=" svc-logic-operator--action ",e.cssClasses.iconRemove="svc-icon-remove",e.cssClasses.buttonRemove="svc-logic-paneldynamic__button svc-logic-paneldynamic__remove-btn",e.cssClasses.buttonRemoveRight="svc-logic-paneldynamic__remove-btn--right",e.cssClasses.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?N.getString("pe.and"):N.getString("pe.then"),o.choices=this.logicTypeChoices,o.allowClear=!1,t){var i=rt.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=rt.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 N.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 s="",a="",l=t[n],u=e.getParentElement(l);u&&(s=u.name+".",a=this.getElementText(u,i)+".");var p=this.getElementText(l,i),c=s+l.name,d=new r.ItemValue(c,a+p);this.selectorElementsHash[c]=l,l[e.propertyName]&&!this.isElementInInitialSelection(e.name,l)&&(d.enableIf="1=2",d.visibleIf="1=2"),o.push(d)}return F.sortItems(o),o},t.prototype.isElementInInitialSelection=function(e,t){return!!this.initialSelectedElements[e]&&this.initialSelectedElements[e].indexOf(t)>-1},t}(Ee);function ut(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 pt(e,t,o){var i=ut(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(10);var ct=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 a),i.setupToolbarItems(),i.update(),i}return M(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=et,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=ut(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){pt(e,t,o);var i=ut(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(),this.matrixItems.visibleRows[this.matrixItems.visibleRows.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.haveUnsavedRules=function(){return this.updateEditableItemIsModifiedState(),this.visibleItems.some((function(e){return e.isModified||e.isNew}))},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.itemUIHash[e.id];if(!t){var o=e.getContext();t={expressionEditor:this.createExpressionPropertyEditor(),itemEditor:new lt(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},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=nt.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.expressionEditor.apply(),this.itemEditor.apply(),this.editableItem.apply(this.expressionEditor.text),this.editableItem.actions.length!=this.itemEditor.panels.length&&this.itemEditor.setEditableItem(this.editableItem),this.itemEditor.resetModified(),this.editableItem.isNew=!1,this.editableItem.isSuitable(this.questionFilter,this.actionTypeFilter)?this.updateItemsSurveyData():(this.questionFilter="",this.actionTypeFilter="")},t.prototype.hasErrorInUI=function(){var e=this.survey.creator;return this.expressionEditor.hasErrorInUI()?(this.errorText=this.expressionEditor.errorText,!0):!!this.itemEditor.hasErrors()&&(this.errorText=pe("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 Pe(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 nt(this.survey,null,this.options);return t.isModal=!1,t.editSurvey.onValueChanged.add((function(t,o){"textEditor"===o.name&&(e.expressionEditorCanShowBuilder=nt.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 pe("addNewItem")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"emptyTabPlaceholder",{get:function(){return pe("empty_tab")},enumerable:!1,configurable:!0}),L([Object(r.property)()],t.prototype,"itemsSurveyValue",void 0),L([Object(r.property)()],t.prototype,"expressionEditorIsFastEntry",void 0),L([Object(r.property)()],t.prototype,"expressionEditorCanShowBuilder",void 0),L([Object(r.property)({onSet:function(e,t){t.updateItemsSurveyData()}})],t.prototype,"questionFilter",void 0),L([Object(r.property)({onSet:function(e,t){t.updateItemsSurveyData()}})],t.prototype,"actionTypeFilter",void 0),t}(ye),dt=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 ct(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.deactivate=function(){return this.model&&this.model.haveUnsavedRules()?(this.creator.notify(N.getString("ed.lg.expressionInvalid"),"error"),!1):(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),!0)},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)}}));F.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:"",s.toggleVisibility()}),!0);n.locOwner=this.creator;var s=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}}));F.sortItems(t,"title"),s.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:s,action:function(){s.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 pe("showAllQuestions")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showAllActionTypesText",{get:function(){return pe("showAllActionTypes")},enumerable:!1,configurable:!0}),e}(),ht=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(!be.isCopyObject(i)&&!this.isIgnoring&&!0!==i.ignoreUndoRedo){var r=this._preparingTransaction,s=n?new ft(e,i,n):new mt(e,t,o,i);if(!r)return(r=new gt(e)).addAction(s),void this._addTransaction(r);r.addAction(s)}},e.prototype.isCorrectProperty=function(e,t){var o=r.Serializer.findProperty(e.getType(),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.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&&e.actions[0]&&this.changesFinishedCallback&&this.changesFinishedCallback(e.actions[0].getChanges(t))},e.prototype.canUndoRedoCallback=function(){},e.prototype.startTransaction=function(e){this.isIgnoring||(this.transactionCounter++,this._preparingTransaction||(this._preparingTransaction=new gt(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.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}(),gt=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}(),mt=function(){function e(e,t,o,i){this._propertyName=e,this._oldValue=t,this._newValue=o,this._sender=i}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.tryMerge=function(e,t,o){if(e!==this._sender||t!==this._propertyName||o==this._oldValue)return!1;var i=r.Serializer.findProperty(e.getType(),t);return!(!i||"string"!==i.type&&"text"!==i.type)&&(this._newValue=o,!0)},e}(),ft=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.tryMerge=function(e,t,o){return!1},e}(),yt=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.undoRedoManager=void 0,o.onBeforeUndo=new Zt,o.onBeforeRedo=new Zt,o.onAfterUndo=new Zt,o.onAfterRedo=new Zt,o.updateSurvey(),o}return M(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 ht,this.undoRedoManager.changesFinishedCallback=function(t){e.creator.notifySurveyPropertyChanged({name:t.propertyName,target:t.object,oldValue:t.oldValue,newValue:t.newValue})},this.undoRedoManager.canUndoRedoCallback=function(){e.updateUndeRedoActions()}},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()},L([Object(r.property)()],t.prototype,"undoRedoManager",void 0),t}(r.Base),vt=function(){function e(e){var t=this;this.creator=e,this.model=void 0,this.model=new yt(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 bt(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 s=this[t];try{s&&s.startTransaction(e||i);var a=r.apply(this,o);return a}finally{s&&s.stopTransaction()}},n}}function wt(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 Ct=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 M(t,e),t.prototype.hasText=function(e){return!e||(this.textInLow||(this.textInLow=this.title.toLocaleLowerCase()),this.textInLow.indexOf(e)>-1)},t}(r.Action),xt=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 F.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 Ct(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):F.getObjectName(e,!1)},e.uniqueId=0,e}(),St=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 M(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 xt(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()},L([Object(r.property)()],t.prototype,"isVisible",void 0),t}(r.Base),Tt=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 M(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=F.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;s.propertyGrid.showNavigationButtons&&(this.prevSelectionAction=new r.Action({id:"svd-grid-history-prev",iconName:"icon-arrow-left",component:"sv-action-bar-item",title:_("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:_("ed.nextSelected"),showTitle:!1,enabled:this.hasNext,action:function(){e.selectionController.next()}}));var t=new St(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()},popupModel:this.selectorPopupModel})},L([Object(r.property)()],t.prototype,"hasPrev",void 0),L([Object(r.property)()],t.prototype,"hasNext",void 0),L([Object(r.property)()],t.prototype,"survey",void 0),L([Object(r.property)()],t.prototype,"selectedElementName",void 0),t}(r.Base),Pt=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 M(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)},L([Object(r.property)()],t.prototype,"page2Display",void 0),t}(r.Base);o(11);var Et=r.settings.allowShowEmptyTitleInDesignMode,Ot=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.pagesControllerValue=new Pt(t),o.initSurvey(),o}return M(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,r.DragDropSurveyElements.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 _("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=F.getNewPageName(this.survey.pages)),this.pagesController.raisePagesChanged())},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(!F.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},L([Object(r.property)()],t.prototype,"newPage",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"showNewPage",void 0),L([Object(r.property)()],t.prototype,"pageCount",void 0),L([Object(r.property)()],t.prototype,"designerCss",void 0),L([Object(r.property)()],t.prototype,"showPlaceholder",void 0),t}(r.Base),It=function(){function e(e){var t=this;this.creator=e,e.addPluginTab("designer",this);var o=new Ne(e.survey,e);this.propertyGrid=new Tt(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 Ot(this.creator),this.creator.sidebar.activeTab=this.propertyGridTab.id},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(12);var Vt=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}(),Nt=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 M(t,e),L([Object(r.property)({onSet:function(e,t){t.sidePanel.headerText=t.caption}})],t.prototype,"caption",void 0),L([Object(r.property)({onSet:function(e,t){t.sidePanel.updateHasVisibleTabs()}})],t.prototype,"visible",void 0),L([Object(r.property)()],t.prototype,"model",void 0),L([Object(r.property)()],t.prototype,"componentName",void 0),t}(r.Base),_t=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}(),At=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 M(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 _("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 Nt(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 _t(e,this.getCurrentHandles())},t.prototype.resetResizeManager=function(){this.resizeManager&&(this.resizeManager.dispose(),this.resizeManager=void 0)},L([Object(r.propertyArray)()],t.prototype,"tabs",void 0),L([Object(r.property)()],t.prototype,"headerText",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"visible",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"collapsedManually",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"expandedManually",void 0),L([Object(r.property)()],t.prototype,"hasVisibleTabs",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"flyoutMode",void 0),L([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),Lt=function(){function e(e){this.question=e}return e.createItemsNavigator=function(e){return e instanceof r.QuestionImagePickerModel?null:e instanceof r.QuestionMultipleTextModel?new jt(e):e instanceof r.QuestionMatrixDropdownModel?new Rt(e):e instanceof r.QuestionMatrixDynamicModel?new kt(e):e instanceof r.QuestionMatrixModel?new Dt(e):e instanceof r.QuestionSelectBase?new Mt(e):null},e.prototype.addNewItems=function(e,t,o){var i=e.slice(0,t).concat(o.map((function(e){return new r.ItemValue(e)}))).concat(e.slice(t+1));this.question[this.getItemsPropertyName(e)]=i},e.prototype.setEventsForItem=function(e,t){var o=this,i=qt.get(this.getItemLocString(e,t));i.onEditComplete.clear(),i.onEditComplete.add((function(){var i=e.indexOf(t);i>=0&&i<e.length-1&&qt.get(o.getItemLocString(e,e[i+1])).activateEditor(),i==e.length-1&&(o.addNewItem(e),qt.get(o.getItemLocString(e,e[e.length-1])).setAutoFocus(),qt.get(o.getItemLocString(e,e[e.length-1])).activateEditor())})),i.onBackspaceEmptyString.clear(),i.onBackspaceEmptyString.add((function(){var i=e.indexOf(t),n=null;if(-1!==i){if(0==i&&e.length>=2&&(n=e[1]),i>0&&(n=e[i-1]),n){var r=qt.get(o.getItemLocString(e,n));r.setAutoFocus(),r.activateEditor()}e.splice(i,1)}})),i.onTextChanging.clear(),i.onTextChanging.add((function(i,n){var r=n.value.split(/\r?\n/).filter((function(e){return!!e}));if(!(r.length<=1)){n.cancel=!0;var s=e.indexOf(t);o.addNewItems(e,s,r);var a=s+r.length;a>=e.length&&(a=e.length-1),qt.get(o.getItemLocString(e,e[a])).setAutoFocus(),qt.get(o.getItemLocString(e,e[a])).activateEditor()}}))},e.setQuestion=function(t){var o=t.element,i=e.createItemsNavigator(o);if(i){var n=qt.get(o.locTitle),r=i.getItemSets(),s=r[0];n.hasEditCompleteHandler||(n.onEditComplete.add((function(){s.length&&qt.get(i.getItemLocString(s,s[0])).activateEditor()})),n.hasEditCompleteHandler=!0),r.forEach((function(e){e.forEach((function(t){i.setEventsForItem(e,t)}));var t=i.getItemsPropertyName(e);o.onPropertyChanged.add((function(o,n){n.name==t&&e.forEach((function(t){i.setEventsForItem(e,t)}))}))}))}return!!i},e}(),Mt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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){void 0===t&&(t=null),this.question.choices.push(new r.ItemValue(t||h("item",e.map((function(e){return e.value})))))},t.prototype.getItemsPropertyName=function(e){return"choices"},t}(Lt),jt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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){void 0===t&&(t=null),this.question.addItem(t||h("text",e.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}(Lt),Dt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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){void 0===t&&(t=null),e==this.question.columns&&this.question.addColumn(t||h("Column ",e.map((function(e){return e.value})))),e==this.question.rows&&this.question.rows.push(t||new r.ItemValue(h("Row ",e.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}(Lt),Rt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(Dt),kt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.getItemSets=function(){return[this.question.columns]},t}(Rt),qt=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 M(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),Ht=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=qt.get(t),i.connector.onDoActivate.add((function(){i.activate()})),i.checkMarkdownToTextConversion(i.locString.owner,i.locString.name),i}return M(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=qt.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,s={obj:n,propertyName:this.locString.name,value:this.locString.text,newValue:i,doValidation:!1};if(this.creator.onValueChangingCallback(s),i=s.newValue,this.errorText=this.creator.onGetErrorTextOnValidationCallback(this.locString.name,n,i),!this.errorText&&!i){var a=n.getPropertyByName&&n.getPropertyByName(this.locString.name);a&&a.isRequired&&(this.errorText=N.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)this.focusedProgram=!0,e.target.focus();else if(this.locString.owner instanceof r.ItemValue&&this.creator.inplaceEditForValues)this.locString.owner.value=i;else{var l=this.locString.storeDefaultText;this.locString.storeDefaultText=!1,this.locString.text=i,this.locString.storeDefaultText=l}this.focused=!1,null===window||void 0===window||window.getSelection().removeAllRanges()},t.prototype.done=function(e){e.stopImmediatePropagation(),e.preventDefault()},t.prototype.onKeyDown=function(e){return 13===e.keyCode&&(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=N.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"svc-string-editor"+(""==e&&""==this.placeholder?" svc-string-editor--hidden":"")+(this.contentEditable?"":" svc-string-editor--readonly")},L([Object(r.property)()],t.prototype,"errorText",void 0),L([Object(r.property)()],t.prototype,"focused",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"editAsText",void 0),L([Object(r.property)()],t.prototype,"placeholderValue",void 0),t}(r.Base);o(13),o(14),o(15);var Bt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t}(r.Action),Qt=function(e){function t(t){return e.call(this,t)||this}return M(t,e),t}(r.Action),Ft=function(e){function t(){var t=e.call(this)||this;return t.dotsItem.popupModel.horizontalPosition="center",t.minVisibleItemsCount=1,t}return M(t,e),t}(r.AdaptiveActionContainer),Ut=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o}return M(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),Zt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t}(r.EventBase),Gt=function(e){function t(t,o){var i=e.call(this)||this;i.options=t,i.isRTLValue=!1,i.alwaySaveTextInPropertyEditorsValue=!1,i.pageEditModeValue="standard",i.newQuestions=[],i.newPanels=[],i.plugins={},i.onElementDeleting=new Zt,i.onGetPropertyReadOnly=new Zt,i.onSurveyInstanceCreated=new Zt,i.onGetObjectDisplayName=new Zt,i.onHtmlToMarkdown=new Zt,i.onElementAllowOperations=new Zt,i.onDefineElementMenuItems=new Zt,i.onShowingProperty=new Zt,i.onCanShowProperty=i.onShowingProperty,i.onPropertyGridSurveyCreated=new Zt,i.onPropertyEditorCreated=new Zt,i.onPropertyEditorUpdateTitleActions=new Zt,i.onPropertyGridShowModal=new Zt,i.onCanDeleteItem=new Zt,i.onCollectionItemDeleting=new Zt,i.onCollectionItemAllowOperations=new Zt,i.onItemValueAdded=new Zt,i.onMatrixColumnAdded=new Zt,i.onSetPropertyEditorOptions=new Zt,i.onGenerateNewName=new Zt,i.onPropertyValidationCustomError=new Zt,i.onPropertyValueChanging=new Zt,i.onSurveyPropertyValueChanged=new Zt,i.onConditionQuestionsGetList=new Zt,i.onConditionGetTitle=new Zt,i.onLogicItemDisplayText=new Zt,i.onModified=new Zt,i.onQuestionAdded=new Zt,i.onPanelAdded=new Zt,i.onPageAdded=new Zt,i.onDesignerSurveyCreated=new Zt,i.onPreviewSurveyCreated=new Zt,i.onTestSurveyCreated=i.onPreviewSurveyCreated,i.onNotify=new Zt,i.onSelectedElementChanging=new Zt,i.onSelectedElementChanged=new Zt,i.onOpenFileChooser=new Zt,i.onUploadFile=new Zt,i.onTranslationStringVisibility=new Zt,i.onTranslationLocaleInitiallySelected=new Zt,i.onTranslationImportItem=new Zt,i.onTranslationImported=new Zt,i.onTranslationExportItem=new Zt,i.onTranslationItemChanging=new Zt,i.onDragDropAllow=new Zt,i.maxLogicItemsInCondition=-1,i.showObjectTitles=!1,i.maxVisibleChoices=10,i.showTitlesInExpressions=!1,i.allowEditExpressionsInTextEditor=!0,i.maximumColumnsCount=s.propertyGrid.maximumColumnsCount,i.maximumChoicesCount=s.propertyGrid.maximumChoicesCount,i.maximumRowsCount=s.propertyGrid.maximumRowsCount,i.maximumRateValues=s.propertyGrid.maximumRateValues,i.showPagesInTestSurveyTab=!0,i.showSimulatorInTestSurveyTab=!0,i.themeForPreview="defaultV2",i._allowModifyPages=!0,i.showDefaultLanguageInTestSurveyTab="auto",i.showInvisibleElementsInTestSurveyTab=!0,i.showPageSelectorInToolbar=!1,i.allowChangeThemeInPreview=!0,i.showErrorOnFailedSave=!0,i.onActiveTabChanging=new Zt,i.onActiveTabChanged=new Zt,i.showSidebarValue=!0,i.onShowSidebarVisibilityChanged=new Zt,i.onShowPropertyGridVisiblityChanged=new Zt,i.onBeforeUndo=new Zt,i.onBeforeRedo=new Zt,i.onAfterUndo=new Zt,i.onAfterRedo=new Zt,i.onPageAdding=new Zt,i.onDragStart=new r.Event,i.onBeforeDrop=i.onDragStart,i.onDragEnd=new r.Event,i.onAfterDrop=i.onDragEnd,i.onStateChanged=new Zt,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&&no(e.target)||t.execute(i.selectElement))}))},i.shortcuts={},i.autoSaveDelay=s.autoSave.delay,i.autoSaveTimerId=null,i.saveNo=0,(o||"string"==typeof i.options||i.options instanceof String)&&(i.options=o||{},F.warnText("Creator constructor has one parameter, as creator options, in V2.")),i.previewOrientation=t.previewOrientation,i.toolbarValue=new Ut(i),i.toolbarValue.locOwner=i,i.tabbedMenu=new Ft,i.tabbedMenu.locOwner=i,i.selectionHistoryControllerValue=new U(i),i.sidebar=new At(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 M(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,s=o?0==o.indexOf("ed.")?o:"":"ed."+e;s&&(o=void 0);var a=new Qt({id:e,locTitleName:s,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,a):this.tabs.push(a),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 N.getString(e)},t.prototype.onSetReadOnly=function(e){},Object.defineProperty(t.prototype,"locale",{get:function(){return this.getPropertyValue("locale",N.currentLocale)},set:function(e){if(N.currentLocale!==e){N.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){if(e==this.viewType)return!1;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&&F.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||(F.warnNonSupported("onShowPropertyGridVisiblityChanged","onShowSidebarVisibilityChanged"),this.onShowPropertyGridVisiblityChanged.fire(this,{show:e}))):F.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 F.warnNonSupported("showPropertyGrid","showSidebar"),this.showSidebar},set:function(e){F.warnNonSupported("showPropertyGrid","showSidebar"),!0===e||!1===e?this.showSidebar=e:F.warnText("showSidebar is a boolean property.")},enumerable:!1,configurable:!0}),t.prototype.rightContainerActiveItem=function(e){F.warnNonSupported("rightContainerActiveItem")},t.prototype.leftContainerActiveItem=function(e){F.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=F.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 vt(this)),this.showDesignerTab&&new It(this),this.showPreviewTab&&new re(this),this.showLogicTab&&new dt(this),this.showJSONEditorTab&&(Y.hasAceEditor()?new Y(this):new ee(this)),this.showEmbeddedSurveyTab&&new z(this),this.showTranslationTab&&new $e(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 s=r.Serializer.findProperty(e,o[n]);s&&(s.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 s=!0;if(o instanceof r.QuestionSelectBase&&(s=o.isItemInList(e)),!1===this.getElementAllowOperations(o).allowEdit)return!1;var a={allowDelete:!0,allowEdit:s,allowAdd:!0};if(this.onCollectionItemAllowingCallback(o,n,o.getPropertyValue(null==i?void 0:i.name),e,a),!1===a.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 s={obj:e,property:t,readOnly:r,propertyName:t.name,parentObj:i,parentProperty:n};return this.onGetPropertyReadOnly.fire(this,s),s.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;r.DragDropSurveyElements.restrictDragQuestionBetweenPages=s.dragDrop.restrictDragQuestionBetweenPages,this.dragDropSurveyElements=new r.DragDropSurveyElements(null,this);var t=!1;this.dragDropSurveyElements.onDragStart.add((function(o,i){var n=o.dropTarget.parent;t=!o.draggedElement.parent,e.onDragStart.fire(o,i),e.startUndoRedoTransaction("drag drop"),e.undoRedoManager.setUndoCallbackForTransaction((function(){n.updateRows()}))})),this.dragDropSurveyElements.onDragEnd.add((function(o,i){e.stopUndoRedoTransaction(),e.selectElement(i.draggedElement,void 0,!1,t),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&&s.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 ye(this.survey,this)},t.prototype.updateLogicOnQuestionNameChanged=function(e,t){e!==t&&s.logic.updateExpressionsOnChanging.questionName&&(this.surveyLogicRenaming=!0,this.getSurveyLogicForUpdate().renameQuestion(e,t),this.surveyLogicRenaming=!1)},t.prototype.updateLogicOnColumnNameChanged=function(e,t,o){t&&t!==o&&s.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=s.defaultNewSurveyJSON;return e.pages&&e.pages.length>0&&e.pages[0].name&&(e.pages[0].name=N.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=s.jsonEditor.indentation;return this.generateValidJSON?JSON.stringify(e,null,t):(new j).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 Q(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 Q(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=F.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||Wt(o,this),o.needRenderIcons=!1,"designer"!=t&&"test"!=t&&(o.locale=N.currentLocale),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.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=q.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 s=this.findRowByElement(r,n);s&&this.isRowMultiline(s)?this.addElemenMultiline(n,e,o,s):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 ye(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(F.getElements(e[i]),t,o)},t.prototype.getNewName=function(e,t){return"page"==e?F.getNewPageName(this.survey.pages):t?this.getNewPanelName():this.getNewQuestionName()},t.prototype.getNewQuestionName=function(){return F.getNewQuestionName(this.getAllQuestions())},t.prototype.getNewPanelName=function(){return F.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:F.getObjectType(e),allowing:!0};this.onElementDeleting.fire(this,t),t.allowing&&this.deleteObjectCore(e)},t.prototype.updateConditionsOnRemove=function(e){if(F.getObjectType(e)==H.Question)t=[e];else var t=e.questions;if(t)for(var o=new ye(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 s="string"==typeof t?r.parentElement.querySelector(t):r.parentElement;s&&s.focus()}}n&&e&&qt.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 Ye(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=s.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,!0))},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(F.getObjectType(e)===H.Unknown)return null;return(F.getObjectType(e)===H.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=F.generateNewName(o.name));!this.isNameUnique(e,o.name);)o.name=F.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=F.getObjectType(t);o!==H.Question&&o!==H.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),s.toggleVisibility()}),!1);n.locOwner=this;var s=new r.PopupModel("sv-list",{model:n},"bottom","center");return{iconName:"icon-more",title:this.getLocString("ed.addNewQuestion"),action:function(){s.displayMode=o.isMobileView?"overlay":"popup",s.toggleVisibility()},popupModel:s}},t.prototype.addNewQuestionInPage=function(e,t,o){void 0===t&&(t=null),void 0===o&&(o=null),o||(o=this.currentAddQuestionType),o||(o=s.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,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 c(this.getChoicesItemBaseTitle(),e.choices)},t.prototype.createNewItemValue=function(e){var t=this.getNextItemValue(e),o=e.createItemValue(t);return o.text=d(e.choices),o},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 Vt(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)},L([Object(r.property)({defaultValue:!0})],t.prototype,"showDesignerTab",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"showJSONEditorTab",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"showTestSurveyTab",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"showEmbeddedSurveyTab",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"showTranslationTab",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"showLogicTab",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"useTableViewInLogicTab",void 0),L([Object(r.property)({defaultValue:200})],t.prototype,"pageHoverDelay",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"inplaceEditForValues",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"haveCommercialLicense",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"isAutoSave",void 0),L([Object(r.property)()],t.prototype,"showOptions",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"showSearch",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"generateValidJSON",void 0),L([Object(r.property)({defaultValue:""})],t.prototype,"currentAddQuestionType",void 0),L([Object(r.property)({defaultValue:"landscape"})],t.prototype,"previewOrientation",void 0),L([Object(r.property)()],t.prototype,"surveyValue",void 0),L([Object(r.property)()],t.prototype,"viewType",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"showToolboxValue",void 0),L([bt()],t.prototype,"addPage",null),L([wt()],t.prototype,"doOnQuestionAdded",null),L([wt()],t.prototype,"doOnPanelAdded",null),L([wt()],t.prototype,"doOnPageAdded",null),L([bt()],t.prototype,"deleteObject",null),L([Object(r.property)({defaultValue:!1})],t.prototype,"showSaveButton",void 0),L([bt()],t.prototype,"convertCurrentQuestion",null),L([bt()],t.prototype,"addNewQuestionInPage",null),L([Object(r.property)({defaultValue:!1})],t.prototype,"showHeaderInEmptySurvey",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"showPageNavigator",void 0),L([Object(r.property)({getDefaultValue:function(){return s.layout.showTabs}})],t.prototype,"showTabs",void 0),L([Object(r.property)({getDefaultValue:function(){return s.layout.showToolbar}})],t.prototype,"showToolbar",void 0),L([Object(r.property)({getDefaultValue:function(){return s.layout.allowCollapseSidebar}})],t.prototype,"allowCollapseSidebar",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"isMobileView",void 0),L([Object(r.property)({defaultValue:"left",onSet:function(e,t){t.toolbox&&(t.toolbox.setLocation(e),t.updateToolboxIsCompact())}})],t.prototype,"toolboxLocation",void 0),L([Object(r.property)({defaultValue:"right"})],t.prototype,"sidebarLocation",void 0),L([Object(r.property)({defaultValue:!1,onSet:function(e,t){if(!e)throw new Error("Creator is disposed")}})],t.prototype,"isCreatorDisposed",void 0),t}(r.Base),Jt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t}(Gt),zt=function(){function e(){}return Object.defineProperty(e,"currentTheme",{get:function(){F.warnNonSupported("StylesManager")},set:function(e){F.warnNonSupported("StylesManager")},enumerable:!1,configurable:!0}),e.applyTheme=function(e){F.warnNonSupported("StylesManager")},e}();function Wt(e,t){e.creator=t,e.isPopupEditorContent=!1;var o=e.getElementWrapperComponentName;e.getElementWrapperComponentName=function(t,i){return Yt(t,i,e.isPopupEditorContent)||o.call(e,t,i)};var i=e.getQuestionContentWrapperComponentName;e.getQuestionContentWrapperComponentName=function(t,o){return $t(t)||i.call(e,t,o)};var n=e.getElementWrapperComponentData;e.getElementWrapperComponentData=function(o,i){return eo(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 to(e,t)},e.getItemValueWrapperComponentData=function(e,o){return oo(e,o,t)},e.getRendererForString=function(e,o){if(!t.readOnly&&io(e,o))return Xt},e.getRendererContextForString=function(e,o){return!t.readOnly&&io(e,o.name)?{creator:t,element:e,locStr:o}:o}}function Kt(e){for(var t=e;t;){if(t.isContentElement)return!0;t=t.parentQuestion}return!1}var Xt="svc-string-editor";function Yt(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(!Kt(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 $t(e){if(e.isDescendantOf("rating")&&!Kt(e))return"svc-rating-question-content"}function eo(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}:Yt(e,t,!1)?e instanceof r.Question||e instanceof r.PanelModel?o:null:void 0}function to(e,t){return Kt(t)?r.SurveyModel.TemplateRendererComponentName:t.isDescendantOf("imagepicker")?"svc-image-item-value":"svc-item-value"}function oo(e,t,o){return t.isContentElement?e:{creator:o,question:t,item:e}}function io(e,t){return!(!!e.data&&e.parentQuestion instanceof r.QuestionMatrixDropdownModelBase)&&(!Kt(e)||e.isEditableTemplateElement)}function no(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 ro(e,t){F.warnNonSupported("registerAdorner","This functionality is no longer supported.")}function so(e){void 0===e&&(e=void 0),F.warnNonSupported("removeAdorners","This functionality is no longer supported.")}var ao=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 M(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(16),o(17);var lo=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 M(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){if("bypage"===t.pageEditMode)return t.pagesController.currentPage=e,t.currentPage=e,void t.pagesController.creator.selectElement(t.pagesController.currentPage);var i=document.getElementById(e.id);i&&(i.scrollIntoView({block:"start"}),t.patchContainerOffset(i),t.pagesController.pages.indexOf(e)===t.pagesController.pages.length-1&&setTimeout((function(){i.scrollIntoView({block:"start"}),t.patchContainerOffset(i)}),50))},o.data=e,this.createActionBarCore(o)},t.prototype.createActionBarCore=function(e){return new r.Action(e)},Object.defineProperty(t.prototype,"pageSelectorCaption",{get:function(){return _("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,s=0;return this.pagesController.pages.forEach((function(e){var o=document.getElementById(e.id);if(o){var a=o.offsetTop,l=a+o.clientHeight;if(!(a<i||l>t))return;var u=a-t,p=i-l,c=o.clientHeight;u<0&&(c+=u),p<0&&(c+=p),(c/=o.clientHeight)>0&&(n.push({page:e,visiblePart:c}),c>s&&(s=c,r=e))}})),this.currentPage=r,n},t.prototype.stopItemsContainerHeightObserver=function(){this._itemsContainer=void 0,this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=void 0),this.visibleItemsStartIndex=0,this.visibleItemsCount=Number.MAX_VALUE},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,L([Object(r.propertyArray)()],t.prototype,"items",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"visible",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"isPopupOpened",void 0),L([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),L([Object(r.property)({defaultValue:0})],t.prototype,"visibleItemsStartIndex",void 0),L([Object(r.property)({defaultValue:Number.MAX_VALUE})],t.prototype,"visibleItemsCount",void 0),t}(r.Base),uo=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 M(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.updateElementAllowOptions(this.creator.getElementAllowOperations(this.surveyElement),this.isOperationsAllow())},t.prototype.updateElementAllowOptions=function(e,t){this.allowDragging=t&&e.allowDragging,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},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&&s.designer.showAddQuestionButton)},t.prototype.duplicate=function(){},L([Object(r.property)({defaultValue:!0})],t.prototype,"allowDragging",void 0),t}(r.Base);o(18);var po=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=F.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(i.page),i}return M(t,e),t.prototype.attachElement=function(t){var o=this;e.prototype.attachElement.call(this,t),this.page&&(this.page.surveyChangedCallback=function(){o.isPageLive=!!o.page.survey},this.isGhost&&(this.updateActionsProperties(),this.page.registerFunctionOnPropertiesValueChanged(["title","description"],(function(){o.addGhostPage()})),this.patchPageForDragDrop(this.page,this.addGhostPage)),this.page.onFirstRendering(),this.page.updateCustomWidgets(),this.page.setWasShown(!0),this.checkActionProperties())},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.page&&this.page.unRegisterFunctionOnPropertiesValueChanged(["title","description"]),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){var o=this;this.creator.addNewQuestionInPage((function(e){o.addGhostPage(!1),o.creator.survey.currentPage=o.page}),null,this.currentAddQuestionType||s.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(){return this.isGhost?"svc-page__content--new":this.creator.isElementSelected(this.page)?"svc-page__content--selected":""},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}),L([Object(r.property)({defaultValue:!1})],t.prototype,"isSelected",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"isPageLive",void 0),L([Object(r.property)({defaultValue:""})],t.prototype,"currentAddQuestionType",void 0),t}(uo);o(19);var co=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 M(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":e=e.replace(" svc-row--ghost",""),e},enumerable:!1,configurable:!0}),t}(r.Base);o(20);var ho=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),n.dragTypeOverMe=new r.ComputedUpdater((function(){return("paneldynamic"===n.surveyElement.getType()?n.surveyElement.template:n.surveyElement).dragTypeOverMe})),Lt.setQuestion(n),n}return M(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(){var e="function"==typeof this.surveyElement.getType?"svc-question__content--"+this.surveyElement.getType():"";return 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?e+=" svc-question__content--drag-over-left":e=e.replace(" svc-question__content--drag-over-left",""),this.dragTypeOverMe===r.DragTypeOverMeEnum.MultilineRight?e+=" svc-question__content--drag-over-right":e=e.replace(" svc-question__content--drag-over-right",""),e},Object.defineProperty(t.prototype,"isDragMe",{get:function(){return this.surveyElement.isDragMe},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this.surveyElement.unRegisterFunctionOnPropertyValueChanged("isRequired","isRequiredAdorner"),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);var i=r.Serializer.findProperty(this.surveyElement.getType(),"isRequired"),n=this.creator.onIsPropertyReadOnlyCallback(this.surveyElement,i,i.readOnly,null,null);this.updateActionVisibility("isrequired",o&&t.allowChangeRequired&&!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?_("ed.htmlPlaceHolder"):_("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=q.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,s=e.creator.createIActionBarItemByClass(n.name,n.title,n.iconName,r);i=n,o.push(s)})),o},Object.defineProperty(t.prototype,"currentType",{get:function(){return this.surveyElement.getType()},enumerable:!1,configurable:!0}),t.prototype.createConverToAction=function(){var e=this,t=this.getConvertToTypesActions(),o=t.length>0,i=this.currentType,n=t.filter((function(e){return e.id===i})),s=n.length>0?n[0].title:this.creator.getLocString("qt."+this.currentType),a=Object(r.createDropdownActionModel)({id:"convertTo",css:"sv-action--convertTo sv-action-bar-item--secondary",iconName:"icon-drop-down-arrow_16x16",iconSize:16,title:s,visibleIndex:0,enabled:o,disableShrink:!0,action:function(t){a.popupModel.displayMode=e.creator.isMobileView?"overlay":"popup"}},{items:t,onSelectionChanged:function(t){e.creator.convertCurrentQuestion(t.id)},allowSelection:!0,selectedItem:n.length>0?n[0]:void 0,horizontalPosition:"center"});return a},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.createConverToAction()),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||s.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}),L([Object(r.property)()],t.prototype,"isDragged",void 0),L([Object(r.property)({defaultValue:""})],t.prototype,"currentAddQuestionType",void 0),L([Object(r.property)()],t.prototype,"dragTypeOverMe",void 0),t}(uo);o(2);var go=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 M(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?N.getString("ed.showMoreChoices"):N.getString("ed.showLessChoices")},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.surveyElement.unRegisterFunctionOnPropertyValueChanged("isSelectedInDesigner","dropdownCollapseChecker")},L([Object(r.property)({defaultValue:!0})],t.prototype,"isCollapsed",void 0),L([Object(r.property)({defaultValue:-1})],t.prototype,"visibleCount",void 0),t}(ho);o(21);var mo=function(e){function t(t,o,i,n){var r=e.call(this,t,o,i)||this;return r.questionRoot=n,r}return M(t,e),t.prototype.chooseFile=function(e){var t=e.questionRoot.getElementsByClassName("svc-choose-file-input")[0];e.creator.chooseFiles(t,(function(t){e.creator.uploadFiles(t,e.surveyElement,(function(t,o){e.surveyElement.imageLink=o}))}))},t}(ho);o(22);var fo=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 M(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this.surveyElement},enumerable:!1,configurable:!0}),t.prototype.addItem=function(e){if(e.allowAdd)if(0===e.element.rateValues.length)e.element.rateMax+=e.element.rateStep;else{var t,o=e.element.rateValues.map((function(e){return e.value}));t=h(e.creator.getChoicesItemBaseTitle(),o);var i=new r.ItemValue(t);i.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([i]);var n=e.element.rateValues;e.creator.onItemValueAddedCallback(e.element,"rateValues",n[n.length-1],n)}},t.prototype.removeItem=function(e){if(e.allowRemove){var t=r.Serializer.findProperty(e.element.getType(),"rateValues"),o=e.element.rateValues&&e.element.rateValues.length-1,i=e.element.rateValues&&e.element.rateValues[o]||null;if(e.creator.onCollectionItemDeletingCallback(e.element,t,e.element.rateValues,i)){var n=e.element;0===n.rateValues.length&&o===n.rateValues.length-1?n.rateMax-=n.rateStep:(0===n.rateValues.length&&(n.rateValues=n.rateValues),n.rateValues.splice(o,1))}}},Object.defineProperty(t.prototype,"allowAdd",{get:function(){return!this.creator.readOnly&&(this.creator.maximumRateValues<1||(this.element.rateValues.length>0||this.creator.maximumRateValues>this.element.rateMax)&&(this.element.rateValues.length<1||this.creator.maximumRateValues>this.element.rateValues.length))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowRemove",{get:function(){return!this.creator.readOnly},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"addTooltip",{get:function(){return _("pe.addItem")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"removeTooltip",{get:function(){return _("pe.removeItem")},enumerable:!1,configurable:!0}),t}(r.Base);o(23);var yo=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.dragDropHelper.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 s=function(){n.updateIsNew(o,i)};return o.noneItem===i?o.registerFunctionOnPropertyValueChanged("showNoneItem",s):o.otherItem===i?o.registerFunctionOnPropertyValueChanged("showOtherItem",s):o.isDescendantOf("checkbox")&&o.selectAllItem===i?o.registerFunctionOnPropertyValueChanged("showSelectAllItem",s):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 M(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"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)},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);t.choices.push(i),this.updateNewItemValue(),o.onItemValueAddedCallback(t,this.collectionPropertyName,i,t.choices),qt.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 _(this.isNew?"pe.addItem":"pe.removeItem")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dragTooltip",{get:function(){return _("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.creator.selectElement(e.question,"choices",!1),t&&t.stopPropagation()},L([Object(r.property)({defaultValue:!1})],t.prototype,"isNew",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"isDragging",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"isDragDropGhost",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"isDragDropMoveDown",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"isDragDropMoveUp",void 0),L([Object(r.property)({defaultValue:null})],t.prototype,"ghostPosition",void 0),t}(r.Base);o(24);var vo=function(e){function t(t,o,i,n,r){var s=e.call(this,t,o,i)||this;return s.question=o,s.item=i,s.templateData=n,s.itemsRoot=r,s.isChoosingNewFile=!1,s.onDragOver=function(e){s.isFileDragging=!0,e.dataTransfer.dropEffect="copy",e.preventDefault()},s.onDrop=function(e){s.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]);s.uploadFiles(o)}},s.onDragLeave=function(e){s.isFileDragging=!1},s}return M(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.creator.uploadFiles(t,e.question,(function(t,o){e.item.imageLink=o}))}))},t.prototype.uploadFiles=function(e){var t=this;this.creator.uploadFiles(e,this.question,(function(e,o){var i=t.creator.createNewItemValue(t.question);i.imageLink=o,t.question.choices.push(i),t.isChoosingNewFile&&t.creator&&(t.creator.onItemValueAddedCallback(t.question,"choices",i,t.question.choices),t.isChoosingNewFile=!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)}))},L([Object(r.property)({defaultValue:!1})],t.prototype,"isFileDragging",void 0),t}(yo);o(25);var bo=function(){function e(e,t){this.cellQuestion=t;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.survey.getAllQuestions()[0].setSurveyImpl(this.survey)}return Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),e.prototype.apply=function(){var e=this.cellQuestion.parentQuestion,t=e.getColumnByName(this.cellQuestion.name),o=t.toJSON().cellType,i=this.survey.getAllQuestions()[0].toJSON();o&&(i.cellType=o),t.fromJSON(i),e.onColumnCellTypeChanged(t)},e}(),wo=function(e){function t(t,o,i,n,r){var s=e.call(this)||this;return s.creator=t,s.templateData=o,s.question=i,s.row=n,s.column=r,s.onSelectionChanged=function(e,t){s.context&&s.context.getPropertyValue?s.isSelected=s.creator.isElementSelected(s.context):s.isSelected=!1},t.onSelectedElementChanged.add(s.onSelectionChanged),s}return M(t,e),t.prototype.editQuestion=function(e){var t=new bo(e.creator,e.question);r.settings.showModal("svc-question-editor-content",{survey:t.survey,creator:this.creator},(function(){return t.apply(),!0}),void 0,"svc-matrix-cell__popup",e.question.name,this.creator.isMobileView?"overlay":"popup")},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())},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)},L([Object(r.property)()],t.prototype,"isSelected",void 0),t}(r.Base);o(26);var Co=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=xo(t.data,o+1),i.lvl=o,i}return M(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}),L([Object(r.property)({defaultValue:!0})],t.prototype,"collapsed",void 0),L([Object(r.property)({defaultValue:0})],t.prototype,"lvl",void 0),L([Object(r.property)()],t.prototype,"items",void 0),t}(r.Base);function xo(e,t){return void 0===e&&(e=[]),e.filter((function(e){return!!e})).map((function(e){return new Co(e,t)}))}var So=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=xo(i,0),o}return M(t,e),t.prototype.getLocString=function(e){return N.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}),L([Object(r.property)({defaultValue:"table"})],t.prototype,"resultViewType",void 0),L([Object(r.property)({defaultValue:""})],t.prototype,"resultText",void 0),L([Object(r.propertyArray)()],t.prototype,"resultData",void 0),t}(r.Base);o(27);var To=function(e){function t(t,o){var i=e.call(this)||this;return i.creator=t,i.root=o,i}return M(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.creator.uploadFiles(o,void 0,(function(o,i){e.creator.survey.logo=i,t.value=""}))},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}),t}(r.Base),Po=function(e){function t(t){var o=e.call(this,t)||this;return o.onEmbeddedSurveyValueChanged=function(){},o}return M(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 Po("")}),"nonvalue"),r.QuestionFactory.Instance.registerQuestion("embeddedsurvey",(function(e){return new Po(e)})),o(28);var Eo=function(e){function t(t,o){void 0===o&&(o=null);var i=e.call(this,t)||this,n=o&&!o.showValueInLink&&N.getString("pe.set")+" "+o.title||null;return i.linkValueText=n||N.getString("pe.emptyValue"),i}return M(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)))},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()?N.getString("pe.emptyValue"):this.getObjDisplayValue():N.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},L([Object(r.property)({defaultValue:"svc-link-value-button svc-question-link__set-button"})],t.prototype,"linkSetButtonCssClasses",void 0),L([Object(r.property)({defaultValue:"svc-question-link__clear-button"})],t.prototype,"linkClearButtonCssClasses",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"isSelected",void 0),L([Object(r.property)()],t.prototype,"linkValueText",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"showClear",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"allowClear",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"showValueInLink",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"showTooltip",void 0),t}(r.Question);r.Serializer.addClass("linkvalue",["showValueInLink",{name:"showTooltip: boolean",default:!1,visible:!1}],(function(e){return new Eo("",e)}),"nonvalue"),r.QuestionFactory.Instance.registerQuestion("linkvalue",(function(e){return new Eo(e)}));var Oo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(_e),Io=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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 nt(e.getSurvey(),e,i,t.name)},t}(Oo);Oe.register(new Oo),Oe.register(new Io);var Vo=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=N.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=N.getString("pe.fastEntryChoicesCountError").format(i,o))}else if(r.isValueUnique){var n=r.getFirstUniqueValue();n&&(t.error=N.getString("pe.fastEntryNonUniqueError").format(n))}})),r}return M(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),s=r.Serializer.createClass(this.className);this.names.forEach((function(e,t){s[e]=n[t]})),t.push(s)}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 s="text"==n?e.pureText:e[n]}else s=e[n];if(s){for(var a=0;a<o;a++)i+=r.ItemValue.Separator;i+=s,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}(Ee),No=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 M(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}(Vo),_o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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.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.text}))),"title"===o&&"matrixdropdowncolumn"===i&&(t.placeholder=new r.ComputedUpdater((function(){return e.title}))))},t.prototype.onMatrixCellCreated=function(e,t){var o=t.row.editingObj;if(o){var i=t.cellQuestion;i.obj=o,this.initializePlaceholder(o,i,t.columnName),i.property=r.Serializer.findProperty(o.getType(),t.columnName)}},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,s=t.actions;this.getEditItemAsStandAlone()&&s.push({id:"svd-grid-edit-column",iconName:"icon-edit",title:N.getString("pe.edit"),visibleIndex:0,showTitle:!1,location:"end",action:function(){var e=t.row.editingObj;o(e)}});var a=s.filter((function(e){return"show-detail"===e.id}))[0];pt(n,s,r),a&&(a.component="sv-action-bar-item",a.iconName=this.getShowDetailActionIconName(r),a.showTitle=!1,a.location="end",a.ariaExpanded=r.isDetailPanelShowing,a.action=function(){r.showHideDetailPanelClick(),a.iconName=r.isDetailPanelShowing?"icon-editing-finish":"icon-edit"},a.visibleIndex=0,a.visible=this.hasPropertiesInDetail,r.onDetailPanelShowingChanged=function(){a.iconName=i.getShowDetailActionIconName(r),a.ariaExpanded=r.isDetailPanelShowing}),this.updateMatixActionsClasses(s)},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 s=null;i&&n&&(s=t.getNewColumnName(e.value,n,i));var a=r.Serializer.createClass(this.getDefaultClassName(o),{});s&&(a[n]=s),this.getObjTypeName()&&(a[this.getObjTypeName()]=a.getType());var l=e.obj[o.name];return r.Serializer.isDescendantOf(a.getType(),"itemvalue")&&(a.text=d(l)),l.push(a),l!=e.value&&(e.value=l),a},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 Se(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 Ve(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 Ve(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),s={type:"matrixdynamic",detailPanelMode:"underRow",cellType:"text",rowCount:0,columns:r,showHeader:r.length>2,hideColumnsIfEmpty:!0,addRowText:this.getAddRowText(t),keyDuplicationError:N.getString("pe.propertyIsNoUnique"),emptyRowsText:this.getEmptyRowsText(t)};this.getShowDetailPanelOnAdding()&&(s.detailPanelShowOnAdding=!0);var a=this.getMaximumRowCount(e,t,i);return a>0&&(s.maxRowCount=a),s},t.prototype.getEmptyRowsText=function(e){var t="pe.listIsEmpty",o=t+"@"+e.name;return N.hasString(o)&&(t=o),N.getString(t)},t.prototype.getMaximumRowCount=function(e,t,o){return-1},t.prototype.getColumnsJSON=function(e,t,o,i){var n=t.className;n||(n=t.baseClassName);for(var r=new Ve(e,i).createColumnsJSON(n,o),s=0;s<r.length;s++)"comment"==r[s].cellType&&(r[s].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 N.hasString(t)?N.getString(t):N.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}(_e),Ao=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.fit=function(e){return e.isArray&&r.Serializer.isDescendantOf(e.className,"itemvalue")},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=[];return o.columns.forEach((function(e){n.push(e.name)})),new No(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.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}(_o),Lo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(_o),Mo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(_o),jo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(_o),Do=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.fit=function(e){return"htmlconditions"==e.type},t.prototype.getDefaulColumnNames=function(){return["html"]},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(_o),Ro=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.fit=function(e){return"urlconditions"==e.type},t.prototype.getDefaulColumnNames=function(){return["url"]},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(_o),ko=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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 Vo(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}(_o),qo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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(e,t){if(t.columnName==this.getObjTypeName()){var o=t.question.visibleRows.indexOf(t.row);if(!(o<0)){var i=t.row.isDetailPanelShowing,n=t.row.editingObj.toJSON();delete n.type;var s=r.Serializer.createClass(t.value);s.fromJSON(n),s[this.getObjTypeName()]=s.getType(),t.row.hideDetailPanel(!0),t.question.value.splice(o,1,s),t.row.value=s,i&&t.row.showDetailPanel()}}},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(_o),Ho=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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:N.getValidatorName(n)})}return o},t.prototype.getSupportedValidators=function(e){return e?e.getSupportedValidators?e.getSupportedValidators():e.getOriginalObj?this.getSupportedValidators(e.getOriginalObj()):[]:[]},t}(qo),Bo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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:N.getTriggerName(e.name)}}))},t}(qo);Oe.register(new Ao),Oe.register(new Lo),Oe.register(new Mo),Oe.register(new jo),Oe.register(new Do),Oe.register(new Ro),Oe.register(new ko),Oe.register(new Ho),Oe.register(new Bo);var Qo={name:"propertygrid_bindings",showInToolbox:!1,createElements:function(){}};r.ComponentCollection.Instance.getCustomQuestionByName(Qo.name)||r.ComponentCollection.Instance.add(Qo);var Fo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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=Oe.getJSON(t,i,o);return n.titleLocation="left",n.descriptionLocation="hidden",n.minWidth="0px",n.name=e,n.title=N.getPropertyName(e),n},t}(_e);Oe.register(new Fo);var Uo={name:"propertygrid_restfull",showInToolbox:!1,createElements:function(e){}};r.ComponentCollection.Instance.getCustomQuestionByName(Uo.name)||r.ComponentCollection.Instance.add(Uo);var Zo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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 Ve(e[o.name],i,e,o).setupObjPanel(t.contentPanel,!0)},t}(Ue);Oe.register(new Zo);var Go=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 M(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",N.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}(Ee),Jo=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 M(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),F.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}(Ee),zo=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 M(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}(Jo),Wo=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 M(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}(zo),Ko=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 M(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}(zo),Xo=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 M(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}(Jo),Yo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onCreated=function(e,o,i,n){o.linkClickCallback=function(){t.showModalPropertyEditor(t,i,o,n,(function(){return o.isSelected=!1})),o.isSelected=!0},o.clearClickCallback=function(){t.clearPropertyValue(o.obj,i,o,null)}},t}return M(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}(_e),$o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.fit=function(e){return"cells"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,i){return new Go(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}(Yo),ei=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.fit=function(e){return"value"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,i){return new Jo(e,t.name,i)},t}(Yo),ti=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.fit=function(e){return"rowvalue"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,i){return new Wo(e,t.name,i)},t}(Yo),oi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.fit=function(e){return"panelvalue"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,i){return new Ko(e,t.name,i)},t}(Yo),ii=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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 Xo(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}(Yo),ni=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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(),F.updateQuestionJson(n),n},t}(ii);Oe.register(new $o),Oe.register(new ei),Oe.register(new ti),Oe.register(new oi),Oe.register(new ii),Oe.register(new ni);var ri,si=o(29);r.SvgRegistry.registerIconsFromFolder(si),ri="1.9.81",o(116),o(117),o(118),o(119),o(120),o(2),o(121),o(122),o(123),o(124),o(125),r.settings.supportCreatorV2=!0,Object(r.checkLibraryVersion)("1.9.81","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,s={parse:function(o,i){var a=(i=i||{}).dynamicTyping||!1;if(C(a)&&(i.dynamicTypingFunction=a,a={}),i.dynamicTyping=a,i.transform=!!C(i.transform)&&i.transform,i.worker&&s.WORKERS_SUPPORTED){var l=function(){if(!s.WORKERS_SUPPORTED)return!1;var o,i,a=(o=t.URL||t.webkitURL||null,i=e.toString(),s.BLOB_URL||(s.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(a);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 s.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 c(i)):!0===o.readable&&C(o.read)&&C(o.on)?h=new d(i):(t.File&&o instanceof File||o instanceof Object)&&(h=new p(i)),h.stream(o)},unparse:function(e,t){var o=!1,i=!0,n=",",r="\r\n",a='"',l=a+a,u=!1,p=null,c=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||s.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&&(a=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");p=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+a),("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(c=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/)}}();var d=new RegExp(g(a),"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(p||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||p),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 s="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var a=Array.isArray(e)&&0<e.length,l=!Array.isArray(t[0]);if(a&&i){for(var u=0;u<e.length;u++)0<u&&(s+=n),s+=m(e[u],u);0<t.length&&(s+=r)}for(var p=0;p<t.length;p++){var c=a?e.length:t[p].length,d=!1,h=a?0===Object.keys(t[p]).length:0===t[p].length;if(o&&!a&&(d="greedy"===o?""===t[p].join("").trim():1===t[p].length&&0===t[p][0].length),"greedy"===o&&a){for(var g=[],f=0;f<c;f++){var y=l?e[f]:f;g.push(t[p][y])}d=""===g.join("").trim()}if(!d){for(var v=0;v<c;v++){0<v&&!h&&(s+=n);var b=a&&l?e[v]:v;s+=m(t[p][b],v)}p<t.length-1&&(!o||0<c&&!h)&&(s+=r)}}return s}function m(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);var i=!1;c&&"string"==typeof e&&c.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,s.BAD_DELIMITERS)||-1<r.indexOf(n)||" "===r.charAt(0)||" "===r.charAt(r.length-1))?a+r+a:r}}};if(s.RECORD_SEP=String.fromCharCode(30),s.UNIT_SEP=String.fromCharCode(31),s.BYTE_ORDER_MARK="\ufeff",s.BAD_DELIMITERS=["\r","\n",'"',s.BYTE_ORDER_MARK],s.WORKERS_SUPPORTED=!o&&!!t.Worker,s.NODE_STREAM_INPUT=1,s.LocalChunkSize=10485760,s.RemoteChunkSize=5242880,s.DefaultDelimiter=",",s.Parser=m,s.ParserHandle=h,s.NetworkStreamer=u,s.FileStreamer=p,s.StringStreamer=c,s.ReadableStreamStreamer=d,t.jQuery){var a=t.jQuery;a.fn.parse=function(e){var o=e.config||{},i=[];return this.each((function(e){if("INPUT"!==a(this).prop("tagName").toUpperCase()||"file"!==a(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:a.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=a.extend(l.instanceConfig,u.config))}else if("skip"===u)return void r()}var p=l.instanceConfig.complete;l.instanceConfig.complete=function(e){C(p)&&p(e,l.file,l.inputElem),r()},s.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 a=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var l=a.meta.cursor;this._finished||(this._partialLine=r.substring(l-this._baseIndex),this._baseIndex=l),a&&a.data&&(this._rowCount+=a.data.length);var u=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(i)t.postMessage({results:a,workerId:s.WORKER_ID,finished:u});else if(C(this._config.chunk)&&!o){if(this._config.chunk(a,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);a=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(a.data),this._completeResults.errors=this._completeResults.errors.concat(a.errors),this._completeResults.meta=a.meta),this._completed||!u||!C(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),u||a&&a.meta.paused||this._nextChunk(),a}this._halted=!0},this._sendError=function(e){C(this._config.error)?this._config.error(e):i&&this._config.error&&t.postMessage({workerId:s.WORKER_ID,error:e,finished:!1})}}function u(e){var t;(e=e||{}).chunkSize||(e.chunkSize=s.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 p(e){var t,o;(e=e||{}).chunkSize||(e.chunkSize=s.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 c(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,a=/^\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,p=0,c=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,S())x();else{if(x(),0===y.data.length)return;p+=t.data.length,e.preview&&p>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 '"+s.DefaultDelimiter+"'"),i=!1),e.skipEmptyLines&&(y.data=y.data.filter((function(e){return!w(e)}))),S()&&function(){if(y)if(Array.isArray(y.data[0])){for(var t=0;S()&&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,s=t[i];e.header&&(r=i>=f.length?"__parsed_extra":f[i]),e.transform&&(s=e.transform(s,r)),s=T(r,s),"__parsed_extra"===r?(n[r]=n[r]||[],n[r].push(s)):n[r]=s}return e.header&&(i>f.length?P("FieldMismatch","TooManyFields","Too many fields: expected "+f.length+" fields but parsed "+i,c+o):i<f.length&&P("FieldMismatch","TooFewFields","Too few fields: expected "+f.length+" fields but parsed "+i,c+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),c+=o,y}()}function S(){return e.header&&0===f.length}function T(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(a.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,a){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 s=0,a=0;a<i.length;a++)"\n"===i[a][0]&&s++;return s>=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 a,l,u,p;r=r||[",","\t","|",";",s.RECORD_SEP,s.UNIT_SEP];for(var c=0;c<r.length;c++){var d=r[c],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===p||p<g)&&1.99<g&&(l=h,a=d,p=g)}return{successful:!!(e.delimiter=a),bestDelimiter:a}}(n,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);u.successful?e.delimiter=u.bestDelimiter:(i=!0,e.delimiter=s.DefaultDelimiter),y.meta.delimiter=e.delimiter}var p=b(e);return e.preview&&e.header&&p.preview++,t=n,o=new m(p),y=o.parse(t,r,a),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,a=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<s.BAD_DELIMITERS.indexOf(o))&&(o=","),n===o)throw new Error("Comment character same as delimiter");!0===n?n="#":("string"!=typeof n||-1<s.BAD_DELIMITERS.indexOf(n))&&(n=!1),"\n"!==i&&"\r"!==i&&"\r\n"!==i&&(i="\n");var p=0,c=!1;this.parse=function(s,d,h){if("string"!=typeof s)throw new Error("Input must be a string");var m=s.length,f=o.length,y=i.length,v=n.length,b=C(r),w=[],x=[],S=[],T=p=0;if(!s)return G();if(e.header&&!d){var P=s.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 _=N,A=O[N]||0;for(0<A&&(I=!0,_=N+"_"+A),O[N]=A+1;E.includes(_);)_=_+"_"+A;E.push(_)}if(I){var L=s.split(i);L[0]=E.join(o),s=L.join(i)}}if(l||!1!==l&&-1===s.indexOf(t)){for(var M=s.split(i),j=0;j<M.length;j++){if(S=M[j],p+=S.length,j!==M.length-1)p+=i.length;else if(h)return G();if(!n||S.substring(0,v)!==n){if(b){if(w=[],Q(S.split(o)),z(),c)return G()}else Q(S.split(o));if(a&&a<=j)return w=w.slice(0,a),G(!0)}}return G()}for(var D=s.indexOf(o,p),R=s.indexOf(i,p),k=new RegExp(g(u)+g(t),"g"),q=s.indexOf(t,p);;)if(s[p]!==t)if(n&&0===S.length&&s.substring(p,p+v)===n){if(-1===R)return G();p=R+y,R=s.indexOf(i,p),D=s.indexOf(o,p)}else if(-1!==D&&(D<R||-1===R))S.push(s.substring(p,D)),p=D+f,D=s.indexOf(o,p);else{if(-1===R)break;if(S.push(s.substring(p,R)),Z(R+y),b&&(z(),c))return G();if(a&&w.length>=a)return G(!0)}else for(q=p,p++;;){if(-1===(q=s.indexOf(t,q+1)))return h||x.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:w.length,index:p}),U();if(q===m-1)return U(s.substring(p,q).replace(k,t));if(t!==u||s[q+1]!==u){if(t===u||0===q||s[q-1]!==u){-1!==D&&D<q+1&&(D=s.indexOf(o,q+1)),-1!==R&&R<q+1&&(R=s.indexOf(i,q+1));var H=F(-1===R?D:Math.min(D,R));if(s.substr(q+1+H,f)===o){S.push(s.substring(p,q).replace(k,t)),s[p=q+1+H+f]!==t&&(q=s.indexOf(t,p)),D=s.indexOf(o,p),R=s.indexOf(i,p);break}var B=F(R);if(s.substring(q+1+B,q+1+B+y)===i){if(S.push(s.substring(p,q).replace(k,t)),Z(q+1+B+y),D=s.indexOf(o,p),q=s.indexOf(t,p),b&&(z(),c))return G();if(a&&w.length>=a)return G(!0);break}x.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:w.length,index:p}),q++}}else q++}return U();function Q(e){w.push(e),T=p}function F(e){var t=0;if(-1!==e){var o=s.substring(q+1,e);o&&""===o.trim()&&(t=o.length)}return t}function U(e){return h||(void 0===e&&(e=s.substring(p)),S.push(e),p=m,Q(S),b&&z()),G()}function Z(e){p=e,Q(S),S=[],R=s.indexOf(i,p)}function G(e){return{data:w,errors:x,meta:{delimiter:o,linebreak:i,aborted:c,truncated:!!e,cursor:T+(d||0)}}}function z(){r(G()),w=[],x=[]}},this.abort=function(){c=!0},this.getCharIndex=function(){return p}}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 s=0;s<t.results.data.length&&(o.userStep({data:t.results.data[s],errors:t.results.errors,meta:t.results.meta},r),!i);s++);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===s.WORKER_ID&&o&&(s.WORKER_ID=o.workerId),"string"==typeof o.input)t.postMessage({workerId:s.WORKER_ID,results:s.parse(o.input,o.config),finished:!0});else if(t.File&&o.input instanceof File||o.input instanceof Object){var i=s.parse(o.input,o.config);i&&t.postMessage({workerId:s.WORKER_ID,results:i,finished:!0})}}),(u.prototype=Object.create(l.prototype)).constructor=u,(p.prototype=Object.create(l.prototype)).constructor=p,(c.prototype=Object.create(c.prototype)).constructor=c,(d.prototype=Object.create(l.prototype)).constructor=d,s})?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,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":30,"./add.svg":31,"./add_16x16.svg":32,"./apply.svg":33,"./arrow-down.svg":34,"./arrow-left.svg":35,"./arrow-left_16x16.svg":36,"./arrow-right.svg":37,"./arrow-right_16x16.svg":38,"./arrow-up.svg":39,"./boolean.svg":40,"./change-question-type_16x16.svg":41,"./checkbox.svg":42,"./checked.svg":43,"./clear.svg":44,"./clear_16x16.svg":45,"./collapse-detail-light_16x16.svg":46,"./collapse-detail_16x16.svg":47,"./collapse-panel.svg":48,"./collapse_16x16.svg":49,"./comment.svg":50,"./default.svg":51,"./delete_16x16.svg":52,"./description-hide.svg":53,"./description.svg":54,"./device-desktop.svg":55,"./device-phone.svg":56,"./device-rotate.svg":57,"./device-tablet.svg":58,"./download.svg":59,"./drag-area-indicator.svg":60,"./drag-area-indicator_24x16.svg":61,"./drop-down-arrow.svg":62,"./drop-down-arrow_16x16.svg":63,"./dropdown.svg":64,"./duplicate_16x16.svg":65,"./edit.svg":66,"./edit_16x16.svg":67,"./editing-finish.svg":68,"./expand-detail-light_16x16.svg":69,"./expand-detail_16x16.svg":70,"./expand-panel.svg":71,"./expand_16x16.svg":72,"./export.svg":73,"./expression.svg":74,"./fast-entry.svg":75,"./file.svg":76,"./html.svg":77,"./image.svg":78,"./imagepicker.svg":79,"./import.svg":80,"./invisible-items.svg":81,"./keyboard-dragging.svg":82,"./language.svg":83,"./load.svg":84,"./logic-collapse.svg":85,"./logic-expand.svg":86,"./logo.svg":87,"./matrix.svg":88,"./matrixdropdown.svg":89,"./matrixdynamic.svg":90,"./multipletext.svg":91,"./next_16x16.svg":92,"./panel.svg":93,"./paneldynamic.svg":94,"./preview.svg":95,"./previous_16x16.svg":96,"./radiogroup.svg":97,"./ranking.svg":98,"./rating.svg":99,"./redo.svg":100,"./remove_16x16.svg":101,"./save.svg":102,"./select-page.svg":103,"./settings.svg":104,"./settings_16x16.svg":105,"./signaturepad.svg":106,"./switch-active_16x16.svg":107,"./switch-inactive_16x16.svg":108,"./tagbox.svg":109,"./text.svg":110,"./theme.svg":111,"./toolbox.svg":112,"./undo.svg":113,"./visible.svg":114,"./wizard.svg":115};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=29},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 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="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 ai})),o.d(t,"enStrings",(function(){return n})),o.d(t,"editorLocalization",(function(){return N})),o.d(t,"defaultStrings",(function(){return A})),o.d(t,"localization",(function(){return N})),o.d(t,"QuestionConvertMode",(function(){return i})),o.d(t,"settings",(function(){return s})),o.d(t,"EmptySurveyCreatorOptions",(function(){return a})),o.d(t,"CreatorAction",(function(){return Bt})),o.d(t,"TabbedMenuItem",(function(){return Qt})),o.d(t,"TabbedMenuContainer",(function(){return Ft})),o.d(t,"ToolbarActionContainer",(function(){return Ut})),o.d(t,"CreatorEvent",(function(){return Zt})),o.d(t,"CreatorBase",(function(){return Gt})),o.d(t,"SurveyCreatorModel",(function(){return zt})),o.d(t,"StylesManager",(function(){return Jt})),o.d(t,"initializeDesignTimeSurveyModel",(function(){return Wt})),o.d(t,"editableStringRendererName",(function(){return Xt})),o.d(t,"getElementWrapperComponentName",(function(){return Yt})),o.d(t,"getQuestionContentWrapperComponentName",(function(){return $t})),o.d(t,"getElementWrapperComponentData",(function(){return eo})),o.d(t,"getItemValueWrapperComponentName",(function(){return to})),o.d(t,"getItemValueWrapperComponentData",(function(){return oo})),o.d(t,"isStringEditable",(function(){return io})),o.d(t,"isTextInput",(function(){return no})),o.d(t,"registerAdorner",(function(){return ro})),o.d(t,"removeAdorners",(function(){return so})),o.d(t,"CreatorResponsivityManager",(function(){return Vt})),o.d(t,"EmbedModel",(function(){return z})),o.d(t,"TabEmbedPlugin",(function(){return J})),o.d(t,"AceJsonEditorModel",(function(){return X})),o.d(t,"TabJsonEditorAcePlugin",(function(){return Y})),o.d(t,"JsonEditorBaseModel",(function(){return W})),o.d(t,"TabJsonEditorBasePlugin",(function(){return K})),o.d(t,"TextareaJsonEditorModel",(function(){return $})),o.d(t,"TabJsonEditorTextareaPlugin",(function(){return ee})),o.d(t,"TestSurveyTabViewModel",(function(){return ne})),o.d(t,"TabTestPlugin",(function(){return re})),o.d(t,"initLogicOperator",(function(){return me})),o.d(t,"LogicEvent",(function(){return fe})),o.d(t,"SurveyLogic",(function(){return ye})),o.d(t,"TranslationItemBase",(function(){return Je})),o.d(t,"TranslationItemString",(function(){return We})),o.d(t,"TranslationItem",(function(){return Ke})),o.d(t,"TranslationGroup",(function(){return Xe})),o.d(t,"Translation",(function(){return Ye})),o.d(t,"translationCss",(function(){return ze})),o.d(t,"TabTranslationPlugin",(function(){return $e})),o.d(t,"initialSettingsAllowShowEmptyTitleInDesignMode",(function(){return Et})),o.d(t,"TabDesignerViewModel",(function(){return Ot})),o.d(t,"TabDesignerPlugin",(function(){return It})),o.d(t,"SurveyLogicUI",(function(){return ct})),o.d(t,"TabLogicPlugin",(function(){return dt})),o.d(t,"logicCss",(function(){return et})),o.d(t,"ToolboxToolViewModel",(function(){return ao})),o.d(t,"PageNavigatorViewModel",(function(){return lo})),o.d(t,"PageAdorner",(function(){return po})),o.d(t,"RowViewModel",(function(){return co})),o.d(t,"QuestionAdornerViewModel",(function(){return ho})),o.d(t,"QuestionDropdownAdornerViewModel",(function(){return go})),o.d(t,"QuestionImageAdornerViewModel",(function(){return mo})),o.d(t,"QuestionRatingAdornerViewModel",(function(){return fo})),o.d(t,"ItemValueWrapperViewModel",(function(){return yo})),o.d(t,"ImageItemValueWrapperViewModel",(function(){return vo})),o.d(t,"MatrixCellWrapperEditSurvey",(function(){return bo})),o.d(t,"MatrixCellWrapperViewModel",(function(){return wo})),o.d(t,"SurveySimulatorModel",(function(){return te})),o.d(t,"DEFAULT_MONITOR_DPI",(function(){return oe})),o.d(t,"simulatorDevices",(function(){return ie})),o.d(t,"SurveyResultsItemModel",(function(){return Co})),o.d(t,"SurveyResultsModel",(function(){return So})),o.d(t,"LogoImageViewModel",(function(){return To})),o.d(t,"StringItemsNavigatorBase",(function(){return Lt})),o.d(t,"StringEditorConnector",(function(){return qt})),o.d(t,"StringEditorViewModelBase",(function(){return Ht})),o.d(t,"QuestionEmbeddedSurveyModel",(function(){return Po})),o.d(t,"QuestionLinkValueModel",(function(){return Eo})),o.d(t,"EditorLocalization",(function(){return V})),o.d(t,"getLocString",(function(){return _})),o.d(t,"SurveyJSON5",(function(){return j})),o.d(t,"QuestionSpinEditorModel",(function(){return Oo})),o.d(t,"QuestionColorModel",(function(){return Io})),o.d(t,"setSurveyJSONForPropertyGrid",(function(){return Pe})),o.d(t,"PropertyEditorSetupValue",(function(){return Ee})),o.d(t,"PropertyGridEditorCollection",(function(){return Oe})),o.d(t,"PropertyGridTitleActionsCreator",(function(){return Ie})),o.d(t,"PropertyJSONGenerator",(function(){return Ve})),o.d(t,"PropertyGridModel",(function(){return Ne})),o.d(t,"PropertyGridEditor",(function(){return _e})),o.d(t,"PropertyGridEditorBoolean",(function(){return Ae})),o.d(t,"PropertyGridEditorStringBase",(function(){return Le})),o.d(t,"PropertyGridEditorString",(function(){return Me})),o.d(t,"PropertyGridEditorNumber",(function(){return je})),o.d(t,"PropertyGridEditorImageSize",(function(){return De})),o.d(t,"PropertyGridEditorText",(function(){return Re})),o.d(t,"PropertyGridEditorHtml",(function(){return ke})),o.d(t,"PropertyGridEditorColor",(function(){return qe})),o.d(t,"PropertyGridEditorStringArray",(function(){return He})),o.d(t,"PropertyGridEditorDropdown",(function(){return Be})),o.d(t,"PropertyGridEditorSet",(function(){return Qe})),o.d(t,"PropertyGridEditorPage",(function(){return Fe})),o.d(t,"PropertyGridEditorQuestion",(function(){return Ue})),o.d(t,"PropertyGridEditorQuestionSelectBase",(function(){return Ze})),o.d(t,"PropertyGridEditorQuestionValue",(function(){return Ge})),o.d(t,"PropertyGridEditorExpression",(function(){return Vo})),o.d(t,"PropertyGridEditorCondition",(function(){return No})),o.d(t,"PropertyGridEditorMatrix",(function(){return Lo})),o.d(t,"PropertyGridEditorMatrixItemValues",(function(){return Mo})),o.d(t,"PropertyGridEditorMatrixColumns",(function(){return jo})),o.d(t,"PropertyGridEditorMatrixPages",(function(){return Do})),o.d(t,"PropertyGridEditorMatrixCalculatedValues",(function(){return Ro})),o.d(t,"PropertyGridEditorMatrixHtmlConditions",(function(){return ko})),o.d(t,"PropertyGridEditorMatrixUrlConditions",(function(){return qo})),o.d(t,"PropertyGridEditorMatrixMutlipleTextItems",(function(){return Ho})),o.d(t,"PropertyGridEditorMatrixMultipleTypes",(function(){return Bo})),o.d(t,"PropertyGridEditorMatrixValidators",(function(){return Qo})),o.d(t,"PropertyGridEditorMatrixTriggers",(function(){return Fo})),o.d(t,"PropertyGridEditorBindings",(function(){return Zo})),o.d(t,"PropertyGridViewModel",(function(){return Tt})),o.d(t,"ObjectSelectorItem",(function(){return Ct})),o.d(t,"ObjectSelector",(function(){return xt})),o.d(t,"ObjectSelectorModel",(function(){return St})),o.d(t,"PropertyGridEditorQuestionRestfull",(function(){return zo})),o.d(t,"PropertyGridValueEditorBase",(function(){return ei})),o.d(t,"PropertyGridCellsEditor",(function(){return ti})),o.d(t,"PropertyGridValueEditor",(function(){return oi})),o.d(t,"PropertyGridRowValueEditor",(function(){return ii})),o.d(t,"PropertyGridPanelValueEditor",(function(){return ni})),o.d(t,"PropertyGridTriggerValueEditor",(function(){return ri})),o.d(t,"PropertyGridTriggerValueInLogicEditor",(function(){return si})),o.d(t,"propertyGridCss",(function(){return Z})),o.d(t,"QuestionConverter",(function(){return q})),o.d(t,"svgBundle",(function(){})),o.d(t,"SurveyTextWorker",(function(){return Q})),o.d(t,"QuestionToolboxCategory",(function(){return D})),o.d(t,"QuestionToolboxItem",(function(){return R})),o.d(t,"QuestionToolbox",(function(){return k})),o.d(t,"SidebarModel",(function(){return At})),o.d(t,"SidebarTabModel",(function(){return Nt})),o.d(t,"getNextItemValue",(function(){return c})),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 S})),o.d(t,"copyCssClasses",(function(){return T})),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,"SurveyQuestionEditorDefinition",(function(){return we})),o.d(t,"ObjType",(function(){return H})),o.d(t,"SurveyHelper",(function(){return F})),o.d(t,"ResizeManager",(function(){return _t})),o.d(t,"UndoRedoPlugin",(function(){return vt})),o.d(t,"undoRedoTransaction",(function(){return bt})),o.d(t,"ignoreUndoRedo",(function(){return wt})),o.d(t,"UndoRedoManager",(function(){return ht})),o.d(t,"Transaction",(function(){return gt})),o.d(t,"UndoRedoAction",(function(){return mt})),o.d(t,"UndoRedoArrayAction",(function(){return ft})),o.d(t,"PagesController",(function(){return Pt}));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:"Checkbox",comment:"Comment",imagepicker:"Image Picker",ranking:"Ranking",image:"Image",dropdown:"Dropdown",tagbox:"Tag Box",file:"File",html:"HTML",matrix:"Single-Choice Matrix",matrixdropdown:"Multiple-Choice Matrix",matrixdynamic:"Dynamic Matrix",multipletext:"Multiple Text",panel:"Panel",paneldynamic:"Dynamic Panel",radiogroup:"Radiogroup",rating:"Rating",text:"Single Input",boolean:"Boolean",expression:"Expression (read-only)",signaturepad:"Signature Pad",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",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",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...",bold:"Bold",italic:"Italic",underline:"Underline",addNewQuestion:"Add Question",selectPage:"Select page...",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.",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_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:"Leave the tab?",uncompletedRule_text:"One or more logical rules are uncompleted. If you leave the tab, those changes that cannot be applied will vanish. Are you sure you want to leave?",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",propertyIsEmpty:"Please enter a value",propertyIsNoUnique:"Please enter a unique value",propertyNameIsNotUnique:"Please enter a unique name",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",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",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 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",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"},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"}},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.",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",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"}},r=o(0);!function(e){e[e.AllTypes=0]="AllTypes",e[e.CompatibleTypes=1]="CompatibleTypes"}(i||(i={}));var s={translation:{sortByName:!1,exportPrefix:"",maximumSelectedLocales:7,exportFileName:"survey_translation.csv"},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:{defaultOperator:"equal",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:{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:{imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/lion.jpg"}}},notifications:{lifetime:2e3},autoSave:{delay:500},dragDrop:{restrictDragQuestionBetweenPages:!1},layout:{showTabs:!0,showToolbar:!0,allowCollapseSidebar:!0},jsonEditor:{indentation:1}},a=function(){function e(){this.isMobileView=!1,this.allowEditExpressionsInTextEditor=!0,this.maximumColumnsCount=s.propertyGrid.maximumColumnsCount,this.maximumChoicesCount=s.propertyGrid.maximumChoicesCount,this.maximumRowsCount=s.propertyGrid.maximumRowsCount,this.maximumRateValues=s.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}();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 p(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 c(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,s=t.length-1;s>=0;s--)if(t[s]){var a=t[s].toString();if(n=l(a)){r=a.lastIndexOf(n),i=t[s];break}}if(r>-1){var c,d=parseInt(n),h=i===d;do{if(h)c=++d;else{for(var g=(d++).toString();n.length>g.length;)g="0"+g;c=a.substring(0,r)+g+a.substring(r+n.length)}}while(p(t,c));return c}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 S(e,t){for(var o in t){var i=t[o];"object"==typeof i&&(i={},this.copyObject(i,t[o])),e[o]=i}}function T(e,t){t&&("string"==typeof t||t instanceof String?e.root=t:S(e,t))}function P(e,t){T(e,r.defaultV2Css.question),T(e,r.defaultV2Css[t])}function E(e){return s.logic.openBracket+e+s.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=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,s=0;s<n.length;s++)if(!(r=r[n[s]])&&""!==r)return o===i?n[s]: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]):N.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 s=r.Serializer.findClass(e),a=[],l=void 0;s;){var u=s.name;if(l=t[e])break;if(a.push(u),n[u]){l={props:n[u],parent:this.getObjInEditorByType(s.parentName,t,o)};break}if(!s.parentName)break;s=r.Serializer.findClass(s.parentName)}for(var p=0;p<a.length;p++)t[a[p]]=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,s=function(t){return!(t>=e.length)&&e[t].toUpperCase()===e[t]};for(i=1;i<e.length;i++){!r&&s(i)&&(n+=" "),n+=!r&&!s(i+1)?e[i].toLowerCase():e[i],r=s(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]:A;return t||(t=A),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=A[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}(),N=new V;function _(e,t){return void 0===t&&(t=null),N.getString(e,t)}r.surveyLocalization.onGetExternalString=function(e,t){var o=N.getString(e,t);return o!==e?o:""};var A=n,L=function(e,t,o,i){var n,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,o,s):n(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};Object.assign;function M(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 j=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,s=o[i];if(s&&"object"==typeof s)for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(void 0!==(r=e(s,n))?s[n]=r:delete s[n]);return t.call(o,i,s)}({"":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 s=0;s<r.length;s++)n=this.internalStringify(r,s,!1),i+=this.makeIndent(this.indentStr,this.objStack.length),i+=null==n?"null":n,s<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 a=!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),a=!0,i+=(this.isWord(l)?l:this.escapeString(l))+":"+(this.indentStr?" ":"")+u+","}this.objStack.pop(),i=a?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}(),D=function(e){function t(t){var o=e.call(this)||this;return o.toolbox=t,o}return M(t,e),t.prototype.toggleState=function(){this.toolbox&&this.toolbox.toggleCategoryState(this.name)},L([Object(r.property)()],t.prototype,"name",void 0),L([Object(r.propertyArray)()],t.prototype,"items",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"collapsed",void 0),t}(r.Base),R=function(e){function t(t){var o=e.call(this,t)||this;return o.item=t,o}return M(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 M(t,e),t.getQuestionDefaultSettings=function(e){if(s.toolbox&&s.toolbox.defaultJSON)return s.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]=_("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 s=this.copiedItems;this.copiedItemMaxCount>0&&s.length==this.copiedItemMaxCount&&this.removeItem(s[this.copiedItemMaxCount-1].name),this.addItem(r)}},t.prototype.getActionByItem=function(e){return e instanceof R?e:(e.iconName=e.iconName?e.iconName:t.defaultIconName,new R(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=N.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:N.getString("ed.toolboxGeneralCategory");if(!t[r]){var s=this.createCategory();s.name=r,s.collapsed=r!==o&&!this.keepAllCategoriesExpanded,t[r]=s,e.push(s)}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 a=[];this.categories.forEach((function(e){a=a.concat(e.items)})),this.actions=a,this.hasCategories=e.length>1,this.updateItemSeparators(),this.raiseUpdate(!1)},t.prototype.createCategory=function(){return new D(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 s=o[n],a=r.ElementFactory.Instance.createElement(s,"q1");a||(a=r.Serializer.createClass(s));var l=this.getQuestionJSON(a),u=N.getString("qt."+s),p={id:s,name:s,iconName:"icon-"+s,title:u,tooltip:u,json:l,isCopied:!1,category:i[s]||""};this.actions.push(this.getActionByItem(p))}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=N.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 s=e.category?e.category:"",a=new r.Action({id:e.name,name:e.name,iconName:o,title:i,tooltip:i,json:n,isCopied:!1,category:s}),l=this.getActionByItem(a),u=this.getActionById(a.id);if(u)this.actions.splice(this.actions.indexOf(u),1,l);else{var p=Array.isArray(this.supportedQuestions)?this.supportedQuestions.indexOf(a.id):-1;p>-1?this.actions.splice(p,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.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 s=this.orderedQuestions[n];e.indexOf(s)>-1&&o.indexOf(s)>-1&&i.push(s)}for(n=0;n<e.length;n++){var a=e[n];i.indexOf(a)<0&&t.hiddenTypes.indexOf(a)<0&&o.indexOf(a)>-1&&i.push(a)}return i},t.prototype.dispose=function(){},t.hiddenTypes=["buttongroup","linkvalue","embeddedsurvey","spinedit","color"],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"]},L([Object(r.property)({defaultValue:!1})],t.prototype,"showCategoryTitlesValue",void 0),L([Object(r.propertyArray)()],t.prototype,"categories",void 0),L([Object(r.property)({defaultValue:"",onSet:function(e,t){t.onActiveCategoryChanged(e)}})],t.prototype,"activeCategory",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"hasCategories",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"canCollapseCategories",void 0),L([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),L([Object(r.property)()],t.prototype,"forceCompact",void 0),t}(r.AdaptiveActionContainer),q=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 a=s.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 s=r.CustomWidgetCollection.Instance.widgets;for(n=0;n<s.length;n++)(t||s[n].name!==e)&&i.push(s[n].name);return i}(t,n):e.convertInfo[t];if(!a)return[];if(Array.isArray(o)&&o.length>0){var l=[];a.forEach((function(e){return l.push(e)})),a=o.filter((function(e){return l.indexOf(e)>=0}))}return a||[]},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),s=r.QuestionFactory.Instance.createQuestion(o,t.name);s||(s=r.Serializer.createClass(o,{})),s instanceof r.QuestionSelectBase&&(null==n?void 0:n.choices)&&(s.choices=null),s.name=t.name;var a=s.toJSON(),l=t.toJSON();for(var u in l)a[u]=l[u];e.updateJSON(a,o,t.getType(),i),s.fromJSON(a);var p=t.parent,c=p.elements.indexOf(t);return p.isConverting=!0,p.removeElement(t),p.addElement(s,c),delete p.isConverting,s.onSurveyLoad(),s},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.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.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.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&&q.addConvertInfo(e[t].name,e[o].name);q.addConvertInfo("text","comment"),q.addConvertInfo("comment","text")}();var H,B=function(e){function t(t){var o=e.call(this)||this;return o.setDesignMode(!0),o.fromJSON(t),o}return M(t,e),t}(r.SurveyModel),Q=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(){try{this.jsonValue=new j(1).parse(this.text)}catch(o){this.errors.push({pos:{start:o.at,end:-1},text:o.message})}if(null!=this.jsonValue){this.updateJsonPositions(this.jsonValue);var e=(new j).parse(this.text);if(this.surveyValue=new B(e),null!=this.surveyValue.jsonErrors)for(var t=0;t<this.surveyValue.jsonErrors.length;t++){var o=this.surveyValue.jsonErrors[t];this.errors.push({pos:{start:o.at,end:-1},text:o.getFullDescription()})}}this.surveyObjects=this.createSurveyObjects(),this.setEditorPositionByChartAt(this.surveyObjects),this.setEditorPositionByChartAt(this.errors)},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.createSurveyObjects=function(){var e=[];if(null==this.surveyValue)return e;for(var t=0;t<this.surveyValue.pages.length;t++){var o=this.surveyValue.pages[t];0!=t||o.pos||(o.pos=this.surveyValue.pos),e.push(o);for(var i=0;i<o.questions.length;i++)e.push(o.questions[i])}return e},e.prototype.setEditorPositionByChartAt=function(e){if(null!=e&&0!=e.length)for(var t={row:0,column:0},o=this.getAtArray(e),i=0,n=0;n<o.length;n++){var r=o[n].at;t=this.getPostionByChartAt(t,i,r);var s=o[n].obj;s.position||(s.position={}),r==s.pos.start?s.position.start=t:r==s.pos.end&&(s.position.end=t),i=r}},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.getAtArray=function(e){for(var t=[],o=0;o<e.length;o++){var i=e[o],n=i.pos;n&&(t.push({at:n.start,obj:i}),n.end>0&&t.push({at:n.end,obj:i}))}return t.sort((function(e,t){return e.at>t.at?1:e.at<t.at?-1:0}))},e}();!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"}(H||(H={}));var F=function(){function e(){}return e.getNewPageName=function(t){return e.getNewName(t,N.getString("ed.newPageName"))},e.isPageNameAutoGenerated=function(t){return e.isNameAutoGenerated(t,N.getString("ed.newPageName"))},e.getNewQuestionName=function(t){return e.getNewName(t,N.getString("ed.newQuestionName"))},e.getNewPanelName=function(t){return e.getNewName(t,N.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()?H.Page:"panel"==e.getType()?H.Panel:"survey"==e.getType()?H.Survey:"matrixdropdowncolumn"==e.getType()?H.Column:e.name?H.Question:H.Unknown:H.Unknown},e.getObjectTypeStr=function(t){var o=e.getObjectType(t);return o===H.Survey?"survey":o===H.Page?"page":o===H.Panel?"panel":o===H.Question?"question":o===H.Column?"column":"unknown"},e.getObjectName=function(t,o){return void 0===o&&(o=!1),e.getObjectType(t)===H.Survey?N.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 s=o?function(e,t){return o.onCanShowPropertyCallback(e,t,i,n,r)}:null;return!(s&&!s(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+="|"+e.pureText)})),t},e.convertTextToItemValues=function(e,t,o){var i=[];if(!e)return i;for(var n=e.split("\n"),s=0;s<n.length;s++)if(n[s]){var a=n[s].split(r.ItemValue.Separator),l=r.Serializer.createClass(o);t.forEach((function(e,t){l[e.name]=a[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]:"",s=0;s<n.length&&s<r.length&&n[s]===r[s];)s++;if(s<n.length&&s<r.length){for(;s>0&&n[s-1]>="0"&&n[s-1]<="9";)s--;var a=o(n,s),l=o(r,s);if(a<l)return-1;if(a>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}(),U=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.items=[],o}return M(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),Z={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-btn",buttonRemove:"spg-paneldynamic__remove-btn",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",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:"",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",selectWrapper:"",other:"spg-comment spg-question__other",onError:"spg-input--error"},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"},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-spin-editor__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",colorDrodownIcon:"icon-drop-down-arrow"}},G={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(3);var z=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 s="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"+s+'NG.render("surveyElement", { model: survey });\n }\n}';break;case"jquery":r+="var survey = new Survey.Model(surveyJSON);\n",r+='$("#surveyContainer").Survey'+s+"({\n model: survey,\n onComplete: sendDataToServer\n});";break;case"knockout":r+="var survey = new Survey.Survey"+s+"(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"+s+' 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(G,"embed"),o.survey.getCss().list={},o.survey.css=Z,r.settings.readOnlyCommentRenderMode="default",o.survey.onUpdateQuestionCssClasses.add((function(e,t){"comment"===t.question.getType()&&(t.cssClasses.title="sv-question-embed__title")})),o}return M(t,e),L([Object(r.property)()],t.prototype,"survey",void 0),t}(r.Base),J=function(){function e(e){this.creator=e,e.addPluginTab("embed",this,"ed.embedSurvey")}return e.prototype.activate=function(){this.model=new z(this.creator)},e.prototype.deactivate=function(){return this.model=void 0,!0},e}(),W=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 M(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 Q(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),K=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 Q(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(4);var X=function(e){function t(t){var o=e.call(this,t)||this;return o.aceCanUndo=!1,o.aceCanRedo=!1,o}return M(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),Q.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.position.start.row,column:i.position.start.column,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="",L([Object(r.property)()],t.prototype,"aceCanUndo",void 0),L([Object(r.property)()],t.prototype,"aceCanRedo",void 0),t}(W),Y=function(e){function t(t){var o=e.call(this,t)||this;return t.addPluginTab("editor",o,_("ed.jsonEditor"),"svc-tab-json-editor-ace"),o}return M(t,e),t.prototype.createModel=function(e){return new X(e)},t.hasAceEditor=function(){return void 0!==window.ace},t}(K);o(5);var $=function(e){function t(t){var o=e.call(this,t)||this;return o.ariaLabel=_("ed.jsonEditor"),o.onPluginActivate(),o}return M(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?_("ed.jsonHideErrors"):_("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},L([Object(r.property)({defaultValue:"",onSet:function(e,t){return t.onTextChanged()}})],t.prototype,"_text",void 0),L([Object(r.propertyArray)()],t.prototype,"_errors",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"canShowErrors",void 0),t}(W),ee=function(e){function t(t){var o=e.call(this,t)||this;return t.addPluginTab("editor",o,_("ed.jsonEditor"),"svc-tab-json-editor-textarea"),o}return M(t,e),t.prototype.createModel=function(e){return new $(e)},t}(K);o(6);var te=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 M(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=ie[this.activeDevice];return this.simulatorEnabled&&"desktop"!==e.deviceType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"simulatorFrame",{get:function(){if(this.hasFrame){var e=ie[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()},L([Object(r.property)({defaultValue:!0})],t.prototype,"landscape",void 0),L([Object(r.property)()],t.prototype,"survey",void 0),L([Object(r.property)({defaultValue:"desktop"})],t.prototype,"device",void 0),L([Object(r.property)({defaultValue:"l"})],t.prototype,"orientation",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"considerDPI",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"isRunning",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"simulatorEnabled",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"simulatorScaleEnabled",void 0),t}(r.Base),oe=96*("undefined"!=typeof window?window.devicePixelRatio:1),ie={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(7);var ne=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 te,i}return M(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.surveyProvider.createSurvey(e||{},"test");o.setCss(t,!1),this.simulator.survey=o,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=_("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.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")||_("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 N.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}},L([Object(r.property)({defaultValue:!1,onSet:function(e,t){t.simulator.survey.showInvisibleElements=e}})],t.prototype,"showInvisibleElements",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"showPagesInTestSurveyTab",void 0),L([Object(r.property)({defaultValue:!0,onSet:function(e,t){t.simulator&&(t.simulator.isRunning=e)}})],t.prototype,"isRunning",void 0),L([Object(r.propertyArray)()],t.prototype,"pageListItems",void 0),L([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),re=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?ie[this.model.simulator.device].title||_("pe.simulator"):""},e.prototype.setDevice=function(e){this.model.simulator.device=e,this.model.simulator.resetZoomParameters();var t=ie[this.model.simulator.device].deviceType;this.orientationSelectorAction.enabled="desktop"!=t,this.deviceSelectorAction.iconName="icon-device-"+t,this.deviceSelectorAction.title=_("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:N.getLocaleName(n)})}return t},e.prototype.updateActions=function(){this.languageSelectorAction.title=N.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=_("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 ne(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(ie).filter((function(e){return!!ie[e].title})).map((function(e){return{id:e,title:ie[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=_(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=_(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 s,a=this.getAvailableThemes(i);if(this.creator.allowChangeThemeInPreview&&a.length>1){this.changeThemeModel=new r.ListModel(a,(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((s=i.filter((function(t){return t.theme.root===e.simulatorTheme.root})),s.length>0?s[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=N.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}(),se=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||N.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}(),ae=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}(),le=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 s=e;r.Helpers.isTwoValueEquals(s.correctValue,t)&&(o=this.getCorrectNewValue(s,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 ue(e,t,o,i){var n=new le(e);return n.update(t,o,i),n.isModified?n.toString():e}function pe(e){return N.getString("ed.lg."+e)}var ce=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 se(e,t).toDisplayText(o)},e.prototype.mergeWithBaseClass=function(){if(this.logicType.baseClass){var e=de.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 pe(this.name+"Name")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"description",{get:function(){return pe(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=pe(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 de=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)}))},s=0;s<i.length;s++){var a=i[s];t||o.push(a),a instanceof r.QuestionPanelDynamicModel&&(!t||t===a)&&a.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 s=i[n];if(s instanceof r.QuestionMatrixDropdownModelBase&&(!t||t===s))for(var a=s.columns,l=0;l<a.length;l++)o.push(a[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 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=pe("trigger_runExpressionText1");(i=i.format(o.formatExpression(e.runExpression)),e.setToName)&&(i+=pe("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}(),he=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 pe("deleteAction")},enumerable:!1,configurable:!0}),e.prototype.getLocString=function(e){return N.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}(),ge=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||N.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"),"'"):N.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,[s.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,[s.logic.closeBracket]);var i=e.rows;if(Array.isArray(i)&&this.isQuestionInExpression(e))for(var n=this.getItemValueQuestionName(e)+".",a=0;a<i.length;a++)if(!r.Helpers.isValueEmpty(i[a].value)){var l=i[a].value.toString()+".";this.renameQuestionInExpression(n+l+o,n+l+t.name,[s.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,s=this.expression;if(Array.isArray(n))for(var a=0;a<n.length;a++){if(!r.Helpers.isValueEmpty(n[a].value))s=ue(s,i+("."+n[a].value.toString()),o,t.value)}else s=ue(s,i,o,t.value);s!=this.expression&&this.applyExpression(s,!0)}},e.prototype.renameDropdownColumnItemValue=function(e,t,o){var i=e.parentQuestion;if(this.isQuestionInExpression(i)){var n="."+e.getValueName();if(this.isStrContainsInExpression(n+s.logic.closeBracket)){for(var a=i.getValueName()+".",l=i.rows,u=this.expression,p=0;p<l.length;p++){if(!r.Helpers.isValueEmpty(l[p].value))u=ue(u,a+l[p].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(),[s.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(!F.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 N.getString("pe.edit")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deleteText",{get:function(){return N.getString("pe.delete")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ifText",{get:function(){return N.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=s.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 ae).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 me(e){e.popupModel.isFocusedContent=!0,e.popupModel.setWidthByTarget=!1,e.dropdownListModel.listModel.searchEnabled=e.searchEnabled}o(8);var fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t}(r.EventBase),ye=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 fe,i.onLogicItemValidation=new fe,i.onLogicItemRemoving=new fe,i.onLogicItemRemoved=new fe,i.options||(i.options=new a),i.readOnly=i.optionsReadOnly,i.update(),i}return M(t,e),Object.defineProperty(t,"visibleActions",{get:function(){return s.logic.visibleActions},set:function(e){s.logic.visibleActions=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"types",{get:function(){return de.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 N.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 ge(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 he(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 ce.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(de.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(de.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 s=r.Serializer.findProperty(i.getType(),"choices");s&&"itemvalue[]"===s.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),s=0;s<this.logicTypes.length;s++){var a=this.logicTypes[s];if(a.showInUI===i){var l=e[a.propertyName];if(n.indexOf(a.baseClass)>-1&&!r.Helpers.isValueEmpty(l)){var u=this.getLogicItemHashKey(l,e),p=o[u];p||(p=new ge(this,l),o[u]=p,t.push(p));var c=this.createNewAction(a,e);p.addNewAction(c)}}}},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 ce(t.types[i],this.survey,this.options));return e},L([Object(r.propertyArray)()],t.prototype,"items",void 0),L([Object(r.propertyArray)()],t.prototype,"logicTypes",void 0),L([Object(r.property)()],t.prototype,"errorText",void 0),L([Object(r.property)({onSet:function(e,t){t.onReadOnlyChanged()}})],t.prototype,"readOnly",void 0),L([Object(r.property)()],t.prototype,"placeholderHtml",void 0),t}(r.Base),ve=o(1),be=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}(),we=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"}]},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:"rateMin",tab:"rateValues"},{name:"rateMax",tab:"rateValues"},{name:"rateStep",tab:"rateValues"},{name:"minRateDescription",tab:"rateValues"},{name:"maxRateDescription",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","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:"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}(),Ce=function(){function e(){}return Object.defineProperty(e.prototype,"name",{get:function(){return this.property?this.property.name:""},enumerable:!1,configurable:!0}),e}(),xe=function(){this.visible=!0,this.index=0,this.properties=[]},Se=function(){function e(e,t,o,i,n,s){void 0===t&&(t=null),void 0===o&&(o=null),void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=null),this.obj=e,this.options=t,this.parentObj=n,this.parentProperty=s,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:F.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 s=n.properties[r].name||n.properties[r];-1===o.indexOf(s)&&(o.push(s),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 a=t?e.name:s.propertyGrid.generalTabName;t||i||!e.tab||(a=e.tab);var l=new Ce;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(a).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),s=n.properties.indexOf(r);n.properties.splice(s+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 xe;return o.name=e,e==s.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&&we.definition[e]){var i=e.substring(0,e.indexOf("@")+1)+"default";return i!=e&&we.definition[i]&&t.push(we.definition[i]),t.push(we.definition[e]),this.setUsedProperties(t,o),this.addNonTabProperties(t,o,!0),t}for(var n=e,a=!1;n;){var l=r.Serializer.findClass(n);if(!l)break;var u=we.definition[l.name];if(u){if(u.properties)for(var p=0;p<u.properties.length;){var c=u.properties[p],d="string"==typeof c?c:c.name,h=s.propertyGrid.generalTabName;"string"!=typeof c&&c.tab&&(h=c.tab);var g=this.propertiesHash[d]?this.propertiesHash[d].property:null,m=this.getJsonPropertyCategory(g);m&&m!==h?u.properties.splice(p,1):(o[d]=!0,p++)}if(u.tabs)for(p=0;p<u.tabs.length;p++)a=a||"others"==u.tabs[p].name,o[u.tabs[p].name]=!0;t.unshift(u)}n=l.parentName}return a||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 a=this.properties[r];if(!(!this.isJSONPropertyVisible(a)||t[a.name]||o&&"form"!==a.showMode)){var l=this.getJsonPropertyCategory(a),u=l||(0==e.length?s.propertyGrid.generalTabName:"others");if(n.indexOf(u)<0&&u!=s.propertyGrid.generalTabName&&(n.push(u),i.tabs.push({name:u,index:"others"==u?1e3:10*n.length})),a.categoryIndex>-1&&n.indexOf(u)>-1)for(var p=0;p<i.tabs.length;p++)i.tabs[p].name==u&&(i.tabs[p].index=a.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)){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}(),Te=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 s=t.substring(n.length,t.length),a="<span class='"+o+"'>"+(s=s.substring(0,s.length-n.length))+"</span>";return e.replace(t,a)},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),s="<a class='"+o+"' target='_blank' href='"+t.substring(n+2,t.length-1)+"'>"+r+"</a>";return e.replace(t,s)})),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 s=0;s<r.length;s++)t=n(t,r[s],o,i);return t},e.prototype.addLineBreaks=function(e){return e.indexOf("\n")<0?e:e.split("\n").join("<br/>")},e}();function Pe(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)}));var Ee=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=!0),this.options=e,this.options||(this.options=new a),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 Pe(e,!0,!1),this.options.createSurvey(e,this.getSurveyCreationReason())},e.prototype.dispose=function(){this.editSurvey&&this.editSurvey.dispose()},e}(),Oe={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)},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)}},Ie=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=Oe.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 s=this.createPropertyHelpAction(t);s&&n.push(s),n.length>0&&(e.titleActions=n)}},e.prototype.createClearValueAction=function(e,t,o,i){var n=this;return{id:"property-grid-clear",title:_("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:_("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}(),Ve=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 s=n[i],a=o[s.name];s.property=a,s.obj=this.obj,s.options=this.options;var l=this.getVisibilityOnEvent(a);s.readOnly=s.readOnly||this.isPropertyReadOnly(a),s.visible=s.visible&&l,a.visibleIf&&(s.visibleIf=l?"propertyVisibleIf() = true":""),s.descriptionLocation="hidden";var u=N.getPropertyHelpInEditor(this.obj.getType(),a.name,a.type);u&&(s.description=u),Oe.onCreated(this.obj,s,a,this.options),this.options.onPropertyEditorCreatedCallback(this.obj,a,s)}},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.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 Se(this.obj,null,o,void 0,this.parentObj,this.parentProperty).getTabs(),r={},a=0;a<n.length;a++)!1!==n[a].visible&&(r[n[a].name]=this.createPanelProps(n[a],t));var l={elements:[]};for(var u in r)if(u==s.propertyGrid.generalTabName&&e){var p=r[u].elements;for(a=0;a<p.length;a++)l.elements.push(p[a])}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=Oe.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=N.getString("pe.propertyIsEmpty"),r.title=this.getQuestionTitle(e,t);var s=null===(n=we.definition[this.obj.getType()])||void 0===n?void 0:n.properties.filter((function(t){return t.name===e.name}))[0];return"object"==typeof s&&s.placeholder&&(r.placeholder=N.getString("pe."+s.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||N.getString("pe.tabs."+e)},e.prototype.getQuestionTitle=function(e,t){return e.displayName?e.displayName:t&&t!==e.name?t:N.getPropertyNameInEditor(this.obj.getType(),e.name)},e}(),Ne=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=new a),this.isCellCreating=!1,this.options=t,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?Ve.getClassNameProperty(this.obj):"",this.classNameValue=this.classNameProperty?this.obj[this.classNameProperty]:void 0,this.titleActionsCreator=this.obj?new Ie(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.getCss().list={},this.surveyValue.css=Z;var i=this.surveyValue.createNewPage("p1");this.obj&&(new Ve(this.obj,this.options).setupObjPanel(i,!1),this.survey.addPage(i),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 Te).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.getAllQuestions().map((function(e){return e.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 a},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 Pe(e,!0,!1),e},e.prototype.validateQuestionValue=function(e,t,o,i){if(t.isRequired&&(r.Helpers.isValueEmpty(i)||t.valueChangingEmpty))return N.getString("pe.propertyIsEmpty");var n=Oe.validateValue(e,t,o,i);return n||this.options.onGetErrorTextOnValidationCallback(o.name,e,i)},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);i&&(e.value=e.oldValue),t.valueChangingEmpty=i}}},e.prototype.onValueChanged=function(e){var t=this,o=e.question;if(o&&o.property&&(o.valueChangingEmpty&&(o.valueChangingEmpty=!1),this.changeDependedProperties(o,(function(e){return t.survey.getQuestionByName(e)}),(function(e){return t.survey.getValue(e)})),Oe.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 s=0;s<n.length;s++){var a=n[s],l=t(a);if(l){this.updateDependedPropertiesEditor(l);var u=o(a);r.Helpers.isTwoValueEquals(l.value,u)||(l.value=u),Oe.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){Oe.onAfterRenderQuestion(this.obj,e.question.property,e)},e.prototype.onMatrixCellCreated=function(e){this.isCellCreating=!0,Oe.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||Ve.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;Oe.onGetMatrixRowAction(this.obj,e.question.property,e,(function(o){t.setObjFromAction(o,e.question.name)}))},e.prototype.onUpdateQuestionCssClasses=function(e){Oe.onUpdateQuestionCssClasses(this.obj,e.question.property,e)},e.prototype.onGetQuestionTitleActions=function(e){Oe.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)})),Oe.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=Oe.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}(),_e=function(){function e(){}return e.prototype.showModalPropertyEditor=function(e,t,o,i,n){var s=this,a=o.obj,l=e.createPropertyEditorSetup(a,t,o,i);if(!l)return null;if("condition"!==t.type&&(l.editSurvey.css=r.defaultV2Css),!r.settings.showModal)return l;var u=r.surveyLocalization.currentLocale,p=N.currentLocale;r.surveyLocalization.currentLocale=p;var c=r.settings.showModal("survey",{survey:l.editSurvey,model:l.editSurvey},(function(){return s.onModalPropertyEditorClosed(e,t,o,i,"apply"),n&&n("apply"),l.apply()}),(function(){s.onModalPropertyEditorClosed(e,t,o,i,"cancel"),n&&n("cancel")}),"sv-property-editor",o.title,i.isMobileView?"overlay":"popup");return c.locale=p,r.surveyLocalization.currentLocale=u,this.onModalPropertyEditorShown(e,t,o,i),i.onPropertyGridShowModalCallback(a,t,o,l,c),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.onUpdateQuestionCssClasses=function(e,t){if(this.isSupportGrouping()){var o=t.question;if(o&&o.parent){var i=o.parent.elements.indexOf(o);i<1||o.parent.elements[i-1].getType()===o.getType()&&(t.cssClasses.mainRoot+=" spg-row-narrow__question")}}},e}(),Ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(_e),Le=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.updateMaxLength=function(e,t){return e.maxLength>0&&(t.maxLength=e.maxLength),t},t}(_e),Me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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"name"==t.name&&(i.textUpdateMode="onBlur"),t.dataList&&(i.dataList=t.dataList),i},t}(Le),je=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(_e),De=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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,s;return(o=e.imageHeight,i=e.imageWidth,n=r.Serializer.findProperty(e.getType(),"imageHeight"),s=r.Serializer.findProperty(e.getType(),"imageWidth"),!(!n&&!s)&&n.isDefaultValue(o)&&s.isDefaultValue(i))?void 0:t}},t}(Me),Re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(Le),ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(Le),qe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.fit=function(e){return"color"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"text",inputType:"color"}},t}(_e),He=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(_e),Be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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 s.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<s.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=N.getLocaleName(t)))return o;if("cellType"===e.name&&(o=N.getString("qt."+t)))return o;return null===t?null:N.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}(_e),Qe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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),s=!!r.Serializer.findClass("tagbox");return n.type=s?"tagbox":"checkbox",n.hasSelectAll=!s,n},t}(Be),Fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(Be),Ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.fit=function(e){return"question"==e.type},t.prototype.getJSON=function(e,t,o){var i={type:"dropdown",optionsCaption:N.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=be.getSurvey(e);if(!n)return[];var r=this.getQuestions(n,e);r||(r=[]);var s=!!o&&o.showTitlesInExpressions,a=r.map((function(e){var t=s?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 F.sortItems(a),a},t.prototype.getQuestions=function(e,t){return e.getAllQuestions()},t.prototype.getItemValue=function(e){return e.name},t}(_e),Ze=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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=[],s=0;s<i.length;s++)i[s]!==o&&r.Serializer.isDescendantOf(i[s].getType(),"selectbase")&&n.push(i[s]);return n},t}(Ue),Ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(Ue);Oe.register(new Ae),Oe.register(new Me),Oe.register(new je),Oe.register(new qe),Oe.register(new Re),Oe.register(new ke),Oe.register(new Be),Oe.register(new Qe),Oe.register(new Fe),Oe.register(new He),Oe.register(new Ue),Oe.register(new Ge),Oe.register(new Ze),Oe.register(new De),r.QuestionFactory.Instance.registerQuestion("buttongroup",(function(e){return new r.QuestionButtonGroupModel(e)}));var ze={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",selectWrapper:"",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(9);var Je=function(e){function t(t,o){var i=e.call(this)||this;return i.name=t,i.translation=o,i}return M(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),We=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 M(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"},L([Object(r.property)()],t.prototype,"text",void 0),L([Object(r.property)()],t.prototype,"placeholder",void 0),t}(r.Base),Ke=function(e){function t(t,o,i,n,r,s){void 0===i&&(i=""),void 0===s&&(s=null);var a=e.call(this,t,n)||this;a.name=t,a.locString=o,a.defaultValue=i,a.context=r,a.property=s,a.translation&&(a.readOnly=a.translation.readOnly),a.hashValues={};var l=a;return a.afterRender=function(e,t){l.translation&&l.translation.translateItemAfterRender(l,e,t.locale)},a.fireOnObjCreating(),a}return M(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 N.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 We(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=N.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()},L([Object(r.property)({defaultValue:!1})],t.prototype,"readOnly",void 0),t}(Je),Xe=function(e){function t(t,o,i,n,r){void 0===i&&(i=null),void 0===n&&(n=""),void 0===r&&(r=!1);var s=e.call(this,t,i)||this;return s.name=t,s.obj=o,s.text=n,s.hasIndent=r,s.isRootValue=!1,s.removeLocale=function(e){s.translation&&s.translation.removeLocale(e)},s.text||(s.text=t),s.reset(),s.fireOnObjCreating(),s}return M(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 Ke}))},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 N.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):N.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 s=new t(i.name,r,this.translation,N.getPropertyName(i.name),!0);s.hasItems&&this.itemValues.push(s)}}else this.createGroups(r,i)}this.sortItems()}},t.prototype.sortItems=function(){s.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 s=e[n.name];s&&Array.isArray(s)&&s.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 Ke(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,s=r;if(!r){var a="["+i.toString()+"]";r=o.name+a,s=N.getPropertyName(o.name)+a}var l=new t(r,n,this.translation,s);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 Ke(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))}},L([Object(r.property)({defaultValue:!0})],t.prototype,"showHeader",void 0),t}(Je),Ye=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 a);var r=n;return n.exportToCSVFileUI=function(){r.exportToSCVFile(s.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 M(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();Pe(t);var o=this.options.createSurvey(t,"translation_settings");return o.css=Z,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:s.translation.maximumSelectedLocales}],title:N.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=s.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};Pe(t,!1);var o=this.options.createSurvey(t,"translation_strings");o.lazyRendering=!0,o.skeletonComponentName="sd-translation-line-skeleton",o.startLoadingFromJson(),o.css=ze,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,s=i(o.question,o.row.name);e.setPlaceHolder(n,s,o.columnName);var a=!!s&&s.locString.getIsMultiple();n.acceptCarriageReturn=a,s&&(n.maxLength=s.maxLength),a||(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={};Pe(e,!1);var t=this.options.createSurvey(e,"translation_strings_header");t.css=ze;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],s=r.Serializer.createClass("matrixdropdown");s.cellType="comment",s.titleLocation="hidden",s.name=this.getStringsSurveyQuestionName(t,o)+i,s.showHeader=!1,e.addQuestion(s),this.addLocaleColumns(s);var a=new r.ItemValue(n.name,n.text);a.translationData=n,s.rows.push(a)}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();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<s.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 N.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 Xe(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||F.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 N.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 N.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 a in this.fillItemsHash("",this.root,r),r){var l=[a],u=r[a];for(n=0;n<i.length;n++){var p=i[n],c=u.getTextForExport(p);c=c||0!=n?c:u.defaultValue,c=this.options.getTranslationExportedText(u.context,u.name,u.locString,p,c),l.push(c||0!=n?c:u.defaultValue)}e.push(l)}var d=s.translation.exportPrefix;return d||(d=""),d+Object(ve.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(ve.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",L([Object(r.propertyArray)()],t.prototype,"locales",void 0),L([Object(r.property)()],t.prototype,"canMergeLocaleWithDefault",void 0),L([Object(r.property)()],t.prototype,"mergeLocaleWithDefaultText",void 0),L([Object(r.property)({defaultValue:!1,onSet:function(e,t){t.updateReadOnly()}})],t.prototype,"readOnly",void 0),L([Object(r.property)()],t.prototype,"root",void 0),L([Object(r.property)({defaultValue:!1,onSet:function(e,t){t.reset()}})],t.prototype,"showAllStrings",void 0),L([Object(r.property)({onSet:function(e,t){t.reset()}})],t.prototype,"filteredPage",void 0),L([Object(r.property)()],t.prototype,"stringsSurvey",void 0),L([Object(r.property)()],t.prototype,"stringsHeaderSurvey",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"isEmpty",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"isChooseLanguageEnabled",void 0),t}(r.Base),$e=function(){function e(e){this.creator=e,e.addPluginTab("translation",this),this.sidebarTab=this.creator.sidebar.addTab("translation"),this.sidebarTab.caption=N.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 Ye(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"),N.getString("ed.translationMergeLocaleWithDefault").format(r.surveyLocalization.defaultLocale)}))},Object.defineProperty(e.prototype,"selectLanguageOptionsCaption",{get:function(){return N.getString("ed.translationAddLanguage")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showAllStringsText",{get:function(){return N.getString("ed.translationShowAllStrings")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showUsedStringsOnlyText",{get:function(){return N.getString("ed.translationShowUsedStringsOnly")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showAllPagesText",{get:function(){return N.getString("ed.translationShowAllPages")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"exportToCSVText",{get:function(){return N.getString("ed.translationExportToSCVButton")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"importFromCSVText",{get:function(){return N.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}(),et={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"},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},tt=function(){this.conjunction="and",this.operator=s.logic.defaultOperator},ot=function(e){function t(t){var o=e.call(this)||this;return o.survey=t,o}return M(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}(tt),it=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 tt;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 tt;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 nt=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=et,r.editSurvey.onUpdateQuestionCssClasses.add((function(e,t){r.onUpdateQuestionCssClasses(t)})),r.text=r.object&&r.propertyName?r.object[r.propertyName]:"",r.updatePlaceholderVisibileIf(),r}return M(t,e),t.canParseExpression=function(e){return!e||!!(new r.ConditionsParser).parseExpression(e)},t.canBuildExpression=function(e){return!e||!!t.canParseExpression(e)&&(new it).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 s=o[r];"!"==s[0]?n.push(s.substring(1)):i.push(s)}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.templateValue.getQuestionByName("placeholder").visibleIf=e}},t.prototype.getSurveyJSON=function(){return{elements:[{type:"paneldynamic",titleLocation:"hidden",name:"panel",panelRemoveButtonLocation:"right",panelAddText:N.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:N.getString("pe.and")},{value:"or",text:N.getString("pe.or")}]},{name:"questionName",type:"dropdown",renderAs:"logicoperator",title:N.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\">"+N.getString("pe.emptyLogicPopupMessage")+"<span></div>"}]},{type:"comment",titleLocation:"hidden",name:"textEditor",textUpdateMode:"onTyping",placeholder:N.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 it).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=pe("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=i.getQuestionConditionJson(o.getQuestionByName("questionName").value,i.defaultOperator),a=r?r.type:null;n.choices.forEach((function(e,o){var i=t.isOperatorEnabled(a,s.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 ot(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=""),F.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!=(s=t[n])){var r=o||(!this.context||this.context===s);s.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 s=e[n].question?e[n].question:e[n];if(!this.options.showTitlesInExpressions){var a=e[n].name,l=s.valueName;l&&0==a.indexOf(l)&&(a=a.replace(l,s.name)),e[n].text=this.options.getObjectDisplayName(s,"condition-editor","condition",a)}this.addConditionQuestionsHash[e[n].name]=s}}var u=this.survey.getVariableNames();return this.addSurveyCalculatedValues(u),this.addValuesIntoConditionQuestions(u,e),"asc"===i&&F.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=s.operators;for(var o in t)e.push(new r.ItemValue(o,N.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,F.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;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 s=n&&n.getConditionJson?n.getConditionJson(o,i):null;return s&&"expression"==s.type&&(s.type="text"),s&&"anyof"==o&&(t.isClassContains(s.type,["checkbox"],[])||(s.type="checkbox")),s||null},t.prototype.updateOperatorEnables=function(e){var o=e.getQuestionByName("questionName");if(o){var i=this.getQuestionConditionJson(o.value,this.defaultOperator),n=i?i.type:null,r=e.getQuestionByName("operator");if(r){for(var a=r.choices,l=!0,u=r.value,p=0;p<a.length;p++){var c=t.isOperatorEnabled(n,s.operators[a[p].value]);a[p].setIsEnabled(c),a[p].setIsVisible(c),a[p].value==u&&(l=a[p].isEnabled)}l||(r.value=this.getFirstEnabledOperator(a))}}},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,s=!o||!o.isVisible;s||(o.minWidth="50px",o.width="15%"),i.minWidth="50px",i.width=s?"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 s.logic.defaultOperator},enumerable:!1,configurable:!0}),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 tt,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.defaultOperator)),"operator"==t&&this.rebuildQuestionValueOnOperandChanging(e),this.updateOperatorEnables(e),this.updateQuestionsWidth(e)},t.prototype.onUpdateQuestionCssClasses=function(e){e.cssClasses.answered="svc-logic-question--answered","conjunction"===e.question.name&&(e.question.allowRootStyle=!1,e.cssClasses.control+=" svc-logic-operator svc-logic-operator--conjunction "),"questionName"===e.question.name&&(e.question.allowRootStyle=!1,e.cssClasses.control+=" svc-logic-operator svc-logic-operator--question",e.cssClasses.error.root="svc-logic-operator__error",e.cssClasses.onError="svc-logic-operator--error"),"operator"===e.question.name&&(e.question.allowRootStyle=!1,e.cssClasses.control+=" svc-logic-operator svc-logic-operator--operator"),"removeAction"===e.question.name&&(e.question.allowRootStyle=!1,e.cssClasses.mainRoot+=" svc-logic-condition-remove-question"),("questionValue"===e.question.name||e.question.isContentElement)&&(P(e.cssClasses,e.question.getType()),e.cssClasses.mainRoot+=" svc-logic-question-value",e.cssClasses.error.root="svc-logic-operator__error"),"panel"===e.question.name&&(e.cssClasses.root+=" svc-logic-paneldynamic",e.cssClasses.buttonAdd+=" svc-logic-operator--operator",e.cssClasses.iconRemove="svc-icon-remove",e.cssClasses.buttonRemove="svc-logic-paneldynamic__button svc-logic-paneldynamic__remove-btn",e.cssClasses.buttonRemoveRight="svc-logic-paneldynamic__remove-btn--right",e.cssClasses.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||N.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}(Ee),rt=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 st(e,t,o,i):new at(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}(),st=function(e){function t(t,o,i,n){var r=e.call(this,t,o,i)||this;return r.selectorElementsHash=n,r}return M(t,e),t.prototype.getSelectorOptionsText=function(e){var t=e.baseClass,o="page"==t?"pe.conditionSelectPage":"panel"==t?"pe.conditionSelectPanel":"pe.conditionSelectQuestion";return N.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 he(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}(rt),at=function(e){function t(t,o,i){var n=e.call(this,t,o,i)||this;return n.isTrigger=!0,n}return M(t,e),t.prototype.recreateQuestion=function(e,t,o,i){var n=o?e.getQuestionByName(o):null;if(n){var s=e.getElementByName("triggerEditorPanel"),a=r.Serializer.createClass("panel");new Ve(t,i).setupObjPanel(a,!0,"logic");var l=a.getQuestionByName(o);if(l){var u=s.elements.indexOf(n);s.addElement(l,u),n.delete()}"setValue"===l.name&&this.updateSetValueQuestion(l),this.updateVisibilityPanel(s),a.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=N.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){return this.initialLogicAction&&this.initialLogicAction.logicType==this.logicType?(this.initialLogicAction.element.fromJSON(this.panelObj.toJSON()),this.currentLogicAction=this.initialLogicAction,!1):(this.currentLogicAction=new he(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,s){if(t.panel&&!t.panel.isDisposed){var a=t.panel.getQuestionByName(e);a&&(a.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 Ve(r,t).setupObjPanel(i,!0,"logic"),i.title="";var s=i.getQuestionByName("runExpression");(s&&this.updateRunExpressionQuestion(s),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 a=this.getQuestions();a&&e&&a.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}(rt);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 lt=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 a),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=N.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=et,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 M(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:pe("actionsEditorTitle"),titleLocation:"hidden",panelAddText:pe("addNewAction"),panelRemoveButtonLocation:"right",panelCount:0,minPanelCount:1,maxPanelCount:1,templateElements:[{name:"logicTypeName",type:"dropdown",renderAs:"logicoperator",searchEnabled:!1,allowClear:!1,title:N.getString("pe.then"),titleLocation:"left",isRequired:!0,optionsCaption:pe("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){e.cssClasses.answered="svc-logic-question--answered","logicTypeName"===e.question.name&&(e.question.allowRootStyle=!1,e.cssClasses.control+=" svc-logic-operator svc-logic-operator--action",e.cssClasses.error.root="svc-logic-operator__error",e.cssClasses.onError="svc-logic-operator--error"),"elementSelector"!==e.question.name&&"setToName"!==e.question.name&&"fromName"!==e.question.name&&"gotoName"!==e.question.name||(e.question.allowRootStyle=!1,e.cssClasses.control+=" svc-logic-operator svc-logic-operator--question",e.cssClasses.error.root="svc-logic-operator__error",e.cssClasses.onError="svc-logic-operator--error"),"setToName"!==e.question.name&&"fromName"!==e.question.name||(e.question.allowRootStyle=!1,e.question.titleLocation="left",e.question.startWithNewLine=!1,e.cssClasses.error.root="svc-logic-operator__error",e.cssClasses.onError="svc-logic-operator--error"),"setValue"===e.question.name&&(P(e.cssClasses,e.question.getType()),e.cssClasses.mainRoot+=" svc-logic-question-value"),"removeAction"===e.question.name&&(e.question.allowRootStyle=!1,e.cssClasses.mainRoot+=" svc-logic-condition-remove-question"),"panel"===e.question.name&&(e.cssClasses.root+=" svc-logic-paneldynamic",e.cssClasses.buttonAdd+=" svc-logic-operator--action ",e.cssClasses.iconRemove="svc-icon-remove",e.cssClasses.buttonRemove="svc-logic-paneldynamic__button svc-logic-paneldynamic__remove-btn",e.cssClasses.buttonRemoveRight="svc-logic-paneldynamic__remove-btn--right",e.cssClasses.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?N.getString("pe.and"):N.getString("pe.then"),o.choices=this.logicTypeChoices,o.allowClear=!1,t){var i=rt.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=rt.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 N.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 s="",a="",l=t[n],u=e.getParentElement(l);u&&(s=u.name+".",a=this.getElementText(u,i)+".");var p=this.getElementText(l,i),c=s+l.name,d=new r.ItemValue(c,a+p);this.selectorElementsHash[c]=l,l[e.propertyName]&&!this.isElementInInitialSelection(e.name,l)&&(d.enableIf="1=2",d.visibleIf="1=2"),o.push(d)}return F.sortItems(o),o},t.prototype.isElementInInitialSelection=function(e,t){return!!this.initialSelectedElements[e]&&this.initialSelectedElements[e].indexOf(t)>-1},t}(Ee);function ut(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 pt(e,t,o){var i=ut(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(10);var ct=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 a),i.setupToolbarItems(),i.update(),i}return M(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=et,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=ut(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){pt(e,t,o);var i=ut(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,s=n.getActionById("apply");return n.getActionById("cancel").title=this.getLocString("ed.lg.uncompletedRule_cancel"),s.title=this.getLocString("ed.lg.uncompletedRule_apply"),s.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 lt(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=nt.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=pe("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 Pe(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 nt(this.survey,null,this.options);return t.isModal=!1,t.editSurvey.onValueChanged.add((function(t,o){"textEditor"===o.name&&(e.expressionEditorCanShowBuilder=nt.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 pe("addNewItem")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"emptyTabPlaceholder",{get:function(){return pe("empty_tab")},enumerable:!1,configurable:!0}),L([Object(r.property)()],t.prototype,"itemsSurveyValue",void 0),L([Object(r.property)()],t.prototype,"expressionEditorIsFastEntry",void 0),L([Object(r.property)()],t.prototype,"expressionEditorCanShowBuilder",void 0),L([Object(r.property)({onSet:function(e,t){t.updateItemsSurveyData()}})],t.prototype,"questionFilter",void 0),L([Object(r.property)({onSet:function(e,t){t.updateItemsSurveyData()}})],t.prototype,"actionTypeFilter",void 0),t}(ye),dt=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 ct(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(N.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)}}));F.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:"",s.toggleVisibility()}),!0);n.locOwner=this.creator;var s=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}}));F.sortItems(t,"title"),s.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:s,action:function(){s.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 pe("showAllQuestions")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showAllActionTypesText",{get:function(){return pe("showAllActionTypes")},enumerable:!1,configurable:!0}),e}(),ht=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(!be.isCopyObject(i)&&!this.isIgnoring&&!0!==i.ignoreUndoRedo){var r=this._preparingTransaction,s=n?new ft(e,i,n):new mt(e,t,o,i);if(!r)return(r=new gt(e)).addAction(s),void this._addTransaction(r);r.addAction(s)}},e.prototype.isCorrectProperty=function(e,t){var o=r.Serializer.findProperty(e.getType(),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.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&&e.actions[0]&&this.changesFinishedCallback&&this.changesFinishedCallback(e.actions[0].getChanges(t))},e.prototype.canUndoRedoCallback=function(){},e.prototype.startTransaction=function(e){this.isIgnoring||(this.transactionCounter++,this._preparingTransaction||(this._preparingTransaction=new gt(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.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}(),gt=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}(),mt=function(){function e(e,t,o,i){this._propertyName=e,this._oldValue=t,this._newValue=o,this._sender=i}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.tryMerge=function(e,t,o){if(e!==this._sender||t!==this._propertyName||o==this._oldValue)return!1;var i=r.Serializer.findProperty(e.getType(),t);return!(!i||"string"!==i.type&&"text"!==i.type)&&(this._newValue=o,!0)},e}(),ft=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.tryMerge=function(e,t,o){return!1},e}(),yt=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.undoRedoManager=void 0,o.onBeforeUndo=new Zt,o.onBeforeRedo=new Zt,o.onAfterUndo=new Zt,o.onAfterRedo=new Zt,o.updateSurvey(),o}return M(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 ht,this.undoRedoManager.changesFinishedCallback=function(t){e.creator.notifySurveyPropertyChanged({name:t.propertyName,target:t.object,oldValue:t.oldValue,newValue:t.newValue})},this.undoRedoManager.canUndoRedoCallback=function(){e.updateUndeRedoActions()}},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()},L([Object(r.property)()],t.prototype,"undoRedoManager",void 0),t}(r.Base),vt=function(){function e(e){var t=this;this.creator=e,this.model=void 0,this.model=new yt(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 bt(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 s=this[t];try{s&&s.startTransaction(e||i);var a=r.apply(this,o);return a}finally{s&&s.stopTransaction()}},n}}function wt(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 Ct=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 M(t,e),t.prototype.hasText=function(e){return!e||(this.textInLow||(this.textInLow=this.title.toLocaleLowerCase()),this.textInLow.indexOf(e)>-1)},t}(r.Action),xt=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 F.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 Ct(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):F.getObjectName(e,!1)},e.uniqueId=0,e}(),St=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 M(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 xt(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()},L([Object(r.property)()],t.prototype,"isVisible",void 0),t}(r.Base),Tt=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 M(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=F.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;s.propertyGrid.showNavigationButtons&&(this.prevSelectionAction=new r.Action({id:"svd-grid-history-prev",iconName:"icon-arrow-left",component:"sv-action-bar-item",title:_("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:_("ed.nextSelected"),showTitle:!1,enabled:this.hasNext,action:function(){e.selectionController.next()}}));var t=new St(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()},popupModel:this.selectorPopupModel})},L([Object(r.property)()],t.prototype,"hasPrev",void 0),L([Object(r.property)()],t.prototype,"hasNext",void 0),L([Object(r.property)()],t.prototype,"survey",void 0),L([Object(r.property)()],t.prototype,"selectedElementName",void 0),t}(r.Base),Pt=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 M(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)},L([Object(r.property)()],t.prototype,"page2Display",void 0),t}(r.Base);o(11);var Et=r.settings.allowShowEmptyTitleInDesignMode,Ot=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.pagesControllerValue=new Pt(t),o.initSurvey(),o}return M(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,r.DragDropSurveyElements.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 _("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=F.getNewPageName(this.survey.pages)),this.pagesController.raisePagesChanged())},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(!F.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},L([Object(r.property)()],t.prototype,"newPage",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"showNewPage",void 0),L([Object(r.property)()],t.prototype,"pageCount",void 0),L([Object(r.property)()],t.prototype,"designerCss",void 0),L([Object(r.property)()],t.prototype,"showPlaceholder",void 0),t}(r.Base),It=function(){function e(e){var t=this;this.creator=e,e.addPluginTab("designer",this);var o=new Ne(e.survey,e);this.propertyGrid=new Tt(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 Ot(this.creator),this.creator.sidebar.activeTab=this.propertyGridTab.id},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(12);var Vt=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}(),Nt=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 M(t,e),L([Object(r.property)({onSet:function(e,t){t.sidePanel.headerText=t.caption}})],t.prototype,"caption",void 0),L([Object(r.property)({onSet:function(e,t){t.sidePanel.updateHasVisibleTabs()}})],t.prototype,"visible",void 0),L([Object(r.property)()],t.prototype,"model",void 0),L([Object(r.property)()],t.prototype,"componentName",void 0),t}(r.Base),_t=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}(),At=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 M(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 _("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 Nt(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 _t(e,this.getCurrentHandles())},t.prototype.resetResizeManager=function(){this.resizeManager&&(this.resizeManager.dispose(),this.resizeManager=void 0)},L([Object(r.propertyArray)()],t.prototype,"tabs",void 0),L([Object(r.property)()],t.prototype,"headerText",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"visible",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"collapsedManually",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"expandedManually",void 0),L([Object(r.property)()],t.prototype,"hasVisibleTabs",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"flyoutMode",void 0),L([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),Lt=function(){function e(e){this.question=e}return e.createItemsNavigator=function(e){return e instanceof r.QuestionImagePickerModel?null:e instanceof r.QuestionMultipleTextModel?new jt(e):e instanceof r.QuestionMatrixDropdownModel?new Rt(e):e instanceof r.QuestionMatrixDynamicModel?new kt(e):e instanceof r.QuestionMatrixModel?new Dt(e):e instanceof r.QuestionSelectBase?new Mt(e):null},e.prototype.addNewItems=function(e,t,o){var i=e.slice(0,t).concat(o.map((function(e){return new r.ItemValue(e)}))).concat(e.slice(t+1));this.question[this.getItemsPropertyName(e)]=i},e.prototype.setEventsForItem=function(e,t){var o=this,i=qt.get(this.getItemLocString(e,t));i.onEditComplete.clear(),i.onEditComplete.add((function(){var i=e.indexOf(t);i>=0&&i<e.length-1&&qt.get(o.getItemLocString(e,e[i+1])).activateEditor(),i==e.length-1&&(o.addNewItem(e),qt.get(o.getItemLocString(e,e[e.length-1])).setAutoFocus(),qt.get(o.getItemLocString(e,e[e.length-1])).activateEditor())})),i.onBackspaceEmptyString.clear(),i.onBackspaceEmptyString.add((function(){var i=e.indexOf(t),n=null;if(-1!==i){if(0==i&&e.length>=2&&(n=e[1]),i>0&&(n=e[i-1]),n){var r=qt.get(o.getItemLocString(e,n));r.setAutoFocus(),r.activateEditor()}e.splice(i,1)}})),i.onTextChanging.clear(),i.onTextChanging.add((function(i,n){var r=n.value.split(/\r?\n/).filter((function(e){return!!e}));if(!(r.length<=1)){n.cancel=!0;var s=e.indexOf(t);o.addNewItems(e,s,r);var a=s+r.length;a>=e.length&&(a=e.length-1),qt.get(o.getItemLocString(e,e[a])).setAutoFocus(),qt.get(o.getItemLocString(e,e[a])).activateEditor()}}))},e.setQuestion=function(t){var o=t.element,i=e.createItemsNavigator(o);if(i){var n=qt.get(o.locTitle),r=i.getItemSets(),s=r[0];n.hasEditCompleteHandler||(n.onEditComplete.add((function(){s.length&&qt.get(i.getItemLocString(s,s[0])).activateEditor()})),n.hasEditCompleteHandler=!0),r.forEach((function(e){e.forEach((function(t){i.setEventsForItem(e,t)}));var t=i.getItemsPropertyName(e);o.onPropertyChanged.add((function(o,n){n.name==t&&e.forEach((function(t){i.setEventsForItem(e,t)}))}))}))}return!!i},e}(),Mt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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){void 0===t&&(t=null),this.question.choices.push(new r.ItemValue(t||h("item",e.map((function(e){return e.value})))))},t.prototype.getItemsPropertyName=function(e){return"choices"},t}(Lt),jt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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){void 0===t&&(t=null),this.question.addItem(t||h("text",e.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}(Lt),Dt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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){void 0===t&&(t=null),e==this.question.columns&&this.question.addColumn(t||h("Column ",e.map((function(e){return e.value})))),e==this.question.rows&&this.question.rows.push(t||new r.ItemValue(h("Row ",e.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}(Lt),Rt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(Dt),kt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.getItemSets=function(){return[this.question.columns]},t}(Rt),qt=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 M(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),Ht=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=qt.get(t),i.connector.onDoActivate.add((function(){i.activate()})),i.checkMarkdownToTextConversion(i.locString.owner,i.locString.name),i}return M(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=qt.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,s={obj:n,propertyName:this.locString.name,value:this.locString.text,newValue:i,doValidation:!1};if(this.creator.onValueChangingCallback(s),i=s.newValue,this.errorText=this.creator.onGetErrorTextOnValidationCallback(this.locString.name,n,i),!this.errorText&&!i){var a=n.getPropertyByName&&n.getPropertyByName(this.locString.name);a&&a.isRequired&&(this.errorText=N.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)this.locString.owner.value=i;else{var l=this.locString.storeDefaultText;this.locString.storeDefaultText=!1,this.locString.text=i,this.locString.storeDefaultText=l}}this.focused=!1,null===window||void 0===window||window.getSelection().removeAllRanges()},t.prototype.done=function(e){e.stopImmediatePropagation(),e.preventDefault()},t.prototype.onKeyDown=function(e){return 13===e.keyCode&&(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=N.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()},L([Object(r.property)()],t.prototype,"errorText",void 0),L([Object(r.property)()],t.prototype,"focused",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"editAsText",void 0),L([Object(r.property)()],t.prototype,"placeholderValue",void 0),t}(r.Base);o(13),o(14),o(15);var Bt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t}(r.Action),Qt=function(e){function t(t){return e.call(this,t)||this}return M(t,e),t}(r.Action),Ft=function(e){function t(){var t=e.call(this)||this;return t.dotsItem.popupModel.horizontalPosition="center",t.minVisibleItemsCount=1,t}return M(t,e),t}(r.AdaptiveActionContainer),Ut=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o}return M(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),Zt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t}(r.EventBase),Gt=function(e){function t(t,o){var i=e.call(this)||this;i.options=t,i.isRTLValue=!1,i.alwaySaveTextInPropertyEditorsValue=!1,i.pageEditModeValue="standard",i.newQuestions=[],i.newPanels=[],i.plugins={},i.onElementDeleting=new Zt,i.onGetPropertyReadOnly=new Zt,i.onSurveyInstanceCreated=new Zt,i.onGetObjectDisplayName=new Zt,i.onHtmlToMarkdown=new Zt,i.onElementAllowOperations=new Zt,i.onDefineElementMenuItems=new Zt,i.onShowingProperty=new Zt,i.onCanShowProperty=i.onShowingProperty,i.onPropertyGridSurveyCreated=new Zt,i.onPropertyEditorCreated=new Zt,i.onPropertyEditorUpdateTitleActions=new Zt,i.onPropertyGridShowModal=new Zt,i.onCanDeleteItem=new Zt,i.onCollectionItemDeleting=new Zt,i.onCollectionItemAllowOperations=new Zt,i.onItemValueAdded=new Zt,i.onMatrixColumnAdded=new Zt,i.onSetPropertyEditorOptions=new Zt,i.onGenerateNewName=new Zt,i.onPropertyValidationCustomError=new Zt,i.onPropertyValueChanging=new Zt,i.onSurveyPropertyValueChanged=new Zt,i.onConditionQuestionsGetList=new Zt,i.onConditionGetTitle=new Zt,i.onLogicItemDisplayText=new Zt,i.onModified=new Zt,i.onQuestionAdded=new Zt,i.onPanelAdded=new Zt,i.onPageAdded=new Zt,i.onDesignerSurveyCreated=new Zt,i.onPreviewSurveyCreated=new Zt,i.onTestSurveyCreated=i.onPreviewSurveyCreated,i.onNotify=new Zt,i.onSelectedElementChanging=new Zt,i.onSelectedElementChanged=new Zt,i.onOpenFileChooser=new Zt,i.onUploadFile=new Zt,i.onTranslationStringVisibility=new Zt,i.onTranslationLocaleInitiallySelected=new Zt,i.onTranslationImportItem=new Zt,i.onTranslationImported=new Zt,i.onTranslationExportItem=new Zt,i.onTranslationItemChanging=new Zt,i.onDragDropAllow=new Zt,i.maxLogicItemsInCondition=-1,i.showObjectTitles=!1,i.maxVisibleChoices=10,i.showTitlesInExpressions=!1,i.allowEditExpressionsInTextEditor=!0,i.maximumColumnsCount=s.propertyGrid.maximumColumnsCount,i.maximumChoicesCount=s.propertyGrid.maximumChoicesCount,i.maximumRowsCount=s.propertyGrid.maximumRowsCount,i.maximumRateValues=s.propertyGrid.maximumRateValues,i.showPagesInTestSurveyTab=!0,i.showSimulatorInTestSurveyTab=!0,i.themeForPreview="defaultV2",i._allowModifyPages=!0,i.showDefaultLanguageInTestSurveyTab="auto",i.showInvisibleElementsInTestSurveyTab=!0,i.showPageSelectorInToolbar=!1,i.allowChangeThemeInPreview=!0,i.showErrorOnFailedSave=!0,i.onActiveTabChanging=new Zt,i.onActiveTabChanged=new Zt,i.showSidebarValue=!0,i.onShowSidebarVisibilityChanged=new Zt,i.onShowPropertyGridVisiblityChanged=new Zt,i.onBeforeUndo=new Zt,i.onBeforeRedo=new Zt,i.onAfterUndo=new Zt,i.onAfterRedo=new Zt,i.onPageAdding=new Zt,i.onDragStart=new r.Event,i.onBeforeDrop=i.onDragStart,i.onDragEnd=new r.Event,i.onAfterDrop=i.onDragEnd,i.onStateChanged=new Zt,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&&no(e.target)||t.execute(i.selectElement))}))},i.shortcuts={},i.autoSaveDelay=s.autoSave.delay,i.autoSaveTimerId=null,i.saveNo=0,(o||"string"==typeof i.options||i.options instanceof String)&&(i.options=o||{},F.warnText("Creator constructor has one parameter, as creator options, in V2.")),i.previewOrientation=t.previewOrientation,i.toolbarValue=new Ut(i),i.toolbarValue.locOwner=i,i.tabbedMenu=new Ft,i.tabbedMenu.locOwner=i,i.selectionHistoryControllerValue=new U(i),i.sidebar=new At(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 M(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,s=o?0==o.indexOf("ed.")?o:"":"ed."+e;s&&(o=void 0);var a=new Qt({id:e,locTitleName:s,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,a):this.tabs.push(a),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 N.getString(e)},t.prototype.onSetReadOnly=function(e){},Object.defineProperty(t.prototype,"locale",{get:function(){return this.getPropertyValue("locale",N.currentLocale)},set:function(e){if(N.currentLocale!==e){N.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&&F.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||(F.warnNonSupported("onShowPropertyGridVisiblityChanged","onShowSidebarVisibilityChanged"),this.onShowPropertyGridVisiblityChanged.fire(this,{show:e}))):F.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 F.warnNonSupported("showPropertyGrid","showSidebar"),this.showSidebar},set:function(e){F.warnNonSupported("showPropertyGrid","showSidebar"),!0===e||!1===e?this.showSidebar=e:F.warnText("showSidebar is a boolean property.")},enumerable:!1,configurable:!0}),t.prototype.rightContainerActiveItem=function(e){F.warnNonSupported("rightContainerActiveItem")},t.prototype.leftContainerActiveItem=function(e){F.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=F.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 vt(this)),this.showDesignerTab&&new It(this),this.showPreviewTab&&new re(this),this.showLogicTab&&new dt(this),this.showJSONEditorTab&&(Y.hasAceEditor()?new Y(this):new ee(this)),this.showEmbeddedSurveyTab&&new J(this),this.showTranslationTab&&new $e(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 s=r.Serializer.findProperty(e,o[n]);s&&(s.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 s=!0;if(o instanceof r.QuestionSelectBase&&(s=o.isItemInList(e)),!1===this.getElementAllowOperations(o).allowEdit)return!1;var a={allowDelete:!0,allowEdit:s,allowAdd:!0};if(this.onCollectionItemAllowingCallback(o,n,o.getPropertyValue(null==i?void 0:i.name),e,a),!1===a.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 s={obj:e,property:t,readOnly:r,propertyName:t.name,parentObj:i,parentProperty:n};return this.onGetPropertyReadOnly.fire(this,s),s.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;r.DragDropSurveyElements.restrictDragQuestionBetweenPages=s.dragDrop.restrictDragQuestionBetweenPages,this.dragDropSurveyElements=new r.DragDropSurveyElements(null,this);var t=!1;this.dragDropSurveyElements.onDragStart.add((function(o,i){var n=o.dropTarget.parent;t=!o.draggedElement.parent,e.onDragStart.fire(o,i),e.startUndoRedoTransaction("drag drop"),e.undoRedoManager.setUndoCallbackForTransaction((function(){n.updateRows()}))})),this.dragDropSurveyElements.onDragEnd.add((function(o,i){e.stopUndoRedoTransaction(),e.selectElement(i.draggedElement,void 0,!1,t),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&&s.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 ye(this.survey,this)},t.prototype.updateLogicOnQuestionNameChanged=function(e,t){e!==t&&s.logic.updateExpressionsOnChanging.questionName&&(this.surveyLogicRenaming=!0,this.getSurveyLogicForUpdate().renameQuestion(e,t),this.surveyLogicRenaming=!1)},t.prototype.updateLogicOnColumnNameChanged=function(e,t,o){t&&t!==o&&s.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=s.defaultNewSurveyJSON;return e.pages&&e.pages.length>0&&e.pages[0].name&&(e.pages[0].name=N.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=s.jsonEditor.indentation;return this.generateValidJSON?JSON.stringify(e,null,t):(new j).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 Q(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 Q(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=F.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||Wt(o,this),o.needRenderIcons=!1,"designer"!=t&&"test"!=t&&(o.locale=N.currentLocale),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.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=q.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 s=this.findRowByElement(r,n);s&&this.isRowMultiline(s)?this.addElemenMultiline(n,e,o,s):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 ye(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(F.getElements(e[i]),t,o)},t.prototype.getNewName=function(e,t){return"page"==e?F.getNewPageName(this.survey.pages):t?this.getNewPanelName():this.getNewQuestionName()},t.prototype.getNewQuestionName=function(){return F.getNewQuestionName(this.getAllQuestions())},t.prototype.getNewPanelName=function(){return F.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:F.getObjectType(e),allowing:!0};this.onElementDeleting.fire(this,t),t.allowing&&this.deleteObjectCore(e)},t.prototype.updateConditionsOnRemove=function(e){if(F.getObjectType(e)==H.Question)t=[e];else var t=e.questions;if(t)for(var o=new ye(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 s="string"==typeof t?r.parentElement.querySelector(t):r.parentElement;s&&s.focus()}}n&&e&&qt.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 Ye(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=s.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,!0))},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(F.getObjectType(e)===H.Unknown)return null;return(F.getObjectType(e)===H.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=F.generateNewName(o.name));!this.isNameUnique(e,o.name);)o.name=F.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=F.getObjectType(t);o!==H.Question&&o!==H.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),s.toggleVisibility()}),!1);n.locOwner=this;var s=new r.PopupModel("sv-list",{model:n},"bottom","center");return{iconName:"icon-more",title:this.getLocString("ed.addNewQuestion"),action:function(){s.displayMode=o.isMobileView?"overlay":"popup",s.toggleVisibility()},popupModel:s}},t.prototype.addNewQuestionInPage=function(e,t,o){void 0===t&&(t=null),void 0===o&&(o=null),o||(o=this.currentAddQuestionType),o||(o=s.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,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 c(this.getChoicesItemBaseTitle(),e.choices)},t.prototype.createNewItemValue=function(e){var t=this.getNextItemValue(e),o=e.createItemValue(t);return o.text=d(e.choices),o},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 Vt(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)},L([Object(r.property)({defaultValue:!0})],t.prototype,"showDesignerTab",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"showJSONEditorTab",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"showTestSurveyTab",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"showEmbeddedSurveyTab",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"showTranslationTab",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"showLogicTab",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"useTableViewInLogicTab",void 0),L([Object(r.property)({defaultValue:200})],t.prototype,"pageHoverDelay",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"inplaceEditForValues",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"haveCommercialLicense",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"isAutoSave",void 0),L([Object(r.property)()],t.prototype,"showOptions",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"showSearch",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"generateValidJSON",void 0),L([Object(r.property)({defaultValue:""})],t.prototype,"currentAddQuestionType",void 0),L([Object(r.property)({defaultValue:"landscape"})],t.prototype,"previewOrientation",void 0),L([Object(r.property)()],t.prototype,"surveyValue",void 0),L([Object(r.property)()],t.prototype,"viewType",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"showToolboxValue",void 0),L([bt()],t.prototype,"addPage",null),L([wt()],t.prototype,"doOnQuestionAdded",null),L([wt()],t.prototype,"doOnPanelAdded",null),L([wt()],t.prototype,"doOnPageAdded",null),L([bt()],t.prototype,"deleteObject",null),L([Object(r.property)({defaultValue:!1})],t.prototype,"showSaveButton",void 0),L([bt()],t.prototype,"convertCurrentQuestion",null),L([bt()],t.prototype,"addNewQuestionInPage",null),L([Object(r.property)({defaultValue:!1})],t.prototype,"showHeaderInEmptySurvey",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"showPageNavigator",void 0),L([Object(r.property)({getDefaultValue:function(){return s.layout.showTabs}})],t.prototype,"showTabs",void 0),L([Object(r.property)({getDefaultValue:function(){return s.layout.showToolbar}})],t.prototype,"showToolbar",void 0),L([Object(r.property)({getDefaultValue:function(){return s.layout.allowCollapseSidebar}})],t.prototype,"allowCollapseSidebar",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"isMobileView",void 0),L([Object(r.property)({defaultValue:"left",onSet:function(e,t){t.toolbox&&(t.toolbox.setLocation(e),t.updateToolboxIsCompact())}})],t.prototype,"toolboxLocation",void 0),L([Object(r.property)({defaultValue:"right"})],t.prototype,"sidebarLocation",void 0),L([Object(r.property)({defaultValue:!1,onSet:function(e,t){if(!e)throw new Error("Creator is disposed")}})],t.prototype,"isCreatorDisposed",void 0),t}(r.Base),zt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t}(Gt),Jt=function(){function e(){}return Object.defineProperty(e,"currentTheme",{get:function(){F.warnNonSupported("StylesManager")},set:function(e){F.warnNonSupported("StylesManager")},enumerable:!1,configurable:!0}),e.applyTheme=function(e){F.warnNonSupported("StylesManager")},e}();function Wt(e,t){e.creator=t,e.isPopupEditorContent=!1;var o=e.getElementWrapperComponentName;e.getElementWrapperComponentName=function(t,i){return Yt(t,i,e.isPopupEditorContent)||o.call(e,t,i)};var i=e.getQuestionContentWrapperComponentName;e.getQuestionContentWrapperComponentName=function(t,o){return $t(t)||i.call(e,t,o)};var n=e.getElementWrapperComponentData;e.getElementWrapperComponentData=function(o,i){return eo(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 to(e,t)},e.getItemValueWrapperComponentData=function(e,o){return oo(e,o,t)},e.getRendererForString=function(e,o){if(!t.readOnly&&io(e,o))return Xt},e.getRendererContextForString=function(e,o){return!t.readOnly&&io(e,o.name)?{creator:t,element:e,locStr:o}:o}}function Kt(e){for(var t=e;t;){if(t.isContentElement)return!0;t=t.parentQuestion}return!1}var Xt="svc-string-editor";function Yt(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(!Kt(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 $t(e){if(e.isDescendantOf("rating")&&!Kt(e))return"svc-rating-question-content"}function eo(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}:Yt(e,t,!1)?e instanceof r.Question||e instanceof r.PanelModel?o:null:void 0}function to(e,t){return Kt(t)?r.SurveyModel.TemplateRendererComponentName:t.isDescendantOf("imagepicker")?"svc-image-item-value":"svc-item-value"}function oo(e,t,o){return t.isContentElement?e:{creator:o,question:t,item:e}}function io(e,t){return!(!!e.data&&e.parentQuestion instanceof r.QuestionMatrixDropdownModelBase)&&(!Kt(e)||e.isEditableTemplateElement)}function no(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 ro(e,t){F.warnNonSupported("registerAdorner","This functionality is no longer supported.")}function so(e){void 0===e&&(e=void 0),F.warnNonSupported("removeAdorners","This functionality is no longer supported.")}var ao=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 M(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(16),o(17);var lo=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 M(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 _("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,s=0;return this.pagesController.pages.forEach((function(e){var o=document.getElementById(e.id);if(o){var a=o.offsetTop,l=a+o.clientHeight;if(!(a<i||l>t))return;var u=a-t,p=i-l,c=o.clientHeight;u<0&&(c+=u),p<0&&(c+=p),(c/=o.clientHeight)>0&&(n.push({page:e,visiblePart:c}),c>s&&(s=c,r=e))}})),this.currentPage=r,n},t.prototype.stopItemsContainerHeightObserver=function(){this._itemsContainer=void 0,this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=void 0),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,L([Object(r.propertyArray)()],t.prototype,"items",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"visible",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"isPopupOpened",void 0),L([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),L([Object(r.property)({defaultValue:0})],t.prototype,"visibleItemsStartIndex",void 0),L([Object(r.property)({defaultValue:Number.MAX_VALUE})],t.prototype,"visibleItemsCount",void 0),t}(r.Base),uo=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 M(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.updateElementAllowOptions(this.creator.getElementAllowOperations(this.surveyElement),this.isOperationsAllow())},t.prototype.updateElementAllowOptions=function(e,t){this.allowDragging=t&&e.allowDragging,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},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&&s.designer.showAddQuestionButton)},t.prototype.duplicate=function(){},L([Object(r.property)({defaultValue:!0})],t.prototype,"allowDragging",void 0),t}(r.Base);o(18);var po=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=F.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(i.page),i}return M(t,e),t.prototype.attachElement=function(t){var o=this;e.prototype.attachElement.call(this,t),this.page&&(this.page.surveyChangedCallback=function(){o.isPageLive=!!o.page.survey},this.isGhost&&(this.updateActionsProperties(),this.page.registerFunctionOnPropertiesValueChanged(["title","description"],(function(){o.addGhostPage()})),this.patchPageForDragDrop(this.page,this.addGhostPage)),this.page.onFirstRendering(),this.page.updateCustomWidgets(),this.page.setWasShown(!0),this.checkActionProperties())},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.page&&this.page.unRegisterFunctionOnPropertiesValueChanged(["title","description"]),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){var o=this;this.creator.addNewQuestionInPage((function(e){o.addGhostPage(!1),o.creator.survey.currentPage=o.page}),null,this.currentAddQuestionType||s.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(){return this.isGhost?"svc-page__content--new":this.creator.isElementSelected(this.page)?"svc-page__content--selected":""},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}),L([Object(r.property)({defaultValue:!1})],t.prototype,"isSelected",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"isPageLive",void 0),L([Object(r.property)({defaultValue:""})],t.prototype,"currentAddQuestionType",void 0),t}(uo);o(19);var co=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 M(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":e=e.replace(" svc-row--ghost",""),e},enumerable:!1,configurable:!0}),t}(r.Base);o(20);var ho=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),n.dragTypeOverMe=new r.ComputedUpdater((function(){return("paneldynamic"===n.surveyElement.getType()?n.surveyElement.template:n.surveyElement).dragTypeOverMe})),Lt.setQuestion(n),n}return M(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(){var e="function"==typeof this.surveyElement.getType?"svc-question__content--"+this.surveyElement.getType():"";return 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?e+=" svc-question__content--drag-over-left":e=e.replace(" svc-question__content--drag-over-left",""),this.dragTypeOverMe===r.DragTypeOverMeEnum.MultilineRight?e+=" svc-question__content--drag-over-right":e=e.replace(" svc-question__content--drag-over-right",""),e},Object.defineProperty(t.prototype,"isDragMe",{get:function(){return this.surveyElement.isDragMe},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this.surveyElement.unRegisterFunctionOnPropertyValueChanged("isRequired","isRequiredAdorner"),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);var i=r.Serializer.findProperty(this.surveyElement.getType(),"isRequired"),n=this.creator.onIsPropertyReadOnlyCallback(this.surveyElement,i,i.readOnly,null,null);this.updateActionVisibility("isrequired",o&&t.allowChangeRequired&&!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?_("ed.htmlPlaceHolder"):_("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=q.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,s=e.creator.createIActionBarItemByClass(n.name,n.title,n.iconName,r);i=n,o.push(s)})),o},Object.defineProperty(t.prototype,"currentType",{get:function(){return this.surveyElement.getType()},enumerable:!1,configurable:!0}),t.prototype.createConverToAction=function(){var e=this,t=this.getConvertToTypesActions(),o=t.length>0,i=this.currentType,n=t.filter((function(e){return e.id===i})),s=n.length>0?n[0].title:this.creator.getLocString("qt."+this.currentType),a=Object(r.createDropdownActionModel)({id:"convertTo",css:"sv-action--convertTo sv-action-bar-item--secondary",iconName:"icon-drop-down-arrow_16x16",iconSize:16,title:s,visibleIndex:0,enabled:o,disableShrink:!0,action:function(t){a.popupModel.displayMode=e.creator.isMobileView?"overlay":"popup"}},{items:t,onSelectionChanged:function(t){e.creator.convertCurrentQuestion(t.id)},allowSelection:!0,selectedItem:n.length>0?n[0]:void 0,horizontalPosition:"center"});return a},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.createConverToAction()),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||s.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}),L([Object(r.property)()],t.prototype,"isDragged",void 0),L([Object(r.property)({defaultValue:""})],t.prototype,"currentAddQuestionType",void 0),L([Object(r.property)()],t.prototype,"dragTypeOverMe",void 0),t}(uo);o(2);var go=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 M(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?N.getString("ed.showMoreChoices"):N.getString("ed.showLessChoices")},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.surveyElement.unRegisterFunctionOnPropertyValueChanged("isSelectedInDesigner","dropdownCollapseChecker")},L([Object(r.property)({defaultValue:!0})],t.prototype,"isCollapsed",void 0),L([Object(r.property)({defaultValue:-1})],t.prototype,"visibleCount",void 0),t}(ho);o(21);var mo=function(e){function t(t,o,i,n){var r=e.call(this,t,o,i)||this;return r.questionRoot=n,r}return M(t,e),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}))}))},L([Object(r.property)({defaultValue:!1})],t.prototype,"isUploading",void 0),t}(ho);o(22);var fo=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 M(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this.surveyElement},enumerable:!1,configurable:!0}),t.prototype.addItem=function(e){if(e.allowAdd)if(0===e.element.rateValues.length)e.element.rateMax+=e.element.rateStep;else{var t,o=e.element.rateValues.map((function(e){return e.value}));t=h(e.creator.getChoicesItemBaseTitle(),o);var i=new r.ItemValue(t);i.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([i]);var n=e.element.rateValues;e.creator.onItemValueAddedCallback(e.element,"rateValues",n[n.length-1],n)}},t.prototype.removeItem=function(e){if(e.allowRemove){var t=r.Serializer.findProperty(e.element.getType(),"rateValues"),o=e.element.rateValues&&e.element.rateValues.length-1,i=e.element.rateValues&&e.element.rateValues[o]||null;if(e.creator.onCollectionItemDeletingCallback(e.element,t,e.element.rateValues,i)){var n=e.element;0===n.rateValues.length&&o===n.rateValues.length-1?n.rateMax-=n.rateStep:(0===n.rateValues.length&&(n.rateValues=n.rateValues),n.rateValues.splice(o,1))}}},Object.defineProperty(t.prototype,"allowAdd",{get:function(){return!this.creator.readOnly&&(this.creator.maximumRateValues<1||(this.element.rateValues.length>0||this.creator.maximumRateValues>this.element.rateMax)&&(this.element.rateValues.length<1||this.creator.maximumRateValues>this.element.rateValues.length))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowRemove",{get:function(){return!this.creator.readOnly},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"addTooltip",{get:function(){return _("pe.addItem")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"removeTooltip",{get:function(){return _("pe.removeItem")},enumerable:!1,configurable:!0}),t}(r.Base);o(23);var yo=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.dragDropHelper.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 s=function(){n.updateIsNew(o,i)};return o.noneItem===i?o.registerFunctionOnPropertyValueChanged("showNoneItem",s):o.otherItem===i?o.registerFunctionOnPropertyValueChanged("showOtherItem",s):o.isDescendantOf("checkbox")&&o.selectAllItem===i?o.registerFunctionOnPropertyValueChanged("showSelectAllItem",s):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 M(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"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)},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);t.choices.push(i),this.updateNewItemValue(),o.onItemValueAddedCallback(t,this.collectionPropertyName,i,t.choices),qt.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 _(this.isNew?"pe.addItem":"pe.removeItem")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dragTooltip",{get:function(){return _("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.creator.selectElement(e.question,"choices",!1),t&&t.stopPropagation()},L([Object(r.property)({defaultValue:!1})],t.prototype,"isNew",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"isDragging",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"isDragDropGhost",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"isDragDropMoveDown",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"isDragDropMoveUp",void 0),L([Object(r.property)({defaultValue:null})],t.prototype,"ghostPosition",void 0),t}(r.Base);o(24);var vo=function(e){function t(t,o,i,n,r){var s=e.call(this,t,o,i)||this;return s.question=o,s.item=i,s.templateData=n,s.itemsRoot=r,s.isChoosingNewFile=!1,s.onDragOver=function(e){s.isFileDragging=!0,e.dataTransfer.dropEffect="copy",e.preventDefault()},s.onDrop=function(e){s.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]);s.uploadFiles(o)}},s.onDragLeave=function(e){s.isFileDragging=!1},s}return M(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){var i=t.creator.createNewItemValue(t.question);i.imageLink=o,t.question.choices.push(i),t.isChoosingNewFile&&t.creator&&(t.creator.onItemValueAddedCallback(t.question,"choices",i,t.question.choices),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)}))},L([Object(r.property)({defaultValue:!1})],t.prototype,"isFileDragging",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"isUploading",void 0),t}(yo);o(25);var bo=function(){function e(e,t){this.cellQuestion=t;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.survey.getAllQuestions()[0].setSurveyImpl(this.survey)}return Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),e.prototype.apply=function(){var e=this.cellQuestion.parentQuestion,t=e.getColumnByName(this.cellQuestion.name),o=t.toJSON().cellType,i=this.survey.getAllQuestions()[0].toJSON();o&&(i.cellType=o),t.fromJSON(i),e.onColumnCellTypeChanged(t)},e}(),wo=function(e){function t(t,o,i,n,r){var s=e.call(this)||this;return s.creator=t,s.templateData=o,s.question=i,s.row=n,s.column=r,s.onSelectionChanged=function(e,t){s.context&&s.context.getPropertyValue?s.isSelected=s.creator.isElementSelected(s.context):s.isSelected=!1},t.onSelectedElementChanged.add(s.onSelectionChanged),s}return M(t,e),t.prototype.editQuestion=function(e){var t=new bo(e.creator,e.question);r.settings.showModal("svc-question-editor-content",{survey:t.survey,creator:this.creator},(function(){return t.apply(),!0}),void 0,"svc-matrix-cell__popup",e.question.name,this.creator.isMobileView?"overlay":"popup")},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())},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)},L([Object(r.property)()],t.prototype,"isSelected",void 0),t}(r.Base);o(26);var Co=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=xo(t.data,o+1),i.lvl=o,i}return M(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}),L([Object(r.property)({defaultValue:!0})],t.prototype,"collapsed",void 0),L([Object(r.property)({defaultValue:0})],t.prototype,"lvl",void 0),L([Object(r.property)()],t.prototype,"items",void 0),t}(r.Base);function xo(e,t){return void 0===e&&(e=[]),e.filter((function(e){return!!e})).map((function(e){return new Co(e,t)}))}var So=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=xo(i,0),o}return M(t,e),t.prototype.getLocString=function(e){return N.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}),L([Object(r.property)({defaultValue:"table"})],t.prototype,"resultViewType",void 0),L([Object(r.property)({defaultValue:""})],t.prototype,"resultText",void 0),L([Object(r.propertyArray)()],t.prototype,"resultData",void 0),t}(r.Base);o(27);var To=function(e){function t(t,o){var i=e.call(this)||this;return i.creator=t,i.root=o,i}return M(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}),L([Object(r.property)({defaultValue:!1})],t.prototype,"isUploading",void 0),t}(r.Base),Po=function(e){function t(t){var o=e.call(this,t)||this;return o.onEmbeddedSurveyValueChanged=function(){},o}return M(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 Po("")}),"nonvalue"),r.QuestionFactory.Instance.registerQuestion("embeddedsurvey",(function(e){return new Po(e)})),o(28);var Eo=function(e){function t(t,o){void 0===o&&(o=null);var i=e.call(this,t)||this,n=o&&!o.showValueInLink&&N.getString("pe.set")+" "+o.title||null;return i.linkValueText=n||N.getString("pe.emptyValue"),i}return M(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)))},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()?N.getString("pe.emptyValue"):this.getObjDisplayValue():N.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},L([Object(r.property)({defaultValue:"svc-link-value-button svc-question-link__set-button"})],t.prototype,"linkSetButtonCssClasses",void 0),L([Object(r.property)({defaultValue:"svc-question-link__clear-button"})],t.prototype,"linkClearButtonCssClasses",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"isSelected",void 0),L([Object(r.property)()],t.prototype,"linkValueText",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"showClear",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"allowClear",void 0),L([Object(r.property)({defaultValue:!0})],t.prototype,"showValueInLink",void 0),L([Object(r.property)({defaultValue:!1})],t.prototype,"showTooltip",void 0),t}(r.Question);r.Serializer.addClass("linkvalue",["showValueInLink",{name:"showTooltip: boolean",default:!1,visible:!1}],(function(e){return new Eo("",e)}),"nonvalue"),r.QuestionFactory.Instance.registerQuestion("linkvalue",(function(e){return new Eo(e)}));var Oo=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.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 M(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);e?t.value++:t.value--,this.value=t.value},Object.defineProperty(t.prototype,"showUnitsInEditor",{get:function(){return!!this.unit&&this._showUnitsInEditor},enumerable:!1,configurable:!0}),t.prototype.correctValue=function(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}),L([Object(r.property)()],t.prototype,"unit",void 0),L([Object(r.property)()],t.prototype,"_showUnitsInEditor",void 0),t}(r.QuestionTextModel);r.Serializer.addClass("spinedit",["unit"],(function(){return new Oo("")}),"text"),r.QuestionFactory.Instance.registerQuestion("spinedit",(function(e){return new Oo(e)}));var Io=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.getCorrectedValue=function(e){if(4===(e=((e=null!=e?e:"").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.toUpperCase()},t.prototype.setNewValue=function(t){this._renderedValue="",e.prototype.setNewValue.call(this,this.getCorrectedValue(t)),this._renderedValue=this.value},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"},Object.defineProperty(t.prototype,"renderedValue",{get:function(){var e,t;return null!==(t=null!==(e=this._renderedValue)&&void 0!==e?e:this.value)&&void 0!==t?t:"#000000"},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}),L([Object(r.property)()],t.prototype,"unit",void 0),L([Object(r.property)({})],t.prototype,"_renderedValue",void 0),t}(r.QuestionTextModel);r.Serializer.addClass("color",["unit"],(function(){return new Io("")}),"text"),r.QuestionFactory.Instance.registerQuestion("color",(function(e){return new Io(e)}));var Vo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(_e),No=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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 nt(e.getSurvey(),e,i,t.name)},t}(Vo);Oe.register(new Vo),Oe.register(new No);var _o=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=N.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=N.getString("pe.fastEntryChoicesCountError").format(i,o))}else if(r.isValueUnique){var n=r.getFirstUniqueValue();n&&(t.error=N.getString("pe.fastEntryNonUniqueError").format(n))}})),r}return M(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),s=r.Serializer.createClass(this.className);this.names.forEach((function(e,t){s[e]=n[t]})),t.push(s)}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 s="text"==n?e.pureText:e[n]}else s=e[n];if(s){for(var a=0;a<o;a++)i+=r.ItemValue.Separator;i+=s,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}(Ee),Ao=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 M(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}(_o),Lo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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.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.text}))),"title"===o&&"matrixdropdowncolumn"===i&&(t.placeholder=new r.ComputedUpdater((function(){return e.title}))))},t.prototype.onMatrixCellCreated=function(e,t){var o=t.row.editingObj;if(o){var i=t.cellQuestion;i.obj=o,this.initializePlaceholder(o,i,t.columnName),i.property=r.Serializer.findProperty(o.getType(),t.columnName)}},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,s=t.actions;this.getEditItemAsStandAlone()&&s.push({id:"svd-grid-edit-column",iconName:"icon-edit",title:N.getString("pe.edit"),visibleIndex:0,showTitle:!1,location:"end",action:function(){var e=t.row.editingObj;o(e)}});var a=s.filter((function(e){return"show-detail"===e.id}))[0];pt(n,s,r),a&&(a.component="sv-action-bar-item",a.iconName=this.getShowDetailActionIconName(r),a.showTitle=!1,a.location="end",a.ariaExpanded=r.isDetailPanelShowing,a.action=function(){r.showHideDetailPanelClick(),a.iconName=r.isDetailPanelShowing?"icon-editing-finish":"icon-edit"},a.visibleIndex=0,a.visible=this.hasPropertiesInDetail,r.onDetailPanelShowingChanged=function(){a.iconName=i.getShowDetailActionIconName(r),a.ariaExpanded=r.isDetailPanelShowing}),this.updateMatixActionsClasses(s)},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 s=null;i&&n&&(s=t.getNewColumnName(e.value,n,i));var a=r.Serializer.createClass(this.getDefaultClassName(o),{});s&&(a[n]=s),this.getObjTypeName()&&(a[this.getObjTypeName()]=a.getType());var l=e.obj[o.name];return r.Serializer.isDescendantOf(a.getType(),"itemvalue")&&(a.text=d(l)),l.push(a),l!=e.value&&(e.value=l),a},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 Se(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 Ve(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 Ve(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),s={type:"matrixdynamic",detailPanelMode:"underRow",cellType:"text",rowCount:0,columns:r,showHeader:r.length>2,hideColumnsIfEmpty:!0,addRowText:this.getAddRowText(t),keyDuplicationError:N.getString("pe.propertyIsNoUnique"),emptyRowsText:this.getEmptyRowsText(t)};this.getShowDetailPanelOnAdding()&&(s.detailPanelShowOnAdding=!0);var a=this.getMaximumRowCount(e,t,i);return a>0&&(s.maxRowCount=a),s},t.prototype.getEmptyRowsText=function(e){var t="pe.listIsEmpty",o=t+"@"+e.name;return N.hasString(o)&&(t=o),N.getString(t)},t.prototype.getMaximumRowCount=function(e,t,o){return-1},t.prototype.getColumnsJSON=function(e,t,o,i){var n=t.className;n||(n=t.baseClassName);for(var r=new Ve(e,i).createColumnsJSON(n,o),s=0;s<r.length;s++)"comment"==r[s].cellType&&(r[s].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 N.hasString(t)?N.getString(t):N.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}(_e),Mo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.fit=function(e){return e.isArray&&r.Serializer.isDescendantOf(e.className,"itemvalue")},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=[];return o.columns.forEach((function(e){n.push(e.name)})),new Ao(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.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}(Lo),jo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(Lo),Do=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(Lo),Ro=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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}(Lo),ko=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.fit=function(e){return"htmlconditions"==e.type},t.prototype.getDefaulColumnNames=function(){return["html"]},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(Lo),qo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.fit=function(e){return"urlconditions"==e.type},t.prototype.getDefaulColumnNames=function(){return["url"]},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(Lo),Ho=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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 _o(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}(Lo),Bo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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(e,t){if(t.columnName==this.getObjTypeName()){var o=t.question.visibleRows.indexOf(t.row);if(!(o<0)){var i=t.row.isDetailPanelShowing,n=t.row.editingObj.toJSON();delete n.type;var s=r.Serializer.createClass(t.value);s.fromJSON(n),s[this.getObjTypeName()]=s.getType(),t.row.hideDetailPanel(!0),t.question.value.splice(o,1,s),t.row.value=s,i&&t.row.showDetailPanel()}}},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(Lo),Qo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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:N.getValidatorName(n)})}return o},t.prototype.getSupportedValidators=function(e){return e?e.getSupportedValidators?e.getSupportedValidators():e.getOriginalObj?this.getSupportedValidators(e.getOriginalObj()):[]:[]},t}(Bo),Fo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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:N.getTriggerName(e.name)}}))},t}(Bo);Oe.register(new Mo),Oe.register(new jo),Oe.register(new Do),Oe.register(new Ro),Oe.register(new ko),Oe.register(new qo),Oe.register(new Ho),Oe.register(new Qo),Oe.register(new Fo);var Uo={name:"propertygrid_bindings",showInToolbox:!1,createElements:function(){}};r.ComponentCollection.Instance.getCustomQuestionByName(Uo.name)||r.ComponentCollection.Instance.add(Uo);var Zo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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=Oe.getJSON(t,i,o);return n.titleLocation="left",n.descriptionLocation="hidden",n.minWidth="0px",n.name=e,n.title=N.getPropertyName(e),n},t}(_e);Oe.register(new Zo);var Go={name:"propertygrid_restfull",showInToolbox:!1,createElements:function(e){}};r.ComponentCollection.Instance.getCustomQuestionByName(Go.name)||r.ComponentCollection.Instance.add(Go);var zo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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 Ve(e[o.name],i,e,o).setupObjPanel(t.contentPanel,!0)},t}(Ue);Oe.register(new zo);var Jo=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 M(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",N.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}(Ee),Wo=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 M(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),F.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}(Ee),Ko=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 M(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}(Wo),Xo=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 M(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}(Ko),Yo=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 M(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}(Ko),$o=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 M(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}(Wo),ei=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onCreated=function(e,o,i,n){o.linkClickCallback=function(){t.showModalPropertyEditor(t,i,o,n,(function(){return o.isSelected=!1})),o.isSelected=!0},o.clearClickCallback=function(){t.clearPropertyValue(o.obj,i,o,null)}},t}return M(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}(_e),ti=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.fit=function(e){return"cells"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,i){return new Jo(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}(ei),oi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.fit=function(e){return"value"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,i){return new Wo(e,t.name,i)},t}(ei),ii=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.fit=function(e){return"rowvalue"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,i){return new Xo(e,t.name,i)},t}(ei),ni=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.fit=function(e){return"panelvalue"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,i){return new Yo(e,t.name,i)},t}(ei),ri=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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 $o(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}(ei),si=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(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(),F.updateQuestionJson(n),n},t}(ri);Oe.register(new ti),Oe.register(new oi),Oe.register(new ii),Oe.register(new ni),Oe.register(new ri),Oe.register(new si);var ai,li=o(29);r.SvgRegistry.registerIconsFromFolder(li),ai="1.9.83",o(116),o(117),o(118),o(119),o(120),o(2),o(121),o(122),o(123),o(124),o(125),r.settings.supportCreatorV2=!0,Object(r.checkLibraryVersion)("1.9.83","survey-creator-core")}])}));