survey-react-ui 1.9.125 → 1.9.126

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,6 +1,6 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.125
2
+ * surveyjs - Survey JavaScript library v1.9.126
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
6
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("survey-core"),require("react-dom")):"function"==typeof define&&define.amd?define("survey-react-ui",["react","survey-core","react-dom"],t):"object"==typeof exports?exports["survey-react-ui"]=t(require("react"),require("survey-core"),require("react-dom")):e.SurveyReact=t(e.React,e.Survey,e.ReactDOM)}(this,(function(e,t,n){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t,n){"use strict";n.r(t),n.d(t,"Survey",(function(){return we})),n.d(t,"attachKey2click",(function(){return Oe})),n.d(t,"ReactSurveyElementsWrapper",(function(){return a})),n.d(t,"SurveyNavigationBase",(function(){return xe})),n.d(t,"SurveyTimerPanel",(function(){return _e})),n.d(t,"SurveyPage",(function(){return ue})),n.d(t,"SurveyRow",(function(){return g})),n.d(t,"SurveyPanel",(function(){return Ie})),n.d(t,"SurveyFlowPanel",(function(){return je})),n.d(t,"SurveyQuestion",(function(){return ne})),n.d(t,"SurveyElementErrors",(function(){return re})),n.d(t,"SurveyQuestionAndErrorsCell",(function(){return ie})),n.d(t,"ReactSurveyElement",(function(){return p})),n.d(t,"SurveyElementBase",(function(){return c})),n.d(t,"SurveyQuestionElementBase",(function(){return h})),n.d(t,"SurveyQuestionCommentItem",(function(){return G})),n.d(t,"SurveyQuestionComment",(function(){return K})),n.d(t,"SurveyQuestionCheckbox",(function(){return Re})),n.d(t,"SurveyQuestionCheckboxItem",(function(){return De})),n.d(t,"SurveyQuestionRanking",(function(){return Le})),n.d(t,"SurveyQuestionRankingItem",(function(){return ke})),n.d(t,"RatingItem",(function(){return Fe})),n.d(t,"RatingItemStar",(function(){return He})),n.d(t,"RatingItemSmiley",(function(){return Ue})),n.d(t,"RatingDropdownItem",(function(){return Je})),n.d(t,"TagboxFilterString",(function(){return Ge})),n.d(t,"SurveyQuestionOptionItem",(function(){return Ze})),n.d(t,"SurveyQuestionDropdownBase",(function(){return Xe})),n.d(t,"SurveyQuestionDropdown",(function(){return tt})),n.d(t,"SurveyQuestionTagboxItem",(function(){return rt})),n.d(t,"SurveyQuestionTagbox",(function(){return it})),n.d(t,"SurveyQuestionDropdownSelect",(function(){return at})),n.d(t,"SurveyQuestionMatrix",(function(){return lt})),n.d(t,"SurveyQuestionMatrixRow",(function(){return ct})),n.d(t,"SurveyQuestionMatrixCell",(function(){return pt})),n.d(t,"SurveyQuestionHtml",(function(){return dt})),n.d(t,"SurveyQuestionFile",(function(){return gt})),n.d(t,"SurveyFileChooseButton",(function(){return bt})),n.d(t,"SurveyFilePreview",(function(){return Et})),n.d(t,"SurveyQuestionMultipleText",(function(){return wt})),n.d(t,"SurveyQuestionRadiogroup",(function(){return St})),n.d(t,"SurveyQuestionRadioItem",(function(){return _t})),n.d(t,"SurveyQuestionText",(function(){return It})),n.d(t,"SurveyQuestionBoolean",(function(){return jt})),n.d(t,"SurveyQuestionBooleanCheckbox",(function(){return Rt})),n.d(t,"SurveyQuestionBooleanRadio",(function(){return At})),n.d(t,"SurveyQuestionEmpty",(function(){return kt})),n.d(t,"SurveyQuestionMatrixDropdownCell",(function(){return Jt})),n.d(t,"SurveyQuestionMatrixDropdownBase",(function(){return Wt})),n.d(t,"SurveyQuestionMatrixDropdown",(function(){return Gt})),n.d(t,"SurveyQuestionMatrixDynamic",(function(){return Zt})),n.d(t,"SurveyQuestionMatrixDynamicAddButton",(function(){return $t})),n.d(t,"SurveyQuestionPanelDynamic",(function(){return cn})),n.d(t,"SurveyProgress",(function(){return dn})),n.d(t,"SurveyProgressButtons",(function(){return yn})),n.d(t,"SurveyProgressToc",(function(){return En})),n.d(t,"SurveyQuestionRating",(function(){return wn})),n.d(t,"SurveyQuestionRatingDropdown",(function(){return Pn})),n.d(t,"SurveyQuestionExpression",(function(){return Sn})),n.d(t,"PopupSurvey",(function(){return Nn})),n.d(t,"SurveyWindow",(function(){return In})),n.d(t,"ReactQuestionFactory",(function(){return W})),n.d(t,"ReactElementFactory",(function(){return s})),n.d(t,"SurveyQuestionImagePicker",(function(){return jn})),n.d(t,"SurveyQuestionImage",(function(){return Dn})),n.d(t,"SurveyQuestionSignaturePad",(function(){return Ln})),n.d(t,"SurveyQuestionButtonGroup",(function(){return Mn})),n.d(t,"SurveyQuestionCustom",(function(){return zn})),n.d(t,"SurveyQuestionComposite",(function(){return Hn})),n.d(t,"Popup",(function(){return I})),n.d(t,"List",(function(){return bn})),n.d(t,"TitleActions",(function(){return F})),n.d(t,"TitleElement",(function(){return H})),n.d(t,"SurveyActionBar",(function(){return L})),n.d(t,"LogoImage",(function(){return Un})),n.d(t,"SurveyHeader",(function(){return he})),n.d(t,"SvgIcon",(function(){return E})),n.d(t,"SurveyQuestionMatrixDynamicRemoveButton",(function(){return Jn})),n.d(t,"SurveyQuestionMatrixDetailButton",(function(){return Gn})),n.d(t,"SurveyQuestionMatrixDynamicDragDropIcon",(function(){return zt})),n.d(t,"SurveyQuestionPanelDynamicAddButton",(function(){return tn})),n.d(t,"SurveyQuestionPanelDynamicRemoveButton",(function(){return Zn})),n.d(t,"SurveyQuestionPanelDynamicPrevButton",(function(){return sn})),n.d(t,"SurveyQuestionPanelDynamicNextButton",(function(){return rn})),n.d(t,"SurveyQuestionPanelDynamicProgressText",(function(){return un})),n.d(t,"SurveyNavigationButton",(function(){return Xn})),n.d(t,"MatrixRow",(function(){return Bt})),n.d(t,"Skeleton",(function(){return tr})),n.d(t,"NotifierComponent",(function(){return me})),n.d(t,"ComponentsContainer",(function(){return ve})),n.d(t,"CharacterCounterComponent",(function(){return Q})),n.d(t,"HeaderMobile",(function(){return rr})),n.d(t,"HeaderCell",(function(){return or})),n.d(t,"Header",(function(){return ir})),n.d(t,"SurveyLocStringViewer",(function(){return ce})),n.d(t,"SurveyLocStringEditor",(function(){return ar})),n.d(t,"LoadingIndicatorComponent",(function(){return yt})),n.d(t,"SvgBundleComponent",(function(){return Ce})),n.d(t,"SurveyModel",(function(){return i.SurveyModel})),n.d(t,"SurveyWindowModel",(function(){return i.SurveyWindowModel})),n.d(t,"settings",(function(){return i.settings})),n.d(t,"surveyLocalization",(function(){return i.surveyLocalization})),n.d(t,"surveyStrings",(function(){return i.surveyStrings})),n.d(t,"Model",(function(){return i.SurveyModel})),n.d(t,"ResponsivityManager",(function(){return mo})),n.d(t,"VerticalResponsivityManager",(function(){return go})),n.d(t,"unwrap",(function(){return fo}));var r=n(0),o=n.n(r),i=n(1),s=function(){function e(){this.creatorHash={}}return e.prototype.registerElement=function(e,t){this.creatorHash[e]=t},e.prototype.getAllTypes=function(){var e=new Array;for(var t in this.creatorHash)e.push(t);return e.sort()},e.prototype.isElementRegistered=function(e){return!!this.creatorHash[e]},e.prototype.createElement=function(e,t){var n=this.creatorHash[e];return null==n?null:n(t)},e.Instance=new e,e}(),a=function(){function e(){}return e.wrapRow=function(e,t,n){var r=e.getRowWrapperComponentName(n),o=e.getRowWrapperComponentData(n);return s.Instance.createElement(r,{element:t,row:n,componentData:o})},e.wrapElement=function(e,t,n){var r=e.getElementWrapperComponentName(n),o=e.getElementWrapperComponentData(n);return s.Instance.createElement(r,{element:t,question:n,componentData:o})},e.wrapQuestionContent=function(e,t,n){var r=e.getQuestionContentWrapperComponentName(n),o=e.getElementWrapperComponentData(n);return s.Instance.createElement(r,{element:t,question:n,componentData:o})},e.wrapItemValue=function(e,t,n,r){var o=e.getItemValueWrapperComponentName(r,n),i=e.getItemValueWrapperComponentData(r,n);return s.Instance.createElement(o,{key:null==t?void 0:t.key,element:t,question:n,item:r,componentData:i})},e.wrapMatrixCell=function(e,t,n,r){void 0===r&&(r="cell");var o=e.getElementWrapperComponentName(n,r),i=e.getElementWrapperComponentData(n,r);return s.Instance.createElement(o,{element:t,cell:n,componentData:i})},e}();i.SurveyModel.platform="react";var u,l=(u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(e){function t(t){var n=e.call(this,t)||this;return n._allowComponentUpdate=!0,n}return l(t,e),t.renderLocString=function(e,t,n){return void 0===t&&(t=null),s.Instance.createElement(e.renderAs,{locStr:e.renderAsData,style:t,key:n})},t.renderQuestionDescription=function(e){var n=t.renderLocString(e.locDescription);return r.createElement("div",{style:e.hasDescription?void 0:{display:"none"},className:e.cssDescription},n)},t.prototype.componentDidMount=function(){this.makeBaseElementsReact()},t.prototype.componentWillUnmount=function(){this.unMakeBaseElementsReact()},t.prototype.componentDidUpdate=function(e,t){this.makeBaseElementsReact()},t.prototype.allowComponentUpdate=function(){this._allowComponentUpdate=!0,this.forceUpdate()},t.prototype.denyComponentUpdate=function(){this._allowComponentUpdate=!1},t.prototype.shouldComponentUpdate=function(e,t){return this._allowComponentUpdate&&this.unMakeBaseElementsReact(),this._allowComponentUpdate},t.prototype.render=function(){if(!this.canRender())return null;this.startEndRendering(1);var e=this.renderElement();return this.startEndRendering(-1),e&&(e=this.wrapElement(e)),this.changedStatePropNameValue=void 0,e},t.prototype.wrapElement=function(e){return e},Object.defineProperty(t.prototype,"isRendering",{get:function(){for(var e=0,t=this.getRenderedElements();e<t.length;e++){if(t[e].reactRendering>0)return!0}return!1},enumerable:!1,configurable:!0}),t.prototype.getRenderedElements=function(){return this.getStateElements()},t.prototype.startEndRendering=function(e){for(var t=0,n=this.getRenderedElements();t<n.length;t++){var r=n[t];r.reactRendering||(r.reactRendering=0),r.reactRendering+=e}},t.prototype.canRender=function(){return!0},t.prototype.renderElement=function(){return null},Object.defineProperty(t.prototype,"changedStatePropName",{get:function(){return this.changedStatePropNameValue},enumerable:!1,configurable:!0}),t.prototype.makeBaseElementsReact=function(){for(var e=this.getStateElements(),t=0;t<e.length;t++)this.makeBaseElementReact(e[t])},t.prototype.unMakeBaseElementsReact=function(){for(var e=this.getStateElements(),t=0;t<e.length;t++)this.unMakeBaseElementReact(e[t])},t.prototype.getStateElements=function(){var e=this.getStateElement();return e?[e]:[]},t.prototype.getStateElement=function(){return null},Object.defineProperty(t.prototype,"isDisplayMode",{get:function(){return this.props.isDisplayMode||!1},enumerable:!1,configurable:!0}),t.prototype.renderLocString=function(e,n,r){return void 0===n&&(n=null),t.renderLocString(e,n,r)},t.prototype.canMakeReact=function(e){return!!e&&!!e.iteratePropertiesHash},t.prototype.makeBaseElementReact=function(e){var t=this;this.canMakeReact(e)&&(e.iteratePropertiesHash((function(e,n){if(t.canUsePropInState(n)){var r=e[n];if(Array.isArray(r))(r=r).onArrayChanged=function(e){t.isRendering||(t.changedStatePropNameValue=n,t.setState((function(e){var t={};return t[n]=r,t})))}}})),e.setPropertyValueCoreHandler=function(e,n,r){if(e[n]!==r){if(e[n]=r,!t.canUsePropInState(n))return;if(t.isRendering)return;t.changedStatePropNameValue=n,t.setState((function(e){var t={};return t[n]=r,t}))}})},t.prototype.canUsePropInState=function(e){return!0},t.prototype.unMakeBaseElementReact=function(e){this.canMakeReact(e)&&(e.setPropertyValueCoreHandler=void 0,e.iteratePropertiesHash((function(e,t){var n=e[t];Array.isArray(n)&&((n=n).onArrayChanged=function(){})})))},t}(r.Component),p=function(e){function t(t){return e.call(this,t)||this}return l(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),t}(c),h=function(e){function t(t){return e.call(this,t)||this}return l(t,e),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateDomElement()},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.updateDomElement()},t.prototype.componentWillUnmount=function(){if(e.prototype.componentWillUnmount.call(this),this.questionBase){var t=this.control;this.questionBase.beforeDestroyQuestionElement(t),t&&t.removeAttribute("data-rendered")}},t.prototype.updateDomElement=function(){var e=this.control;e&&"r"!==e.getAttribute("data-rendered")&&(e.setAttribute("data-rendered","r"),this.questionBase.afterRenderQuestionElement(e))},Object.defineProperty(t.prototype,"questionBase",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.getRenderedElements=function(){return[this.questionBase]},Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.questionBase&&!!this.creator},t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&!(this.questionBase.customWidget&&!this.questionBase.customWidgetData.isNeedRender&&!this.questionBase.customWidget.widgetJson.isDefaultRender&&!this.questionBase.customWidget.widgetJson.render)},Object.defineProperty(t.prototype,"isDisplayMode",{get:function(){return this.props.isDisplayMode||!!this.questionBase&&this.questionBase.isInputReadOnly||!1},enumerable:!1,configurable:!0}),t.prototype.wrapCell=function(e,t,n){if(!n)return t;var r=this.questionBase.survey,o=null;return r&&(o=a.wrapMatrixCell(r,t,e,n)),null!=o?o:t},t.prototype.setControl=function(e){e&&(this.control=e)},t}(c),d=function(e){function t(t){var n=e.call(this,t)||this;return n.updateValueOnEvent=function(e){i.Helpers.isTwoValueEquals(n.questionBase.value,e.target.value,!1,!0,!1)||n.setValueCore(e.target.value)},n.updateValueOnEvent=n.updateValueOnEvent.bind(n),n}return l(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.setValueCore=function(e){this.questionBase.value=e},t.prototype.getValueCore=function(){return this.questionBase.value},t.prototype.updateDomElement=function(){if(this.control){var t=this.control,n=this.getValueCore();i.Helpers.isTwoValueEquals(n,t.value,!1,!0,!1)||(t.value=this.getValue(n))}e.prototype.updateDomElement.call(this)},t.prototype.getValue=function(e){return i.Helpers.isValueEmpty(e)?"":e},t}(h),f=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),y=function(e){function t(t){var n=e.call(this,t)||this;return n.element.cssClasses,n}return f(t,e),t.prototype.getStateElement=function(){return this.element},Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.row},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.props.css},enumerable:!1,configurable:!0}),t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(this.element.cssClasses,!0)},t.prototype.renderElement=function(){var e=this.element,t=this.createElement(e,this.index),n=e.cssClassesValue;return r.createElement("div",{className:n.questionWrapper,style:e.rootStyle,"data-key":t.key,key:t.key,onFocus:function(){var t=e;t&&t.isQuestion&&t.focusIn()}},this.row.isNeedRender?t:s.Instance.createElement(e.skeletonComponentName,{element:e,css:this.css}))},t.prototype.createElement=function(e,t){var n=t?"-"+t:0,r=e.getType();return s.Instance.isElementRegistered(r)||(r="question"),s.Instance.createElement(r,{key:e.name+n,element:e,creator:this.creator,survey:this.survey,css:this.css})},t}(c),m=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),g=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=r.createRef(),n.recalculateCss(),n}return m(t,e),t.prototype.recalculateCss=function(){this.row.visibleElements.map((function(e){return e.cssClasses}))},t.prototype.getStateElement=function(){return this.row},Object.defineProperty(t.prototype,"row",{get:function(){return this.props.row},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.props.css},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.row&&!!this.survey&&!!this.creator&&this.row.visible},t.prototype.renderElementContent=function(){var e=this,t=this.row.visibleElements.map((function(t,n){var o=n?"-"+n:0,i=t.name+o;return r.createElement(y,{element:t,index:n,row:e.row,survey:e.survey,creator:e.creator,css:e.css,key:i})}));return r.createElement("div",{ref:this.rootRef,className:this.row.getRowCss()},t)},t.prototype.renderElement=function(){var e=this.survey,t=this.renderElementContent();return a.wrapRow(e,t,this.row)||t},t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this);var n=this.rootRef.current;if(n&&!this.row.isNeedRender){var r=n;setTimeout((function(){t.row.startLazyRendering(r)}),10)}},t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(t.row!==this.row&&(t.row.isNeedRender=this.row.isNeedRender,this.stopLazyRendering()),this.recalculateCss(),!0)},t.prototype.stopLazyRendering=function(){this.row.stopLazyRendering(),this.row.isNeedRender=!this.row.isLazyRendering()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.stopLazyRendering()},t.prototype.createElement=function(e,t){var n=t?"-"+t:0,r=e.getType();return s.Instance.isElementRegistered(r)||(r="question"),s.Instance.createElement(r,{key:e.name+n,element:e,creator:this.creator,survey:this.survey,css:this.css})},t}(c),v=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),b=function(e){function t(t){var n=e.call(this,t)||this;return n.renderedRowsCache={},n.rootRef=r.createRef(),n}return v(t,e),t.prototype.getStateElement=function(){return this.panelBase},t.prototype.canUsePropInState=function(t){return"elements"!==t&&e.prototype.canUsePropInState.call(this,t)},Object.defineProperty(t.prototype,"survey",{get:function(){return this.getSurvey()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.getCss()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panelBase",{get:function(){return this.getPanelBase()},enumerable:!1,configurable:!0}),t.prototype.getPanelBase=function(){return this.props.element||this.props.question},t.prototype.getSurvey=function(){return this.props.survey||(this.panelBase?this.panelBase.survey:null)},t.prototype.getCss=function(){return this.props.css},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.doAfterRender()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this);var t=this.rootRef.current;t&&t.removeAttribute("data-rendered")},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),t.page&&this.survey&&this.survey.currentPage&&t.page.id===this.survey.currentPage.id||this.doAfterRender()},t.prototype.doAfterRender=function(){var e=this.rootRef.current;e&&this.survey&&(this.panelBase.isPanel?this.survey.afterRenderPanel(this.panelBase,e):this.survey.afterRenderPage(e))},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&!!this.survey&&!!this.panelBase&&this.panelBase.isVisible&&!!this.panelBase.survey},t.prototype.renderRows=function(e){"rows"!==this.changedStatePropName&&(this.renderedRowsCache={});for(var t=[],n=this.panelBase.rows,r=0;r<n.length;r++){var o=this.renderedRowsCache[n[r].id];o||(o=this.createRow(n[r],e),this.renderedRowsCache[n[r].id]=o),t.push(o)}return t},t.prototype.createRow=function(e,t){return r.createElement(g,{key:e.id,row:e,survey:this.survey,creator:this.creator,css:t})},t}(c),C=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),E=function(e){function t(t){var n=e.call(this,t)||this;return n.svgIconRef=o.a.createRef(),n}return C(t,e),t.prototype.updateSvg=function(){this.props.iconName&&Object(i.createSvg)(this.props.size,this.props.width,this.props.height,this.props.iconName,this.svgIconRef.current,this.props.title)},t.prototype.componentDidUpdate=function(){this.updateSvg()},t.prototype.render=function(){var e="sv-svg-icon";return this.props.className&&(e+=" "+this.props.className),this.props.iconName?o.a.createElement("svg",{className:e,style:this.props.style,onClick:this.props.onClick,ref:this.svgIconRef,role:"img"},o.a.createElement("use",null)):null},t.prototype.componentDidMount=function(){this.updateSvg()},t}(o.a.Component);s.Instance.registerElement("sv-svg-icon",(function(e){return o.a.createElement(E,e)}));var q=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),w=function(e){function t(t){return e.call(this,t)||this}return q(t,e),t.prototype.render=function(){var e="sv-action-bar-separator "+this.props.cssClasses;return o.a.createElement("div",{className:e})},t}(o.a.Component);s.Instance.registerElement("sv-action-bar-separator",(function(e){return o.a.createElement(w,e)}));var O=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return O(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){var e=this.item.getActionRootCss(),t=this.item.needSeparator?o.a.createElement(w,null):null,n=s.Instance.createElement(this.item.component||"sv-action-bar-item",{item:this.item});return o.a.createElement("div",{className:e,id:this.item.id},o.a.createElement("div",{className:"sv-action__content"},t,n))},t}(c),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return O(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){return o.a.createElement(o.a.Fragment,null,this.renderInnerButton())},t.prototype.renderText=function(){if(!this.item.hasTitle)return null;var e=this.item.getActionBarItemTitleCss();return o.a.createElement("span",{className:e},this.item.title)},t.prototype.renderButtonContent=function(){var e=this.renderText(),t=this.item.iconName?o.a.createElement(E,{className:this.item.cssClasses.itemIcon,size:this.item.iconSize,iconName:this.item.iconName,title:this.item.tooltip||this.item.title}):null;return o.a.createElement(o.a.Fragment,null,t,e)},t.prototype.renderInnerButton=function(){var e=this,t=this.item.getActionBarItemCss(),n=this.item.tooltip||this.item.title,r=this.renderButtonContent(),i=this.item.disableTabStop?-1:void 0;return Oe(o.a.createElement("button",{className:t,type:"button",disabled:this.item.disabled,onClick:function(t){return e.item.action(e.item,e.item.getIsTrusted(t))},title:n,tabIndex:i,"aria-checked":this.item.ariaChecked,"aria-expanded":this.item.ariaExpanded,role:this.item.ariaRole},r),this.item,{processEsc:!1})},t}(c);s.Instance.registerElement("sv-action-bar-item",(function(e){return o.a.createElement(x,e)}));var S=n(2),_=n.n(S),N=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),I=function(e){function t(t){var n=e.call(this,t)||this;return n.containerRef=o.a.createRef(),n.createModel(),n}return N(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.createModel=function(){this.popup=Object(i.createPopupViewModel)(this.props.model,void 0)},t.prototype.setTargetElement=function(){var e=this.containerRef.current;this.popup.setComponentElement(e,this.props.getTarget?this.props.getTarget(e):void 0)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.setTargetElement()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.setTargetElement()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.popup.resetComponentElement()},t.prototype.shouldComponentUpdate=function(t,n){var r;if(!e.prototype.shouldComponentUpdate.call(this,t,n))return!1;var o=t.model!==this.popup.model;return o&&(null===(r=this.popup)||void 0===r||r.dispose(),this.createModel()),o},t.prototype.render=function(){var e;return this.popup.model=this.model,e=this.model.isModal?o.a.createElement(V,{model:this.popup}):o.a.createElement(j,{model:this.popup}),o.a.createElement("div",{ref:this.containerRef},e)},t}(c);s.Instance.registerElement("sv-popup",(function(e){return o.a.createElement(I,e)}));var V=function(e){function t(t){var n=e.call(this,t)||this;return n.prevIsVisible=!1,n.handleKeydown=function(e){n.model.onKeyDown(e)},n.clickInside=function(e){e.stopPropagation()},n}return N(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),!this.prevIsVisible&&this.model.isVisible&&this.model.updateOnShowing(),this.prevIsVisible=this.model.isVisible},t.prototype.renderContainer=function(e){var t=this,n=e.showHeader?this.renderHeaderPopup(e):null,r=e.title?this.renderHeaderContent():null,i=this.renderContent(),s=e.showFooter?this.renderFooter(this.model):null;return o.a.createElement("div",{className:"sv-popup__container",style:{left:e.left,top:e.top,height:e.height,width:e.width,minWidth:e.minWidth},onClick:function(e){t.clickInside(e)}},o.a.createElement("div",{className:"sv-popup__shadow"},n,o.a.createElement("div",{className:"sv-popup__body-content"},r,o.a.createElement("div",{className:"sv-popup__scrolling-content"},i),s)))},t.prototype.renderHeaderContent=function(){return o.a.createElement("div",{className:"sv-popup__body-header"},this.model.title)},t.prototype.renderContent=function(){var e=s.Instance.createElement(this.model.contentComponentName,this.model.contentComponentData);return o.a.createElement("div",{className:"sv-popup__content"},e)},t.prototype.renderHeaderPopup=function(e){return null},t.prototype.renderFooter=function(e){return o.a.createElement("div",{className:"sv-popup__body-footer"},o.a.createElement(L,{model:e.footerToolbar}))},t.prototype.render=function(){var e=this,t=this.renderContainer(this.model),n=(new i.CssClassBuilder).append("sv-popup").append(this.model.styleClass).toString(),r={display:this.model.isVisible?"":"none"};return o.a.createElement("div",{tabIndex:-1,className:n,style:r,onClick:function(t){e.model.clickOutside(t)},onKeyDown:this.handleKeydown},t)},t}(c),j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return N(t,e),t.prototype.renderHeaderPopup=function(e){var t=e;return t?o.a.createElement("span",{style:{left:t.pointerTarget.left,top:t.pointerTarget.top},className:"sv-popup__pointer"}):null},t}(V);function T(e,t){e.onHide=function(){_.a.unmountComponentAtNode(n.container),n.dispose()};var n=Object(i.createPopupModalViewModel)(e,t);return _.a.render(o.a.createElement(V,{model:n}),n.container),n.model.isVisible=!0,n}i.settings.showModal=function(e,t,n,r,o,s,a){return void 0===a&&(a="popup"),T(Object(i.createDialogOptions)(e,t,n,r,void 0,void 0,o,s,a))},i.settings.showDialog=T;var R=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),D=function(e){function t(t){var n=e.call(this,t)||this;return n.viewModel=new i.ActionDropdownViewModel(n.item),n}return R(t,e),t.prototype.renderInnerButton=function(){var t=e.prototype.renderInnerButton.call(this);return o.a.createElement(o.a.Fragment,null,t,o.a.createElement(I,{model:this.item.popupModel,getTarget:i.getActionDropdownButtonTarget}))},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.viewModel.dispose()},t}(x);s.Instance.registerElement("sv-action-bar-item-dropdown",(function(e){return o.a.createElement(D,e)}));var A=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),L=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=o.a.createRef(),n}return A(t,e),Object.defineProperty(t.prototype,"handleClick",{get:function(){return void 0===this.props.handleClick||this.props.handleClick},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(e.prototype.componentDidMount.call(this),this.model.hasActions){var t=this.rootRef.current;t&&this.model.initResponsivityManager(t,(function(e){setTimeout(e)}))}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model.hasActions&&this.model.resetResponsivityManager()},t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){if(!this.model.hasActions)return null;var e=this.renderItems();return o.a.createElement("div",{ref:this.rootRef,className:this.model.getRootCss(),onClick:this.handleClick?function(e){e.stopPropagation()}:void 0},e)},t.prototype.renderItems=function(){return this.model.renderedActions.map((function(e,t){return o.a.createElement(P,{item:e,key:"item"+t})}))},t}(c);s.Instance.registerElement("sv-action-bar",(function(e){return o.a.createElement(L,e)}));var k=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),M=function(e){function t(t){return e.call(this,t)||this}return k(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){if(this.element.isTitleRenderedAsString)return c.renderLocString(this.element.locTitle);var e=this.renderTitleSpans(this.element.getTitleOwner(),this.cssClasses);return o.a.createElement(o.a.Fragment,null,e)},t.prototype.renderTitleSpans=function(e,t){var n=function(e){return o.a.createElement("span",{"data-key":e,key:e}," ")},r=[];e.isRequireTextOnStart&&(r.push(this.renderRequireText(e,t)),r.push(n("req-sp")));var i=e.no;if(i){var s=t.panel?t.panel.number:void 0;r.push(o.a.createElement("span",{"data-key":"q_num",key:"q_num",className:t.number||s,style:{position:"static"},"aria-hidden":!0},i)),r.push(n("num-sp"))}return e.isRequireTextBeforeTitle&&(r.push(this.renderRequireText(e,t)),r.push(n("req-sp"))),r.push(c.renderLocString(e.locTitle,null,"q_title")),e.isRequireTextAfterTitle&&(r.push(n("req-sp")),r.push(this.renderRequireText(e,t))),r},t.prototype.renderRequireText=function(e,t){return o.a.createElement("span",{"data-key":"req-text",key:"req-text",className:t.requiredText||t.panel.requiredText,"aria-hidden":!0},e.requiredText)},t}(o.a.Component),B=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=o.a.createElement(M,{element:this.element,cssClasses:this.cssClasses});return this.element.hasTitleActions?o.a.createElement("div",{className:"sv-title-actions"},o.a.createElement("span",{className:"sv-title-actions__title"},e),o.a.createElement(L,{model:this.element.getTitleToolbar()})):e},t}(o.a.Component);i.RendererFactory.Instance.registerRenderer("element","title-actions","sv-title-actions"),s.Instance.registerElement("sv-title-actions",(function(e){return o.a.createElement(F,e)}));var z=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),H=function(e){function t(t){return e.call(this,t)||this}return z(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.element;if(!e||!e.hasTitle)return null;var t=e.titleAriaLabel||void 0,n=o.a.createElement(F,{element:e,cssClasses:e.cssClasses}),r=void 0;e.hasTitleEvents&&(r=function(e){Object(i.doKey2ClickUp)(e.nativeEvent)});var s=e.titleTagName;return o.a.createElement(s,{className:e.cssTitle,id:e.ariaTitleId,"aria-label":t,tabIndex:e.titleTabIndex,"aria-expanded":e.titleAriaExpanded,role:e.titleAriaRole,onClick:void 0,onKeyUp:r},n)},t}(o.a.Component),W=function(){function e(){this.creatorHash={}}return e.prototype.registerQuestion=function(e,t){this.creatorHash[e]=t},e.prototype.getAllTypes=function(){var e=new Array;for(var t in this.creatorHash)e.push(t);return e.sort()},e.prototype.createQuestion=function(e,t){var n=this.creatorHash[e];return null==n?null:n(t)},e.Instance=new e,e}(),U=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getStateElement=function(){return this.props.counter},t.prototype.renderElement=function(){return o.a.createElement("div",{className:this.props.remainingCharacterCounter},this.props.counter.remainingCharacterCounter)},t}(c);s.Instance.registerElement("sv-character-counter",(function(e){return o.a.createElement(Q,e)}));var J=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),K=function(e){function t(t){return e.call(this,t)||this}return J(t,e),t.prototype.renderElement=function(){var e=this,t=this.question.isInputTextUpdate?void 0:this.updateValueOnEvent,n=this.question.renderedPlaceholder;if(this.question.isReadOnlyRenderDiv())return r.createElement("div",null,this.question.value);var o=this.question.getMaxLength()?r.createElement(Q,{counter:this.question.characterCounter,remainingCharacterCounter:this.question.cssClasses.remainingCharacterCounter}):null;return r.createElement(r.Fragment,null,r.createElement("textarea",{id:this.question.inputId,className:this.question.className,disabled:this.question.isInputReadOnly,readOnly:this.question.isInputReadOnly,ref:function(t){return e.setControl(t)},maxLength:this.question.getMaxLength(),placeholder:n,onBlur:t,onInput:function(t){e.question.isInputTextUpdate?e.updateValueOnEvent(t):e.question.updateElement();var n=t.target.value;e.question.updateRemainingCharacterCounter(n)},onKeyDown:function(t){e.question.onKeyDown(t)},cols:this.question.cols,rows:this.question.rows,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-describedby":this.question.a11y_input_ariaDescribedBy,style:{resize:this.question.resizeStyle}}),o)},t}(d),G=function(e){function t(t){var n=e.call(this,t)||this;return n.state={comment:n.getComment()||""},n}return J(t,e),t.prototype.getStateComment=function(){var e=this.getComment(),t=this.state.comment;return void 0!==t&&t.trim()!==e&&(t=e),void 0!==t?t:e||""},t.prototype.canRender=function(){return!!this.props.question},t.prototype.onCommentChange=function(e){this.props.question.onCommentChange(e)},t.prototype.onCommentInput=function(e){this.props.question.onCommentInput(e)},t.prototype.getComment=function(){return this.props.question.comment},t.prototype.setComment=function(e){this.props.question.comment=e},t.prototype.getId=function(){return this.props.question.commentId},t.prototype.getPlaceholder=function(){return this.props.question.renderedCommentPlaceholder},t.prototype.renderElement=function(){var e=this,t=this.props.question,n=this.props.otherCss||this.cssClasses.comment,o=function(t){e.setState({comment:t.target.value}),i.Helpers.isTwoValueEquals(e.getComment(),t.target.value,!1,!0,!1)||e.setComment(t.target.value)},s=this.getStateComment();return t.isReadOnlyRenderDiv()?r.createElement("div",null,s):r.createElement("textarea",{id:this.getId(),className:n,value:s,disabled:this.isDisplayMode,maxLength:t.getOthersMaxLength(),placeholder:this.getPlaceholder(),onChange:o,onBlur:function(t){e.onCommentChange(t),o(t)},onInput:function(t){return e.onCommentInput(t)},"aria-required":t.isRequired||t.a11y_input_ariaRequired,"aria-label":t.ariaLabel||t.a11y_input_ariaLabel,style:{resize:t.resizeStyle}})},t}(p),Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return J(t,e),t.prototype.onCommentChange=function(e){this.props.question.onOtherValueChange(e)},t.prototype.onCommentInput=function(e){this.props.question.onOtherValueInput(e)},t.prototype.getComment=function(){return this.props.question.otherValue},t.prototype.setComment=function(e){this.props.question.otherValue=e},t.prototype.getId=function(){return this.props.question.otherId},t.prototype.getPlaceholder=function(){return this.props.question.otherPlaceholder},t}(G);W.Instance.registerQuestion("comment",(function(e){return r.createElement(K,e)}));var Z=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$=function(e){function t(t){var n=e.call(this,t)||this;return n.widgetRef=r.createRef(),n}return Z(t,e),t.prototype._afterRender=function(){if(this.questionBase.customWidget){var e=this.widgetRef.current;e&&(this.questionBase.customWidget.afterRender(this.questionBase,e),this.questionBase.customWidgetData.isNeedRender=!1)}},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.questionBase&&this._afterRender()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n);var r=!!this.questionBase.customWidget&&this.questionBase.customWidget.isDefaultRender;this.questionBase&&!r&&this._afterRender()},t.prototype.componentWillUnmount=function(){if(e.prototype.componentWillUnmount.call(this),this.questionBase.customWidget){var t=this.widgetRef.current;t&&this.questionBase.customWidget.willUnmount(this.questionBase,t)}},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&this.questionBase.visible},t.prototype.renderElement=function(){var e=this.questionBase.customWidget;if(e.isDefaultRender)return r.createElement("div",{ref:this.widgetRef},this.creator.createQuestionElement(this.questionBase));var t=null;if(e.widgetJson.render)t=e.widgetJson.render(this.questionBase);else if(e.htmlTemplate){var n={__html:e.htmlTemplate};return r.createElement("div",{ref:this.widgetRef,dangerouslySetInnerHTML:n})}return r.createElement("div",{ref:this.widgetRef},t)},t}(h),X=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return X(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.element,t=e.hasTitle?o.a.createElement(H,{element:e}):null,n=e.hasDescriptionUnderTitle?c.renderQuestionDescription(this.element):null,r=e.additionalTitleToolbar?o.a.createElement(L,{model:e.additionalTitleToolbar}):null;return o.a.createElement("div",{className:e.cssHeader,onClick:function(t){return e.clickTitleFunction&&e.clickTitleFunction(t.nativeEvent)}},t,n,r)},t}(o.a.Component),te=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ne=function(e){function t(t){var n=e.call(this,t)||this;return n.isNeedFocus=!1,n.rootRef=r.createRef(),n}return te(t,e),t.renderQuestionBody=function(e,t){return t.isVisible?t.customWidget?r.createElement($,{creator:e,question:t}):e.createQuestionElement(t):null},t.prototype.getStateElement=function(){return this.question},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.question&&(this.question.react=this),this.doAfterRender()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question&&(this.question.react=null);var t=this.rootRef.current;t&&t.removeAttribute("data-rendered")},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.doAfterRender()},t.prototype.doAfterRender=function(){if(this.isNeedFocus&&(this.question.isCollapsed||this.question.clickTitleFunction(),this.isNeedFocus=!1),this.question){var e=this.rootRef.current;e&&"r"!==e.getAttribute("data-rendered")&&(e.setAttribute("data-rendered","r"),e.setAttribute("data-name",this.question.name),this.question.afterRender&&this.question.afterRender(e))}},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&!!this.question&&!!this.creator&&this.question.isVisible},t.prototype.renderQuestionContent=function(){var e=this.question,t={display:this.question.isCollapsed?"none":""},n=e.cssClasses,o=this.renderQuestion(),i=this.question.showErrorOnTop?this.renderErrors(n,"top"):null,s=this.question.showErrorOnBottom?this.renderErrors(n,"bottom"):null,a=e&&e.hasComment?this.renderComment(n):null,u=e.hasDescriptionUnderInput?this.renderDescription():null;return r.createElement("div",{className:e.cssContent||void 0,style:t,role:"presentation"},i,o,a,s,u)},t.prototype.renderElement=function(){var e=this.question,t=e.cssClasses,n=this.renderHeader(e),o=e.hasTitleOnLeftTop?n:null,i=e.hasTitleOnBottom?n:null,s=this.question.showErrorsAboveQuestion?this.renderErrors(t,""):null,a=this.question.showErrorsBelowQuestion?this.renderErrors(t,""):null,u=e.getRootStyle(),l=this.wrapQuestionContent(this.renderQuestionContent());return r.createElement(r.Fragment,null,r.createElement("div",{ref:this.rootRef,id:e.id,className:e.getRootCss(),style:u,role:e.ariaRole,"aria-required":this.question.ariaRequired,"aria-invalid":this.question.ariaInvalid,"aria-labelledby":e.ariaLabelledBy,"aria-expanded":null===e.ariaExpanded?void 0:"true"===e.ariaExpanded},s,o,l,i,a))},t.prototype.wrapElement=function(e){var t=this.question.survey,n=null;return t&&(n=a.wrapElement(t,e,this.question)),null!=n?n:e},t.prototype.wrapQuestionContent=function(e){var t=this.question.survey,n=null;return t&&(n=a.wrapQuestionContent(t,e,this.question)),null!=n?n:e},t.prototype.renderQuestion=function(){return t.renderQuestionBody(this.creator,this.question)},t.prototype.renderDescription=function(){return c.renderQuestionDescription(this.question)},t.prototype.renderComment=function(e){var t=c.renderLocString(this.question.locCommentText);return r.createElement("div",{className:this.question.getCommentAreaCss()},r.createElement("div",null,t),r.createElement(G,{question:this.question,cssClasses:e,otherCss:e.other,isDisplayMode:this.question.isInputReadOnly}))},t.prototype.renderHeader=function(e){return r.createElement(ee,{element:e})},t.prototype.renderErrors=function(e,t){return r.createElement(re,{element:this.question,cssClasses:e,creator:this.creator,location:t,id:this.question.id+"_errors"})},t}(c);s.Instance.registerElement("question",(function(e){return r.createElement(ne,e)}));var re=function(e){function t(t){var n=e.call(this,t)||this;return n.state=n.getState(),n}return te(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this.props.element.id+"_errors"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this.props.location},enumerable:!1,configurable:!0}),t.prototype.getState=function(e){return void 0===e&&(e=null),e?{error:e.error+1}:{error:0}},t.prototype.canRender=function(){return!!this.element&&this.element.hasVisibleErrors},t.prototype.componentWillUnmount=function(){},t.prototype.renderElement=function(){for(var e=[],t=0;t<this.element.errors.length;t++){var n="error"+t;e.push(this.creator.renderError(n,this.element.errors[t],this.cssClasses))}return r.createElement("div",{role:"alert","aria-live":"polite",className:this.element.cssError,id:this.id},e)},t}(p),oe=function(e){function t(t){return e.call(this,t)||this}return te(t,e),t.prototype.getStateElement=function(){return this.question},Object.defineProperty(t.prototype,"question",{get:function(){return this.getQuestion()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.getQuestion=function(){return this.props.question},Object.defineProperty(t.prototype,"itemCss",{get:function(){return this.props.itemCss},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.doAfterRender()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.doAfterRender()},t.prototype.doAfterRender=function(){},t.prototype.canRender=function(){return!!this.question},t.prototype.renderContent=function(){var e=this.renderQuestion();return r.createElement(r.Fragment,null,e)},t.prototype.getShowErrors=function(){return this.question.isVisible},t.prototype.renderQuestion=function(){return ne.renderQuestionBody(this.creator,this.question)},t}(p),ie=function(e){function t(t){var n=e.call(this,t)||this;return n.cellRef=r.createRef(),n}return te(t,e),t.prototype.componentWillUnmount=function(){if(e.prototype.componentWillUnmount.call(this),this.question){var t=this.cellRef.current;t&&t.removeAttribute("data-rendered")}},t.prototype.renderElement=function(){var e=this.getCellStyle(),t=this.props.cell;return r.createElement("td",{ref:this.cellRef,className:this.itemCss,colSpan:t.colSpans,"data-responsive-title":this.getHeaderText(),title:t.getTitle(),style:e,onFocus:function(){t.focusIn()}},this.wrapCell(this.props.cell,r.createElement("div",{className:this.cssClasses.cellQuestionWrapper},this.renderQuestion())))},t.prototype.getCellStyle=function(){return null},t.prototype.getHeaderText=function(){return""},t.prototype.wrapCell=function(e,t){if(!e)return t;var n=this.question.survey,r=null;return n&&(r=a.wrapMatrixCell(n,t,e,this.props.reason)),null!=r?r:t},t}(oe),se=function(e){function t(t){var n=e.call(this,t)||this;return n.state={changed:0},n.question&&n.registerCallback(n.question),n}return te(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.update=function(){this.setState({changed:this.state.changed+1})},t.prototype.registerCallback=function(e){var t=this;e.registerFunctionOnPropertyValueChanged("errors",(function(){t.update()}),"__reactSubscription")},t.prototype.unRegisterCallback=function(e){e.unRegisterFunctionOnPropertyValueChanged("errors","__reactSubscription")},t.prototype.componentDidUpdate=function(e){e.question&&e.question!==this.question&&this.unRegisterCallback(e.cell),this.question&&this.registerCallback(this.question)},t.prototype.componentWillUnmount=function(){this.question&&this.unRegisterCallback(this.question)},t.prototype.render=function(){return r.createElement(re,{element:this.question,creator:this.props.creator,cssClasses:this.question.cssClasses})},t}(r.Component),ae=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ue=function(e){function t(t){return e.call(this,t)||this}return ae(t,e),t.prototype.getPanelBase=function(){return this.props.page},Object.defineProperty(t.prototype,"page",{get:function(){return this.panelBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this.renderTitle(),t=this.renderDescription(),n=this.renderRows(this.panelBase.cssClasses),o=r.createElement(re,{element:this.panelBase,cssClasses:this.panelBase.cssClasses,creator:this.creator});return r.createElement("div",{ref:this.rootRef,className:this.page.cssRoot},e,t,o,n)},t.prototype.renderTitle=function(){return r.createElement(H,{element:this.page})},t.prototype.renderDescription=function(){if(!this.page._showDescription)return null;var e=c.renderLocString(this.page.locDescription);return r.createElement("div",{className:this.panelBase.cssClasses.page.description},e)},t}(b),le=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ce=function(e){function t(t){var n=e.call(this,t)||this;return n.onChangedHandler=function(e,t){n.isRendering||n.setState({changed:n.state&&n.state.changed?n.state.changed+1:1})},n.rootRef=o.a.createRef(),n}return le(t,e),Object.defineProperty(t.prototype,"locStr",{get:function(){return this.props.locStr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this.props.style},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.reactOnStrChanged()},t.prototype.componentWillUnmount=function(){this.locStr&&this.locStr.onStringChanged.remove(this.onChangedHandler)},t.prototype.componentDidUpdate=function(e,t){e.locStr&&e.locStr.onStringChanged.remove(this.onChangedHandler),this.reactOnStrChanged()},t.prototype.reactOnStrChanged=function(){this.locStr&&this.locStr.onStringChanged.add(this.onChangedHandler)},t.prototype.render=function(){if(!this.locStr)return null;this.isRendering=!0;var e=this.renderString();return this.isRendering=!1,e},t.prototype.renderString=function(){if(this.locStr.hasHtml){var e={__html:this.locStr.renderedHtml};return o.a.createElement("span",{ref:this.rootRef,className:"sv-string-viewer",style:this.style,dangerouslySetInnerHTML:e})}return o.a.createElement("span",{ref:this.rootRef,className:"sv-string-viewer",style:this.style},this.locStr.renderedHtml)},t}(o.a.Component);s.Instance.registerElement(i.LocalizableString.defaultRenderer,(function(e){return o.a.createElement(ce,e)}));var pe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),he=function(e){function t(t){var n=e.call(this,t)||this;return n.state={changed:0},n.rootRef=o.a.createRef(),n}return pe(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.survey.css},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var e=this;this.survey.afterRenderHeader(this.rootRef.current),this.survey.locLogo.onChanged=function(){e.setState({changed:e.state.changed+1})}},t.prototype.componentWillUnmount=function(){this.survey.locLogo.onChanged=function(){}},t.prototype.renderTitle=function(){if(!this.survey.renderedHasTitle)return null;var e=c.renderLocString(this.survey.locDescription);return o.a.createElement("div",{className:this.css.headerText,style:{maxWidth:this.survey.titleMaxWidth}},o.a.createElement(H,{element:this.survey}),this.survey.renderedHasDescription?o.a.createElement("div",{className:this.css.description},e):null)},t.prototype.renderLogoImage=function(e){if(!e)return null;var t=this.survey.getElementWrapperComponentName(this.survey,"logo-image"),n=this.survey.getElementWrapperComponentData(this.survey,"logo-image");return s.Instance.createElement(t,{data:n})},t.prototype.render=function(){return this.survey.renderedHasHeader?o.a.createElement("div",{className:this.css.header,ref:this.rootRef},this.renderLogoImage(this.survey.isLogoBefore),this.renderTitle(),this.renderLogoImage(this.survey.isLogoAfter),o.a.createElement("div",{className:this.css.headerClose})):null},t}(o.a.Component);s.Instance.registerElement("survey-header",(function(e){return o.a.createElement(he,e)}));var de=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return de(t,e),t.prototype.render=function(){return o.a.createElement("div",{className:"sv-brand-info"},o.a.createElement("a",{className:"sv-brand-info__logo",href:"https://surveyjs.io/?utm_source=built-in_links&utm_medium=online_survey_tool&utm_campaign=landing_page"},o.a.createElement("img",{src:"https://surveyjs.io/Content/Images/poweredby.svg"})),o.a.createElement("div",{className:"sv-brand-info__text"},"Try and see how easy it is to ",o.a.createElement("a",{href:"https://surveyjs.io/create-survey?utm_source=built-in_links&utm_medium=online_survey_tool&utm_campaign=create_survey"},"create a survey")),o.a.createElement("div",{className:"sv-brand-info__terms"},o.a.createElement("a",{href:"https://surveyjs.io/TermsOfUse"},"Terms of Use & Privacy Statement")))},t}(o.a.Component),ye=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ye(t,e),Object.defineProperty(t.prototype,"notifier",{get:function(){return this.props.notifier},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.notifier},t.prototype.renderElement=function(){if(!this.notifier.isDisplayed)return null;var e={visibility:this.notifier.active?"visible":"hidden"};return o.a.createElement("div",{className:this.notifier.css,style:e,role:"alert","aria-live":"polite"},o.a.createElement("span",null,this.notifier.message),o.a.createElement(L,{model:this.notifier.actionBar}))},t}(c);s.Instance.registerElement("sv-notifier",(function(e){return o.a.createElement(me,e)}));var ge=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ve=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ge(t,e),t.prototype.render=function(){var e=this,t=this.props.survey.getContainerContent(this.props.container),n=!1!==this.props.needRenderWrapper;return 0==t.length?null:n?o.a.createElement("div",{className:"sv-components-column"},t.map((function(t){return s.Instance.createElement(t.component,{survey:e.props.survey,model:t.data,container:e.props.container,key:t.id})}))):o.a.createElement(o.a.Fragment,null,t.map((function(t){return s.Instance.createElement(t.component,{survey:e.props.survey,model:t.data,container:e.props.container,key:t.id})})))},t}(o.a.Component);s.Instance.registerElement("sv-components-container",(function(e){return o.a.createElement(ve,e)}));var be=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ce=function(e){function t(t){var n=e.call(this,t)||this;return n.containerRef=o.a.createRef(),n}return be(t,e),t.prototype.componentDidMount=function(){this.containerRef.current&&(this.containerRef.current.innerHTML=i.SvgRegistry.iconsRenderedHtml())},t.prototype.render=function(){return o.a.createElement("svg",{style:{display:"none"},id:"sv-icon-holder-global-container",ref:this.containerRef})},t}(o.a.Component),Ee=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qe=function(){return(qe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},we=function(e){function t(t){var n=e.call(this,t)||this;return n.previousJSON={},n.isSurveyUpdated=!1,n.createSurvey(t),n.updateSurvey(t,{}),n.rootRef=r.createRef(),n.rootNodeId=t.id||null,n.rootNodeClassName=t.className||"",n}return Ee(t,e),Object.defineProperty(t,"cssType",{get:function(){return i.surveyCss.currentType},set:function(e){i.StylesManager.applyTheme(e)},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.survey},t.prototype.onSurveyUpdated=function(){if(this.survey){var e=this.rootRef.current;e&&this.survey.afterRenderSurvey(e),this.survey.startTimerFromUI()}},t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(this.isModelJSONChanged(t)&&(this.destroySurvey(),this.createSurvey(t),this.updateSurvey(t,{}),this.isSurveyUpdated=!0),!0)},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateSurvey(this.props,t),this.isSurveyUpdated&&(this.onSurveyUpdated(),this.isSurveyUpdated=!1)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.onSurveyUpdated()},t.prototype.destroySurvey=function(){this.survey&&(this.survey.renderCallback=void 0,this.survey.onPartialSend.clear(),this.survey.stopTimer(),this.survey.destroyResizeObserver())},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.destroySurvey()},t.prototype.doRender=function(){var e;e="completed"==this.survey.state?this.renderCompleted():"completedbefore"==this.survey.state?this.renderCompletedBefore():"loading"==this.survey.state?this.renderLoading():"empty"==this.survey.state?this.renderEmptySurvey():this.renderSurvey();var t=this.survey.backgroundImage?r.createElement("div",{className:this.css.rootBackgroundImage,style:this.survey.backgroundImageStyle}):null,n="basic"===this.survey.headerView?r.createElement(he,{survey:this.survey}):null,o=r.createElement("div",{className:"sv_custom_header"});this.survey.hasLogo&&(o=null);var i=this.survey.getRootCss(),s=this.rootNodeClassName?this.rootNodeClassName+" "+i:i;return r.createElement("div",{id:this.rootNodeId,ref:this.rootRef,className:s,style:this.survey.themeVariables},this.survey.needRenderIcons?r.createElement(Ce,null):null,r.createElement("div",{className:this.survey.wrapperFormCss},t,r.createElement("form",{onSubmit:function(e){e.preventDefault()}},o,r.createElement("div",{className:this.css.container},n,r.createElement(ve,{survey:this.survey,container:"header",needRenderWrapper:!1}),e,r.createElement(ve,{survey:this.survey,container:"footer",needRenderWrapper:!1}))),this.survey.showBrandInfo?r.createElement(fe,null):null,r.createElement(me,{notifier:this.survey.notifier})))},t.prototype.renderElement=function(){return this.doRender()},Object.defineProperty(t.prototype,"css",{get:function(){return this.survey.css},set:function(e){this.survey.css=e},enumerable:!1,configurable:!0}),t.prototype.renderCompleted=function(){if(!this.survey.showCompletedPage)return null;var e={__html:this.survey.processedCompletedHtml};return r.createElement(r.Fragment,null,r.createElement("div",{dangerouslySetInnerHTML:e,className:this.survey.completedCss}),r.createElement(ve,{survey:this.survey,container:"completePage",needRenderWrapper:!1}))},t.prototype.renderCompletedBefore=function(){var e={__html:this.survey.processedCompletedBeforeHtml};return r.createElement("div",{dangerouslySetInnerHTML:e,className:this.survey.completedBeforeCss})},t.prototype.renderLoading=function(){var e={__html:this.survey.processedLoadingHtml};return r.createElement("div",{dangerouslySetInnerHTML:e,className:this.survey.loadingBodyCss})},t.prototype.renderSurvey=function(){var e=this.survey.activePage?this.renderPage(this.survey.activePage):null,t=(this.survey.isShowStartingPage,this.survey.activePage?this.survey.activePage.id:""),n=this.survey.bodyCss,o={};return this.survey.renderedWidth&&(o.maxWidth=this.survey.renderedWidth),r.createElement("div",{className:this.survey.bodyContainerCss},r.createElement(ve,{survey:this.survey,container:"left"}),r.createElement("div",{className:"sv-components-column sv-components-column--expandable"},r.createElement(ve,{survey:this.survey,container:"center"}),r.createElement("div",{id:t,className:n,style:o},r.createElement(ve,{survey:this.survey,container:"contentTop"}),e,r.createElement(ve,{survey:this.survey,container:"contentBottom"}))),r.createElement(ve,{survey:this.survey,container:"right"}))},t.prototype.renderPage=function(e){return r.createElement(ue,{survey:this.survey,page:e,css:this.css,creator:this})},t.prototype.renderEmptySurvey=function(){return r.createElement("div",{className:this.css.bodyEmpty},this.survey.emptySurveyText)},t.prototype.createSurvey=function(e){e||(e={}),this.previousJSON={},e?e.model?this.survey=e.model:e.json&&(this.previousJSON=e.json,this.survey=new i.SurveyModel(e.json)):this.survey=new i.SurveyModel,e.css&&(this.survey.css=this.css),this.setSurveyEvents()},t.prototype.isModelJSONChanged=function(e){return e.model?this.survey!==e.model:!!e.json&&!i.Helpers.isTwoValueEquals(e.json,this.previousJSON)},t.prototype.updateSurvey=function(e,t){if(e)for(var n in t=t||{},e)"model"!=n&&"children"!=n&&"json"!=n&&("css"!=n?e[n]!==t[n]&&(0==n.indexOf("on")&&this.survey[n]&&this.survey[n].add?(t[n]&&this.survey[n].remove(t[n]),this.survey[n].add(e[n])):this.survey[n]=e[n]):(this.survey.mergeValues(e.css,this.survey.getCss()),this.survey.updateNavigationCss(),this.survey.updateElementCss()))},t.prototype.setSurveyEvents=function(){var e=this;this.survey.renderCallback=function(){var t=e.state&&e.state.modelChanged?e.state.modelChanged:0;e.setState({modelChanged:t+1})},this.survey.onPartialSend.add((function(t){e.state&&e.setState(e.state)}))},t.prototype.createQuestionElement=function(e){return W.Instance.createQuestion(e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isInputReadOnly,creator:this})},t.prototype.renderError=function(e,t,n){return r.createElement("div",{key:e},r.createElement("span",{className:n.error.icon||void 0,"aria-hidden":"true"}),r.createElement("span",{className:n.error.item||void 0},r.createElement(ce,{locStr:t.locText})))},t.prototype.questionTitleLocation=function(){return this.survey.questionTitleLocation},t.prototype.questionErrorLocation=function(){return this.survey.questionErrorLocation},t}(c);function Oe(e,t,n){return void 0===n&&(n={processEsc:!0,disableTabStop:!1}),t&&t.disableTabStop||n&&n.disableTabStop?r.cloneElement(e,{tabIndex:-1}):(n=qe({},n),r.cloneElement(e,{tabIndex:0,onKeyUp:function(e){return e.preventDefault(),e.stopPropagation(),Object(i.doKey2ClickUp)(e,n),!1},onKeyDown:function(e){return Object(i.doKey2ClickDown)(e,n)},onBlur:function(e){return Object(i.doKey2ClickBlur)(e)}}))}s.Instance.registerElement("survey",(function(e){return r.createElement(we,e)}));var Pe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xe=function(e){function t(t){var n=e.call(this,t)||this;return n.updateStateFunction=null,n.state={update:0},n}return Pe(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.props.css||this.survey.css},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(this.survey){var e=this;this.updateStateFunction=function(){e.setState({update:e.state.update+1})},this.survey.onPageVisibleChanged.add(this.updateStateFunction)}},t.prototype.componentWillUnmount=function(){this.survey&&this.updateStateFunction&&(this.survey.onPageVisibleChanged.remove(this.updateStateFunction),this.updateStateFunction=null)},t}(r.Component),Se=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_e=function(e){function t(t){var n=e.call(this,t)||this;return n.circleLength=440,n}return Se(t,e),t.prototype.getStateElement=function(){return this.timerModel},Object.defineProperty(t.prototype,"timerModel",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progress",{get:function(){return-this.timerModel.progress*this.circleLength},enumerable:!1,configurable:!0}),t.prototype.render=function(){if(!this.timerModel.isRunning)return null;var e=r.createElement("div",{className:this.timerModel.survey.getCss().timerRoot},this.timerModel.text);if(this.timerModel.showTimerAsClock){var t={strokeDasharray:this.circleLength,strokeDashoffset:this.progress},n=this.timerModel.showProgress?r.createElement(E,{className:this.timerModel.getProgressCss(),style:t,iconName:"icon-timercircle",size:"auto"}):null;e=r.createElement("div",{className:this.timerModel.rootCss},n,r.createElement("div",{className:this.timerModel.textContainerCss},r.createElement("span",{className:this.timerModel.majorTextCss},this.timerModel.clockMajorText),this.timerModel.clockMinorText?r.createElement("span",{className:this.timerModel.minorTextCss},this.timerModel.clockMinorText):null))}return e},t}(p);s.Instance.registerElement("sv-timerpanel",(function(e){return r.createElement(_e,e)}));var Ne=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ie=function(e){function t(t){var n=e.call(this,t)||this;return n.hasBeenExpanded=!1,n}return Ne(t,e),Object.defineProperty(t.prototype,"panel",{get:function(){return this.panelBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.renderHeader(),n=r.createElement(re,{element:this.panelBase,cssClasses:this.panelBase.cssClasses,creator:this.creator}),o={paddingLeft:this.panel.innerPaddingLeft,display:this.panel.isCollapsed?"none":void 0},i=null;if(!this.panel.isCollapsed||this.hasBeenExpanded){this.hasBeenExpanded=!0;var s=this.renderRows(this.panelBase.cssClasses),a=this.panelBase.cssClasses.panel.content;i=this.renderContent(o,s,a)}return r.createElement("div",{ref:this.rootRef,className:this.panelBase.getContainerCss(),onFocus:function(){e.panelBase&&e.panelBase.focusIn()},id:this.panelBase.id},this.panel.showErrorsAbovePanel?n:null,t,this.panel.showErrorsAbovePanel?null:n,i)},t.prototype.renderHeader=function(){return this.panel.hasTitle||this.panel.hasDescription?r.createElement(ee,{element:this.panel}):null},t.prototype.wrapElement=function(e){var t=this.panel.survey,n=null;return t&&(n=a.wrapElement(t,e,this.panel)),null!=n?n:e},t.prototype.renderContent=function(e,t,n){var o=this.renderBottom();return r.createElement("div",{style:e,className:n,id:this.panel.contentId},t,o)},t.prototype.renderTitle=function(){return this.panelBase.title?r.createElement(H,{element:this.panelBase}):null},t.prototype.renderDescription=function(){if(!this.panelBase.description)return null;var e=c.renderLocString(this.panelBase.locDescription);return r.createElement("div",{className:this.panel.cssClasses.panel.description},e)},t.prototype.renderBottom=function(){var e=this.panel.getFooterToolbar();return e.hasActions?r.createElement(L,{model:e}):null},t}(b);s.Instance.registerElement("panel",(function(e){return r.createElement(Ie,e)}));var Ve=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),je=function(e){function t(t){return e.call(this,t)||this}return Ve(t,e),Object.defineProperty(t.prototype,"flowPanel",{get:function(){return this.panel},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.flowPanel&&(this.flowPanel.onCustomHtmlProducing=function(){return""},this.flowPanel.onGetHtmlForQuestion=this.renderQuestion)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.flowPanel&&(this.flowPanel.onCustomHtmlProducing=null,this.flowPanel.onGetHtmlForQuestion=null)},t.prototype.getQuestion=function(e){return this.flowPanel.getQuestionByName(e)},t.prototype.renderQuestion=function(e){return"<question>"+e.name+"</question>"},t.prototype.renderRows=function(){var e=this.renderHtml();return e?[e]:[]},t.prototype.getNodeIndex=function(){return this.renderedIndex++},t.prototype.renderHtml=function(){if(!this.flowPanel)return null;var e="<span>"+this.flowPanel.produceHtml()+"</span>";if(!DOMParser){var t={__html:e};return r.createElement("div",{dangerouslySetInnerHTML:t})}var n=(new DOMParser).parseFromString(e,"text/xml");return this.renderedIndex=0,this.renderParentNode(n)},t.prototype.renderNodes=function(e){for(var t=[],n=0;n<e.length;n++){var r=this.renderNode(e[n]);r&&t.push(r)}return t},t.prototype.getStyle=function(e){var t={};return"b"===e.toLowerCase()&&(t.fontWeight="bold"),"i"===e.toLowerCase()&&(t.fontStyle="italic"),"u"===e.toLowerCase()&&(t.textDecoration="underline"),t},t.prototype.renderParentNode=function(e){var t=e.nodeName.toLowerCase(),n=this.renderNodes(this.getChildDomNodes(e));return"div"===t?r.createElement("div",{key:this.getNodeIndex()},n):r.createElement("span",{key:this.getNodeIndex(),style:this.getStyle(t)},n)},t.prototype.renderNode=function(e){if(!this.hasTextChildNodesOnly(e))return this.renderParentNode(e);var t=e.nodeName.toLowerCase();if("question"===t){var n=this.flowPanel.getQuestionByName(e.textContent);if(!n)return null;var o=r.createElement(ne,{key:n.name,element:n,creator:this.creator,css:this.css});return r.createElement("span",{key:this.getNodeIndex()},o)}return"div"===t?r.createElement("div",{key:this.getNodeIndex()},e.textContent):r.createElement("span",{key:this.getNodeIndex(),style:this.getStyle(t)},e.textContent)},t.prototype.getChildDomNodes=function(e){for(var t=[],n=0;n<e.childNodes.length;n++)t.push(e.childNodes[n]);return t},t.prototype.hasTextChildNodesOnly=function(e){for(var t=e.childNodes,n=0;n<t.length;n++)if("#text"!==t[n].nodeName.toLowerCase())return!1;return!0},t.prototype.renderContent=function(e,t){return r.createElement("f-panel",{style:e},t)},t}(Ie);s.Instance.registerElement("flowpanel",(function(e){return r.createElement(je,e)}));var Te=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Re=function(e){function t(t){return e.call(this,t)||this}return Te(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses;return r.createElement("fieldset",{className:this.question.getSelectBaseRootCss(),ref:function(t){return e.setControl(t)},role:this.question.a11y_input_ariaRole,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-describedby":this.question.a11y_input_ariaDescribedBy},r.createElement("legend",{className:"sv-hidden"},this.question.locTitle.renderedHtml),this.getHeader(),this.question.hasColumns?this.getColumnedBody(t):this.getBody(t),this.getFooter(),this.question.isOtherSelected?this.renderOther():null)},t.prototype.getHeader=function(){var e=this;if(this.question.hasHeadItems)return this.question.headItems.map((function(t,n){return e.renderItem("item_h"+n,t,!1,e.question.cssClasses)}))},t.prototype.getFooter=function(){var e=this;if(this.question.hasFootItems)return this.question.footItems.map((function(t,n){return e.renderItem("item_f"+n,t,!1,e.question.cssClasses)}))},t.prototype.getColumnedBody=function(e){return r.createElement("div",{className:e.rootMultiColumn},this.getColumns(e))},t.prototype.getColumns=function(e){var t=this;return this.question.columns.map((function(n,o){var i=n.map((function(n,r){return t.renderItem("item"+r,n,0===o&&0===r,e,""+o+r)}));return r.createElement("div",{key:"column"+o,className:t.question.getColumnClass(),role:"presentation"},i)}))},t.prototype.getBody=function(e){return this.question.blockedRow?r.createElement("div",{className:e.rootRow},this.getItems(e,this.question.dataChoices)):r.createElement(r.Fragment,null,this.getItems(e,this.question.bodyItems))},t.prototype.getItems=function(e,t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i="item"+r,s=this.renderItem(i,o,0==r,e,""+r);s&&n.push(s)}return n},Object.defineProperty(t.prototype,"textStyle",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.renderOther=function(){var e=this.question.cssClasses;return r.createElement("div",{className:this.question.getCommentAreaCss(!0)},r.createElement(Y,{question:this.question,otherCss:e.other,cssClasses:e,isDisplayMode:this.isDisplayMode}))},t.prototype.renderItem=function(e,t,n,r,o){var i=s.Instance.createElement(this.question.itemComponent,{key:e,question:this.question,cssClasses:r,isDisplayMode:this.isDisplayMode,item:t,textStyle:this.textStyle,index:o,isFirst:n}),u=this.question.survey,l=null;return u&&i&&(l=a.wrapItemValue(u,i,this.question,t)),null!=l?l:i},t}(h),De=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=function(e){n.question.clickItemHandler(n.item,e.target.checked)},n}return Te(t,e),t.prototype.getStateElement=function(){return this.item},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textStyle",{get:function(){return this.props.textStyle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isFirst",{get:function(){return this.props.isFirst},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hideCaption",{get:function(){return!0===this.props.hideCaption},enumerable:!1,configurable:!0}),t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(!!this.question&&!(this.question.customWidget&&!this.question.customWidgetData.isNeedRender&&!this.question.customWidget.widgetJson.isDefaultRender&&!this.question.customWidget.widgetJson.render))},t.prototype.canRender=function(){return!!this.item&&!!this.question},t.prototype.renderElement=function(){var e=this.question.isItemSelected(this.item);return this.renderCheckbox(e,null)},Object.defineProperty(t.prototype,"inputStyle",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.renderCheckbox=function(e,t){var n=this.question.getItemId(this.item),o=this.question.getItemClass(this.item),i=this.question.getLabelClass(this.item),s=this.hideCaption?null:r.createElement("span",{className:this.cssClasses.controlLabel},this.renderLocString(this.item.locText,this.textStyle));return r.createElement("div",{className:o,role:"presentation"},r.createElement("label",{className:i},r.createElement("input",{className:this.cssClasses.itemControl,type:"checkbox",role:"option",name:this.question.name+this.item.id,value:this.item.value,id:n,style:this.inputStyle,disabled:!this.question.getItemEnabled(this.item),checked:e,onChange:this.handleOnChange}),this.cssClasses.materialDecorator?r.createElement("span",{className:this.cssClasses.materialDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:this.cssClasses.itemDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,s),t)},t}(p);s.Instance.registerElement("survey-checkbox-item",(function(e){return r.createElement(De,e)})),W.Instance.registerQuestion("checkbox",(function(e){return r.createElement(Re,e)}));var Ae=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Le=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ae(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this;if(this.question.selectToRankEnabled){return r.createElement("div",{className:this.question.rootClass,ref:function(t){return e.setControl(t)}},r.createElement("div",{className:this.question.getContainerClasses("from"),"data-ranking":"from-container"},this.getItems(this.question.unRankingChoices,!0),0===this.question.unRankingChoices.length?r.createElement("div",{className:this.question.cssClasses.containerPlaceholder}," ",this.renderLocString(this.question.locSelectToRankEmptyRankedAreaText)," "):null),r.createElement("div",{className:this.question.cssClasses.containersDivider}),r.createElement("div",{className:this.question.getContainerClasses("to"),"data-ranking":"to-container"},this.getItems(),0===this.question.rankingChoices.length?r.createElement("div",{className:this.question.cssClasses.containerPlaceholder}," ",this.renderLocString(this.question.locSelectToRankEmptyUnrankedAreaText)," "):null))}return r.createElement("div",{className:this.question.rootClass,ref:function(t){return e.setControl(t)}},this.getItems())},t.prototype.getItems=function(e,t){var n=this;void 0===e&&(e=this.question.rankingChoices);for(var r=[],o=function(o){var s=e[o];r.push(i.renderItem(s,o,(function(e){n.question.handleKeydown.call(n.question,e,s)}),(function(e){e.persist(),n.question.handlePointerDown.call(n.question,e,s,e.currentTarget)}),i.question.cssClasses,i.question.getItemClass(s),i.question,t))},i=this,s=0;s<e.length;s++)o(s);return r},t.prototype.renderItem=function(e,t,n,o,i,s,u,l){var c=e.value+"-"+t+"-item",p=this.renderLocString(e.locText),h=t,d=this.question.getNumberByIndex(t),f=this.question.getItemTabIndex(e),y=r.createElement(ke,{key:c,text:p,index:h,indexText:d,itemTabIndex:f,handleKeydown:n,handlePointerDown:o,cssClasses:i,itemClass:s,question:u,unrankedItem:l,item:e}),m=this.question.survey,g=null;return m&&(g=a.wrapItemValue(m,y,this.question,e)),null!=g?g:y},t}(h),ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ae(t,e),Object.defineProperty(t.prototype,"text",{get:function(){return this.props.text},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"indexText",{get:function(){return this.props.indexText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"handleKeydown",{get:function(){return this.props.handleKeydown},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"handlePointerDown",{get:function(){return this.props.handlePointerDown},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemClass",{get:function(){return this.props.itemClass},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemTabIndex",{get:function(){return this.props.itemTabIndex},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"unrankedItem",{get:function(){return this.props.unrankedItem},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.renderEmptyIcon=function(){return r.createElement("svg",null,r.createElement("use",{xlinkHref:this.question.dashSvgIcon}))},t.prototype.renderElement=function(){return r.createElement("div",{tabIndex:this.itemTabIndex,className:this.itemClass,onKeyDown:this.handleKeydown,onPointerDown:this.handlePointerDown,"data-sv-drop-target-ranking-item":this.index},r.createElement("div",{tabIndex:-1,style:{outline:"none"}},r.createElement("div",{className:this.cssClasses.itemGhostNode}),r.createElement("div",{className:this.cssClasses.itemContent},r.createElement("div",{className:this.cssClasses.itemIconContainer},r.createElement("svg",{className:this.question.getIconHoverCss()},r.createElement("use",{xlinkHref:this.question.dragDropSvgIcon})),r.createElement("svg",{className:this.question.getIconFocusCss()},r.createElement("use",{xlinkHref:this.question.arrowsSvgIcon}))),r.createElement("div",{className:this.question.getItemIndexClasses(this.item)},!this.unrankedItem&&this.indexText?this.indexText:this.renderEmptyIcon()),r.createElement("div",{className:this.cssClasses.controlLabel},this.text))))},t}(p);W.Instance.registerQuestion("ranking",(function(e){return r.createElement(Le,e)}));var Me=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Be=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnMouseDown=n.handleOnMouseDown.bind(n),n}return Me(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.handleOnMouseDown=function(e){this.question.onMouseDown()},t}(c),Fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Me(t,e),t.prototype.render=function(){var e=this.renderLocString(this.item.locText);return o.a.createElement("label",{onMouseDown:this.handleOnMouseDown,className:this.question.getItemClassByText(this.item.itemValue,this.item.text)},o.a.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.name,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.isDisplayMode,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:function(){},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),o.a.createElement("span",{className:this.question.cssClasses.itemText},e))},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this)},t}(Be);s.Instance.registerElement("sv-rating-item",(function(e){return o.a.createElement(Fe,e)}));var ze=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),He=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ze(t,e),t.prototype.render=function(){var e=this;return o.a.createElement("label",{onMouseDown:this.handleOnMouseDown,className:this.question.getItemClass(this.item.itemValue),onMouseOver:function(t){return e.question.onItemMouseIn(e.item)},onMouseOut:function(t){return e.question.onItemMouseOut(e.item)}},o.a.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.name,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.isDisplayMode,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:function(){},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),o.a.createElement(E,{className:"sv-star",size:"auto",iconName:this.question.itemStarIcon,title:this.item.text}),o.a.createElement(E,{className:"sv-star-2",size:"auto",iconName:this.question.itemStarIconAlt,title:this.item.text}))},t}(Be);s.Instance.registerElement("sv-rating-item-star",(function(e){return o.a.createElement(He,e)}));var We=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return We(t,e),t.prototype.render=function(){var e=this;return o.a.createElement("label",{onMouseDown:this.handleOnMouseDown,style:this.question.getItemStyle(this.item.itemValue,this.item.highlight),className:this.question.getItemClass(this.item.itemValue),onMouseOver:function(t){return e.question.onItemMouseIn(e.item)},onMouseOut:function(t){return e.question.onItemMouseOut(e.item)}},o.a.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.name,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.isDisplayMode,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:function(){},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),o.a.createElement(E,{size:"auto",iconName:this.question.getItemSmileyIconName(this.item.itemValue),title:this.item.text}))},t}(Be);s.Instance.registerElement("sv-rating-item-smiley",(function(e){return o.a.createElement(Ue,e)}));var Qe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Je=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Qe(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){if(!this.item)return null;var e=this.props.item,t=this.renderDescription(e);return o.a.createElement("div",{className:"sd-rating-dropdown-item"},o.a.createElement("span",{className:"sd-rating-dropdown-item_text"},e.title),t)},t.prototype.renderDescription=function(e){return e.description?o.a.createElement("div",{className:"sd-rating-dropdown-item_description"},this.renderLocString(e.description,void 0,"locString")):null},t}(c);s.Instance.registerElement("sv-rating-dropdown-item",(function(e){return o.a.createElement(Je,e)}));var Ke=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ge=function(e){function t(t){return e.call(this,t)||this}return Ke(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateDomElement()},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.updateDomElement()},t.prototype.updateDomElement=function(){if(this.inputElement){var e=this.inputElement,t=this.model.inputStringRendered;i.Helpers.isTwoValueEquals(t,e.value,!1,!0,!1)||(e.value=this.model.inputStringRendered)}},t.prototype.onChange=function(e){var t=i.settings.environment.root;e.target===t.activeElement&&(this.model.inputStringRendered=e.target.value)},t.prototype.keyhandler=function(e){this.model.inputKeyHandler(e)},t.prototype.onBlur=function(e){this.model.onBlur(e)},t.prototype.onFocus=function(e){this.model.onFocus(e)},t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this;return r.createElement("div",{className:this.question.cssClasses.hint},this.model.showHintPrefix?r.createElement("div",{className:this.question.cssClasses.hintPrefix},r.createElement("span",null,this.model.hintStringPrefix)):null,r.createElement("div",{className:this.question.cssClasses.hintSuffixWrapper},this.model.showHintString?r.createElement("div",{className:this.question.cssClasses.hintSuffix},r.createElement("span",{style:{visibility:"hidden"},"data-bind":"text: model.filterString"},this.model.inputStringRendered),r.createElement("span",null,this.model.hintStringSuffix)):null,r.createElement("input",{type:"text",autoComplete:"off",id:this.question.getInputId(),inputMode:this.model.inputMode,ref:function(t){return e.inputElement=t},className:this.question.cssClasses.filterStringInput,disabled:this.question.isInputReadOnly,readOnly:!!this.model.filterReadOnly||void 0,size:this.model.inputStringRendered?void 0:1,role:this.model.filterStringEnabled?this.question.ariaRole:void 0,"aria-expanded":null===this.question.ariaExpanded?void 0:"true"===this.question.ariaExpanded,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-controls":this.model.listElementId,"aria-activedescendant":this.model.ariaActivedescendant,placeholder:this.model.filterStringPlaceholder,onKeyDown:function(t){e.keyhandler(t)},onChange:function(t){e.onChange(t)},onBlur:function(t){e.onBlur(t)},onFocus:function(t){e.onFocus(t)}})))},t}(c);W.Instance.registerQuestion("sv-tagbox-filter",(function(e){return r.createElement(Ge,e)}));var Ye=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ze=function(e){function t(t){var n=e.call(this,t)||this;return n.state={changed:0},n.setupModel(),n}return Ye(t,e),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.setupModel()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.item&&(this.item.locText.onChanged=function(){})},t.prototype.setupModel=function(){if(this.item.locText){var e=this;this.item.locText.onChanged=function(){e.setState({changed:e.state.changed+1})}}},t.prototype.getStateElement=function(){return this.item},Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.item},t.prototype.renderElement=function(){return r.createElement("option",{value:this.item.value,disabled:!this.item.isEnabled},this.item.text)},t}(p),$e=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.click=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onClick(e)},t.chevronPointerDown=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.chevronPointerDown(e)},t.clear=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onClear(e)},t.keyhandler=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.keyHandler(e)},t.blur=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onBlur(e),t.updateInputDomElement()},t.focus=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onFocus(e)},t}return $e(t,e),t.prototype.getStateElement=function(){return this.question.dropdownListModel},t.prototype.setValueCore=function(e){this.questionBase.renderedValue=e},t.prototype.getValueCore=function(){return this.questionBase.renderedValue},t.prototype.renderReadOnlyElement=function(){return r.createElement("div",null,this.question.readOnlyText)},t.prototype.renderSelect=function(e){var t,n,o=null;if(this.question.isReadOnly){var s=this.question.selectedItemLocText?this.renderLocString(this.question.selectedItemLocText):"";o=r.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),disabled:!0},s,this.renderReadOnlyElement())}else this.question.dropdownListModel||(this.question.dropdownListModel=new i.DropdownListModel(this.question)),o=r.createElement(r.Fragment,null,this.renderInput(this.question.dropdownListModel),r.createElement(I,{model:null===(n=null===(t=this.question)||void 0===t?void 0:t.dropdownListModel)||void 0===n?void 0:n.popupModel}));return r.createElement("div",{className:e.selectWrapper,onClick:this.click},o,this.createChevronButton())},t.prototype.renderValueElement=function(e){return this.question.showInputFieldComponent?s.Instance.createElement(this.question.inputFieldComponentName,{item:e.getSelectedAction(),question:this.question}):this.question.showSelectedItemLocText?this.renderLocString(this.question.selectedItemLocText):null},t.prototype.renderInput=function(e){var t=this,n=this.renderValueElement(e),o=i.settings.environment.root;return r.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),tabIndex:e.noTabIndex?void 0:0,disabled:this.question.isInputReadOnly,required:this.question.isRequired,onKeyDown:this.keyhandler,onBlur:this.blur,role:this.question.ariaRole,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy,"aria-expanded":null===this.question.ariaExpanded?void 0:"true"===this.question.ariaExpanded,"aria-controls":e.listElementId,"aria-activedescendant":e.ariaActivedescendant},e.showHintPrefix?r.createElement("div",{className:this.question.cssClasses.hintPrefix},r.createElement("span",null,e.hintStringPrefix)):null,r.createElement("div",{className:this.question.cssClasses.controlValue},e.showHintString?r.createElement("div",{className:this.question.cssClasses.hintSuffix},r.createElement("span",{style:{visibility:"hidden"},"data-bind":"text: model.filterString"},e.inputStringRendered),r.createElement("span",null,e.hintStringSuffix)):null,n,r.createElement("input",{type:"text",autoComplete:"off",id:this.question.getInputId(),ref:function(e){return t.inputElement=e},className:this.question.cssClasses.filterStringInput,role:e.filterStringEnabled?this.question.ariaRole:void 0,"aria-expanded":null===this.question.ariaExpanded?void 0:"true"===this.question.ariaExpanded,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-controls":e.listElementId,"aria-activedescendant":e.ariaActivedescendant,placeholder:e.placeholderRendered,readOnly:!!e.filterReadOnly||void 0,tabIndex:e.noTabIndex?void 0:-1,disabled:this.question.isInputReadOnly,inputMode:e.inputMode,onChange:function(t){!function(t){t.target===o.activeElement&&(e.inputStringRendered=t.target.value)}(t)},onBlur:this.blur,onFocus:this.focus})),this.createClearButton())},t.prototype.createClearButton=function(){if(!this.question.allowClear||!this.question.cssClasses.cleanButtonIconId)return null;var e={display:this.question.showClearButton?"":"none"};return r.createElement("div",{className:this.question.cssClasses.cleanButton,style:e,onClick:this.clear,"aria-hidden":"true"},r.createElement(E,{className:this.question.cssClasses.cleanButtonSvg,iconName:this.question.cssClasses.cleanButtonIconId,title:this.question.clearCaption,size:"auto"}))},t.prototype.createChevronButton=function(){return this.question.cssClasses.chevronButtonIconId?r.createElement("div",{className:this.question.cssClasses.chevronButton,"aria-hidden":"true",onPointerDown:this.chevronPointerDown},r.createElement(E,{className:this.question.cssClasses.chevronButtonSvg,iconName:this.question.cssClasses.chevronButtonIconId,size:"auto"})):null},t.prototype.renderOther=function(e){return r.createElement("div",{className:this.question.getCommentAreaCss(!0)},r.createElement(Y,{question:this.question,otherCss:e.other,cssClasses:e,isDisplayMode:this.isDisplayMode,isOther:!0}))},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateInputDomElement()},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.updateInputDomElement()},t.prototype.updateInputDomElement=function(){if(this.inputElement){var e=this.inputElement,t=this.question.dropdownListModel.inputStringRendered;i.Helpers.isTwoValueEquals(t,e.value,!1,!0,!1)||(e.value=this.question.dropdownListModel.inputStringRendered)}},t}(d),et=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tt=function(e){function t(t){return e.call(this,t)||this}return et(t,e),t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.isOtherSelected?this.renderOther(e):null,n=this.renderSelect(e);return r.createElement("div",{className:this.question.renderCssRoot},n,t)},t}(Xe);W.Instance.registerQuestion("dropdown",(function(e){return r.createElement(tt,e)}));var nt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rt=function(e){function t(t){return e.call(this,t)||this}return nt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.item&&!!this.question},t.prototype.renderElement=function(){var e=this,t=this.renderLocString(this.item.locText);return r.createElement("div",{className:"sv-tagbox__item"},r.createElement("div",{className:"sv-tagbox__item-text"},t),r.createElement("div",{className:this.question.cssClasses.cleanItemButton,onClick:function(t){e.question.dropdownListModel.deselectItem(e.item.value),t.stopPropagation()}},r.createElement(E,{className:this.question.cssClasses.cleanItemButtonSvg,iconName:this.question.cssClasses.cleanItemButtonIconId,size:"auto"})))},t}(p),ot=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),it=function(e){function t(t){return e.call(this,t)||this}return ot(t,e),t.prototype.renderItem=function(e,t){return r.createElement(rt,{key:e,question:this.question,item:t})},t.prototype.renderInput=function(e){var t=this,n=e,o=this.question.selectedChoices.map((function(e,n){return t.renderItem("item"+n,e)}));return r.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),tabIndex:e.noTabIndex?void 0:0,disabled:this.question.isInputReadOnly,required:this.question.isRequired,onKeyDown:this.keyhandler,onBlur:this.blur,role:this.question.ariaRole,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy,"aria-expanded":null===this.question.ariaExpanded?void 0:"true"===this.question.ariaExpanded,"aria-controls":e.listElementId,"aria-activedescendant":e.ariaActivedescendant},r.createElement("div",{className:this.question.cssClasses.controlValue},o,r.createElement(Ge,{model:n,question:this.question})),this.createClearButton())},t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.isOtherSelected?this.renderOther(e):null,n=this.renderSelect(e);return r.createElement("div",{className:this.question.renderCssRoot},n,t)},t.prototype.renderReadOnlyElement=function(){return this.question.locReadOnlyText?this.renderLocString(this.question.locReadOnlyText):null},t}(Xe);W.Instance.registerQuestion("tagbox",(function(e){return r.createElement(it,e)}));var st=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),at=function(e){function t(t){return e.call(this,t)||this}return st(t,e),t.prototype.renderSelect=function(e){var t=this,n=this.isDisplayMode?r.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),disabled:!0},this.question.readOnlyText):r.createElement("select",{id:this.question.inputId,className:this.question.getControlClass(),ref:function(e){return t.setControl(e)},autoComplete:this.question.autocomplete,onChange:this.updateValueOnEvent,onInput:this.updateValueOnEvent,onClick:function(e){t.question.onClick(e)},onKeyUp:function(e){t.question.onKeyUp(e)},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy,required:this.question.isRequired},this.question.allowClear?r.createElement("option",{value:""},this.question.placeholder):null,this.question.visibleChoices.map((function(e,t){return r.createElement(Ze,{key:"item"+t,item:e})})));return r.createElement("div",{className:e.selectWrapper},n,this.createChevronButton())},t}(tt);W.Instance.registerQuestion("sv-dropdown-select",(function(e){return r.createElement(at,e)})),i.RendererFactory.Instance.registerRenderer("dropdown","select","sv-dropdown-select");var ut=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lt=function(e){function t(t){var n=e.call(this,t)||this;return n.state={rowsChanged:0},n}return ut(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(e.prototype.componentDidMount.call(this),this.question){var t=this;this.question.visibleRowsChangedCallback=function(){t.setState({rowsChanged:t.state.rowsChanged+1})}}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question&&(this.question.visibleRowsChangedCallback=null)},t.prototype.renderElement=function(){for(var e=this,t=this.question.cssClasses,n=this.question.hasRows?r.createElement("td",null):null,o=[],i=0;i<this.question.visibleColumns.length;i++){var s=this.question.visibleColumns[i],a="column"+i,u=this.renderLocString(s.locText),l={};this.question.columnMinWidth&&(l.minWidth=this.question.columnMinWidth,l.width=this.question.columnMinWidth),o.push(r.createElement("th",{className:this.question.cssClasses.headerCell,style:l,key:a},this.wrapCell({column:s},u,"column-header")))}var c=[],p=this.question.visibleRows;for(i=0;i<p.length;i++){var h=p[i];a="row-"+h.name+"-"+i;c.push(r.createElement(ct,{key:a,question:this.question,cssClasses:t,isDisplayMode:this.isDisplayMode,row:h,isFirst:0==i}))}var d=this.question.showHeader?r.createElement("thead",null,r.createElement("tr",null,n,o)):null;return r.createElement("div",{className:t.tableWrapper,ref:function(t){return e.setControl(t)}},r.createElement("fieldset",null,r.createElement("legend",{className:"sv-hidden"},this.question.locTitle.renderedHtml),r.createElement("table",{className:this.question.getTableCss()},d,r.createElement("tbody",null,c))))},t}(h),ct=function(e){function t(t){return e.call(this,t)||this}return ut(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.row},enumerable:!1,configurable:!0}),t.prototype.wrapCell=function(e,t,n){if(!n)return t;var r=this.question.survey,o=null;return r&&(o=a.wrapMatrixCell(r,t,e,n)),null!=o?o:t},t.prototype.canRender=function(){return!!this.row},t.prototype.renderElement=function(){var e=null;if(this.question.hasRows){var t=this.renderLocString(this.row.locText),n={};this.question.rowTitleWidth&&(n.minWidth=this.question.rowTitleWidth,n.width=this.question.rowTitleWidth),e=r.createElement("td",{style:n,className:this.question.cssClasses.rowTextCell},this.wrapCell({row:this.row},t,"row-header"))}var o=this.generateTds();return r.createElement("tr",{className:this.row.rowClasses||void 0},e,o)},t.prototype.generateTds=function(){for(var e=this,t=[],n=this.row,o=this.question.cellComponent,i=function(){var i=null,l=a.question.visibleColumns[u],c="value"+u,p=a.question.getItemClass(n,l);if(a.question.hasCellText){var h=a.question.isInputReadOnly?null:function(t){return function(){return e.cellClick(n,t)}};i=r.createElement("td",{key:c,className:p,onClick:h?h(l):function(){}},a.renderLocString(a.question.getCellDisplayLocText(n.name,l)))}else{var d=s.Instance.createElement(o,{question:a.question,row:a.row,column:l,columnIndex:u,cssClasses:a.cssClasses,isDisplayMode:a.isDisplayMode,cellChanged:function(){e.cellClick(e.row,l)}});i=r.createElement("td",{key:c,"data-responsive-title":l.locText.renderedHtml,className:a.question.cssClasses.cell},d)}t.push(i)},a=this,u=0;u<this.question.visibleColumns.length;u++)i();return t},t.prototype.cellClick=function(e,t){e.value=t.value,this.setState({value:this.row.value})},t}(p),pt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnMouseDown=n.handleOnMouseDown.bind(n),n.handleOnChange=n.handleOnChange.bind(n),n}return ut(t,e),t.prototype.handleOnChange=function(e){this.props.cellChanged&&this.props.cellChanged()},t.prototype.handleOnMouseDown=function(e){this.question.onMouseDown()},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.row},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"column",{get:function(){return this.props.column},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"columnIndex",{get:function(){return this.props.columnIndex},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.question&&!!this.row},t.prototype.renderElement=function(){var e=this.row.value==this.column.value,t=this.question.inputId+"_"+this.row.name+"_"+this.columnIndex,n=this.question.getItemClass(this.row,this.column),o=this.question.isMobile?r.createElement("span",{className:this.question.cssClasses.cellResponsiveTitle},this.renderLocString(this.column.locText)):void 0;return r.createElement("label",{onMouseDown:this.handleOnMouseDown,className:n},this.renderInput(t,e),r.createElement("span",{className:this.question.cssClasses.materialDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:this.cssClasses.itemDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null),o)},t.prototype.renderInput=function(e,t){return r.createElement("input",{id:e,type:"radio",className:this.cssClasses.itemValue,name:this.row.fullName,value:this.column.value,disabled:this.isDisplayMode,checked:t,onChange:this.handleOnChange,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.getCellAriaLabel(this.row.locText.renderedHtml,this.column.locText.renderedHtml),"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-describedby":this.question.a11y_input_ariaDescribedBy})},t}(p);s.Instance.registerElement("survey-matrix-cell",(function(e){return r.createElement(pt,e)})),W.Instance.registerQuestion("matrix",(function(e){return r.createElement(lt,e)}));var ht=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dt=function(e){function t(t){return e.call(this,t)||this}return ht(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.reactOnStrChanged()},t.prototype.componentWillUnmount=function(){this.question.locHtml.onChanged=function(){}},t.prototype.componentDidUpdate=function(e,t){this.reactOnStrChanged()},t.prototype.reactOnStrChanged=function(){var e=this;this.question.locHtml.onChanged=function(){e.setState({changed:e.state&&e.state.changed?e.state.changed+1:1})}},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&!!this.question.html},t.prototype.renderElement=function(){var e={__html:this.question.locHtml.renderedHtml};return r.createElement("div",{className:this.question.renderCssRoot,dangerouslySetInnerHTML:e})},t}(h);W.Instance.registerQuestion("html",(function(e){return r.createElement(dt,e)}));var ft=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ft(t,e),t.prototype.render=function(){return r.createElement("div",{className:"sd-loading-indicator"},r.createElement(E,{iconName:"icon-loading",size:"auto"}))},t}(r.Component),mt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gt=function(e){function t(t){return e.call(this,t)||this}return mt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.allowShowPreview?this.renderPreview():null,n=this.question.showLoadingIndicator?this.renderLoadingIndicator():null,o=this.question.isPlayingVideo?this.renderVideo():null,i=this.question.showFileDecorator?this.renderFileDecorator():null,s=this.question.showRemoveButton?this.renderClearButton(this.question.cssClasses.removeButton):null,a=this.question.showRemoveButtonBottom?this.renderClearButton(this.question.cssClasses.removeButtonBottom):null,u=this.question.fileNavigatorVisible?r.createElement(L,{model:this.question.fileNavigator}):null,l=this.isDisplayMode?r.createElement("input",{type:"file",disabled:this.isDisplayMode,className:this.isDisplayMode?this.question.getReadOnlyFileCss():this.question.cssClasses.fileInput,id:this.question.inputId,ref:function(t){return e.setControl(t)},style:this.isDisplayMode?{color:"transparent"}:{},onChange:this.isDisplayMode?function(){}:this.question.doChange,multiple:this.question.allowMultiple,placeholder:this.question.title,accept:this.question.acceptedTypes}):this.question.hasFileUI?r.createElement("input",{type:"file",disabled:this.isDisplayMode,tabIndex:-1,className:this.isDisplayMode?this.question.getReadOnlyFileCss():this.question.cssClasses.fileInput,id:this.question.inputId,ref:function(t){return e.setControl(t)},style:this.isDisplayMode?{color:"transparent"}:{},onChange:this.isDisplayMode?function(){}:this.question.doChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy,multiple:this.question.allowMultiple,title:this.question.inputTitle,accept:this.question.acceptedTypes,capture:this.question.renderCapture}):null;return r.createElement("div",{className:this.question.fileRootCss},l,r.createElement("div",{className:this.question.cssClasses.dragArea,onDrop:this.question.onDrop,onDragOver:this.question.onDragOver,onDragLeave:this.question.onDragLeave,onDragEnter:this.question.onDragEnter},i,n,o,s,t,a,u))},t.prototype.renderFileDecorator=function(){var e=this.question.showChooseButton?this.renderChooseButton():null,t=this.question.actionsContainerVisible?r.createElement(L,{model:this.question.actionsContainer}):null,n=this.question.isEmpty()?r.createElement("span",{className:this.question.cssClasses.noFileChosen},this.question.noFileChosenCaption):null;return r.createElement("div",{className:this.question.getFileDecoratorCss()},r.createElement("span",{className:this.question.cssClasses.dragAreaPlaceholder},this.renderLocString(this.question.locRenderedPlaceholder)),r.createElement("div",{className:this.question.cssClasses.wrapper},e,t,n))},t.prototype.renderChooseButton=function(){return r.createElement(bt,{data:{question:this.question}})},t.prototype.renderClearButton=function(e){return this.question.isUploading?null:r.createElement("button",{type:"button",onClick:this.question.doClean,className:e},r.createElement("span",null,this.question.clearButtonCaption),this.question.cssClasses.removeButtonIconId?r.createElement(E,{iconName:this.question.cssClasses.removeButtonIconId,size:"auto",title:this.question.clearButtonCaption}):null)},t.prototype.renderPreview=function(){return s.Instance.createElement("sv-file-preview",{question:this.question})},t.prototype.renderLoadingIndicator=function(){return r.createElement("div",{className:this.question.cssClasses.loadingIndicator},r.createElement(yt,null))},t.prototype.renderVideo=function(){return r.createElement("div",{className:this.question.cssClasses.videoContainer},r.createElement(P,{item:this.question.changeCameraAction}),r.createElement(P,{item:this.question.closeCameraAction}),r.createElement("video",{autoPlay:!0,playsInline:!0,id:this.question.videoId,className:this.question.cssClasses.video}),r.createElement(P,{item:this.question.takePictureAction}))},t}(h);W.Instance.registerQuestion("file",(function(e){return r.createElement(gt,e)}));var vt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bt=function(e){function t(t){return e.call(this,t)||this}return vt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item&&this.props.item.data.question||this.props.data.question},enumerable:!1,configurable:!0}),t.prototype.render=function(){return Oe(o.a.createElement("label",{tabIndex:0,className:this.question.getChooseFileCss(),htmlFor:this.question.inputId,"aria-label":this.question.chooseButtonText},this.question.cssClasses.chooseFileIconId?o.a.createElement(E,{title:this.question.chooseButtonText,iconName:this.question.cssClasses.chooseFileIconId,size:"auto"}):null,o.a.createElement("span",null,this.question.chooseButtonText)))},t}(p);s.Instance.registerElement("sv-file-choose-btn",(function(e){return o.a.createElement(bt,e)}));var Ct=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Et=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ct(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.renderFileSign=function(e,t){var n=this;return e&&t.name?o.a.createElement("div",{className:e},o.a.createElement("a",{href:t.content,onClick:function(e){n.question.doDownloadFile(e,t)},title:t.name,download:t.name,style:{width:this.question.imageWidth}},t.name)):null},t.prototype.renderElement=function(){var e=this,t=this.question.previewValue.map((function(t,n){return t?o.a.createElement("span",{key:e.question.inputId+"_"+n,className:e.question.cssClasses.preview,style:{display:e.question.isPreviewVisible(n)?void 0:"none"}},e.renderFileSign(e.question.cssClasses.fileSign,t),o.a.createElement("div",{className:e.question.getImageWrapperCss(t)},e.question.canPreviewImage(t)?o.a.createElement("img",{src:t.content,style:{height:e.question.imageHeight,width:e.question.imageWidth},alt:"File preview"}):e.question.cssClasses.defaultImage?o.a.createElement(E,{iconName:e.question.cssClasses.defaultImageIconId,size:"auto",className:e.question.cssClasses.defaultImage}):null,t.name&&!e.question.isReadOnly?o.a.createElement("div",{className:e.question.getRemoveButtonCss(),onClick:function(){return e.question.doRemoveFile(t)}},o.a.createElement("span",{className:e.question.cssClasses.removeFile},e.question.removeFileCaption),e.question.cssClasses.removeFileSvgIconId?o.a.createElement(E,{title:e.question.removeFileCaption,iconName:e.question.cssClasses.removeFileSvgIconId,size:"auto",className:e.question.cssClasses.removeFileSvg}):null):null),e.renderFileSign(e.question.cssClasses.fileSignBottom,t)):null}));return o.a.createElement("div",{className:this.question.cssClasses.fileList||void 0},t)},t.prototype.canRender=function(){return this.question.showPreviewContainer},t}(c);s.Instance.registerElement("sv-file-preview",(function(e){return o.a.createElement(Et,e)}));var qt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wt=function(e){function t(t){return e.call(this,t)||this}return qt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){for(var e=this.question.cssClasses,t=this.question.getRows(),n=[],o=0;o<t.length;o++)t[o].isVisible&&n.push(this.renderRow(o,t[o].cells,e));return r.createElement("table",{className:this.question.getQuestionRootCss()},r.createElement("tbody",null,n))},t.prototype.renderCell=function(e,t,n){var o;return o=e.isErrorsCell?r.createElement(se,{question:e.item.editor,creator:this.creator}):r.createElement(Ot,{question:this.question,item:e.item,creator:this.creator,cssClasses:t}),r.createElement("td",{key:"item"+n,className:e.className,onFocus:function(){e.item.focusIn()}},o)},t.prototype.renderRow=function(e,t,n){for(var o="item"+e,i=[],s=0;s<t.length;s++){var a=t[s];i.push(this.renderCell(a,n,s))}return r.createElement("tr",{key:o,className:n.row},i)},t}(h),Ot=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return qt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElements=function(){return[this.item,this.item.editor]},Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this.item,t=this.cssClasses,n={};return this.question.itemTitleWidth&&(n.minWidth=this.question.itemTitleWidth,n.width=this.question.itemTitleWidth),r.createElement("label",{className:this.question.getItemLabelCss(e)},r.createElement("span",{className:t.itemTitle,style:n},r.createElement(M,{element:e.editor,cssClasses:e.editor.cssClasses})),r.createElement(Pt,{cssClasses:t,itemCss:this.question.getItemCss(),question:e.editor,creator:this.creator}))},t}(p),Pt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return qt(t,e),t.prototype.renderElement=function(){return r.createElement("div",{className:this.itemCss},this.renderContent())},t}(oe);W.Instance.registerQuestion("multipletext",(function(e){return r.createElement(wt,e)}));var xt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),St=function(e){function t(t){return e.call(this,t)||this}return xt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=null;return this.question.showClearButtonInContent&&(n=r.createElement("div",null,r.createElement("input",{type:"button",className:this.question.cssClasses.clearButton,onClick:function(){return e.question.clearValue()},value:this.question.clearButtonCaption}))),r.createElement("fieldset",{className:this.question.getSelectBaseRootCss(),ref:function(t){return e.setControl(t)},role:this.question.a11y_input_ariaRole,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-describedby":this.question.a11y_input_ariaDescribedBy},this.question.hasColumns?this.getColumnedBody(t):this.getBody(t),this.getFooter(),this.question.isOtherSelected?this.renderOther(t):null,n)},t.prototype.getFooter=function(){var e=this;if(this.question.hasFootItems)return this.question.footItems.map((function(t,n){return e.renderItem("item_f"+n,t,!1,e.question.cssClasses)}))},t.prototype.getColumnedBody=function(e){return r.createElement("div",{className:e.rootMultiColumn},this.getColumns(e))},t.prototype.getColumns=function(e){var t=this,n=this.getStateValue();return this.question.columns.map((function(o,i){var s=o.map((function(r,o){return t.renderItem("item"+i+o,r,n,e,""+i+o)}));return r.createElement("div",{key:"column"+i,className:t.question.getColumnClass(),role:"presentation"},s)}))},t.prototype.getBody=function(e){return this.question.blockedRow?r.createElement("div",{className:e.rootRow},this.getItems(e,this.question.dataChoices)):r.createElement(r.Fragment,null,this.getItems(e,this.question.bodyItems))},t.prototype.getItems=function(e,t){for(var n=[],r=this.getStateValue(),o=0;o<t.length;o++){var i=t[o],s=this.renderItem("item"+o,i,r,e,""+o);n.push(s)}return n},Object.defineProperty(t.prototype,"textStyle",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.renderOther=function(e){return r.createElement("div",{className:this.question.getCommentAreaCss(!0)},r.createElement(Y,{question:this.question,otherCss:e.other,cssClasses:e,isDisplayMode:this.isDisplayMode}))},t.prototype.renderItem=function(e,t,n,r,o){var i=s.Instance.createElement(this.question.itemComponent,{key:e,question:this.question,cssClasses:r,isDisplayMode:this.isDisplayMode,item:t,textStyle:this.textStyle,index:o,isChecked:n===t.value}),u=this.question.survey,l=null;return u&&(l=a.wrapItemValue(u,i,this.question,t)),null!=l?l:i},t.prototype.getStateValue=function(){return this.question.isEmpty()?"":this.question.renderedValue},t}(h),_t=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n.handleOnMouseDown=n.handleOnMouseDown.bind(n),n}return xt(t,e),t.prototype.getStateElement=function(){return this.item},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textStyle",{get:function(){return this.props.textStyle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isChecked",{get:function(){return this.props.isChecked},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hideCaption",{get:function(){return!0===this.props.hideCaption},enumerable:!1,configurable:!0}),t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(!!this.question&&!(this.question.customWidget&&!this.question.customWidgetData.isNeedRender&&!this.question.customWidget.widgetJson.isDefaultRender&&!this.question.customWidget.widgetJson.render))},t.prototype.handleOnChange=function(e){this.question.clickItemHandler(this.item)},t.prototype.handleOnMouseDown=function(e){this.question.onMouseDown()},t.prototype.canRender=function(){return!!this.question&&!!this.item},t.prototype.renderElement=function(){var e=this.question.getItemClass(this.item),t=this.question.getLabelClass(this.item),n=this.question.getControlLabelClass(this.item),o=this.hideCaption?null:r.createElement("span",{className:n},this.renderLocString(this.item.locText,this.textStyle));return r.createElement("div",{className:e,role:"presentation"},r.createElement("label",{onMouseDown:this.handleOnMouseDown,className:t},r.createElement("input",{"aria-describedby":this.question.ariaDescribedBy,className:this.cssClasses.itemControl,id:this.question.getItemId(this.item),type:"radio",name:this.question.questionName,checked:this.isChecked,value:this.item.value,disabled:!this.question.getItemEnabled(this.item),onChange:this.handleOnChange}),this.cssClasses.materialDecorator?r.createElement("span",{className:this.cssClasses.materialDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:this.cssClasses.itemDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,o))},t}(p);s.Instance.registerElement("survey-radiogroup-item",(function(e){return r.createElement(_t,e)})),W.Instance.registerQuestion("radiogroup",(function(e){return r.createElement(St,e)}));var Nt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),It=function(e){function t(t){return e.call(this,t)||this}return Nt(t,e),t.prototype.renderInput=function(){var e=this,t=this.question.getControlClass(),n=this.question.renderedPlaceholder;if(this.question.isReadOnlyRenderDiv())return r.createElement("div",null,this.question.value);var o=this.question.getMaxLength()?r.createElement(Q,{counter:this.question.characterCounter,remainingCharacterCounter:this.question.cssClasses.remainingCharacterCounter}):null;return r.createElement(r.Fragment,null,r.createElement("input",{id:this.question.inputId,disabled:this.isDisplayMode,className:t,type:this.question.inputType,ref:function(t){return e.setControl(t)},style:this.question.inputStyle,maxLength:this.question.getMaxLength(),min:this.question.renderedMin,max:this.question.renderedMax,step:this.question.renderedStep,size:this.question.inputSize,placeholder:n,list:this.question.dataListId,autoComplete:this.question.autocomplete,onBlur:this.question.onBlur,onFocus:this.question.onFocus,onChange:this.question.onChange,onKeyUp:this.question.onKeyUp,onKeyDown:this.question.onKeyDown,onCompositionUpdate:function(t){return e.question.onCompositionUpdate(t.nativeEvent)},"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-describedby":this.question.a11y_input_ariaDescribedBy}),o)},t.prototype.renderElement=function(){return this.question.dataListId?r.createElement("div",null,this.renderInput(),this.renderDataList()):this.renderInput()},t.prototype.renderDataList=function(){if(!this.question.dataListId)return null;var e=this.question.dataList;if(0==e.length)return null;for(var t=[],n=0;n<e.length;n++)t.push(r.createElement("option",{key:"item"+n,value:e[n]}));return r.createElement("datalist",{id:this.question.dataListId},t)},t}(d);W.Instance.registerQuestion("text",(function(e){return r.createElement(It,e)}));var Vt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n.handleOnClick=n.handleOnClick.bind(n),n.handleOnLabelClick=n.handleOnLabelClick.bind(n),n.handleOnSwitchClick=n.handleOnSwitchClick.bind(n),n.handleOnKeyDown=n.handleOnKeyDown.bind(n),n.checkRef=r.createRef(),n}return Vt(t,e),t.prototype.getStateElement=function(){return this.question},Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.doCheck=function(e){this.question.booleanValue=e},t.prototype.handleOnChange=function(e){this.doCheck(e.target.checked)},t.prototype.handleOnClick=function(e){this.question.onLabelClick(e,!0)},t.prototype.handleOnSwitchClick=function(e){this.question.onSwitchClickModel(e.nativeEvent)},t.prototype.handleOnLabelClick=function(e,t){this.question.onLabelClick(e,t)},t.prototype.handleOnKeyDown=function(e){this.question.onKeyDownCore(e)},t.prototype.updateDomElement=function(){if(this.question){var t=this.checkRef.current;t&&(t.indeterminate=this.question.isIndeterminate),this.setControl(t),e.prototype.updateDomElement.call(this)}},t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=this.question.getItemCss();return r.createElement("div",{className:t.root,onKeyDown:this.handleOnKeyDown},r.createElement("label",{className:n,onClick:this.handleOnClick},r.createElement("input",{ref:this.checkRef,type:"checkbox",name:this.question.name,value:null===this.question.booleanValue?"":this.question.booleanValue,id:this.question.inputId,className:t.control,disabled:this.isDisplayMode,checked:this.question.booleanValue||!1,onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),r.createElement("div",{className:t.sliderGhost,onClick:function(t){return e.handleOnLabelClick(t,!1)}},r.createElement("span",{className:this.question.getLabelCss(!1)},this.renderLocString(this.question.locLabelFalse))),r.createElement("div",{className:t.switch,onClick:this.handleOnSwitchClick},r.createElement("span",{className:t.slider},this.question.isDeterminated&&t.sliderText?r.createElement("span",{className:t.sliderText},this.renderLocString(this.question.getCheckedLabel())):null)),r.createElement("div",{className:t.sliderGhost,onClick:function(t){return e.handleOnLabelClick(t,!0)}},r.createElement("span",{className:this.question.getLabelCss(!0)},this.renderLocString(this.question.locLabelTrue)))))},t}(h);W.Instance.registerQuestion("boolean",(function(e){return r.createElement(jt,e)}));var Tt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Rt=function(e){function t(t){return e.call(this,t)||this}return Tt(t,e),t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.getCheckboxItemCss(),n=this.question.canRenderLabelDescription?c.renderQuestionDescription(this.question):null;return r.createElement("div",{className:e.rootCheckbox},r.createElement("div",{className:t},r.createElement("label",{className:e.checkboxLabel},r.createElement("input",{ref:this.checkRef,type:"checkbox",name:this.question.name,value:null===this.question.booleanValue?"":this.question.booleanValue,id:this.question.inputId,className:e.controlCheckbox,disabled:this.isDisplayMode,checked:this.question.booleanValue||!1,onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),r.createElement("span",{className:e.checkboxMaterialDecorator},this.question.svgIcon?r.createElement("svg",{className:e.checkboxItemDecorator},r.createElement("use",{xlinkHref:this.question.svgIcon})):null,r.createElement("span",{className:"check"})),this.question.isLabelRendered&&r.createElement("span",{className:e.checkboxControlLabel,id:this.question.labelRenderedAriaID},r.createElement(F,{element:this.question,cssClasses:this.question.cssClasses}))),n))},t}(jt);W.Instance.registerQuestion("sv-boolean-checkbox",(function(e){return r.createElement(Rt,e)})),i.RendererFactory.Instance.registerRenderer("boolean","checkbox","sv-boolean-checkbox");var Dt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),At=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=function(e){n.question.booleanValue="true"==e.nativeEvent.target.value},n}return Dt(t,e),t.prototype.renderRadioItem=function(e,t){var n=this.question.cssClasses;return r.createElement("div",{role:"presentation",className:this.question.getRadioItemClass(n,e)},r.createElement("label",{className:n.radioLabel},r.createElement("input",{type:"radio",name:this.question.name,value:e,"aria-describedby":this.question.ariaDescribedBy,checked:e===this.question.booleanValueRendered,disabled:this.question.isInputReadOnly,className:n.itemRadioControl,onChange:this.handleOnChange}),this.question.cssClasses.materialRadioDecorator?r.createElement("span",{className:n.materialRadioDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:n.itemRadioDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,r.createElement("span",{className:n.radioControlLabel},this.renderLocString(t))))},t.prototype.renderElement=function(){var e=this.question.cssClasses;return r.createElement("div",{className:e.rootRadio},r.createElement("fieldset",{role:"presentation",className:e.radioFieldset},this.renderRadioItem(!1,this.question.locLabelFalse),this.renderRadioItem(!0,this.question.locLabelTrue)))},t}(jt);W.Instance.registerQuestion("sv-boolean-radio",(function(e){return r.createElement(At,e)})),i.RendererFactory.Instance.registerRenderer("boolean","radio","sv-boolean-radio");var Lt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),kt=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:n.question.value},n}return Lt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return r.createElement("div",null)},t}(h);W.Instance.registerQuestion("empty",(function(e){return r.createElement(kt,e)}));var Mt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bt=function(e){function t(t){var n=e.call(this,t)||this;return n.onPointerDownHandler=function(e){n.parentMatrix.onPointerDown(e.nativeEvent,n.model.row)},n}return Mt(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parentMatrix",{get:function(){return this.props.parentMatrix},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this,t=this.model;return t.visible?o.a.createElement("tr",{className:t.className,"data-sv-drop-target-matrix-row":t.row&&t.row.id,onPointerDown:function(t){return e.onPointerDownHandler(t)}},this.props.children):null},t}(c);s.Instance.registerElement("sv-matrix-row",(function(e){return o.a.createElement(Bt,e)}));var Ft=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ft(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item.data.question},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return this.question.iconDragElement?o.a.createElement("svg",{className:this.question.cssClasses.dragElementDecorator},o.a.createElement("use",{xlinkHref:this.question.iconDragElement})):o.a.createElement("span",{className:this.question.cssClasses.iconDrag})},t}(p);s.Instance.registerElement("sv-matrix-drag-drop-icon",(function(e){return o.a.createElement(zt,e)}));var Ht=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wt=function(e){function t(t){var n=e.call(this,t)||this;n.question.renderedTable;return n.state=n.getState(),n}return Ht(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.getState=function(e){return void 0===e&&(e=null),{rowCounter:e?e.rowCounter+1:0}},t.prototype.updateStateOnCallback=function(){this.isRendering||this.setState(this.getState(this.state))},t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this),this.question.visibleRowsChangedCallback=function(){t.updateStateOnCallback()},this.question.onRenderedTableResetCallback=function(){t.question.renderedTable.renderedRowsChangedCallback=function(){t.updateStateOnCallback()},t.updateStateOnCallback()},this.question.renderedTable.renderedRowsChangedCallback=function(){t.updateStateOnCallback()}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question.visibleRowsChangedCallback=function(){},this.question.onRenderedTableResetCallback=function(){},this.question.renderedTable.renderedRowsChangedCallback=function(){}},t.prototype.renderElement=function(){return this.renderTableDiv()},t.prototype.renderTableDiv=function(){var e=this,t=this.renderHeader(),n=this.renderFooter(),o=this.renderRows(),i=this.question.showHorizontalScroll?{overflowX:"scroll"}:{};return r.createElement("div",{style:i,className:this.question.cssClasses.tableWrapper,ref:function(t){return e.setControl(t)}},r.createElement("table",{className:this.question.getTableCss()},t,o,n))},t.prototype.renderHeader=function(){var e=this.question.renderedTable;if(!e.showHeader)return null;for(var t=[],n=e.headerRow.cells,o=0;o<n.length;o++){var i=n[o],s="column"+o,a={};i.width&&(a.width=i.width),i.minWidth&&(a.minWidth=i.minWidth);var u=this.renderCellContent(i,"column-header",{}),l=i.hasTitle?r.createElement("th",{className:i.className,key:s,style:a}," ",u," "):r.createElement("td",{className:i.className,key:s,style:a});t.push(l)}return r.createElement("thead",null,r.createElement("tr",null,t))},t.prototype.renderFooter=function(){var e=this.question.renderedTable;if(!e.showFooter)return null;var t=this.renderRow("footer",e.footerRow,this.question.cssClasses,"row-footer");return r.createElement("tfoot",null,t)},t.prototype.renderRows=function(){for(var e=this.question.cssClasses,t=[],n=this.question.renderedTable.rows,o=0;o<n.length;o++)t.push(this.renderRow(n[o].id,n[o],e));return r.createElement("tbody",null,t)},t.prototype.renderRow=function(e,t,n,o){for(var i=[],s=t.cells,a=0;a<s.length;a++)i.push(this.renderCell(s[a],a,n,o));var u="row"+e;return r.createElement(r.Fragment,{key:u},"row-footer"==o?r.createElement("tr",null,i):r.createElement(Bt,{model:t,parentMatrix:this.question},i))},t.prototype.renderCell=function(e,t,n,o){var i="cell"+t;if(e.hasQuestion)return r.createElement(Jt,{key:i,cssClasses:n,cell:e,creator:this.creator,reason:o});var s=o;s||(s=e.hasTitle?"row-header":"");var a=this.renderCellContent(e,s,n),u=null;return(e.width||e.minWidth)&&(u={},e.width&&(u.width=e.width),e.minWidth&&(u.minWidth=e.minWidth)),r.createElement("td",{className:e.className,key:i,style:u,colSpan:e.colSpans,"data-responsive-title":e.headers,title:e.getTitle()},a)},t.prototype.renderCellContent=function(e,t,n){var o=null,i=null;if((e.width||e.minWidth)&&(i={},e.width&&(i.width=e.width),e.minWidth&&(i.minWidth=e.minWidth)),e.hasTitle){t="row-header";var a=this.renderLocString(e.locTitle),u=e.column?r.createElement(Qt,{column:e.column,question:this.question}):null;o=r.createElement(r.Fragment,null,a,u)}if(e.isDragHandlerCell&&(o=r.createElement(r.Fragment,null,r.createElement(zt,{item:{data:{row:e.row,question:this.question}}}))),e.isActionsCell&&(o=s.Instance.createElement("sv-matrixdynamic-actions-cell",{question:this.question,cssClasses:n,cell:e,model:e.item.getData()})),e.hasPanel&&(o=r.createElement(Ie,{key:e.panel.id,element:e.panel,survey:this.question.survey,cssClasses:n,isDisplayMode:this.isDisplayMode,creator:this.creator})),e.isErrorsCell&&e.isErrorsCell)return r.createElement(se,{question:e.question,creator:this.creator});if(!o)return null;var l=r.createElement(r.Fragment,null,o);return this.wrapCell(e,l,t)},t}(h),Ut=function(e){function t(t){return e.call(this,t)||this}return Ht(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return r.createElement(L,{model:this.model,handleClick:!1})},t}(p);s.Instance.registerElement("sv-matrixdynamic-actions-cell",(function(e){return r.createElement(Ut,e)}));var Qt=function(e){function t(t){return e.call(this,t)||this}return Ht(t,e),Object.defineProperty(t.prototype,"column",{get:function(){return this.props.column},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.column},t.prototype.renderElement=function(){return this.column.isRenderedRequired?r.createElement(r.Fragment,null,r.createElement("span",null," "),r.createElement("span",{className:this.question.cssClasses.cellRequiredText},this.column.requiredText)):null},t}(p),Jt=function(e){function t(t){return e.call(this,t)||this}return Ht(t,e),Object.defineProperty(t.prototype,"cell",{get:function(){return this.props.cell},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemCss",{get:function(){return this.cell?this.cell.className:""},enumerable:!1,configurable:!0}),t.prototype.getQuestion=function(){var t=e.prototype.getQuestion.call(this);return t||(this.cell?this.cell.question:null)},t.prototype.doAfterRender=function(){var e=this.cellRef.current;if(e&&this.cell&&this.question&&this.question.survey&&"r"!==e.getAttribute("data-rendered")){e.setAttribute("data-rendered","r");var t={cell:this.cell,cellQuestion:this.question,htmlElement:e,row:this.cell.row,column:this.cell.cell.column};this.question.survey.matrixAfterCellRender(this.question,t),this.question.afterRenderCore(e)}},t.prototype.getShowErrors=function(){return this.question.isVisible&&(!this.cell.isChoice||this.cell.isFirstChoice)},t.prototype.getCellStyle=function(){var t=e.prototype.getCellStyle.call(this);return(this.cell.width||this.cell.minWidth)&&(t||(t={}),this.cell.width&&(t.width=this.cell.width),this.cell.minWidth&&(t.minWidth=this.cell.minWidth)),t},t.prototype.getHeaderText=function(){return this.cell.headers},t.prototype.renderQuestion=function(){return this.cell.isChoice?this.cell.isOtherChoice?this.renderOtherComment():this.cell.isCheckbox?this.renderCellCheckboxButton():this.renderCellRadiogroupButton():ne.renderQuestionBody(this.creator,this.question)},t.prototype.renderOtherComment=function(){var e=this.cell.question,t=e.cssClasses||{};return r.createElement(Y,{question:e,cssClasses:t,otherCss:t.other,isDisplayMode:e.isInputReadOnly})},t.prototype.renderCellCheckboxButton=function(){var e=this.cell.question.id+"item"+this.cell.choiceIndex;return r.createElement(De,{key:e,question:this.cell.question,cssClasses:this.cell.question.cssClasses,isDisplayMode:this.cell.question.isInputReadOnly,item:this.cell.item,isFirst:this.cell.isFirstChoice,index:this.cell.choiceIndex.toString(),hideCaption:!0})},t.prototype.renderCellRadiogroupButton=function(){var e=this.cell.question.id+"item"+this.cell.choiceIndex;return r.createElement(_t,{key:e,question:this.cell.question,cssClasses:this.cell.question.cssClasses,isDisplayMode:this.cell.question.isInputReadOnly,item:this.cell.item,index:this.cell.choiceIndex.toString(),isChecked:this.cell.question.value===this.cell.item.value,isDisabled:this.cell.question.isReadOnly||!this.cell.item.isEnabled,hideCaption:!0})},t}(ie),Kt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gt=function(e){function t(t){return e.call(this,t)||this}return Kt(t,e),t}(Wt);W.Instance.registerQuestion("matrixdropdown",(function(e){return r.createElement(Gt,e)}));var Yt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnRowAddClick=n.handleOnRowAddClick.bind(n),n}return Yt(t,e),Object.defineProperty(t.prototype,"matrix",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.handleOnRowAddClick=function(e){this.matrix.addRowUI()},t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.renderedTable.showTable?this.renderTableDiv():this.renderNoRowsContent(e);return r.createElement("div",null,this.renderAddRowButtonOnTop(e),t,this.renderAddRowButtonOnBottom(e))},t.prototype.renderAddRowButtonOnTop=function(e){return this.matrix.renderedTable.showAddRowOnTop?this.renderAddRowButton(e):null},t.prototype.renderAddRowButtonOnBottom=function(e){return this.matrix.renderedTable.showAddRowOnBottom?this.renderAddRowButton(e):null},t.prototype.renderNoRowsContent=function(e){var t=this.renderLocString(this.matrix.locEmptyRowsText),n=r.createElement("div",{className:e.emptyRowsText},t),o=this.matrix.renderedTable.showAddRow?this.renderAddRowButton(e,!0):void 0;return r.createElement("div",{className:e.emptyRowsSection},n,o)},t.prototype.renderAddRowButton=function(e,t){return void 0===t&&(t=!1),s.Instance.createElement("sv-matrixdynamic-add-btn",{question:this.question,cssClasses:e,isEmptySection:t})},t}(Wt);W.Instance.registerQuestion("matrixdynamic",(function(e){return r.createElement(Zt,e)}));var $t=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnRowAddClick=n.handleOnRowAddClick.bind(n),n}return Yt(t,e),Object.defineProperty(t.prototype,"matrix",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.handleOnRowAddClick=function(e){this.matrix.addRowUI()},t.prototype.renderElement=function(){var e=this.renderLocString(this.matrix.locAddRowText),t=r.createElement("button",{className:this.matrix.getAddRowButtonCss(this.props.isEmptySection),type:"button",disabled:this.matrix.isInputReadOnly,onClick:this.matrix.isDesignMode?void 0:this.handleOnRowAddClick},e,r.createElement("span",{className:this.props.cssClasses.iconAdd}));return this.props.isEmptySection?t:r.createElement("div",{className:this.props.cssClasses.footer},t)},t}(p);s.Instance.registerElement("sv-matrixdynamic-add-btn",(function(e){return r.createElement($t,e)}));var Xt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),en=function(e){function t(t){return e.call(this,t)||this}return Xt(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this.props.item&&this.props.item.data||this.props.data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item&&this.props.item.data.question||this.props.data.question},enumerable:!1,configurable:!0}),t}(p),tn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.addPanelUI()},t}return Xt(t,e),t.prototype.renderElement=function(){return this.question.canAddPanel?o.a.createElement("button",{type:"button",className:this.question.getAddButtonCss(),onClick:this.handleClick},o.a.createElement("span",{className:this.question.cssClasses.buttonAddText},this.question.panelAddText)):null},t}(en);s.Instance.registerElement("sv-paneldynamic-add-btn",(function(e){return o.a.createElement(tn,e)}));var nn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.goToNextPanel()},t}return nn(t,e),t.prototype.renderElement=function(){return o.a.createElement("div",{title:this.question.panelNextText,onClick:this.handleClick,className:this.question.getNextButtonCss()},o.a.createElement(E,{iconName:this.question.cssClasses.progressBtnIcon,size:"auto"}))},t}(en);s.Instance.registerElement("sv-paneldynamic-next-btn",(function(e){return o.a.createElement(rn,e)}));var on=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.goToPrevPanel()},t}return on(t,e),t.prototype.renderElement=function(){return o.a.createElement("div",{title:this.question.panelPrevText,onClick:this.handleClick,className:this.question.getPrevButtonCss()},o.a.createElement(E,{iconName:this.question.cssClasses.progressBtnIcon,size:"auto"}))},t}(en);s.Instance.registerElement("sv-paneldynamic-prev-btn",(function(e){return o.a.createElement(sn,e)}));var an=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),un=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return an(t,e),t.prototype.renderElement=function(){return o.a.createElement("div",{className:this.question.cssClasses.progressText},this.question.progressText)},t}(en);s.Instance.registerElement("sv-paneldynamic-progress-text",(function(e){return o.a.createElement(un,e)}));var ln=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cn=function(e){function t(t){return e.call(this,t)||this}return ln(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.setState({panelCounter:0});var t=this;this.question.panelCountChangedCallback=function(){t.updateQuestionRendering()},this.question.currentIndexChangedCallback=function(){t.updateQuestionRendering()},this.question.renderModeChangedCallback=function(){t.updateQuestionRendering()}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question.panelCountChangedCallback=function(){},this.question.currentIndexChangedCallback=function(){},this.question.renderModeChangedCallback=function(){}},t.prototype.updateQuestionRendering=function(){this.setState({panelCounter:this.state?this.state.panelCounter+1:1})},t.prototype.renderElement=function(){var e=[];if(this.question.isRenderModeList)for(var t=0;t<this.question.panels.length;t++){var n=this.question.panels[t];e.push(r.createElement(pn,{key:n.id,element:n,question:this.question,index:t,cssClasses:this.question.cssClasses,isDisplayMode:this.isDisplayMode,creator:this.creator}))}else if(null!=this.question.currentPanel){n=this.question.currentPanel;e.push(r.createElement(pn,{key:this.question.currentIndex,element:n,question:this.question,index:this.question.currentIndex,cssClasses:this.question.cssClasses,isDisplayMode:this.isDisplayMode,creator:this.creator}))}var o=this.question.isRenderModeList&&this.question.showLegacyNavigation?this.renderAddRowButton():null,i=this.question.isProgressTopShowing?this.renderNavigator():null,s=this.question.isProgressBottomShowing?this.renderNavigator():null,a=this.renderNavigatorV2(),u=this.renderPlaceholder();return r.createElement("div",{className:this.question.cssClasses.root},u,i,e,s,o,a)},t.prototype.renderNavigator=function(){if(!this.question.showLegacyNavigation)return this.question.isRangeShowing&&this.question.isProgressTopShowing?this.renderRange():null;var e=this.question.isRangeShowing?this.renderRange():null,t=this.rendrerPrevButton(),n=this.rendrerNextButton(),o=this.renderAddRowButton(),i=this.question.isProgressTopShowing?this.question.cssClasses.progressTop:this.question.cssClasses.progressBottom;return r.createElement("div",{className:i},r.createElement("div",{style:{clear:"both"}},r.createElement("div",{className:this.question.cssClasses.progressContainer},t,e,n),o,this.renderProgressText()))},t.prototype.renderProgressText=function(){return r.createElement(un,{data:{question:this.question}})},t.prototype.rendrerPrevButton=function(){return r.createElement(sn,{data:{question:this.question}})},t.prototype.rendrerNextButton=function(){return r.createElement(rn,{data:{question:this.question}})},t.prototype.renderRange=function(){return r.createElement("div",{className:this.question.cssClasses.progress},r.createElement("div",{className:this.question.cssClasses.progressBar,style:{width:this.question.progress},role:"progressbar"}))},t.prototype.renderAddRowButton=function(){return s.Instance.createElement("sv-paneldynamic-add-btn",{data:{question:this.question}})},t.prototype.renderNavigatorV2=function(){if(!this.question.showNavigation)return null;var e=this.question.isRangeShowing&&this.question.isProgressBottomShowing?this.renderRange():null;return r.createElement("div",{className:this.question.cssClasses.footer},r.createElement("hr",{className:this.question.cssClasses.separator}),e,this.question.footerToolbar.visibleActions.length?r.createElement("div",{className:this.question.cssClasses.footerButtonsContainer},r.createElement(L,{model:this.question.footerToolbar})):null)},t.prototype.renderPlaceholder=function(){return this.question.getShowNoEntriesPlaceholder()?r.createElement("div",{className:this.question.cssClasses.noEntriesPlaceholder},r.createElement("span",null,this.renderLocString(this.question.locNoEntriesText)),this.renderAddRowButton()):null},t}(h),pn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ln(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),t.prototype.getSurvey=function(){return this.question?this.question.survey:null},t.prototype.getCss=function(){var e=this.getSurvey();return e?e.getCss():{}},t.prototype.render=function(){var t=e.prototype.render.call(this),n=this.renderButton(),o=this.question.showSeparator(this.index)?r.createElement("hr",{className:this.question.cssClasses.separator}):null;return r.createElement(r.Fragment,null,r.createElement("div",{className:this.question.getPanelWrapperCss()},t,n),o)},t.prototype.renderButton=function(){return"right"!==this.question.panelRemoveButtonLocation||!this.question.canRemovePanel||this.question.isRenderModeList&&this.panel.isCollapsed?null:s.Instance.createElement("sv-paneldynamic-remove-btn",{data:{question:this.question,panel:this.panel}})},t}(Ie);W.Instance.registerQuestion("paneldynamic",(function(e){return r.createElement(cn,e)}));var hn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dn=function(e){function t(t){return e.call(this,t)||this}return hn(t,e),Object.defineProperty(t.prototype,"isTop",{get:function(){return this.props.isTop},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progress",{get:function(){return this.survey.progressValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progressText",{get:function(){return this.survey.progressText},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e={width:this.progress+"%"};return r.createElement("div",{className:this.survey.getProgressCssClasses(this.props.container)},r.createElement("div",{style:e,className:this.css.progressBar,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-label":"progress"},r.createElement("span",{className:i.SurveyProgressModel.getProgressTextInBarCss(this.css)},this.progressText)),r.createElement("span",{className:i.SurveyProgressModel.getProgressTextUnderBarCss(this.css)},this.progressText))},t}(xe);s.Instance.registerElement("sv-progress-pages",(function(e){return r.createElement(dn,e)})),s.Instance.registerElement("sv-progress-questions",(function(e){return r.createElement(dn,e)})),s.Instance.registerElement("sv-progress-correctquestions",(function(e){return r.createElement(dn,e)})),s.Instance.registerElement("sv-progress-requiredquestions",(function(e){return r.createElement(dn,e)}));var fn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yn=function(e){function t(t){var n=e.call(this,t)||this;return n.updateScroller=void 0,n.progressButtonsModel=new i.SurveyProgressButtonsModel(n.survey),n.listContainerRef=r.createRef(),n}return fn(t,e),t.prototype.render=function(){var e=this;return r.createElement("div",{className:this.css.progressButtonsContainerCenter},r.createElement("div",{className:this.css.progressButtonsContainer},r.createElement("div",{className:this.getScrollButtonCss(!0),role:"button",onClick:function(){return e.clickScrollButton(e.listContainerRef.current,!0)}}),r.createElement("div",{className:this.css.progressButtonsListContainer,ref:this.listContainerRef},r.createElement("ul",{className:this.css.progressButtonsList},this.getListElements())),r.createElement("div",{className:this.getScrollButtonCss(!1),role:"button",onClick:function(){return e.clickScrollButton(e.listContainerRef.current,!1)}})))},t.prototype.getListElements=function(){var e=this,t=[];return this.survey.visiblePages.forEach((function(n,r){t.push(e.renderListElement(n,r))})),t},t.prototype.renderListElement=function(e,t){var n=this;return r.createElement("li",{key:"listelement"+t,className:this.getListElementCss(t),onClick:this.isListElementClickable(t)?function(){return n.clickListElement(t)}:void 0},r.createElement("div",{className:this.css.progressButtonsPageTitle,title:e.renderedNavigationTitle},e.renderedNavigationTitle),r.createElement("div",{className:this.css.progressButtonsPageDescription,title:e.navigationDescription},e.navigationDescription))},t.prototype.isListElementClickable=function(e){return this.progressButtonsModel.isListElementClickable(e)},t.prototype.getListElementCss=function(e){return this.progressButtonsModel.getListElementCss(e)},t.prototype.clickListElement=function(e){this.progressButtonsModel.clickListElement(e)},t.prototype.getScrollButtonCss=function(e){return this.progressButtonsModel.getScrollButtonCss(this.state.hasScroller,e)},t.prototype.clickScrollButton=function(e,t){e&&(e.scrollLeft+=70*(t?-1:1))},t.prototype.componentDidMount=function(){var e=this;this.updateScroller=setInterval((function(){e.listContainerRef.current&&e.setState({hasScroller:e.listContainerRef.current.scrollWidth>e.listContainerRef.current.offsetWidth})}),100)},t.prototype.componentWillUnmount=function(){void 0!==this.updateScroller&&(clearInterval(this.updateScroller),this.updateScroller=void 0)},t}(xe);s.Instance.registerElement("sv-progress-buttons",(function(e){return r.createElement(yn,e)}));var mn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleKeydown=function(e){t.model.onKeyDown(e)},t}return mn(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){var e=this;if(!this.item)return null;var t={paddingInlineStart:this.model.getItemIndent(this.item)},n=this.model.getItemClass(this.item),r=[];if(this.item.component){var i=s.Instance.createElement(this.item.component,{item:this.item,key:this.item.id});i&&r.push(i)}else{var a=this.renderLocString(this.item.locTitle,void 0,"locString");if(this.item.iconName){var u=o.a.createElement(E,{key:1,className:this.model.cssClasses.itemIcon,iconName:this.item.iconName,size:this.item.iconSize,"aria-label":this.item.title});r.push(u),r.push(o.a.createElement("span",{key:2},a))}else r.push(a)}var l=o.a.createElement("div",{style:t,className:this.model.cssClasses.itemBody,title:this.item.locTitle.calculatedText},r),c=this.item.needSeparator?o.a.createElement("div",{className:this.model.cssClasses.itemSeparator}):null,p={display:this.model.isItemVisible(this.item)?null:"none"};return Oe(o.a.createElement("li",{className:n,role:"option",style:p,id:this.item.elementId,"aria-selected":this.model.isItemSelected(this.item),onClick:function(t){e.model.onItemClick(e.item),t.stopPropagation()},onPointerDown:function(t){return e.model.onPointerDown(t,e.item)}},c,l))},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.onLastItemRended(this.item)},t}(c);s.Instance.registerElement("sv-list-item",(function(e){return o.a.createElement(gn,e)}));var vn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleKeydown=function(e){n.model.onKeyDown(e)},n.handleMouseMove=function(e){n.model.onMouseMove(e)},n.state={filterString:n.model.filterString||""},n.listContainerRef=o.a.createRef(),n}return vn(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.listContainerRef&&this.listContainerRef.current&&this.model.initListContainerHtmlElement(this.listContainerRef.current)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model&&this.model.initListContainerHtmlElement(void 0)},t.prototype.renderElement=function(){return o.a.createElement("div",{className:this.model.cssClasses.root,ref:this.listContainerRef},this.searchElementContent(),this.emptyContent(),this.renderList())},t.prototype.renderList=function(){if(!this.model.renderElements)return null;var e=this.renderItems(),t={display:this.model.isEmpty?"none":null};return o.a.createElement("ul",{className:this.model.getListClass(),style:t,role:"listbox",id:this.model.elementId,onMouseDown:function(e){e.preventDefault()},onKeyDown:this.handleKeydown,onMouseMove:this.handleMouseMove},e)},t.prototype.renderItems=function(){var e=this;if(!this.model)return null;var t=this.model.renderedActions;return t?t.map((function(t,n){return o.a.createElement(gn,{model:e.model,item:t,key:"item"+n})})):null},t.prototype.searchElementContent=function(){var e=this;if(this.model.showFilter){var t=this.model.showSearchClearButton&&this.model.filterString?o.a.createElement("button",{className:this.model.cssClasses.searchClearButtonIcon,onClick:function(t){e.model.onClickSearchClearButton(t)}},o.a.createElement(E,{iconName:"icon-searchclear",size:"auto"})):null;return o.a.createElement("div",{className:this.model.cssClasses.filter},o.a.createElement("div",{className:this.model.cssClasses.filterIcon},o.a.createElement(E,{iconName:"icon-search",size:"auto"})),o.a.createElement("input",{type:"text",className:this.model.cssClasses.filterInput,"aria-label":this.model.filterStringPlaceholder,placeholder:this.model.filterStringPlaceholder,value:this.state.filterString,onKeyUp:function(t){e.model.goToItems(t)},onChange:function(t){var n=i.settings.environment.root;t.target===n.activeElement&&(e.model.filterString=t.target.value)}}),t)}return null},t.prototype.emptyContent=function(){var e={display:this.model.isEmpty?null:"none"};return o.a.createElement("div",{className:this.model.cssClasses.emptyContainer,style:e},o.a.createElement("div",{className:this.model.cssClasses.emptyText,"aria-label":this.model.emptyMessage},this.model.emptyMessage))},t}(c);s.Instance.registerElement("sv-list",(function(e){return o.a.createElement(bn,e)}));var Cn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),En=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Cn(t,e),t.prototype.render=function(){var e,t=new i.TOCModel(this.props.model);return e=t.isMobile?r.createElement("div",{onClick:t.togglePopup},r.createElement(E,{iconName:t.icon,size:24}),r.createElement(I,{model:t.popupModel})):r.createElement(bn,{model:t.listModel}),r.createElement("div",{className:t.containerCss},e)},t}(xe);s.Instance.registerElement("sv-progress-toc",(function(e){return r.createElement(En,e)}));var qn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnClick=n.handleOnClick.bind(n),n}return qn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.handleOnClick=function(e){this.question.setValueFromClick(e.target.value),this.setState({value:this.question.value})},t.prototype.renderItem=function(e,t){return s.Instance.createElement(this.question.itemComponent,{question:this.question,item:e,index:t,key:"value"+t,handleOnClick:this.handleOnClick,isDisplayMode:this.isDisplayMode})},t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=this.question.minRateDescription?this.renderLocString(this.question.locMinRateDescription):null,o=this.question.maxRateDescription?this.renderLocString(this.question.locMaxRateDescription):null;return r.createElement("div",{className:this.question.ratingRootCss,ref:function(t){return e.setControl(t)}},r.createElement("fieldset",{role:"radiogroup"},r.createElement("legend",{role:"presentation",className:"sv-hidden"}),this.question.hasMinLabel?r.createElement("span",{className:t.minText},n):null,this.question.renderedRateItems.map((function(t,n){return e.renderItem(t,n)})),this.question.hasMaxLabel?r.createElement("span",{className:t.maxText},o):null))},t}(h);W.Instance.registerQuestion("rating",(function(e){return r.createElement(wn,e)}));var On=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pn=function(e){function t(t){return e.call(this,t)||this}return On(t,e),t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.renderSelect(e);return r.createElement("div",{className:this.question.cssClasses.rootDropdown},t)},t}(Xe);W.Instance.registerQuestion("sv-rating-dropdown",(function(e){return r.createElement(Pn,e)})),i.RendererFactory.Instance.registerRenderer("rating","dropdown","sv-rating-dropdown");var xn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sn=function(e){function t(t){return e.call(this,t)||this}return xn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses;return r.createElement("div",{id:this.question.inputId,className:t.root,ref:function(t){return e.setControl(t)}},this.question.formatedValue)},t}(h);W.Instance.registerQuestion("expression",(function(e){return r.createElement(Sn,e)}));var _n=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnExpanded=n.handleOnExpanded.bind(n),n}return _n(t,e),t.prototype.getStateElements=function(){return[this.popup,this.popup.survey]},t.prototype.handleOnExpanded=function(e){this.popup.changeExpandCollapse()},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&this.popup.isShowing},t.prototype.renderElement=function(){var e=this.renderWindowHeader(),t=this.popup.isExpanded?this.renderBody():null,n={position:"fixed",bottom:3,right:10};return this.popup.renderedWidth&&(n.width=this.popup.renderedWidth,n.maxWidth=this.popup.renderedWidth),r.createElement("div",{className:this.popup.cssRoot,style:n},e,t)},t.prototype.renderWindowHeader=function(){var e=this,t=this.popup.cssButton;t="glyphicon pull-right "+t;var n=c.renderLocString(this.survey.locTitle);return r.createElement("div",{className:this.popup.cssHeaderRoot},r.createElement("span",{onClick:this.handleOnExpanded,style:{width:"100%",cursor:"pointer"}},r.createElement("span",{className:this.popup.cssHeaderTitle,style:{paddingRight:"10px"}},n),r.createElement("span",{className:t,"aria-hidden":"true"})),this.popup.allowClose?r.createElement("span",{className:this.popup.cssHeaderButton,onClick:function(){e.popup.hide()},style:{transform:"rotate(45deg)",float:"right",cursor:"pointer",width:"24px",height:"24px"}},r.createElement(E,{iconName:"icon-expanddetail",size:16})):null,this.popup.isExpanded?r.createElement("span",{className:this.popup.cssHeaderButton,onClick:this.handleOnExpanded,style:{float:"right",cursor:"pointer",width:"24px",height:"24px"}},r.createElement(E,{iconName:"icon-collapsedetail",size:16})):null)},t.prototype.renderBody=function(){var e=this;return r.createElement("div",{className:this.popup.cssBody,onScroll:function(){return e.popup.onScroll()}},this.doRender())},t.prototype.createSurvey=function(t){t||(t={}),e.prototype.createSurvey.call(this,t),this.popup=new i.PopupSurveyModel(null,this.survey),t.closeOnCompleteTimeout&&(this.popup.closeOnCompleteTimeout=t.closeOnCompleteTimeout),this.popup.allowClose=t.allowClose,this.popup.isShowing=!0,this.popup.isExpanded||!t.expanded&&!t.isExpanded||this.popup.expand()},t}(we),In=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _n(t,e),t}(Nn),Vn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jn=function(e){function t(t){return e.call(this,t)||this}return Vn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this.question.cssClasses;return r.createElement("fieldset",{className:this.question.getSelectBaseRootCss()},r.createElement("legend",{className:"sv-hidden"},this.question.locTitle.renderedHtml),this.question.hasColumns?this.getColumns(e):this.getItems(e))},t.prototype.getColumns=function(e){var t=this;return this.question.columns.map((function(n,o){var i=n.map((function(n,r){return t.renderItem("item"+r,n,e)}));return r.createElement("div",{key:"column"+o,className:t.question.getColumnClass(),role:"presentation"},i)}))},t.prototype.getItems=function(e){for(var t=[],n=0;n<this.question.visibleChoices.length;n++){var r=this.question.visibleChoices[n],o="item"+n;t.push(this.renderItem(o,r,e))}return t},Object.defineProperty(t.prototype,"textStyle",{get:function(){return{marginLeft:"3px",display:"inline",position:"static"}},enumerable:!1,configurable:!0}),t.prototype.renderItem=function(e,t,n){var o=r.createElement(Tn,{key:e,question:this.question,item:t,cssClasses:n}),i=this.question.survey,s=null;return i&&(s=a.wrapItemValue(i,o,this.question,t)),null!=s?s:o},t}(h),Tn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n}return Vn(t,e),t.prototype.getStateElement=function(){return this.item},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.reactOnStrChanged()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.item.locImageLink.onChanged=function(){}},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.reactOnStrChanged()},t.prototype.reactOnStrChanged=function(){var e=this;this.item.locImageLink.onChanged=function(){e.setState({locImageLinkchanged:e.state&&e.state.locImageLink?e.state.locImageLink+1:1})}},Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.handleOnChange=function(e){if(this.question.multiSelect)if(e.target.checked)this.question.value=this.question.value.concat(e.target.value);else{var t=this.question.value;t.splice(this.question.value.indexOf(e.target.value),1),this.question.value=t}else this.question.value=e.target.value;this.setState({value:this.question.value})},t.prototype.renderElement=function(){var e=this,t=this.item,n=this.question,o=this.cssClasses,i=n.isItemSelected(t),s=n.getItemClass(t),a=null;n.showLabel&&(a=r.createElement("span",{className:n.cssClasses.itemText},t.text?c.renderLocString(t.locText):t.value));var u={objectFit:this.question.imageFit},l=null;if(t.locImageLink.renderedHtml&&"image"===this.question.contentMode&&(l=r.createElement("img",{className:o.image,src:t.locImageLink.renderedHtml,width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,alt:t.locText.renderedHtml,style:u,onLoad:function(n){e.question.onContentLoaded(t,n.nativeEvent)},onError:function(e){t.onErrorHandler(t,e.nativeEvent)}})),t.locImageLink.renderedHtml&&"video"===this.question.contentMode&&(l=r.createElement("video",{controls:!0,className:o.image,src:t.locImageLink.renderedHtml,width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,style:u,onLoadedMetadata:function(n){e.question.onContentLoaded(t,n.nativeEvent)},onError:function(e){t.onErrorHandler(t,e.nativeEvent)}})),!t.locImageLink.renderedHtml||t.contentNotLoaded){var p={width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,objectFit:this.question.imageFit};l=r.createElement("div",{className:o.itemNoImage,style:p},o.itemNoImageSvgIcon?r.createElement(E,{className:o.itemNoImageSvgIcon,iconName:this.question.cssClasses.itemNoImageSvgIconId,size:48}):null)}return r.createElement("div",{className:s},r.createElement("label",{className:o.label},r.createElement("input",{className:o.itemControl,id:this.question.getItemId(t),type:this.question.inputType,name:this.question.questionName,checked:i,value:t.value,disabled:!this.question.getItemEnabled(t),onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),r.createElement("div",{className:this.question.cssClasses.itemDecorator},r.createElement("div",{className:this.question.cssClasses.imageContainer},this.question.cssClasses.checkedItemDecorator?r.createElement("span",{className:this.question.cssClasses.checkedItemDecorator},this.question.cssClasses.checkedItemSvgIconId?r.createElement(E,{size:"auto",className:this.question.cssClasses.checkedItemSvgIcon,iconName:this.question.cssClasses.checkedItemSvgIconId}):null):null,l),a)))},t}(p);W.Instance.registerQuestion("imagepicker",(function(e){return r.createElement(jn,e)}));var Rn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dn=function(e){function t(t){return e.call(this,t)||this}return Rn(t,e),t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this),this.question.locImageLink.onChanged=function(){t.forceUpdate()}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question.locImageLink.onChanged=function(){}},Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.getImageCss(),n={objectFit:this.question.imageFit,width:this.question.renderedStyleWidth,height:this.question.renderedStyleHeight};this.question.imageLink&&!this.question.contentNotLoaded||(n.display="none");var o=null;"image"===this.question.renderedMode&&(o=r.createElement("img",{className:t,src:this.question.locImageLink.renderedHtml,alt:this.question.altText||this.question.title,width:this.question.renderedWidth,height:this.question.renderedHeight,style:n,onLoad:function(t){e.question.onLoadHandler()},onError:function(t){e.question.onErrorHandler()}})),"video"===this.question.renderedMode&&(o=r.createElement("video",{controls:!0,className:t,src:this.question.locImageLink.renderedHtml,width:this.question.renderedWidth,height:this.question.renderedHeight,style:n,onLoadedMetadata:function(t){e.question.onLoadHandler()},onError:function(t){e.question.onErrorHandler()}})),"youtube"===this.question.renderedMode&&(o=r.createElement("iframe",{className:t,src:this.question.locImageLink.renderedHtml,width:this.question.renderedWidth,height:this.question.renderedHeight,style:n}));var i=null;return this.question.imageLink&&!this.question.contentNotLoaded||(i=r.createElement("div",{className:this.question.cssClasses.noImage},r.createElement(E,{iconName:this.question.cssClasses.noImageSvgIconId,size:48}))),r.createElement("div",{className:this.question.cssClasses.root},o,i)},t}(h);W.Instance.registerQuestion("image",(function(e){return r.createElement(Dn,e)}));var An=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ln=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:n.question.value},n}return An(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=this.question.showLoadingIndicator?this.renderLoadingIndicator():null,o=this.renderCleanButton();return r.createElement("div",{className:t.root,ref:function(t){return e.setControl(t)},style:{width:this.question.renderedCanvasWidth}},r.createElement("div",{className:t.placeholder,style:{display:this.question.needShowPlaceholder()?"":"none"}},this.renderLocString(this.question.locPlaceholder)),r.createElement("div",null,this.renderBackgroundImage(),r.createElement("canvas",{tabIndex:0,className:this.question.cssClasses.canvas,onBlur:this.question.onBlur})),o,n)},t.prototype.renderBackgroundImage=function(){return this.question.backgroundImage?r.createElement("img",{className:this.question.cssClasses.backgroundImage,src:this.question.backgroundImage,style:{width:this.question.renderedCanvasWidth}}):null},t.prototype.renderLoadingIndicator=function(){return r.createElement("div",{className:this.question.cssClasses.loadingIndicator},r.createElement(yt,null))},t.prototype.renderCleanButton=function(){var e=this;if(!this.question.canShowClearButton)return null;var t=this.question.cssClasses;return r.createElement("div",{className:t.controls},r.createElement("button",{type:"button",className:t.clearButton,title:this.question.clearButtonCaption,onClick:function(){return e.question.clearValue()}},this.question.cssClasses.clearButtonIconId?r.createElement(E,{iconName:this.question.cssClasses.clearButtonIconId,size:"auto"}):r.createElement("span",null,"✖")))},t}(h);W.Instance.registerQuestion("signaturepad",(function(e){return r.createElement(Ln,e)}));var kn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mn=function(e){function t(t){return e.call(this,t)||this}return kn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.question},t.prototype.renderElement=function(){var e=this.renderItems();return o.a.createElement("div",{className:this.question.cssClasses.root},e)},t.prototype.renderItems=function(){var e=this;return this.question.visibleChoices.map((function(t,n){return o.a.createElement(Bn,{key:e.question.inputId+"_"+n,item:t,question:e.question,index:n})}))},t}(h),Bn=function(e){function t(t){return e.call(this,t)||this}return kn(t,e),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){this.model=new i.ButtonGroupItemModel(this.question,this.item,this.index);var e=this.renderIcon(),t=this.renderInput(),n=this.renderCaption();return o.a.createElement("label",{role:"radio",className:this.model.css.label,title:this.model.caption.renderedHtml},t,o.a.createElement("div",{className:this.model.css.decorator},e,n))},t.prototype.renderIcon=function(){return this.model.iconName?o.a.createElement(E,{className:this.model.css.icon,iconName:this.model.iconName,size:this.model.iconSize||24}):null},t.prototype.renderInput=function(){var e=this;return o.a.createElement("input",{className:this.model.css.control,id:this.model.id,type:"radio",name:this.model.name,checked:this.model.selected,value:this.model.value,disabled:this.model.readOnly,onChange:function(){e.model.onChange()},"aria-required":this.model.isRequired,"aria-label":this.model.caption.renderedHtml,"aria-invalid":this.model.hasErrors,"aria-describedby":this.model.describedBy,role:"radio"})},t.prototype.renderCaption=function(){if(!this.model.showCaption)return null;var e=this.renderLocString(this.model.caption);return o.a.createElement("span",{className:this.model.css.caption,title:this.model.caption.renderedHtml},e)},t}(c),Fn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zn=function(e){function t(t){return e.call(this,t)||this}return Fn(t,e),t.prototype.getStateElements=function(){var t=e.prototype.getStateElements.call(this);return this.question.contentQuestion&&t.push(this.question.contentQuestion),t},t.prototype.renderElement=function(){return ne.renderQuestionBody(this.creator,this.question.contentQuestion)},t}(d),Hn=function(e){function t(t){return e.call(this,t)||this}return Fn(t,e),t.prototype.canRender=function(){return!!this.question.contentPanel},t.prototype.renderElement=function(){return r.createElement(Ie,{element:this.question.contentPanel,creator:this.creator,survey:this.question.survey})},t}(d);W.Instance.registerQuestion("custom",(function(e){return r.createElement(zn,e)})),W.Instance.registerQuestion("composite",(function(e){return r.createElement(Hn,e)}));var Wn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Un=function(e){function t(t){return e.call(this,t)||this}return Wn(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=[];return e.push(o.a.createElement("div",{key:"logo-image",className:this.survey.logoClassNames},o.a.createElement("img",{className:this.survey.css.logoImage,src:this.survey.locLogo.renderedHtml,alt:this.survey.locTitle.renderedHtml,width:this.survey.renderedLogoWidth,height:this.survey.renderedLogoHeight,style:{objectFit:this.survey.logoFit,width:this.survey.renderedStyleLogoWidth,height:this.survey.renderedStyleLogoHeight}}))),o.a.createElement(o.a.Fragment,null,e)},t}(o.a.Component);s.Instance.registerElement("sv-logo-image",(function(e){return o.a.createElement(Un,e)}));var Qn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnRowRemoveClick=n.handleOnRowRemoveClick.bind(n),n}return Qn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item.data.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.item.data.row},enumerable:!1,configurable:!0}),t.prototype.handleOnRowRemoveClick=function(e){this.question.removeRowUI(this.row)},t.prototype.renderElement=function(){var e=this.renderLocString(this.question.locRemoveRowText);return o.a.createElement("button",{className:this.question.getRemoveRowButtonCss(),type:"button",onClick:this.handleOnRowRemoveClick,disabled:this.question.isInputReadOnly},e,o.a.createElement("span",{className:this.question.cssClasses.iconRemove}))},t}(p);s.Instance.registerElement("sv-matrix-remove-button",(function(e){return o.a.createElement(Jn,e)}));var Kn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnShowHideClick=n.handleOnShowHideClick.bind(n),n}return Kn(t,e),t.prototype.getStateElement=function(){return this.props.item},Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item.data.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.item.data.row},enumerable:!1,configurable:!0}),t.prototype.handleOnShowHideClick=function(e){this.row.showHideDetailPanelClick()},t.prototype.renderElement=function(){var e=this.row.isDetailPanelShowing,t=e,n=e?this.row.detailPanelId:void 0;return o.a.createElement("button",{type:"button",onClick:this.handleOnShowHideClick,className:this.question.getDetailPanelButtonCss(this.row),"aria-expanded":t,"aria-controls":n},o.a.createElement(E,{className:this.question.getDetailPanelIconCss(this.row),iconName:this.question.getDetailPanelIconId(this.row),size:"auto"}))},t}(p);s.Instance.registerElement("sv-matrix-detail-button",(function(e){return o.a.createElement(Gn,e)}));var Yn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.removePanelUI(t.data.panel)},t}return Yn(t,e),t.prototype.renderElement=function(){return o.a.createElement("button",{className:this.question.getPanelRemoveButtonCss(),onClick:this.handleClick,type:"button"},o.a.createElement("span",{className:this.question.cssClasses.buttonRemoveText},this.question.panelRemoveText),o.a.createElement("span",{className:this.question.cssClasses.iconRemove}))},t}(en);s.Instance.registerElement("sv-paneldynamic-remove-btn",(function(e){return o.a.createElement(Zn,e)}));var $n=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $n(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return this.item.isVisible},t.prototype.renderElement=function(){return o.a.createElement("input",{className:this.item.innerCss,type:"button",disabled:this.item.disabled,onMouseDown:this.item.data&&this.item.data.mouseDown,onClick:this.item.action,title:this.item.getTooltip(),value:this.item.title})},t}(p);s.Instance.registerElement("sv-nav-btn",(function(e){return o.a.createElement(Xn,e)}));var er=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return er(t,e),t.prototype.render=function(){var e;return o.a.createElement("div",{className:"sv-skeleton-element",id:null===(e=this.props.element)||void 0===e?void 0:e.id})},t}(o.a.Component);s.Instance.registerElement("sv-skeleton",(function(e){return o.a.createElement(tr,e)}));var nr=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nr(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.renderLogoImage=function(){var e=this.model.survey.getElementWrapperComponentName(this.model.survey,"logo-image"),t=this.model.survey.getElementWrapperComponentData(this.model.survey,"logo-image");return s.Instance.createElement(e,{data:t})},t.prototype.render=function(){return o.a.createElement("div",{className:"sv-header--mobile"},this.model.survey.hasLogo?o.a.createElement("div",{className:"sv-header__logo"},this.renderLogoImage()):null,this.model.survey.hasTitle?o.a.createElement("div",{className:"sv-header__title",style:{maxWidth:this.model.textAreaWidth}},o.a.createElement(H,{element:this.model.survey})):null,this.model.survey.renderedHasDescription?o.a.createElement("div",{className:"sv-header__description",style:{maxWidth:this.model.textAreaWidth}},o.a.createElement("div",{className:this.model.survey.css.description},c.renderLocString(this.model.survey.locDescription))):null)},t}(o.a.Component),or=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nr(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.renderLogoImage=function(){var e=this.model.survey.getElementWrapperComponentName(this.model.survey,"logo-image"),t=this.model.survey.getElementWrapperComponentData(this.model.survey,"logo-image");return s.Instance.createElement(e,{data:t})},t.prototype.render=function(){return o.a.createElement("div",{className:this.model.css,style:this.model.style},o.a.createElement("div",{className:"sv-header__cell-content",style:this.model.contentStyle},this.model.showLogo?o.a.createElement("div",{className:"sv-header__logo"},this.renderLogoImage()):null,this.model.showTitle?o.a.createElement("div",{className:"sv-header__title",style:{maxWidth:this.model.textAreaWidth}},o.a.createElement(H,{element:this.model.survey})):null,this.model.showDescription?o.a.createElement("div",{className:"sv-header__description",style:{maxWidth:this.model.textAreaWidth}},o.a.createElement("div",{className:this.model.survey.css.description},c.renderLocString(this.model.survey.locDescription))):null))},t}(o.a.Component),ir=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nr(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){if(this.model.survey=this.props.survey,"advanced"!==this.props.survey.headerView||!this.props.survey.renderedHasHeader)return null;var e=null;return e=this.props.survey.isMobile?o.a.createElement(rr,{model:this.model}):o.a.createElement("div",{className:this.model.contentClasses,style:{maxWidth:this.model.maxWidth}},this.model.cells.map((function(e,t){return o.a.createElement(or,{key:t,model:e})}))),o.a.createElement("div",{className:this.model.headerClasses,style:{height:this.model.renderedHeight}},this.model.backgroundImage?o.a.createElement("div",{style:this.model.backgroundImageStyle,className:this.model.backgroundImageClasses}):null,e)},t}(c);s.Instance.registerElement("sv-header",(function(e){return o.a.createElement(ir,e)}));var sr=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ar=function(e){function t(t){var n=e.call(this,t)||this;return n.onInput=function(e){n.locStr.text=e.target.innerText},n.onClick=function(e){e.preventDefault(),e.stopPropagation()},n.state={changed:0},n}return sr(t,e),Object.defineProperty(t.prototype,"locStr",{get:function(){return this.props.locStr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this.props.style},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(this.locStr){var e=this;this.locStr.onChanged=function(){e.setState({changed:e.state.changed+1})}}},t.prototype.componentWillUnmount=function(){this.locStr&&(this.locStr.onChanged=function(){})},t.prototype.render=function(){if(!this.locStr)return null;if(this.locStr.hasHtml){var e={__html:this.locStr.renderedHtml};return o.a.createElement("span",{className:"sv-string-editor",contentEditable:"true",suppressContentEditableWarning:!0,style:this.style,dangerouslySetInnerHTML:e,onBlur:this.onInput,onClick:this.onClick})}return o.a.createElement("span",{className:"sv-string-editor",contentEditable:"true",suppressContentEditableWarning:!0,style:this.style,onBlur:this.onInput,onClick:this.onClick},this.locStr.renderedHtml)},t}(o.a.Component);s.Instance.registerElement(i.LocalizableString.editableRenderer,(function(e){return o.a.createElement(ar,e)}));var ur="undefined"!=typeof globalThis?globalThis.document:(void 0).document,lr={designMode:{showEmptyDescriptions:!0,showEmptyTitles:!0},get allowShowEmptyDescriptionInDesignMode(){return this.designMode.showEmptyDescriptions},set allowShowEmptyDescriptionInDesignMode(e){this.designMode.showEmptyDescriptions=e},get allowShowEmptyTitleInDesignMode(){return this.designMode.showEmptyTitles},set allowShowEmptyTitleInDesignMode(e){this.designMode.showEmptyTitles=e},localization:{useLocalTimeZone:!0,storeDuplicatedTranslations:!1,defaultLocaleName:"default"},get useLocalTimeZone(){return this.localization.useLocalTimeZone},set useLocalTimeZone(e){this.localization.useLocalTimeZone=e},get storeDuplicatedTranslations(){return this.localization.storeDuplicatedTranslations},set storeDuplicatedTranslations(e){this.localization.storeDuplicatedTranslations=e},get defaultLocaleName(){return this.localization.defaultLocaleName},set defaultLocaleName(e){this.localization.defaultLocaleName=e},web:{onBeforeRequestChoices:function(e,t){},encodeUrlParams:!0,cacheLoadedChoices:!0,disableQuestionWhileLoadingChoices:!1,surveyServiceUrl:"https://api.surveyjs.io/public/v1/Survey"},get webserviceEncodeParameters(){return this.web.encodeUrlParams},set webserviceEncodeParameters(e){this.web.encodeUrlParams=e},get useCachingForChoicesRestful(){return this.web.cacheLoadedChoices},set useCachingForChoicesRestful(e){this.web.cacheLoadedChoices=e},get useCachingForChoicesRestfull(){return this.web.cacheLoadedChoices},set useCachingForChoicesRestfull(e){this.web.cacheLoadedChoices=e},get disableOnGettingChoicesFromWeb(){return this.web.disableQuestionWhileLoadingChoices},set disableOnGettingChoicesFromWeb(e){this.web.disableQuestionWhileLoadingChoices=e},get surveyServiceUrl(){return this.web.surveyServiceUrl},set surveyServiceUrl(e){this.web.surveyServiceUrl=e},triggers:{changeNavigationButtonsOnComplete:!0,executeCompleteOnValueChanged:!1,executeSkipOnValueChanged:!0},get executeCompleteTriggerOnValueChanged(){return this.triggers.executeCompleteOnValueChanged},set executeCompleteTriggerOnValueChanged(e){this.triggers.executeCompleteOnValueChanged=e},get changeNavigationButtonsOnCompleteTrigger(){return this.triggers.changeNavigationButtonsOnComplete},set changeNavigationButtonsOnCompleteTrigger(e){this.triggers.changeNavigationButtonsOnComplete=e},get executeSkipTriggerOnValueChanged(){return this.triggers.executeSkipOnValueChanged},set executeSkipTriggerOnValueChanged(e){this.triggers.executeSkipOnValueChanged=e},serialization:{itemValueSerializeAsObject:!1,itemValueSerializeDisplayText:!1,localizableStringSerializeAsObject:!1},get itemValueAlwaysSerializeAsObject(){return this.serialization.itemValueSerializeAsObject},set itemValueAlwaysSerializeAsObject(e){this.serialization.itemValueSerializeAsObject=e},get itemValueAlwaysSerializeText(){return this.serialization.itemValueSerializeDisplayText},set itemValueAlwaysSerializeText(e){this.serialization.itemValueSerializeDisplayText=e},get serializeLocalizableStringAsObject(){return this.serialization.localizableStringSerializeAsObject},set serializeLocalizableStringAsObject(e){this.serialization.localizableStringSerializeAsObject=e},lazyRender:{enabled:!1,firstBatchSize:3},get lazyRowsRendering(){return this.lazyRender.enabled},set lazyRowsRendering(e){this.lazyRender.enabled=e},get lazyRowsRenderingStartRow(){return this.lazyRender.firstBatchSize},set lazyRowsRenderingStartRow(e){this.lazyRender.firstBatchSize=e},matrix:{defaultCellType:"dropdown",defaultRowName:"default",totalsSuffix:"-total",maxRowCount:1e3,maxRowCountInCondition:1,renderRemoveAsIcon:!0,columnWidthsByType:{file:{minWidth:"240px"},comment:{minWidth:"200px"}},rateSize:"small"},get matrixDefaultRowName(){return this.matrix.defaultRowName},set matrixDefaultRowName(e){this.matrix.defaultRowName=e},get matrixDefaultCellType(){return this.matrix.defaultCellType},set matrixDefaultCellType(e){this.matrix.defaultCellType=e},get matrixTotalValuePostFix(){return this.matrix.totalsSuffix},set matrixTotalValuePostFix(e){this.matrix.totalsSuffix=e},get matrixMaximumRowCount(){return this.matrix.maxRowCount},set matrixMaximumRowCount(e){this.matrix.maxRowCount=e},get matrixMaxRowCountInCondition(){return this.matrix.maxRowCountInCondition},set matrixMaxRowCountInCondition(e){this.matrix.maxRowCountInCondition=e},get matrixRenderRemoveAsIcon(){return this.matrix.renderRemoveAsIcon},set matrixRenderRemoveAsIcon(e){this.matrix.renderRemoveAsIcon=e},panel:{maxPanelCount:100,maxPanelCountInCondition:1},get panelDynamicMaxPanelCountInCondition(){return this.panel.maxPanelCountInCondition},set panelDynamicMaxPanelCountInCondition(e){this.panel.maxPanelCountInCondition=e},get panelMaximumPanelCount(){return this.panel.maxPanelCount},set panelMaximumPanelCount(e){this.panel.maxPanelCount=e},readOnly:{enableValidation:!1,commentRenderMode:"textarea",textRenderMode:"input"},get readOnlyCommentRenderMode(){return this.readOnly.commentRenderMode},set readOnlyCommentRenderMode(e){this.readOnly.commentRenderMode=e},get readOnlyTextRenderMode(){return this.readOnly.textRenderMode},set readOnlyTextRenderMode(e){this.readOnly.textRenderMode=e},numbering:{includeQuestionsWithHiddenNumber:!1,includeQuestionsWithHiddenTitle:!1},get setQuestionVisibleIndexForHiddenTitle(){return this.numbering.includeQuestionsWithHiddenTitle},set setQuestionVisibleIndexForHiddenTitle(e){this.numbering.includeQuestionsWithHiddenTitle=e},get setQuestionVisibleIndexForHiddenNumber(){return this.numbering.includeQuestionsWithHiddenNumber},set setQuestionVisibleIndexForHiddenNumber(e){this.numbering.includeQuestionsWithHiddenNumber=e},enterKeyAction:"default",comparator:{trimStrings:!0,caseSensitive:!1,normalizeTextCallback:function(e,t){return e}},expressionDisableConversionChar:"#",get commentPrefix(){return lr.commentSuffix},set commentPrefix(e){lr.commentSuffix=e},commentSuffix:"-Comment",itemValueSeparator:"|",ratingMaximumRateValueCount:20,tagboxCloseOnSelect:!1,confirmActionFunc:function(e){return confirm(e)},confirmActionAsync:function(e,t,n){return function(e,t,n){var r=new ho(void 0),o=lr.showDialog({componentName:"sv-string-viewer",data:{locStr:r,locString:r,model:r},onApply:function(){return t(!0),!0},onCancel:function(){return t(!1),!1},title:e,displayMode:"popup",isFocusedContent:!1,cssClass:"sv-popup--confirm-delete"},document.body),i=o.footerToolbar,s=i.getActionById("apply"),a=i.getActionById("cancel");return a.title=hr.getString("cancel"),a.innerCss="sv-popup__body-footer-item sv-popup__button sd-btn sd-btn--small",s.title=n||hr.getString("ok"),s.innerCss="sv-popup__body-footer-item sv-popup__button sv-popup__button--danger sd-btn sd-btn--small sd-btn--danger",o.width="452px",!0}(e,t,n)},minWidth:"300px",maxWidth:"100%",maxConditionRunCountOnValueChanged:10,notifications:{lifetime:2e3},autoAdvanceDelay:300,showItemsInOrder:"default",noneItemValue:"none",specialChoicesOrder:{selectAllItem:[-1],noneItem:[1],otherItem:[2]},supportedValidators:{question:["expression"],comment:["text","regex"],text:["numeric","text","regex","email"],checkbox:["answercount"],imagepicker:["answercount"]},minDate:"",maxDate:"",showModal:void 0,showDialog:void 0,supportCreatorV2:!1,showDefaultItemsInCreatorV2:!0,customIcons:{},rankingDragHandleArea:"entireItem",environment:ur?{root:ur,_rootElement:ur.body,get rootElement(){var e;return null!==(e=this._rootElement)&&void 0!==e?e:ur.body},set rootElement(e){this._rootElement=e},_popupMountContainer:ur.body,get popupMountContainer(){var e;return null!==(e=this._popupMountContainer)&&void 0!==e?e:ur.body},set popupMountContainer(e){this._popupMountContainer=e},svgMountContainer:ur.head,stylesSheetsMountContainer:ur.head}:void 0,showMaxLengthIndicator:!0,titleTags:{survey:"h3",page:"h4",panel:"h4",question:"h5"},questions:{inputTypes:["color","date","datetime-local","email","month","number","password","range","tel","text","time","url","week"],dataList:["","name","honorific-prefix","given-name","additional-name","family-name","honorific-suffix","nickname","organization-title","username","new-password","current-password","organization","street-address","address-line1","address-line2","address-line3","address-level4","address-level3","address-level2","address-level1","country","country-name","postal-code","cc-name","cc-given-name","cc-additional-name","cc-family-name","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc","cc-type","transaction-currency","transaction-amount","language","bday","bday-day","bday-month","bday-year","sex","url","photo","tel","tel-country-code","tel-national","tel-area-code","tel-local","tel-local-prefix","tel-local-suffix","tel-extension","email","impp"]}},cr=function(){function e(){}return e.isValueEmpty=function(t){if(Array.isArray(t)&&0===t.length)return!0;if(t&&e.isValueObject(t)&&t.constructor===Object){for(var n in t)if(!e.isValueEmpty(t[n]))return!1;return!0}return!t&&0!==t&&!1!==t},e.isArrayContainsEqual=function(t,n){if(!Array.isArray(t)||!Array.isArray(n))return!1;if(t.length!==n.length)return!1;for(var r=0;r<t.length;r++){for(var o=0;o<n.length&&!e.isTwoValueEquals(t[r],n[o]);o++);if(o===n.length)return!1}return!0},e.isArraysEqual=function(t,n,r,o,i){if(void 0===r&&(r=!1),!Array.isArray(t)||!Array.isArray(n))return!1;if(t.length!==n.length)return!1;if(r){for(var s=[],a=[],u=0;u<t.length;u++)s.push(t[u]),a.push(n[u]);s.sort(),a.sort(),t=s,n=a}for(u=0;u<t.length;u++)if(!e.isTwoValueEquals(t[u],n[u],r,o,i))return!1;return!0},e.compareStrings=function(e,t){var n=lr.comparator.normalizeTextCallback;if(e&&(e=n(e,"compare").trim()),t&&(t=n(t,"compare").trim()),!e&&!t)return 0;if(!e)return-1;if(!t)return 1;if(e===t)return 0;for(var r=-1,o=0;o<e.length&&o<t.length;o++){if(this.isCharDigit(e[o])&&this.isCharDigit(t[o])){r=o;break}if(e[o]!==t[o])break}if(r>-1){var i=this.getNumberFromStr(e,r),s=this.getNumberFromStr(t,r);if(!Number.isNaN(i)&&!Number.isNaN(s)&&i!==s)return i>s?1:-1}return e>t?1:-1},e.isTwoValueEquals=function(t,n,r,o,i){if(void 0===r&&(r=!1),t===n)return!0;if(Array.isArray(t)&&0===t.length&&void 0===n)return!0;if(Array.isArray(n)&&0===n.length&&void 0===t)return!0;if(null==t&&""===n)return!0;if(null==n&&""===t)return!0;if(void 0===i&&(i=lr.comparator.trimStrings),void 0===o&&(o=lr.comparator.caseSensitive),"string"==typeof t&&"string"==typeof n){var s=lr.comparator.normalizeTextCallback;return t=s(t,"compare"),n=s(n,"compare"),i&&(t=t.trim(),n=n.trim()),o||(t=t.toLowerCase(),n=n.toLowerCase()),t===n}if(t instanceof Date&&n instanceof Date)return t.getTime()==n.getTime();if(e.isConvertibleToNumber(t)&&e.isConvertibleToNumber(n)&&parseInt(t)===parseInt(n)&&parseFloat(t)===parseFloat(n))return!0;if(!e.isValueEmpty(t)&&e.isValueEmpty(n)||e.isValueEmpty(t)&&!e.isValueEmpty(n))return!1;if((!0===t||!1===t)&&"string"==typeof n)return t.toString()===n.toLocaleLowerCase();if((!0===n||!1===n)&&"string"==typeof t)return n.toString()===t.toLocaleLowerCase();if(!e.isValueObject(t)&&!e.isValueObject(n))return t==n;if(!e.isValueObject(t)||!e.isValueObject(n))return!1;if(t.equals)return t.equals(n);if(t.toJSON&&n.toJSON&&t.getType&&n.getType)return!t.isDisposed&&!n.isDisposed&&(t.getType()===n.getType()&&((!t.name||t.name===n.name)&&this.isTwoValueEquals(t.toJSON(),n.toJSON(),r,o,i)));if(Array.isArray(t)&&Array.isArray(n))return e.isArraysEqual(t,n,r,o,i);if(t.equalsTo&&n.equalsTo)return t.equalsTo(n);for(var a in t)if(t.hasOwnProperty(a)){if(!n.hasOwnProperty(a))return!1;if(!this.isTwoValueEquals(t[a],n[a],r,o,i))return!1}for(a in n)if(n.hasOwnProperty(a)&&!t.hasOwnProperty(a))return!1;return!0},e.randomizeArray=function(e){for(var t=e.length-1;t>0;t--){var n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}return e},e.getUnbindValue=function(t){if(Array.isArray(t)){for(var n=[],r=0;r<t.length;r++)n.push(e.getUnbindValue(t[r]));return n}return!t||!e.isValueObject(t)||t instanceof Date?t:JSON.parse(JSON.stringify(t))},e.createCopy=function(e){var t={};if(!e)return t;for(var n in e)t[n]=e[n];return t},e.isConvertibleToNumber=function(e){return null!=e&&!Array.isArray(e)&&!isNaN(e)},e.isValueObject=function(e,t){return e instanceof Object&&(!t||!Array.isArray(e))},e.isNumber=function(e){return!isNaN(this.getNumber(e))},e.getNumber=function(e){if("string"==typeof e&&e&&0==e.indexOf("0x")&&e.length>32)return NaN;e=this.prepareStringToNumber(e);var t=parseFloat(e);return isNaN(t)||!isFinite(e)?NaN:t},e.prepareStringToNumber=function(e){if("string"!=typeof e||!e)return e;var t=e.indexOf(",");return t>-1&&e.indexOf(",",t+1)<0?e.replace(",","."):e},e.getMaxLength=function(e,t){return e<0&&(e=t),e>0?e:null},e.getRemainingCharacterCounterText=function(e,t){return!t||t<=0||!lr.showMaxLengthIndicator?"":[e?e.length:"0",t].join("/")},e.getNumberByIndex=function(t,n){if(t<0)return"";var r=1,o="",i=".",s=!0,a="A",u="";if(n){for(var l=(u=n).length-1,c=!1,p=0;p<u.length;p++)if(e.isCharDigit(u[p])){c=!0;break}for(var h=function(){return c&&!e.isCharDigit(u[l])||e.isCharNotLetterAndDigit(u[l])};l>=0&&h();)l--;var d="";for(l<u.length-1&&(d=u.substring(l+1),u=u.substring(0,l+1)),l=u.length-1;l>=0&&!h()&&(l--,c););a=u.substring(l+1),o=u.substring(0,l+1),parseInt(a)?r=parseInt(a):1==a.length&&(s=!1),(d||o)&&(i=d)}if(s){for(var f=(t+r).toString();f.length<a.length;)f="0"+f;return o+f+i}return o+String.fromCharCode(a.charCodeAt(0)+t)+i},e.isCharNotLetterAndDigit=function(t){return t.toUpperCase()==t.toLowerCase()&&!e.isCharDigit(t)},e.isCharDigit=function(e){return e>="0"&&e<="9"},e.getNumberFromStr=function(e,t){if(!this.isCharDigit(e[t]))return NaN;for(var n="";t<e.length&&this.isCharDigit(e[t]);)n+=e[t],t++;return n?this.getNumber(n):NaN},e.countDecimals=function(t){if(e.isNumber(t)&&Math.floor(t)!==t){var n=t.toString().split(".");return n.length>1&&n[1].length||0}return 0},e.correctAfterPlusMinis=function(t,n,r){var o=e.countDecimals(t),i=e.countDecimals(n);if(o>0||i>0){var s=Math.max(o,i);r=parseFloat(r.toFixed(s))}return r},e.sumAnyValues=function(t,n){if(!e.isNumber(t)||!e.isNumber(n)){if(Array.isArray(t)&&Array.isArray(n))return[].concat(t).concat(n);if(Array.isArray(t)||Array.isArray(n)){var r=Array.isArray(t)?t:n,o=r===t?n:t;if("string"==typeof o){var i=r.join(", ");return r===t?i+o:o+i}if("number"==typeof o){for(var s=0,a=0;a<r.length;a++)"number"==typeof r[a]&&(s=e.correctAfterPlusMinis(s,r[a],s+r[a]));return e.correctAfterPlusMinis(s,o,s+o)}}return t+n}return"string"==typeof t||"string"==typeof n?t+n:e.correctAfterPlusMinis(t,n,t+n)},e.correctAfterMultiple=function(t,n,r){var o=e.countDecimals(t)+e.countDecimals(n);return o>0&&(r=parseFloat(r.toFixed(o))),r},e.convertArrayValueToObject=function(t,n,r){void 0===r&&(r=void 0);var o=new Array;if(!t||!Array.isArray(t))return o;for(var i=0;i<t.length;i++){var s=void 0;Array.isArray(r)&&(s=e.findObjByPropValue(r,n,t[i])),s||((s={})[n]=t[i]),o.push(s)}return o},e.findObjByPropValue=function(t,n,r){for(var o=0;o<t.length;o++)if(e.isTwoValueEquals(t[o][n],r))return t[o]},e.convertArrayObjectToValue=function(t,n){var r=new Array;if(!t||!Array.isArray(t))return r;for(var o=0;o<t.length;o++){var i=t[o]?t[o][n]:void 0;e.isValueEmpty(i)||r.push(i)}return r},e.convertDateToString=function(e){var t=function(e){return e<10?"0"+e.toString():e.toString()};return e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())},e.convertDateTimeToString=function(e){var t=function(e){return e<10?"0"+e.toString():e.toString()};return this.convertDateToString(e)+" "+t(e.getHours())+":"+t(e.getMinutes())},e.convertValToQuestionVal=function(t,n){return t instanceof Date?"datetime-local"===n?e.convertDateTimeToString(t):e.convertDateToString(t):t},e}();String.prototype.format||(String.prototype.format=function(){var e=arguments;return this.replace(/{(\d+)}/g,(function(t,n){return void 0!==e[n]?e[n]:t}))});var pr={pagePrevText:"Previous",pageNextText:"Next",completeText:"Complete",previewText:"Preview",editText:"Edit",startSurveyText:"Start",otherItemText:"Other (describe)",noneItemText:"None",selectAllItemText:"Select All",progressText:"Page {0} of {1}",indexText:"{0} of {1}",panelDynamicProgressText:"{0} of {1}",panelDynamicTabTextFormat:"Panel {panelIndex}",questionsProgressText:"Answered {0}/{1} questions",emptySurvey:"The survey doesn't contain any visible elements.",completingSurvey:"Thank you for completing the survey",completingSurveyBefore:"Our records show that you have already completed this survey.",loadingSurvey:"Loading Survey...",placeholder:"Select...",ratingOptionsCaption:"Select...",value:"value",requiredError:"Response required.",requiredErrorInPanel:"Response required: answer at least one question.",requiredInAllRowsError:"Response required: answer questions in all rows.",eachRowUniqueError:"Each row must have a unique value.",numericError:"The value should be numeric.",minError:"The value should not be less than {0}",maxError:"The value should not be greater than {0}",textMinLength:"Please enter at least {0} character(s).",textMaxLength:"Please enter no more than {0} character(s).",textMinMaxLength:"Please enter at least {0} and no more than {1} characters.",minRowCountError:"Please fill in at least {0} row(s).",minSelectError:"Please select at least {0} option(s).",maxSelectError:"Please select no more than {0} option(s).",numericMinMax:"The '{0}' should be at least {1} and at most {2}",numericMin:"The '{0}' should be at least {1}",numericMax:"The '{0}' should be at most {1}",invalidEmail:"Please enter a valid e-mail address.",invalidExpression:"The expression: {0} should return 'true'.",urlRequestError:"The request returned error '{0}'. {1}",urlGetChoicesError:"The request returned empty data or the 'path' property is incorrect",exceedMaxSize:"The file size should not exceed {0}.",noUploadFilesHandler:"Files cannot be uploaded. Please add a handler for the 'onUploadFiles' event.",otherRequiredError:"Response required: enter another value.",uploadingFile:"Your file is uploading. Please wait several seconds and try again.",loadingFile:"Loading...",chooseFile:"Choose file(s)...",noFileChosen:"No file chosen",filePlaceholder:"Drag and drop a file here or click the button below to select a file to upload.",confirmDelete:"Do you want to delete the record?",keyDuplicationError:"This value should be unique.",addColumn:"Add Column",addRow:"Add Row",removeRow:"Remove",emptyRowsText:"There are no rows.",addPanel:"Add new",removePanel:"Remove",showDetails:"Show Details",hideDetails:"Hide Details",choices_Item:"item",matrix_column:"Column",matrix_row:"Row",multipletext_itemname:"text",savingData:"The results are being saved on the server...",savingDataError:"An error occurred and we could not save the results.",savingDataSuccess:"The results were saved successfully!",saveAgainButton:"Try again",timerMin:"min",timerSec:"sec",timerSpentAll:"You have spent {0} on this page and {1} in total.",timerSpentPage:"You have spent {0} on this page.",timerSpentSurvey:"You have spent {0} in total.",timerLimitAll:"You have spent {0} of {1} on this page and {2} of {3} in total.",timerLimitPage:"You have spent {0} of {1} on this page.",timerLimitSurvey:"You have spent {0} of {1} in total.",clearCaption:"Clear",signaturePlaceHolder:"Sign here",chooseFileCaption:"Select File",takePhotoCaption:"Take Photo",photoPlaceholder:"Click the button below to take a photo using the camera.",fileOrPhotoPlaceholder:"Drag and drop or select a file to upload or take a photo using the camera.",replaceFileCaption:"Replace file",removeFileCaption:"Remove this file",booleanCheckedLabel:"Yes",booleanUncheckedLabel:"No",confirmRemoveFile:"Are you sure that you want to remove this file: {0}?",confirmRemoveAllFiles:"Are you sure that you want to remove all files?",questionTitlePatternText:"Question Title",modalCancelButtonText:"Cancel",modalApplyButtonText:"Apply",filterStringPlaceholder:"Type to search...",emptyMessage:"No data to display",noEntriesText:"There are no entries yet.\nClick the button below to add a new entry.",noEntriesReadonlyText:"There are no entries.",more:"More",tagboxDoneButtonCaption:"OK",selectToRankEmptyRankedAreaText:"All choices are ranked",selectToRankEmptyUnrankedAreaText:"Drag and drop choices here to rank them",ok:"OK",cancel:"Cancel"},hr={currentLocaleValue:"",defaultLocaleValue:"en",locales:{},localeNames:{},supportedLocales:[],get currentLocale(){return this.currentLocaleValue===this.defaultLocaleValue?"":this.currentLocaleValue},set currentLocale(e){"cz"===e&&(e="cs"),this.currentLocaleValue=e},get defaultLocale(){return this.defaultLocaleValue},set defaultLocale(e){"cz"===e&&(e="cs"),this.defaultLocaleValue=e},getLocaleStrings:function(e){return this.locales[e]},getString:function(e,t){var n=this;void 0===t&&(t=null);var r=new Array,o=function(e){var t=n.locales[e];t&&r.push(t)},i=function(e){if(e){o(e);var t=e.indexOf("-");t<1||(e=e.substring(0,t),o(e))}};i(t),i(this.currentLocale),i(this.defaultLocale),"en"!==this.defaultLocale&&o("en");for(var s=0;s<r.length;s++){var a=r[s][e];if(void 0!==a)return a}return this.onGetExternalString(e,t)},getLocales:function(e){void 0===e&&(e=!1);var t=[];t.push("");var n=this.locales;if(this.supportedLocales&&this.supportedLocales.length>0){n={};for(var r=0;r<this.supportedLocales.length;r++)n[this.supportedLocales[r]]=!0}for(var o in n)e&&o==this.defaultLocale||t.push(o);var i=function(e){if(!e)return"";var t=hr.localeNames[e];return t||(t=e),t.toLowerCase()};return t.sort((function(e,t){var n=i(e),r=i(t);return n===r?0:n<r?-1:1})),t},onGetExternalString:function(e,t){}};hr.locales.en=pr,hr.localeNames.en="english";var dr=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();var fr=function(){function e(t,n,r){void 0===r&&(r=!1),this.name=n,this.isRequiredValue=!1,this.isUniqueValue=!1,this.isSerializable=!0,this.isLightSerializable=!0,this.isCustom=!1,this.isDynamicChoices=!1,this.isBindable=!1,this.category="",this.categoryIndex=-1,this.visibleIndex=-1,this.maxLength=-1,this.isArray=!1,this.classInfoValue=t,this.isRequiredValue=r,this.idValue=e.Index++}return Object.defineProperty(e.prototype,"id",{get:function(){return this.idValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classInfo",{get:function(){return this.classInfoValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this.typeValue?this.typeValue:"string"},set:function(e){"itemvalues"===e&&(e="itemvalue[]"),"textitems"===e&&(e="textitem[]"),this.typeValue=e,this.typeValue.indexOf("[]")===this.typeValue.length-2&&(this.isArray=!0,this.className=this.typeValue.substring(0,this.typeValue.length-2))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRequired",{get:function(){return this.isRequiredValue},set:function(e){e!==this.isRequired&&(this.isRequiredValue=e,this.classInfo&&this.classInfo.resetAllProperties())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUnique",{get:function(){return this.isUniqueValue},set:function(e){this.isUniqueValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uniquePropertyName",{get:function(){return this.uniquePropertyValue},set:function(e){this.uniquePropertyValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasToUseGetValue",{get:function(){return this.onGetValue||this.serializationProperty},enumerable:!1,configurable:!0}),e.prototype.getDefaultValue=function(t){var n=this.defaultValueFunc?this.defaultValueFunc(t):this.defaultValueValue;return e.getItemValuesDefaultValue&&Sr.isDescendantOf(this.className,"itemvalue")&&(n=e.getItemValuesDefaultValue(this.defaultValueValue||[],this.className)),n},Object.defineProperty(e.prototype,"defaultValue",{get:function(){return this.getDefaultValue(void 0)},set:function(e){this.defaultValueValue=e},enumerable:!1,configurable:!0}),e.prototype.isDefaultValue=function(e){return this.isDefaultValueByObj(void 0,e)},e.prototype.isDefaultValueByObj=function(e,t){var n=this.getDefaultValue(e);return cr.isValueEmpty(n)?this.isLocalizable?null==t:!1===t&&("boolean"==this.type||"switch"==this.type)||""===t||cr.isValueEmpty(t):cr.isTwoValueEquals(t,n,!1,!0,!1)},e.prototype.getSerializableValue=function(e){return this.onSerializeValue?this.onSerializeValue(e):this.getValue(e)},e.prototype.getValue=function(e){return this.onGetValue?this.onGetValue(e):this.serializationProperty&&e[this.serializationProperty]?e[this.serializationProperty].getJson():e[this.name]},e.prototype.getPropertyValue=function(e){return this.isLocalizable?e[this.serializationProperty]?e[this.serializationProperty].text:null:this.getValue(e)},Object.defineProperty(e.prototype,"hasToUseSetValue",{get:function(){return this.onSetValue||this.serializationProperty},enumerable:!1,configurable:!0}),e.prototype.settingValue=function(e,t){return!this.onSettingValue||e.isLoadingFromJson?t:this.onSettingValue(e,t)},e.prototype.setValue=function(e,t,n){this.onSetValue?this.onSetValue(e,t,n):this.serializationProperty&&e[this.serializationProperty]?e[this.serializationProperty].setJson(t):(t&&"string"==typeof t&&("number"==this.type&&(t=parseInt(t)),"boolean"!=this.type&&"switch"!=this.type||(t="true"===t.toLowerCase())),e[this.name]=t)},e.prototype.validateValue=function(e){var t=this.choices;return!Array.isArray(t)||0===t.length||t.indexOf(e)>-1},e.prototype.getObjType=function(e){return this.classNamePart?e.replace(this.classNamePart,""):e},Object.defineProperty(e.prototype,"choices",{get:function(){return this.getChoices(null)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasChoices",{get:function(){return!!this.choicesValue||!!this.choicesfunc},enumerable:!1,configurable:!0}),e.prototype.getChoices=function(e,t){return void 0===t&&(t=null),null!=this.choicesValue?this.choicesValue:null!=this.choicesfunc?this.choicesfunc(e,t):null},e.prototype.setChoices=function(e,t){void 0===t&&(t=null),this.choicesValue=e,this.choicesfunc=t},e.prototype.getBaseValue=function(){return this.baseValue?"function"==typeof this.baseValue?this.baseValue():this.baseValue:""},e.prototype.setBaseValue=function(e){this.baseValue=e},Object.defineProperty(e.prototype,"readOnly",{get:function(){return null!=this.readOnlyValue&&this.readOnlyValue},set:function(e){this.readOnlyValue=e},enumerable:!1,configurable:!0}),e.prototype.isVisible=function(e,t){void 0===t&&(t=null);var n=!this.layout||this.layout==e;return!(!this.visible||!n)&&(!this.visibleIf||!t||this.visibleIf(t))},Object.defineProperty(e.prototype,"visible",{get:function(){return null==this.visibleValue||this.visibleValue},set:function(e){this.visibleValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isLocalizable",{get:function(){return null!=this.isLocalizableValue&&this.isLocalizableValue},set:function(e){this.isLocalizableValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataList",{get:function(){return Array.isArray(this.dataListValue)?this.dataListValue:[]},set:function(e){this.dataListValue=e},enumerable:!1,configurable:!0}),e.prototype.mergeWith=function(t){for(var n=e.mergableValues,r=0;r<n.length;r++)this.mergeValue(t,n[r])},e.prototype.addDependedProperty=function(e){this.dependedProperties||(this.dependedProperties=[]),this.dependedProperties.indexOf(e)<0&&this.dependedProperties.push(e)},e.prototype.getDependedProperties=function(){return this.dependedProperties?this.dependedProperties:[]},e.prototype.schemaType=function(){if("choicesByUrl"!==this.className)return"string"===this.className?this.className:this.className||this.baseClassName?"array":"switch"==this.type?"boolean":"boolean"==this.type||"number"==this.type?this.type:"string"},e.prototype.schemaRef=function(){if(this.className)return this.className},e.prototype.mergeValue=function(e,t){null==this[t]&&null!=e[t]&&(this[t]=e[t])},e.Index=1,e.mergableValues=["typeValue","choicesValue","baseValue","readOnlyValue","visibleValue","isSerializable","isLightSerializable","isCustom","isBindable","isUnique","uniquePropertyName","isDynamicChoices","isLocalizableValue","className","alternativeName","layout","classNamePart","baseClassName","defaultValue","defaultValueFunc","serializationProperty","onGetValue","onSetValue","onSettingValue","displayName","category","categoryIndex","visibleIndex","nextToProperty","overridingProperty","showMode","dependedProperties","visibleIf","onExecuteExpression","onPropertyEditorUpdate","maxLength","maxValue","minValue","dataListValue"],e}(),yr=function(){function e(){}return e.addProperty=function(t,n){t=t.toLowerCase();var r=e.properties;r[t]||(r[t]=[]),r[t].push(n)},e.removeProperty=function(t,n){t=t.toLowerCase();var r=e.properties;if(r[t])for(var o=r[t],i=0;i<o.length;i++)if(o[i].name==n){r[t].splice(i,1);break}},e.removeAllProperties=function(t){t=t.toLowerCase(),delete e.properties[t]},e.addClass=function(t,n){t=t.toLowerCase(),n&&(n=n.toLowerCase()),e.parentClasses[t]=n},e.getProperties=function(t){t=t.toLowerCase();for(var n=[],r=e.properties;t;){var o=r[t];if(o)for(var i=0;i<o.length;i++)n.push(o[i]);t=e.parentClasses[t]}return n},e.createProperties=function(t){t&&t.getType&&e.createPropertiesCore(t,t.getType())},e.createPropertiesCore=function(t,n){var r=e.properties;r[n]&&e.createPropertiesInObj(t,r[n]);var o=e.parentClasses[n];o&&e.createPropertiesCore(t,o)},e.createPropertiesInObj=function(t,n){for(var r=0;r<n.length;r++)e.createPropertyInObj(t,n[r])},e.createPropertyInObj=function(t,n){if(!(e.checkIsPropertyExists(t,n.name)||n.serializationProperty&&e.checkIsPropertyExists(t,n.serializationProperty))){if(n.isLocalizable&&n.serializationProperty&&t.createCustomLocalizableObj){t.createCustomLocalizableObj(n.name).defaultValue=n.defaultValue;var r={get:function(){return t.getLocalizableString(n.name)}};Object.defineProperty(t,n.serializationProperty,r);var o={get:function(){return t.getLocalizableStringText(n.name)},set:function(e){t.setLocalizableStringText(n.name,e)}};Object.defineProperty(t,n.name,o)}else{var i=n.defaultValue,s=n.isArray||"multiplevalues"===n.type;if("function"==typeof t.createNewArray&&(Sr.isDescendantOf(n.className,"itemvalue")?(t.createNewArray(n.name,(function(e){e.locOwner=t,e.ownerPropertyName=n.name})),s=!0):s&&t.createNewArray(n.name),s&&(Array.isArray(i)&&t.setPropertyValue(n.name,i),i=null)),t.getPropertyValue&&t.setPropertyValue){o={get:function(){return n.onGetValue?n.onGetValue(t):t.getPropertyValue(n.name,i)},set:function(e){n.onSetValue?n.onSetValue(t,e,null):t.setPropertyValue(n.name,e)}};Object.defineProperty(t,n.name,o)}}"condition"!==n.type&&"expression"!==n.type||n.onExecuteExpression&&t.addExpressionProperty(n.name,n.onExecuteExpression)}},e.checkIsPropertyExists=function(e,t){return e.hasOwnProperty(t)||e[t]},e.properties={},e.parentClasses={},e}(),mr=function(){function e(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=null),this.name=e,this.creator=n,this.parentName=r,e=e.toLowerCase(),this.isCustomValue=!n&&"survey"!==e,this.parentName&&(this.parentName=this.parentName.toLowerCase(),yr.addClass(e,this.parentName),n&&this.makeParentRegularClass()),this.properties=new Array;for(var o=0;o<t.length;o++)this.createProperty(t[o],this.isCustom)}return e.prototype.find=function(e){for(var t=0;t<this.properties.length;t++)if(this.properties[t].name==e)return this.properties[t];return null},e.prototype.findProperty=function(e){return this.fillAllProperties(),this.hashProperties[e]},e.prototype.getAllProperties=function(){return this.fillAllProperties(),this.allProperties},e.prototype.getRequiredProperties=function(){if(this.requiredProperties)return this.requiredProperties;this.requiredProperties=[];for(var e=this.getAllProperties(),t=0;t<e.length;t++)e[t].isRequired&&this.requiredProperties.push(e[t]);return this.requiredProperties},e.prototype.resetAllProperties=function(){this.allProperties=void 0,this.requiredProperties=void 0,this.hashProperties=void 0;for(var e=Sr.getChildrenClasses(this.name),t=0;t<e.length;t++)e[t].resetAllProperties()},Object.defineProperty(e.prototype,"isCustom",{get:function(){return this.isCustomValue},enumerable:!1,configurable:!0}),e.prototype.fillAllProperties=function(){var e=this;if(!this.allProperties){this.allProperties=[],this.hashProperties={};var t={};this.properties.forEach((function(e){return t[e.name]=e}));var n=this.parentName?Sr.findClass(this.parentName):null;if(n)n.getAllProperties().forEach((function(n){var r=t[n.name];r?(r.mergeWith(n),e.addPropCore(r)):e.addPropCore(n)}));this.properties.forEach((function(t){e.hashProperties[t.name]||e.addPropCore(t)}))}},e.prototype.addPropCore=function(e){this.allProperties.push(e),this.hashProperties[e.name]=e,e.alternativeName&&(this.hashProperties[e.alternativeName]=e)},e.prototype.isOverridedProp=function(e){return!!this.parentName&&!!Sr.findProperty(this.parentName,e)},e.prototype.hasRegularChildClass=function(){if(this.isCustom){this.isCustomValue=!1;for(var e=0;e<this.properties.length;e++)this.properties[e].isCustom=!1;yr.removeAllProperties(this.name),this.makeParentRegularClass()}},e.prototype.makeParentRegularClass=function(){if(this.parentName){var e=Sr.findClass(this.parentName);e&&e.hasRegularChildClass()}},e.prototype.createProperty=function(t,n){void 0===n&&(n=!1);var r="string"==typeof t?t:t.name;if(r){var o=null,i=r.indexOf(e.typeSymbol);i>-1&&(o=r.substring(i+1),r=r.substring(0,i));var s=this.getIsPropertyNameRequired(r)||!!t.isRequired;r=this.getPropertyName(r);var a=new fr(this,r,s);if(o&&(a.type=o),"object"==typeof t){if(t.type&&(a.type=t.type),void 0!==t.default&&(a.defaultValue=t.default),void 0!==t.defaultFunc&&(a.defaultValueFunc=t.defaultFunc),cr.isValueEmpty(t.isSerializable)||(a.isSerializable=t.isSerializable),cr.isValueEmpty(t.isLightSerializable)||(a.isLightSerializable=t.isLightSerializable),cr.isValueEmpty(t.maxLength)||(a.maxLength=t.maxLength),cr.isValueEmpty(t.displayName)||(a.displayName=t.displayName),cr.isValueEmpty(t.category)||(a.category=t.category),cr.isValueEmpty(t.categoryIndex)||(a.categoryIndex=t.categoryIndex),cr.isValueEmpty(t.nextToProperty)||(a.nextToProperty=t.nextToProperty),cr.isValueEmpty(t.overridingProperty)||(a.overridingProperty=t.overridingProperty),cr.isValueEmpty(t.visibleIndex)||(a.visibleIndex=t.visibleIndex),cr.isValueEmpty(t.showMode)||(a.showMode=t.showMode),cr.isValueEmpty(t.maxValue)||(a.maxValue=t.maxValue),cr.isValueEmpty(t.minValue)||(a.minValue=t.minValue),cr.isValueEmpty(t.dataList)||(a.dataList=t.dataList),cr.isValueEmpty(t.isDynamicChoices)||(a.isDynamicChoices=t.isDynamicChoices),cr.isValueEmpty(t.isBindable)||(a.isBindable=t.isBindable),cr.isValueEmpty(t.isUnique)||(a.isUnique=t.isUnique),cr.isValueEmpty(t.uniqueProperty)||(a.uniquePropertyName=t.uniqueProperty),cr.isValueEmpty(t.isArray)||(a.isArray=t.isArray),!0!==t.visible&&!1!==t.visible||(a.visible=t.visible),t.visibleIf&&(a.visibleIf=t.visibleIf),t.onExecuteExpression&&(a.onExecuteExpression=t.onExecuteExpression),t.onPropertyEditorUpdate&&(a.onPropertyEditorUpdate=t.onPropertyEditorUpdate),!0===t.readOnly&&(a.readOnly=!0),t.choices){var u="function"==typeof t.choices?t.choices:null,l="function"!=typeof t.choices?t.choices:null;a.setChoices(l,u)}if(t.baseValue&&a.setBaseValue(t.baseValue),t.onSerializeValue&&(a.onSerializeValue=t.onSerializeValue),t.onGetValue&&(a.onGetValue=t.onGetValue),t.onSetValue&&(a.onSetValue=t.onSetValue),t.onSettingValue&&(a.onSettingValue=t.onSettingValue),t.isLocalizable&&(t.serializationProperty="loc"+a.name),t.serializationProperty)a.serializationProperty=t.serializationProperty,a.serializationProperty&&0==a.serializationProperty.indexOf("loc")&&(a.isLocalizable=!0);t.isLocalizable&&(a.isLocalizable=t.isLocalizable),t.className&&(a.className=t.className),t.baseClassName&&(a.baseClassName=t.baseClassName,a.isArray=!0),!0===a.isArray&&(a.isArray=!0),t.classNamePart&&(a.classNamePart=t.classNamePart),t.alternativeName&&(a.alternativeName=t.alternativeName),t.layout&&(a.layout=t.layout),t.dependsOn&&this.addDependsOnProperties(a,t.dependsOn)}return this.properties.push(a),n&&!this.isOverridedProp(a.name)&&(a.isCustom=!0,yr.addProperty(this.name,a)),a}},e.prototype.addDependsOnProperties=function(e,t){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addDependsOnProperty(e,t[n]);else this.addDependsOnProperty(e,t)},e.prototype.addDependsOnProperty=function(e,t){var n=this.find(t);n||(n=Sr.findProperty(this.parentName,t)),n&&n.addDependedProperty(e.name)},e.prototype.getIsPropertyNameRequired=function(t){return t.length>0&&t[0]==e.requiredSymbol},e.prototype.getPropertyName=function(e){return this.getIsPropertyNameRequired(e)?e=e.slice(1):e},e.requiredSymbol="!",e.typeSymbol=":",e}(),gr=function(){function e(){this.classes={},this.alternativeNames={},this.childrenClasses={},this.dynamicPropsCache={}}return e.prototype.getObjPropertyValue=function(e,t){if(this.isObjWrapper(e)){var n=e.getOriginalObj();if(r=Sr.findProperty(n.getType(),t))return this.getObjPropertyValueCore(n,r)}var r;return(r=Sr.findProperty(e.getType(),t))?this.getObjPropertyValueCore(e,r):e[t]},e.prototype.setObjPropertyValue=function(e,t,n){if(e[t]!==n)if(e[t]&&e[t].setJson)e[t].setJson(n);else{if(Array.isArray(n)){for(var r=[],o=0;o<n.length;o++)r.push(n[o]);n=r}e[t]=n}},e.prototype.getObjPropertyValueCore=function(e,t){if(!t.isSerializable)return e[t.name];if(t.isLocalizable){if(t.isArray)return e[t.name];if(t.serializationProperty)return e[t.serializationProperty].text}return e.getPropertyValue(t.name)},e.prototype.isObjWrapper=function(e){return!!e.getOriginalObj&&!!e.getOriginalObj()},e.prototype.addClass=function(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=null),e=e.toLowerCase();var o=new mr(e,t,n,r);(this.classes[e]=o,r)&&(r=r.toLowerCase(),this.childrenClasses[r]||(this.childrenClasses[r]=[]),this.childrenClasses[r].push(o));return o},e.prototype.removeClass=function(e){var t=this.findClass(e);if(t&&(delete this.classes[t.name],t.parentName)){var n=this.childrenClasses[t.parentName].indexOf(t);n>-1&&this.childrenClasses[t.parentName].splice(n,1)}},e.prototype.overrideClassCreatore=function(e,t){this.overrideClassCreator(e,t)},e.prototype.overrideClassCreator=function(e,t){e=e.toLowerCase();var n=this.findClass(e);n&&(n.creator=t)},e.prototype.getProperties=function(e){var t=this.findClass(e);return t?t.getAllProperties():[]},e.prototype.getPropertiesByObj=function(e){if(!e||!e.getType)return[];for(var t={},n=this.getProperties(e.getType()),r=0;r<n.length;r++)t[n[r].name]=n[r];var o=e.getDynamicType?this.getProperties(e.getDynamicType()):null;if(o&&o.length>0)for(r=0;r<o.length;r++){var i=o[r];t[i.name]||(t[i.name]=i)}return Object.keys(t).map((function(e){return t[e]}))},e.prototype.getDynamicPropertiesByObj=function(e,t){if(void 0===t&&(t=null),!e||!e.getType||!e.getDynamicType&&!t)return[];var n=e.getType(),r=t||e.getDynamicType();if(!r)return[];var o=r+"-"+n;if(this.dynamicPropsCache[o])return this.dynamicPropsCache[o];var i=this.getProperties(r);if(!i||0==i.length)return[];for(var s={},a=this.getProperties(n),u=0;u<a.length;u++)s[a[u].name]=a[u];var l=[];for(u=0;u<i.length;u++){var c=i[u];s[c.name]||l.push(c)}return this.dynamicPropsCache[o]=l,l},e.prototype.hasOriginalProperty=function(e,t){return!!this.getOriginalProperty(e,t)},e.prototype.getOriginalProperty=function(e,t){var n=this.findProperty(e.getType(),t);return n||(this.isObjWrapper(e)?this.findProperty(e.getOriginalObj().getType(),t):null)},e.prototype.getProperty=function(e,t){var n=this.findProperty(e,t);if(!n)return n;var r=this.findClass(e);if(n.classInfo===r)return n;var o=new fr(r,n.name,n.isRequired);return o.mergeWith(n),o.isArray=n.isArray,r.properties.push(o),r.resetAllProperties(),o},e.prototype.findProperty=function(e,t){var n=this.findClass(e);return n?n.findProperty(t):null},e.prototype.findProperties=function(e,t){var n=new Array,r=this.findClass(e);if(!r)return n;for(var o=0;o<t.length;o++){var i=r.findProperty(t[o]);i&&n.push(i)}return n},e.prototype.getAllPropertiesByName=function(e){for(var t=new Array,n=this.getAllClasses(),r=0;r<n.length;r++)for(var o=this.findClass(n[r]),i=0;i<o.properties.length;i++)if(o.properties[i].name==e){t.push(o.properties[i]);break}return t},e.prototype.getAllClasses=function(){var e=new Array;for(var t in this.classes)e.push(t);return e},e.prototype.createClass=function(e,t){void 0===t&&(t=void 0),e=e.toLowerCase();var n=this.findClass(e);if(!n)return null;if(n.creator)return n.creator(t);for(var r=n.parentName;r;){if(!(n=this.findClass(r)))return null;if(r=n.parentName,n.creator)return this.createCustomType(e,n.creator,t)}return null},e.prototype.createCustomType=function(e,t,n){void 0===n&&(n=void 0),e=e.toLowerCase();var r=t(n),o=e,i=r.getTemplate?r.getTemplate():r.getType();return r.getType=function(){return o},r.getTemplate=function(){return i},yr.createProperties(r),r},e.prototype.getChildrenClasses=function(e,t){void 0===t&&(t=!1),e=e.toLowerCase();var n=[];return this.fillChildrenClasses(e,t,n),n},e.prototype.getRequiredProperties=function(e){var t=this.findClass(e);if(!t)return[];for(var n=t.getRequiredProperties(),r=[],o=0;o<n.length;o++)r.push(n[o].name);return r},e.prototype.addProperties=function(e,t){e=e.toLowerCase();for(var n=this.findClass(e),r=0;r<t.length;r++)this.addCustomPropertyCore(n,t[r])},e.prototype.addProperty=function(e,t){return this.addCustomPropertyCore(this.findClass(e),t)},e.prototype.addCustomPropertyCore=function(e,t){if(!e)return null;var n=e.createProperty(t,!0);return n&&(this.clearDynamicPropsCache(e),e.resetAllProperties()),n},e.prototype.removeProperty=function(e,t){var n=this.findClass(e);if(!n)return!1;var r=n.find(t);r&&(this.clearDynamicPropsCache(n),this.removePropertyFromClass(n,r),n.resetAllProperties(),yr.removeProperty(n.name,t))},e.prototype.clearDynamicPropsCache=function(e){this.dynamicPropsCache={}},e.prototype.removePropertyFromClass=function(e,t){var n=e.properties.indexOf(t);n<0||e.properties.splice(n,1)},e.prototype.fillChildrenClasses=function(e,t,n){var r=this.childrenClasses[e];if(r)for(var o=0;o<r.length;o++)t&&!r[o].creator||n.push(r[o]),this.fillChildrenClasses(r[o].name,t,n)},e.prototype.findClass=function(e){e=e.toLowerCase();var t=this.classes[e];if(!t){var n=this.alternativeNames[e];if(n&&n!=e)return this.findClass(n)}return t},e.prototype.isDescendantOf=function(e,t){if(!e||!t)return!1;e=e.toLowerCase(),t=t.toLowerCase();var n=this.findClass(e);if(!n)return!1;var r=n;do{if(r.name===t)return!0;r=this.classes[r.parentName]}while(r);return!1},e.prototype.addAlterNativeClassName=function(e,t){this.alternativeNames[t.toLowerCase()]=e.toLowerCase()},e.prototype.generateSchema=function(e){void 0===e&&(e=void 0),e||(e="survey");var t=this.findClass(e);if(!t)return null;var n={$schema:"http://json-schema.org/draft-07/schema#",title:"SurveyJS Library json schema",type:"object",properties:{},definitions:{locstring:this.generateLocStrClass()}};return this.generateSchemaProperties(t,n,n.definitions,!0),n},e.prototype.generateLocStrClass=function(){var e={},t=Sr.findProperty("survey","locale");if(t){var n=t.getChoices(null);Array.isArray(n)&&(n.indexOf("en")<0&&n.splice(0,0,"en"),n.splice(0,0,"default"),n.forEach((function(t){t&&(e[t]={type:"string"})})))}return{$id:"locstring",type:"object",properties:e}},e.prototype.generateSchemaProperties=function(e,t,n,r){if(e){var o=t.properties,i=[];"question"!==e.name&&"panel"!==e.name||(o.type={type:"string"},i.push("type"));for(var s=0;s<e.properties.length;s++){var a=e.properties[s];e.parentName&&Sr.findProperty(e.parentName,a.name)||(o[a.name]=this.generateSchemaProperty(a,n,r),a.isRequired&&i.push(a.name))}i.length>0&&(t.required=i)}},e.prototype.generateSchemaProperty=function(e,t,n){if(e.isLocalizable)return{oneOf:[{type:"string"},{$ref:this.getChemeRefName("locstring",n)}]};var r=e.schemaType(),o=e.schemaRef(),i={};if(r&&(i.type=r),e.hasChoices){var s=e.getChoices(null);Array.isArray(s)&&s.length>0&&(i.enum=this.getChoicesValues(s))}if(o&&("array"===r?"string"===e.className?i.items={type:e.className}:i.items={$ref:this.getChemeRefName(e.className,n)}:i.$ref=this.getChemeRefName(o,n),this.generateChemaClass(e.className,t,!1)),e.baseClassName){var a=this.getChildrenClasses(e.baseClassName,!0);"question"==e.baseClassName&&a.push(this.findClass("panel")),i.items={anyOf:[]};for(var u=0;u<a.length;u++){var l=a[u].name;i.items.anyOf.push({$ref:this.getChemeRefName(l,n)}),this.generateChemaClass(l,t,!1)}}return i},e.prototype.getChemeRefName=function(e,t){return t?"#/definitions/"+e:e},e.prototype.generateChemaClass=function(e,t,n){if(!t[e]){var r=this.findClass(e);if(r){var o=!!r.parentName&&"base"!=r.parentName;o&&this.generateChemaClass(r.parentName,t,n);var i={type:"object",$id:e};t[e]=i;var s={properties:{}};this.generateSchemaProperties(r,s,t,n),o?i.allOf=[{$ref:this.getChemeRefName(r.parentName,n)},{properties:s.properties}]:i.properties=s.properties,Array.isArray(s.required)&&(i.required=s.required)}}},e.prototype.getChoicesValues=function(e){var t=new Array;return e.forEach((function(e){"object"==typeof e&&void 0!==e.value?t.push(e.value):t.push(e)})),t},e}(),vr=function(){function e(e,t){this.type=e,this.message=t,this.description="",this.at=-1,this.end=-1}return e.prototype.getFullDescription=function(){return this.message+(this.description?"\n"+this.description:"")},e}(),br=function(e){function t(t,n){var r=e.call(this,"unknownproperty","The property '"+t+"' in class '"+n+"' is unknown.")||this;r.propertyName=t,r.className=n;var o=Sr.getProperties(n);if(o){r.description="The list of available properties are: ";for(var i=0;i<o.length;i++)i>0&&(r.description+=", "),r.description+=o[i].name;r.description+="."}return r}return dr(t,e),t}(vr),Cr=function(e){function t(t,n,r){var o=e.call(this,n,r)||this;o.baseClassName=t,o.type=n,o.message=r,o.description="The following types are available: ";for(var i=Sr.getChildrenClasses(t,!0),s=0;s<i.length;s++)s>0&&(o.description+=", "),o.description+="'"+i[s].name+"'";return o.description+=".",o}return dr(t,e),t}(vr),Er=function(e){function t(t,n){var r=e.call(this,n,"missingtypeproperty","The property type is missing in the object. Please take a look at property: '"+t+"'.")||this;return r.propertyName=t,r.baseClassName=n,r}return dr(t,e),t}(Cr),qr=function(e){function t(t,n){var r=e.call(this,n,"incorrecttypeproperty","The property type is incorrect in the object. Please take a look at property: '"+t+"'.")||this;return r.propertyName=t,r.baseClassName=n,r}return dr(t,e),t}(Cr),wr=function(e){function t(t,n){var r=e.call(this,"requiredproperty","The property '"+t+"' is required in class '"+n+"'.")||this;return r.propertyName=t,r.className=n,r}return dr(t,e),t}(vr),Or=function(e){function t(t,n){var r=e.call(this,"arrayproperty","The property '"+t+"' should be an array in '"+n+"'.")||this;return r.propertyName=t,r.className=n,r}return dr(t,e),t}(vr),Pr=function(e){function t(t,n){var r=e.call(this,"incorrectvalue","The property value: '"+n+"' is incorrect for property '"+t.name+"'.")||this;return r.property=t,r.value=n,r}return dr(t,e),t}(vr),xr=function(){function e(){this.errors=new Array,this.lightSerializing=!1}return Object.defineProperty(e,"metaData",{get:function(){return e.metaDataValue},enumerable:!1,configurable:!0}),e.prototype.toJsonObject=function(e,t){return void 0===t&&(t=!1),this.toJsonObjectCore(e,null,t)},e.prototype.toObject=function(e,t,n){this.toObjectCore(e,t,n);var r=this.getRequiredError(t,e);r&&this.addNewError(r,e,t)},e.prototype.toObjectCore=function(t,n,r){if(t){var o=null,i=void 0,s=!0;if(n.getType&&(i=n.getType(),o=Sr.getProperties(i),s=!!i&&!Sr.isDescendantOf(i,"itemvalue")),o){for(var a in n.startLoadingFromJson&&n.startLoadingFromJson(t),o=this.addDynamicProperties(n,t,o),this.options=r,t)if(a!==e.typePropertyName)if(a!==e.positionPropertyName){var u=this.findProperty(o,a);u?this.valueToObj(t[a],n,u,t,r):s&&this.addNewError(new br(a.toString(),i),t,n)}else n[a]=t[a];this.options=void 0,n.endLoadingFromJson&&n.endLoadingFromJson()}}},e.prototype.toJsonObjectCore=function(t,n,r){if(void 0===r&&(r=!1),!t||!t.getType)return t;if("function"==typeof t.getData)return t.getData();var o={};return null==n||n.className||(o[e.typePropertyName]=n.getObjType(t.getType())),this.propertiesToJson(t,Sr.getProperties(t.getType()),o,r),this.propertiesToJson(t,this.getDynamicProperties(t),o,r),o},e.prototype.getDynamicProperties=function(e){return Sr.getDynamicPropertiesByObj(e)},e.prototype.addDynamicProperties=function(e,t,n){if(!e.getDynamicPropertyName)return n;var r=e.getDynamicPropertyName();if(!r)return n;t[r]&&(e[r]=t[r]);for(var o=this.getDynamicProperties(e),i=[],s=0;s<n.length;s++)i.push(n[s]);for(s=0;s<o.length;s++)i.push(o[s]);return i},e.prototype.propertiesToJson=function(e,t,n,r){void 0===r&&(r=!1);for(var o=0;o<t.length;o++)this.valueToJson(e,n,t[o],r)},e.prototype.valueToJson=function(e,t,n,r){if(void 0===r&&(r=!1),!(!1===n.isSerializable||!1===n.isLightSerializable&&this.lightSerializing)){var o=n.getSerializableValue(e);if(r||!n.isDefaultValueByObj(e,o)){if(this.isValueArray(o)){for(var i=[],s=0;s<o.length;s++)i.push(this.toJsonObjectCore(o[s],n,r));o=i.length>0?i:null}else o=this.toJsonObjectCore(o,n,r);var a="function"==typeof e.getPropertyValue&&null!==e.getPropertyValue(n.name,null);(r&&a||!n.isDefaultValueByObj(e,o))&&(Sr.onSerializingProperty&&Sr.onSerializingProperty(e,n,o,t)||(t[n.name]=o))}}},e.prototype.valueToObj=function(e,t,n,r,o){if(null!=e)if(this.removePos(n,e),null!=n&&n.hasToUseSetValue)n.setValue(t,e,this);else{if(n.isArray&&!Array.isArray(e)&&e){e=[e];var i=r&&n.alternativeName&&r[n.alternativeName]?n.alternativeName:n.name;this.addNewError(new Or(i,t.getType()),r||e,t)}if(this.isValueArray(e))this.valueToArray(e,t,n.name,n,o);else{var s=this.createNewObj(e,n);s.newObj&&(this.toObjectCore(e,s.newObj,o),e=s.newObj),s.error||(null!=n?(n.setValue(t,e,this),o&&o.validatePropertyValues&&(n.validateValue(e)||this.addNewError(new Pr(n,e),r,t))):t[n.name]=e)}}},e.prototype.removePos=function(e,t){!e||!e.type||e.type.indexOf("value")<0||this.removePosFromObj(t)},e.prototype.removePosFromObj=function(t){if(t){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.removePosFromObj(t[n]);t[e.positionPropertyName]&&delete t[e.positionPropertyName]}},e.prototype.isValueArray=function(e){return e&&Array.isArray(e)},e.prototype.createNewObj=function(e,t){var n={newObj:null,error:null},r=this.getClassNameForNewObj(e,t);return n.newObj=r?Sr.createClass(r,e):null,n.error=this.checkNewObjectOnErrors(n.newObj,e,t,r),n},e.prototype.getClassNameForNewObj=function(t,n){var r=null!=n&&n.className?n.className:void 0;if(r||(r=t[e.typePropertyName]),!r)return r;r=r.toLowerCase();var o=n.classNamePart;return o&&r.indexOf(o)<0&&(r+=o),r},e.prototype.checkNewObjectOnErrors=function(e,t,n,r){var o=null;return e?o=this.getRequiredError(e,t):n.baseClassName&&(o=r?new qr(n.name,n.baseClassName):new Er(n.name,n.baseClassName)),o&&this.addNewError(o,t,e),o},e.prototype.getRequiredError=function(e,t){if(!e.getType||"function"==typeof e.getData)return null;var n=Sr.findClass(e.getType());if(!n)return null;var r=n.getRequiredProperties();if(!Array.isArray(r))return null;for(var o=0;o<r.length;o++){var i=r[o];if(cr.isValueEmpty(i.defaultValue)&&!t[i.name])return new wr(i.name,e.getType())}return null},e.prototype.addNewError=function(t,n,r){if(t.jsonObj=n,t.element=r,this.errors.push(t),n){var o=n[e.positionPropertyName];o&&(t.at=o.start,t.end=o.end)}},e.prototype.valueToArray=function(e,t,n,r,o){if(!t[n]||this.isValueArray(t[n])){t[n]&&e.length>0&&t[n].splice(0,t[n].length);var i=t[n]?t[n]:[];this.addValuesIntoArray(e,i,r,o),t[n]||(t[n]=i)}},e.prototype.addValuesIntoArray=function(e,t,n,r){for(var o=0;o<e.length;o++){var i=this.createNewObj(e[o],n);i.newObj?(e[o].name&&(i.newObj.name=e[o].name),e[o].valueName&&(i.newObj.valueName=e[o].valueName.toString()),t.push(i.newObj),this.toObjectCore(e[o],i.newObj,r)):i.error||t.push(e[o])}},e.prototype.findProperty=function(e,t){if(!e)return null;for(var n=0;n<e.length;n++){var r=e[n];if(r.name==t||r.alternativeName==t)return r}return null},e.typePropertyName="type",e.positionPropertyName="pos",e.metaDataValue=new gr,e}(),Sr=xr.metaData,_r=function(){function e(){this.values=null,this.properties=null}return e.prototype.getFirstName=function(e,t){if(void 0===t&&(t=null),!e)return e;var n="";if(t&&(n=this.getFirstPropertyName(e,t)))return n;for(var r=0;r<e.length;r++){var o=e[r];if("."==o||"["==o)break;n+=o}return n},e.prototype.hasValue=function(e,t){return void 0===t&&(t=null),t||(t=this.values),this.getValueCore(e,t).hasValue},e.prototype.getValue=function(e,t){return void 0===t&&(t=null),t||(t=this.values),this.getValueCore(e,t).value},e.prototype.setValue=function(e,t,n){if(t){var r=this.getNonNestedObject(e,t,!0);r&&(e=r.value,t=r.text,e&&t&&(e[t]=n))}},e.prototype.getValueInfo=function(e){if(e.path)return e.value=this.getValueFromPath(e.path,this.values),e.hasValue=null!==e.value&&!cr.isValueEmpty(e.value),void(!e.hasValue&&e.path.length>1&&"length"==e.path[e.path.length-1]&&(e.hasValue=!0,e.value=0));var t=this.getValueCore(e.name,this.values);e.value=t.value,e.hasValue=t.hasValue,e.path=t.hasValue?t.path:null,e.sctrictCompare=t.sctrictCompare},e.prototype.isAnyKeyChanged=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];if(e.hasOwnProperty(r))return!0;var o=this.getFirstName(r);if(e.hasOwnProperty(o)){if(r===o)return!0;var i=e[o];if(null!=i){if(!i.hasOwnProperty("oldValue")||!i.hasOwnProperty("newValue"))return!0;var s={};s[o]=i.oldValue;var a=this.getValue(r,s);s[o]=i.newValue;var u=this.getValue(r,s);if(!cr.isTwoValueEquals(a,u,!1,!1,!1))return!0}}}return!1},e.prototype.getValueFromPath=function(e,t){if(2===e.length&&"@survey"===e[0])return this.getValueFromSurvey(e[1]);for(var n=0;t&&n<e.length;){var r=e[n];if(cr.isNumber(r)&&Array.isArray(t)&&r>=t.length)return null;t=t[r],n++}return t},e.prototype.getValueCore=function(e,t){var n=this.getQuestionDirectly(e);if(n)return{hasValue:!0,value:n.value,path:[e],sctrictCompare:n.requireStrictCompare};var r=this.getValueFromValues(e,t);if(e&&!r.hasValue){var o=this.getValueFromSurvey(e);void 0!==o&&(r.hasValue=!0,r.value=o,r.path=["@survey",e])}return r},e.prototype.getQuestionDirectly=function(e){if(this.properties&&this.properties.survey)return this.properties.survey.getQuestionByValueName(e)},e.prototype.getValueFromSurvey=function(e){if(this.properties&&this.properties.survey)return this.properties.survey.getBuiltInVariableValue(e.toLocaleLowerCase())},e.prototype.getValueFromValues=function(e,t){var n={hasValue:!1,value:null,path:null},r=t;if(!r&&0!==r&&!1!==r)return n;e&&e.lastIndexOf(".length")>-1&&e.lastIndexOf(".length")===e.length-".length".length&&(n.value=0,n.hasValue=!0);var o=this.getNonNestedObject(r,e,!1);return o?(n.path=o.path,n.value=o.text?this.getObjectValue(o.value,o.text):o.value,n.hasValue=!cr.isValueEmpty(n.value),n):n},e.prototype.getNonNestedObject=function(e,t,n){for(var r=new Array,o=0,i=this.getNonNestedObjectCore(e,t,n,r);!i&&o<r.length;)o=r.length,i=this.getNonNestedObjectCore(e,t,n,r);return i},e.prototype.getNonNestedObjectCore=function(e,t,n,r){var o=this.getFirstPropertyName(t,e,n,r);o&&r.push(o);for(var i=o?[o]:null;t!=o&&e;){if("["==t[0]){var s=this.getObjInArray(e,t);if(!s)return null;e=s.value,t=s.text,i.push(s.index)}else{if(!o&&t==this.getFirstName(t))return{value:e,text:t,path:i};if(e=this.getObjectValue(e,o),cr.isValueEmpty(e)&&!n)return null;t=t.substring(o.length)}t&&"."==t[0]&&(t=t.substring(1)),(o=this.getFirstPropertyName(t,e,n,r))&&i.push(o)}return{value:e,text:t,path:i}},e.prototype.getObjInArray=function(e,t){if(!Array.isArray(e))return null;for(var n=1,r="";n<t.length&&"]"!=t[n];)r+=t[n],n++;return t=n<t.length?t.substring(n+1):"",(n=this.getIntValue(r))<0||n>=e.length?null:{value:e[n],text:t,index:n}},e.prototype.getFirstPropertyName=function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=void 0),!e)return e;if(t||(t={}),t.hasOwnProperty(e))return e;var o=e.toLowerCase(),i=o[0],s=i.toUpperCase();for(var a in t)if(!(Array.isArray(r)&&r.indexOf(a)>-1)){var u=a[0];if(u===s||u===i){var l=a.toLowerCase();if(l==o)return a;if(o.length<=l.length)continue;var c=o[l.length];if("."!=c&&"["!=c)continue;if(l==o.substring(0,l.length))return a}}if(n&&"["!==e[0]){var p=e.indexOf(".");return p>-1&&(t[e=e.substring(0,p)]={}),e}return""},e.prototype.getObjectValue=function(e,t){return t?e[t]:null},e.prototype.getIntValue=function(e){return"0"==e||(0|e)>0&&e%1==0?Number(e):-1},e}(),Nr=function(){function e(){}return e.disposedObjectChangedProperty=function(t,n){e.warn('An attempt to set a property "'+t+'" of a disposed object "'+n+'"')},e.inCorrectQuestionValue=function(t,n){var r=JSON.stringify(n,null,3);e.warn("An attempt to assign an incorrect value"+r+' to the following question: "'+t+'"')},e.warn=function(e){console.warn(e)},e.error=function(e){console.error(e)},e}(),Ir=function(){function e(){this.functionHash={},this.isAsyncHash={}}return e.prototype.register=function(e,t,n){void 0===n&&(n=!1),this.functionHash[e]=t,n&&(this.isAsyncHash[e]=!0)},e.prototype.unregister=function(e){delete this.functionHash[e],delete this.isAsyncHash[e]},e.prototype.hasFunction=function(e){return!!this.functionHash[e]},e.prototype.isAsyncFunction=function(e){return!!this.isAsyncHash[e]},e.prototype.clear=function(){this.functionHash={}},e.prototype.getAll=function(){var e=[];for(var t in this.functionHash)e.push(t);return e.sort()},e.prototype.run=function(e,t,n){void 0===n&&(n=null);var r=this.functionHash[e];if(!r)return Nr.warn("Unknown function name: "+e),null;var o={func:r};if(n)for(var i in n)o[i]=n[i];return o.func(t)},e.Instance=new e,e}();Ir.Instance.register;function Vr(e,t){if(null!=e)if(Array.isArray(e))for(var n=0;n<e.length;n++)Vr(e[n],t);else cr.isNumber(e)&&(e=cr.getNumber(e)),t.push(e)}function jr(e){var t=[];Vr(e,t);for(var n=0,r=0;r<t.length;r++)n=cr.correctAfterPlusMinis(n,t[r],n+t[r]);return n}function Tr(e,t){var n=[];Vr(e,n);for(var r=void 0,o=0;o<n.length;o++)void 0===r&&(r=n[o]),t?r>n[o]&&(r=n[o]):r<n[o]&&(r=n[o]);return r}function Rr(e,t,n,r,o){return!e||cr.isValueEmpty(e[t])?n:r(n,o?function(e){return"string"==typeof e?cr.isNumber(e)?cr.getNumber(e):void 0:e}(e[t]):1)}function Dr(e,t,n){void 0===n&&(n=!0);var r=function(e){if(2!=e.length)return null;var t=e[0];if(!t)return null;if(!Array.isArray(t)&&!Array.isArray(Object.keys(t)))return null;var n=e[1];return"string"==typeof n||n instanceof String?{data:t,name:n}:null}(e);if(r){var o=void 0;if(Array.isArray(r.data))for(var i=0;i<r.data.length;i++)o=Rr(r.data[i],r.name,o,t,n);else for(var s in r.data)o=Rr(r.data[s],r.name,o,t,n);return o}}function Ar(e){var t=Dr(e,(function(e,t){return null==e&&(e=0),null==t||null==t?e:cr.correctAfterPlusMinis(e,t,e+t)}));return void 0!==t?t:0}function Lr(e){var t=Dr(e,(function(e,t){return null==e&&(e=0),null==t||null==t?e:e+1}),!1);return void 0!==t?t:0}function kr(e){if(!e)return!1;for(var t=e.questions,n=0;n<t.length;n++)if(!t[n].validate(!1))return!1;return!0}function Mr(e){var t=new Date;return lr.localization.useLocalTimeZone?t.setHours(0,0,0,0):t.setUTCHours(0,0,0,0),Array.isArray(e)&&1==e.length&&t.setDate(t.getDate()+e[0]),t}function Br(e){var t=Mr(void 0);return e&&e[0]&&(t=new Date(e[0])),t}function Fr(e,t){if(e&&t){for(var n=["row","panel","survey"],r=0;r<n.length;r++){var o=e[n[r]];if(o&&o.getQuestionByName){var i=o.getQuestionByName(t);if(i)return i}}return null}}Ir.Instance.register("sum",jr),Ir.Instance.register("min",(function(e){return Tr(e,!0)})),Ir.Instance.register("max",(function(e){return Tr(e,!1)})),Ir.Instance.register("count",(function(e){var t=[];return Vr(e,t),t.length})),Ir.Instance.register("avg",(function(e){var t=[];Vr(e,t);var n=jr(e);return t.length>0?n/t.length:0})),Ir.Instance.register("sumInArray",Ar),Ir.Instance.register("minInArray",(function(e){return Dr(e,(function(e,t){return null==e?t:null==t||null==t||e<t?e:t}))})),Ir.Instance.register("maxInArray",(function(e){return Dr(e,(function(e,t){return null==e?t:null==t||null==t||e>t?e:t}))})),Ir.Instance.register("countInArray",Lr),Ir.Instance.register("avgInArray",(function(e){var t=Lr(e);return 0==t?0:Ar(e)/t})),Ir.Instance.register("iif",(function(e){return e||3===e.length?e[0]?e[1]:e[2]:""})),Ir.Instance.register("getDate",(function(e){return!e&&e.length<1?null:e[0]?new Date(e[0]):null})),Ir.Instance.register("age",(function(e){if(!e&&e.length<1)return null;if(!e[0])return null;var t=new Date(e[0]),n=new Date,r=n.getFullYear()-t.getFullYear(),o=n.getMonth()-t.getMonth();return(o<0||0===o&&n.getDate()<t.getDate())&&(r-=r>0?1:0),r})),Ir.Instance.register("isContainerReady",(function(e){if(!e&&e.length<1)return!1;if(!e[0]||!this.survey)return!1;var t=e[0],n=this.survey.getPageByName(t);if(n||(n=this.survey.getPanelByName(t)),!n){var r=this.survey.getQuestionByName(t);if(!r||!Array.isArray(r.panels))return!1;if(!(e.length>1)){for(var o=0;o<r.panels.length;o++)if(!kr(r.panels[o]))return!1;return!0}e[1]<r.panels.length&&(n=r.panels[e[1]])}return kr(n)})),Ir.Instance.register("isDisplayMode",(function(){return this.survey&&this.survey.isDisplayMode})),Ir.Instance.register("currentDate",(function(){return new Date})),Ir.Instance.register("today",Mr),Ir.Instance.register("getYear",(function(e){if(1===e.length&&e[0])return new Date(e[0]).getFullYear()})),Ir.Instance.register("currentYear",(function(){return(new Date).getFullYear()})),Ir.Instance.register("diffDays",(function(e){if(!Array.isArray(e)||2!==e.length)return 0;if(!e[0]||!e[1])return 0;var t=new Date(e[0]),n=new Date(e[1]),r=Math.abs(n-t);return Math.ceil(r/864e5)})),Ir.Instance.register("year",(function(e){return Br(e).getFullYear()})),Ir.Instance.register("month",(function(e){return Br(e).getMonth()+1})),Ir.Instance.register("day",(function(e){return Br(e).getDate()})),Ir.Instance.register("weekday",(function(e){return Br(e).getDay()})),Ir.Instance.register("displayValue",(function(e){var t=Fr(this,e[0]);return t?t.displayValue:""})),Ir.Instance.register("propertyValue",(function(e){if(2===e.length&&e[0]&&e[1]){var t=Fr(this,e[0]);return t?t[e[1]]:void 0}}));var zr=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Hr=function(){function e(){}return e.prototype.toString=function(e){return void 0===e&&(e=void 0),""},e.prototype.hasFunction=function(){return!1},e.prototype.hasAsyncFunction=function(){return!1},e.prototype.addToAsyncList=function(e){},e.prototype.isEqual=function(e){return!!e&&e.getType()===this.getType()&&this.isContentEqual(e)},e.prototype.areOperatorsEquals=function(e,t){return!e&&!t||!!e&&e.isEqual(t)},e}(),Wr=function(e){function t(t,n,r,o){void 0===n&&(n=null),void 0===r&&(r=null),void 0===o&&(o=!1);var i=e.call(this)||this;return i.operatorName=t,i.left=n,i.right=r,i.isArithmeticValue=o,i.consumer=o?Yr.binaryFunctions.arithmeticOp(t):Yr.binaryFunctions[t],null==i.consumer&&Yr.throwInvalidOperatorError(t),i}return zr(t,e),Object.defineProperty(t.prototype,"requireStrictCompare",{get:function(){return this.getIsOperandRequireStrict(this.left)||this.getIsOperandRequireStrict(this.right)},enumerable:!1,configurable:!0}),t.prototype.getIsOperandRequireStrict=function(e){return!!e&&e.requireStrictCompare},t.prototype.getType=function(){return"binary"},Object.defineProperty(t.prototype,"isArithmetic",{get:function(){return this.isArithmeticValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isConjunction",{get:function(){return"or"==this.operatorName||"and"==this.operatorName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"conjunction",{get:function(){return this.isConjunction?this.operatorName:""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"operator",{get:function(){return this.operatorName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leftOperand",{get:function(){return this.left},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightOperand",{get:function(){return this.right},enumerable:!1,configurable:!0}),t.prototype.isContentEqual=function(e){var t=e;return t.operator===this.operator&&this.areOperatorsEquals(this.left,t.left)&&this.areOperatorsEquals(this.right,t.right)},t.prototype.evaluateParam=function(e,t){return null==e?null:e.evaluate(t)},t.prototype.evaluate=function(e){return this.consumer.call(this,this.evaluateParam(this.left,e),this.evaluateParam(this.right,e),this.requireStrictCompare)},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return"("+Yr.safeToString(this.left,e)+" "+Yr.operatorToString(this.operatorName)+" "+Yr.safeToString(this.right,e)+")"},t.prototype.setVariables=function(e){null!=this.left&&this.left.setVariables(e),null!=this.right&&this.right.setVariables(e)},t.prototype.hasFunction=function(){return!!this.left&&this.left.hasFunction()||!!this.right&&this.right.hasFunction()},t.prototype.hasAsyncFunction=function(){return!!this.left&&this.left.hasAsyncFunction()||!!this.right&&this.right.hasAsyncFunction()},t.prototype.addToAsyncList=function(e){this.left&&this.left.addToAsyncList(e),this.right&&this.right.addToAsyncList(e)},t}(Hr),Ur=function(e){function t(t,n){var r=e.call(this)||this;return r.expressionValue=t,r.operatorName=n,r.consumer=Yr.unaryFunctions[n],null==r.consumer&&Yr.throwInvalidOperatorError(n),r}return zr(t,e),Object.defineProperty(t.prototype,"operator",{get:function(){return this.operatorName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"expression",{get:function(){return this.expressionValue},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"unary"},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return Yr.operatorToString(this.operatorName)+" "+this.expression.toString(e)},t.prototype.isContentEqual=function(e){var t=e;return t.operator==this.operator&&this.areOperatorsEquals(this.expression,t.expression)},t.prototype.hasFunction=function(){return this.expression.hasFunction()},t.prototype.hasAsyncFunction=function(){return this.expression.hasAsyncFunction()},t.prototype.addToAsyncList=function(e){this.expression.addToAsyncList(e)},t.prototype.evaluate=function(e){var t=this.expression.evaluate(e);return this.consumer.call(this,t)},t.prototype.setVariables=function(e){this.expression.setVariables(e)},t}(Hr),Qr=function(e){function t(t){var n=e.call(this)||this;return n.values=t,n}return zr(t,e),t.prototype.getType=function(){return"array"},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return"["+this.values.map((function(t){return t.toString(e)})).join(", ")+"]"},t.prototype.evaluate=function(e){return this.values.map((function(t){return t.evaluate(e)}))},t.prototype.setVariables=function(e){this.values.forEach((function(t){t.setVariables(e)}))},t.prototype.hasFunction=function(){return this.values.some((function(e){return e.hasFunction()}))},t.prototype.hasAsyncFunction=function(){return this.values.some((function(e){return e.hasAsyncFunction()}))},t.prototype.addToAsyncList=function(e){this.values.forEach((function(t){return t.addToAsyncList(e)}))},t.prototype.isContentEqual=function(e){var t=e;if(t.values.length!==this.values.length)return!1;for(var n=0;n<this.values.length;n++)if(!t.values[n].isEqual(this.values[n]))return!1;return!0},t}(Hr),Jr=function(e){function t(t){var n=e.call(this)||this;return n.value=t,n}return zr(t,e),t.prototype.getType=function(){return"const"},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return this.value.toString()},Object.defineProperty(t.prototype,"correctValue",{get:function(){return this.getCorrectValue(this.value)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"requireStrictCompare",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.evaluate=function(){return this.getCorrectValue(this.value)},t.prototype.setVariables=function(e){},t.prototype.getCorrectValue=function(e){return e&&"string"==typeof e?this.isBooleanValue(e)?"true"===e.toLowerCase():e.length>1&&this.isQuote(e[0])&&this.isQuote(e[e.length-1])?e.substring(1,e.length-1):Yr.isNumeric(e)?0==e.indexOf("0x")?parseInt(e):e.length>1&&"0"==e[0]&&(e.length<2||"."!==e[1]&&","!==e[1])?e:parseFloat(e):e:e},t.prototype.isContentEqual=function(e){return e.value==this.value},t.prototype.isQuote=function(e){return"'"==e||'"'==e},t.prototype.isBooleanValue=function(e){return e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())},t}(Hr),Kr=function(e){function t(n){var r=e.call(this,n)||this;return r.variableName=n,r.valueInfo={},r.useValueAsItIs=!1,r.variableName&&r.variableName.length>1&&r.variableName[0]===t.DisableConversionChar&&(r.variableName=r.variableName.substring(1),r.useValueAsItIs=!0),r}return zr(t,e),Object.defineProperty(t,"DisableConversionChar",{get:function(){return lr.expressionDisableConversionChar},set:function(e){lr.expressionDisableConversionChar=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"requireStrictCompare",{get:function(){return!0===this.valueInfo.sctrictCompare},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"variable"},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var n=e(this);if(n)return n}return"{"+(this.useValueAsItIs?t.DisableConversionChar:"")+this.variableName+"}"},Object.defineProperty(t.prototype,"variable",{get:function(){return this.variableName},enumerable:!1,configurable:!0}),t.prototype.evaluate=function(e){return this.valueInfo.name=this.variableName,e.getValueInfo(this.valueInfo),this.valueInfo.hasValue?this.getCorrectValue(this.valueInfo.value):null},t.prototype.setVariables=function(e){e.push(this.variableName)},t.prototype.getCorrectValue=function(t){return this.useValueAsItIs?t:e.prototype.getCorrectValue.call(this,t)},t.prototype.isContentEqual=function(e){return e.variable==this.variable},t}(Jr),Gr=function(e){function t(t,n){var r=e.call(this)||this;return r.originalValue=t,r.parameters=n,r.isReadyValue=!1,Array.isArray(n)&&0===n.length&&(r.parameters=new Qr([])),r}return zr(t,e),t.prototype.getType=function(){return"function"},t.prototype.evaluateAsync=function(e){var t=this;this.isReadyValue=!1;var n=new _r;n.values=cr.createCopy(e.values),n.properties=cr.createCopy(e.properties),n.properties.returnResult=function(e){t.asynResult=e,t.isReadyValue=!0,t.onAsyncReady()},this.evaluateCore(n)},t.prototype.evaluate=function(e){return this.isReady?this.asynResult:this.evaluateCore(e)},t.prototype.evaluateCore=function(e){return Ir.Instance.run(this.originalValue,this.parameters.evaluate(e),e.properties)},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return this.originalValue+"("+this.parameters.toString(e)+")"},t.prototype.setVariables=function(e){this.parameters.setVariables(e)},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.isReadyValue},enumerable:!1,configurable:!0}),t.prototype.hasFunction=function(){return!0},t.prototype.hasAsyncFunction=function(){return Ir.Instance.isAsyncFunction(this.originalValue)},t.prototype.addToAsyncList=function(e){this.hasAsyncFunction()&&e.push(this)},t.prototype.isContentEqual=function(e){var t=e;return t.originalValue==this.originalValue&&this.areOperatorsEquals(t.parameters,this.parameters)},t}(Hr),Yr=function(){function e(){}return e.throwInvalidOperatorError=function(e){throw new Error("Invalid operator: '"+e+"'")},e.safeToString=function(e,t){return null==e?"":e.toString(t)},e.toOperandString=function(t){return!t||e.isNumeric(t)||e.isBooleanValue(t)||(t="'"+t+"'"),t},e.isSpaceString=function(e){return!!e&&!e.replace(" ","")},e.isNumeric=function(t){return(!t||!(t.indexOf("-")>-1||t.indexOf("+")>1||t.indexOf("*")>-1||t.indexOf("^")>-1||t.indexOf("/")>-1||t.indexOf("%")>-1))&&(!e.isSpaceString(t)&&cr.isNumber(t))},e.isBooleanValue=function(e){return!!e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())},e.countDecimals=function(e){if(cr.isNumber(e)&&Math.floor(e)!==e){var t=e.toString().split(".");return t.length>1&&t[1].length||0}return 0},e.plusMinus=function(t,n,r){var o=e.countDecimals(t),i=e.countDecimals(n);if(o>0||i>0){var s=Math.max(o,i);r=parseFloat(r.toFixed(s))}return r},e.isTwoValueEquals=function(e,t,n){return void 0===n&&(n=!0),"undefined"===e&&(e=void 0),"undefined"===t&&(t=void 0),cr.isTwoValueEquals(e,t,n)},e.operatorToString=function(t){var n=e.signs[t];return null==n?t:n},e.convertValForDateCompare=function(e,t){if(t instanceof Date&&"string"==typeof e){var n=new Date(e);return n.setHours(0,0,0),n}return e},e.unaryFunctions={empty:function(e){return cr.isValueEmpty(e)},notempty:function(t){return!e.unaryFunctions.empty(t)},negate:function(e){return!e}},e.binaryFunctions={arithmeticOp:function(t){var n=function(e,t){return cr.isValueEmpty(e)?"number"==typeof t?0:"string"==typeof e?e:"string"==typeof t?"":Array.isArray(t)?[]:0:e};return function(r,o){r=n(r,o),o=n(o,r);var i=e.binaryFunctions[t];return null==i?null:i.call(this,r,o)}},and:function(e,t){return e&&t},or:function(e,t){return e||t},plus:function(e,t){return cr.sumAnyValues(e,t)},minus:function(e,t){return cr.correctAfterPlusMinis(e,t,e-t)},mul:function(e,t){return cr.correctAfterMultiple(e,t,e*t)},div:function(e,t){return t?e/t:null},mod:function(e,t){return t?e%t:null},power:function(e,t){return Math.pow(e,t)},greater:function(t,n){return null!=t&&null!=n&&(t=e.convertValForDateCompare(t,n))>(n=e.convertValForDateCompare(n,t))},less:function(t,n){return null!=t&&null!=n&&(t=e.convertValForDateCompare(t,n))<(n=e.convertValForDateCompare(n,t))},greaterorequal:function(t,n){return!!e.binaryFunctions.equal(t,n)||e.binaryFunctions.greater(t,n)},lessorequal:function(t,n){return!!e.binaryFunctions.equal(t,n)||e.binaryFunctions.less(t,n)},equal:function(t,n,r){return t=e.convertValForDateCompare(t,n),n=e.convertValForDateCompare(n,t),e.isTwoValueEquals(t,n,!0!==r)},notequal:function(t,n,r){return!e.binaryFunctions.equal(t,n,r)},contains:function(t,n){return e.binaryFunctions.containsCore(t,n,!0)},notcontains:function(t,n){return!t&&!cr.isValueEmpty(n)||e.binaryFunctions.containsCore(t,n,!1)},anyof:function(t,n){if(cr.isValueEmpty(t)&&cr.isValueEmpty(n))return!0;if(cr.isValueEmpty(t)||!Array.isArray(t)&&0===t.length)return!1;if(cr.isValueEmpty(n))return!0;if(!Array.isArray(t))return e.binaryFunctions.contains(n,t);if(!Array.isArray(n))return e.binaryFunctions.contains(t,n);for(var r=0;r<n.length;r++)if(e.binaryFunctions.contains(t,n[r]))return!0;return!1},allof:function(t,n){if(!t&&!cr.isValueEmpty(n))return!1;if(!Array.isArray(n))return e.binaryFunctions.contains(t,n);for(var r=0;r<n.length;r++)if(!e.binaryFunctions.contains(t,n[r]))return!1;return!0},containsCore:function(t,n,r){if(!t&&0!==t&&!1!==t)return!1;if(t.length||(t=t.toString(),("string"==typeof n||n instanceof String)&&(t=t.toUpperCase(),n=n.toUpperCase())),"string"==typeof t||t instanceof String){if(!n)return!1;n=n.toString();var o=t.indexOf(n)>-1;return r?o:!o}for(var i=Array.isArray(n)?n:[n],s=0;s<i.length;s++){var a=0;for(n=i[s];a<t.length&&!e.isTwoValueEquals(t[a],n);a++);if(a==t.length)return!r}return r}},e.signs={less:"<",lessorequal:"<=",greater:">",greaterorequal:">=",equal:"==",notequal:"!=",plus:"+",minus:"-",mul:"*",div:"/",and:"and",or:"or",power:"^",mod:"%",negate:"!"},e}(),Zr=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$r=function(e){function t(n,r,o,i){var s=e.call(this)||this;return s.message=n,s.expected=r,s.found=o,s.location=i,s.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(s,t),s}return Zr(t,e),t.buildMessage=function(e,t){function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}function r(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function o(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function i(e){switch(e.type){case"literal":return'"'+r(e.text)+'"';case"class":var t=e.parts.map((function(e){return Array.isArray(e)?o(e[0])+"-"+o(e[1]):o(e)}));return"["+(e.inverted?"^":"")+t+"]";case"any":return"any character";case"end":return"end of input";case"other":return e.description}}return"Expected "+function(e){var t,n,r=e.map(i);if(r.sort(),r.length>0){for(t=1,n=1;t<r.length;t++)r[t-1]!==r[t]&&(r[n]=r[t],n++);r.length=n}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(e)+" but "+(((s=t)?'"'+r(s)+'"':"end of input")+" found.");var s},t}(Error);var Xr=function(e,t){t=void 0!==t?t:{};var n,r={},o={Expression:ze},i=ze,s=function(e,t){return ht(e,t,!0)},a=De("||",!1),u=De("or",!0),l=De("&&",!1),c=De("and",!0),p=function(e,t){return ht(e,t)},h=De("<=",!1),d=De("lessorequal",!0),f=De(">=",!1),y=De("greaterorequal",!0),m=De("==",!1),g=De("equal",!0),v=De("=",!1),b=De("!=",!1),C=De("notequal",!0),E=De("<",!1),q=De("less",!0),w=De(">",!1),O=De("greater",!0),P=De("+",!1),x=De("-",!1),S=De("*",!1),_=De("/",!1),N=De("%",!1),I=De("^",!1),V=De("power",!0),j=De("*=",!1),T=De("contains",!0),R=De("contain",!0),D=De("notcontains",!0),A=De("notcontain",!0),L=De("anyof",!0),k=De("allof",!0),M=De("(",!1),B=De(")",!1),F=De("!",!1),z=De("negate",!0),H=De("empty",!0),W=De("notempty",!0),U=De("undefined",!1),Q=De("null",!1),J=De("{",!1),K=De("}",!1),G=De("''",!1),Y=De('""',!1),Z=De("'",!1),$=function(e){return"'"+e+"'"},X=De('"',!1),ee=De("[",!1),te=De("]",!1),ne=De(",",!1),re=De("true",!0),oe=De("false",!0),ie=De("0x",!1),se=/^[\-]/,ae=Ae(["-"],!1,!1),ue=De(".",!1),le=De("0",!1),ce=function(e){return e.join("")},pe=De("\\'",!1),he=De('\\"',!1),de=/^[^"']/,fe=Ae(['"',"'"],!0,!1),ye=function(){return Re()},me=/^[^{}]/,ge=Ae(["{","}"],!0,!1),ve=/^[0-9]/,be=Ae([["0","9"]],!1,!1),Ce=/^[1-9]/,Ee=Ae([["1","9"]],!1,!1),qe=/^[a-zA-Z_]/,we=Ae([["a","z"],["A","Z"],"_"],!1,!1),Oe=Le("whitespace"),Pe=/^[ \t\n\r]/,xe=Ae([" ","\t","\n","\r"],!1,!1),Se=0,_e=0,Ne=[{line:1,column:1}],Ie=0,Ve=[],je=0,Te={};if(void 0!==t.startRule){if(!(t.startRule in o))throw new Error("Can't start parsing from rule \""+t.startRule+'".');i=o[t.startRule]}function Re(){return e.substring(_e,Se)}function De(e,t){return{type:"literal",text:e,ignoreCase:t}}function Ae(e,t,n){return{type:"class",parts:e,inverted:t,ignoreCase:n}}function Le(e){return{type:"other",description:e}}function ke(t){var n,r=Ne[t];if(r)return r;for(n=t-1;!Ne[n];)n--;for(r={line:(r=Ne[n]).line,column:r.column};n<t;)10===e.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return Ne[t]=r,r}function Me(e,t){var n=ke(e),r=ke(t);return{start:{offset:e,line:n.line,column:n.column},end:{offset:t,line:r.line,column:r.column}}}function Be(e){Se<Ie||(Se>Ie&&(Ie=Se,Ve=[]),Ve.push(e))}function Fe(e,t,n){return new $r($r.buildMessage(e,t),e,t,n)}function ze(){var e,t,n,o,i,a,u,l,c=34*Se+0,p=Te[c];if(p)return Se=p.nextPos,p.result;if(e=Se,pt()!==r)if((t=We())!==r){for(n=[],o=Se,(i=pt())!==r&&(a=He())!==r&&(u=pt())!==r&&(l=We())!==r?o=i=[i,a,u,l]:(Se=o,o=r);o!==r;)n.push(o),o=Se,(i=pt())!==r&&(a=He())!==r&&(u=pt())!==r&&(l=We())!==r?o=i=[i,a,u,l]:(Se=o,o=r);n!==r&&(o=pt())!==r?(_e=e,e=s(t,n)):(Se=e,e=r)}else Se=e,e=r;else Se=e,e=r;return Te[c]={nextPos:Se,result:e},e}function He(){var t,n,o=34*Se+1,i=Te[o];return i?(Se=i.nextPos,i.result):(t=Se,"||"===e.substr(Se,2)?(n="||",Se+=2):(n=r,0===je&&Be(a)),n===r&&("or"===e.substr(Se,2).toLowerCase()?(n=e.substr(Se,2),Se+=2):(n=r,0===je&&Be(u))),n!==r&&(_e=t,n="or"),t=n,Te[o]={nextPos:Se,result:t},t)}function We(){var e,t,n,o,i,a,u,l,c=34*Se+2,p=Te[c];if(p)return Se=p.nextPos,p.result;if(e=Se,(t=Qe())!==r){for(n=[],o=Se,(i=pt())!==r&&(a=Ue())!==r&&(u=pt())!==r&&(l=Qe())!==r?o=i=[i,a,u,l]:(Se=o,o=r);o!==r;)n.push(o),o=Se,(i=pt())!==r&&(a=Ue())!==r&&(u=pt())!==r&&(l=Qe())!==r?o=i=[i,a,u,l]:(Se=o,o=r);n!==r?(_e=e,e=t=s(t,n)):(Se=e,e=r)}else Se=e,e=r;return Te[c]={nextPos:Se,result:e},e}function Ue(){var t,n,o=34*Se+3,i=Te[o];return i?(Se=i.nextPos,i.result):(t=Se,"&&"===e.substr(Se,2)?(n="&&",Se+=2):(n=r,0===je&&Be(l)),n===r&&("and"===e.substr(Se,3).toLowerCase()?(n=e.substr(Se,3),Se+=3):(n=r,0===je&&Be(c))),n!==r&&(_e=t,n="and"),t=n,Te[o]={nextPos:Se,result:t},t)}function Qe(){var e,t,n,o,i,s,a,u,l=34*Se+4,c=Te[l];if(c)return Se=c.nextPos,c.result;if(e=Se,(t=Ke())!==r){for(n=[],o=Se,(i=pt())!==r&&(s=Je())!==r&&(a=pt())!==r&&(u=Ke())!==r?o=i=[i,s,a,u]:(Se=o,o=r);o!==r;)n.push(o),o=Se,(i=pt())!==r&&(s=Je())!==r&&(a=pt())!==r&&(u=Ke())!==r?o=i=[i,s,a,u]:(Se=o,o=r);n!==r?(_e=e,e=t=p(t,n)):(Se=e,e=r)}else Se=e,e=r;return Te[l]={nextPos:Se,result:e},e}function Je(){var t,n,o=34*Se+5,i=Te[o];return i?(Se=i.nextPos,i.result):(t=Se,"<="===e.substr(Se,2)?(n="<=",Se+=2):(n=r,0===je&&Be(h)),n===r&&("lessorequal"===e.substr(Se,11).toLowerCase()?(n=e.substr(Se,11),Se+=11):(n=r,0===je&&Be(d))),n!==r&&(_e=t,n="lessorequal"),(t=n)===r&&(t=Se,">="===e.substr(Se,2)?(n=">=",Se+=2):(n=r,0===je&&Be(f)),n===r&&("greaterorequal"===e.substr(Se,14).toLowerCase()?(n=e.substr(Se,14),Se+=14):(n=r,0===je&&Be(y))),n!==r&&(_e=t,n="greaterorequal"),(t=n)===r&&(t=Se,"=="===e.substr(Se,2)?(n="==",Se+=2):(n=r,0===je&&Be(m)),n===r&&("equal"===e.substr(Se,5).toLowerCase()?(n=e.substr(Se,5),Se+=5):(n=r,0===je&&Be(g))),n!==r&&(_e=t,n="equal"),(t=n)===r&&(t=Se,61===e.charCodeAt(Se)?(n="=",Se++):(n=r,0===je&&Be(v)),n===r&&("equal"===e.substr(Se,5).toLowerCase()?(n=e.substr(Se,5),Se+=5):(n=r,0===je&&Be(g))),n!==r&&(_e=t,n="equal"),(t=n)===r&&(t=Se,"!="===e.substr(Se,2)?(n="!=",Se+=2):(n=r,0===je&&Be(b)),n===r&&("notequal"===e.substr(Se,8).toLowerCase()?(n=e.substr(Se,8),Se+=8):(n=r,0===je&&Be(C))),n!==r&&(_e=t,n="notequal"),(t=n)===r&&(t=Se,60===e.charCodeAt(Se)?(n="<",Se++):(n=r,0===je&&Be(E)),n===r&&("less"===e.substr(Se,4).toLowerCase()?(n=e.substr(Se,4),Se+=4):(n=r,0===je&&Be(q))),n!==r&&(_e=t,n="less"),(t=n)===r&&(t=Se,62===e.charCodeAt(Se)?(n=">",Se++):(n=r,0===je&&Be(w)),n===r&&("greater"===e.substr(Se,7).toLowerCase()?(n=e.substr(Se,7),Se+=7):(n=r,0===je&&Be(O))),n!==r&&(_e=t,n="greater"),t=n)))))),Te[o]={nextPos:Se,result:t},t)}function Ke(){var e,t,n,o,i,a,u,l,c=34*Se+6,p=Te[c];if(p)return Se=p.nextPos,p.result;if(e=Se,(t=Ye())!==r){for(n=[],o=Se,(i=pt())!==r&&(a=Ge())!==r&&(u=pt())!==r&&(l=Ye())!==r?o=i=[i,a,u,l]:(Se=o,o=r);o!==r;)n.push(o),o=Se,(i=pt())!==r&&(a=Ge())!==r&&(u=pt())!==r&&(l=Ye())!==r?o=i=[i,a,u,l]:(Se=o,o=r);n!==r?(_e=e,e=t=s(t,n)):(Se=e,e=r)}else Se=e,e=r;return Te[c]={nextPos:Se,result:e},e}function Ge(){var t,n,o=34*Se+7,i=Te[o];return i?(Se=i.nextPos,i.result):(t=Se,43===e.charCodeAt(Se)?(n="+",Se++):(n=r,0===je&&Be(P)),n!==r&&(_e=t,n="plus"),(t=n)===r&&(t=Se,45===e.charCodeAt(Se)?(n="-",Se++):(n=r,0===je&&Be(x)),n!==r&&(_e=t,n="minus"),t=n),Te[o]={nextPos:Se,result:t},t)}function Ye(){var e,t,n,o,i,a,u,l,c=34*Se+8,p=Te[c];if(p)return Se=p.nextPos,p.result;if(e=Se,(t=$e())!==r){for(n=[],o=Se,(i=pt())!==r&&(a=Ze())!==r&&(u=pt())!==r&&(l=$e())!==r?o=i=[i,a,u,l]:(Se=o,o=r);o!==r;)n.push(o),o=Se,(i=pt())!==r&&(a=Ze())!==r&&(u=pt())!==r&&(l=$e())!==r?o=i=[i,a,u,l]:(Se=o,o=r);n!==r?(_e=e,e=t=s(t,n)):(Se=e,e=r)}else Se=e,e=r;return Te[c]={nextPos:Se,result:e},e}function Ze(){var t,n,o=34*Se+9,i=Te[o];return i?(Se=i.nextPos,i.result):(t=Se,42===e.charCodeAt(Se)?(n="*",Se++):(n=r,0===je&&Be(S)),n!==r&&(_e=t,n="mul"),(t=n)===r&&(t=Se,47===e.charCodeAt(Se)?(n="/",Se++):(n=r,0===je&&Be(_)),n!==r&&(_e=t,n="div"),(t=n)===r&&(t=Se,37===e.charCodeAt(Se)?(n="%",Se++):(n=r,0===je&&Be(N)),n!==r&&(_e=t,n="mod"),t=n)),Te[o]={nextPos:Se,result:t},t)}function $e(){var e,t,n,o,i,a,u,l,c=34*Se+10,p=Te[c];if(p)return Se=p.nextPos,p.result;if(e=Se,(t=et())!==r){for(n=[],o=Se,(i=pt())!==r&&(a=Xe())!==r&&(u=pt())!==r&&(l=et())!==r?o=i=[i,a,u,l]:(Se=o,o=r);o!==r;)n.push(o),o=Se,(i=pt())!==r&&(a=Xe())!==r&&(u=pt())!==r&&(l=et())!==r?o=i=[i,a,u,l]:(Se=o,o=r);n!==r?(_e=e,e=t=s(t,n)):(Se=e,e=r)}else Se=e,e=r;return Te[c]={nextPos:Se,result:e},e}function Xe(){var t,n,o=34*Se+11,i=Te[o];return i?(Se=i.nextPos,i.result):(t=Se,94===e.charCodeAt(Se)?(n="^",Se++):(n=r,0===je&&Be(I)),n===r&&("power"===e.substr(Se,5).toLowerCase()?(n=e.substr(Se,5),Se+=5):(n=r,0===je&&Be(V))),n!==r&&(_e=t,n="power"),t=n,Te[o]={nextPos:Se,result:t},t)}function et(){var e,t,n,o,i,s,a,u,l=34*Se+12,c=Te[l];if(c)return Se=c.nextPos,c.result;if(e=Se,(t=nt())!==r){for(n=[],o=Se,(i=pt())!==r&&(s=tt())!==r&&(a=pt())!==r?((u=nt())===r&&(u=null),u!==r?o=i=[i,s,a,u]:(Se=o,o=r)):(Se=o,o=r);o!==r;)n.push(o),o=Se,(i=pt())!==r&&(s=tt())!==r&&(a=pt())!==r?((u=nt())===r&&(u=null),u!==r?o=i=[i,s,a,u]:(Se=o,o=r)):(Se=o,o=r);n!==r?(_e=e,e=t=p(t,n)):(Se=e,e=r)}else Se=e,e=r;return Te[l]={nextPos:Se,result:e},e}function tt(){var t,n,o=34*Se+13,i=Te[o];return i?(Se=i.nextPos,i.result):(t=Se,"*="===e.substr(Se,2)?(n="*=",Se+=2):(n=r,0===je&&Be(j)),n===r&&("contains"===e.substr(Se,8).toLowerCase()?(n=e.substr(Se,8),Se+=8):(n=r,0===je&&Be(T)),n===r&&("contain"===e.substr(Se,7).toLowerCase()?(n=e.substr(Se,7),Se+=7):(n=r,0===je&&Be(R)))),n!==r&&(_e=t,n="contains"),(t=n)===r&&(t=Se,"notcontains"===e.substr(Se,11).toLowerCase()?(n=e.substr(Se,11),Se+=11):(n=r,0===je&&Be(D)),n===r&&("notcontain"===e.substr(Se,10).toLowerCase()?(n=e.substr(Se,10),Se+=10):(n=r,0===je&&Be(A))),n!==r&&(_e=t,n="notcontains"),(t=n)===r&&(t=Se,"anyof"===e.substr(Se,5).toLowerCase()?(n=e.substr(Se,5),Se+=5):(n=r,0===je&&Be(L)),n!==r&&(_e=t,n="anyof"),(t=n)===r&&(t=Se,"allof"===e.substr(Se,5).toLowerCase()?(n=e.substr(Se,5),Se+=5):(n=r,0===je&&Be(k)),n!==r&&(_e=t,n="allof"),t=n))),Te[o]={nextPos:Se,result:t},t)}function nt(){var t,n,o,i,s=34*Se+14,a=Te[s];return a?(Se=a.nextPos,a.result):(t=Se,40===e.charCodeAt(Se)?(n="(",Se++):(n=r,0===je&&Be(M)),n!==r&&pt()!==r&&(o=ze())!==r&&pt()!==r?(41===e.charCodeAt(Se)?(i=")",Se++):(i=r,0===je&&Be(B)),i===r&&(i=null),i!==r?(_e=t,t=n=o):(Se=t,t=r)):(Se=t,t=r),t===r&&(t=function(){var t,n,o,i,s,a=34*Se+15,u=Te[a];if(u)return Se=u.nextPos,u.result;t=Se,(n=ut())!==r?(40===e.charCodeAt(Se)?(o="(",Se++):(o=r,0===je&&Be(M)),o!==r&&(i=ot())!==r?(41===e.charCodeAt(Se)?(s=")",Se++):(s=r,0===je&&Be(B)),s===r&&(s=null),s!==r?(_e=t,n=new Gr(n,i),t=n):(Se=t,t=r)):(Se=t,t=r)):(Se=t,t=r);return Te[a]={nextPos:Se,result:t},t}())===r&&(t=function(){var t,n,o,i=34*Se+16,s=Te[i];if(s)return Se=s.nextPos,s.result;t=Se,33===e.charCodeAt(Se)?(n="!",Se++):(n=r,0===je&&Be(F));n===r&&("negate"===e.substr(Se,6).toLowerCase()?(n=e.substr(Se,6),Se+=6):(n=r,0===je&&Be(z)));n!==r&&pt()!==r&&(o=ze())!==r?(_e=t,n=new Ur(o,"negate"),t=n):(Se=t,t=r);t===r&&(t=Se,(n=rt())!==r&&pt()!==r&&(o=function(){var t,n,o=34*Se+17,i=Te[o];if(i)return Se=i.nextPos,i.result;t=Se,"empty"===e.substr(Se,5).toLowerCase()?(n=e.substr(Se,5),Se+=5):(n=r,0===je&&Be(H));n!==r&&(_e=t,n="empty");(t=n)===r&&(t=Se,"notempty"===e.substr(Se,8).toLowerCase()?(n=e.substr(Se,8),Se+=8):(n=r,0===je&&Be(W)),n!==r&&(_e=t,n="notempty"),t=n);return Te[o]={nextPos:Se,result:t},t}())!==r?(_e=t,n=function(e,t){return new Ur(e,t)}(n,o),t=n):(Se=t,t=r));return Te[i]={nextPos:Se,result:t},t}())===r&&(t=rt())===r&&(t=function(){var t,n,o,i,s=34*Se+20,a=Te[s];if(a)return Se=a.nextPos,a.result;t=Se,91===e.charCodeAt(Se)?(n="[",Se++):(n=r,0===je&&Be(ee));n!==r&&(o=ot())!==r?(93===e.charCodeAt(Se)?(i="]",Se++):(i=r,0===je&&Be(te)),i!==r?(_e=t,t=n=o):(Se=t,t=r)):(Se=t,t=r);return Te[s]={nextPos:Se,result:t},t}()),Te[s]={nextPos:Se,result:t},t)}function rt(){var t,n,o,i,s=34*Se+18,a=Te[s];return a?(Se=a.nextPos,a.result):(t=Se,pt()!==r?("undefined"===e.substr(Se,9)?(n="undefined",Se+=9):(n=r,0===je&&Be(U)),n===r&&("null"===e.substr(Se,4)?(n="null",Se+=4):(n=r,0===je&&Be(Q))),n!==r?(_e=t,t=null):(Se=t,t=r)):(Se=t,t=r),t===r&&(t=Se,pt()!==r&&(n=function(){var t,n,o,i,s=34*Se+19,a=Te[s];if(a)return Se=a.nextPos,a.result;t=Se,(n=function(){var t,n,o=34*Se+22,i=Te[o];if(i)return Se=i.nextPos,i.result;t=Se,"true"===e.substr(Se,4).toLowerCase()?(n=e.substr(Se,4),Se+=4):(n=r,0===je&&Be(re));n!==r&&(_e=t,n=!0);(t=n)===r&&(t=Se,"false"===e.substr(Se,5).toLowerCase()?(n=e.substr(Se,5),Se+=5):(n=r,0===je&&Be(oe)),n!==r&&(_e=t,n=!1),t=n);return Te[o]={nextPos:Se,result:t},t}())!==r&&(_e=t,n=n);(t=n)===r&&(t=Se,(n=function(){var t,n,o,i=34*Se+23,s=Te[i];if(s)return Se=s.nextPos,s.result;t=Se,"0x"===e.substr(Se,2)?(n="0x",Se+=2):(n=r,0===je&&Be(ie));n!==r&&(o=lt())!==r?(_e=t,n=parseInt(Re(),16),t=n):(Se=t,t=r);t===r&&(t=Se,se.test(e.charAt(Se))?(n=e.charAt(Se),Se++):(n=r,0===je&&Be(ae)),n===r&&(n=null),n!==r&&(o=function(){var t,n,o,i=34*Se+24,s=Te[i];if(s)return Se=s.nextPos,s.result;t=Se,(n=lt())!==r?(46===e.charCodeAt(Se)?(o=".",Se++):(o=r,0===je&&Be(ue)),o!==r&&lt()!==r?(_e=t,n=parseFloat(Re()),t=n):(Se=t,t=r)):(Se=t,t=r);t===r&&(t=Se,(n=function(){var t,n,o=34*Se+31,i=Te[o];if(i)return Se=i.nextPos,i.result;t=[],Ce.test(e.charAt(Se))?(n=e.charAt(Se),Se++):(n=r,0===je&&Be(Ee));if(n!==r)for(;n!==r;)t.push(n),Ce.test(e.charAt(Se))?(n=e.charAt(Se),Se++):(n=r,0===je&&Be(Ee));else t=r;return Te[o]={nextPos:Se,result:t},t}())!==r?((o=lt())===r&&(o=null),o!==r?(_e=t,n=parseInt(Re(),10),t=n):(Se=t,t=r)):(Se=t,t=r),t===r&&(t=Se,48===e.charCodeAt(Se)?(n="0",Se++):(n=r,0===je&&Be(le)),n!==r&&(_e=t,n=0),t=n));return Te[i]={nextPos:Se,result:t},t}())!==r?(_e=t,a=o,t=n=null==n?a:-a):(Se=t,t=r));var a;return Te[i]={nextPos:Se,result:t},t}())!==r&&(_e=t,n=n),(t=n)===r&&(t=Se,(n=ut())!==r&&(_e=t,n=n),(t=n)===r&&(t=Se,"''"===e.substr(Se,2)?(n="''",Se+=2):(n=r,0===je&&Be(G)),n!==r&&(_e=t,n=""),(t=n)===r&&(t=Se,'""'===e.substr(Se,2)?(n='""',Se+=2):(n=r,0===je&&Be(Y)),n!==r&&(_e=t,n=""),(t=n)===r&&(t=Se,39===e.charCodeAt(Se)?(n="'",Se++):(n=r,0===je&&Be(Z)),n!==r&&(o=it())!==r?(39===e.charCodeAt(Se)?(i="'",Se++):(i=r,0===je&&Be(Z)),i!==r?(_e=t,n=$(o),t=n):(Se=t,t=r)):(Se=t,t=r),t===r&&(t=Se,34===e.charCodeAt(Se)?(n='"',Se++):(n=r,0===je&&Be(X)),n!==r&&(o=it())!==r?(34===e.charCodeAt(Se)?(i='"',Se++):(i=r,0===je&&Be(X)),i!==r?(_e=t,n=$(o),t=n):(Se=t,t=r)):(Se=t,t=r)))))));return Te[s]={nextPos:Se,result:t},t}())!==r?(_e=t,t=new Jr(n)):(Se=t,t=r),t===r&&(t=Se,pt()!==r?(123===e.charCodeAt(Se)?(n="{",Se++):(n=r,0===je&&Be(J)),n!==r&&(o=function(){var e,t,n,o=34*Se+25,i=Te[o];if(i)return Se=i.nextPos,i.result;if(e=Se,t=[],(n=at())!==r)for(;n!==r;)t.push(n),n=at();else t=r;t!==r&&(_e=e,t=ce(t));return e=t,Te[o]={nextPos:Se,result:e},e}())!==r?(125===e.charCodeAt(Se)?(i="}",Se++):(i=r,0===je&&Be(K)),i!==r?(_e=t,t=function(e){return new Kr(e)}(o)):(Se=t,t=r)):(Se=t,t=r)):(Se=t,t=r))),Te[s]={nextPos:Se,result:t},t)}function ot(){var t,n,o,i,s,a,u,l,c=34*Se+21,p=Te[c];if(p)return Se=p.nextPos,p.result;if(t=Se,(n=ze())===r&&(n=null),n!==r){for(o=[],i=Se,(s=pt())!==r?(44===e.charCodeAt(Se)?(a=",",Se++):(a=r,0===je&&Be(ne)),a!==r&&(u=pt())!==r&&(l=ze())!==r?i=s=[s,a,u,l]:(Se=i,i=r)):(Se=i,i=r);i!==r;)o.push(i),i=Se,(s=pt())!==r?(44===e.charCodeAt(Se)?(a=",",Se++):(a=r,0===je&&Be(ne)),a!==r&&(u=pt())!==r&&(l=ze())!==r?i=s=[s,a,u,l]:(Se=i,i=r)):(Se=i,i=r);o!==r?(_e=t,t=n=function(e,t){if(null==e)return new Qr([]);var n=[e];if(Array.isArray(t))for(var r=function(e){return[].concat.apply([],e)}(t),o=3;o<r.length;o+=4)n.push(r[o]);return new Qr(n)}(n,o)):(Se=t,t=r)}else Se=t,t=r;return Te[c]={nextPos:Se,result:t},t}function it(){var e,t,n,o=34*Se+26,i=Te[o];if(i)return Se=i.nextPos,i.result;if(e=Se,t=[],(n=st())!==r)for(;n!==r;)t.push(n),n=st();else t=r;return t!==r&&(_e=e,t=ce(t)),e=t,Te[o]={nextPos:Se,result:e},e}function st(){var t,n,o=34*Se+27,i=Te[o];return i?(Se=i.nextPos,i.result):(t=Se,"\\'"===e.substr(Se,2)?(n="\\'",Se+=2):(n=r,0===je&&Be(pe)),n!==r&&(_e=t,n="'"),(t=n)===r&&(t=Se,'\\"'===e.substr(Se,2)?(n='\\"',Se+=2):(n=r,0===je&&Be(he)),n!==r&&(_e=t,n='"'),(t=n)===r&&(t=Se,de.test(e.charAt(Se))?(n=e.charAt(Se),Se++):(n=r,0===je&&Be(fe)),n!==r&&(_e=t,n=ye()),t=n)),Te[o]={nextPos:Se,result:t},t)}function at(){var t,n,o=34*Se+28,i=Te[o];return i?(Se=i.nextPos,i.result):(t=Se,me.test(e.charAt(Se))?(n=e.charAt(Se),Se++):(n=r,0===je&&Be(ge)),n!==r&&(_e=t,n=ye()),t=n,Te[o]={nextPos:Se,result:t},t)}function ut(){var e,t,n,o,i,s,a=34*Se+29,u=Te[a];if(u)return Se=u.nextPos,u.result;if(e=Se,ct()!==r){if(t=[],n=Se,(o=lt())!==r){for(i=[],s=ct();s!==r;)i.push(s),s=ct();i!==r?n=o=[o,i]:(Se=n,n=r)}else Se=n,n=r;for(;n!==r;)if(t.push(n),n=Se,(o=lt())!==r){for(i=[],s=ct();s!==r;)i.push(s),s=ct();i!==r?n=o=[o,i]:(Se=n,n=r)}else Se=n,n=r;t!==r?(_e=e,e=ye()):(Se=e,e=r)}else Se=e,e=r;return Te[a]={nextPos:Se,result:e},e}function lt(){var t,n,o=34*Se+30,i=Te[o];if(i)return Se=i.nextPos,i.result;if(t=[],ve.test(e.charAt(Se))?(n=e.charAt(Se),Se++):(n=r,0===je&&Be(be)),n!==r)for(;n!==r;)t.push(n),ve.test(e.charAt(Se))?(n=e.charAt(Se),Se++):(n=r,0===je&&Be(be));else t=r;return Te[o]={nextPos:Se,result:t},t}function ct(){var t,n,o=34*Se+32,i=Te[o];if(i)return Se=i.nextPos,i.result;if(t=[],qe.test(e.charAt(Se))?(n=e.charAt(Se),Se++):(n=r,0===je&&Be(we)),n!==r)for(;n!==r;)t.push(n),qe.test(e.charAt(Se))?(n=e.charAt(Se),Se++):(n=r,0===je&&Be(we));else t=r;return Te[o]={nextPos:Se,result:t},t}function pt(){var t,n,o=34*Se+33,i=Te[o];if(i)return Se=i.nextPos,i.result;for(je++,t=[],Pe.test(e.charAt(Se))?(n=e.charAt(Se),Se++):(n=r,0===je&&Be(xe));n!==r;)t.push(n),Pe.test(e.charAt(Se))?(n=e.charAt(Se),Se++):(n=r,0===je&&Be(xe));return je--,t===r&&(n=r,0===je&&Be(Oe)),Te[o]={nextPos:Se,result:t},t}function ht(e,t,n){return void 0===n&&(n=!1),t.reduce((function(e,t){return new Wr(t[1],e,t[3],n)}),e)}if((n=i())!==r&&Se===e.length)return n;throw n!==r&&Se<e.length&&Be({type:"end"}),Fe(Ve,Ie<e.length?e.charAt(Ie):null,Ie<e.length?Me(Ie,Ie+1):Me(Ie,Ie))},eo=function(e,t){this.at=e,this.code=t},to=function(){function e(){}return e.prototype.patchExpression=function(e){return e.replace(/=>/g,">=").replace(/=</g,"<=").replace(/<>/g,"!=").replace(/equals/g,"equal ").replace(/notequals/g,"notequal ")},e.prototype.createCondition=function(e){return this.parseExpression(e)},e.prototype.parseExpression=function(t){try{var n=e.parserCache[t];return void 0===n&&((n=Xr(this.patchExpression(t))).hasAsyncFunction()||(e.parserCache[t]=n)),n}catch(e){e instanceof $r&&(this.conditionError=new eo(e.location.start.offset,e.message))}},Object.defineProperty(e.prototype,"error",{get:function(){return this.conditionError},enumerable:!1,configurable:!0}),e.parserCache={},e}(),no=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ro=function(){function e(e){this.processValue=new _r,this.parser=new to,this.isAsyncValue=!1,this.hasFunctionValue=!1,this.setExpression(e)}return Object.defineProperty(e.prototype,"expression",{get:function(){return this.expressionValue},enumerable:!1,configurable:!0}),e.prototype.setExpression=function(e){this.expression!==e&&(this.expressionValue=e,this.operand=this.parser.parseExpression(e),this.hasFunctionValue=!!this.canRun()&&this.operand.hasFunction(),this.isAsyncValue=!!this.hasFunction()&&this.operand.hasAsyncFunction())},e.prototype.getVariables=function(){if(!this.operand)return[];var e=[];return this.operand.setVariables(e),e},e.prototype.hasFunction=function(){return this.hasFunctionValue},Object.defineProperty(e.prototype,"isAsync",{get:function(){return this.isAsyncValue},enumerable:!1,configurable:!0}),e.prototype.canRun=function(){return!!this.operand},e.prototype.run=function(e,t){var n=this;if(void 0===t&&(t=null),!this.operand)return this.expression&&Nr.warn("Invalid expression: "+this.expression),null;if(this.processValue.values=e,this.processValue.properties=t,!this.isAsync)return this.runValues();this.asyncFuncList=[],this.operand.addToAsyncList(this.asyncFuncList);for(var r=0;r<this.asyncFuncList.length;r++)this.asyncFuncList[r].onAsyncReady=function(){n.doAsyncFunctionReady()};for(r=0;r<this.asyncFuncList.length;r++)this.asyncFuncList[r].evaluateAsync(this.processValue);return!1},e.prototype.doAsyncFunctionReady=function(){for(var e=0;e<this.asyncFuncList.length;e++)if(!this.asyncFuncList[e].isReady)return;this.runValues()},e.prototype.runValues=function(){var e=this.operand.evaluate(this.processValue);return this.onComplete&&this.onComplete(e),e},e.createExpressionExecutor=function(t){return new e(t)},e}(),oo=function(){function e(t){this._id=e.IdCounter++,this.expression=t}return Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"expression",{get:function(){return this.expressionExecutor?this.expressionExecutor.expression:""},set:function(e){var t=this;this.expressionExecutor&&e===this.expression||(this.expressionExecutor=ro.createExpressionExecutor(e),this.expressionExecutor.onComplete=function(e){t.doOnComplete(e)},this.variables=void 0,this.containsFunc=void 0)},enumerable:!1,configurable:!0}),e.prototype.getVariables=function(){return void 0===this.variables&&(this.variables=this.expressionExecutor.getVariables()),this.variables},e.prototype.hasFunction=function(){return void 0===this.containsFunc&&(this.containsFunc=this.expressionExecutor.hasFunction()),this.containsFunc},Object.defineProperty(e.prototype,"isAsync",{get:function(){return this.expressionExecutor.isAsync},enumerable:!1,configurable:!0}),e.prototype.canRun=function(){return this.expressionExecutor.canRun()},e.prototype.runCore=function(e,t){return void 0===t&&(t=null),this.onBeforeAsyncRun&&this.isAsync&&this.onBeforeAsyncRun(this.id),this.expressionExecutor.run(e,t)},e.prototype.doOnComplete=function(e){this.onAfterAsyncRun&&this.isAsync&&this.onAfterAsyncRun(this.id)},e.IdCounter=1,e}(),io=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}no(t,e),t.prototype.run=function(e,t){return void 0===t&&(t=null),1==this.runCore(e,t)},t.prototype.doOnComplete=function(t){this.onRunComplete&&this.onRunComplete(1==t),e.prototype.doOnComplete.call(this,t)}}(oo),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return no(t,e),t.prototype.run=function(e,t){return void 0===t&&(t=null),this.runCore(e,t)},t.prototype.doOnComplete=function(t){this.onRunComplete&&this.onRunComplete(t),e.prototype.doOnComplete.call(this,t)},t}(oo)),so=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ao=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},uo=function(){function e(e){this.obj=e,this.properties=null,this.values=null}return e.prototype.getType=function(){return"bindings"},e.prototype.getNames=function(){var e=[];this.fillProperties();for(var t=0;t<this.properties.length;t++)this.properties[t].isVisible("",this.obj)&&e.push(this.properties[t].name);return e},e.prototype.getProperties=function(){var e=[];this.fillProperties();for(var t=0;t<this.properties.length;t++)e.push(this.properties[t]);return e},e.prototype.setBinding=function(e,t){this.values||(this.values={});var n=this.getJson();n!==t&&(t?this.values[e]=t:(delete this.values[e],0==Object.keys(this.values).length&&(this.values=null)),this.onChangedJSON(n))},e.prototype.clearBinding=function(e){this.setBinding(e,"")},e.prototype.isEmpty=function(){if(!this.values)return!0;for(var e in this.values)return!1;return!0},e.prototype.getValueNameByPropertyName=function(e){if(this.values)return this.values[e]},e.prototype.getPropertiesByValueName=function(e){if(!this.values)return[];var t=[];for(var n in this.values)this.values[n]==e&&t.push(n);return t},e.prototype.getJson=function(){if(!this.isEmpty()){var e={};for(var t in this.values)e[t]=this.values[t];return e}},e.prototype.setJson=function(e){var t=this.getJson();if(this.values=null,e)for(var n in this.values={},e)this.values[n]=e[n];this.onChangedJSON(t)},e.prototype.fillProperties=function(){if(null===this.properties){this.properties=[];for(var e=Sr.getPropertiesByObj(this.obj),t=0;t<e.length;t++)e[t].isBindable&&this.properties.push(e[t])}},e.prototype.onChangedJSON=function(e){this.obj&&this.obj.onBindingChanged(e,this.getJson())},e}(),lo=function(){function e(t,n,r){this.currentDependency=t,this.target=n,this.property=r,this.dependencies=[],this.id=""+ ++e.DependenciesCount}return e.prototype.addDependency=function(e,t){this.target===e&&this.property===t||this.dependencies.some((function(n){return n.obj===e&&n.prop===t}))||(this.dependencies.push({obj:e,prop:t,id:this.id}),e.registerPropertyChangedHandlers([t],this.currentDependency,this.id))},e.prototype.dispose=function(){this.dependencies.forEach((function(e){e.obj.unregisterPropertyChangedHandlers([e.prop],e.id)}))},e.DependenciesCount=0,e}(),co=(function(){function e(t){this._updater=t,this.dependencies=void 0,this.type=e.ComputedUpdaterType}Object.defineProperty(e.prototype,"updater",{get:function(){return this._updater},enumerable:!1,configurable:!0}),e.prototype.setDependencies=function(e){this.clearDependencies(),this.dependencies=e},e.prototype.getDependencies=function(){return this.dependencies},e.prototype.clearDependencies=function(){this.dependencies&&(this.dependencies.dispose(),this.dependencies=void 0)},e.prototype.dispose=function(){this.clearDependencies()},e.ComputedUpdaterType="__dependency_computed"}(),function(){function e(){this.dependencies={},this.propertyHash=e.createPropertiesHash(),this.eventList=[],this.isLoadingFromJsonValue=!1,this.loadingOwner=null,this.onPropertyChanged=this.addEvent(),this.onItemValuePropertyChanged=this.addEvent(),this.isCreating=!0,this.bindingsValue=new uo(this),yr.createProperties(this),this.onBaseCreating(),this.isCreating=!1}e.finishCollectDependencies=function(){var t=e.currentDependencis;return e.currentDependencis=void 0,t},e.startCollectDependencies=function(t,n,r){if(void 0!==e.currentDependencis)throw new Error("Attempt to collect nested dependencies. Nested dependencies are not supported.");e.currentDependencis=new lo(t,n,r)},e.collectDependency=function(t,n){void 0!==e.currentDependencis&&e.currentDependencis.addDependency(t,n)},Object.defineProperty(e,"commentSuffix",{get:function(){return lr.commentSuffix},set:function(e){lr.commentSuffix=e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"commentPrefix",{get:function(){return e.commentSuffix},set:function(t){e.commentSuffix=t},enumerable:!1,configurable:!0}),e.prototype.isValueEmpty=function(e,t){return void 0===t&&(t=!0),t&&(e=this.trimValue(e)),cr.isValueEmpty(e)},e.prototype.trimValue=function(e){return e&&("string"==typeof e||e instanceof String)?e.trim():e},e.prototype.isPropertyEmpty=function(e){return""!==e&&this.isValueEmpty(e)},e.createPropertiesHash=function(){return{}},e.prototype.dispose=function(){for(var e=this,t=0;t<this.eventList.length;t++)this.eventList[t].clear();this.onPropertyValueChangedCallback=void 0,this.isDisposedValue=!0,Object.keys(this.dependencies).forEach((function(t){return e.dependencies[t].dispose()}))},Object.defineProperty(e.prototype,"isDisposed",{get:function(){return!0===this.isDisposedValue},enumerable:!1,configurable:!0}),e.prototype.addEvent=function(){var e=new po;return this.eventList.push(e),e},e.prototype.onBaseCreating=function(){},e.prototype.getType=function(){return"base"},e.prototype.isDescendantOf=function(e){return Sr.isDescendantOf(this.getType(),e)},e.prototype.getSurvey=function(e){return void 0===e&&(e=!1),null},Object.defineProperty(e.prototype,"isDesignMode",{get:function(){var e=this.getSurvey();return!!e&&e.isDesignMode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDesignModeV2",{get:function(){return lr.supportCreatorV2&&this.isDesignMode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"inSurvey",{get:function(){return!!this.getSurvey(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bindings",{get:function(){return this.bindingsValue},enumerable:!1,configurable:!0}),e.prototype.checkBindings=function(e,t){},e.prototype.updateBindings=function(e,t){var n=this.bindings.getValueNameByPropertyName(e);n&&this.updateBindingValue(n,t)},e.prototype.updateBindingValue=function(e,t){},e.prototype.getTemplate=function(){return this.getType()},Object.defineProperty(e.prototype,"isLoadingFromJson",{get:function(){return this.isLoadingFromJsonValue||this.getIsLoadingFromJson()},enumerable:!1,configurable:!0}),e.prototype.getIsLoadingFromJson=function(){return!(!this.loadingOwner||!this.loadingOwner.isLoadingFromJson)||this.isLoadingFromJsonValue},e.prototype.startLoadingFromJson=function(e){this.isLoadingFromJsonValue=!0,this.jsonObj=e},e.prototype.endLoadingFromJson=function(){this.isLoadingFromJsonValue=!1},e.prototype.toJSON=function(){return(new xr).toJsonObject(this)},e.prototype.fromJSON=function(e,t){(new xr).toObject(e,this,t),this.onSurveyLoad()},e.prototype.onSurveyLoad=function(){},e.prototype.clone=function(){var e=Sr.createClass(this.getType());return e.fromJSON(this.toJSON()),e},e.prototype.getPropertyByName=function(e){var t=this.getType();return this.classMetaData&&this.classMetaData.name===t||(this.classMetaData=Sr.findClass(t)),this.classMetaData?this.classMetaData.findProperty(e):null},e.prototype.isPropertyVisible=function(e){var t=this.getPropertyByName(e);return!!t&&t.isVisible("",this)},e.createProgressInfo=function(){return{questionCount:0,answeredQuestionCount:0,requiredQuestionCount:0,requiredAnsweredQuestionCount:0}},e.prototype.getProgressInfo=function(){return e.createProgressInfo()},e.prototype.localeChanged=function(){},e.prototype.locStrsChanged=function(){if(this.arraysInfo)for(var t in this.arraysInfo){if((r=this.arraysInfo[t])&&r.isItemValues){var n=this.getPropertyValue(t);n&&e.itemValueLocStrChanged&&e.itemValueLocStrChanged(n)}}if(this.localizableStrings)for(var t in this.localizableStrings){var r;(r=this.getLocalizableString(t))&&r.strChanged()}},e.prototype.getPropertyValue=function(e,t){void 0===t&&(t=null);var n=this.getPropertyValueWithoutDefault(e);if(this.isPropertyEmpty(n)){var r=this.localizableStrings?this.localizableStrings[e]:void 0;if(r)return r.text;if(null!=t)return t;var o=this.getDefaultPropertyValue(e);if(void 0!==o)return o}return n},e.prototype.getDefaultPropertyValue=function(e){var t=this.getPropertyByName(e);if(!(!t||t.isCustom&&this.isCreating)){var n=t.defaultValue;if(!this.isPropertyEmpty(n)&&!Array.isArray(n))return n;var r=this.localizableStrings?this.localizableStrings[e]:void 0;return r&&r.localizationName?this.getLocalizationString(r.localizationName):"boolean"!=t.type&&"switch"!=t.type&&(t.isCustom&&t.onGetValue?t.onGetValue(this):void 0)}},e.prototype.hasDefaultPropertyValue=function(e){return void 0!==this.getDefaultPropertyValue(e)},e.prototype.resetPropertyValue=function(e){var t=this.localizableStrings?this.localizableStrings[e]:void 0;t?(this.setLocalizableStringText(e,void 0),t.clear()):this.setPropertyValue(e,void 0)},e.prototype.getPropertyValueWithoutDefault=function(e){return this.getPropertyValueCore(this.propertyHash,e)},e.prototype.getPropertyValueCore=function(t,n){return this.isLoadingFromJson||e.collectDependency(this,n),this.getPropertyValueCoreHandler?this.getPropertyValueCoreHandler(t,n):t[n]},e.prototype.geValueFromHash=function(){return this.propertyHash.value},e.prototype.setPropertyValueCore=function(e,t,n){this.setPropertyValueCoreHandler?this.isDisposedValue?Nr.disposedObjectChangedProperty(t,this.getType()):this.setPropertyValueCoreHandler(e,t,n):e[t]=n},Object.defineProperty(e.prototype,"isEditingSurveyElement",{get:function(){var e=this.getSurvey();return!!e&&e.isEditingSurveyElement},enumerable:!1,configurable:!0}),e.prototype.iteratePropertiesHash=function(e){var t=this,n=[];for(var r in this.propertyHash)"value"===r&&this.isEditingSurveyElement&&Array.isArray(this.value)||n.push(r);n.forEach((function(n){return e(t.propertyHash,n)}))},e.prototype.setPropertyValue=function(e,t){if(!this.isLoadingFromJson){var n=this.getPropertyByName(e);n&&(t=n.settingValue(this,t))}var r=this.getPropertyValue(e);r&&Array.isArray(r)&&this.arraysInfo&&(!t||Array.isArray(t))?this.isTwoValueEquals(r,t)||this.setArrayPropertyDirectly(e,t):(this.setPropertyValueDirectly(e,t),this.isDisposedValue||this.isTwoValueEquals(r,t)||this.propertyValueChanged(e,r,t))},e.prototype.setArrayPropertyDirectly=function(e,t,n){void 0===n&&(n=!0);var r=this.arraysInfo[e];this.setArray(e,this.getPropertyValue(e),t,!!r&&r.isItemValues,r?n&&r.onPush:null)},e.prototype.setPropertyValueDirectly=function(e,t){this.setPropertyValueCore(this.propertyHash,e,t)},e.prototype.clearPropertyValue=function(e){this.setPropertyValueCore(this.propertyHash,e,null),delete this.propertyHash[e]},e.prototype.onPropertyValueChangedCallback=function(e,t,n,r,o){},e.prototype.itemValuePropertyChanged=function(e,t,n,r){this.onItemValuePropertyChanged.fire(this,{obj:e,name:t,oldValue:n,newValue:r,propertyName:e.ownerPropertyName})},e.prototype.onPropertyValueChanged=function(e,t,n){},e.prototype.propertyValueChanged=function(e,t,n,r,o){if(!this.isLoadingFromJson&&(this.updateBindings(e,n),this.onPropertyValueChanged(e,t,n),this.onPropertyChanged.fire(this,{name:e,oldValue:t,newValue:n}),this.doPropertyValueChangedCallback(e,t,n,r,this),this.checkConditionPropertyChanged(e),this.onPropChangeFunctions))for(var i=0;i<this.onPropChangeFunctions.length;i++)this.onPropChangeFunctions[i].name==e&&this.onPropChangeFunctions[i].func(n)},e.prototype.onBindingChanged=function(e,t){this.isLoadingFromJson||this.doPropertyValueChangedCallback("bindings",e,t)},Object.defineProperty(e.prototype,"isInternal",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.doPropertyValueChangedCallback=function(e,t,n,r,o){if(!this.isInternal){o||(o=this);var i=this.getSurvey();i||(i=this),i.onPropertyValueChangedCallback&&i.onPropertyValueChangedCallback(e,t,n,o,r),i!==this&&this.onPropertyValueChangedCallback&&this.onPropertyValueChangedCallback(e,t,n,o,r)}},e.prototype.addExpressionProperty=function(e,t,n){this.expressionInfo||(this.expressionInfo={}),this.expressionInfo[e]={onExecute:t,canRun:n}},e.prototype.getDataFilteredValues=function(){return{}},e.prototype.getDataFilteredProperties=function(){return{}},e.prototype.runConditionCore=function(e,t){if(this.expressionInfo)for(var n in this.expressionInfo)this.runConditionItemCore(n,e,t)},e.prototype.canRunConditions=function(){return!this.isDesignMode},e.prototype.checkConditionPropertyChanged=function(e){this.expressionInfo&&this.expressionInfo[e]&&this.canRunConditions()&&this.runConditionItemCore(e,this.getDataFilteredValues(),this.getDataFilteredProperties())},e.prototype.runConditionItemCore=function(e,t,n){var r=this,o=this.expressionInfo[e],i=this.getPropertyValue(e);i&&(o.canRun&&!o.canRun(this)||(o.runner||(o.runner=this.createExpressionRunner(i),o.runner.onRunComplete=function(e){o.onExecute(r,e)}),o.runner.expression=i,o.runner.run(t,n)))},e.prototype.doBeforeAsynRun=function(e){this.asynExpressionHash||(this.asynExpressionHash=[]);var t=!this.isAsyncExpressionRunning;this.asynExpressionHash[e]=!0,t&&this.onAsyncRunningChanged()},e.prototype.doAfterAsynRun=function(e){this.asynExpressionHash&&(delete this.asynExpressionHash[e],this.isAsyncExpressionRunning||this.onAsyncRunningChanged())},e.prototype.onAsyncRunningChanged=function(){},Object.defineProperty(e.prototype,"isAsyncExpressionRunning",{get:function(){return!!this.asynExpressionHash&&Object.keys(this.asynExpressionHash).length>0},enumerable:!1,configurable:!0}),e.prototype.createExpressionRunner=function(e){var t=this,n=new io(e);return n.onBeforeAsyncRun=function(e){t.doBeforeAsynRun(e)},n.onAfterAsyncRun=function(e){t.doAfterAsynRun(e)},n},e.prototype.registerPropertyChangedHandlers=function(e,t,n){void 0===n&&(n=null);for(var r=0;r<e.length;r++)this.registerFunctionOnPropertyValueChanged(e[r],t,n)},e.prototype.unregisterPropertyChangedHandlers=function(e,t){void 0===t&&(t=null);for(var n=0;n<e.length;n++)this.unRegisterFunctionOnPropertyValueChanged(e[n],t)},e.prototype.registerFunctionOnPropertyValueChanged=function(e,t,n){if(void 0===n&&(n=null),this.onPropChangeFunctions||(this.onPropChangeFunctions=[]),n)for(var r=0;r<this.onPropChangeFunctions.length;r++){var o=this.onPropChangeFunctions[r];if(o.name==e&&o.key==n)return void(o.func=t)}this.onPropChangeFunctions.push({name:e,func:t,key:n})},e.prototype.registerFunctionOnPropertiesValueChanged=function(e,t,n){void 0===n&&(n=null),this.registerPropertyChangedHandlers(e,t,n)},e.prototype.unRegisterFunctionOnPropertyValueChanged=function(e,t){if(void 0===t&&(t=null),this.onPropChangeFunctions)for(var n=0;n<this.onPropChangeFunctions.length;n++){var r=this.onPropChangeFunctions[n];if(r.name==e&&r.key==t)return void this.onPropChangeFunctions.splice(n,1)}},e.prototype.unRegisterFunctionOnPropertiesValueChanged=function(e,t){void 0===t&&(t=null),this.unregisterPropertyChangedHandlers(e,t)},e.prototype.createCustomLocalizableObj=function(e){var t=this.getLocalizableString(e);return t||this.createLocalizableString(e,this,!1,!0)},e.prototype.getLocale=function(){var e=this.getSurvey();return e?e.getLocale():""},e.prototype.getLocalizationString=function(e){return hr.getString(e,this.getLocale())},e.prototype.getLocalizationFormatString=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.getLocalizationString(e);return r&&r.format?r.format.apply(r,t):""},e.prototype.createLocalizableString=function(e,t,n,r){var o=this;void 0===n&&(n=!1),void 0===r&&(r=!1);var i=new ho(t,n,e);r&&(i.localizationName=!0===r?e:r),i.onStrChanged=function(t,n){o.propertyValueChanged(e,t,n)},this.localizableStrings||(this.localizableStrings={}),this.localizableStrings[e]=i;var s=this.getPropertyByName(e);return i.disableLocalization=s&&!1===s.isLocalizable,i},e.prototype.getLocalizableString=function(e){return this.localizableStrings?this.localizableStrings[e]:null},e.prototype.getLocalizableStringText=function(t,n){void 0===n&&(n=""),e.collectDependency(this,t);var r=this.getLocalizableString(t);if(!r)return"";var o=r.text;return o||n},e.prototype.setLocalizableStringText=function(e,t){var n=this.getLocalizableString(e);n&&(n.text!=t&&(n.text=t))},e.prototype.addUsedLocales=function(e){if(this.localizableStrings)for(var t in this.localizableStrings){(o=this.getLocalizableString(t))&&this.AddLocStringToUsedLocales(o,e)}if(this.arraysInfo)for(var t in this.arraysInfo){var n=this.getPropertyValue(t);if(n&&n.length)for(var r=0;r<n.length;r++){var o;(o=n[r])&&o.addUsedLocales&&o.addUsedLocales(e)}}},e.prototype.searchText=function(e,t){var n=[];this.getSearchableLocalizedStrings(n);for(var r=0;r<n.length;r++)n[r].setFindText(e)&&t.push({element:this,str:n[r]})},e.prototype.getSearchableLocalizedStrings=function(e){if(this.localizableStrings){var t=[];this.getSearchableLocKeys(t);for(var n=0;n<t.length;n++){var r=this.getLocalizableString(t[n]);r&&e.push(r)}}if(this.arraysInfo){var o=[];this.getSearchableItemValueKeys(o);for(n=0;n<o.length;n++){var i=this.getPropertyValue(o[n]);if(i)for(var s=0;s<i.length;s++)e.push(i[s].locText)}}},e.prototype.getSearchableLocKeys=function(e){},e.prototype.getSearchableItemValueKeys=function(e){},e.prototype.AddLocStringToUsedLocales=function(e,t){for(var n=e.getLocales(),r=0;r<n.length;r++)t.indexOf(n[r])<0&&t.push(n[r])},e.prototype.createItemValues=function(e){var t=this,n=this.createNewArray(e,(function(n){if(n.locOwner=t,n.ownerPropertyName=e,"function"==typeof n.getSurvey){var r=n.getSurvey();r&&"function"==typeof r.makeReactive&&r.makeReactive(n)}}));return this.arraysInfo[e].isItemValues=!0,n},e.prototype.notifyArrayChanged=function(e,t){e.onArrayChanged&&e.onArrayChanged(t)},e.prototype.createNewArrayCore=function(e){var t=null;return this.createArrayCoreHandler&&(t=this.createArrayCoreHandler(this.propertyHash,e)),t||(t=new Array,this.setPropertyValueCore(this.propertyHash,e,t)),t},e.prototype.ensureArray=function(e,t,n){if(void 0===t&&(t=null),void 0===n&&(n=null),!this.arraysInfo||!this.arraysInfo[e])return this.createNewArray(e,t,n)},e.prototype.createNewArray=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null);var r=this.createNewArrayCore(e);this.arraysInfo||(this.arraysInfo={}),this.arraysInfo[e]={onPush:t,isItemValues:!1};var o=this;return r.push=function(n){var i=Object.getPrototypeOf(r).push.call(r,n);if(!o.isDisposedValue){t&&t(n,r.length-1);var s=new co(r.length-1,0,[n],[]);o.propertyValueChanged(e,r,r,s),o.notifyArrayChanged(r,s)}return i},r.shift=function(){var t=Object.getPrototypeOf(r).shift.call(r);if(!o.isDisposedValue&&t){n&&n(t);var i=new co(r.length-1,1,[],[]);o.propertyValueChanged(e,r,r,i),o.notifyArrayChanged(r,i)}return t},r.unshift=function(n){var i=Object.getPrototypeOf(r).unshift.call(r,n);if(!o.isDisposedValue){t&&t(n,r.length-1);var s=new co(0,0,[n],[]);o.propertyValueChanged(e,r,r,s),o.notifyArrayChanged(r,s)}return i},r.pop=function(){var t=Object.getPrototypeOf(r).pop.call(r);if(!o.isDisposedValue){n&&n(t);var i=new co(r.length-1,1,[],[]);o.propertyValueChanged(e,r,r,i),o.notifyArrayChanged(r,i)}return t},r.splice=function(i,s){for(var a,u=[],l=2;l<arguments.length;l++)u[l-2]=arguments[l];i||(i=0),s||(s=0);var c=(a=Object.getPrototypeOf(r).splice).call.apply(a,ao([r,i,s],u));if(u||(u=[]),!o.isDisposedValue){if(n&&c)for(var p=0;p<c.length;p++)n(c[p]);if(t)for(p=0;p<u.length;p++)t(u[p],i+p);var h=new co(i,s,u,c);o.propertyValueChanged(e,r,r,h),o.notifyArrayChanged(r,h)}return c},r},e.prototype.getItemValueType=function(){},e.prototype.setArray=function(t,n,r,o,i){var s=[].concat(n);if(Object.getPrototypeOf(n).splice.call(n,0,n.length),r)for(var a=0;a<r.length;a++){var u=r[a];o&&e.createItemValue&&(u=e.createItemValue(u,this.getItemValueType())),Object.getPrototypeOf(n).push.call(n,u),i&&i(n[a])}var l=new co(0,s.length,n,s);this.propertyValueChanged(t,s,n,l),this.notifyArrayChanged(n,l)},e.prototype.isTwoValueEquals=function(e,t,n,r){return void 0===n&&(n=!1),void 0===r&&(r=!1),cr.isTwoValueEquals(e,t,!1,!n,r)},e.copyObject=function(e,t){for(var n in t){var r=t[n];"object"==typeof r&&(r={},this.copyObject(r,t[n])),e[n]=r}},e.prototype.copyCssClasses=function(t,n){n&&("string"==typeof n||n instanceof String?t.root=n:e.copyObject(t,n))},e.prototype.getValueInLowCase=function(e){return e&&"string"==typeof e?e.toLowerCase():e},e.prototype.getElementsInDesign=function(e){return void 0===e&&(e=!1),[]},e.currentDependencis=void 0}(),function(e,t,n,r){this.index=e,this.deleteCount=t,this.itemsToAdd=n,this.deletedItems=r}),po=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return so(t,e),t}(function(){function e(){}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0===this.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this.callbacks?this.callbacks.length:0},enumerable:!1,configurable:!0}),e.prototype.fireByCreatingOptions=function(e,t){if(this.callbacks)for(var n=0;n<this.callbacks.length;n++)if(this.callbacks[n](e,t()),!this.callbacks)return},e.prototype.fire=function(e,t){if(this.callbacks)for(var n=0;n<this.callbacks.length;n++)if(this.callbacks[n](e,t),!this.callbacks)return},e.prototype.clear=function(){this.callbacks=void 0},e.prototype.add=function(e){this.hasFunc(e)||(this.callbacks||(this.callbacks=new Array),this.callbacks.push(e),this.fireCallbackChanged())},e.prototype.remove=function(e){if(this.hasFunc(e)){var t=this.callbacks.indexOf(e,0);this.callbacks.splice(t,1),this.fireCallbackChanged()}},e.prototype.hasFunc=function(e){return null!=this.callbacks&&this.callbacks.indexOf(e,0)>-1},e.prototype.fireCallbackChanged=function(){this.onCallbacksChanged&&this.onCallbacksChanged()},e}()),ho=function(){function e(e,t,n){void 0===t&&(t=!1),this.owner=e,this.useMarkdown=t,this.name=n,this.values={},this.htmlValues={},this.onStringChanged=new po,this.onCreating()}return Object.defineProperty(e,"defaultLocale",{get:function(){return lr.localization.defaultLocaleName},set:function(e){lr.localization.defaultLocaleName=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localizationName",{get:function(){return this._localizationName},set:function(e){this._localizationName!=e&&(this._localizationName=e,this.strChanged())},enumerable:!1,configurable:!0}),e.prototype.getIsMultiple=function(){return!1},Object.defineProperty(e.prototype,"locale",{get:function(){if(this.owner&&this.owner.getLocale){var e=this.owner.getLocale();if(e||!this.sharedData)return e}return this.sharedData?this.sharedData.locale:""},enumerable:!1,configurable:!0}),e.prototype.strChanged=function(){this.searchableText=void 0,void 0!==this.renderedText&&(this.calculatedTextValue=this.calcText(),this.renderedText!==this.calculatedTextValue&&(this.renderedText=void 0,this.calculatedTextValue=void 0),this.htmlValues={},this.onChanged(),this.onStringChanged.fire(this,{}))},Object.defineProperty(e.prototype,"text",{get:function(){return this.pureText},set:function(e){this.setLocaleText(this.locale,e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"calculatedText",{get:function(){return this.renderedText=void 0!==this.calculatedTextValue?this.calculatedTextValue:this.calcText(),this.calculatedTextValue=void 0,this.renderedText},enumerable:!1,configurable:!0}),e.prototype.calcText=function(){var e=this.pureText;return e&&this.owner&&this.owner.getProcessedText&&e.indexOf("{")>-1&&(e=this.owner.getProcessedText(e)),this.onGetTextCallback&&(e=this.onGetTextCallback(e)),e},Object.defineProperty(e.prototype,"pureText",{get:function(){var e=this.locale;e||(e=this.defaultLoc);var t=this.getValue(e);if(this.isValueEmpty(t)&&e===this.defaultLoc&&(t=this.getValue(hr.defaultLocale)),this.isValueEmpty(t)){var n=this.getRootDialect(e);n&&(t=this.getValue(n))}return this.isValueEmpty(t)&&e!==this.defaultLoc&&(t=this.getValue(this.defaultLoc)),this.isValueEmpty(t)&&this.getLocalizationName()&&(t=this.getLocalizationStr(),this.onGetLocalizationTextCallback&&(t=this.onGetLocalizationTextCallback(t))),t||(t=this.defaultValue||""),t},enumerable:!1,configurable:!0}),e.prototype.getRootDialect=function(e){if(!e)return e;var t=e.indexOf("-");return t>-1?e.substring(0,t):""},e.prototype.getLocalizationName=function(){return this.sharedData?this.sharedData.localizationName:this.localizationName},e.prototype.getLocalizationStr=function(){var e=this.getLocalizationName();return e?hr.getString(e,this.locale):""},Object.defineProperty(e.prototype,"hasHtml",{get:function(){return this.hasHtmlValue()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"html",{get:function(){return this.hasHtml?this.getHtmlValue():""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0==this.getValuesKeys().length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textOrHtml",{get:function(){return this.hasHtml?this.getHtmlValue():this.calculatedText},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderedHtml",{get:function(){return this.textOrHtml},enumerable:!1,configurable:!0}),e.prototype.getLocaleText=function(e){var t=this.getLocaleTextCore(e);return t||""},e.prototype.getLocaleTextCore=function(e){return e||(e=this.defaultLoc),this.getValue(e)},e.prototype.isLocaleTextEqualsWithDefault=function(e,t){var n=this.getLocaleTextCore(e);return n===t||this.isValueEmpty(n)&&this.isValueEmpty(t)},e.prototype.clear=function(){this.setJson(void 0)},e.prototype.clearLocale=function(e){this.setLocaleText(e,void 0)},e.prototype.setLocaleText=function(e,t){if(e=this.getValueLoc(e),this.storeDefaultText||!this.isLocaleTextEqualsWithDefault(e,t)){if(lr.localization.storeDuplicatedTranslations||this.isValueEmpty(t)||!e||e==this.defaultLoc||this.getValue(e)||t!=this.getLocaleText(this.defaultLoc)){var n=this.curLocale;e||(e=this.defaultLoc);var r=this.onStrChanged&&e===n?this.pureText:void 0;delete this.htmlValues[e],this.isValueEmpty(t)?this.deleteValue(e):"string"==typeof t&&(this.canRemoveLocValue(e,t)?this.setLocaleText(e,null):(this.setValue(e,t),e==this.defaultLoc&&this.deleteValuesEqualsToDefault(t))),this.fireStrChanged(e,r)}}else{if(!this.isValueEmpty(t)||e&&e!==this.defaultLoc)return;var o=hr.defaultLocale,i=this.getValue(o);o&&!this.isValueEmpty(i)&&(this.setValue(o,t),this.fireStrChanged(o,i))}},e.prototype.isValueEmpty=function(e){return null==e||!this.localizationName&&""===e},Object.defineProperty(e.prototype,"curLocale",{get:function(){return this.locale?this.locale:this.defaultLoc},enumerable:!1,configurable:!0}),e.prototype.canRemoveLocValue=function(e,t){if(lr.localization.storeDuplicatedTranslations)return!1;if(e===this.defaultLoc)return!1;var n=this.getRootDialect(e);if(n){var r=this.getLocaleText(n);return r?r==t:this.canRemoveLocValue(n,t)}return t==this.getLocaleText(this.defaultLoc)},e.prototype.fireStrChanged=function(e,t){if(this.strChanged(),this.onStrChanged){var n=this.pureText;e===this.curLocale&&t===n||this.onStrChanged(t,n)}},e.prototype.hasNonDefaultText=function(){var e=this.getValuesKeys();return 0!=e.length&&(e.length>1||e[0]!=this.defaultLoc)},e.prototype.getLocales=function(){var e=this.getValuesKeys();return 0==e.length?[]:e},e.prototype.getJson=function(){if(this.sharedData)return this.sharedData.getJson();var e=this.getValuesKeys();return 0==e.length?null:1!=e.length||e[0]!=lr.localization.defaultLocaleName||lr.serialization.localizableStringSerializeAsObject?this.values:this.values[e[0]]},e.prototype.setJson=function(e){if(this.sharedData)this.sharedData.setJson(e);else if(this.values={},this.htmlValues={},null!=e){if("string"==typeof e)this.setLocaleText(null,e);else for(var t in e)this.setLocaleText(t,e[t]);this.strChanged()}},Object.defineProperty(e.prototype,"renderAs",{get:function(){return this.owner&&"function"==typeof this.owner.getRenderer&&this.owner.getRenderer(this.name)||e.defaultRenderer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderAsData",{get:function(){return this.owner&&"function"==typeof this.owner.getRendererContext&&this.owner.getRendererContext(this)||this},enumerable:!1,configurable:!0}),e.prototype.equals=function(e){return this.sharedData?this.sharedData.equals(e):!(!e||!e.values)&&cr.isTwoValueEquals(this.values,e.values,!1,!0,!1)},e.prototype.setFindText=function(e){if(this.searchText!=e){if(this.searchText=e,!this.searchableText){var t=this.textOrHtml;this.searchableText=t?t.toLowerCase():""}var n=this.searchableText,r=n&&e?n.indexOf(e):void 0;return r<0&&(r=void 0),null==r&&this.searchIndex==r||(this.searchIndex=r,this.onSearchChanged&&this.onSearchChanged()),null!=this.searchIndex}},e.prototype.onChanged=function(){},e.prototype.onCreating=function(){},e.prototype.hasHtmlValue=function(){if(!this.owner||!this.useMarkdown)return!1;var e=this.locale;if(e||(e=this.defaultLoc),void 0!==this.htmlValues[e])return!!this.htmlValues[e];var t=this.calculatedText;if(!t)return this.setHtmlValue(e,""),!1;if(this.getLocalizationName()&&t===this.getLocalizationStr())return this.setHtmlValue(e,""),!1;var n=this.owner.getMarkdownHtml(t,this.name);return this.setHtmlValue(e,n),!!n},e.prototype.setHtmlValue=function(e,t){this.htmlValues[e]=t},e.prototype.getHtmlValue=function(){var e=this.locale;return e||(e=this.defaultLoc),this.htmlValues[e]},e.prototype.deleteValuesEqualsToDefault=function(e){if(!lr.localization.storeDuplicatedTranslations)for(var t=this.getValuesKeys(),n=0;n<t.length;n++)t[n]!=this.defaultLoc&&this.getValue(t[n])==e&&this.deleteValue(t[n])},e.prototype.getValue=function(e){return this.sharedData?this.sharedData.getValue(e):this.values[this.getValueLoc(e)]},e.prototype.setValue=function(e,t){this.sharedData?this.sharedData.setValue(e,t):this.values[this.getValueLoc(e)]=t},e.prototype.deleteValue=function(e){this.sharedData?this.sharedData.deleteValue(e):delete this.values[this.getValueLoc(e)]},e.prototype.getValueLoc=function(e){return this.disableLocalization?lr.localization.defaultLocaleName:e},e.prototype.getValuesKeys=function(){return this.sharedData?this.sharedData.getValuesKeys():Object.keys(this.values)},Object.defineProperty(e.prototype,"defaultLoc",{get:function(){return lr.localization.defaultLocaleName},enumerable:!1,configurable:!0}),e.SerializeAsObject=!1,e.defaultRenderer="sv-string-viewer",e.editableRenderer="sv-string-editor",e}();!function(){function e(e){this.owner=e,this.values={}}e.prototype.getIsMultiple=function(){return!0},Object.defineProperty(e.prototype,"locale",{get:function(){return this.owner&&this.owner.getLocale?this.owner.getLocale():""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue("")},set:function(e){this.setValue("",e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return Array.isArray(this.value)?this.value.join("\n"):""},set:function(e){this.value=e?e.split("\n"):[]},enumerable:!1,configurable:!0}),e.prototype.getLocaleText=function(e){var t=this.getValueCore(e,!e||e===this.locale);return t&&Array.isArray(t)&&0!=t.length?t.join("\n"):""},e.prototype.setLocaleText=function(e,t){var n=t?t.split("\n"):null;this.setValue(e,n)},e.prototype.getValue=function(e){return this.getValueCore(e)},e.prototype.getValueCore=function(e,t){if(void 0===t&&(t=!0),e=this.getLocale(e),this.values[e])return this.values[e];if(t){var n=lr.localization.defaultLocaleName;if(e!==n&&this.values[n])return this.values[n]}return[]},e.prototype.setValue=function(e,t){e=this.getLocale(e);var n=cr.createCopy(this.values);t&&0!=t.length?this.values[e]=t:delete this.values[e],this.onValueChanged&&this.onValueChanged(n,this.values)},e.prototype.hasValue=function(e){return void 0===e&&(e=""),!this.isEmpty&&this.getValue(e).length>0},Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0==this.getValuesKeys().length},enumerable:!1,configurable:!0}),e.prototype.getLocale=function(e){return e||((e=this.locale)||lr.localization.defaultLocaleName)},e.prototype.getLocales=function(){var e=this.getValuesKeys();return 0==e.length?[]:e},e.prototype.getJson=function(){var e=this.getValuesKeys();return 0==e.length?null:1!=e.length||e[0]!=lr.localization.defaultLocaleName||lr.serialization.localizableStringSerializeAsObject?cr.createCopy(this.values):this.values[e[0]]},e.prototype.setJson=function(e){if(this.values={},e)if(Array.isArray(e))this.setValue(null,e);else for(var t in e)this.setValue(t,e[t])},e.prototype.getValuesKeys=function(){return Object.keys(this.values)}}();function fo(e){return"function"!=typeof e?e:e()}!function(){function e(){this._result=""}e.prototype.log=function(e){this._result+="->"+e},Object.defineProperty(e.prototype,"result",{get:function(){return this._result},enumerable:!1,configurable:!0})}();var yo=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mo=function(){function e(e,t,n,r,o){var i=this;void 0===r&&(r=null),this.container=e,this.model=t,this.itemsSelector=n,this.dotsItemSize=r,this.delayedUpdateFunction=o,this.resizeObserver=void 0,this.isInitialized=!1,this.minDimensionConst=56,this.separatorSize=17,this.separatorAddConst=1,this.paddingSizeConst=8,this.dotsSizeConst=48,this.recalcMinDimensionConst=!0,this.getComputedStyle=window.getComputedStyle.bind(window),this.model.updateCallback=function(e){e&&(i.isInitialized=!1),setTimeout((function(){i.process()}),1)},"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((function(e){window.requestAnimationFrame((function(){i.process()}))})),this.resizeObserver.observe(this.container.parentElement))}return e.prototype.getDimensions=function(e){return{scroll:e.scrollWidth,offset:e.offsetWidth}},e.prototype.getAvailableSpace=function(){var e=this.getComputedStyle(this.container),t=this.container.offsetWidth;return"border-box"===e.boxSizing&&(t-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)),t},e.prototype.calcItemSize=function(e){return e.offsetWidth},e.prototype.calcMinDimension=function(e){var t=this.minDimensionConst;return e.iconSize&&this.recalcMinDimensionConst&&(t=2*e.iconSize+this.paddingSizeConst),e.canShrink?t+(e.needSeparator?this.separatorSize:0):e.maxDimension},e.prototype.getRenderedVisibleActionsCount=function(){var e=this,t=0;return this.container.querySelectorAll(this.itemsSelector).forEach((function(n){e.calcItemSize(n)>0&&t++})),t},e.prototype.calcItemsSizes=function(){var e=this,t=this.model.actions;(this.container.querySelectorAll(this.itemsSelector)||[]).forEach((function(n,r){var o=t[r];e.calcActionDimensions(o,n)}))},e.prototype.calcActionDimensions=function(e,t){e.maxDimension=this.calcItemSize(t),e.minDimension=this.calcMinDimension(e)},Object.defineProperty(e.prototype,"isContainerVisible",{get:function(){return!!((e=this.container).offsetWidth||e.offsetHeight||e.getClientRects().length);var e},enumerable:!1,configurable:!0}),e.prototype.process=function(){var e=this;if(this.isContainerVisible&&!this.model.isResponsivenessDisabled){this.isInitialized||this.model.setActionsMode("large");var t=function(){var t,n=e.dotsItemSize;if(!e.dotsItemSize){var r=null===(t=e.container)||void 0===t?void 0:t.querySelector(".sv-dots");n=r&&e.calcItemSize(r)||e.dotsSizeConst}e.model.fit(e.getAvailableSpace(),n)};if(this.isInitialized)t();else{var n=function(){e.calcItemsSizes(),e.isInitialized=!0,t()};this.getRenderedVisibleActionsCount()<this.model.visibleActions.length?this.delayedUpdateFunction?this.delayedUpdateFunction(n):queueMicrotask?queueMicrotask(n):n():n()}}},e.prototype.dispose=function(){this.model.updateCallback=void 0,this.resizeObserver&&this.resizeObserver.disconnect()},e}(),go=function(e){function t(t,n,r,o,i,s){void 0===i&&(i=40);var a=e.call(this,t,n,r,o,s)||this;return a.minDimensionConst=i,a.recalcMinDimensionConst=!1,a}return yo(t,e),t.prototype.getDimensions=function(){return{scroll:this.container.scrollHeight,offset:this.container.offsetHeight}},t.prototype.getAvailableSpace=function(){var e=this.getComputedStyle(this.container),t=this.container.offsetHeight;return"border-box"===e.boxSizing&&(t-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)),t},t.prototype.calcItemSize=function(e){return e.offsetHeight},t.prototype.calcActionDimensions=function(e,t){e.maxDimension=this.calcItemSize(t),e.minDimension=this.calcItemSize(t)},t}(mo);Object(i.checkLibraryVersion)("1.9.125","survey-react-ui")}])}));
6
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("survey-core"),require("react-dom")):"function"==typeof define&&define.amd?define("survey-react-ui",["react","survey-core","react-dom"],t):"object"==typeof exports?exports["survey-react-ui"]=t(require("react"),require("survey-core"),require("react-dom")):e.SurveyReact=t(e.React,e.Survey,e.ReactDOM)}(this,(function(e,t,n){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t,n){"use strict";n.r(t),n.d(t,"Survey",(function(){return we})),n.d(t,"attachKey2click",(function(){return Oe})),n.d(t,"ReactSurveyElementsWrapper",(function(){return a})),n.d(t,"SurveyNavigationBase",(function(){return xe})),n.d(t,"SurveyTimerPanel",(function(){return _e})),n.d(t,"SurveyPage",(function(){return ue})),n.d(t,"SurveyRow",(function(){return g})),n.d(t,"SurveyPanel",(function(){return Ie})),n.d(t,"SurveyFlowPanel",(function(){return je})),n.d(t,"SurveyQuestion",(function(){return ne})),n.d(t,"SurveyElementErrors",(function(){return re})),n.d(t,"SurveyQuestionAndErrorsCell",(function(){return ie})),n.d(t,"ReactSurveyElement",(function(){return p})),n.d(t,"SurveyElementBase",(function(){return c})),n.d(t,"SurveyQuestionElementBase",(function(){return h})),n.d(t,"SurveyQuestionCommentItem",(function(){return G})),n.d(t,"SurveyQuestionComment",(function(){return K})),n.d(t,"SurveyQuestionCheckbox",(function(){return Re})),n.d(t,"SurveyQuestionCheckboxItem",(function(){return De})),n.d(t,"SurveyQuestionRanking",(function(){return Le})),n.d(t,"SurveyQuestionRankingItem",(function(){return ke})),n.d(t,"RatingItem",(function(){return Fe})),n.d(t,"RatingItemStar",(function(){return He})),n.d(t,"RatingItemSmiley",(function(){return Ue})),n.d(t,"RatingDropdownItem",(function(){return Je})),n.d(t,"TagboxFilterString",(function(){return Ge})),n.d(t,"SurveyQuestionOptionItem",(function(){return Ze})),n.d(t,"SurveyQuestionDropdownBase",(function(){return Xe})),n.d(t,"SurveyQuestionDropdown",(function(){return tt})),n.d(t,"SurveyQuestionTagboxItem",(function(){return rt})),n.d(t,"SurveyQuestionTagbox",(function(){return it})),n.d(t,"SurveyQuestionDropdownSelect",(function(){return at})),n.d(t,"SurveyQuestionMatrix",(function(){return lt})),n.d(t,"SurveyQuestionMatrixRow",(function(){return ct})),n.d(t,"SurveyQuestionMatrixCell",(function(){return pt})),n.d(t,"SurveyQuestionHtml",(function(){return dt})),n.d(t,"SurveyQuestionFile",(function(){return gt})),n.d(t,"SurveyFileChooseButton",(function(){return bt})),n.d(t,"SurveyFilePreview",(function(){return Et})),n.d(t,"SurveyQuestionMultipleText",(function(){return wt})),n.d(t,"SurveyQuestionRadiogroup",(function(){return St})),n.d(t,"SurveyQuestionRadioItem",(function(){return _t})),n.d(t,"SurveyQuestionText",(function(){return It})),n.d(t,"SurveyQuestionBoolean",(function(){return jt})),n.d(t,"SurveyQuestionBooleanCheckbox",(function(){return Rt})),n.d(t,"SurveyQuestionBooleanRadio",(function(){return At})),n.d(t,"SurveyQuestionEmpty",(function(){return kt})),n.d(t,"SurveyQuestionMatrixDropdownCell",(function(){return Jt})),n.d(t,"SurveyQuestionMatrixDropdownBase",(function(){return Wt})),n.d(t,"SurveyQuestionMatrixDropdown",(function(){return Gt})),n.d(t,"SurveyQuestionMatrixDynamic",(function(){return Zt})),n.d(t,"SurveyQuestionMatrixDynamicAddButton",(function(){return $t})),n.d(t,"SurveyQuestionPanelDynamic",(function(){return cn})),n.d(t,"SurveyProgress",(function(){return dn})),n.d(t,"SurveyProgressButtons",(function(){return mn})),n.d(t,"SurveyProgressToc",(function(){return En})),n.d(t,"SurveyQuestionRating",(function(){return wn})),n.d(t,"SurveyQuestionRatingDropdown",(function(){return Pn})),n.d(t,"SurveyQuestionExpression",(function(){return Sn})),n.d(t,"PopupSurvey",(function(){return Nn})),n.d(t,"SurveyWindow",(function(){return In})),n.d(t,"ReactQuestionFactory",(function(){return W})),n.d(t,"ReactElementFactory",(function(){return s})),n.d(t,"SurveyQuestionImagePicker",(function(){return jn})),n.d(t,"SurveyQuestionImage",(function(){return Dn})),n.d(t,"SurveyQuestionSignaturePad",(function(){return Ln})),n.d(t,"SurveyQuestionButtonGroup",(function(){return Bn})),n.d(t,"SurveyQuestionCustom",(function(){return zn})),n.d(t,"SurveyQuestionComposite",(function(){return Hn})),n.d(t,"Popup",(function(){return I})),n.d(t,"List",(function(){return bn})),n.d(t,"TitleActions",(function(){return F})),n.d(t,"TitleElement",(function(){return H})),n.d(t,"SurveyActionBar",(function(){return L})),n.d(t,"LogoImage",(function(){return Un})),n.d(t,"SurveyHeader",(function(){return he})),n.d(t,"SvgIcon",(function(){return E})),n.d(t,"SurveyQuestionMatrixDynamicRemoveButton",(function(){return Jn})),n.d(t,"SurveyQuestionMatrixDetailButton",(function(){return Gn})),n.d(t,"SurveyQuestionMatrixDynamicDragDropIcon",(function(){return zt})),n.d(t,"SurveyQuestionPanelDynamicAddButton",(function(){return tn})),n.d(t,"SurveyQuestionPanelDynamicRemoveButton",(function(){return Zn})),n.d(t,"SurveyQuestionPanelDynamicPrevButton",(function(){return sn})),n.d(t,"SurveyQuestionPanelDynamicNextButton",(function(){return rn})),n.d(t,"SurveyQuestionPanelDynamicProgressText",(function(){return un})),n.d(t,"SurveyNavigationButton",(function(){return Xn})),n.d(t,"MatrixRow",(function(){return Mt})),n.d(t,"Skeleton",(function(){return tr})),n.d(t,"NotifierComponent",(function(){return ye})),n.d(t,"ComponentsContainer",(function(){return ve})),n.d(t,"CharacterCounterComponent",(function(){return Q})),n.d(t,"HeaderMobile",(function(){return rr})),n.d(t,"HeaderCell",(function(){return or})),n.d(t,"Header",(function(){return ir})),n.d(t,"SurveyLocStringViewer",(function(){return ce})),n.d(t,"SurveyLocStringEditor",(function(){return ar})),n.d(t,"LoadingIndicatorComponent",(function(){return mt})),n.d(t,"SvgBundleComponent",(function(){return Ce})),n.d(t,"SurveyModel",(function(){return i.SurveyModel})),n.d(t,"SurveyWindowModel",(function(){return i.SurveyWindowModel})),n.d(t,"settings",(function(){return i.settings})),n.d(t,"surveyLocalization",(function(){return i.surveyLocalization})),n.d(t,"surveyStrings",(function(){return i.surveyStrings})),n.d(t,"Model",(function(){return i.SurveyModel})),n.d(t,"ResponsivityManager",(function(){return yo})),n.d(t,"VerticalResponsivityManager",(function(){return go})),n.d(t,"unwrap",(function(){return fo}));var r=n(0),o=n.n(r),i=n(1),s=function(){function e(){this.creatorHash={}}return e.prototype.registerElement=function(e,t){this.creatorHash[e]=t},e.prototype.getAllTypes=function(){var e=new Array;for(var t in this.creatorHash)e.push(t);return e.sort()},e.prototype.isElementRegistered=function(e){return!!this.creatorHash[e]},e.prototype.createElement=function(e,t){var n=this.creatorHash[e];return null==n?null:n(t)},e.Instance=new e,e}(),a=function(){function e(){}return e.wrapRow=function(e,t,n){var r=e.getRowWrapperComponentName(n),o=e.getRowWrapperComponentData(n);return s.Instance.createElement(r,{element:t,row:n,componentData:o})},e.wrapElement=function(e,t,n){var r=e.getElementWrapperComponentName(n),o=e.getElementWrapperComponentData(n);return s.Instance.createElement(r,{element:t,question:n,componentData:o})},e.wrapQuestionContent=function(e,t,n){var r=e.getQuestionContentWrapperComponentName(n),o=e.getElementWrapperComponentData(n);return s.Instance.createElement(r,{element:t,question:n,componentData:o})},e.wrapItemValue=function(e,t,n,r){var o=e.getItemValueWrapperComponentName(r,n),i=e.getItemValueWrapperComponentData(r,n);return s.Instance.createElement(o,{key:null==t?void 0:t.key,element:t,question:n,item:r,componentData:i})},e.wrapMatrixCell=function(e,t,n,r){void 0===r&&(r="cell");var o=e.getElementWrapperComponentName(n,r),i=e.getElementWrapperComponentData(n,r);return s.Instance.createElement(o,{element:t,cell:n,componentData:i})},e}();i.SurveyModel.platform="react";var u,l=(u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(e){function t(t){var n=e.call(this,t)||this;return n._allowComponentUpdate=!0,n}return l(t,e),t.renderLocString=function(e,t,n){return void 0===t&&(t=null),s.Instance.createElement(e.renderAs,{locStr:e.renderAsData,style:t,key:n})},t.renderQuestionDescription=function(e){var n=t.renderLocString(e.locDescription);return r.createElement("div",{style:e.hasDescription?void 0:{display:"none"},className:e.cssDescription},n)},t.prototype.componentDidMount=function(){this.makeBaseElementsReact()},t.prototype.componentWillUnmount=function(){this.unMakeBaseElementsReact()},t.prototype.componentDidUpdate=function(e,t){this.makeBaseElementsReact()},t.prototype.allowComponentUpdate=function(){this._allowComponentUpdate=!0,this.forceUpdate()},t.prototype.denyComponentUpdate=function(){this._allowComponentUpdate=!1},t.prototype.shouldComponentUpdate=function(e,t){return this._allowComponentUpdate&&this.unMakeBaseElementsReact(),this._allowComponentUpdate},t.prototype.render=function(){if(!this.canRender())return null;this.startEndRendering(1);var e=this.renderElement();return this.startEndRendering(-1),e&&(e=this.wrapElement(e)),this.changedStatePropNameValue=void 0,e},t.prototype.wrapElement=function(e){return e},Object.defineProperty(t.prototype,"isRendering",{get:function(){for(var e=0,t=this.getRenderedElements();e<t.length;e++){if(t[e].reactRendering>0)return!0}return!1},enumerable:!1,configurable:!0}),t.prototype.getRenderedElements=function(){return this.getStateElements()},t.prototype.startEndRendering=function(e){for(var t=0,n=this.getRenderedElements();t<n.length;t++){var r=n[t];r.reactRendering||(r.reactRendering=0),r.reactRendering+=e}},t.prototype.canRender=function(){return!0},t.prototype.renderElement=function(){return null},Object.defineProperty(t.prototype,"changedStatePropName",{get:function(){return this.changedStatePropNameValue},enumerable:!1,configurable:!0}),t.prototype.makeBaseElementsReact=function(){for(var e=this.getStateElements(),t=0;t<e.length;t++)this.makeBaseElementReact(e[t])},t.prototype.unMakeBaseElementsReact=function(){for(var e=this.getStateElements(),t=0;t<e.length;t++)this.unMakeBaseElementReact(e[t])},t.prototype.getStateElements=function(){var e=this.getStateElement();return e?[e]:[]},t.prototype.getStateElement=function(){return null},Object.defineProperty(t.prototype,"isDisplayMode",{get:function(){return this.props.isDisplayMode||!1},enumerable:!1,configurable:!0}),t.prototype.renderLocString=function(e,n,r){return void 0===n&&(n=null),t.renderLocString(e,n,r)},t.prototype.canMakeReact=function(e){return!!e&&!!e.iteratePropertiesHash},t.prototype.makeBaseElementReact=function(e){var t=this;this.canMakeReact(e)&&(e.iteratePropertiesHash((function(e,n){if(t.canUsePropInState(n)){var r=e[n];if(Array.isArray(r))(r=r).onArrayChanged=function(e){t.isRendering||(t.changedStatePropNameValue=n,t.setState((function(e){var t={};return t[n]=r,t})))}}})),e.setPropertyValueCoreHandler=function(e,n,r){if(e[n]!==r){if(e[n]=r,!t.canUsePropInState(n))return;if(t.isRendering)return;t.changedStatePropNameValue=n,t.setState((function(e){var t={};return t[n]=r,t}))}})},t.prototype.canUsePropInState=function(e){return!0},t.prototype.unMakeBaseElementReact=function(e){this.canMakeReact(e)&&(e.setPropertyValueCoreHandler=void 0,e.iteratePropertiesHash((function(e,t){var n=e[t];Array.isArray(n)&&((n=n).onArrayChanged=function(){})})))},t}(r.Component),p=function(e){function t(t){return e.call(this,t)||this}return l(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),t}(c),h=function(e){function t(t){return e.call(this,t)||this}return l(t,e),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateDomElement()},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.updateDomElement()},t.prototype.componentWillUnmount=function(){if(e.prototype.componentWillUnmount.call(this),this.questionBase){var t=this.control;this.questionBase.beforeDestroyQuestionElement(t),t&&t.removeAttribute("data-rendered")}},t.prototype.updateDomElement=function(){var e=this.control;e&&"r"!==e.getAttribute("data-rendered")&&(e.setAttribute("data-rendered","r"),this.questionBase.afterRenderQuestionElement(e))},Object.defineProperty(t.prototype,"questionBase",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.getRenderedElements=function(){return[this.questionBase]},Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.questionBase&&!!this.creator},t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&!(this.questionBase.customWidget&&!this.questionBase.customWidgetData.isNeedRender&&!this.questionBase.customWidget.widgetJson.isDefaultRender&&!this.questionBase.customWidget.widgetJson.render)},Object.defineProperty(t.prototype,"isDisplayMode",{get:function(){return this.props.isDisplayMode||!!this.questionBase&&this.questionBase.isInputReadOnly||!1},enumerable:!1,configurable:!0}),t.prototype.wrapCell=function(e,t,n){if(!n)return t;var r=this.questionBase.survey,o=null;return r&&(o=a.wrapMatrixCell(r,t,e,n)),null!=o?o:t},t.prototype.setControl=function(e){e&&(this.control=e)},t}(c),d=function(e){function t(t){var n=e.call(this,t)||this;return n.updateValueOnEvent=function(e){i.Helpers.isTwoValueEquals(n.questionBase.value,e.target.value,!1,!0,!1)||n.setValueCore(e.target.value)},n.updateValueOnEvent=n.updateValueOnEvent.bind(n),n}return l(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.setValueCore=function(e){this.questionBase.value=e},t.prototype.getValueCore=function(){return this.questionBase.value},t.prototype.updateDomElement=function(){if(this.control){var t=this.control,n=this.getValueCore();i.Helpers.isTwoValueEquals(n,t.value,!1,!0,!1)||(t.value=this.getValue(n))}e.prototype.updateDomElement.call(this)},t.prototype.getValue=function(e){return i.Helpers.isValueEmpty(e)?"":e},t}(h),f=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),m=function(e){function t(t){var n=e.call(this,t)||this;return n.element.cssClasses,n}return f(t,e),t.prototype.getStateElement=function(){return this.element},Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.row},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.props.css},enumerable:!1,configurable:!0}),t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(this.element.cssClasses,!0)},t.prototype.renderElement=function(){var e=this.element,t=this.createElement(e,this.index),n=e.cssClassesValue;return r.createElement("div",{className:n.questionWrapper,style:e.rootStyle,"data-key":t.key,key:t.key,onFocus:function(){var t=e;t&&t.isQuestion&&t.focusIn()}},this.row.isNeedRender?t:s.Instance.createElement(e.skeletonComponentName,{element:e,css:this.css}))},t.prototype.createElement=function(e,t){var n=t?"-"+t:0,r=e.getType();return s.Instance.isElementRegistered(r)||(r="question"),s.Instance.createElement(r,{key:e.name+n,element:e,creator:this.creator,survey:this.survey,css:this.css})},t}(c),y=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),g=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=r.createRef(),n.recalculateCss(),n}return y(t,e),t.prototype.recalculateCss=function(){this.row.visibleElements.map((function(e){return e.cssClasses}))},t.prototype.getStateElement=function(){return this.row},Object.defineProperty(t.prototype,"row",{get:function(){return this.props.row},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.props.css},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.row&&!!this.survey&&!!this.creator&&this.row.visible},t.prototype.renderElementContent=function(){var e=this,t=this.row.visibleElements.map((function(t,n){var o=n?"-"+n:0,i=t.name+o;return r.createElement(m,{element:t,index:n,row:e.row,survey:e.survey,creator:e.creator,css:e.css,key:i})}));return r.createElement("div",{ref:this.rootRef,className:this.row.getRowCss()},t)},t.prototype.renderElement=function(){var e=this.survey,t=this.renderElementContent();return a.wrapRow(e,t,this.row)||t},t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this);var n=this.rootRef.current;if(n&&!this.row.isNeedRender){var r=n;setTimeout((function(){t.row.startLazyRendering(r)}),10)}},t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(t.row!==this.row&&(t.row.isNeedRender=this.row.isNeedRender,this.stopLazyRendering()),this.recalculateCss(),!0)},t.prototype.stopLazyRendering=function(){this.row.stopLazyRendering(),this.row.isNeedRender=!this.row.isLazyRendering()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.stopLazyRendering()},t.prototype.createElement=function(e,t){var n=t?"-"+t:0,r=e.getType();return s.Instance.isElementRegistered(r)||(r="question"),s.Instance.createElement(r,{key:e.name+n,element:e,creator:this.creator,survey:this.survey,css:this.css})},t}(c),v=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),b=function(e){function t(t){var n=e.call(this,t)||this;return n.renderedRowsCache={},n.rootRef=r.createRef(),n}return v(t,e),t.prototype.getStateElement=function(){return this.panelBase},t.prototype.canUsePropInState=function(t){return"elements"!==t&&e.prototype.canUsePropInState.call(this,t)},Object.defineProperty(t.prototype,"survey",{get:function(){return this.getSurvey()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.getCss()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panelBase",{get:function(){return this.getPanelBase()},enumerable:!1,configurable:!0}),t.prototype.getPanelBase=function(){return this.props.element||this.props.question},t.prototype.getSurvey=function(){return this.props.survey||(this.panelBase?this.panelBase.survey:null)},t.prototype.getCss=function(){return this.props.css},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.doAfterRender()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this);var t=this.rootRef.current;t&&t.removeAttribute("data-rendered")},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),t.page&&this.survey&&this.survey.currentPage&&t.page.id===this.survey.currentPage.id||this.doAfterRender()},t.prototype.doAfterRender=function(){var e=this.rootRef.current;e&&this.survey&&(this.panelBase.isPanel?this.survey.afterRenderPanel(this.panelBase,e):this.survey.afterRenderPage(e))},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&!!this.survey&&!!this.panelBase&&this.panelBase.isVisible&&!!this.panelBase.survey},t.prototype.renderRows=function(e){"rows"!==this.changedStatePropName&&(this.renderedRowsCache={});for(var t=[],n=this.panelBase.rows,r=0;r<n.length;r++){var o=this.renderedRowsCache[n[r].id];o||(o=this.createRow(n[r],e),this.renderedRowsCache[n[r].id]=o),t.push(o)}return t},t.prototype.createRow=function(e,t){return r.createElement(g,{key:e.id,row:e,survey:this.survey,creator:this.creator,css:t})},t}(c),C=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),E=function(e){function t(t){var n=e.call(this,t)||this;return n.svgIconRef=o.a.createRef(),n}return C(t,e),t.prototype.updateSvg=function(){this.props.iconName&&Object(i.createSvg)(this.props.size,this.props.width,this.props.height,this.props.iconName,this.svgIconRef.current,this.props.title)},t.prototype.componentDidUpdate=function(){this.updateSvg()},t.prototype.render=function(){var e="sv-svg-icon";return this.props.className&&(e+=" "+this.props.className),this.props.iconName?o.a.createElement("svg",{className:e,style:this.props.style,onClick:this.props.onClick,ref:this.svgIconRef,role:"img"},o.a.createElement("use",null)):null},t.prototype.componentDidMount=function(){this.updateSvg()},t}(o.a.Component);s.Instance.registerElement("sv-svg-icon",(function(e){return o.a.createElement(E,e)}));var q=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),w=function(e){function t(t){return e.call(this,t)||this}return q(t,e),t.prototype.render=function(){var e="sv-action-bar-separator "+this.props.cssClasses;return o.a.createElement("div",{className:e})},t}(o.a.Component);s.Instance.registerElement("sv-action-bar-separator",(function(e){return o.a.createElement(w,e)}));var O=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return O(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){var e=this.item.getActionRootCss(),t=this.item.needSeparator?o.a.createElement(w,null):null,n=s.Instance.createElement(this.item.component||"sv-action-bar-item",{item:this.item});return o.a.createElement("div",{className:e,id:this.item.id},o.a.createElement("div",{className:"sv-action__content"},t,n))},t}(c),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return O(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){return o.a.createElement(o.a.Fragment,null,this.renderInnerButton())},t.prototype.renderText=function(){if(!this.item.hasTitle)return null;var e=this.item.getActionBarItemTitleCss();return o.a.createElement("span",{className:e},this.item.title)},t.prototype.renderButtonContent=function(){var e=this.renderText(),t=this.item.iconName?o.a.createElement(E,{className:this.item.cssClasses.itemIcon,size:this.item.iconSize,iconName:this.item.iconName,title:this.item.tooltip||this.item.title}):null;return o.a.createElement(o.a.Fragment,null,t,e)},t.prototype.renderInnerButton=function(){var e=this,t=this.item.getActionBarItemCss(),n=this.item.tooltip||this.item.title,r=this.renderButtonContent(),i=this.item.disableTabStop?-1:void 0;return Oe(o.a.createElement("button",{className:t,type:"button",disabled:this.item.disabled,onClick:function(t){return e.item.action(e.item,e.item.getIsTrusted(t))},title:n,tabIndex:i,"aria-checked":this.item.ariaChecked,"aria-expanded":this.item.ariaExpanded,role:this.item.ariaRole},r),this.item,{processEsc:!1})},t}(c);s.Instance.registerElement("sv-action-bar-item",(function(e){return o.a.createElement(x,e)}));var S=n(2),_=n.n(S),N=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),I=function(e){function t(t){var n=e.call(this,t)||this;return n.containerRef=o.a.createRef(),n.createModel(),n}return N(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.createModel=function(){this.popup=Object(i.createPopupViewModel)(this.props.model,void 0)},t.prototype.setTargetElement=function(){var e=this.containerRef.current;this.popup.setComponentElement(e,this.props.getTarget?this.props.getTarget(e):void 0)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.setTargetElement()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.setTargetElement()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.popup.resetComponentElement()},t.prototype.shouldComponentUpdate=function(t,n){var r;if(!e.prototype.shouldComponentUpdate.call(this,t,n))return!1;var o=t.model!==this.popup.model;return o&&(null===(r=this.popup)||void 0===r||r.dispose(),this.createModel()),o},t.prototype.render=function(){var e;return this.popup.model=this.model,e=this.model.isModal?o.a.createElement(V,{model:this.popup}):o.a.createElement(j,{model:this.popup}),o.a.createElement("div",{ref:this.containerRef},e)},t}(c);s.Instance.registerElement("sv-popup",(function(e){return o.a.createElement(I,e)}));var V=function(e){function t(t){var n=e.call(this,t)||this;return n.prevIsVisible=!1,n.handleKeydown=function(e){n.model.onKeyDown(e)},n.clickInside=function(e){e.stopPropagation()},n}return N(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),!this.prevIsVisible&&this.model.isVisible&&this.model.updateOnShowing(),this.prevIsVisible=this.model.isVisible},t.prototype.renderContainer=function(e){var t=this,n=e.showHeader?this.renderHeaderPopup(e):null,r=e.title?this.renderHeaderContent():null,i=this.renderContent(),s=e.showFooter?this.renderFooter(this.model):null;return o.a.createElement("div",{className:"sv-popup__container",style:{left:e.left,top:e.top,height:e.height,width:e.width,minWidth:e.minWidth},onClick:function(e){t.clickInside(e)}},o.a.createElement("div",{className:"sv-popup__shadow"},n,o.a.createElement("div",{className:"sv-popup__body-content"},r,o.a.createElement("div",{className:"sv-popup__scrolling-content"},i),s)))},t.prototype.renderHeaderContent=function(){return o.a.createElement("div",{className:"sv-popup__body-header"},this.model.title)},t.prototype.renderContent=function(){var e=s.Instance.createElement(this.model.contentComponentName,this.model.contentComponentData);return o.a.createElement("div",{className:"sv-popup__content"},e)},t.prototype.renderHeaderPopup=function(e){return null},t.prototype.renderFooter=function(e){return o.a.createElement("div",{className:"sv-popup__body-footer"},o.a.createElement(L,{model:e.footerToolbar}))},t.prototype.render=function(){var e=this,t=this.renderContainer(this.model),n=(new i.CssClassBuilder).append("sv-popup").append(this.model.styleClass).toString(),r={display:this.model.isVisible?"":"none"};return o.a.createElement("div",{tabIndex:-1,className:n,style:r,onClick:function(t){e.model.clickOutside(t)},onKeyDown:this.handleKeydown},t)},t}(c),j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return N(t,e),t.prototype.renderHeaderPopup=function(e){var t=e;return t?o.a.createElement("span",{style:{left:t.pointerTarget.left,top:t.pointerTarget.top},className:"sv-popup__pointer"}):null},t}(V);function T(e,t){e.onHide=function(){_.a.unmountComponentAtNode(n.container),n.dispose()};var n=Object(i.createPopupModalViewModel)(e,t);return _.a.render(o.a.createElement(V,{model:n}),n.container),n.model.isVisible=!0,n}i.settings.showModal=function(e,t,n,r,o,s,a){return void 0===a&&(a="popup"),T(Object(i.createDialogOptions)(e,t,n,r,void 0,void 0,o,s,a))},i.settings.showDialog=T;var R=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),D=function(e){function t(t){var n=e.call(this,t)||this;return n.viewModel=new i.ActionDropdownViewModel(n.item),n}return R(t,e),t.prototype.renderInnerButton=function(){var t=e.prototype.renderInnerButton.call(this);return o.a.createElement(o.a.Fragment,null,t,o.a.createElement(I,{model:this.item.popupModel,getTarget:i.getActionDropdownButtonTarget}))},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.viewModel.dispose()},t}(x);s.Instance.registerElement("sv-action-bar-item-dropdown",(function(e){return o.a.createElement(D,e)}));var A=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),L=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=o.a.createRef(),n}return A(t,e),Object.defineProperty(t.prototype,"handleClick",{get:function(){return void 0===this.props.handleClick||this.props.handleClick},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(e.prototype.componentDidMount.call(this),this.model.hasActions){var t=this.rootRef.current;t&&this.model.initResponsivityManager(t,(function(e){setTimeout(e)}))}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model.hasActions&&this.model.resetResponsivityManager()},t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){if(!this.model.hasActions)return null;var e=this.renderItems();return o.a.createElement("div",{ref:this.rootRef,className:this.model.getRootCss(),onClick:this.handleClick?function(e){e.stopPropagation()}:void 0},e)},t.prototype.renderItems=function(){return this.model.renderedActions.map((function(e,t){return o.a.createElement(P,{item:e,key:"item"+t})}))},t}(c);s.Instance.registerElement("sv-action-bar",(function(e){return o.a.createElement(L,e)}));var k=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),B=function(e){function t(t){return e.call(this,t)||this}return k(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){if(this.element.isTitleRenderedAsString)return c.renderLocString(this.element.locTitle);var e=this.renderTitleSpans(this.element.getTitleOwner(),this.cssClasses);return o.a.createElement(o.a.Fragment,null,e)},t.prototype.renderTitleSpans=function(e,t){var n=function(e){return o.a.createElement("span",{"data-key":e,key:e}," ")},r=[];e.isRequireTextOnStart&&(r.push(this.renderRequireText(e,t)),r.push(n("req-sp")));var i=e.no;if(i){var s=t.panel?t.panel.number:void 0;r.push(o.a.createElement("span",{"data-key":"q_num",key:"q_num",className:t.number||s,style:{position:"static"},"aria-hidden":!0},i)),r.push(n("num-sp"))}return e.isRequireTextBeforeTitle&&(r.push(this.renderRequireText(e,t)),r.push(n("req-sp"))),r.push(c.renderLocString(e.locTitle,null,"q_title")),e.isRequireTextAfterTitle&&(r.push(n("req-sp")),r.push(this.renderRequireText(e,t))),r},t.prototype.renderRequireText=function(e,t){return o.a.createElement("span",{"data-key":"req-text",key:"req-text",className:t.requiredText||t.panel.requiredText,"aria-hidden":!0},e.requiredText)},t}(o.a.Component),M=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=o.a.createElement(B,{element:this.element,cssClasses:this.cssClasses});return this.element.hasTitleActions?o.a.createElement("div",{className:"sv-title-actions"},o.a.createElement("span",{className:"sv-title-actions__title"},e),o.a.createElement(L,{model:this.element.getTitleToolbar()})):e},t}(o.a.Component);i.RendererFactory.Instance.registerRenderer("element","title-actions","sv-title-actions"),s.Instance.registerElement("sv-title-actions",(function(e){return o.a.createElement(F,e)}));var z=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),H=function(e){function t(t){return e.call(this,t)||this}return z(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.element;if(!e||!e.hasTitle)return null;var t=e.titleAriaLabel||void 0,n=o.a.createElement(F,{element:e,cssClasses:e.cssClasses}),r=void 0;e.hasTitleEvents&&(r=function(e){Object(i.doKey2ClickUp)(e.nativeEvent)});var s=e.titleTagName;return o.a.createElement(s,{className:e.cssTitle,id:e.ariaTitleId,"aria-label":t,tabIndex:e.titleTabIndex,"aria-expanded":e.titleAriaExpanded,role:e.titleAriaRole,onClick:void 0,onKeyUp:r},n)},t}(o.a.Component),W=function(){function e(){this.creatorHash={}}return e.prototype.registerQuestion=function(e,t){this.creatorHash[e]=t},e.prototype.getAllTypes=function(){var e=new Array;for(var t in this.creatorHash)e.push(t);return e.sort()},e.prototype.createQuestion=function(e,t){var n=this.creatorHash[e];return null==n?null:n(t)},e.Instance=new e,e}(),U=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getStateElement=function(){return this.props.counter},t.prototype.renderElement=function(){return o.a.createElement("div",{className:this.props.remainingCharacterCounter},this.props.counter.remainingCharacterCounter)},t}(c);s.Instance.registerElement("sv-character-counter",(function(e){return o.a.createElement(Q,e)}));var J=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),K=function(e){function t(t){return e.call(this,t)||this}return J(t,e),t.prototype.renderElement=function(){var e=this,t=this.question.isInputTextUpdate?void 0:this.updateValueOnEvent,n=this.question.renderedPlaceholder;if(this.question.isReadOnlyRenderDiv())return r.createElement("div",null,this.question.value);var o=this.question.getMaxLength()?r.createElement(Q,{counter:this.question.characterCounter,remainingCharacterCounter:this.question.cssClasses.remainingCharacterCounter}):null;return r.createElement(r.Fragment,null,r.createElement("textarea",{id:this.question.inputId,className:this.question.className,disabled:this.question.isInputReadOnly,readOnly:this.question.isInputReadOnly,ref:function(t){return e.setControl(t)},maxLength:this.question.getMaxLength(),placeholder:n,onBlur:t,onInput:function(t){e.question.isInputTextUpdate?e.updateValueOnEvent(t):e.question.updateElement();var n=t.target.value;e.question.updateRemainingCharacterCounter(n)},onKeyDown:function(t){e.question.onKeyDown(t)},cols:this.question.cols,rows:this.question.rows,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-describedby":this.question.a11y_input_ariaDescribedBy,style:{resize:this.question.resizeStyle}}),o)},t}(d),G=function(e){function t(t){var n=e.call(this,t)||this;return n.state={comment:n.getComment()||""},n}return J(t,e),t.prototype.getStateComment=function(){var e=this.getComment(),t=this.state.comment;return void 0!==t&&t.trim()!==e&&(t=e),void 0!==t?t:e||""},t.prototype.canRender=function(){return!!this.props.question},t.prototype.onCommentChange=function(e){this.props.question.onCommentChange(e)},t.prototype.onCommentInput=function(e){this.props.question.onCommentInput(e)},t.prototype.getComment=function(){return this.props.question.comment},t.prototype.setComment=function(e){this.props.question.comment=e},t.prototype.getId=function(){return this.props.question.commentId},t.prototype.getPlaceholder=function(){return this.props.question.renderedCommentPlaceholder},t.prototype.renderElement=function(){var e=this,t=this.props.question,n=this.props.otherCss||this.cssClasses.comment,o=function(t){e.setState({comment:t.target.value}),i.Helpers.isTwoValueEquals(e.getComment(),t.target.value,!1,!0,!1)||e.setComment(t.target.value)},s=this.getStateComment();return t.isReadOnlyRenderDiv()?r.createElement("div",null,s):r.createElement("textarea",{id:this.getId(),className:n,value:s,disabled:this.isDisplayMode,maxLength:t.getOthersMaxLength(),placeholder:this.getPlaceholder(),onChange:o,onBlur:function(t){e.onCommentChange(t),o(t)},onInput:function(t){return e.onCommentInput(t)},"aria-required":t.isRequired||t.a11y_input_ariaRequired,"aria-label":t.ariaLabel||t.a11y_input_ariaLabel,style:{resize:t.resizeStyle}})},t}(p),Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return J(t,e),t.prototype.onCommentChange=function(e){this.props.question.onOtherValueChange(e)},t.prototype.onCommentInput=function(e){this.props.question.onOtherValueInput(e)},t.prototype.getComment=function(){return this.props.question.otherValue},t.prototype.setComment=function(e){this.props.question.otherValue=e},t.prototype.getId=function(){return this.props.question.otherId},t.prototype.getPlaceholder=function(){return this.props.question.otherPlaceholder},t}(G);W.Instance.registerQuestion("comment",(function(e){return r.createElement(K,e)}));var Z=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$=function(e){function t(t){var n=e.call(this,t)||this;return n.widgetRef=r.createRef(),n}return Z(t,e),t.prototype._afterRender=function(){if(this.questionBase.customWidget){var e=this.widgetRef.current;e&&(this.questionBase.customWidget.afterRender(this.questionBase,e),this.questionBase.customWidgetData.isNeedRender=!1)}},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.questionBase&&this._afterRender()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n);var r=!!this.questionBase.customWidget&&this.questionBase.customWidget.isDefaultRender;this.questionBase&&!r&&this._afterRender()},t.prototype.componentWillUnmount=function(){if(e.prototype.componentWillUnmount.call(this),this.questionBase.customWidget){var t=this.widgetRef.current;t&&this.questionBase.customWidget.willUnmount(this.questionBase,t)}},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&this.questionBase.visible},t.prototype.renderElement=function(){var e=this.questionBase.customWidget;if(e.isDefaultRender)return r.createElement("div",{ref:this.widgetRef},this.creator.createQuestionElement(this.questionBase));var t=null;if(e.widgetJson.render)t=e.widgetJson.render(this.questionBase);else if(e.htmlTemplate){var n={__html:e.htmlTemplate};return r.createElement("div",{ref:this.widgetRef,dangerouslySetInnerHTML:n})}return r.createElement("div",{ref:this.widgetRef},t)},t}(h),X=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return X(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.element,t=e.hasTitle?o.a.createElement(H,{element:e}):null,n=e.hasDescriptionUnderTitle?c.renderQuestionDescription(this.element):null,r=e.additionalTitleToolbar?o.a.createElement(L,{model:e.additionalTitleToolbar}):null;return o.a.createElement("div",{className:e.cssHeader,onClick:function(t){return e.clickTitleFunction&&e.clickTitleFunction(t.nativeEvent)}},t,n,r)},t}(o.a.Component),te=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ne=function(e){function t(t){var n=e.call(this,t)||this;return n.isNeedFocus=!1,n.rootRef=r.createRef(),n}return te(t,e),t.renderQuestionBody=function(e,t){return t.isVisible?t.customWidget?r.createElement($,{creator:e,question:t}):e.createQuestionElement(t):null},t.prototype.getStateElement=function(){return this.question},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.question&&(this.question.react=this),this.doAfterRender()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question&&(this.question.react=null);var t=this.rootRef.current;t&&t.removeAttribute("data-rendered")},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.doAfterRender()},t.prototype.doAfterRender=function(){if(this.isNeedFocus&&(this.question.isCollapsed||this.question.clickTitleFunction(),this.isNeedFocus=!1),this.question){var e=this.rootRef.current;e&&"r"!==e.getAttribute("data-rendered")&&(e.setAttribute("data-rendered","r"),e.setAttribute("data-name",this.question.name),this.question.afterRender&&this.question.afterRender(e))}},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&!!this.question&&!!this.creator&&this.question.isVisible},t.prototype.renderQuestionContent=function(){var e=this.question,t={display:this.question.isCollapsed?"none":""},n=e.cssClasses,o=this.renderQuestion(),i=this.question.showErrorOnTop?this.renderErrors(n,"top"):null,s=this.question.showErrorOnBottom?this.renderErrors(n,"bottom"):null,a=e&&e.hasComment?this.renderComment(n):null,u=e.hasDescriptionUnderInput?this.renderDescription():null;return r.createElement("div",{className:e.cssContent||void 0,style:t,role:"presentation"},i,o,a,s,u)},t.prototype.renderElement=function(){var e=this.question,t=e.cssClasses,n=this.renderHeader(e),o=e.hasTitleOnLeftTop?n:null,i=e.hasTitleOnBottom?n:null,s=this.question.showErrorsAboveQuestion?this.renderErrors(t,""):null,a=this.question.showErrorsBelowQuestion?this.renderErrors(t,""):null,u=e.getRootStyle(),l=this.wrapQuestionContent(this.renderQuestionContent());return r.createElement(r.Fragment,null,r.createElement("div",{ref:this.rootRef,id:e.id,className:e.getRootCss(),style:u,role:e.ariaRole,"aria-required":this.question.ariaRequired,"aria-invalid":this.question.ariaInvalid,"aria-labelledby":e.ariaLabelledBy,"aria-expanded":null===e.ariaExpanded?void 0:"true"===e.ariaExpanded},s,o,l,i,a))},t.prototype.wrapElement=function(e){var t=this.question.survey,n=null;return t&&(n=a.wrapElement(t,e,this.question)),null!=n?n:e},t.prototype.wrapQuestionContent=function(e){var t=this.question.survey,n=null;return t&&(n=a.wrapQuestionContent(t,e,this.question)),null!=n?n:e},t.prototype.renderQuestion=function(){return t.renderQuestionBody(this.creator,this.question)},t.prototype.renderDescription=function(){return c.renderQuestionDescription(this.question)},t.prototype.renderComment=function(e){var t=c.renderLocString(this.question.locCommentText);return r.createElement("div",{className:this.question.getCommentAreaCss()},r.createElement("div",null,t),r.createElement(G,{question:this.question,cssClasses:e,otherCss:e.other,isDisplayMode:this.question.isInputReadOnly}))},t.prototype.renderHeader=function(e){return r.createElement(ee,{element:e})},t.prototype.renderErrors=function(e,t){return r.createElement(re,{element:this.question,cssClasses:e,creator:this.creator,location:t,id:this.question.id+"_errors"})},t}(c);s.Instance.registerElement("question",(function(e){return r.createElement(ne,e)}));var re=function(e){function t(t){var n=e.call(this,t)||this;return n.state=n.getState(),n}return te(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this.props.element.id+"_errors"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this.props.location},enumerable:!1,configurable:!0}),t.prototype.getState=function(e){return void 0===e&&(e=null),e?{error:e.error+1}:{error:0}},t.prototype.canRender=function(){return!!this.element&&this.element.hasVisibleErrors},t.prototype.componentWillUnmount=function(){},t.prototype.renderElement=function(){for(var e=[],t=0;t<this.element.errors.length;t++){var n="error"+t;e.push(this.creator.renderError(n,this.element.errors[t],this.cssClasses))}return r.createElement("div",{role:"alert","aria-live":"polite",className:this.element.cssError,id:this.id},e)},t}(p),oe=function(e){function t(t){return e.call(this,t)||this}return te(t,e),t.prototype.getStateElement=function(){return this.question},Object.defineProperty(t.prototype,"question",{get:function(){return this.getQuestion()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.getQuestion=function(){return this.props.question},Object.defineProperty(t.prototype,"itemCss",{get:function(){return this.props.itemCss},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.doAfterRender()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.doAfterRender()},t.prototype.doAfterRender=function(){},t.prototype.canRender=function(){return!!this.question},t.prototype.renderContent=function(){var e=this.renderQuestion();return r.createElement(r.Fragment,null,e)},t.prototype.getShowErrors=function(){return this.question.isVisible},t.prototype.renderQuestion=function(){return ne.renderQuestionBody(this.creator,this.question)},t}(p),ie=function(e){function t(t){var n=e.call(this,t)||this;return n.cellRef=r.createRef(),n}return te(t,e),t.prototype.componentWillUnmount=function(){if(e.prototype.componentWillUnmount.call(this),this.question){var t=this.cellRef.current;t&&t.removeAttribute("data-rendered")}},t.prototype.renderElement=function(){var e=this.getCellStyle(),t=this.props.cell;return r.createElement("td",{ref:this.cellRef,className:this.itemCss,colSpan:t.colSpans,"data-responsive-title":this.getHeaderText(),title:t.getTitle(),style:e,onFocus:function(){t.focusIn()}},this.wrapCell(this.props.cell,r.createElement("div",{className:this.cssClasses.cellQuestionWrapper},this.renderQuestion())))},t.prototype.getCellStyle=function(){return null},t.prototype.getHeaderText=function(){return""},t.prototype.wrapCell=function(e,t){if(!e)return t;var n=this.question.survey,r=null;return n&&(r=a.wrapMatrixCell(n,t,e,this.props.reason)),null!=r?r:t},t}(oe),se=function(e){function t(t){var n=e.call(this,t)||this;return n.state={changed:0},n.question&&n.registerCallback(n.question),n}return te(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.update=function(){this.setState({changed:this.state.changed+1})},t.prototype.registerCallback=function(e){var t=this;e.registerFunctionOnPropertyValueChanged("errors",(function(){t.update()}),"__reactSubscription")},t.prototype.unRegisterCallback=function(e){e.unRegisterFunctionOnPropertyValueChanged("errors","__reactSubscription")},t.prototype.componentDidUpdate=function(e){e.question&&e.question!==this.question&&this.unRegisterCallback(e.cell),this.question&&this.registerCallback(this.question)},t.prototype.componentWillUnmount=function(){this.question&&this.unRegisterCallback(this.question)},t.prototype.render=function(){return r.createElement(re,{element:this.question,creator:this.props.creator,cssClasses:this.question.cssClasses})},t}(r.Component),ae=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ue=function(e){function t(t){return e.call(this,t)||this}return ae(t,e),t.prototype.getPanelBase=function(){return this.props.page},Object.defineProperty(t.prototype,"page",{get:function(){return this.panelBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this.renderTitle(),t=this.renderDescription(),n=this.renderRows(this.panelBase.cssClasses),o=r.createElement(re,{element:this.panelBase,cssClasses:this.panelBase.cssClasses,creator:this.creator});return r.createElement("div",{ref:this.rootRef,className:this.page.cssRoot},e,t,o,n)},t.prototype.renderTitle=function(){return r.createElement(H,{element:this.page})},t.prototype.renderDescription=function(){if(!this.page._showDescription)return null;var e=c.renderLocString(this.page.locDescription);return r.createElement("div",{className:this.panelBase.cssClasses.page.description},e)},t}(b),le=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ce=function(e){function t(t){var n=e.call(this,t)||this;return n.onChangedHandler=function(e,t){n.isRendering||n.setState({changed:n.state&&n.state.changed?n.state.changed+1:1})},n.rootRef=o.a.createRef(),n}return le(t,e),Object.defineProperty(t.prototype,"locStr",{get:function(){return this.props.locStr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this.props.style},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.reactOnStrChanged()},t.prototype.componentWillUnmount=function(){this.locStr&&this.locStr.onStringChanged.remove(this.onChangedHandler)},t.prototype.componentDidUpdate=function(e,t){e.locStr&&e.locStr.onStringChanged.remove(this.onChangedHandler),this.reactOnStrChanged()},t.prototype.reactOnStrChanged=function(){this.locStr&&this.locStr.onStringChanged.add(this.onChangedHandler)},t.prototype.render=function(){if(!this.locStr)return null;this.isRendering=!0;var e=this.renderString();return this.isRendering=!1,e},t.prototype.renderString=function(){if(this.locStr.hasHtml){var e={__html:this.locStr.renderedHtml};return o.a.createElement("span",{ref:this.rootRef,className:"sv-string-viewer",style:this.style,dangerouslySetInnerHTML:e})}return o.a.createElement("span",{ref:this.rootRef,className:"sv-string-viewer",style:this.style},this.locStr.renderedHtml)},t}(o.a.Component);s.Instance.registerElement(i.LocalizableString.defaultRenderer,(function(e){return o.a.createElement(ce,e)}));var pe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),he=function(e){function t(t){var n=e.call(this,t)||this;return n.state={changed:0},n.rootRef=o.a.createRef(),n}return pe(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.survey.css},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var e=this;this.survey.afterRenderHeader(this.rootRef.current),this.survey.locLogo.onChanged=function(){e.setState({changed:e.state.changed+1})}},t.prototype.componentWillUnmount=function(){this.survey.locLogo.onChanged=function(){}},t.prototype.renderTitle=function(){if(!this.survey.renderedHasTitle)return null;var e=c.renderLocString(this.survey.locDescription);return o.a.createElement("div",{className:this.css.headerText,style:{maxWidth:this.survey.titleMaxWidth}},o.a.createElement(H,{element:this.survey}),this.survey.renderedHasDescription?o.a.createElement("div",{className:this.css.description},e):null)},t.prototype.renderLogoImage=function(e){if(!e)return null;var t=this.survey.getElementWrapperComponentName(this.survey,"logo-image"),n=this.survey.getElementWrapperComponentData(this.survey,"logo-image");return s.Instance.createElement(t,{data:n})},t.prototype.render=function(){return this.survey.renderedHasHeader?o.a.createElement("div",{className:this.css.header,ref:this.rootRef},this.renderLogoImage(this.survey.isLogoBefore),this.renderTitle(),this.renderLogoImage(this.survey.isLogoAfter),o.a.createElement("div",{className:this.css.headerClose})):null},t}(o.a.Component);s.Instance.registerElement("survey-header",(function(e){return o.a.createElement(he,e)}));var de=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return de(t,e),t.prototype.render=function(){return o.a.createElement("div",{className:"sv-brand-info"},o.a.createElement("a",{className:"sv-brand-info__logo",href:"https://surveyjs.io/?utm_source=built-in_links&utm_medium=online_survey_tool&utm_campaign=landing_page"},o.a.createElement("img",{src:"https://surveyjs.io/Content/Images/poweredby.svg"})),o.a.createElement("div",{className:"sv-brand-info__text"},"Try and see how easy it is to ",o.a.createElement("a",{href:"https://surveyjs.io/create-survey?utm_source=built-in_links&utm_medium=online_survey_tool&utm_campaign=create_survey"},"create a survey")),o.a.createElement("div",{className:"sv-brand-info__terms"},o.a.createElement("a",{href:"https://surveyjs.io/TermsOfUse"},"Terms of Use & Privacy Statement")))},t}(o.a.Component),me=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return me(t,e),Object.defineProperty(t.prototype,"notifier",{get:function(){return this.props.notifier},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.notifier},t.prototype.renderElement=function(){if(!this.notifier.isDisplayed)return null;var e={visibility:this.notifier.active?"visible":"hidden"};return o.a.createElement("div",{className:this.notifier.css,style:e,role:"alert","aria-live":"polite"},o.a.createElement("span",null,this.notifier.message),o.a.createElement(L,{model:this.notifier.actionBar}))},t}(c);s.Instance.registerElement("sv-notifier",(function(e){return o.a.createElement(ye,e)}));var ge=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ve=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ge(t,e),t.prototype.render=function(){var e=this,t=this.props.survey.getContainerContent(this.props.container),n=!1!==this.props.needRenderWrapper;return 0==t.length?null:n?o.a.createElement("div",{className:"sv-components-column"},t.map((function(t){return s.Instance.createElement(t.component,{survey:e.props.survey,model:t.data,container:e.props.container,key:t.id})}))):o.a.createElement(o.a.Fragment,null,t.map((function(t){return s.Instance.createElement(t.component,{survey:e.props.survey,model:t.data,container:e.props.container,key:t.id})})))},t}(o.a.Component);s.Instance.registerElement("sv-components-container",(function(e){return o.a.createElement(ve,e)}));var be=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ce=function(e){function t(t){var n=e.call(this,t)||this;return n.containerRef=o.a.createRef(),n}return be(t,e),t.prototype.componentDidMount=function(){this.containerRef.current&&(this.containerRef.current.innerHTML=i.SvgRegistry.iconsRenderedHtml())},t.prototype.render=function(){return o.a.createElement("svg",{style:{display:"none"},id:"sv-icon-holder-global-container",ref:this.containerRef})},t}(o.a.Component),Ee=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qe=function(){return(qe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},we=function(e){function t(t){var n=e.call(this,t)||this;return n.previousJSON={},n.isSurveyUpdated=!1,n.createSurvey(t),n.updateSurvey(t,{}),n.rootRef=r.createRef(),n.rootNodeId=t.id||null,n.rootNodeClassName=t.className||"",n}return Ee(t,e),Object.defineProperty(t,"cssType",{get:function(){return i.surveyCss.currentType},set:function(e){i.StylesManager.applyTheme(e)},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.survey},t.prototype.onSurveyUpdated=function(){if(this.survey){var e=this.rootRef.current;e&&this.survey.afterRenderSurvey(e),this.survey.startTimerFromUI()}},t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(this.isModelJSONChanged(t)&&(this.destroySurvey(),this.createSurvey(t),this.updateSurvey(t,{}),this.isSurveyUpdated=!0),!0)},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateSurvey(this.props,t),this.isSurveyUpdated&&(this.onSurveyUpdated(),this.isSurveyUpdated=!1)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.onSurveyUpdated()},t.prototype.destroySurvey=function(){this.survey&&(this.survey.renderCallback=void 0,this.survey.onPartialSend.clear(),this.survey.stopTimer(),this.survey.destroyResizeObserver())},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.destroySurvey()},t.prototype.doRender=function(){var e;e="completed"==this.survey.state?this.renderCompleted():"completedbefore"==this.survey.state?this.renderCompletedBefore():"loading"==this.survey.state?this.renderLoading():"empty"==this.survey.state?this.renderEmptySurvey():this.renderSurvey();var t=this.survey.backgroundImage?r.createElement("div",{className:this.css.rootBackgroundImage,style:this.survey.backgroundImageStyle}):null,n="basic"===this.survey.headerView?r.createElement(he,{survey:this.survey}):null,o=r.createElement("div",{className:"sv_custom_header"});this.survey.hasLogo&&(o=null);var i=this.survey.getRootCss(),s=this.rootNodeClassName?this.rootNodeClassName+" "+i:i;return r.createElement("div",{id:this.rootNodeId,ref:this.rootRef,className:s,style:this.survey.themeVariables},this.survey.needRenderIcons?r.createElement(Ce,null):null,r.createElement("div",{className:this.survey.wrapperFormCss},t,r.createElement("form",{onSubmit:function(e){e.preventDefault()}},o,r.createElement("div",{className:this.css.container},n,r.createElement(ve,{survey:this.survey,container:"header",needRenderWrapper:!1}),e,r.createElement(ve,{survey:this.survey,container:"footer",needRenderWrapper:!1}))),this.survey.showBrandInfo?r.createElement(fe,null):null,r.createElement(ye,{notifier:this.survey.notifier})))},t.prototype.renderElement=function(){return this.doRender()},Object.defineProperty(t.prototype,"css",{get:function(){return this.survey.css},set:function(e){this.survey.css=e},enumerable:!1,configurable:!0}),t.prototype.renderCompleted=function(){if(!this.survey.showCompletedPage)return null;var e={__html:this.survey.processedCompletedHtml};return r.createElement(r.Fragment,null,r.createElement("div",{dangerouslySetInnerHTML:e,className:this.survey.completedCss}),r.createElement(ve,{survey:this.survey,container:"completePage",needRenderWrapper:!1}))},t.prototype.renderCompletedBefore=function(){var e={__html:this.survey.processedCompletedBeforeHtml};return r.createElement("div",{dangerouslySetInnerHTML:e,className:this.survey.completedBeforeCss})},t.prototype.renderLoading=function(){var e={__html:this.survey.processedLoadingHtml};return r.createElement("div",{dangerouslySetInnerHTML:e,className:this.survey.loadingBodyCss})},t.prototype.renderSurvey=function(){var e=this.survey.activePage?this.renderPage(this.survey.activePage):null,t=(this.survey.isShowStartingPage,this.survey.activePage?this.survey.activePage.id:""),n=this.survey.bodyCss,o={};return this.survey.renderedWidth&&(o.maxWidth=this.survey.renderedWidth),r.createElement("div",{className:this.survey.bodyContainerCss},r.createElement(ve,{survey:this.survey,container:"left"}),r.createElement("div",{className:"sv-components-column sv-components-column--expandable"},r.createElement(ve,{survey:this.survey,container:"center"}),r.createElement("div",{id:t,className:n,style:o},r.createElement(ve,{survey:this.survey,container:"contentTop"}),e,r.createElement(ve,{survey:this.survey,container:"contentBottom"}))),r.createElement(ve,{survey:this.survey,container:"right"}))},t.prototype.renderPage=function(e){return r.createElement(ue,{survey:this.survey,page:e,css:this.css,creator:this})},t.prototype.renderEmptySurvey=function(){return r.createElement("div",{className:this.css.bodyEmpty},this.survey.emptySurveyText)},t.prototype.createSurvey=function(e){e||(e={}),this.previousJSON={},e?e.model?this.survey=e.model:e.json&&(this.previousJSON=e.json,this.survey=new i.SurveyModel(e.json)):this.survey=new i.SurveyModel,e.css&&(this.survey.css=this.css),this.setSurveyEvents()},t.prototype.isModelJSONChanged=function(e){return e.model?this.survey!==e.model:!!e.json&&!i.Helpers.isTwoValueEquals(e.json,this.previousJSON)},t.prototype.updateSurvey=function(e,t){if(e)for(var n in t=t||{},e)"model"!=n&&"children"!=n&&"json"!=n&&("css"!=n?e[n]!==t[n]&&(0==n.indexOf("on")&&this.survey[n]&&this.survey[n].add?(t[n]&&this.survey[n].remove(t[n]),this.survey[n].add(e[n])):this.survey[n]=e[n]):(this.survey.mergeValues(e.css,this.survey.getCss()),this.survey.updateNavigationCss(),this.survey.updateElementCss()))},t.prototype.setSurveyEvents=function(){var e=this;this.survey.renderCallback=function(){var t=e.state&&e.state.modelChanged?e.state.modelChanged:0;e.setState({modelChanged:t+1})},this.survey.onPartialSend.add((function(t){e.state&&e.setState(e.state)}))},t.prototype.createQuestionElement=function(e){return W.Instance.createQuestion(e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isInputReadOnly,creator:this})},t.prototype.renderError=function(e,t,n){return r.createElement("div",{key:e},r.createElement("span",{className:n.error.icon||void 0,"aria-hidden":"true"}),r.createElement("span",{className:n.error.item||void 0},r.createElement(ce,{locStr:t.locText})))},t.prototype.questionTitleLocation=function(){return this.survey.questionTitleLocation},t.prototype.questionErrorLocation=function(){return this.survey.questionErrorLocation},t}(c);function Oe(e,t,n){return void 0===n&&(n={processEsc:!0,disableTabStop:!1}),t&&t.disableTabStop||n&&n.disableTabStop?r.cloneElement(e,{tabIndex:-1}):(n=qe({},n),r.cloneElement(e,{tabIndex:0,onKeyUp:function(e){return e.preventDefault(),e.stopPropagation(),Object(i.doKey2ClickUp)(e,n),!1},onKeyDown:function(e){return Object(i.doKey2ClickDown)(e,n)},onBlur:function(e){return Object(i.doKey2ClickBlur)(e)}}))}s.Instance.registerElement("survey",(function(e){return r.createElement(we,e)}));var Pe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xe=function(e){function t(t){var n=e.call(this,t)||this;return n.updateStateFunction=null,n.state={update:0},n}return Pe(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.props.css||this.survey.css},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(this.survey){var e=this;this.updateStateFunction=function(){e.setState({update:e.state.update+1})},this.survey.onPageVisibleChanged.add(this.updateStateFunction)}},t.prototype.componentWillUnmount=function(){this.survey&&this.updateStateFunction&&(this.survey.onPageVisibleChanged.remove(this.updateStateFunction),this.updateStateFunction=null)},t}(r.Component),Se=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_e=function(e){function t(t){var n=e.call(this,t)||this;return n.circleLength=440,n}return Se(t,e),t.prototype.getStateElement=function(){return this.timerModel},Object.defineProperty(t.prototype,"timerModel",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progress",{get:function(){return-this.timerModel.progress*this.circleLength},enumerable:!1,configurable:!0}),t.prototype.render=function(){if(!this.timerModel.isRunning)return null;var e=r.createElement("div",{className:this.timerModel.survey.getCss().timerRoot},this.timerModel.text);if(this.timerModel.showTimerAsClock){var t={strokeDasharray:this.circleLength,strokeDashoffset:this.progress},n=this.timerModel.showProgress?r.createElement(E,{className:this.timerModel.getProgressCss(),style:t,iconName:"icon-timercircle",size:"auto"}):null;e=r.createElement("div",{className:this.timerModel.rootCss},n,r.createElement("div",{className:this.timerModel.textContainerCss},r.createElement("span",{className:this.timerModel.majorTextCss},this.timerModel.clockMajorText),this.timerModel.clockMinorText?r.createElement("span",{className:this.timerModel.minorTextCss},this.timerModel.clockMinorText):null))}return e},t}(p);s.Instance.registerElement("sv-timerpanel",(function(e){return r.createElement(_e,e)}));var Ne=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ie=function(e){function t(t){var n=e.call(this,t)||this;return n.hasBeenExpanded=!1,n}return Ne(t,e),Object.defineProperty(t.prototype,"panel",{get:function(){return this.panelBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.renderHeader(),n=r.createElement(re,{element:this.panelBase,cssClasses:this.panelBase.cssClasses,creator:this.creator}),o={paddingLeft:this.panel.innerPaddingLeft,display:this.panel.isCollapsed?"none":void 0},i=null;if(!this.panel.isCollapsed||this.hasBeenExpanded){this.hasBeenExpanded=!0;var s=this.renderRows(this.panelBase.cssClasses),a=this.panelBase.cssClasses.panel.content;i=this.renderContent(o,s,a)}return r.createElement("div",{ref:this.rootRef,className:this.panelBase.getContainerCss(),onFocus:function(){e.panelBase&&e.panelBase.focusIn()},id:this.panelBase.id},this.panel.showErrorsAbovePanel?n:null,t,this.panel.showErrorsAbovePanel?null:n,i)},t.prototype.renderHeader=function(){return this.panel.hasTitle||this.panel.hasDescription?r.createElement(ee,{element:this.panel}):null},t.prototype.wrapElement=function(e){var t=this.panel.survey,n=null;return t&&(n=a.wrapElement(t,e,this.panel)),null!=n?n:e},t.prototype.renderContent=function(e,t,n){var o=this.renderBottom();return r.createElement("div",{style:e,className:n,id:this.panel.contentId},t,o)},t.prototype.renderTitle=function(){return this.panelBase.title?r.createElement(H,{element:this.panelBase}):null},t.prototype.renderDescription=function(){if(!this.panelBase.description)return null;var e=c.renderLocString(this.panelBase.locDescription);return r.createElement("div",{className:this.panel.cssClasses.panel.description},e)},t.prototype.renderBottom=function(){var e=this.panel.getFooterToolbar();return e.hasActions?r.createElement(L,{model:e}):null},t}(b);s.Instance.registerElement("panel",(function(e){return r.createElement(Ie,e)}));var Ve=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),je=function(e){function t(t){return e.call(this,t)||this}return Ve(t,e),Object.defineProperty(t.prototype,"flowPanel",{get:function(){return this.panel},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.flowPanel&&(this.flowPanel.onCustomHtmlProducing=function(){return""},this.flowPanel.onGetHtmlForQuestion=this.renderQuestion)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.flowPanel&&(this.flowPanel.onCustomHtmlProducing=null,this.flowPanel.onGetHtmlForQuestion=null)},t.prototype.getQuestion=function(e){return this.flowPanel.getQuestionByName(e)},t.prototype.renderQuestion=function(e){return"<question>"+e.name+"</question>"},t.prototype.renderRows=function(){var e=this.renderHtml();return e?[e]:[]},t.prototype.getNodeIndex=function(){return this.renderedIndex++},t.prototype.renderHtml=function(){if(!this.flowPanel)return null;var e="<span>"+this.flowPanel.produceHtml()+"</span>";if(!DOMParser){var t={__html:e};return r.createElement("div",{dangerouslySetInnerHTML:t})}var n=(new DOMParser).parseFromString(e,"text/xml");return this.renderedIndex=0,this.renderParentNode(n)},t.prototype.renderNodes=function(e){for(var t=[],n=0;n<e.length;n++){var r=this.renderNode(e[n]);r&&t.push(r)}return t},t.prototype.getStyle=function(e){var t={};return"b"===e.toLowerCase()&&(t.fontWeight="bold"),"i"===e.toLowerCase()&&(t.fontStyle="italic"),"u"===e.toLowerCase()&&(t.textDecoration="underline"),t},t.prototype.renderParentNode=function(e){var t=e.nodeName.toLowerCase(),n=this.renderNodes(this.getChildDomNodes(e));return"div"===t?r.createElement("div",{key:this.getNodeIndex()},n):r.createElement("span",{key:this.getNodeIndex(),style:this.getStyle(t)},n)},t.prototype.renderNode=function(e){if(!this.hasTextChildNodesOnly(e))return this.renderParentNode(e);var t=e.nodeName.toLowerCase();if("question"===t){var n=this.flowPanel.getQuestionByName(e.textContent);if(!n)return null;var o=r.createElement(ne,{key:n.name,element:n,creator:this.creator,css:this.css});return r.createElement("span",{key:this.getNodeIndex()},o)}return"div"===t?r.createElement("div",{key:this.getNodeIndex()},e.textContent):r.createElement("span",{key:this.getNodeIndex(),style:this.getStyle(t)},e.textContent)},t.prototype.getChildDomNodes=function(e){for(var t=[],n=0;n<e.childNodes.length;n++)t.push(e.childNodes[n]);return t},t.prototype.hasTextChildNodesOnly=function(e){for(var t=e.childNodes,n=0;n<t.length;n++)if("#text"!==t[n].nodeName.toLowerCase())return!1;return!0},t.prototype.renderContent=function(e,t){return r.createElement("f-panel",{style:e},t)},t}(Ie);s.Instance.registerElement("flowpanel",(function(e){return r.createElement(je,e)}));var Te=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Re=function(e){function t(t){return e.call(this,t)||this}return Te(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses;return r.createElement("fieldset",{className:this.question.getSelectBaseRootCss(),ref:function(t){return e.setControl(t)},role:this.question.a11y_input_ariaRole,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-describedby":this.question.a11y_input_ariaDescribedBy},r.createElement("legend",{className:"sv-hidden"},this.question.locTitle.renderedHtml),this.getHeader(),this.question.hasColumns?this.getColumnedBody(t):this.getBody(t),this.getFooter(),this.question.isOtherSelected?this.renderOther():null)},t.prototype.getHeader=function(){var e=this;if(this.question.hasHeadItems)return this.question.headItems.map((function(t,n){return e.renderItem("item_h"+n,t,!1,e.question.cssClasses)}))},t.prototype.getFooter=function(){var e=this;if(this.question.hasFootItems)return this.question.footItems.map((function(t,n){return e.renderItem("item_f"+n,t,!1,e.question.cssClasses)}))},t.prototype.getColumnedBody=function(e){return r.createElement("div",{className:e.rootMultiColumn},this.getColumns(e))},t.prototype.getColumns=function(e){var t=this;return this.question.columns.map((function(n,o){var i=n.map((function(n,r){return t.renderItem("item"+r,n,0===o&&0===r,e,""+o+r)}));return r.createElement("div",{key:"column"+o,className:t.question.getColumnClass(),role:"presentation"},i)}))},t.prototype.getBody=function(e){return this.question.blockedRow?r.createElement("div",{className:e.rootRow},this.getItems(e,this.question.dataChoices)):r.createElement(r.Fragment,null,this.getItems(e,this.question.bodyItems))},t.prototype.getItems=function(e,t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i="item"+r,s=this.renderItem(i,o,0==r,e,""+r);s&&n.push(s)}return n},Object.defineProperty(t.prototype,"textStyle",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.renderOther=function(){var e=this.question.cssClasses;return r.createElement("div",{className:this.question.getCommentAreaCss(!0)},r.createElement(Y,{question:this.question,otherCss:e.other,cssClasses:e,isDisplayMode:this.isDisplayMode}))},t.prototype.renderItem=function(e,t,n,r,o){var i=s.Instance.createElement(this.question.itemComponent,{key:e,question:this.question,cssClasses:r,isDisplayMode:this.isDisplayMode,item:t,textStyle:this.textStyle,index:o,isFirst:n}),u=this.question.survey,l=null;return u&&i&&(l=a.wrapItemValue(u,i,this.question,t)),null!=l?l:i},t}(h),De=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=function(e){n.question.clickItemHandler(n.item,e.target.checked)},n}return Te(t,e),t.prototype.getStateElement=function(){return this.item},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textStyle",{get:function(){return this.props.textStyle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isFirst",{get:function(){return this.props.isFirst},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hideCaption",{get:function(){return!0===this.props.hideCaption},enumerable:!1,configurable:!0}),t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(!!this.question&&!(this.question.customWidget&&!this.question.customWidgetData.isNeedRender&&!this.question.customWidget.widgetJson.isDefaultRender&&!this.question.customWidget.widgetJson.render))},t.prototype.canRender=function(){return!!this.item&&!!this.question},t.prototype.renderElement=function(){var e=this.question.isItemSelected(this.item);return this.renderCheckbox(e,null)},Object.defineProperty(t.prototype,"inputStyle",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.renderCheckbox=function(e,t){var n=this.question.getItemId(this.item),o=this.question.getItemClass(this.item),i=this.question.getLabelClass(this.item),s=this.hideCaption?null:r.createElement("span",{className:this.cssClasses.controlLabel},this.renderLocString(this.item.locText,this.textStyle));return r.createElement("div",{className:o,role:"presentation"},r.createElement("label",{className:i},r.createElement("input",{className:this.cssClasses.itemControl,type:"checkbox",role:"option",name:this.question.name+this.item.id,value:this.item.value,id:n,style:this.inputStyle,disabled:!this.question.getItemEnabled(this.item),checked:e,onChange:this.handleOnChange}),this.cssClasses.materialDecorator?r.createElement("span",{className:this.cssClasses.materialDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:this.cssClasses.itemDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,s),t)},t}(p);s.Instance.registerElement("survey-checkbox-item",(function(e){return r.createElement(De,e)})),W.Instance.registerQuestion("checkbox",(function(e){return r.createElement(Re,e)}));var Ae=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Le=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ae(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this;if(this.question.selectToRankEnabled){return r.createElement("div",{className:this.question.rootClass,ref:function(t){return e.setControl(t)}},r.createElement("div",{className:this.question.getContainerClasses("from"),"data-ranking":"from-container"},this.getItems(this.question.unRankingChoices,!0),0===this.question.unRankingChoices.length?r.createElement("div",{className:this.question.cssClasses.containerPlaceholder}," ",this.renderLocString(this.question.locSelectToRankEmptyRankedAreaText)," "):null),r.createElement("div",{className:this.question.cssClasses.containersDivider}),r.createElement("div",{className:this.question.getContainerClasses("to"),"data-ranking":"to-container"},this.getItems(),0===this.question.rankingChoices.length?r.createElement("div",{className:this.question.cssClasses.containerPlaceholder}," ",this.renderLocString(this.question.locSelectToRankEmptyUnrankedAreaText)," "):null))}return r.createElement("div",{className:this.question.rootClass,ref:function(t){return e.setControl(t)}},this.getItems())},t.prototype.getItems=function(e,t){var n=this;void 0===e&&(e=this.question.rankingChoices);for(var r=[],o=function(o){var s=e[o];r.push(i.renderItem(s,o,(function(e){n.question.handleKeydown.call(n.question,e,s)}),(function(e){e.persist(),n.question.handlePointerDown.call(n.question,e,s,e.currentTarget)}),i.question.cssClasses,i.question.getItemClass(s),i.question,t))},i=this,s=0;s<e.length;s++)o(s);return r},t.prototype.renderItem=function(e,t,n,o,i,s,u,l){var c=e.value+"-"+t+"-item",p=this.renderLocString(e.locText),h=t,d=this.question.getNumberByIndex(t),f=this.question.getItemTabIndex(e),m=r.createElement(ke,{key:c,text:p,index:h,indexText:d,itemTabIndex:f,handleKeydown:n,handlePointerDown:o,cssClasses:i,itemClass:s,question:u,unrankedItem:l,item:e}),y=this.question.survey,g=null;return y&&(g=a.wrapItemValue(y,m,this.question,e)),null!=g?g:m},t}(h),ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ae(t,e),Object.defineProperty(t.prototype,"text",{get:function(){return this.props.text},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"indexText",{get:function(){return this.props.indexText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"handleKeydown",{get:function(){return this.props.handleKeydown},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"handlePointerDown",{get:function(){return this.props.handlePointerDown},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemClass",{get:function(){return this.props.itemClass},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemTabIndex",{get:function(){return this.props.itemTabIndex},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"unrankedItem",{get:function(){return this.props.unrankedItem},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.renderEmptyIcon=function(){return r.createElement("svg",null,r.createElement("use",{xlinkHref:this.question.dashSvgIcon}))},t.prototype.renderElement=function(){return r.createElement("div",{tabIndex:this.itemTabIndex,className:this.itemClass,onKeyDown:this.handleKeydown,onPointerDown:this.handlePointerDown,"data-sv-drop-target-ranking-item":this.index},r.createElement("div",{tabIndex:-1,style:{outline:"none"}},r.createElement("div",{className:this.cssClasses.itemGhostNode}),r.createElement("div",{className:this.cssClasses.itemContent},r.createElement("div",{className:this.cssClasses.itemIconContainer},r.createElement("svg",{className:this.question.getIconHoverCss()},r.createElement("use",{xlinkHref:this.question.dragDropSvgIcon})),r.createElement("svg",{className:this.question.getIconFocusCss()},r.createElement("use",{xlinkHref:this.question.arrowsSvgIcon}))),r.createElement("div",{className:this.question.getItemIndexClasses(this.item)},!this.unrankedItem&&this.indexText?this.indexText:this.renderEmptyIcon()),r.createElement("div",{className:this.cssClasses.controlLabel},this.text))))},t}(p);W.Instance.registerQuestion("ranking",(function(e){return r.createElement(Le,e)}));var Be=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Me=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnMouseDown=n.handleOnMouseDown.bind(n),n}return Be(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.handleOnMouseDown=function(e){this.question.onMouseDown()},t}(c),Fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Be(t,e),t.prototype.render=function(){var e=this.renderLocString(this.item.locText);return o.a.createElement("label",{onMouseDown:this.handleOnMouseDown,className:this.question.getItemClassByText(this.item.itemValue,this.item.text)},o.a.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.name,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.isDisplayMode,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:function(){},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),o.a.createElement("span",{className:this.question.cssClasses.itemText},e))},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this)},t}(Me);s.Instance.registerElement("sv-rating-item",(function(e){return o.a.createElement(Fe,e)}));var ze=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),He=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ze(t,e),t.prototype.render=function(){var e=this;return o.a.createElement("label",{onMouseDown:this.handleOnMouseDown,className:this.question.getItemClass(this.item.itemValue),onMouseOver:function(t){return e.question.onItemMouseIn(e.item)},onMouseOut:function(t){return e.question.onItemMouseOut(e.item)}},o.a.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.name,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.isDisplayMode,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:function(){},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),o.a.createElement(E,{className:"sv-star",size:"auto",iconName:this.question.itemStarIcon,title:this.item.text}),o.a.createElement(E,{className:"sv-star-2",size:"auto",iconName:this.question.itemStarIconAlt,title:this.item.text}))},t}(Me);s.Instance.registerElement("sv-rating-item-star",(function(e){return o.a.createElement(He,e)}));var We=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return We(t,e),t.prototype.render=function(){var e=this;return o.a.createElement("label",{onMouseDown:this.handleOnMouseDown,style:this.question.getItemStyle(this.item.itemValue,this.item.highlight),className:this.question.getItemClass(this.item.itemValue),onMouseOver:function(t){return e.question.onItemMouseIn(e.item)},onMouseOut:function(t){return e.question.onItemMouseOut(e.item)}},o.a.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.name,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.isDisplayMode,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:function(){},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),o.a.createElement(E,{size:"auto",iconName:this.question.getItemSmileyIconName(this.item.itemValue),title:this.item.text}))},t}(Me);s.Instance.registerElement("sv-rating-item-smiley",(function(e){return o.a.createElement(Ue,e)}));var Qe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Je=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Qe(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){if(!this.item)return null;var e=this.props.item,t=this.renderDescription(e);return o.a.createElement("div",{className:"sd-rating-dropdown-item"},o.a.createElement("span",{className:"sd-rating-dropdown-item_text"},e.title),t)},t.prototype.renderDescription=function(e){return e.description?o.a.createElement("div",{className:"sd-rating-dropdown-item_description"},this.renderLocString(e.description,void 0,"locString")):null},t}(c);s.Instance.registerElement("sv-rating-dropdown-item",(function(e){return o.a.createElement(Je,e)}));var Ke=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ge=function(e){function t(t){return e.call(this,t)||this}return Ke(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateDomElement()},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.updateDomElement()},t.prototype.updateDomElement=function(){if(this.inputElement){var e=this.inputElement,t=this.model.inputStringRendered;i.Helpers.isTwoValueEquals(t,e.value,!1,!0,!1)||(e.value=this.model.inputStringRendered)}},t.prototype.onChange=function(e){var t=i.settings.environment.root;e.target===t.activeElement&&(this.model.inputStringRendered=e.target.value)},t.prototype.keyhandler=function(e){this.model.inputKeyHandler(e)},t.prototype.onBlur=function(e){this.model.onBlur(e)},t.prototype.onFocus=function(e){this.model.onFocus(e)},t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this;return r.createElement("div",{className:this.question.cssClasses.hint},this.model.showHintPrefix?r.createElement("div",{className:this.question.cssClasses.hintPrefix},r.createElement("span",null,this.model.hintStringPrefix)):null,r.createElement("div",{className:this.question.cssClasses.hintSuffixWrapper},this.model.showHintString?r.createElement("div",{className:this.question.cssClasses.hintSuffix},r.createElement("span",{style:{visibility:"hidden"},"data-bind":"text: model.filterString"},this.model.inputStringRendered),r.createElement("span",null,this.model.hintStringSuffix)):null,r.createElement("input",{type:"text",autoComplete:"off",id:this.question.getInputId(),inputMode:this.model.inputMode,ref:function(t){return e.inputElement=t},className:this.question.cssClasses.filterStringInput,disabled:this.question.isInputReadOnly,readOnly:!!this.model.filterReadOnly||void 0,size:this.model.inputStringRendered?void 0:1,role:this.model.filterStringEnabled?this.question.ariaRole:void 0,"aria-expanded":null===this.question.ariaExpanded?void 0:"true"===this.question.ariaExpanded,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-controls":this.model.listElementId,"aria-activedescendant":this.model.ariaActivedescendant,placeholder:this.model.filterStringPlaceholder,onKeyDown:function(t){e.keyhandler(t)},onChange:function(t){e.onChange(t)},onBlur:function(t){e.onBlur(t)},onFocus:function(t){e.onFocus(t)}})))},t}(c);W.Instance.registerQuestion("sv-tagbox-filter",(function(e){return r.createElement(Ge,e)}));var Ye=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ze=function(e){function t(t){var n=e.call(this,t)||this;return n.state={changed:0},n.setupModel(),n}return Ye(t,e),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.setupModel()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.item&&(this.item.locText.onChanged=function(){})},t.prototype.setupModel=function(){if(this.item.locText){var e=this;this.item.locText.onChanged=function(){e.setState({changed:e.state.changed+1})}}},t.prototype.getStateElement=function(){return this.item},Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.item},t.prototype.renderElement=function(){return r.createElement("option",{value:this.item.value,disabled:!this.item.isEnabled},this.item.text)},t}(p),$e=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.click=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onClick(e)},t.chevronPointerDown=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.chevronPointerDown(e)},t.clear=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onClear(e)},t.keyhandler=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.keyHandler(e)},t.blur=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onBlur(e),t.updateInputDomElement()},t.focus=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onFocus(e)},t}return $e(t,e),t.prototype.getStateElement=function(){return this.question.dropdownListModel},t.prototype.setValueCore=function(e){this.questionBase.renderedValue=e},t.prototype.getValueCore=function(){return this.questionBase.renderedValue},t.prototype.renderReadOnlyElement=function(){return r.createElement("div",null,this.question.readOnlyText)},t.prototype.renderSelect=function(e){var t,n,o=null;if(this.question.isReadOnly){var s=this.question.selectedItemLocText?this.renderLocString(this.question.selectedItemLocText):"";o=r.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),disabled:!0},s,this.renderReadOnlyElement())}else this.question.dropdownListModel||(this.question.dropdownListModel=new i.DropdownListModel(this.question)),o=r.createElement(r.Fragment,null,this.renderInput(this.question.dropdownListModel),r.createElement(I,{model:null===(n=null===(t=this.question)||void 0===t?void 0:t.dropdownListModel)||void 0===n?void 0:n.popupModel}));return r.createElement("div",{className:e.selectWrapper,onClick:this.click},o,this.createChevronButton())},t.prototype.renderValueElement=function(e){return this.question.showInputFieldComponent?s.Instance.createElement(this.question.inputFieldComponentName,{item:e.getSelectedAction(),question:this.question}):this.question.showSelectedItemLocText?this.renderLocString(this.question.selectedItemLocText):null},t.prototype.renderInput=function(e){var t=this,n=this.renderValueElement(e),o=i.settings.environment.root;return r.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),tabIndex:e.noTabIndex?void 0:0,disabled:this.question.isInputReadOnly,required:this.question.isRequired,onKeyDown:this.keyhandler,onBlur:this.blur,role:this.question.ariaRole,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy,"aria-expanded":null===this.question.ariaExpanded?void 0:"true"===this.question.ariaExpanded,"aria-controls":e.listElementId,"aria-activedescendant":e.ariaActivedescendant},e.showHintPrefix?r.createElement("div",{className:this.question.cssClasses.hintPrefix},r.createElement("span",null,e.hintStringPrefix)):null,r.createElement("div",{className:this.question.cssClasses.controlValue},e.showHintString?r.createElement("div",{className:this.question.cssClasses.hintSuffix},r.createElement("span",{style:{visibility:"hidden"},"data-bind":"text: model.filterString"},e.inputStringRendered),r.createElement("span",null,e.hintStringSuffix)):null,n,r.createElement("input",{type:"text",autoComplete:"off",id:this.question.getInputId(),ref:function(e){return t.inputElement=e},className:this.question.cssClasses.filterStringInput,role:e.filterStringEnabled?this.question.ariaRole:void 0,"aria-expanded":null===this.question.ariaExpanded?void 0:"true"===this.question.ariaExpanded,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-controls":e.listElementId,"aria-activedescendant":e.ariaActivedescendant,placeholder:e.placeholderRendered,readOnly:!!e.filterReadOnly||void 0,tabIndex:e.noTabIndex?void 0:-1,disabled:this.question.isInputReadOnly,inputMode:e.inputMode,onChange:function(t){!function(t){t.target===o.activeElement&&(e.inputStringRendered=t.target.value)}(t)},onBlur:this.blur,onFocus:this.focus})),this.createClearButton())},t.prototype.createClearButton=function(){if(!this.question.allowClear||!this.question.cssClasses.cleanButtonIconId)return null;var e={display:this.question.showClearButton?"":"none"};return r.createElement("div",{className:this.question.cssClasses.cleanButton,style:e,onClick:this.clear,"aria-hidden":"true"},r.createElement(E,{className:this.question.cssClasses.cleanButtonSvg,iconName:this.question.cssClasses.cleanButtonIconId,title:this.question.clearCaption,size:"auto"}))},t.prototype.createChevronButton=function(){return this.question.cssClasses.chevronButtonIconId?r.createElement("div",{className:this.question.cssClasses.chevronButton,"aria-hidden":"true",onPointerDown:this.chevronPointerDown},r.createElement(E,{className:this.question.cssClasses.chevronButtonSvg,iconName:this.question.cssClasses.chevronButtonIconId,size:"auto"})):null},t.prototype.renderOther=function(e){return r.createElement("div",{className:this.question.getCommentAreaCss(!0)},r.createElement(Y,{question:this.question,otherCss:e.other,cssClasses:e,isDisplayMode:this.isDisplayMode,isOther:!0}))},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateInputDomElement()},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.updateInputDomElement()},t.prototype.updateInputDomElement=function(){if(this.inputElement){var e=this.inputElement,t=this.question.dropdownListModel.inputStringRendered;i.Helpers.isTwoValueEquals(t,e.value,!1,!0,!1)||(e.value=this.question.dropdownListModel.inputStringRendered)}},t}(d),et=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tt=function(e){function t(t){return e.call(this,t)||this}return et(t,e),t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.isOtherSelected?this.renderOther(e):null,n=this.renderSelect(e);return r.createElement("div",{className:this.question.renderCssRoot},n,t)},t}(Xe);W.Instance.registerQuestion("dropdown",(function(e){return r.createElement(tt,e)}));var nt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rt=function(e){function t(t){return e.call(this,t)||this}return nt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.item&&!!this.question},t.prototype.renderElement=function(){var e=this,t=this.renderLocString(this.item.locText);return r.createElement("div",{className:"sv-tagbox__item"},r.createElement("div",{className:"sv-tagbox__item-text"},t),r.createElement("div",{className:this.question.cssClasses.cleanItemButton,onClick:function(t){e.question.dropdownListModel.deselectItem(e.item.value),t.stopPropagation()}},r.createElement(E,{className:this.question.cssClasses.cleanItemButtonSvg,iconName:this.question.cssClasses.cleanItemButtonIconId,size:"auto"})))},t}(p),ot=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),it=function(e){function t(t){return e.call(this,t)||this}return ot(t,e),t.prototype.renderItem=function(e,t){return r.createElement(rt,{key:e,question:this.question,item:t})},t.prototype.renderInput=function(e){var t=this,n=e,o=this.question.selectedChoices.map((function(e,n){return t.renderItem("item"+n,e)}));return r.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),tabIndex:e.noTabIndex?void 0:0,disabled:this.question.isInputReadOnly,required:this.question.isRequired,onKeyDown:this.keyhandler,onBlur:this.blur,role:this.question.ariaRole,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy,"aria-expanded":null===this.question.ariaExpanded?void 0:"true"===this.question.ariaExpanded,"aria-controls":e.listElementId,"aria-activedescendant":e.ariaActivedescendant},r.createElement("div",{className:this.question.cssClasses.controlValue},o,r.createElement(Ge,{model:n,question:this.question})),this.createClearButton())},t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.isOtherSelected?this.renderOther(e):null,n=this.renderSelect(e);return r.createElement("div",{className:this.question.renderCssRoot},n,t)},t.prototype.renderReadOnlyElement=function(){return this.question.locReadOnlyText?this.renderLocString(this.question.locReadOnlyText):null},t}(Xe);W.Instance.registerQuestion("tagbox",(function(e){return r.createElement(it,e)}));var st=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),at=function(e){function t(t){return e.call(this,t)||this}return st(t,e),t.prototype.renderSelect=function(e){var t=this,n=this.isDisplayMode?r.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),disabled:!0},this.question.readOnlyText):r.createElement("select",{id:this.question.inputId,className:this.question.getControlClass(),ref:function(e){return t.setControl(e)},autoComplete:this.question.autocomplete,onChange:this.updateValueOnEvent,onInput:this.updateValueOnEvent,onClick:function(e){t.question.onClick(e)},onKeyUp:function(e){t.question.onKeyUp(e)},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy,required:this.question.isRequired},this.question.allowClear?r.createElement("option",{value:""},this.question.placeholder):null,this.question.visibleChoices.map((function(e,t){return r.createElement(Ze,{key:"item"+t,item:e})})));return r.createElement("div",{className:e.selectWrapper},n,this.createChevronButton())},t}(tt);W.Instance.registerQuestion("sv-dropdown-select",(function(e){return r.createElement(at,e)})),i.RendererFactory.Instance.registerRenderer("dropdown","select","sv-dropdown-select");var ut=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lt=function(e){function t(t){var n=e.call(this,t)||this;return n.state={rowsChanged:0},n}return ut(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(e.prototype.componentDidMount.call(this),this.question){var t=this;this.question.visibleRowsChangedCallback=function(){t.setState({rowsChanged:t.state.rowsChanged+1})}}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question&&(this.question.visibleRowsChangedCallback=null)},t.prototype.renderElement=function(){for(var e=this,t=this.question.cssClasses,n=this.question.hasRows?r.createElement("td",null):null,o=[],i=0;i<this.question.visibleColumns.length;i++){var s=this.question.visibleColumns[i],a="column"+i,u=this.renderLocString(s.locText),l={};this.question.columnMinWidth&&(l.minWidth=this.question.columnMinWidth,l.width=this.question.columnMinWidth),o.push(r.createElement("th",{className:this.question.cssClasses.headerCell,style:l,key:a},this.wrapCell({column:s},u,"column-header")))}var c=[],p=this.question.visibleRows;for(i=0;i<p.length;i++){var h=p[i];a="row-"+h.name+"-"+i;c.push(r.createElement(ct,{key:a,question:this.question,cssClasses:t,row:h,isFirst:0==i}))}var d=this.question.showHeader?r.createElement("thead",null,r.createElement("tr",null,n,o)):null;return r.createElement("div",{className:t.tableWrapper,ref:function(t){return e.setControl(t)}},r.createElement("fieldset",null,r.createElement("legend",{className:"sv-hidden"},this.question.locTitle.renderedHtml),r.createElement("table",{className:this.question.getTableCss()},d,r.createElement("tbody",null,c))))},t}(h),ct=function(e){function t(t){return e.call(this,t)||this}return ut(t,e),t.prototype.getStateElement=function(){return this.row?this.row.item:e.prototype.getStateElement.call(this)},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.row},enumerable:!1,configurable:!0}),t.prototype.wrapCell=function(e,t,n){if(!n)return t;var r=this.question.survey,o=null;return r&&(o=a.wrapMatrixCell(r,t,e,n)),null!=o?o:t},t.prototype.canRender=function(){return!!this.row},t.prototype.renderElement=function(){var e=null;if(this.question.hasRows){var t=this.renderLocString(this.row.locText),n={};this.question.rowTitleWidth&&(n.minWidth=this.question.rowTitleWidth,n.width=this.question.rowTitleWidth),e=r.createElement("td",{style:n,className:this.row.rowTextClasses},this.wrapCell({row:this.row},t,"row-header"))}var o=this.generateTds();return r.createElement("tr",{className:this.row.rowClasses||void 0},e,o)},t.prototype.generateTds=function(){for(var e=this,t=[],n=this.row,o=this.question.cellComponent,i=function(){var i=null,l=a.question.visibleColumns[u],c="value"+u,p=a.question.getItemClass(n,l);if(a.question.hasCellText){var h=function(t){return function(){return e.cellClick(n,t)}};i=r.createElement("td",{key:c,className:p,onClick:h?h(l):function(){}},a.renderLocString(a.question.getCellDisplayLocText(n.name,l)))}else{var d=s.Instance.createElement(o,{question:a.question,row:a.row,column:l,columnIndex:u,cssClasses:a.cssClasses,cellChanged:function(){e.cellClick(e.row,l)}});i=r.createElement("td",{key:c,"data-responsive-title":l.locText.renderedHtml,className:a.question.cssClasses.cell},d)}t.push(i)},a=this,u=0;u<this.question.visibleColumns.length;u++)i();return t},t.prototype.cellClick=function(e,t){e.value=t.value,this.setState({value:this.row.value})},t}(p),pt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnMouseDown=n.handleOnMouseDown.bind(n),n.handleOnChange=n.handleOnChange.bind(n),n}return ut(t,e),t.prototype.handleOnChange=function(e){this.props.cellChanged&&this.props.cellChanged()},t.prototype.handleOnMouseDown=function(e){this.question.onMouseDown()},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.row},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"column",{get:function(){return this.props.column},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"columnIndex",{get:function(){return this.props.columnIndex},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.question&&!!this.row},t.prototype.renderElement=function(){var e=this.row.value==this.column.value,t=this.question.inputId+"_"+this.row.name+"_"+this.columnIndex,n=this.question.getItemClass(this.row,this.column),o=this.question.isMobile?r.createElement("span",{className:this.question.cssClasses.cellResponsiveTitle},this.renderLocString(this.column.locText)):void 0;return r.createElement("label",{onMouseDown:this.handleOnMouseDown,className:n},this.renderInput(t,e),r.createElement("span",{className:this.question.cssClasses.materialDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:this.cssClasses.itemDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null),o)},t.prototype.renderInput=function(e,t){return r.createElement("input",{id:e,type:"radio",className:this.cssClasses.itemValue,name:this.row.fullName,value:this.column.value,disabled:this.row.isReadOnly,checked:t,onChange:this.handleOnChange,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.getCellAriaLabel(this.row.locText.renderedHtml,this.column.locText.renderedHtml),"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-describedby":this.question.a11y_input_ariaDescribedBy})},t}(p);s.Instance.registerElement("survey-matrix-cell",(function(e){return r.createElement(pt,e)})),W.Instance.registerQuestion("matrix",(function(e){return r.createElement(lt,e)}));var ht=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dt=function(e){function t(t){return e.call(this,t)||this}return ht(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.reactOnStrChanged()},t.prototype.componentWillUnmount=function(){this.question.locHtml.onChanged=function(){}},t.prototype.componentDidUpdate=function(e,t){this.reactOnStrChanged()},t.prototype.reactOnStrChanged=function(){var e=this;this.question.locHtml.onChanged=function(){e.setState({changed:e.state&&e.state.changed?e.state.changed+1:1})}},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&!!this.question.html},t.prototype.renderElement=function(){var e={__html:this.question.locHtml.renderedHtml};return r.createElement("div",{className:this.question.renderCssRoot,dangerouslySetInnerHTML:e})},t}(h);W.Instance.registerQuestion("html",(function(e){return r.createElement(dt,e)}));var ft=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ft(t,e),t.prototype.render=function(){return r.createElement("div",{className:"sd-loading-indicator"},r.createElement(E,{iconName:"icon-loading",size:"auto"}))},t}(r.Component),yt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gt=function(e){function t(t){return e.call(this,t)||this}return yt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.allowShowPreview?this.renderPreview():null,n=this.question.showLoadingIndicator?this.renderLoadingIndicator():null,o=this.question.isPlayingVideo?this.renderVideo():null,i=this.question.showFileDecorator?this.renderFileDecorator():null,s=this.question.showRemoveButton?this.renderClearButton(this.question.cssClasses.removeButton):null,a=this.question.showRemoveButtonBottom?this.renderClearButton(this.question.cssClasses.removeButtonBottom):null,u=this.question.fileNavigatorVisible?r.createElement(L,{model:this.question.fileNavigator}):null,l=this.isDisplayMode?r.createElement("input",{type:"file",disabled:this.isDisplayMode,className:this.isDisplayMode?this.question.getReadOnlyFileCss():this.question.cssClasses.fileInput,id:this.question.inputId,ref:function(t){return e.setControl(t)},style:this.isDisplayMode?{color:"transparent"}:{},onChange:this.isDisplayMode?function(){}:this.question.doChange,multiple:this.question.allowMultiple,placeholder:this.question.title,accept:this.question.acceptedTypes}):this.question.hasFileUI?r.createElement("input",{type:"file",disabled:this.isDisplayMode,tabIndex:-1,className:this.isDisplayMode?this.question.getReadOnlyFileCss():this.question.cssClasses.fileInput,id:this.question.inputId,ref:function(t){return e.setControl(t)},style:this.isDisplayMode?{color:"transparent"}:{},onChange:this.isDisplayMode?function(){}:this.question.doChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy,multiple:this.question.allowMultiple,title:this.question.inputTitle,accept:this.question.acceptedTypes,capture:this.question.renderCapture}):null;return r.createElement("div",{className:this.question.fileRootCss},l,r.createElement("div",{className:this.question.cssClasses.dragArea,onDrop:this.question.onDrop,onDragOver:this.question.onDragOver,onDragLeave:this.question.onDragLeave,onDragEnter:this.question.onDragEnter},i,n,o,s,t,a,u))},t.prototype.renderFileDecorator=function(){var e=this.question.showChooseButton?this.renderChooseButton():null,t=this.question.actionsContainerVisible?r.createElement(L,{model:this.question.actionsContainer}):null,n=this.question.isEmpty()?r.createElement("span",{className:this.question.cssClasses.noFileChosen},this.question.noFileChosenCaption):null;return r.createElement("div",{className:this.question.getFileDecoratorCss()},r.createElement("span",{className:this.question.cssClasses.dragAreaPlaceholder},this.renderLocString(this.question.locRenderedPlaceholder)),r.createElement("div",{className:this.question.cssClasses.wrapper},e,t,n))},t.prototype.renderChooseButton=function(){return r.createElement(bt,{data:{question:this.question}})},t.prototype.renderClearButton=function(e){return this.question.isUploading?null:r.createElement("button",{type:"button",onClick:this.question.doClean,className:e},r.createElement("span",null,this.question.clearButtonCaption),this.question.cssClasses.removeButtonIconId?r.createElement(E,{iconName:this.question.cssClasses.removeButtonIconId,size:"auto",title:this.question.clearButtonCaption}):null)},t.prototype.renderPreview=function(){return s.Instance.createElement("sv-file-preview",{question:this.question})},t.prototype.renderLoadingIndicator=function(){return r.createElement("div",{className:this.question.cssClasses.loadingIndicator},r.createElement(mt,null))},t.prototype.renderVideo=function(){return r.createElement("div",{className:this.question.cssClasses.videoContainer},r.createElement(P,{item:this.question.changeCameraAction}),r.createElement(P,{item:this.question.closeCameraAction}),r.createElement("video",{autoPlay:!0,playsInline:!0,id:this.question.videoId,className:this.question.cssClasses.video}),r.createElement(P,{item:this.question.takePictureAction}))},t}(h);W.Instance.registerQuestion("file",(function(e){return r.createElement(gt,e)}));var vt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bt=function(e){function t(t){return e.call(this,t)||this}return vt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item&&this.props.item.data.question||this.props.data.question},enumerable:!1,configurable:!0}),t.prototype.render=function(){return Oe(o.a.createElement("label",{tabIndex:0,className:this.question.getChooseFileCss(),htmlFor:this.question.inputId,"aria-label":this.question.chooseButtonText},this.question.cssClasses.chooseFileIconId?o.a.createElement(E,{title:this.question.chooseButtonText,iconName:this.question.cssClasses.chooseFileIconId,size:"auto"}):null,o.a.createElement("span",null,this.question.chooseButtonText)))},t}(p);s.Instance.registerElement("sv-file-choose-btn",(function(e){return o.a.createElement(bt,e)}));var Ct=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Et=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ct(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.renderFileSign=function(e,t){var n=this;return e&&t.name?o.a.createElement("div",{className:e},o.a.createElement("a",{href:t.content,onClick:function(e){n.question.doDownloadFile(e,t)},title:t.name,download:t.name,style:{width:this.question.imageWidth}},t.name)):null},t.prototype.renderElement=function(){var e=this,t=this.question.previewValue.map((function(t,n){return t?o.a.createElement("span",{key:e.question.inputId+"_"+n,className:e.question.cssClasses.preview,style:{display:e.question.isPreviewVisible(n)?void 0:"none"}},e.renderFileSign(e.question.cssClasses.fileSign,t),o.a.createElement("div",{className:e.question.getImageWrapperCss(t)},e.question.canPreviewImage(t)?o.a.createElement("img",{src:t.content,style:{height:e.question.imageHeight,width:e.question.imageWidth},alt:"File preview"}):e.question.cssClasses.defaultImage?o.a.createElement(E,{iconName:e.question.cssClasses.defaultImageIconId,size:"auto",className:e.question.cssClasses.defaultImage}):null,t.name&&!e.question.isReadOnly?o.a.createElement("div",{className:e.question.getRemoveButtonCss(),onClick:function(){return e.question.doRemoveFile(t)}},o.a.createElement("span",{className:e.question.cssClasses.removeFile},e.question.removeFileCaption),e.question.cssClasses.removeFileSvgIconId?o.a.createElement(E,{title:e.question.removeFileCaption,iconName:e.question.cssClasses.removeFileSvgIconId,size:"auto",className:e.question.cssClasses.removeFileSvg}):null):null),e.renderFileSign(e.question.cssClasses.fileSignBottom,t)):null}));return o.a.createElement("div",{className:this.question.cssClasses.fileList||void 0},t)},t.prototype.canRender=function(){return this.question.showPreviewContainer},t}(c);s.Instance.registerElement("sv-file-preview",(function(e){return o.a.createElement(Et,e)}));var qt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wt=function(e){function t(t){return e.call(this,t)||this}return qt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){for(var e=this.question.cssClasses,t=this.question.getRows(),n=[],o=0;o<t.length;o++)t[o].isVisible&&n.push(this.renderRow(o,t[o].cells,e));return r.createElement("table",{className:this.question.getQuestionRootCss()},r.createElement("tbody",null,n))},t.prototype.renderCell=function(e,t,n){var o;return o=e.isErrorsCell?r.createElement(se,{question:e.item.editor,creator:this.creator}):r.createElement(Ot,{question:this.question,item:e.item,creator:this.creator,cssClasses:t}),r.createElement("td",{key:"item"+n,className:e.className,onFocus:function(){e.item.focusIn()}},o)},t.prototype.renderRow=function(e,t,n){for(var o="item"+e,i=[],s=0;s<t.length;s++){var a=t[s];i.push(this.renderCell(a,n,s))}return r.createElement("tr",{key:o,className:n.row},i)},t}(h),Ot=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return qt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElements=function(){return[this.item,this.item.editor]},Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this.item,t=this.cssClasses,n={};return this.question.itemTitleWidth&&(n.minWidth=this.question.itemTitleWidth,n.width=this.question.itemTitleWidth),r.createElement("label",{className:this.question.getItemLabelCss(e)},r.createElement("span",{className:t.itemTitle,style:n},r.createElement(B,{element:e.editor,cssClasses:e.editor.cssClasses})),r.createElement(Pt,{cssClasses:t,itemCss:this.question.getItemCss(),question:e.editor,creator:this.creator}))},t}(p),Pt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return qt(t,e),t.prototype.renderElement=function(){return r.createElement("div",{className:this.itemCss},this.renderContent())},t}(oe);W.Instance.registerQuestion("multipletext",(function(e){return r.createElement(wt,e)}));var xt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),St=function(e){function t(t){return e.call(this,t)||this}return xt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=null;return this.question.showClearButtonInContent&&(n=r.createElement("div",null,r.createElement("input",{type:"button",className:this.question.cssClasses.clearButton,onClick:function(){return e.question.clearValue()},value:this.question.clearButtonCaption}))),r.createElement("fieldset",{className:this.question.getSelectBaseRootCss(),ref:function(t){return e.setControl(t)},role:this.question.a11y_input_ariaRole,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-describedby":this.question.a11y_input_ariaDescribedBy},this.question.hasColumns?this.getColumnedBody(t):this.getBody(t),this.getFooter(),this.question.isOtherSelected?this.renderOther(t):null,n)},t.prototype.getFooter=function(){var e=this;if(this.question.hasFootItems)return this.question.footItems.map((function(t,n){return e.renderItem("item_f"+n,t,!1,e.question.cssClasses)}))},t.prototype.getColumnedBody=function(e){return r.createElement("div",{className:e.rootMultiColumn},this.getColumns(e))},t.prototype.getColumns=function(e){var t=this,n=this.getStateValue();return this.question.columns.map((function(o,i){var s=o.map((function(r,o){return t.renderItem("item"+i+o,r,n,e,""+i+o)}));return r.createElement("div",{key:"column"+i,className:t.question.getColumnClass(),role:"presentation"},s)}))},t.prototype.getBody=function(e){return this.question.blockedRow?r.createElement("div",{className:e.rootRow},this.getItems(e,this.question.dataChoices)):r.createElement(r.Fragment,null,this.getItems(e,this.question.bodyItems))},t.prototype.getItems=function(e,t){for(var n=[],r=this.getStateValue(),o=0;o<t.length;o++){var i=t[o],s=this.renderItem("item"+o,i,r,e,""+o);n.push(s)}return n},Object.defineProperty(t.prototype,"textStyle",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.renderOther=function(e){return r.createElement("div",{className:this.question.getCommentAreaCss(!0)},r.createElement(Y,{question:this.question,otherCss:e.other,cssClasses:e,isDisplayMode:this.isDisplayMode}))},t.prototype.renderItem=function(e,t,n,r,o){var i=s.Instance.createElement(this.question.itemComponent,{key:e,question:this.question,cssClasses:r,isDisplayMode:this.isDisplayMode,item:t,textStyle:this.textStyle,index:o,isChecked:n===t.value}),u=this.question.survey,l=null;return u&&(l=a.wrapItemValue(u,i,this.question,t)),null!=l?l:i},t.prototype.getStateValue=function(){return this.question.isEmpty()?"":this.question.renderedValue},t}(h),_t=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n.handleOnMouseDown=n.handleOnMouseDown.bind(n),n}return xt(t,e),t.prototype.getStateElement=function(){return this.item},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textStyle",{get:function(){return this.props.textStyle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isChecked",{get:function(){return this.props.isChecked},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hideCaption",{get:function(){return!0===this.props.hideCaption},enumerable:!1,configurable:!0}),t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(!!this.question&&!(this.question.customWidget&&!this.question.customWidgetData.isNeedRender&&!this.question.customWidget.widgetJson.isDefaultRender&&!this.question.customWidget.widgetJson.render))},t.prototype.handleOnChange=function(e){this.question.clickItemHandler(this.item)},t.prototype.handleOnMouseDown=function(e){this.question.onMouseDown()},t.prototype.canRender=function(){return!!this.question&&!!this.item},t.prototype.renderElement=function(){var e=this.question.getItemClass(this.item),t=this.question.getLabelClass(this.item),n=this.question.getControlLabelClass(this.item),o=this.hideCaption?null:r.createElement("span",{className:n},this.renderLocString(this.item.locText,this.textStyle));return r.createElement("div",{className:e,role:"presentation"},r.createElement("label",{onMouseDown:this.handleOnMouseDown,className:t},r.createElement("input",{"aria-describedby":this.question.ariaDescribedBy,className:this.cssClasses.itemControl,id:this.question.getItemId(this.item),type:"radio",name:this.question.questionName,checked:this.isChecked,value:this.item.value,disabled:!this.question.getItemEnabled(this.item),onChange:this.handleOnChange}),this.cssClasses.materialDecorator?r.createElement("span",{className:this.cssClasses.materialDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:this.cssClasses.itemDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,o))},t}(p);s.Instance.registerElement("survey-radiogroup-item",(function(e){return r.createElement(_t,e)})),W.Instance.registerQuestion("radiogroup",(function(e){return r.createElement(St,e)}));var Nt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),It=function(e){function t(t){return e.call(this,t)||this}return Nt(t,e),t.prototype.renderInput=function(){var e=this,t=this.question.getControlClass(),n=this.question.renderedPlaceholder;if(this.question.isReadOnlyRenderDiv())return r.createElement("div",null,this.question.value);var o=this.question.getMaxLength()?r.createElement(Q,{counter:this.question.characterCounter,remainingCharacterCounter:this.question.cssClasses.remainingCharacterCounter}):null;return r.createElement(r.Fragment,null,r.createElement("input",{id:this.question.inputId,disabled:this.isDisplayMode,className:t,type:this.question.inputType,ref:function(t){return e.setControl(t)},style:this.question.inputStyle,maxLength:this.question.getMaxLength(),min:this.question.renderedMin,max:this.question.renderedMax,step:this.question.renderedStep,size:this.question.inputSize,placeholder:n,list:this.question.dataListId,autoComplete:this.question.autocomplete,onBlur:this.question.onBlur,onFocus:this.question.onFocus,onChange:this.question.onChange,onKeyUp:this.question.onKeyUp,onKeyDown:this.question.onKeyDown,onCompositionUpdate:function(t){return e.question.onCompositionUpdate(t.nativeEvent)},"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-describedby":this.question.a11y_input_ariaDescribedBy}),o)},t.prototype.renderElement=function(){return this.question.dataListId?r.createElement("div",null,this.renderInput(),this.renderDataList()):this.renderInput()},t.prototype.renderDataList=function(){if(!this.question.dataListId)return null;var e=this.question.dataList;if(0==e.length)return null;for(var t=[],n=0;n<e.length;n++)t.push(r.createElement("option",{key:"item"+n,value:e[n]}));return r.createElement("datalist",{id:this.question.dataListId},t)},t}(d);W.Instance.registerQuestion("text",(function(e){return r.createElement(It,e)}));var Vt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n.handleOnClick=n.handleOnClick.bind(n),n.handleOnLabelClick=n.handleOnLabelClick.bind(n),n.handleOnSwitchClick=n.handleOnSwitchClick.bind(n),n.handleOnKeyDown=n.handleOnKeyDown.bind(n),n.checkRef=r.createRef(),n}return Vt(t,e),t.prototype.getStateElement=function(){return this.question},Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.doCheck=function(e){this.question.booleanValue=e},t.prototype.handleOnChange=function(e){this.doCheck(e.target.checked)},t.prototype.handleOnClick=function(e){this.question.onLabelClick(e,!0)},t.prototype.handleOnSwitchClick=function(e){this.question.onSwitchClickModel(e.nativeEvent)},t.prototype.handleOnLabelClick=function(e,t){this.question.onLabelClick(e,t)},t.prototype.handleOnKeyDown=function(e){this.question.onKeyDownCore(e)},t.prototype.updateDomElement=function(){if(this.question){var t=this.checkRef.current;t&&(t.indeterminate=this.question.isIndeterminate),this.setControl(t),e.prototype.updateDomElement.call(this)}},t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=this.question.getItemCss();return r.createElement("div",{className:t.root,onKeyDown:this.handleOnKeyDown},r.createElement("label",{className:n,onClick:this.handleOnClick},r.createElement("input",{ref:this.checkRef,type:"checkbox",name:this.question.name,value:null===this.question.booleanValue?"":this.question.booleanValue,id:this.question.inputId,className:t.control,disabled:this.isDisplayMode,checked:this.question.booleanValue||!1,onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),r.createElement("div",{className:t.sliderGhost,onClick:function(t){return e.handleOnLabelClick(t,!1)}},r.createElement("span",{className:this.question.getLabelCss(!1)},this.renderLocString(this.question.locLabelFalse))),r.createElement("div",{className:t.switch,onClick:this.handleOnSwitchClick},r.createElement("span",{className:t.slider},this.question.isDeterminated&&t.sliderText?r.createElement("span",{className:t.sliderText},this.renderLocString(this.question.getCheckedLabel())):null)),r.createElement("div",{className:t.sliderGhost,onClick:function(t){return e.handleOnLabelClick(t,!0)}},r.createElement("span",{className:this.question.getLabelCss(!0)},this.renderLocString(this.question.locLabelTrue)))))},t}(h);W.Instance.registerQuestion("boolean",(function(e){return r.createElement(jt,e)}));var Tt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Rt=function(e){function t(t){return e.call(this,t)||this}return Tt(t,e),t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.getCheckboxItemCss(),n=this.question.canRenderLabelDescription?c.renderQuestionDescription(this.question):null;return r.createElement("div",{className:e.rootCheckbox},r.createElement("div",{className:t},r.createElement("label",{className:e.checkboxLabel},r.createElement("input",{ref:this.checkRef,type:"checkbox",name:this.question.name,value:null===this.question.booleanValue?"":this.question.booleanValue,id:this.question.inputId,className:e.controlCheckbox,disabled:this.isDisplayMode,checked:this.question.booleanValue||!1,onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),r.createElement("span",{className:e.checkboxMaterialDecorator},this.question.svgIcon?r.createElement("svg",{className:e.checkboxItemDecorator},r.createElement("use",{xlinkHref:this.question.svgIcon})):null,r.createElement("span",{className:"check"})),this.question.isLabelRendered&&r.createElement("span",{className:e.checkboxControlLabel,id:this.question.labelRenderedAriaID},r.createElement(F,{element:this.question,cssClasses:this.question.cssClasses}))),n))},t}(jt);W.Instance.registerQuestion("sv-boolean-checkbox",(function(e){return r.createElement(Rt,e)})),i.RendererFactory.Instance.registerRenderer("boolean","checkbox","sv-boolean-checkbox");var Dt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),At=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=function(e){n.question.booleanValue="true"==e.nativeEvent.target.value},n}return Dt(t,e),t.prototype.renderRadioItem=function(e,t){var n=this.question.cssClasses;return r.createElement("div",{role:"presentation",className:this.question.getRadioItemClass(n,e)},r.createElement("label",{className:n.radioLabel},r.createElement("input",{type:"radio",name:this.question.name,value:e,"aria-describedby":this.question.ariaDescribedBy,checked:e===this.question.booleanValueRendered,disabled:this.question.isInputReadOnly,className:n.itemRadioControl,onChange:this.handleOnChange}),this.question.cssClasses.materialRadioDecorator?r.createElement("span",{className:n.materialRadioDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:n.itemRadioDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,r.createElement("span",{className:n.radioControlLabel},this.renderLocString(t))))},t.prototype.renderElement=function(){var e=this.question.cssClasses;return r.createElement("div",{className:e.rootRadio},r.createElement("fieldset",{role:"presentation",className:e.radioFieldset},this.renderRadioItem(!1,this.question.locLabelFalse),this.renderRadioItem(!0,this.question.locLabelTrue)))},t}(jt);W.Instance.registerQuestion("sv-boolean-radio",(function(e){return r.createElement(At,e)})),i.RendererFactory.Instance.registerRenderer("boolean","radio","sv-boolean-radio");var Lt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),kt=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:n.question.value},n}return Lt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return r.createElement("div",null)},t}(h);W.Instance.registerQuestion("empty",(function(e){return r.createElement(kt,e)}));var Bt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mt=function(e){function t(t){var n=e.call(this,t)||this;return n.onPointerDownHandler=function(e){n.parentMatrix.onPointerDown(e.nativeEvent,n.model.row)},n}return Bt(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parentMatrix",{get:function(){return this.props.parentMatrix},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this,t=this.model;return t.visible?o.a.createElement("tr",{className:t.className,"data-sv-drop-target-matrix-row":t.row&&t.row.id,onPointerDown:function(t){return e.onPointerDownHandler(t)}},this.props.children):null},t}(c);s.Instance.registerElement("sv-matrix-row",(function(e){return o.a.createElement(Mt,e)}));var Ft=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ft(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item.data.question},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return this.question.iconDragElement?o.a.createElement("svg",{className:this.question.cssClasses.dragElementDecorator},o.a.createElement("use",{xlinkHref:this.question.iconDragElement})):o.a.createElement("span",{className:this.question.cssClasses.iconDrag})},t}(p);s.Instance.registerElement("sv-matrix-drag-drop-icon",(function(e){return o.a.createElement(zt,e)}));var Ht=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wt=function(e){function t(t){var n=e.call(this,t)||this;n.question.renderedTable;return n.state=n.getState(),n}return Ht(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.getState=function(e){return void 0===e&&(e=null),{rowCounter:e?e.rowCounter+1:0}},t.prototype.updateStateOnCallback=function(){this.isRendering||this.setState(this.getState(this.state))},t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this),this.question.visibleRowsChangedCallback=function(){t.updateStateOnCallback()},this.question.onRenderedTableResetCallback=function(){t.question.renderedTable.renderedRowsChangedCallback=function(){t.updateStateOnCallback()},t.updateStateOnCallback()},this.question.renderedTable.renderedRowsChangedCallback=function(){t.updateStateOnCallback()}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question.visibleRowsChangedCallback=function(){},this.question.onRenderedTableResetCallback=function(){},this.question.renderedTable.renderedRowsChangedCallback=function(){}},t.prototype.renderElement=function(){return this.renderTableDiv()},t.prototype.renderTableDiv=function(){var e=this,t=this.renderHeader(),n=this.renderFooter(),o=this.renderRows(),i=this.question.showHorizontalScroll?{overflowX:"scroll"}:{};return r.createElement("div",{style:i,className:this.question.cssClasses.tableWrapper,ref:function(t){return e.setControl(t)}},r.createElement("table",{className:this.question.getTableCss()},t,o,n))},t.prototype.renderHeader=function(){var e=this.question.renderedTable;if(!e.showHeader)return null;for(var t=[],n=e.headerRow.cells,o=0;o<n.length;o++){var i=n[o],s="column"+o,a={};i.width&&(a.width=i.width),i.minWidth&&(a.minWidth=i.minWidth);var u=this.renderCellContent(i,"column-header",{}),l=i.hasTitle?r.createElement("th",{className:i.className,key:s,style:a}," ",u," "):r.createElement("td",{className:i.className,key:s,style:a});t.push(l)}return r.createElement("thead",null,r.createElement("tr",null,t))},t.prototype.renderFooter=function(){var e=this.question.renderedTable;if(!e.showFooter)return null;var t=this.renderRow("footer",e.footerRow,this.question.cssClasses,"row-footer");return r.createElement("tfoot",null,t)},t.prototype.renderRows=function(){for(var e=this.question.cssClasses,t=[],n=this.question.renderedTable.rows,o=0;o<n.length;o++)t.push(this.renderRow(n[o].id,n[o],e));return r.createElement("tbody",null,t)},t.prototype.renderRow=function(e,t,n,o){for(var i=[],s=t.cells,a=0;a<s.length;a++)i.push(this.renderCell(s[a],a,n,o));var u="row"+e;return r.createElement(r.Fragment,{key:u},"row-footer"==o?r.createElement("tr",null,i):r.createElement(Mt,{model:t,parentMatrix:this.question},i))},t.prototype.renderCell=function(e,t,n,o){var i="cell"+t;if(e.hasQuestion)return r.createElement(Jt,{key:i,cssClasses:n,cell:e,creator:this.creator,reason:o});var s=o;s||(s=e.hasTitle?"row-header":"");var a=this.renderCellContent(e,s,n),u=null;return(e.width||e.minWidth)&&(u={},e.width&&(u.width=e.width),e.minWidth&&(u.minWidth=e.minWidth)),r.createElement("td",{className:e.className,key:i,style:u,colSpan:e.colSpans,"data-responsive-title":e.headers,title:e.getTitle()},a)},t.prototype.renderCellContent=function(e,t,n){var o=null,i=null;if((e.width||e.minWidth)&&(i={},e.width&&(i.width=e.width),e.minWidth&&(i.minWidth=e.minWidth)),e.hasTitle){t="row-header";var a=this.renderLocString(e.locTitle),u=e.column?r.createElement(Qt,{column:e.column,question:this.question}):null;o=r.createElement(r.Fragment,null,a,u)}if(e.isDragHandlerCell&&(o=r.createElement(r.Fragment,null,r.createElement(zt,{item:{data:{row:e.row,question:this.question}}}))),e.isActionsCell&&(o=s.Instance.createElement("sv-matrixdynamic-actions-cell",{question:this.question,cssClasses:n,cell:e,model:e.item.getData()})),e.hasPanel&&(o=r.createElement(Ie,{key:e.panel.id,element:e.panel,survey:this.question.survey,cssClasses:n,isDisplayMode:this.isDisplayMode,creator:this.creator})),e.isErrorsCell&&e.isErrorsCell)return r.createElement(se,{question:e.question,creator:this.creator});if(!o)return null;var l=r.createElement(r.Fragment,null,o);return this.wrapCell(e,l,t)},t}(h),Ut=function(e){function t(t){return e.call(this,t)||this}return Ht(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return r.createElement(L,{model:this.model,handleClick:!1})},t}(p);s.Instance.registerElement("sv-matrixdynamic-actions-cell",(function(e){return r.createElement(Ut,e)}));var Qt=function(e){function t(t){return e.call(this,t)||this}return Ht(t,e),Object.defineProperty(t.prototype,"column",{get:function(){return this.props.column},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.column},t.prototype.renderElement=function(){return this.column.isRenderedRequired?r.createElement(r.Fragment,null,r.createElement("span",null," "),r.createElement("span",{className:this.question.cssClasses.cellRequiredText},this.column.requiredText)):null},t}(p),Jt=function(e){function t(t){return e.call(this,t)||this}return Ht(t,e),Object.defineProperty(t.prototype,"cell",{get:function(){return this.props.cell},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemCss",{get:function(){return this.cell?this.cell.className:""},enumerable:!1,configurable:!0}),t.prototype.getQuestion=function(){var t=e.prototype.getQuestion.call(this);return t||(this.cell?this.cell.question:null)},t.prototype.doAfterRender=function(){var e=this.cellRef.current;if(e&&this.cell&&this.question&&this.question.survey&&"r"!==e.getAttribute("data-rendered")){e.setAttribute("data-rendered","r");var t={cell:this.cell,cellQuestion:this.question,htmlElement:e,row:this.cell.row,column:this.cell.cell.column};this.question.survey.matrixAfterCellRender(this.question,t),this.question.afterRenderCore(e)}},t.prototype.getShowErrors=function(){return this.question.isVisible&&(!this.cell.isChoice||this.cell.isFirstChoice)},t.prototype.getCellStyle=function(){var t=e.prototype.getCellStyle.call(this);return(this.cell.width||this.cell.minWidth)&&(t||(t={}),this.cell.width&&(t.width=this.cell.width),this.cell.minWidth&&(t.minWidth=this.cell.minWidth)),t},t.prototype.getHeaderText=function(){return this.cell.headers},t.prototype.renderQuestion=function(){return this.cell.isChoice?this.cell.isOtherChoice?this.renderOtherComment():this.cell.isCheckbox?this.renderCellCheckboxButton():this.renderCellRadiogroupButton():ne.renderQuestionBody(this.creator,this.question)},t.prototype.renderOtherComment=function(){var e=this.cell.question,t=e.cssClasses||{};return r.createElement(Y,{question:e,cssClasses:t,otherCss:t.other,isDisplayMode:e.isInputReadOnly})},t.prototype.renderCellCheckboxButton=function(){var e=this.cell.question.id+"item"+this.cell.choiceIndex;return r.createElement(De,{key:e,question:this.cell.question,cssClasses:this.cell.question.cssClasses,isDisplayMode:this.cell.question.isInputReadOnly,item:this.cell.item,isFirst:this.cell.isFirstChoice,index:this.cell.choiceIndex.toString(),hideCaption:!0})},t.prototype.renderCellRadiogroupButton=function(){var e=this.cell.question.id+"item"+this.cell.choiceIndex;return r.createElement(_t,{key:e,question:this.cell.question,cssClasses:this.cell.question.cssClasses,isDisplayMode:this.cell.question.isInputReadOnly,item:this.cell.item,index:this.cell.choiceIndex.toString(),isChecked:this.cell.question.value===this.cell.item.value,isDisabled:this.cell.question.isReadOnly||!this.cell.item.isEnabled,hideCaption:!0})},t}(ie),Kt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gt=function(e){function t(t){return e.call(this,t)||this}return Kt(t,e),t}(Wt);W.Instance.registerQuestion("matrixdropdown",(function(e){return r.createElement(Gt,e)}));var Yt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnRowAddClick=n.handleOnRowAddClick.bind(n),n}return Yt(t,e),Object.defineProperty(t.prototype,"matrix",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.handleOnRowAddClick=function(e){this.matrix.addRowUI()},t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.renderedTable.showTable?this.renderTableDiv():this.renderNoRowsContent(e);return r.createElement("div",null,this.renderAddRowButtonOnTop(e),t,this.renderAddRowButtonOnBottom(e))},t.prototype.renderAddRowButtonOnTop=function(e){return this.matrix.renderedTable.showAddRowOnTop?this.renderAddRowButton(e):null},t.prototype.renderAddRowButtonOnBottom=function(e){return this.matrix.renderedTable.showAddRowOnBottom?this.renderAddRowButton(e):null},t.prototype.renderNoRowsContent=function(e){var t=this.renderLocString(this.matrix.locEmptyRowsText),n=r.createElement("div",{className:e.emptyRowsText},t),o=this.matrix.renderedTable.showAddRow?this.renderAddRowButton(e,!0):void 0;return r.createElement("div",{className:e.emptyRowsSection},n,o)},t.prototype.renderAddRowButton=function(e,t){return void 0===t&&(t=!1),s.Instance.createElement("sv-matrixdynamic-add-btn",{question:this.question,cssClasses:e,isEmptySection:t})},t}(Wt);W.Instance.registerQuestion("matrixdynamic",(function(e){return r.createElement(Zt,e)}));var $t=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnRowAddClick=n.handleOnRowAddClick.bind(n),n}return Yt(t,e),Object.defineProperty(t.prototype,"matrix",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.handleOnRowAddClick=function(e){this.matrix.addRowUI()},t.prototype.renderElement=function(){var e=this.renderLocString(this.matrix.locAddRowText),t=r.createElement("button",{className:this.matrix.getAddRowButtonCss(this.props.isEmptySection),type:"button",disabled:this.matrix.isInputReadOnly,onClick:this.matrix.isDesignMode?void 0:this.handleOnRowAddClick},e,r.createElement("span",{className:this.props.cssClasses.iconAdd}));return this.props.isEmptySection?t:r.createElement("div",{className:this.props.cssClasses.footer},t)},t}(p);s.Instance.registerElement("sv-matrixdynamic-add-btn",(function(e){return r.createElement($t,e)}));var Xt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),en=function(e){function t(t){return e.call(this,t)||this}return Xt(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this.props.item&&this.props.item.data||this.props.data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item&&this.props.item.data.question||this.props.data.question},enumerable:!1,configurable:!0}),t}(p),tn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.addPanelUI()},t}return Xt(t,e),t.prototype.renderElement=function(){if(!this.question.canAddPanel)return null;var e=this.renderLocString(this.question.locPanelAddText);return o.a.createElement("button",{type:"button",className:this.question.getAddButtonCss(),onClick:this.handleClick},o.a.createElement("span",{className:this.question.cssClasses.buttonAddText},e))},t}(en);s.Instance.registerElement("sv-paneldynamic-add-btn",(function(e){return o.a.createElement(tn,e)}));var nn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.goToNextPanel()},t}return nn(t,e),t.prototype.renderElement=function(){return o.a.createElement("div",{title:this.question.panelNextText,onClick:this.handleClick,className:this.question.getNextButtonCss()},o.a.createElement(E,{iconName:this.question.cssClasses.progressBtnIcon,size:"auto"}))},t}(en);s.Instance.registerElement("sv-paneldynamic-next-btn",(function(e){return o.a.createElement(rn,e)}));var on=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.goToPrevPanel()},t}return on(t,e),t.prototype.renderElement=function(){return o.a.createElement("div",{title:this.question.panelPrevText,onClick:this.handleClick,className:this.question.getPrevButtonCss()},o.a.createElement(E,{iconName:this.question.cssClasses.progressBtnIcon,size:"auto"}))},t}(en);s.Instance.registerElement("sv-paneldynamic-prev-btn",(function(e){return o.a.createElement(sn,e)}));var an=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),un=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return an(t,e),t.prototype.renderElement=function(){return o.a.createElement("div",{className:this.question.cssClasses.progressText},this.question.progressText)},t}(en);s.Instance.registerElement("sv-paneldynamic-progress-text",(function(e){return o.a.createElement(un,e)}));var ln=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cn=function(e){function t(t){return e.call(this,t)||this}return ln(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.setState({panelCounter:0});var t=this;this.question.panelCountChangedCallback=function(){t.updateQuestionRendering()},this.question.currentIndexChangedCallback=function(){t.updateQuestionRendering()},this.question.renderModeChangedCallback=function(){t.updateQuestionRendering()}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question.panelCountChangedCallback=function(){},this.question.currentIndexChangedCallback=function(){},this.question.renderModeChangedCallback=function(){}},t.prototype.updateQuestionRendering=function(){this.setState({panelCounter:this.state?this.state.panelCounter+1:1})},t.prototype.renderElement=function(){var e=[];if(this.question.isRenderModeList)for(var t=0;t<this.question.panels.length;t++){var n=this.question.panels[t];e.push(r.createElement(pn,{key:n.id,element:n,question:this.question,index:t,cssClasses:this.question.cssClasses,isDisplayMode:this.isDisplayMode,creator:this.creator}))}else if(null!=this.question.currentPanel){n=this.question.currentPanel;e.push(r.createElement(pn,{key:this.question.currentIndex,element:n,question:this.question,index:this.question.currentIndex,cssClasses:this.question.cssClasses,isDisplayMode:this.isDisplayMode,creator:this.creator}))}var o=this.question.isRenderModeList&&this.question.showLegacyNavigation?this.renderAddRowButton():null,i=this.question.isProgressTopShowing?this.renderNavigator():null,s=this.question.isProgressBottomShowing?this.renderNavigator():null,a=this.renderNavigatorV2(),u=this.renderPlaceholder();return r.createElement("div",{className:this.question.cssClasses.root},u,i,e,s,o,a)},t.prototype.renderNavigator=function(){if(!this.question.showLegacyNavigation)return this.question.isRangeShowing&&this.question.isProgressTopShowing?this.renderRange():null;var e=this.question.isRangeShowing?this.renderRange():null,t=this.rendrerPrevButton(),n=this.rendrerNextButton(),o=this.renderAddRowButton(),i=this.question.isProgressTopShowing?this.question.cssClasses.progressTop:this.question.cssClasses.progressBottom;return r.createElement("div",{className:i},r.createElement("div",{style:{clear:"both"}},r.createElement("div",{className:this.question.cssClasses.progressContainer},t,e,n),o,this.renderProgressText()))},t.prototype.renderProgressText=function(){return r.createElement(un,{data:{question:this.question}})},t.prototype.rendrerPrevButton=function(){return r.createElement(sn,{data:{question:this.question}})},t.prototype.rendrerNextButton=function(){return r.createElement(rn,{data:{question:this.question}})},t.prototype.renderRange=function(){return r.createElement("div",{className:this.question.cssClasses.progress},r.createElement("div",{className:this.question.cssClasses.progressBar,style:{width:this.question.progress},role:"progressbar"}))},t.prototype.renderAddRowButton=function(){return s.Instance.createElement("sv-paneldynamic-add-btn",{data:{question:this.question}})},t.prototype.renderNavigatorV2=function(){if(!this.question.showNavigation)return null;var e=this.question.isRangeShowing&&this.question.isProgressBottomShowing?this.renderRange():null;return r.createElement("div",{className:this.question.cssClasses.footer},r.createElement("hr",{className:this.question.cssClasses.separator}),e,this.question.footerToolbar.visibleActions.length?r.createElement("div",{className:this.question.cssClasses.footerButtonsContainer},r.createElement(L,{model:this.question.footerToolbar})):null)},t.prototype.renderPlaceholder=function(){return this.question.getShowNoEntriesPlaceholder()?r.createElement("div",{className:this.question.cssClasses.noEntriesPlaceholder},r.createElement("span",null,this.renderLocString(this.question.locNoEntriesText)),this.renderAddRowButton()):null},t}(h),pn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ln(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),t.prototype.getSurvey=function(){return this.question?this.question.survey:null},t.prototype.getCss=function(){var e=this.getSurvey();return e?e.getCss():{}},t.prototype.render=function(){var t=e.prototype.render.call(this),n=this.renderButton(),o=this.question.showSeparator(this.index)?r.createElement("hr",{className:this.question.cssClasses.separator}):null;return r.createElement(r.Fragment,null,r.createElement("div",{className:this.question.getPanelWrapperCss()},t,n),o)},t.prototype.renderButton=function(){return"right"!==this.question.panelRemoveButtonLocation||!this.question.canRemovePanel||this.question.isRenderModeList&&this.panel.isCollapsed?null:s.Instance.createElement("sv-paneldynamic-remove-btn",{data:{question:this.question,panel:this.panel}})},t}(Ie);W.Instance.registerQuestion("paneldynamic",(function(e){return r.createElement(cn,e)}));var hn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dn=function(e){function t(t){return e.call(this,t)||this}return hn(t,e),Object.defineProperty(t.prototype,"isTop",{get:function(){return this.props.isTop},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progress",{get:function(){return this.survey.progressValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progressText",{get:function(){return this.survey.progressText},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e={width:this.progress+"%"};return r.createElement("div",{className:this.survey.getProgressCssClasses(this.props.container)},r.createElement("div",{style:e,className:this.css.progressBar,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-label":"progress"},r.createElement("span",{className:i.SurveyProgressModel.getProgressTextInBarCss(this.css)},this.progressText)),r.createElement("span",{className:i.SurveyProgressModel.getProgressTextUnderBarCss(this.css)},this.progressText))},t}(xe);s.Instance.registerElement("sv-progress-pages",(function(e){return r.createElement(dn,e)})),s.Instance.registerElement("sv-progress-questions",(function(e){return r.createElement(dn,e)})),s.Instance.registerElement("sv-progress-correctquestions",(function(e){return r.createElement(dn,e)})),s.Instance.registerElement("sv-progress-requiredquestions",(function(e){return r.createElement(dn,e)}));var fn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mn=function(e){function t(t){var n=e.call(this,t)||this;return n.updateScroller=void 0,n.progressButtonsModel=new i.SurveyProgressButtonsModel(n.survey),n.listContainerRef=r.createRef(),n}return fn(t,e),t.prototype.render=function(){var e=this;return r.createElement("div",{className:this.css.progressButtonsContainerCenter},r.createElement("div",{className:this.css.progressButtonsContainer},r.createElement("div",{className:this.getScrollButtonCss(!0),role:"button",onClick:function(){return e.clickScrollButton(e.listContainerRef.current,!0)}}),r.createElement("div",{className:this.css.progressButtonsListContainer,ref:this.listContainerRef},r.createElement("ul",{className:this.css.progressButtonsList},this.getListElements())),r.createElement("div",{className:this.getScrollButtonCss(!1),role:"button",onClick:function(){return e.clickScrollButton(e.listContainerRef.current,!1)}})))},t.prototype.getListElements=function(){var e=this,t=[];return this.survey.visiblePages.forEach((function(n,r){t.push(e.renderListElement(n,r))})),t},t.prototype.renderListElement=function(e,t){var n=this;return r.createElement("li",{key:"listelement"+t,className:this.getListElementCss(t),onClick:this.isListElementClickable(t)?function(){return n.clickListElement(t)}:void 0},r.createElement("div",{className:this.css.progressButtonsPageTitle,title:e.renderedNavigationTitle},e.renderedNavigationTitle),r.createElement("div",{className:this.css.progressButtonsPageDescription,title:e.navigationDescription},e.navigationDescription))},t.prototype.isListElementClickable=function(e){return this.progressButtonsModel.isListElementClickable(e)},t.prototype.getListElementCss=function(e){return this.progressButtonsModel.getListElementCss(e)},t.prototype.clickListElement=function(e){this.progressButtonsModel.clickListElement(e)},t.prototype.getScrollButtonCss=function(e){return this.progressButtonsModel.getScrollButtonCss(this.state.hasScroller,e)},t.prototype.clickScrollButton=function(e,t){e&&(e.scrollLeft+=70*(t?-1:1))},t.prototype.componentDidMount=function(){var e=this;this.updateScroller=setInterval((function(){e.listContainerRef.current&&e.setState({hasScroller:e.listContainerRef.current.scrollWidth>e.listContainerRef.current.offsetWidth})}),100)},t.prototype.componentWillUnmount=function(){void 0!==this.updateScroller&&(clearInterval(this.updateScroller),this.updateScroller=void 0)},t}(xe);s.Instance.registerElement("sv-progress-buttons",(function(e){return r.createElement(mn,e)}));var yn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleKeydown=function(e){t.model.onKeyDown(e)},t}return yn(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){var e=this;if(!this.item)return null;var t={paddingInlineStart:this.model.getItemIndent(this.item)},n=this.model.getItemClass(this.item),r=[];if(this.item.component){var i=s.Instance.createElement(this.item.component,{item:this.item,key:this.item.id});i&&r.push(i)}else{var a=this.renderLocString(this.item.locTitle,void 0,"locString");if(this.item.iconName){var u=o.a.createElement(E,{key:1,className:this.model.cssClasses.itemIcon,iconName:this.item.iconName,size:this.item.iconSize,"aria-label":this.item.title});r.push(u),r.push(o.a.createElement("span",{key:2},a))}else r.push(a)}var l=o.a.createElement("div",{style:t,className:this.model.cssClasses.itemBody,title:this.item.locTitle.calculatedText},r),c=this.item.needSeparator?o.a.createElement("div",{className:this.model.cssClasses.itemSeparator}):null,p={display:this.model.isItemVisible(this.item)?null:"none"};return Oe(o.a.createElement("li",{className:n,role:"option",style:p,id:this.item.elementId,"aria-selected":this.model.isItemSelected(this.item),onClick:function(t){e.model.onItemClick(e.item),t.stopPropagation()},onPointerDown:function(t){return e.model.onPointerDown(t,e.item)}},c,l))},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.onLastItemRended(this.item)},t}(c);s.Instance.registerElement("sv-list-item",(function(e){return o.a.createElement(gn,e)}));var vn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleKeydown=function(e){n.model.onKeyDown(e)},n.handleMouseMove=function(e){n.model.onMouseMove(e)},n.state={filterString:n.model.filterString||""},n.listContainerRef=o.a.createRef(),n}return vn(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.listContainerRef&&this.listContainerRef.current&&this.model.initListContainerHtmlElement(this.listContainerRef.current)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model&&this.model.initListContainerHtmlElement(void 0)},t.prototype.renderElement=function(){return o.a.createElement("div",{className:this.model.cssClasses.root,ref:this.listContainerRef},this.searchElementContent(),this.emptyContent(),this.renderList())},t.prototype.renderList=function(){if(!this.model.renderElements)return null;var e=this.renderItems(),t={display:this.model.isEmpty?"none":null};return o.a.createElement("ul",{className:this.model.getListClass(),style:t,role:"listbox",id:this.model.elementId,onMouseDown:function(e){e.preventDefault()},onKeyDown:this.handleKeydown,onMouseMove:this.handleMouseMove},e)},t.prototype.renderItems=function(){var e=this;if(!this.model)return null;var t=this.model.renderedActions;return t?t.map((function(t,n){return o.a.createElement(gn,{model:e.model,item:t,key:"item"+n})})):null},t.prototype.searchElementContent=function(){var e=this;if(this.model.showFilter){var t=this.model.showSearchClearButton&&this.model.filterString?o.a.createElement("button",{className:this.model.cssClasses.searchClearButtonIcon,onClick:function(t){e.model.onClickSearchClearButton(t)}},o.a.createElement(E,{iconName:"icon-searchclear",size:"auto"})):null;return o.a.createElement("div",{className:this.model.cssClasses.filter},o.a.createElement("div",{className:this.model.cssClasses.filterIcon},o.a.createElement(E,{iconName:"icon-search",size:"auto"})),o.a.createElement("input",{type:"text",className:this.model.cssClasses.filterInput,"aria-label":this.model.filterStringPlaceholder,placeholder:this.model.filterStringPlaceholder,value:this.state.filterString,onKeyUp:function(t){e.model.goToItems(t)},onChange:function(t){var n=i.settings.environment.root;t.target===n.activeElement&&(e.model.filterString=t.target.value)}}),t)}return null},t.prototype.emptyContent=function(){var e={display:this.model.isEmpty?null:"none"};return o.a.createElement("div",{className:this.model.cssClasses.emptyContainer,style:e},o.a.createElement("div",{className:this.model.cssClasses.emptyText,"aria-label":this.model.emptyMessage},this.model.emptyMessage))},t}(c);s.Instance.registerElement("sv-list",(function(e){return o.a.createElement(bn,e)}));var Cn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),En=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Cn(t,e),t.prototype.render=function(){var e,t=this.props.model;return e=t.isMobile?r.createElement("div",{onClick:t.togglePopup},r.createElement(E,{iconName:t.icon,size:24}),r.createElement(I,{model:t.popupModel})):r.createElement(bn,{model:t.listModel}),r.createElement("div",{className:t.containerCss},e)},t}(xe);s.Instance.registerElement("sv-navigation-toc",(function(e){return r.createElement(En,e)}));var qn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnClick=n.handleOnClick.bind(n),n}return qn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.handleOnClick=function(e){this.question.setValueFromClick(e.target.value),this.setState({value:this.question.value})},t.prototype.renderItem=function(e,t){return s.Instance.createElement(this.question.itemComponent,{question:this.question,item:e,index:t,key:"value"+t,handleOnClick:this.handleOnClick,isDisplayMode:this.isDisplayMode})},t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=this.question.minRateDescription?this.renderLocString(this.question.locMinRateDescription):null,o=this.question.maxRateDescription?this.renderLocString(this.question.locMaxRateDescription):null;return r.createElement("div",{className:this.question.ratingRootCss,ref:function(t){return e.setControl(t)}},r.createElement("fieldset",{role:"radiogroup"},r.createElement("legend",{role:"presentation",className:"sv-hidden"}),this.question.hasMinLabel?r.createElement("span",{className:t.minText},n):null,this.question.renderedRateItems.map((function(t,n){return e.renderItem(t,n)})),this.question.hasMaxLabel?r.createElement("span",{className:t.maxText},o):null))},t}(h);W.Instance.registerQuestion("rating",(function(e){return r.createElement(wn,e)}));var On=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pn=function(e){function t(t){return e.call(this,t)||this}return On(t,e),t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.renderSelect(e);return r.createElement("div",{className:this.question.cssClasses.rootDropdown},t)},t}(Xe);W.Instance.registerQuestion("sv-rating-dropdown",(function(e){return r.createElement(Pn,e)})),i.RendererFactory.Instance.registerRenderer("rating","dropdown","sv-rating-dropdown");var xn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sn=function(e){function t(t){return e.call(this,t)||this}return xn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses;return r.createElement("div",{id:this.question.inputId,className:t.root,ref:function(t){return e.setControl(t)}},this.question.formatedValue)},t}(h);W.Instance.registerQuestion("expression",(function(e){return r.createElement(Sn,e)}));var _n=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnExpanded=n.handleOnExpanded.bind(n),n}return _n(t,e),t.prototype.getStateElements=function(){return[this.popup,this.popup.survey]},t.prototype.handleOnExpanded=function(e){this.popup.changeExpandCollapse()},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&this.popup.isShowing},t.prototype.renderElement=function(){var e=this,t=this.renderWindowHeader(),n=this.renderBody(),o={};return this.popup.renderedWidth&&(o.width=this.popup.renderedWidth,o.maxWidth=this.popup.renderedWidth),r.createElement("div",{className:this.popup.cssRoot,style:o,onScroll:function(){return e.popup.onScroll()}},r.createElement("div",{className:this.popup.cssRootContent},t,n))},t.prototype.renderWindowHeader=function(){var e,t=this.popup,n=(t.cssHeaderRoot,null),o=null;return t.isCollapsed?(" "+t.cssRootCollapsedMod,n=this.renderTitleCollapsed(t),e=this.renderExpandIcon()):e=this.renderCollapseIcon(),t.allowClose&&(o=this.renderCloseButton(this.popup)),r.createElement("div",{className:t.cssHeaderRoot},n,r.createElement("div",{className:t.cssHeaderButtonsContainer},r.createElement("div",{className:t.cssHeaderCollapseButton,onClick:this.handleOnExpanded},e),o))},t.prototype.renderTitleCollapsed=function(e){return e.locTitle?r.createElement("div",{className:e.cssHeaderTitleCollapsed},e.locTitle.renderedHtml):null},t.prototype.renderExpandIcon=function(){return r.createElement(E,{iconName:"icon-restore_16x16",size:16})},t.prototype.renderCollapseIcon=function(){return r.createElement(E,{iconName:"icon-minimize_16x16",size:16})},t.prototype.renderCloseButton=function(e){return r.createElement("div",{className:e.cssHeaderCloseButton,onClick:function(){e.hide()}},r.createElement(E,{iconName:"icon-close_16x16",size:16}))},t.prototype.renderBody=function(){return r.createElement("div",{className:this.popup.cssBody},this.doRender())},t.prototype.createSurvey=function(t){t||(t={}),e.prototype.createSurvey.call(this,t),this.popup=new i.PopupSurveyModel(null,this.survey),t.closeOnCompleteTimeout&&(this.popup.closeOnCompleteTimeout=t.closeOnCompleteTimeout),this.popup.allowClose=t.allowClose,this.popup.isShowing=!0,this.popup.isExpanded||!t.expanded&&!t.isExpanded||this.popup.expand()},t}(we),In=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _n(t,e),t}(Nn),Vn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jn=function(e){function t(t){return e.call(this,t)||this}return Vn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this.question.cssClasses;return r.createElement("fieldset",{className:this.question.getSelectBaseRootCss()},r.createElement("legend",{className:"sv-hidden"},this.question.locTitle.renderedHtml),this.question.hasColumns?this.getColumns(e):this.getItems(e))},t.prototype.getColumns=function(e){var t=this;return this.question.columns.map((function(n,o){var i=n.map((function(n,r){return t.renderItem("item"+r,n,e)}));return r.createElement("div",{key:"column"+o,className:t.question.getColumnClass(),role:"presentation"},i)}))},t.prototype.getItems=function(e){for(var t=[],n=0;n<this.question.visibleChoices.length;n++){var r=this.question.visibleChoices[n],o="item"+n;t.push(this.renderItem(o,r,e))}return t},Object.defineProperty(t.prototype,"textStyle",{get:function(){return{marginLeft:"3px",display:"inline",position:"static"}},enumerable:!1,configurable:!0}),t.prototype.renderItem=function(e,t,n){var o=r.createElement(Tn,{key:e,question:this.question,item:t,cssClasses:n}),i=this.question.survey,s=null;return i&&(s=a.wrapItemValue(i,o,this.question,t)),null!=s?s:o},t}(h),Tn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n}return Vn(t,e),t.prototype.getStateElement=function(){return this.item},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.reactOnStrChanged()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.item.locImageLink.onChanged=function(){}},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.reactOnStrChanged()},t.prototype.reactOnStrChanged=function(){var e=this;this.item.locImageLink.onChanged=function(){e.setState({locImageLinkchanged:e.state&&e.state.locImageLink?e.state.locImageLink+1:1})}},Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.handleOnChange=function(e){if(this.question.multiSelect)if(e.target.checked)this.question.value=this.question.value.concat(e.target.value);else{var t=this.question.value;t.splice(this.question.value.indexOf(e.target.value),1),this.question.value=t}else this.question.value=e.target.value;this.setState({value:this.question.value})},t.prototype.renderElement=function(){var e=this,t=this.item,n=this.question,o=this.cssClasses,i=n.isItemSelected(t),s=n.getItemClass(t),a=null;n.showLabel&&(a=r.createElement("span",{className:n.cssClasses.itemText},t.text?c.renderLocString(t.locText):t.value));var u={objectFit:this.question.imageFit},l=null;if(t.locImageLink.renderedHtml&&"image"===this.question.contentMode&&(l=r.createElement("img",{className:o.image,src:t.locImageLink.renderedHtml,width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,alt:t.locText.renderedHtml,style:u,onLoad:function(n){e.question.onContentLoaded(t,n.nativeEvent)},onError:function(e){t.onErrorHandler(t,e.nativeEvent)}})),t.locImageLink.renderedHtml&&"video"===this.question.contentMode&&(l=r.createElement("video",{controls:!0,className:o.image,src:t.locImageLink.renderedHtml,width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,style:u,onLoadedMetadata:function(n){e.question.onContentLoaded(t,n.nativeEvent)},onError:function(e){t.onErrorHandler(t,e.nativeEvent)}})),!t.locImageLink.renderedHtml||t.contentNotLoaded){var p={width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,objectFit:this.question.imageFit};l=r.createElement("div",{className:o.itemNoImage,style:p},o.itemNoImageSvgIcon?r.createElement(E,{className:o.itemNoImageSvgIcon,iconName:this.question.cssClasses.itemNoImageSvgIconId,size:48}):null)}return r.createElement("div",{className:s},r.createElement("label",{className:o.label},r.createElement("input",{className:o.itemControl,id:this.question.getItemId(t),type:this.question.inputType,name:this.question.questionName,checked:i,value:t.value,disabled:!this.question.getItemEnabled(t),onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),r.createElement("div",{className:this.question.cssClasses.itemDecorator},r.createElement("div",{className:this.question.cssClasses.imageContainer},this.question.cssClasses.checkedItemDecorator?r.createElement("span",{className:this.question.cssClasses.checkedItemDecorator},this.question.cssClasses.checkedItemSvgIconId?r.createElement(E,{size:"auto",className:this.question.cssClasses.checkedItemSvgIcon,iconName:this.question.cssClasses.checkedItemSvgIconId}):null):null,l),a)))},t}(p);W.Instance.registerQuestion("imagepicker",(function(e){return r.createElement(jn,e)}));var Rn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dn=function(e){function t(t){return e.call(this,t)||this}return Rn(t,e),t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this),this.question.locImageLink.onChanged=function(){t.forceUpdate()}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question.locImageLink.onChanged=function(){}},Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.getImageCss(),n={objectFit:this.question.imageFit,width:this.question.renderedStyleWidth,height:this.question.renderedStyleHeight};this.question.imageLink&&!this.question.contentNotLoaded||(n.display="none");var o=null;"image"===this.question.renderedMode&&(o=r.createElement("img",{className:t,src:this.question.locImageLink.renderedHtml,alt:this.question.altText||this.question.title,width:this.question.renderedWidth,height:this.question.renderedHeight,style:n,onLoad:function(t){e.question.onLoadHandler()},onError:function(t){e.question.onErrorHandler()}})),"video"===this.question.renderedMode&&(o=r.createElement("video",{controls:!0,className:t,src:this.question.locImageLink.renderedHtml,width:this.question.renderedWidth,height:this.question.renderedHeight,style:n,onLoadedMetadata:function(t){e.question.onLoadHandler()},onError:function(t){e.question.onErrorHandler()}})),"youtube"===this.question.renderedMode&&(o=r.createElement("iframe",{className:t,src:this.question.locImageLink.renderedHtml,width:this.question.renderedWidth,height:this.question.renderedHeight,style:n}));var i=null;return this.question.imageLink&&!this.question.contentNotLoaded||(i=r.createElement("div",{className:this.question.cssClasses.noImage},r.createElement(E,{iconName:this.question.cssClasses.noImageSvgIconId,size:48}))),r.createElement("div",{className:this.question.cssClasses.root},o,i)},t}(h);W.Instance.registerQuestion("image",(function(e){return r.createElement(Dn,e)}));var An=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ln=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:n.question.value},n}return An(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=this.question.showLoadingIndicator?this.renderLoadingIndicator():null,o=this.renderCleanButton();return r.createElement("div",{className:t.root,ref:function(t){return e.setControl(t)},style:{width:this.question.renderedCanvasWidth}},r.createElement("div",{className:t.placeholder,style:{display:this.question.needShowPlaceholder()?"":"none"}},this.renderLocString(this.question.locPlaceholder)),r.createElement("div",null,this.renderBackgroundImage(),r.createElement("canvas",{tabIndex:0,className:this.question.cssClasses.canvas,onBlur:this.question.onBlur})),o,n)},t.prototype.renderBackgroundImage=function(){return this.question.backgroundImage?r.createElement("img",{className:this.question.cssClasses.backgroundImage,src:this.question.backgroundImage,style:{width:this.question.renderedCanvasWidth}}):null},t.prototype.renderLoadingIndicator=function(){return r.createElement("div",{className:this.question.cssClasses.loadingIndicator},r.createElement(mt,null))},t.prototype.renderCleanButton=function(){var e=this;if(!this.question.canShowClearButton)return null;var t=this.question.cssClasses;return r.createElement("div",{className:t.controls},r.createElement("button",{type:"button",className:t.clearButton,title:this.question.clearButtonCaption,onClick:function(){return e.question.clearValue()}},this.question.cssClasses.clearButtonIconId?r.createElement(E,{iconName:this.question.cssClasses.clearButtonIconId,size:"auto"}):r.createElement("span",null,"✖")))},t}(h);W.Instance.registerQuestion("signaturepad",(function(e){return r.createElement(Ln,e)}));var kn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bn=function(e){function t(t){return e.call(this,t)||this}return kn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.question},t.prototype.renderElement=function(){var e=this.renderItems();return o.a.createElement("div",{className:this.question.cssClasses.root},e)},t.prototype.renderItems=function(){var e=this;return this.question.visibleChoices.map((function(t,n){return o.a.createElement(Mn,{key:e.question.inputId+"_"+n,item:t,question:e.question,index:n})}))},t}(h),Mn=function(e){function t(t){return e.call(this,t)||this}return kn(t,e),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){this.model=new i.ButtonGroupItemModel(this.question,this.item,this.index);var e=this.renderIcon(),t=this.renderInput(),n=this.renderCaption();return o.a.createElement("label",{role:"radio",className:this.model.css.label,title:this.model.caption.renderedHtml},t,o.a.createElement("div",{className:this.model.css.decorator},e,n))},t.prototype.renderIcon=function(){return this.model.iconName?o.a.createElement(E,{className:this.model.css.icon,iconName:this.model.iconName,size:this.model.iconSize||24}):null},t.prototype.renderInput=function(){var e=this;return o.a.createElement("input",{className:this.model.css.control,id:this.model.id,type:"radio",name:this.model.name,checked:this.model.selected,value:this.model.value,disabled:this.model.readOnly,onChange:function(){e.model.onChange()},"aria-required":this.model.isRequired,"aria-label":this.model.caption.renderedHtml,"aria-invalid":this.model.hasErrors,"aria-describedby":this.model.describedBy,role:"radio"})},t.prototype.renderCaption=function(){if(!this.model.showCaption)return null;var e=this.renderLocString(this.model.caption);return o.a.createElement("span",{className:this.model.css.caption,title:this.model.caption.renderedHtml},e)},t}(c),Fn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zn=function(e){function t(t){return e.call(this,t)||this}return Fn(t,e),t.prototype.getStateElements=function(){var t=e.prototype.getStateElements.call(this);return this.question.contentQuestion&&t.push(this.question.contentQuestion),t},t.prototype.renderElement=function(){return ne.renderQuestionBody(this.creator,this.question.contentQuestion)},t}(d),Hn=function(e){function t(t){return e.call(this,t)||this}return Fn(t,e),t.prototype.canRender=function(){return!!this.question.contentPanel},t.prototype.renderElement=function(){return r.createElement(Ie,{element:this.question.contentPanel,creator:this.creator,survey:this.question.survey})},t}(d);W.Instance.registerQuestion("custom",(function(e){return r.createElement(zn,e)})),W.Instance.registerQuestion("composite",(function(e){return r.createElement(Hn,e)}));var Wn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Un=function(e){function t(t){return e.call(this,t)||this}return Wn(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=[];return e.push(o.a.createElement("div",{key:"logo-image",className:this.survey.logoClassNames},o.a.createElement("img",{className:this.survey.css.logoImage,src:this.survey.locLogo.renderedHtml,alt:this.survey.locTitle.renderedHtml,width:this.survey.renderedLogoWidth,height:this.survey.renderedLogoHeight,style:{objectFit:this.survey.logoFit,width:this.survey.renderedStyleLogoWidth,height:this.survey.renderedStyleLogoHeight}}))),o.a.createElement(o.a.Fragment,null,e)},t}(o.a.Component);s.Instance.registerElement("sv-logo-image",(function(e){return o.a.createElement(Un,e)}));var Qn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnRowRemoveClick=n.handleOnRowRemoveClick.bind(n),n}return Qn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item.data.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.item.data.row},enumerable:!1,configurable:!0}),t.prototype.handleOnRowRemoveClick=function(e){this.question.removeRowUI(this.row)},t.prototype.renderElement=function(){var e=this.renderLocString(this.question.locRemoveRowText);return o.a.createElement("button",{className:this.question.getRemoveRowButtonCss(),type:"button",onClick:this.handleOnRowRemoveClick,disabled:this.question.isInputReadOnly},e,o.a.createElement("span",{className:this.question.cssClasses.iconRemove}))},t}(p);s.Instance.registerElement("sv-matrix-remove-button",(function(e){return o.a.createElement(Jn,e)}));var Kn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnShowHideClick=n.handleOnShowHideClick.bind(n),n}return Kn(t,e),t.prototype.getStateElement=function(){return this.props.item},Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item.data.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.item.data.row},enumerable:!1,configurable:!0}),t.prototype.handleOnShowHideClick=function(e){this.row.showHideDetailPanelClick()},t.prototype.renderElement=function(){var e=this.row.isDetailPanelShowing,t=e,n=e?this.row.detailPanelId:void 0;return o.a.createElement("button",{type:"button",onClick:this.handleOnShowHideClick,className:this.question.getDetailPanelButtonCss(this.row),"aria-expanded":t,"aria-controls":n},o.a.createElement(E,{className:this.question.getDetailPanelIconCss(this.row),iconName:this.question.getDetailPanelIconId(this.row),size:"auto"}))},t}(p);s.Instance.registerElement("sv-matrix-detail-button",(function(e){return o.a.createElement(Gn,e)}));var Yn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.removePanelUI(t.data.panel)},t}return Yn(t,e),t.prototype.renderElement=function(){var e=this.renderLocString(this.question.locPanelRemoveText);return o.a.createElement("button",{className:this.question.getPanelRemoveButtonCss(),onClick:this.handleClick,type:"button"},o.a.createElement("span",{className:this.question.cssClasses.buttonRemoveText},e),o.a.createElement("span",{className:this.question.cssClasses.iconRemove}))},t}(en);s.Instance.registerElement("sv-paneldynamic-remove-btn",(function(e){return o.a.createElement(Zn,e)}));var $n=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $n(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return this.item.isVisible},t.prototype.renderElement=function(){return o.a.createElement("input",{className:this.item.innerCss,type:"button",disabled:this.item.disabled,onMouseDown:this.item.data&&this.item.data.mouseDown,onClick:this.item.action,title:this.item.getTooltip(),value:this.item.title})},t}(p);s.Instance.registerElement("sv-nav-btn",(function(e){return o.a.createElement(Xn,e)}));var er=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return er(t,e),t.prototype.render=function(){var e;return o.a.createElement("div",{className:"sv-skeleton-element",id:null===(e=this.props.element)||void 0===e?void 0:e.id})},t}(o.a.Component);s.Instance.registerElement("sv-skeleton",(function(e){return o.a.createElement(tr,e)}));var nr=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nr(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.renderLogoImage=function(){var e=this.model.survey.getElementWrapperComponentName(this.model.survey,"logo-image"),t=this.model.survey.getElementWrapperComponentData(this.model.survey,"logo-image");return s.Instance.createElement(e,{data:t})},t.prototype.render=function(){return o.a.createElement("div",{className:"sv-header--mobile"},this.model.survey.hasLogo?o.a.createElement("div",{className:"sv-header__logo"},this.renderLogoImage()):null,this.model.survey.hasTitle?o.a.createElement("div",{className:"sv-header__title",style:{maxWidth:this.model.textAreaWidth}},o.a.createElement(H,{element:this.model.survey})):null,this.model.survey.renderedHasDescription?o.a.createElement("div",{className:"sv-header__description",style:{maxWidth:this.model.textAreaWidth}},o.a.createElement("div",{className:this.model.survey.css.description},c.renderLocString(this.model.survey.locDescription))):null)},t}(o.a.Component),or=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nr(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.renderLogoImage=function(){var e=this.model.survey.getElementWrapperComponentName(this.model.survey,"logo-image"),t=this.model.survey.getElementWrapperComponentData(this.model.survey,"logo-image");return s.Instance.createElement(e,{data:t})},t.prototype.render=function(){return o.a.createElement("div",{className:this.model.css,style:this.model.style},o.a.createElement("div",{className:"sv-header__cell-content",style:this.model.contentStyle},this.model.showLogo?o.a.createElement("div",{className:"sv-header__logo"},this.renderLogoImage()):null,this.model.showTitle?o.a.createElement("div",{className:"sv-header__title",style:{maxWidth:this.model.textAreaWidth}},o.a.createElement(H,{element:this.model.survey})):null,this.model.showDescription?o.a.createElement("div",{className:"sv-header__description",style:{maxWidth:this.model.textAreaWidth}},o.a.createElement("div",{className:this.model.survey.css.description},c.renderLocString(this.model.survey.locDescription))):null))},t}(o.a.Component),ir=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nr(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){if(this.model.survey=this.props.survey,"advanced"!==this.props.survey.headerView||!this.props.survey.renderedHasHeader)return null;var e=null;return e=this.props.survey.isMobile?o.a.createElement(rr,{model:this.model}):o.a.createElement("div",{className:this.model.contentClasses,style:{maxWidth:this.model.maxWidth}},this.model.cells.map((function(e,t){return o.a.createElement(or,{key:t,model:e})}))),o.a.createElement("div",{className:this.model.headerClasses,style:{height:this.model.renderedHeight}},this.model.backgroundImage?o.a.createElement("div",{style:this.model.backgroundImageStyle,className:this.model.backgroundImageClasses}):null,e)},t}(c);s.Instance.registerElement("sv-header",(function(e){return o.a.createElement(ir,e)}));var sr=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ar=function(e){function t(t){var n=e.call(this,t)||this;return n.onInput=function(e){n.locStr.text=e.target.innerText},n.onClick=function(e){e.preventDefault(),e.stopPropagation()},n.state={changed:0},n}return sr(t,e),Object.defineProperty(t.prototype,"locStr",{get:function(){return this.props.locStr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this.props.style},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(this.locStr){var e=this;this.locStr.onChanged=function(){e.setState({changed:e.state.changed+1})}}},t.prototype.componentWillUnmount=function(){this.locStr&&(this.locStr.onChanged=function(){})},t.prototype.render=function(){if(!this.locStr)return null;if(this.locStr.hasHtml){var e={__html:this.locStr.renderedHtml};return o.a.createElement("span",{className:"sv-string-editor",contentEditable:"true",suppressContentEditableWarning:!0,style:this.style,dangerouslySetInnerHTML:e,onBlur:this.onInput,onClick:this.onClick})}return o.a.createElement("span",{className:"sv-string-editor",contentEditable:"true",suppressContentEditableWarning:!0,style:this.style,onBlur:this.onInput,onClick:this.onClick},this.locStr.renderedHtml)},t}(o.a.Component);s.Instance.registerElement(i.LocalizableString.editableRenderer,(function(e){return o.a.createElement(ar,e)}));var ur="undefined"!=typeof globalThis?globalThis.document:(void 0).document,lr={designMode:{showEmptyDescriptions:!0,showEmptyTitles:!0},get allowShowEmptyDescriptionInDesignMode(){return this.designMode.showEmptyDescriptions},set allowShowEmptyDescriptionInDesignMode(e){this.designMode.showEmptyDescriptions=e},get allowShowEmptyTitleInDesignMode(){return this.designMode.showEmptyTitles},set allowShowEmptyTitleInDesignMode(e){this.designMode.showEmptyTitles=e},localization:{useLocalTimeZone:!0,storeDuplicatedTranslations:!1,defaultLocaleName:"default"},get useLocalTimeZone(){return this.localization.useLocalTimeZone},set useLocalTimeZone(e){this.localization.useLocalTimeZone=e},get storeDuplicatedTranslations(){return this.localization.storeDuplicatedTranslations},set storeDuplicatedTranslations(e){this.localization.storeDuplicatedTranslations=e},get defaultLocaleName(){return this.localization.defaultLocaleName},set defaultLocaleName(e){this.localization.defaultLocaleName=e},web:{onBeforeRequestChoices:function(e,t){},encodeUrlParams:!0,cacheLoadedChoices:!0,disableQuestionWhileLoadingChoices:!1,surveyServiceUrl:"https://api.surveyjs.io/public/v1/Survey"},get webserviceEncodeParameters(){return this.web.encodeUrlParams},set webserviceEncodeParameters(e){this.web.encodeUrlParams=e},get useCachingForChoicesRestful(){return this.web.cacheLoadedChoices},set useCachingForChoicesRestful(e){this.web.cacheLoadedChoices=e},get useCachingForChoicesRestfull(){return this.web.cacheLoadedChoices},set useCachingForChoicesRestfull(e){this.web.cacheLoadedChoices=e},get disableOnGettingChoicesFromWeb(){return this.web.disableQuestionWhileLoadingChoices},set disableOnGettingChoicesFromWeb(e){this.web.disableQuestionWhileLoadingChoices=e},get surveyServiceUrl(){return this.web.surveyServiceUrl},set surveyServiceUrl(e){this.web.surveyServiceUrl=e},triggers:{changeNavigationButtonsOnComplete:!0,executeCompleteOnValueChanged:!1,executeSkipOnValueChanged:!0},get executeCompleteTriggerOnValueChanged(){return this.triggers.executeCompleteOnValueChanged},set executeCompleteTriggerOnValueChanged(e){this.triggers.executeCompleteOnValueChanged=e},get changeNavigationButtonsOnCompleteTrigger(){return this.triggers.changeNavigationButtonsOnComplete},set changeNavigationButtonsOnCompleteTrigger(e){this.triggers.changeNavigationButtonsOnComplete=e},get executeSkipTriggerOnValueChanged(){return this.triggers.executeSkipOnValueChanged},set executeSkipTriggerOnValueChanged(e){this.triggers.executeSkipOnValueChanged=e},serialization:{itemValueSerializeAsObject:!1,itemValueSerializeDisplayText:!1,localizableStringSerializeAsObject:!1},get itemValueAlwaysSerializeAsObject(){return this.serialization.itemValueSerializeAsObject},set itemValueAlwaysSerializeAsObject(e){this.serialization.itemValueSerializeAsObject=e},get itemValueAlwaysSerializeText(){return this.serialization.itemValueSerializeDisplayText},set itemValueAlwaysSerializeText(e){this.serialization.itemValueSerializeDisplayText=e},get serializeLocalizableStringAsObject(){return this.serialization.localizableStringSerializeAsObject},set serializeLocalizableStringAsObject(e){this.serialization.localizableStringSerializeAsObject=e},lazyRender:{enabled:!1,firstBatchSize:3},get lazyRowsRendering(){return this.lazyRender.enabled},set lazyRowsRendering(e){this.lazyRender.enabled=e},get lazyRowsRenderingStartRow(){return this.lazyRender.firstBatchSize},set lazyRowsRenderingStartRow(e){this.lazyRender.firstBatchSize=e},matrix:{defaultCellType:"dropdown",defaultRowName:"default",totalsSuffix:"-total",maxRowCount:1e3,maxRowCountInCondition:1,renderRemoveAsIcon:!0,columnWidthsByType:{file:{minWidth:"240px"},comment:{minWidth:"200px"}},rateSize:"small"},get matrixDefaultRowName(){return this.matrix.defaultRowName},set matrixDefaultRowName(e){this.matrix.defaultRowName=e},get matrixDefaultCellType(){return this.matrix.defaultCellType},set matrixDefaultCellType(e){this.matrix.defaultCellType=e},get matrixTotalValuePostFix(){return this.matrix.totalsSuffix},set matrixTotalValuePostFix(e){this.matrix.totalsSuffix=e},get matrixMaximumRowCount(){return this.matrix.maxRowCount},set matrixMaximumRowCount(e){this.matrix.maxRowCount=e},get matrixMaxRowCountInCondition(){return this.matrix.maxRowCountInCondition},set matrixMaxRowCountInCondition(e){this.matrix.maxRowCountInCondition=e},get matrixRenderRemoveAsIcon(){return this.matrix.renderRemoveAsIcon},set matrixRenderRemoveAsIcon(e){this.matrix.renderRemoveAsIcon=e},panel:{maxPanelCount:100,maxPanelCountInCondition:1},get panelDynamicMaxPanelCountInCondition(){return this.panel.maxPanelCountInCondition},set panelDynamicMaxPanelCountInCondition(e){this.panel.maxPanelCountInCondition=e},get panelMaximumPanelCount(){return this.panel.maxPanelCount},set panelMaximumPanelCount(e){this.panel.maxPanelCount=e},readOnly:{enableValidation:!1,commentRenderMode:"textarea",textRenderMode:"input"},get readOnlyCommentRenderMode(){return this.readOnly.commentRenderMode},set readOnlyCommentRenderMode(e){this.readOnly.commentRenderMode=e},get readOnlyTextRenderMode(){return this.readOnly.textRenderMode},set readOnlyTextRenderMode(e){this.readOnly.textRenderMode=e},numbering:{includeQuestionsWithHiddenNumber:!1,includeQuestionsWithHiddenTitle:!1},get setQuestionVisibleIndexForHiddenTitle(){return this.numbering.includeQuestionsWithHiddenTitle},set setQuestionVisibleIndexForHiddenTitle(e){this.numbering.includeQuestionsWithHiddenTitle=e},get setQuestionVisibleIndexForHiddenNumber(){return this.numbering.includeQuestionsWithHiddenNumber},set setQuestionVisibleIndexForHiddenNumber(e){this.numbering.includeQuestionsWithHiddenNumber=e},enterKeyAction:"default",comparator:{trimStrings:!0,caseSensitive:!1,normalizeTextCallback:function(e,t){return e}},expressionDisableConversionChar:"#",get commentPrefix(){return lr.commentSuffix},set commentPrefix(e){lr.commentSuffix=e},commentSuffix:"-Comment",itemValueSeparator:"|",ratingMaximumRateValueCount:20,tagboxCloseOnSelect:!1,confirmActionFunc:function(e){return confirm(e)},confirmActionAsync:function(e,t,n){return function(e,t,n){var r=new ho(void 0),o=lr.showDialog({componentName:"sv-string-viewer",data:{locStr:r,locString:r,model:r},onApply:function(){return t(!0),!0},onCancel:function(){return t(!1),!1},title:e,displayMode:"popup",isFocusedContent:!1,cssClass:"sv-popup--confirm-delete"},document.body),i=o.footerToolbar,s=i.getActionById("apply"),a=i.getActionById("cancel");return a.title=hr.getString("cancel"),a.innerCss="sv-popup__body-footer-item sv-popup__button sd-btn sd-btn--small",s.title=n||hr.getString("ok"),s.innerCss="sv-popup__body-footer-item sv-popup__button sv-popup__button--danger sd-btn sd-btn--small sd-btn--danger",o.width="452px",!0}(e,t,n)},minWidth:"300px",maxWidth:"100%",maxConditionRunCountOnValueChanged:10,notifications:{lifetime:2e3},autoAdvanceDelay:300,showItemsInOrder:"default",noneItemValue:"none",specialChoicesOrder:{selectAllItem:[-1],noneItem:[1],otherItem:[2]},supportedValidators:{question:["expression"],comment:["text","regex"],text:["numeric","text","regex","email"],checkbox:["answercount"],imagepicker:["answercount"]},minDate:"",maxDate:"",showModal:void 0,showDialog:void 0,supportCreatorV2:!1,showDefaultItemsInCreatorV2:!0,customIcons:{},rankingDragHandleArea:"entireItem",environment:ur?{root:ur,_rootElement:ur.body,get rootElement(){var e;return null!==(e=this._rootElement)&&void 0!==e?e:ur.body},set rootElement(e){this._rootElement=e},_popupMountContainer:ur.body,get popupMountContainer(){var e;return null!==(e=this._popupMountContainer)&&void 0!==e?e:ur.body},set popupMountContainer(e){this._popupMountContainer=e},svgMountContainer:ur.head,stylesSheetsMountContainer:ur.head}:void 0,showMaxLengthIndicator:!0,titleTags:{survey:"h3",page:"h4",panel:"h4",question:"h5"},questions:{inputTypes:["color","date","datetime-local","email","month","number","password","range","tel","text","time","url","week"],dataList:["","name","honorific-prefix","given-name","additional-name","family-name","honorific-suffix","nickname","organization-title","username","new-password","current-password","organization","street-address","address-line1","address-line2","address-line3","address-level4","address-level3","address-level2","address-level1","country","country-name","postal-code","cc-name","cc-given-name","cc-additional-name","cc-family-name","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc","cc-type","transaction-currency","transaction-amount","language","bday","bday-day","bday-month","bday-year","sex","url","photo","tel","tel-country-code","tel-national","tel-area-code","tel-local","tel-local-prefix","tel-local-suffix","tel-extension","email","impp"]}},cr=function(){function e(){}return e.isValueEmpty=function(t){if(Array.isArray(t)&&0===t.length)return!0;if(t&&e.isValueObject(t)&&t.constructor===Object){for(var n in t)if(!e.isValueEmpty(t[n]))return!1;return!0}return!t&&0!==t&&!1!==t},e.isArrayContainsEqual=function(t,n){if(!Array.isArray(t)||!Array.isArray(n))return!1;if(t.length!==n.length)return!1;for(var r=0;r<t.length;r++){for(var o=0;o<n.length&&!e.isTwoValueEquals(t[r],n[o]);o++);if(o===n.length)return!1}return!0},e.isArraysEqual=function(t,n,r,o,i){if(void 0===r&&(r=!1),!Array.isArray(t)||!Array.isArray(n))return!1;if(t.length!==n.length)return!1;if(r){for(var s=[],a=[],u=0;u<t.length;u++)s.push(t[u]),a.push(n[u]);s.sort(),a.sort(),t=s,n=a}for(u=0;u<t.length;u++)if(!e.isTwoValueEquals(t[u],n[u],r,o,i))return!1;return!0},e.compareStrings=function(e,t){var n=lr.comparator.normalizeTextCallback;if(e&&(e=n(e,"compare").trim()),t&&(t=n(t,"compare").trim()),!e&&!t)return 0;if(!e)return-1;if(!t)return 1;if(e===t)return 0;for(var r=-1,o=0;o<e.length&&o<t.length;o++){if(this.isCharDigit(e[o])&&this.isCharDigit(t[o])){r=o;break}if(e[o]!==t[o])break}if(r>-1){var i=this.getNumberFromStr(e,r),s=this.getNumberFromStr(t,r);if(!Number.isNaN(i)&&!Number.isNaN(s)&&i!==s)return i>s?1:-1}return e>t?1:-1},e.isTwoValueEquals=function(t,n,r,o,i){if(void 0===r&&(r=!1),t===n)return!0;if(Array.isArray(t)&&0===t.length&&void 0===n)return!0;if(Array.isArray(n)&&0===n.length&&void 0===t)return!0;if(null==t&&""===n)return!0;if(null==n&&""===t)return!0;if(void 0===i&&(i=lr.comparator.trimStrings),void 0===o&&(o=lr.comparator.caseSensitive),"string"==typeof t&&"string"==typeof n){var s=lr.comparator.normalizeTextCallback;return t=s(t,"compare"),n=s(n,"compare"),i&&(t=t.trim(),n=n.trim()),o||(t=t.toLowerCase(),n=n.toLowerCase()),t===n}if(t instanceof Date&&n instanceof Date)return t.getTime()==n.getTime();if(e.isConvertibleToNumber(t)&&e.isConvertibleToNumber(n)&&parseInt(t)===parseInt(n)&&parseFloat(t)===parseFloat(n))return!0;if(!e.isValueEmpty(t)&&e.isValueEmpty(n)||e.isValueEmpty(t)&&!e.isValueEmpty(n))return!1;if((!0===t||!1===t)&&"string"==typeof n)return t.toString()===n.toLocaleLowerCase();if((!0===n||!1===n)&&"string"==typeof t)return n.toString()===t.toLocaleLowerCase();if(!e.isValueObject(t)&&!e.isValueObject(n))return t==n;if(!e.isValueObject(t)||!e.isValueObject(n))return!1;if(t.equals&&n.equals)return t.equals(n);if(Array.isArray(t)&&Array.isArray(n))return e.isArraysEqual(t,n,r,o,i);for(var a in t)if(t.hasOwnProperty(a)){if(!n.hasOwnProperty(a))return!1;if(!this.isTwoValueEquals(t[a],n[a],r,o,i))return!1}for(a in n)if(n.hasOwnProperty(a)&&!t.hasOwnProperty(a))return!1;return!0},e.randomizeArray=function(e){for(var t=e.length-1;t>0;t--){var n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}return e},e.getUnbindValue=function(t){if(Array.isArray(t)){for(var n=[],r=0;r<t.length;r++)n.push(e.getUnbindValue(t[r]));return n}return!t||!e.isValueObject(t)||t instanceof Date?t:JSON.parse(JSON.stringify(t))},e.createCopy=function(e){var t={};if(!e)return t;for(var n in e)t[n]=e[n];return t},e.isConvertibleToNumber=function(e){return null!=e&&!Array.isArray(e)&&!isNaN(e)},e.isValueObject=function(e,t){return e instanceof Object&&(!t||!Array.isArray(e))},e.isNumber=function(e){return!isNaN(this.getNumber(e))},e.getNumber=function(e){if("string"==typeof e&&e&&0==e.indexOf("0x")&&e.length>32)return NaN;e=this.prepareStringToNumber(e);var t=parseFloat(e);return isNaN(t)||!isFinite(e)?NaN:t},e.prepareStringToNumber=function(e){if("string"!=typeof e||!e)return e;var t=e.indexOf(",");return t>-1&&e.indexOf(",",t+1)<0?e.replace(",","."):e},e.getMaxLength=function(e,t){return e<0&&(e=t),e>0?e:null},e.getRemainingCharacterCounterText=function(e,t){return!t||t<=0||!lr.showMaxLengthIndicator?"":[e?e.length:"0",t].join("/")},e.getNumberByIndex=function(t,n){if(t<0)return"";var r=1,o="",i=".",s=!0,a="A",u="";if(n){for(var l=(u=n).length-1,c=!1,p=0;p<u.length;p++)if(e.isCharDigit(u[p])){c=!0;break}for(var h=function(){return c&&!e.isCharDigit(u[l])||e.isCharNotLetterAndDigit(u[l])};l>=0&&h();)l--;var d="";for(l<u.length-1&&(d=u.substring(l+1),u=u.substring(0,l+1)),l=u.length-1;l>=0&&!h()&&(l--,c););a=u.substring(l+1),o=u.substring(0,l+1),parseInt(a)?r=parseInt(a):1==a.length&&(s=!1),(d||o)&&(i=d)}if(s){for(var f=(t+r).toString();f.length<a.length;)f="0"+f;return o+f+i}return o+String.fromCharCode(a.charCodeAt(0)+t)+i},e.isCharNotLetterAndDigit=function(t){return t.toUpperCase()==t.toLowerCase()&&!e.isCharDigit(t)},e.isCharDigit=function(e){return e>="0"&&e<="9"},e.getNumberFromStr=function(e,t){if(!this.isCharDigit(e[t]))return NaN;for(var n="";t<e.length&&this.isCharDigit(e[t]);)n+=e[t],t++;return n?this.getNumber(n):NaN},e.countDecimals=function(t){if(e.isNumber(t)&&Math.floor(t)!==t){var n=t.toString().split(".");return n.length>1&&n[1].length||0}return 0},e.correctAfterPlusMinis=function(t,n,r){var o=e.countDecimals(t),i=e.countDecimals(n);if(o>0||i>0){var s=Math.max(o,i);r=parseFloat(r.toFixed(s))}return r},e.sumAnyValues=function(t,n){if(!e.isNumber(t)||!e.isNumber(n)){if(Array.isArray(t)&&Array.isArray(n))return[].concat(t).concat(n);if(Array.isArray(t)||Array.isArray(n)){var r=Array.isArray(t)?t:n,o=r===t?n:t;if("string"==typeof o){var i=r.join(", ");return r===t?i+o:o+i}if("number"==typeof o){for(var s=0,a=0;a<r.length;a++)"number"==typeof r[a]&&(s=e.correctAfterPlusMinis(s,r[a],s+r[a]));return e.correctAfterPlusMinis(s,o,s+o)}}return t+n}return"string"==typeof t||"string"==typeof n?t+n:e.correctAfterPlusMinis(t,n,t+n)},e.correctAfterMultiple=function(t,n,r){var o=e.countDecimals(t)+e.countDecimals(n);return o>0&&(r=parseFloat(r.toFixed(o))),r},e.convertArrayValueToObject=function(t,n,r){void 0===r&&(r=void 0);var o=new Array;if(!t||!Array.isArray(t))return o;for(var i=0;i<t.length;i++){var s=void 0;Array.isArray(r)&&(s=e.findObjByPropValue(r,n,t[i])),s||((s={})[n]=t[i]),o.push(s)}return o},e.findObjByPropValue=function(t,n,r){for(var o=0;o<t.length;o++)if(e.isTwoValueEquals(t[o][n],r))return t[o]},e.convertArrayObjectToValue=function(t,n){var r=new Array;if(!t||!Array.isArray(t))return r;for(var o=0;o<t.length;o++){var i=t[o]?t[o][n]:void 0;e.isValueEmpty(i)||r.push(i)}return r},e.convertDateToString=function(e){var t=function(e){return e<10?"0"+e.toString():e.toString()};return e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())},e.convertDateTimeToString=function(e){var t=function(e){return e<10?"0"+e.toString():e.toString()};return this.convertDateToString(e)+" "+t(e.getHours())+":"+t(e.getMinutes())},e.convertValToQuestionVal=function(t,n){return t instanceof Date?"datetime-local"===n?e.convertDateTimeToString(t):e.convertDateToString(t):t},e}();String.prototype.format||(String.prototype.format=function(){var e=arguments;return this.replace(/{(\d+)}/g,(function(t,n){return void 0!==e[n]?e[n]:t}))});var pr={pagePrevText:"Previous",pageNextText:"Next",completeText:"Complete",previewText:"Preview",editText:"Edit",startSurveyText:"Start",otherItemText:"Other (describe)",noneItemText:"None",selectAllItemText:"Select All",progressText:"Page {0} of {1}",indexText:"{0} of {1}",panelDynamicProgressText:"{0} of {1}",panelDynamicTabTextFormat:"Panel {panelIndex}",questionsProgressText:"Answered {0}/{1} questions",emptySurvey:"The survey doesn't contain any visible elements.",completingSurvey:"Thank you for completing the survey",completingSurveyBefore:"Our records show that you have already completed this survey.",loadingSurvey:"Loading Survey...",placeholder:"Select...",ratingOptionsCaption:"Select...",value:"value",requiredError:"Response required.",requiredErrorInPanel:"Response required: answer at least one question.",requiredInAllRowsError:"Response required: answer questions in all rows.",eachRowUniqueError:"Each row must have a unique value.",numericError:"The value should be numeric.",minError:"The value should not be less than {0}",maxError:"The value should not be greater than {0}",textMinLength:"Please enter at least {0} character(s).",textMaxLength:"Please enter no more than {0} character(s).",textMinMaxLength:"Please enter at least {0} and no more than {1} characters.",minRowCountError:"Please fill in at least {0} row(s).",minSelectError:"Please select at least {0} option(s).",maxSelectError:"Please select no more than {0} option(s).",numericMinMax:"The '{0}' should be at least {1} and at most {2}",numericMin:"The '{0}' should be at least {1}",numericMax:"The '{0}' should be at most {1}",invalidEmail:"Please enter a valid e-mail address.",invalidExpression:"The expression: {0} should return 'true'.",urlRequestError:"The request returned error '{0}'. {1}",urlGetChoicesError:"The request returned empty data or the 'path' property is incorrect",exceedMaxSize:"The file size should not exceed {0}.",noUploadFilesHandler:"Files cannot be uploaded. Please add a handler for the 'onUploadFiles' event.",otherRequiredError:"Response required: enter another value.",uploadingFile:"Your file is uploading. Please wait several seconds and try again.",loadingFile:"Loading...",chooseFile:"Choose file(s)...",noFileChosen:"No file chosen",filePlaceholder:"Drag and drop a file here or click the button below to select a file to upload.",confirmDelete:"Do you want to delete the record?",keyDuplicationError:"This value should be unique.",addColumn:"Add Column",addRow:"Add Row",removeRow:"Remove",emptyRowsText:"There are no rows.",addPanel:"Add new",removePanel:"Remove",showDetails:"Show Details",hideDetails:"Hide Details",choices_Item:"item",matrix_column:"Column",matrix_row:"Row",multipletext_itemname:"text",savingData:"The results are being saved on the server...",savingDataError:"An error occurred and we could not save the results.",savingDataSuccess:"The results were saved successfully!",saveAgainButton:"Try again",timerMin:"min",timerSec:"sec",timerSpentAll:"You have spent {0} on this page and {1} in total.",timerSpentPage:"You have spent {0} on this page.",timerSpentSurvey:"You have spent {0} in total.",timerLimitAll:"You have spent {0} of {1} on this page and {2} of {3} in total.",timerLimitPage:"You have spent {0} of {1} on this page.",timerLimitSurvey:"You have spent {0} of {1} in total.",clearCaption:"Clear",signaturePlaceHolder:"Sign here",chooseFileCaption:"Select File",takePhotoCaption:"Take Photo",photoPlaceholder:"Click the button below to take a photo using the camera.",fileOrPhotoPlaceholder:"Drag and drop or select a file to upload or take a photo using the camera.",replaceFileCaption:"Replace file",removeFileCaption:"Remove this file",booleanCheckedLabel:"Yes",booleanUncheckedLabel:"No",confirmRemoveFile:"Are you sure that you want to remove this file: {0}?",confirmRemoveAllFiles:"Are you sure that you want to remove all files?",questionTitlePatternText:"Question Title",modalCancelButtonText:"Cancel",modalApplyButtonText:"Apply",filterStringPlaceholder:"Type to search...",emptyMessage:"No data to display",noEntriesText:"There are no entries yet.\nClick the button below to add a new entry.",noEntriesReadonlyText:"There are no entries.",more:"More",tagboxDoneButtonCaption:"OK",selectToRankEmptyRankedAreaText:"All choices are ranked",selectToRankEmptyUnrankedAreaText:"Drag and drop choices here to rank them",ok:"OK",cancel:"Cancel"},hr={currentLocaleValue:"",defaultLocaleValue:"en",locales:{},localeNames:{},supportedLocales:[],get currentLocale(){return this.currentLocaleValue===this.defaultLocaleValue?"":this.currentLocaleValue},set currentLocale(e){"cz"===e&&(e="cs"),this.currentLocaleValue=e},get defaultLocale(){return this.defaultLocaleValue},set defaultLocale(e){"cz"===e&&(e="cs"),this.defaultLocaleValue=e},getLocaleStrings:function(e){return this.locales[e]},getString:function(e,t){var n=this;void 0===t&&(t=null);var r=new Array,o=function(e){var t=n.locales[e];t&&r.push(t)},i=function(e){if(e){o(e);var t=e.indexOf("-");t<1||(e=e.substring(0,t),o(e))}};i(t),i(this.currentLocale),i(this.defaultLocale),"en"!==this.defaultLocale&&o("en");for(var s=0;s<r.length;s++){var a=r[s][e];if(void 0!==a)return a}return this.onGetExternalString(e,t)},getLocales:function(e){void 0===e&&(e=!1);var t=[];t.push("");var n=this.locales;if(this.supportedLocales&&this.supportedLocales.length>0){n={};for(var r=0;r<this.supportedLocales.length;r++)n[this.supportedLocales[r]]=!0}for(var o in n)e&&o==this.defaultLocale||t.push(o);var i=function(e){if(!e)return"";var t=hr.localeNames[e];return t||(t=e),t.toLowerCase()};return t.sort((function(e,t){var n=i(e),r=i(t);return n===r?0:n<r?-1:1})),t},onGetExternalString:function(e,t){}};hr.locales.en=pr,hr.localeNames.en="english";var dr=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();var fr=function(){function e(t,n,r){void 0===r&&(r=!1),this.name=n,this.isRequiredValue=!1,this.isUniqueValue=!1,this.isSerializable=!0,this.isLightSerializable=!0,this.isCustom=!1,this.isDynamicChoices=!1,this.isBindable=!1,this.category="",this.categoryIndex=-1,this.visibleIndex=-1,this.maxLength=-1,this.isArray=!1,this.classInfoValue=t,this.isRequiredValue=r,this.idValue=e.Index++}return Object.defineProperty(e.prototype,"id",{get:function(){return this.idValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classInfo",{get:function(){return this.classInfoValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this.typeValue?this.typeValue:"string"},set:function(e){"itemvalues"===e&&(e="itemvalue[]"),"textitems"===e&&(e="textitem[]"),this.typeValue=e,this.typeValue.indexOf("[]")===this.typeValue.length-2&&(this.isArray=!0,this.className=this.typeValue.substring(0,this.typeValue.length-2))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRequired",{get:function(){return this.isRequiredValue},set:function(e){e!==this.isRequired&&(this.isRequiredValue=e,this.classInfo&&this.classInfo.resetAllProperties())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUnique",{get:function(){return this.isUniqueValue},set:function(e){this.isUniqueValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uniquePropertyName",{get:function(){return this.uniquePropertyValue},set:function(e){this.uniquePropertyValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasToUseGetValue",{get:function(){return this.onGetValue||this.serializationProperty},enumerable:!1,configurable:!0}),e.prototype.getDefaultValue=function(t){var n=this.defaultValueFunc?this.defaultValueFunc(t):this.defaultValueValue;return e.getItemValuesDefaultValue&&Sr.isDescendantOf(this.className,"itemvalue")&&(n=e.getItemValuesDefaultValue(this.defaultValueValue||[],this.className)),n},Object.defineProperty(e.prototype,"defaultValue",{get:function(){return this.getDefaultValue(void 0)},set:function(e){this.defaultValueValue=e},enumerable:!1,configurable:!0}),e.prototype.isDefaultValue=function(e){return this.isDefaultValueByObj(void 0,e)},e.prototype.isDefaultValueByObj=function(e,t){var n=this.getDefaultValue(e);return cr.isValueEmpty(n)?this.isLocalizable?null==t:!1===t&&("boolean"==this.type||"switch"==this.type)||""===t||cr.isValueEmpty(t):cr.isTwoValueEquals(t,n,!1,!0,!1)},e.prototype.getSerializableValue=function(e){return this.onSerializeValue?this.onSerializeValue(e):this.getValue(e)},e.prototype.getValue=function(e){return this.onGetValue?this.onGetValue(e):this.serializationProperty&&e[this.serializationProperty]?e[this.serializationProperty].getJson():e[this.name]},e.prototype.getPropertyValue=function(e){return this.isLocalizable?e[this.serializationProperty]?e[this.serializationProperty].text:null:this.getValue(e)},Object.defineProperty(e.prototype,"hasToUseSetValue",{get:function(){return this.onSetValue||this.serializationProperty},enumerable:!1,configurable:!0}),e.prototype.settingValue=function(e,t){return!this.onSettingValue||e.isLoadingFromJson?t:this.onSettingValue(e,t)},e.prototype.setValue=function(e,t,n){this.onSetValue?this.onSetValue(e,t,n):this.serializationProperty&&e[this.serializationProperty]?e[this.serializationProperty].setJson(t):(t&&"string"==typeof t&&("number"==this.type&&(t=parseInt(t)),"boolean"!=this.type&&"switch"!=this.type||(t="true"===t.toLowerCase())),e[this.name]=t)},e.prototype.validateValue=function(e){var t=this.choices;return!Array.isArray(t)||0===t.length||t.indexOf(e)>-1},e.prototype.getObjType=function(e){return this.classNamePart?e.replace(this.classNamePart,""):e},Object.defineProperty(e.prototype,"choices",{get:function(){return this.getChoices(null)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasChoices",{get:function(){return!!this.choicesValue||!!this.choicesfunc},enumerable:!1,configurable:!0}),e.prototype.getChoices=function(e,t){return void 0===t&&(t=null),null!=this.choicesValue?this.choicesValue:null!=this.choicesfunc?this.choicesfunc(e,t):null},e.prototype.setChoices=function(e,t){void 0===t&&(t=null),this.choicesValue=e,this.choicesfunc=t},e.prototype.getBaseValue=function(){return this.baseValue?"function"==typeof this.baseValue?this.baseValue():this.baseValue:""},e.prototype.setBaseValue=function(e){this.baseValue=e},Object.defineProperty(e.prototype,"readOnly",{get:function(){return null!=this.readOnlyValue&&this.readOnlyValue},set:function(e){this.readOnlyValue=e},enumerable:!1,configurable:!0}),e.prototype.isVisible=function(e,t){void 0===t&&(t=null);var n=!this.layout||this.layout==e;return!(!this.visible||!n)&&(!this.visibleIf||!t||this.visibleIf(t))},Object.defineProperty(e.prototype,"visible",{get:function(){return null==this.visibleValue||this.visibleValue},set:function(e){this.visibleValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isLocalizable",{get:function(){return null!=this.isLocalizableValue&&this.isLocalizableValue},set:function(e){this.isLocalizableValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataList",{get:function(){return Array.isArray(this.dataListValue)?this.dataListValue:[]},set:function(e){this.dataListValue=e},enumerable:!1,configurable:!0}),e.prototype.mergeWith=function(t){for(var n=e.mergableValues,r=0;r<n.length;r++)this.mergeValue(t,n[r])},e.prototype.addDependedProperty=function(e){this.dependedProperties||(this.dependedProperties=[]),this.dependedProperties.indexOf(e)<0&&this.dependedProperties.push(e)},e.prototype.getDependedProperties=function(){return this.dependedProperties?this.dependedProperties:[]},e.prototype.schemaType=function(){if("choicesByUrl"!==this.className)return"string"===this.className?this.className:this.className||this.baseClassName?"array":"switch"==this.type?"boolean":"boolean"==this.type||"number"==this.type?this.type:"string"},e.prototype.schemaRef=function(){if(this.className)return this.className},e.prototype.mergeValue=function(e,t){null==this[t]&&null!=e[t]&&(this[t]=e[t])},e.Index=1,e.mergableValues=["typeValue","choicesValue","baseValue","readOnlyValue","visibleValue","isSerializable","isLightSerializable","isCustom","isBindable","isUnique","uniquePropertyName","isDynamicChoices","isLocalizableValue","className","alternativeName","layout","classNamePart","baseClassName","defaultValue","defaultValueFunc","serializationProperty","onGetValue","onSetValue","onSettingValue","displayName","category","categoryIndex","visibleIndex","nextToProperty","overridingProperty","showMode","dependedProperties","visibleIf","onExecuteExpression","onPropertyEditorUpdate","maxLength","maxValue","minValue","dataListValue"],e}(),mr=function(){function e(){}return e.addProperty=function(t,n){t=t.toLowerCase();var r=e.properties;r[t]||(r[t]=[]),r[t].push(n)},e.removeProperty=function(t,n){t=t.toLowerCase();var r=e.properties;if(r[t])for(var o=r[t],i=0;i<o.length;i++)if(o[i].name==n){r[t].splice(i,1);break}},e.removeAllProperties=function(t){t=t.toLowerCase(),delete e.properties[t]},e.addClass=function(t,n){t=t.toLowerCase(),n&&(n=n.toLowerCase()),e.parentClasses[t]=n},e.getProperties=function(t){t=t.toLowerCase();for(var n=[],r=e.properties;t;){var o=r[t];if(o)for(var i=0;i<o.length;i++)n.push(o[i]);t=e.parentClasses[t]}return n},e.createProperties=function(t){t&&t.getType&&e.createPropertiesCore(t,t.getType())},e.createPropertiesCore=function(t,n){var r=e.properties;r[n]&&e.createPropertiesInObj(t,r[n]);var o=e.parentClasses[n];o&&e.createPropertiesCore(t,o)},e.createPropertiesInObj=function(t,n){for(var r=0;r<n.length;r++)e.createPropertyInObj(t,n[r])},e.createPropertyInObj=function(t,n){if(!(e.checkIsPropertyExists(t,n.name)||n.serializationProperty&&e.checkIsPropertyExists(t,n.serializationProperty))){if(n.isLocalizable&&n.serializationProperty&&t.createCustomLocalizableObj){t.createCustomLocalizableObj(n.name).defaultValue=n.defaultValue;var r={get:function(){return t.getLocalizableString(n.name)}};Object.defineProperty(t,n.serializationProperty,r);var o={get:function(){return t.getLocalizableStringText(n.name)},set:function(e){t.setLocalizableStringText(n.name,e)}};Object.defineProperty(t,n.name,o)}else{var i=n.defaultValue,s=n.isArray||"multiplevalues"===n.type;if("function"==typeof t.createNewArray&&(Sr.isDescendantOf(n.className,"itemvalue")?(t.createNewArray(n.name,(function(e){e.locOwner=t,e.ownerPropertyName=n.name})),s=!0):s&&t.createNewArray(n.name),s&&(Array.isArray(i)&&t.setPropertyValue(n.name,i),i=null)),t.getPropertyValue&&t.setPropertyValue){o={get:function(){return n.onGetValue?n.onGetValue(t):t.getPropertyValue(n.name,i)},set:function(e){n.onSetValue?n.onSetValue(t,e,null):t.setPropertyValue(n.name,e)}};Object.defineProperty(t,n.name,o)}}"condition"!==n.type&&"expression"!==n.type||n.onExecuteExpression&&t.addExpressionProperty(n.name,n.onExecuteExpression)}},e.checkIsPropertyExists=function(e,t){return e.hasOwnProperty(t)||e[t]},e.properties={},e.parentClasses={},e}(),yr=function(){function e(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=null),this.name=e,this.creator=n,this.parentName=r,e=e.toLowerCase(),this.isCustomValue=!n&&"survey"!==e,this.parentName&&(this.parentName=this.parentName.toLowerCase(),mr.addClass(e,this.parentName),n&&this.makeParentRegularClass()),this.properties=new Array;for(var o=0;o<t.length;o++)this.createProperty(t[o],this.isCustom)}return e.prototype.find=function(e){for(var t=0;t<this.properties.length;t++)if(this.properties[t].name==e)return this.properties[t];return null},e.prototype.findProperty=function(e){return this.fillAllProperties(),this.hashProperties[e]},e.prototype.getAllProperties=function(){return this.fillAllProperties(),this.allProperties},e.prototype.getRequiredProperties=function(){if(this.requiredProperties)return this.requiredProperties;this.requiredProperties=[];for(var e=this.getAllProperties(),t=0;t<e.length;t++)e[t].isRequired&&this.requiredProperties.push(e[t]);return this.requiredProperties},e.prototype.resetAllProperties=function(){this.allProperties=void 0,this.requiredProperties=void 0,this.hashProperties=void 0;for(var e=Sr.getChildrenClasses(this.name),t=0;t<e.length;t++)e[t].resetAllProperties()},Object.defineProperty(e.prototype,"isCustom",{get:function(){return this.isCustomValue},enumerable:!1,configurable:!0}),e.prototype.fillAllProperties=function(){var e=this;if(!this.allProperties){this.allProperties=[],this.hashProperties={};var t={};this.properties.forEach((function(e){return t[e.name]=e}));var n=this.parentName?Sr.findClass(this.parentName):null;if(n)n.getAllProperties().forEach((function(n){var r=t[n.name];r?(r.mergeWith(n),e.addPropCore(r)):e.addPropCore(n)}));this.properties.forEach((function(t){e.hashProperties[t.name]||e.addPropCore(t)}))}},e.prototype.addPropCore=function(e){this.allProperties.push(e),this.hashProperties[e.name]=e,e.alternativeName&&(this.hashProperties[e.alternativeName]=e)},e.prototype.isOverridedProp=function(e){return!!this.parentName&&!!Sr.findProperty(this.parentName,e)},e.prototype.hasRegularChildClass=function(){if(this.isCustom){this.isCustomValue=!1;for(var e=0;e<this.properties.length;e++)this.properties[e].isCustom=!1;mr.removeAllProperties(this.name),this.makeParentRegularClass()}},e.prototype.makeParentRegularClass=function(){if(this.parentName){var e=Sr.findClass(this.parentName);e&&e.hasRegularChildClass()}},e.prototype.createProperty=function(t,n){void 0===n&&(n=!1);var r="string"==typeof t?t:t.name;if(r){var o=null,i=r.indexOf(e.typeSymbol);i>-1&&(o=r.substring(i+1),r=r.substring(0,i));var s=this.getIsPropertyNameRequired(r)||!!t.isRequired;r=this.getPropertyName(r);var a=new fr(this,r,s);if(o&&(a.type=o),"object"==typeof t){if(t.type&&(a.type=t.type),void 0!==t.default&&(a.defaultValue=t.default),void 0!==t.defaultFunc&&(a.defaultValueFunc=t.defaultFunc),cr.isValueEmpty(t.isSerializable)||(a.isSerializable=t.isSerializable),cr.isValueEmpty(t.isLightSerializable)||(a.isLightSerializable=t.isLightSerializable),cr.isValueEmpty(t.maxLength)||(a.maxLength=t.maxLength),cr.isValueEmpty(t.displayName)||(a.displayName=t.displayName),cr.isValueEmpty(t.category)||(a.category=t.category),cr.isValueEmpty(t.categoryIndex)||(a.categoryIndex=t.categoryIndex),cr.isValueEmpty(t.nextToProperty)||(a.nextToProperty=t.nextToProperty),cr.isValueEmpty(t.overridingProperty)||(a.overridingProperty=t.overridingProperty),cr.isValueEmpty(t.visibleIndex)||(a.visibleIndex=t.visibleIndex),cr.isValueEmpty(t.showMode)||(a.showMode=t.showMode),cr.isValueEmpty(t.maxValue)||(a.maxValue=t.maxValue),cr.isValueEmpty(t.minValue)||(a.minValue=t.minValue),cr.isValueEmpty(t.dataList)||(a.dataList=t.dataList),cr.isValueEmpty(t.isDynamicChoices)||(a.isDynamicChoices=t.isDynamicChoices),cr.isValueEmpty(t.isBindable)||(a.isBindable=t.isBindable),cr.isValueEmpty(t.isUnique)||(a.isUnique=t.isUnique),cr.isValueEmpty(t.uniqueProperty)||(a.uniquePropertyName=t.uniqueProperty),cr.isValueEmpty(t.isArray)||(a.isArray=t.isArray),!0!==t.visible&&!1!==t.visible||(a.visible=t.visible),t.visibleIf&&(a.visibleIf=t.visibleIf),t.onExecuteExpression&&(a.onExecuteExpression=t.onExecuteExpression),t.onPropertyEditorUpdate&&(a.onPropertyEditorUpdate=t.onPropertyEditorUpdate),!0===t.readOnly&&(a.readOnly=!0),t.choices){var u="function"==typeof t.choices?t.choices:null,l="function"!=typeof t.choices?t.choices:null;a.setChoices(l,u)}if(t.baseValue&&a.setBaseValue(t.baseValue),t.onSerializeValue&&(a.onSerializeValue=t.onSerializeValue),t.onGetValue&&(a.onGetValue=t.onGetValue),t.onSetValue&&(a.onSetValue=t.onSetValue),t.onSettingValue&&(a.onSettingValue=t.onSettingValue),t.isLocalizable&&(t.serializationProperty="loc"+a.name),t.serializationProperty)a.serializationProperty=t.serializationProperty,a.serializationProperty&&0==a.serializationProperty.indexOf("loc")&&(a.isLocalizable=!0);t.isLocalizable&&(a.isLocalizable=t.isLocalizable),t.className&&(a.className=t.className),t.baseClassName&&(a.baseClassName=t.baseClassName,a.isArray=!0),!0===a.isArray&&(a.isArray=!0),t.classNamePart&&(a.classNamePart=t.classNamePart),t.alternativeName&&(a.alternativeName=t.alternativeName),t.layout&&(a.layout=t.layout),t.dependsOn&&this.addDependsOnProperties(a,t.dependsOn)}return this.properties.push(a),n&&!this.isOverridedProp(a.name)&&(a.isCustom=!0,mr.addProperty(this.name,a)),a}},e.prototype.addDependsOnProperties=function(e,t){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addDependsOnProperty(e,t[n]);else this.addDependsOnProperty(e,t)},e.prototype.addDependsOnProperty=function(e,t){var n=this.find(t);n||(n=Sr.findProperty(this.parentName,t)),n&&n.addDependedProperty(e.name)},e.prototype.getIsPropertyNameRequired=function(t){return t.length>0&&t[0]==e.requiredSymbol},e.prototype.getPropertyName=function(e){return this.getIsPropertyNameRequired(e)?e=e.slice(1):e},e.requiredSymbol="!",e.typeSymbol=":",e}(),gr=function(){function e(){this.classes={},this.alternativeNames={},this.childrenClasses={},this.dynamicPropsCache={}}return e.prototype.getObjPropertyValue=function(e,t){if(this.isObjWrapper(e)){var n=e.getOriginalObj();if(r=Sr.findProperty(n.getType(),t))return this.getObjPropertyValueCore(n,r)}var r;return(r=Sr.findProperty(e.getType(),t))?this.getObjPropertyValueCore(e,r):e[t]},e.prototype.setObjPropertyValue=function(e,t,n){if(e[t]!==n)if(e[t]&&e[t].setJson)e[t].setJson(n);else{if(Array.isArray(n)){for(var r=[],o=0;o<n.length;o++)r.push(n[o]);n=r}e[t]=n}},e.prototype.getObjPropertyValueCore=function(e,t){if(!t.isSerializable)return e[t.name];if(t.isLocalizable){if(t.isArray)return e[t.name];if(t.serializationProperty)return e[t.serializationProperty].text}return e.getPropertyValue(t.name)},e.prototype.isObjWrapper=function(e){return!!e.getOriginalObj&&!!e.getOriginalObj()},e.prototype.addClass=function(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=null),e=e.toLowerCase();var o=new yr(e,t,n,r);(this.classes[e]=o,r)&&(r=r.toLowerCase(),this.childrenClasses[r]||(this.childrenClasses[r]=[]),this.childrenClasses[r].push(o));return o},e.prototype.removeClass=function(e){var t=this.findClass(e);if(t&&(delete this.classes[t.name],t.parentName)){var n=this.childrenClasses[t.parentName].indexOf(t);n>-1&&this.childrenClasses[t.parentName].splice(n,1)}},e.prototype.overrideClassCreatore=function(e,t){this.overrideClassCreator(e,t)},e.prototype.overrideClassCreator=function(e,t){e=e.toLowerCase();var n=this.findClass(e);n&&(n.creator=t)},e.prototype.getProperties=function(e){var t=this.findClass(e);return t?t.getAllProperties():[]},e.prototype.getPropertiesByObj=function(e){if(!e||!e.getType)return[];for(var t={},n=this.getProperties(e.getType()),r=0;r<n.length;r++)t[n[r].name]=n[r];var o=e.getDynamicType?this.getProperties(e.getDynamicType()):null;if(o&&o.length>0)for(r=0;r<o.length;r++){var i=o[r];t[i.name]||(t[i.name]=i)}return Object.keys(t).map((function(e){return t[e]}))},e.prototype.getDynamicPropertiesByObj=function(e,t){if(void 0===t&&(t=null),!e||!e.getType||!e.getDynamicType&&!t)return[];var n=e.getType(),r=t||e.getDynamicType();if(!r)return[];var o=r+"-"+n;if(this.dynamicPropsCache[o])return this.dynamicPropsCache[o];var i=this.getProperties(r);if(!i||0==i.length)return[];for(var s={},a=this.getProperties(n),u=0;u<a.length;u++)s[a[u].name]=a[u];var l=[];for(u=0;u<i.length;u++){var c=i[u];s[c.name]||l.push(c)}return this.dynamicPropsCache[o]=l,l},e.prototype.hasOriginalProperty=function(e,t){return!!this.getOriginalProperty(e,t)},e.prototype.getOriginalProperty=function(e,t){var n=this.findProperty(e.getType(),t);return n||(this.isObjWrapper(e)?this.findProperty(e.getOriginalObj().getType(),t):null)},e.prototype.getProperty=function(e,t){var n=this.findProperty(e,t);if(!n)return n;var r=this.findClass(e);if(n.classInfo===r)return n;var o=new fr(r,n.name,n.isRequired);return o.mergeWith(n),o.isArray=n.isArray,r.properties.push(o),r.resetAllProperties(),o},e.prototype.findProperty=function(e,t){var n=this.findClass(e);return n?n.findProperty(t):null},e.prototype.findProperties=function(e,t){var n=new Array,r=this.findClass(e);if(!r)return n;for(var o=0;o<t.length;o++){var i=r.findProperty(t[o]);i&&n.push(i)}return n},e.prototype.getAllPropertiesByName=function(e){for(var t=new Array,n=this.getAllClasses(),r=0;r<n.length;r++)for(var o=this.findClass(n[r]),i=0;i<o.properties.length;i++)if(o.properties[i].name==e){t.push(o.properties[i]);break}return t},e.prototype.getAllClasses=function(){var e=new Array;for(var t in this.classes)e.push(t);return e},e.prototype.createClass=function(e,t){void 0===t&&(t=void 0),e=e.toLowerCase();var n=this.findClass(e);if(!n)return null;if(n.creator)return n.creator(t);for(var r=n.parentName;r;){if(!(n=this.findClass(r)))return null;if(r=n.parentName,n.creator)return this.createCustomType(e,n.creator,t)}return null},e.prototype.createCustomType=function(e,t,n){void 0===n&&(n=void 0),e=e.toLowerCase();var r=t(n),o=e,i=r.getTemplate?r.getTemplate():r.getType();return r.getType=function(){return o},r.getTemplate=function(){return i},mr.createProperties(r),r},e.prototype.getChildrenClasses=function(e,t){void 0===t&&(t=!1),e=e.toLowerCase();var n=[];return this.fillChildrenClasses(e,t,n),n},e.prototype.getRequiredProperties=function(e){var t=this.findClass(e);if(!t)return[];for(var n=t.getRequiredProperties(),r=[],o=0;o<n.length;o++)r.push(n[o].name);return r},e.prototype.addProperties=function(e,t){e=e.toLowerCase();for(var n=this.findClass(e),r=0;r<t.length;r++)this.addCustomPropertyCore(n,t[r])},e.prototype.addProperty=function(e,t){return this.addCustomPropertyCore(this.findClass(e),t)},e.prototype.addCustomPropertyCore=function(e,t){if(!e)return null;var n=e.createProperty(t,!0);return n&&(this.clearDynamicPropsCache(e),e.resetAllProperties()),n},e.prototype.removeProperty=function(e,t){var n=this.findClass(e);if(!n)return!1;var r=n.find(t);r&&(this.clearDynamicPropsCache(n),this.removePropertyFromClass(n,r),n.resetAllProperties(),mr.removeProperty(n.name,t))},e.prototype.clearDynamicPropsCache=function(e){this.dynamicPropsCache={}},e.prototype.removePropertyFromClass=function(e,t){var n=e.properties.indexOf(t);n<0||e.properties.splice(n,1)},e.prototype.fillChildrenClasses=function(e,t,n){var r=this.childrenClasses[e];if(r)for(var o=0;o<r.length;o++)t&&!r[o].creator||n.push(r[o]),this.fillChildrenClasses(r[o].name,t,n)},e.prototype.findClass=function(e){e=e.toLowerCase();var t=this.classes[e];if(!t){var n=this.alternativeNames[e];if(n&&n!=e)return this.findClass(n)}return t},e.prototype.isDescendantOf=function(e,t){if(!e||!t)return!1;e=e.toLowerCase(),t=t.toLowerCase();var n=this.findClass(e);if(!n)return!1;var r=n;do{if(r.name===t)return!0;r=this.classes[r.parentName]}while(r);return!1},e.prototype.addAlterNativeClassName=function(e,t){this.alternativeNames[t.toLowerCase()]=e.toLowerCase()},e.prototype.generateSchema=function(e){void 0===e&&(e=void 0),e||(e="survey");var t=this.findClass(e);if(!t)return null;var n={$schema:"http://json-schema.org/draft-07/schema#",title:"SurveyJS Library json schema",type:"object",properties:{},definitions:{locstring:this.generateLocStrClass()}};return this.generateSchemaProperties(t,n,n.definitions,!0),n},e.prototype.generateLocStrClass=function(){var e={},t=Sr.findProperty("survey","locale");if(t){var n=t.getChoices(null);Array.isArray(n)&&(n.indexOf("en")<0&&n.splice(0,0,"en"),n.splice(0,0,"default"),n.forEach((function(t){t&&(e[t]={type:"string"})})))}return{$id:"locstring",type:"object",properties:e}},e.prototype.generateSchemaProperties=function(e,t,n,r){if(e){var o=t.properties,i=[];"question"!==e.name&&"panel"!==e.name||(o.type={type:"string"},i.push("type"));for(var s=0;s<e.properties.length;s++){var a=e.properties[s];e.parentName&&Sr.findProperty(e.parentName,a.name)||(o[a.name]=this.generateSchemaProperty(a,n,r),a.isRequired&&i.push(a.name))}i.length>0&&(t.required=i)}},e.prototype.generateSchemaProperty=function(e,t,n){if(e.isLocalizable)return{oneOf:[{type:"string"},{$ref:this.getChemeRefName("locstring",n)}]};var r=e.schemaType(),o=e.schemaRef(),i={};if(r&&(i.type=r),e.hasChoices){var s=e.getChoices(null);Array.isArray(s)&&s.length>0&&(i.enum=this.getChoicesValues(s))}if(o&&("array"===r?"string"===e.className?i.items={type:e.className}:i.items={$ref:this.getChemeRefName(e.className,n)}:i.$ref=this.getChemeRefName(o,n),this.generateChemaClass(e.className,t,!1)),e.baseClassName){var a=this.getChildrenClasses(e.baseClassName,!0);"question"==e.baseClassName&&a.push(this.findClass("panel")),i.items={anyOf:[]};for(var u=0;u<a.length;u++){var l=a[u].name;i.items.anyOf.push({$ref:this.getChemeRefName(l,n)}),this.generateChemaClass(l,t,!1)}}return i},e.prototype.getChemeRefName=function(e,t){return t?"#/definitions/"+e:e},e.prototype.generateChemaClass=function(e,t,n){if(!t[e]){var r=this.findClass(e);if(r){var o=!!r.parentName&&"base"!=r.parentName;o&&this.generateChemaClass(r.parentName,t,n);var i={type:"object",$id:e};t[e]=i;var s={properties:{}};this.generateSchemaProperties(r,s,t,n),o?i.allOf=[{$ref:this.getChemeRefName(r.parentName,n)},{properties:s.properties}]:i.properties=s.properties,Array.isArray(s.required)&&(i.required=s.required)}}},e.prototype.getChoicesValues=function(e){var t=new Array;return e.forEach((function(e){"object"==typeof e&&void 0!==e.value?t.push(e.value):t.push(e)})),t},e}(),vr=function(){function e(e,t){this.type=e,this.message=t,this.description="",this.at=-1,this.end=-1}return e.prototype.getFullDescription=function(){return this.message+(this.description?"\n"+this.description:"")},e}(),br=function(e){function t(t,n){var r=e.call(this,"unknownproperty","The property '"+t+"' in class '"+n+"' is unknown.")||this;r.propertyName=t,r.className=n;var o=Sr.getProperties(n);if(o){r.description="The list of available properties are: ";for(var i=0;i<o.length;i++)i>0&&(r.description+=", "),r.description+=o[i].name;r.description+="."}return r}return dr(t,e),t}(vr),Cr=function(e){function t(t,n,r){var o=e.call(this,n,r)||this;o.baseClassName=t,o.type=n,o.message=r,o.description="The following types are available: ";for(var i=Sr.getChildrenClasses(t,!0),s=0;s<i.length;s++)s>0&&(o.description+=", "),o.description+="'"+i[s].name+"'";return o.description+=".",o}return dr(t,e),t}(vr),Er=function(e){function t(t,n){var r=e.call(this,n,"missingtypeproperty","The property type is missing in the object. Please take a look at property: '"+t+"'.")||this;return r.propertyName=t,r.baseClassName=n,r}return dr(t,e),t}(Cr),qr=function(e){function t(t,n){var r=e.call(this,n,"incorrecttypeproperty","The property type is incorrect in the object. Please take a look at property: '"+t+"'.")||this;return r.propertyName=t,r.baseClassName=n,r}return dr(t,e),t}(Cr),wr=function(e){function t(t,n){var r=e.call(this,"requiredproperty","The property '"+t+"' is required in class '"+n+"'.")||this;return r.propertyName=t,r.className=n,r}return dr(t,e),t}(vr),Or=function(e){function t(t,n){var r=e.call(this,"arrayproperty","The property '"+t+"' should be an array in '"+n+"'.")||this;return r.propertyName=t,r.className=n,r}return dr(t,e),t}(vr),Pr=function(e){function t(t,n){var r=e.call(this,"incorrectvalue","The property value: '"+n+"' is incorrect for property '"+t.name+"'.")||this;return r.property=t,r.value=n,r}return dr(t,e),t}(vr),xr=function(){function e(){this.errors=new Array,this.lightSerializing=!1}return Object.defineProperty(e,"metaData",{get:function(){return e.metaDataValue},enumerable:!1,configurable:!0}),e.prototype.toJsonObject=function(e,t){return void 0===t&&(t=!1),this.toJsonObjectCore(e,null,t)},e.prototype.toObject=function(e,t,n){this.toObjectCore(e,t,n);var r=this.getRequiredError(t,e);r&&this.addNewError(r,e,t)},e.prototype.toObjectCore=function(t,n,r){if(t){var o=null,i=void 0,s=!0;if(n.getType&&(i=n.getType(),o=Sr.getProperties(i),s=!!i&&!Sr.isDescendantOf(i,"itemvalue")),o){for(var a in n.startLoadingFromJson&&n.startLoadingFromJson(t),o=this.addDynamicProperties(n,t,o),this.options=r,t)if(a!==e.typePropertyName)if(a!==e.positionPropertyName){var u=this.findProperty(o,a);u?this.valueToObj(t[a],n,u,t,r):s&&this.addNewError(new br(a.toString(),i),t,n)}else n[a]=t[a];this.options=void 0,n.endLoadingFromJson&&n.endLoadingFromJson()}}},e.prototype.toJsonObjectCore=function(t,n,r){if(void 0===r&&(r=!1),!t||!t.getType)return t;if("function"==typeof t.getData)return t.getData();var o={};return null==n||n.className||(o[e.typePropertyName]=n.getObjType(t.getType())),this.propertiesToJson(t,Sr.getProperties(t.getType()),o,r),this.propertiesToJson(t,this.getDynamicProperties(t),o,r),o},e.prototype.getDynamicProperties=function(e){return Sr.getDynamicPropertiesByObj(e)},e.prototype.addDynamicProperties=function(e,t,n){if(!e.getDynamicPropertyName)return n;var r=e.getDynamicPropertyName();if(!r)return n;t[r]&&(e[r]=t[r]);for(var o=this.getDynamicProperties(e),i=[],s=0;s<n.length;s++)i.push(n[s]);for(s=0;s<o.length;s++)i.push(o[s]);return i},e.prototype.propertiesToJson=function(e,t,n,r){void 0===r&&(r=!1);for(var o=0;o<t.length;o++)this.valueToJson(e,n,t[o],r)},e.prototype.valueToJson=function(e,t,n,r){if(void 0===r&&(r=!1),!(!1===n.isSerializable||!1===n.isLightSerializable&&this.lightSerializing)){var o=n.getSerializableValue(e);if(r||!n.isDefaultValueByObj(e,o)){if(this.isValueArray(o)){for(var i=[],s=0;s<o.length;s++)i.push(this.toJsonObjectCore(o[s],n,r));o=i.length>0?i:null}else o=this.toJsonObjectCore(o,n,r);var a="function"==typeof e.getPropertyValue&&null!==e.getPropertyValue(n.name,null);(r&&a||!n.isDefaultValueByObj(e,o))&&(Sr.onSerializingProperty&&Sr.onSerializingProperty(e,n,o,t)||(t[n.name]=o))}}},e.prototype.valueToObj=function(e,t,n,r,o){if(null!=e)if(this.removePos(n,e),null!=n&&n.hasToUseSetValue)n.setValue(t,e,this);else{if(n.isArray&&!Array.isArray(e)&&e){e=[e];var i=r&&n.alternativeName&&r[n.alternativeName]?n.alternativeName:n.name;this.addNewError(new Or(i,t.getType()),r||e,t)}if(this.isValueArray(e))this.valueToArray(e,t,n.name,n,o);else{var s=this.createNewObj(e,n);s.newObj&&(this.toObjectCore(e,s.newObj,o),e=s.newObj),s.error||(null!=n?(n.setValue(t,e,this),o&&o.validatePropertyValues&&(n.validateValue(e)||this.addNewError(new Pr(n,e),r,t))):t[n.name]=e)}}},e.prototype.removePos=function(e,t){!e||!e.type||e.type.indexOf("value")<0||this.removePosFromObj(t)},e.prototype.removePosFromObj=function(t){if(t){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.removePosFromObj(t[n]);t[e.positionPropertyName]&&delete t[e.positionPropertyName]}},e.prototype.isValueArray=function(e){return e&&Array.isArray(e)},e.prototype.createNewObj=function(e,t){var n={newObj:null,error:null},r=this.getClassNameForNewObj(e,t);return n.newObj=r?Sr.createClass(r,e):null,n.error=this.checkNewObjectOnErrors(n.newObj,e,t,r),n},e.prototype.getClassNameForNewObj=function(t,n){var r=null!=n&&n.className?n.className:void 0;if(r||(r=t[e.typePropertyName]),!r)return r;r=r.toLowerCase();var o=n.classNamePart;return o&&r.indexOf(o)<0&&(r+=o),r},e.prototype.checkNewObjectOnErrors=function(e,t,n,r){var o=null;return e?o=this.getRequiredError(e,t):n.baseClassName&&(o=r?new qr(n.name,n.baseClassName):new Er(n.name,n.baseClassName)),o&&this.addNewError(o,t,e),o},e.prototype.getRequiredError=function(e,t){if(!e.getType||"function"==typeof e.getData)return null;var n=Sr.findClass(e.getType());if(!n)return null;var r=n.getRequiredProperties();if(!Array.isArray(r))return null;for(var o=0;o<r.length;o++){var i=r[o];if(cr.isValueEmpty(i.defaultValue)&&!t[i.name])return new wr(i.name,e.getType())}return null},e.prototype.addNewError=function(t,n,r){if(t.jsonObj=n,t.element=r,this.errors.push(t),n){var o=n[e.positionPropertyName];o&&(t.at=o.start,t.end=o.end)}},e.prototype.valueToArray=function(e,t,n,r,o){if(!t[n]||this.isValueArray(t[n])){t[n]&&e.length>0&&t[n].splice(0,t[n].length);var i=t[n]?t[n]:[];this.addValuesIntoArray(e,i,r,o),t[n]||(t[n]=i)}},e.prototype.addValuesIntoArray=function(e,t,n,r){for(var o=0;o<e.length;o++){var i=this.createNewObj(e[o],n);i.newObj?(e[o].name&&(i.newObj.name=e[o].name),e[o].valueName&&(i.newObj.valueName=e[o].valueName.toString()),t.push(i.newObj),this.toObjectCore(e[o],i.newObj,r)):i.error||t.push(e[o])}},e.prototype.findProperty=function(e,t){if(!e)return null;for(var n=0;n<e.length;n++){var r=e[n];if(r.name==t||r.alternativeName==t)return r}return null},e.typePropertyName="type",e.positionPropertyName="pos",e.metaDataValue=new gr,e}(),Sr=xr.metaData,_r=function(){function e(){this.values=null,this.properties=null}return e.prototype.getFirstName=function(e,t){if(void 0===t&&(t=null),!e)return e;var n="";if(t&&(n=this.getFirstPropertyName(e,t)))return n;for(var r=0;r<e.length;r++){var o=e[r];if("."==o||"["==o)break;n+=o}return n},e.prototype.hasValue=function(e,t){return void 0===t&&(t=null),t||(t=this.values),this.getValueCore(e,t).hasValue},e.prototype.getValue=function(e,t){return void 0===t&&(t=null),t||(t=this.values),this.getValueCore(e,t).value},e.prototype.setValue=function(e,t,n){if(t){var r=this.getNonNestedObject(e,t,!0);r&&(e=r.value,t=r.text,e&&t&&(e[t]=n))}},e.prototype.getValueInfo=function(e){if(e.path)return e.value=this.getValueFromPath(e.path,this.values),e.hasValue=null!==e.value&&!cr.isValueEmpty(e.value),void(!e.hasValue&&e.path.length>1&&"length"==e.path[e.path.length-1]&&(e.hasValue=!0,e.value=0));var t=this.getValueCore(e.name,this.values);e.value=t.value,e.hasValue=t.hasValue,e.path=t.hasValue?t.path:null,e.sctrictCompare=t.sctrictCompare},e.prototype.isAnyKeyChanged=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];if(e.hasOwnProperty(r))return!0;var o=this.getFirstName(r);if(e.hasOwnProperty(o)){if(r===o)return!0;var i=e[o];if(null!=i){if(!i.hasOwnProperty("oldValue")||!i.hasOwnProperty("newValue"))return!0;var s={};s[o]=i.oldValue;var a=this.getValue(r,s);s[o]=i.newValue;var u=this.getValue(r,s);if(!cr.isTwoValueEquals(a,u,!1,!1,!1))return!0}}}return!1},e.prototype.getValueFromPath=function(e,t){if(2===e.length&&"@survey"===e[0])return this.getValueFromSurvey(e[1]);for(var n=0;t&&n<e.length;){var r=e[n];if(cr.isNumber(r)&&Array.isArray(t)&&r>=t.length)return null;t=t[r],n++}return t},e.prototype.getValueCore=function(e,t){var n=this.getQuestionDirectly(e);if(n)return{hasValue:!0,value:n.value,path:[e],sctrictCompare:n.requireStrictCompare};var r=this.getValueFromValues(e,t);if(e&&!r.hasValue){var o=this.getValueFromSurvey(e);void 0!==o&&(r.hasValue=!0,r.value=o,r.path=["@survey",e])}return r},e.prototype.getQuestionDirectly=function(e){if(this.properties&&this.properties.survey)return this.properties.survey.getQuestionByValueName(e)},e.prototype.getValueFromSurvey=function(e){if(this.properties&&this.properties.survey)return this.properties.survey.getBuiltInVariableValue(e.toLocaleLowerCase())},e.prototype.getValueFromValues=function(e,t){var n={hasValue:!1,value:null,path:null},r=t;if(!r&&0!==r&&!1!==r)return n;e&&e.lastIndexOf(".length")>-1&&e.lastIndexOf(".length")===e.length-".length".length&&(n.value=0,n.hasValue=!0);var o=this.getNonNestedObject(r,e,!1);return o?(n.path=o.path,n.value=o.text?this.getObjectValue(o.value,o.text):o.value,n.hasValue=!cr.isValueEmpty(n.value),n):n},e.prototype.getNonNestedObject=function(e,t,n){for(var r=new Array,o=0,i=this.getNonNestedObjectCore(e,t,n,r);!i&&o<r.length;)o=r.length,i=this.getNonNestedObjectCore(e,t,n,r);return i},e.prototype.getNonNestedObjectCore=function(e,t,n,r){var o=this.getFirstPropertyName(t,e,n,r);o&&r.push(o);for(var i=o?[o]:null;t!=o&&e;){if("["==t[0]){var s=this.getObjInArray(e,t);if(!s)return null;e=s.value,t=s.text,i.push(s.index)}else{if(!o&&t==this.getFirstName(t))return{value:e,text:t,path:i};if(e=this.getObjectValue(e,o),cr.isValueEmpty(e)&&!n)return null;t=t.substring(o.length)}t&&"."==t[0]&&(t=t.substring(1)),(o=this.getFirstPropertyName(t,e,n,r))&&i.push(o)}return{value:e,text:t,path:i}},e.prototype.getObjInArray=function(e,t){if(!Array.isArray(e))return null;for(var n=1,r="";n<t.length&&"]"!=t[n];)r+=t[n],n++;return t=n<t.length?t.substring(n+1):"",(n=this.getIntValue(r))<0||n>=e.length?null:{value:e[n],text:t,index:n}},e.prototype.getFirstPropertyName=function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=void 0),!e)return e;if(t||(t={}),t.hasOwnProperty(e))return e;var o=e.toLowerCase(),i=o[0],s=i.toUpperCase();for(var a in t)if(!(Array.isArray(r)&&r.indexOf(a)>-1)){var u=a[0];if(u===s||u===i){var l=a.toLowerCase();if(l==o)return a;if(o.length<=l.length)continue;var c=o[l.length];if("."!=c&&"["!=c)continue;if(l==o.substring(0,l.length))return a}}if(n&&"["!==e[0]){var p=e.indexOf(".");return p>-1&&(t[e=e.substring(0,p)]={}),e}return""},e.prototype.getObjectValue=function(e,t){return t?e[t]:null},e.prototype.getIntValue=function(e){return"0"==e||(0|e)>0&&e%1==0?Number(e):-1},e}(),Nr=function(){function e(){}return e.disposedObjectChangedProperty=function(t,n){e.warn('An attempt to set a property "'+t+'" of a disposed object "'+n+'"')},e.inCorrectQuestionValue=function(t,n){var r=JSON.stringify(n,null,3);e.warn("An attempt to assign an incorrect value"+r+' to the following question: "'+t+'"')},e.warn=function(e){console.warn(e)},e.error=function(e){console.error(e)},e}(),Ir=function(){function e(){this.functionHash={},this.isAsyncHash={}}return e.prototype.register=function(e,t,n){void 0===n&&(n=!1),this.functionHash[e]=t,n&&(this.isAsyncHash[e]=!0)},e.prototype.unregister=function(e){delete this.functionHash[e],delete this.isAsyncHash[e]},e.prototype.hasFunction=function(e){return!!this.functionHash[e]},e.prototype.isAsyncFunction=function(e){return!!this.isAsyncHash[e]},e.prototype.clear=function(){this.functionHash={}},e.prototype.getAll=function(){var e=[];for(var t in this.functionHash)e.push(t);return e.sort()},e.prototype.run=function(e,t,n){void 0===n&&(n=null);var r=this.functionHash[e];if(!r)return Nr.warn("Unknown function name: "+e),null;var o={func:r};if(n)for(var i in n)o[i]=n[i];return o.func(t)},e.Instance=new e,e}();Ir.Instance.register;function Vr(e,t){if(null!=e)if(Array.isArray(e))for(var n=0;n<e.length;n++)Vr(e[n],t);else cr.isNumber(e)&&(e=cr.getNumber(e)),t.push(e)}function jr(e){var t=[];Vr(e,t);for(var n=0,r=0;r<t.length;r++)n=cr.correctAfterPlusMinis(n,t[r],n+t[r]);return n}function Tr(e,t){var n=[];Vr(e,n);for(var r=void 0,o=0;o<n.length;o++)void 0===r&&(r=n[o]),t?r>n[o]&&(r=n[o]):r<n[o]&&(r=n[o]);return r}function Rr(e,t,n,r,o){return!e||cr.isValueEmpty(e[t])?n:r(n,o?function(e){return"string"==typeof e?cr.isNumber(e)?cr.getNumber(e):void 0:e}(e[t]):1)}function Dr(e,t,n){void 0===n&&(n=!0);var r=function(e){if(2!=e.length)return null;var t=e[0];if(!t)return null;if(!Array.isArray(t)&&!Array.isArray(Object.keys(t)))return null;var n=e[1];return"string"==typeof n||n instanceof String?{data:t,name:n}:null}(e);if(r){var o=void 0;if(Array.isArray(r.data))for(var i=0;i<r.data.length;i++)o=Rr(r.data[i],r.name,o,t,n);else for(var s in r.data)o=Rr(r.data[s],r.name,o,t,n);return o}}function Ar(e){var t=Dr(e,(function(e,t){return null==e&&(e=0),null==t||null==t?e:cr.correctAfterPlusMinis(e,t,e+t)}));return void 0!==t?t:0}function Lr(e){var t=Dr(e,(function(e,t){return null==e&&(e=0),null==t||null==t?e:e+1}),!1);return void 0!==t?t:0}function kr(e){if(!e)return!1;for(var t=e.questions,n=0;n<t.length;n++)if(!t[n].validate(!1))return!1;return!0}function Br(e){var t=new Date;return lr.localization.useLocalTimeZone?t.setHours(0,0,0,0):t.setUTCHours(0,0,0,0),Array.isArray(e)&&1==e.length&&t.setDate(t.getDate()+e[0]),t}function Mr(e){var t=Br(void 0);return e&&e[0]&&(t=new Date(e[0])),t}function Fr(e,t){if(e&&t){for(var n=["row","panel","survey"],r=0;r<n.length;r++){var o=e[n[r]];if(o&&o.getQuestionByName){var i=o.getQuestionByName(t);if(i)return i}}return null}}Ir.Instance.register("sum",jr),Ir.Instance.register("min",(function(e){return Tr(e,!0)})),Ir.Instance.register("max",(function(e){return Tr(e,!1)})),Ir.Instance.register("count",(function(e){var t=[];return Vr(e,t),t.length})),Ir.Instance.register("avg",(function(e){var t=[];Vr(e,t);var n=jr(e);return t.length>0?n/t.length:0})),Ir.Instance.register("sumInArray",Ar),Ir.Instance.register("minInArray",(function(e){return Dr(e,(function(e,t){return null==e?t:null==t||null==t||e<t?e:t}))})),Ir.Instance.register("maxInArray",(function(e){return Dr(e,(function(e,t){return null==e?t:null==t||null==t||e>t?e:t}))})),Ir.Instance.register("countInArray",Lr),Ir.Instance.register("avgInArray",(function(e){var t=Lr(e);return 0==t?0:Ar(e)/t})),Ir.Instance.register("iif",(function(e){return e||3===e.length?e[0]?e[1]:e[2]:""})),Ir.Instance.register("getDate",(function(e){return!e&&e.length<1?null:e[0]?new Date(e[0]):null})),Ir.Instance.register("age",(function(e){if(!e&&e.length<1)return null;if(!e[0])return null;var t=new Date(e[0]),n=new Date,r=n.getFullYear()-t.getFullYear(),o=n.getMonth()-t.getMonth();return(o<0||0===o&&n.getDate()<t.getDate())&&(r-=r>0?1:0),r})),Ir.Instance.register("isContainerReady",(function(e){if(!e&&e.length<1)return!1;if(!e[0]||!this.survey)return!1;var t=e[0],n=this.survey.getPageByName(t);if(n||(n=this.survey.getPanelByName(t)),!n){var r=this.survey.getQuestionByName(t);if(!r||!Array.isArray(r.panels))return!1;if(!(e.length>1)){for(var o=0;o<r.panels.length;o++)if(!kr(r.panels[o]))return!1;return!0}e[1]<r.panels.length&&(n=r.panels[e[1]])}return kr(n)})),Ir.Instance.register("isDisplayMode",(function(){return this.survey&&this.survey.isDisplayMode})),Ir.Instance.register("currentDate",(function(){return new Date})),Ir.Instance.register("today",Br),Ir.Instance.register("getYear",(function(e){if(1===e.length&&e[0])return new Date(e[0]).getFullYear()})),Ir.Instance.register("currentYear",(function(){return(new Date).getFullYear()})),Ir.Instance.register("diffDays",(function(e){if(!Array.isArray(e)||2!==e.length)return 0;if(!e[0]||!e[1])return 0;var t=new Date(e[0]),n=new Date(e[1]),r=Math.abs(n-t);return Math.ceil(r/864e5)})),Ir.Instance.register("year",(function(e){return Mr(e).getFullYear()})),Ir.Instance.register("month",(function(e){return Mr(e).getMonth()+1})),Ir.Instance.register("day",(function(e){return Mr(e).getDate()})),Ir.Instance.register("weekday",(function(e){return Mr(e).getDay()})),Ir.Instance.register("displayValue",(function(e){var t=Fr(this,e[0]);return t?t.displayValue:""})),Ir.Instance.register("propertyValue",(function(e){if(2===e.length&&e[0]&&e[1]){var t=Fr(this,e[0]);return t?t[e[1]]:void 0}}));var zr=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Hr=function(){function e(){}return e.prototype.toString=function(e){return void 0===e&&(e=void 0),""},e.prototype.hasFunction=function(){return!1},e.prototype.hasAsyncFunction=function(){return!1},e.prototype.addToAsyncList=function(e){},e.prototype.isEqual=function(e){return!!e&&e.getType()===this.getType()&&this.isContentEqual(e)},e.prototype.areOperatorsEquals=function(e,t){return!e&&!t||!!e&&e.isEqual(t)},e}(),Wr=function(e){function t(t,n,r,o){void 0===n&&(n=null),void 0===r&&(r=null),void 0===o&&(o=!1);var i=e.call(this)||this;return i.operatorName=t,i.left=n,i.right=r,i.isArithmeticValue=o,i.consumer=o?Yr.binaryFunctions.arithmeticOp(t):Yr.binaryFunctions[t],null==i.consumer&&Yr.throwInvalidOperatorError(t),i}return zr(t,e),Object.defineProperty(t.prototype,"requireStrictCompare",{get:function(){return this.getIsOperandRequireStrict(this.left)||this.getIsOperandRequireStrict(this.right)},enumerable:!1,configurable:!0}),t.prototype.getIsOperandRequireStrict=function(e){return!!e&&e.requireStrictCompare},t.prototype.getType=function(){return"binary"},Object.defineProperty(t.prototype,"isArithmetic",{get:function(){return this.isArithmeticValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isConjunction",{get:function(){return"or"==this.operatorName||"and"==this.operatorName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"conjunction",{get:function(){return this.isConjunction?this.operatorName:""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"operator",{get:function(){return this.operatorName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leftOperand",{get:function(){return this.left},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightOperand",{get:function(){return this.right},enumerable:!1,configurable:!0}),t.prototype.isContentEqual=function(e){var t=e;return t.operator===this.operator&&this.areOperatorsEquals(this.left,t.left)&&this.areOperatorsEquals(this.right,t.right)},t.prototype.evaluateParam=function(e,t){return null==e?null:e.evaluate(t)},t.prototype.evaluate=function(e){return this.consumer.call(this,this.evaluateParam(this.left,e),this.evaluateParam(this.right,e),this.requireStrictCompare)},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return"("+Yr.safeToString(this.left,e)+" "+Yr.operatorToString(this.operatorName)+" "+Yr.safeToString(this.right,e)+")"},t.prototype.setVariables=function(e){null!=this.left&&this.left.setVariables(e),null!=this.right&&this.right.setVariables(e)},t.prototype.hasFunction=function(){return!!this.left&&this.left.hasFunction()||!!this.right&&this.right.hasFunction()},t.prototype.hasAsyncFunction=function(){return!!this.left&&this.left.hasAsyncFunction()||!!this.right&&this.right.hasAsyncFunction()},t.prototype.addToAsyncList=function(e){this.left&&this.left.addToAsyncList(e),this.right&&this.right.addToAsyncList(e)},t}(Hr),Ur=function(e){function t(t,n){var r=e.call(this)||this;return r.expressionValue=t,r.operatorName=n,r.consumer=Yr.unaryFunctions[n],null==r.consumer&&Yr.throwInvalidOperatorError(n),r}return zr(t,e),Object.defineProperty(t.prototype,"operator",{get:function(){return this.operatorName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"expression",{get:function(){return this.expressionValue},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"unary"},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return Yr.operatorToString(this.operatorName)+" "+this.expression.toString(e)},t.prototype.isContentEqual=function(e){var t=e;return t.operator==this.operator&&this.areOperatorsEquals(this.expression,t.expression)},t.prototype.hasFunction=function(){return this.expression.hasFunction()},t.prototype.hasAsyncFunction=function(){return this.expression.hasAsyncFunction()},t.prototype.addToAsyncList=function(e){this.expression.addToAsyncList(e)},t.prototype.evaluate=function(e){var t=this.expression.evaluate(e);return this.consumer.call(this,t)},t.prototype.setVariables=function(e){this.expression.setVariables(e)},t}(Hr),Qr=function(e){function t(t){var n=e.call(this)||this;return n.values=t,n}return zr(t,e),t.prototype.getType=function(){return"array"},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return"["+this.values.map((function(t){return t.toString(e)})).join(", ")+"]"},t.prototype.evaluate=function(e){return this.values.map((function(t){return t.evaluate(e)}))},t.prototype.setVariables=function(e){this.values.forEach((function(t){t.setVariables(e)}))},t.prototype.hasFunction=function(){return this.values.some((function(e){return e.hasFunction()}))},t.prototype.hasAsyncFunction=function(){return this.values.some((function(e){return e.hasAsyncFunction()}))},t.prototype.addToAsyncList=function(e){this.values.forEach((function(t){return t.addToAsyncList(e)}))},t.prototype.isContentEqual=function(e){var t=e;if(t.values.length!==this.values.length)return!1;for(var n=0;n<this.values.length;n++)if(!t.values[n].isEqual(this.values[n]))return!1;return!0},t}(Hr),Jr=function(e){function t(t){var n=e.call(this)||this;return n.value=t,n}return zr(t,e),t.prototype.getType=function(){return"const"},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return this.value.toString()},Object.defineProperty(t.prototype,"correctValue",{get:function(){return this.getCorrectValue(this.value)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"requireStrictCompare",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.evaluate=function(){return this.getCorrectValue(this.value)},t.prototype.setVariables=function(e){},t.prototype.getCorrectValue=function(e){return e&&"string"==typeof e?this.isBooleanValue(e)?"true"===e.toLowerCase():e.length>1&&this.isQuote(e[0])&&this.isQuote(e[e.length-1])?e.substring(1,e.length-1):Yr.isNumeric(e)?0==e.indexOf("0x")?parseInt(e):e.length>1&&"0"==e[0]&&(e.length<2||"."!==e[1]&&","!==e[1])?e:parseFloat(e):e:e},t.prototype.isContentEqual=function(e){return e.value==this.value},t.prototype.isQuote=function(e){return"'"==e||'"'==e},t.prototype.isBooleanValue=function(e){return e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())},t}(Hr),Kr=function(e){function t(n){var r=e.call(this,n)||this;return r.variableName=n,r.valueInfo={},r.useValueAsItIs=!1,r.variableName&&r.variableName.length>1&&r.variableName[0]===t.DisableConversionChar&&(r.variableName=r.variableName.substring(1),r.useValueAsItIs=!0),r}return zr(t,e),Object.defineProperty(t,"DisableConversionChar",{get:function(){return lr.expressionDisableConversionChar},set:function(e){lr.expressionDisableConversionChar=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"requireStrictCompare",{get:function(){return!0===this.valueInfo.sctrictCompare},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"variable"},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var n=e(this);if(n)return n}return"{"+(this.useValueAsItIs?t.DisableConversionChar:"")+this.variableName+"}"},Object.defineProperty(t.prototype,"variable",{get:function(){return this.variableName},enumerable:!1,configurable:!0}),t.prototype.evaluate=function(e){return this.valueInfo.name=this.variableName,e.getValueInfo(this.valueInfo),this.valueInfo.hasValue?this.getCorrectValue(this.valueInfo.value):null},t.prototype.setVariables=function(e){e.push(this.variableName)},t.prototype.getCorrectValue=function(t){return this.useValueAsItIs?t:e.prototype.getCorrectValue.call(this,t)},t.prototype.isContentEqual=function(e){return e.variable==this.variable},t}(Jr),Gr=function(e){function t(t,n){var r=e.call(this)||this;return r.originalValue=t,r.parameters=n,r.isReadyValue=!1,Array.isArray(n)&&0===n.length&&(r.parameters=new Qr([])),r}return zr(t,e),t.prototype.getType=function(){return"function"},t.prototype.evaluateAsync=function(e){var t=this;this.isReadyValue=!1;var n=new _r;n.values=cr.createCopy(e.values),n.properties=cr.createCopy(e.properties),n.properties.returnResult=function(e){t.asynResult=e,t.isReadyValue=!0,t.onAsyncReady()},this.evaluateCore(n)},t.prototype.evaluate=function(e){return this.isReady?this.asynResult:this.evaluateCore(e)},t.prototype.evaluateCore=function(e){return Ir.Instance.run(this.originalValue,this.parameters.evaluate(e),e.properties)},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return this.originalValue+"("+this.parameters.toString(e)+")"},t.prototype.setVariables=function(e){this.parameters.setVariables(e)},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.isReadyValue},enumerable:!1,configurable:!0}),t.prototype.hasFunction=function(){return!0},t.prototype.hasAsyncFunction=function(){return Ir.Instance.isAsyncFunction(this.originalValue)},t.prototype.addToAsyncList=function(e){this.hasAsyncFunction()&&e.push(this)},t.prototype.isContentEqual=function(e){var t=e;return t.originalValue==this.originalValue&&this.areOperatorsEquals(t.parameters,this.parameters)},t}(Hr),Yr=function(){function e(){}return e.throwInvalidOperatorError=function(e){throw new Error("Invalid operator: '"+e+"'")},e.safeToString=function(e,t){return null==e?"":e.toString(t)},e.toOperandString=function(t){return!t||e.isNumeric(t)||e.isBooleanValue(t)||(t="'"+t+"'"),t},e.isSpaceString=function(e){return!!e&&!e.replace(" ","")},e.isNumeric=function(t){return(!t||!(t.indexOf("-")>-1||t.indexOf("+")>1||t.indexOf("*")>-1||t.indexOf("^")>-1||t.indexOf("/")>-1||t.indexOf("%")>-1))&&(!e.isSpaceString(t)&&cr.isNumber(t))},e.isBooleanValue=function(e){return!!e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())},e.countDecimals=function(e){if(cr.isNumber(e)&&Math.floor(e)!==e){var t=e.toString().split(".");return t.length>1&&t[1].length||0}return 0},e.plusMinus=function(t,n,r){var o=e.countDecimals(t),i=e.countDecimals(n);if(o>0||i>0){var s=Math.max(o,i);r=parseFloat(r.toFixed(s))}return r},e.isTwoValueEquals=function(e,t,n){return void 0===n&&(n=!0),"undefined"===e&&(e=void 0),"undefined"===t&&(t=void 0),cr.isTwoValueEquals(e,t,n)},e.operatorToString=function(t){var n=e.signs[t];return null==n?t:n},e.convertValForDateCompare=function(e,t){if(t instanceof Date&&"string"==typeof e){var n=new Date(e);return n.setHours(0,0,0),n}return e},e.unaryFunctions={empty:function(e){return cr.isValueEmpty(e)},notempty:function(t){return!e.unaryFunctions.empty(t)},negate:function(e){return!e}},e.binaryFunctions={arithmeticOp:function(t){var n=function(e,t){return cr.isValueEmpty(e)?"number"==typeof t?0:"string"==typeof e?e:"string"==typeof t?"":Array.isArray(t)?[]:0:e};return function(r,o){r=n(r,o),o=n(o,r);var i=e.binaryFunctions[t];return null==i?null:i.call(this,r,o)}},and:function(e,t){return e&&t},or:function(e,t){return e||t},plus:function(e,t){return cr.sumAnyValues(e,t)},minus:function(e,t){return cr.correctAfterPlusMinis(e,t,e-t)},mul:function(e,t){return cr.correctAfterMultiple(e,t,e*t)},div:function(e,t){return t?e/t:null},mod:function(e,t){return t?e%t:null},power:function(e,t){return Math.pow(e,t)},greater:function(t,n){return null!=t&&null!=n&&(t=e.convertValForDateCompare(t,n))>(n=e.convertValForDateCompare(n,t))},less:function(t,n){return null!=t&&null!=n&&(t=e.convertValForDateCompare(t,n))<(n=e.convertValForDateCompare(n,t))},greaterorequal:function(t,n){return!!e.binaryFunctions.equal(t,n)||e.binaryFunctions.greater(t,n)},lessorequal:function(t,n){return!!e.binaryFunctions.equal(t,n)||e.binaryFunctions.less(t,n)},equal:function(t,n,r){return t=e.convertValForDateCompare(t,n),n=e.convertValForDateCompare(n,t),e.isTwoValueEquals(t,n,!0!==r)},notequal:function(t,n,r){return!e.binaryFunctions.equal(t,n,r)},contains:function(t,n){return e.binaryFunctions.containsCore(t,n,!0)},notcontains:function(t,n){return!t&&!cr.isValueEmpty(n)||e.binaryFunctions.containsCore(t,n,!1)},anyof:function(t,n){if(cr.isValueEmpty(t)&&cr.isValueEmpty(n))return!0;if(cr.isValueEmpty(t)||!Array.isArray(t)&&0===t.length)return!1;if(cr.isValueEmpty(n))return!0;if(!Array.isArray(t))return e.binaryFunctions.contains(n,t);if(!Array.isArray(n))return e.binaryFunctions.contains(t,n);for(var r=0;r<n.length;r++)if(e.binaryFunctions.contains(t,n[r]))return!0;return!1},allof:function(t,n){if(!t&&!cr.isValueEmpty(n))return!1;if(!Array.isArray(n))return e.binaryFunctions.contains(t,n);for(var r=0;r<n.length;r++)if(!e.binaryFunctions.contains(t,n[r]))return!1;return!0},containsCore:function(t,n,r){if(!t&&0!==t&&!1!==t)return!1;if(t.length||(t=t.toString(),("string"==typeof n||n instanceof String)&&(t=t.toUpperCase(),n=n.toUpperCase())),"string"==typeof t||t instanceof String){if(!n)return!1;n=n.toString();var o=t.indexOf(n)>-1;return r?o:!o}for(var i=Array.isArray(n)?n:[n],s=0;s<i.length;s++){var a=0;for(n=i[s];a<t.length&&!e.isTwoValueEquals(t[a],n);a++);if(a==t.length)return!r}return r}},e.signs={less:"<",lessorequal:"<=",greater:">",greaterorequal:">=",equal:"==",notequal:"!=",plus:"+",minus:"-",mul:"*",div:"/",and:"and",or:"or",power:"^",mod:"%",negate:"!"},e}(),Zr=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$r=function(e){function t(n,r,o,i){var s=e.call(this)||this;return s.message=n,s.expected=r,s.found=o,s.location=i,s.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(s,t),s}return Zr(t,e),t.buildMessage=function(e,t){function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}function r(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function o(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function i(e){switch(e.type){case"literal":return'"'+r(e.text)+'"';case"class":var t=e.parts.map((function(e){return Array.isArray(e)?o(e[0])+"-"+o(e[1]):o(e)}));return"["+(e.inverted?"^":"")+t+"]";case"any":return"any character";case"end":return"end of input";case"other":return e.description}}return"Expected "+function(e){var t,n,r=e.map(i);if(r.sort(),r.length>0){for(t=1,n=1;t<r.length;t++)r[t-1]!==r[t]&&(r[n]=r[t],n++);r.length=n}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(e)+" but "+(((s=t)?'"'+r(s)+'"':"end of input")+" found.");var s},t}(Error);var Xr=function(e,t){t=void 0!==t?t:{};var n,r={},o={Expression:ze},i=ze,s=function(e,t){return ht(e,t,!0)},a=De("||",!1),u=De("or",!0),l=De("&&",!1),c=De("and",!0),p=function(e,t){return ht(e,t)},h=De("<=",!1),d=De("lessorequal",!0),f=De(">=",!1),m=De("greaterorequal",!0),y=De("==",!1),g=De("equal",!0),v=De("=",!1),b=De("!=",!1),C=De("notequal",!0),E=De("<",!1),q=De("less",!0),w=De(">",!1),O=De("greater",!0),P=De("+",!1),x=De("-",!1),S=De("*",!1),_=De("/",!1),N=De("%",!1),I=De("^",!1),V=De("power",!0),j=De("*=",!1),T=De("contains",!0),R=De("contain",!0),D=De("notcontains",!0),A=De("notcontain",!0),L=De("anyof",!0),k=De("allof",!0),B=De("(",!1),M=De(")",!1),F=De("!",!1),z=De("negate",!0),H=De("empty",!0),W=De("notempty",!0),U=De("undefined",!1),Q=De("null",!1),J=De("{",!1),K=De("}",!1),G=De("''",!1),Y=De('""',!1),Z=De("'",!1),$=function(e){return"'"+e+"'"},X=De('"',!1),ee=De("[",!1),te=De("]",!1),ne=De(",",!1),re=De("true",!0),oe=De("false",!0),ie=De("0x",!1),se=/^[\-]/,ae=Ae(["-"],!1,!1),ue=De(".",!1),le=De("0",!1),ce=function(e){return e.join("")},pe=De("\\'",!1),he=De('\\"',!1),de=/^[^"']/,fe=Ae(['"',"'"],!0,!1),me=function(){return Re()},ye=/^[^{}]/,ge=Ae(["{","}"],!0,!1),ve=/^[0-9]/,be=Ae([["0","9"]],!1,!1),Ce=/^[1-9]/,Ee=Ae([["1","9"]],!1,!1),qe=/^[a-zA-Z_]/,we=Ae([["a","z"],["A","Z"],"_"],!1,!1),Oe=Le("whitespace"),Pe=/^[ \t\n\r]/,xe=Ae([" ","\t","\n","\r"],!1,!1),Se=0,_e=0,Ne=[{line:1,column:1}],Ie=0,Ve=[],je=0,Te={};if(void 0!==t.startRule){if(!(t.startRule in o))throw new Error("Can't start parsing from rule \""+t.startRule+'".');i=o[t.startRule]}function Re(){return e.substring(_e,Se)}function De(e,t){return{type:"literal",text:e,ignoreCase:t}}function Ae(e,t,n){return{type:"class",parts:e,inverted:t,ignoreCase:n}}function Le(e){return{type:"other",description:e}}function ke(t){var n,r=Ne[t];if(r)return r;for(n=t-1;!Ne[n];)n--;for(r={line:(r=Ne[n]).line,column:r.column};n<t;)10===e.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return Ne[t]=r,r}function Be(e,t){var n=ke(e),r=ke(t);return{start:{offset:e,line:n.line,column:n.column},end:{offset:t,line:r.line,column:r.column}}}function Me(e){Se<Ie||(Se>Ie&&(Ie=Se,Ve=[]),Ve.push(e))}function Fe(e,t,n){return new $r($r.buildMessage(e,t),e,t,n)}function ze(){var e,t,n,o,i,a,u,l,c=34*Se+0,p=Te[c];if(p)return Se=p.nextPos,p.result;if(e=Se,pt()!==r)if((t=We())!==r){for(n=[],o=Se,(i=pt())!==r&&(a=He())!==r&&(u=pt())!==r&&(l=We())!==r?o=i=[i,a,u,l]:(Se=o,o=r);o!==r;)n.push(o),o=Se,(i=pt())!==r&&(a=He())!==r&&(u=pt())!==r&&(l=We())!==r?o=i=[i,a,u,l]:(Se=o,o=r);n!==r&&(o=pt())!==r?(_e=e,e=s(t,n)):(Se=e,e=r)}else Se=e,e=r;else Se=e,e=r;return Te[c]={nextPos:Se,result:e},e}function He(){var t,n,o=34*Se+1,i=Te[o];return i?(Se=i.nextPos,i.result):(t=Se,"||"===e.substr(Se,2)?(n="||",Se+=2):(n=r,0===je&&Me(a)),n===r&&("or"===e.substr(Se,2).toLowerCase()?(n=e.substr(Se,2),Se+=2):(n=r,0===je&&Me(u))),n!==r&&(_e=t,n="or"),t=n,Te[o]={nextPos:Se,result:t},t)}function We(){var e,t,n,o,i,a,u,l,c=34*Se+2,p=Te[c];if(p)return Se=p.nextPos,p.result;if(e=Se,(t=Qe())!==r){for(n=[],o=Se,(i=pt())!==r&&(a=Ue())!==r&&(u=pt())!==r&&(l=Qe())!==r?o=i=[i,a,u,l]:(Se=o,o=r);o!==r;)n.push(o),o=Se,(i=pt())!==r&&(a=Ue())!==r&&(u=pt())!==r&&(l=Qe())!==r?o=i=[i,a,u,l]:(Se=o,o=r);n!==r?(_e=e,e=t=s(t,n)):(Se=e,e=r)}else Se=e,e=r;return Te[c]={nextPos:Se,result:e},e}function Ue(){var t,n,o=34*Se+3,i=Te[o];return i?(Se=i.nextPos,i.result):(t=Se,"&&"===e.substr(Se,2)?(n="&&",Se+=2):(n=r,0===je&&Me(l)),n===r&&("and"===e.substr(Se,3).toLowerCase()?(n=e.substr(Se,3),Se+=3):(n=r,0===je&&Me(c))),n!==r&&(_e=t,n="and"),t=n,Te[o]={nextPos:Se,result:t},t)}function Qe(){var e,t,n,o,i,s,a,u,l=34*Se+4,c=Te[l];if(c)return Se=c.nextPos,c.result;if(e=Se,(t=Ke())!==r){for(n=[],o=Se,(i=pt())!==r&&(s=Je())!==r&&(a=pt())!==r&&(u=Ke())!==r?o=i=[i,s,a,u]:(Se=o,o=r);o!==r;)n.push(o),o=Se,(i=pt())!==r&&(s=Je())!==r&&(a=pt())!==r&&(u=Ke())!==r?o=i=[i,s,a,u]:(Se=o,o=r);n!==r?(_e=e,e=t=p(t,n)):(Se=e,e=r)}else Se=e,e=r;return Te[l]={nextPos:Se,result:e},e}function Je(){var t,n,o=34*Se+5,i=Te[o];return i?(Se=i.nextPos,i.result):(t=Se,"<="===e.substr(Se,2)?(n="<=",Se+=2):(n=r,0===je&&Me(h)),n===r&&("lessorequal"===e.substr(Se,11).toLowerCase()?(n=e.substr(Se,11),Se+=11):(n=r,0===je&&Me(d))),n!==r&&(_e=t,n="lessorequal"),(t=n)===r&&(t=Se,">="===e.substr(Se,2)?(n=">=",Se+=2):(n=r,0===je&&Me(f)),n===r&&("greaterorequal"===e.substr(Se,14).toLowerCase()?(n=e.substr(Se,14),Se+=14):(n=r,0===je&&Me(m))),n!==r&&(_e=t,n="greaterorequal"),(t=n)===r&&(t=Se,"=="===e.substr(Se,2)?(n="==",Se+=2):(n=r,0===je&&Me(y)),n===r&&("equal"===e.substr(Se,5).toLowerCase()?(n=e.substr(Se,5),Se+=5):(n=r,0===je&&Me(g))),n!==r&&(_e=t,n="equal"),(t=n)===r&&(t=Se,61===e.charCodeAt(Se)?(n="=",Se++):(n=r,0===je&&Me(v)),n===r&&("equal"===e.substr(Se,5).toLowerCase()?(n=e.substr(Se,5),Se+=5):(n=r,0===je&&Me(g))),n!==r&&(_e=t,n="equal"),(t=n)===r&&(t=Se,"!="===e.substr(Se,2)?(n="!=",Se+=2):(n=r,0===je&&Me(b)),n===r&&("notequal"===e.substr(Se,8).toLowerCase()?(n=e.substr(Se,8),Se+=8):(n=r,0===je&&Me(C))),n!==r&&(_e=t,n="notequal"),(t=n)===r&&(t=Se,60===e.charCodeAt(Se)?(n="<",Se++):(n=r,0===je&&Me(E)),n===r&&("less"===e.substr(Se,4).toLowerCase()?(n=e.substr(Se,4),Se+=4):(n=r,0===je&&Me(q))),n!==r&&(_e=t,n="less"),(t=n)===r&&(t=Se,62===e.charCodeAt(Se)?(n=">",Se++):(n=r,0===je&&Me(w)),n===r&&("greater"===e.substr(Se,7).toLowerCase()?(n=e.substr(Se,7),Se+=7):(n=r,0===je&&Me(O))),n!==r&&(_e=t,n="greater"),t=n)))))),Te[o]={nextPos:Se,result:t},t)}function Ke(){var e,t,n,o,i,a,u,l,c=34*Se+6,p=Te[c];if(p)return Se=p.nextPos,p.result;if(e=Se,(t=Ye())!==r){for(n=[],o=Se,(i=pt())!==r&&(a=Ge())!==r&&(u=pt())!==r&&(l=Ye())!==r?o=i=[i,a,u,l]:(Se=o,o=r);o!==r;)n.push(o),o=Se,(i=pt())!==r&&(a=Ge())!==r&&(u=pt())!==r&&(l=Ye())!==r?o=i=[i,a,u,l]:(Se=o,o=r);n!==r?(_e=e,e=t=s(t,n)):(Se=e,e=r)}else Se=e,e=r;return Te[c]={nextPos:Se,result:e},e}function Ge(){var t,n,o=34*Se+7,i=Te[o];return i?(Se=i.nextPos,i.result):(t=Se,43===e.charCodeAt(Se)?(n="+",Se++):(n=r,0===je&&Me(P)),n!==r&&(_e=t,n="plus"),(t=n)===r&&(t=Se,45===e.charCodeAt(Se)?(n="-",Se++):(n=r,0===je&&Me(x)),n!==r&&(_e=t,n="minus"),t=n),Te[o]={nextPos:Se,result:t},t)}function Ye(){var e,t,n,o,i,a,u,l,c=34*Se+8,p=Te[c];if(p)return Se=p.nextPos,p.result;if(e=Se,(t=$e())!==r){for(n=[],o=Se,(i=pt())!==r&&(a=Ze())!==r&&(u=pt())!==r&&(l=$e())!==r?o=i=[i,a,u,l]:(Se=o,o=r);o!==r;)n.push(o),o=Se,(i=pt())!==r&&(a=Ze())!==r&&(u=pt())!==r&&(l=$e())!==r?o=i=[i,a,u,l]:(Se=o,o=r);n!==r?(_e=e,e=t=s(t,n)):(Se=e,e=r)}else Se=e,e=r;return Te[c]={nextPos:Se,result:e},e}function Ze(){var t,n,o=34*Se+9,i=Te[o];return i?(Se=i.nextPos,i.result):(t=Se,42===e.charCodeAt(Se)?(n="*",Se++):(n=r,0===je&&Me(S)),n!==r&&(_e=t,n="mul"),(t=n)===r&&(t=Se,47===e.charCodeAt(Se)?(n="/",Se++):(n=r,0===je&&Me(_)),n!==r&&(_e=t,n="div"),(t=n)===r&&(t=Se,37===e.charCodeAt(Se)?(n="%",Se++):(n=r,0===je&&Me(N)),n!==r&&(_e=t,n="mod"),t=n)),Te[o]={nextPos:Se,result:t},t)}function $e(){var e,t,n,o,i,a,u,l,c=34*Se+10,p=Te[c];if(p)return Se=p.nextPos,p.result;if(e=Se,(t=et())!==r){for(n=[],o=Se,(i=pt())!==r&&(a=Xe())!==r&&(u=pt())!==r&&(l=et())!==r?o=i=[i,a,u,l]:(Se=o,o=r);o!==r;)n.push(o),o=Se,(i=pt())!==r&&(a=Xe())!==r&&(u=pt())!==r&&(l=et())!==r?o=i=[i,a,u,l]:(Se=o,o=r);n!==r?(_e=e,e=t=s(t,n)):(Se=e,e=r)}else Se=e,e=r;return Te[c]={nextPos:Se,result:e},e}function Xe(){var t,n,o=34*Se+11,i=Te[o];return i?(Se=i.nextPos,i.result):(t=Se,94===e.charCodeAt(Se)?(n="^",Se++):(n=r,0===je&&Me(I)),n===r&&("power"===e.substr(Se,5).toLowerCase()?(n=e.substr(Se,5),Se+=5):(n=r,0===je&&Me(V))),n!==r&&(_e=t,n="power"),t=n,Te[o]={nextPos:Se,result:t},t)}function et(){var e,t,n,o,i,s,a,u,l=34*Se+12,c=Te[l];if(c)return Se=c.nextPos,c.result;if(e=Se,(t=nt())!==r){for(n=[],o=Se,(i=pt())!==r&&(s=tt())!==r&&(a=pt())!==r?((u=nt())===r&&(u=null),u!==r?o=i=[i,s,a,u]:(Se=o,o=r)):(Se=o,o=r);o!==r;)n.push(o),o=Se,(i=pt())!==r&&(s=tt())!==r&&(a=pt())!==r?((u=nt())===r&&(u=null),u!==r?o=i=[i,s,a,u]:(Se=o,o=r)):(Se=o,o=r);n!==r?(_e=e,e=t=p(t,n)):(Se=e,e=r)}else Se=e,e=r;return Te[l]={nextPos:Se,result:e},e}function tt(){var t,n,o=34*Se+13,i=Te[o];return i?(Se=i.nextPos,i.result):(t=Se,"*="===e.substr(Se,2)?(n="*=",Se+=2):(n=r,0===je&&Me(j)),n===r&&("contains"===e.substr(Se,8).toLowerCase()?(n=e.substr(Se,8),Se+=8):(n=r,0===je&&Me(T)),n===r&&("contain"===e.substr(Se,7).toLowerCase()?(n=e.substr(Se,7),Se+=7):(n=r,0===je&&Me(R)))),n!==r&&(_e=t,n="contains"),(t=n)===r&&(t=Se,"notcontains"===e.substr(Se,11).toLowerCase()?(n=e.substr(Se,11),Se+=11):(n=r,0===je&&Me(D)),n===r&&("notcontain"===e.substr(Se,10).toLowerCase()?(n=e.substr(Se,10),Se+=10):(n=r,0===je&&Me(A))),n!==r&&(_e=t,n="notcontains"),(t=n)===r&&(t=Se,"anyof"===e.substr(Se,5).toLowerCase()?(n=e.substr(Se,5),Se+=5):(n=r,0===je&&Me(L)),n!==r&&(_e=t,n="anyof"),(t=n)===r&&(t=Se,"allof"===e.substr(Se,5).toLowerCase()?(n=e.substr(Se,5),Se+=5):(n=r,0===je&&Me(k)),n!==r&&(_e=t,n="allof"),t=n))),Te[o]={nextPos:Se,result:t},t)}function nt(){var t,n,o,i,s=34*Se+14,a=Te[s];return a?(Se=a.nextPos,a.result):(t=Se,40===e.charCodeAt(Se)?(n="(",Se++):(n=r,0===je&&Me(B)),n!==r&&pt()!==r&&(o=ze())!==r&&pt()!==r?(41===e.charCodeAt(Se)?(i=")",Se++):(i=r,0===je&&Me(M)),i===r&&(i=null),i!==r?(_e=t,t=n=o):(Se=t,t=r)):(Se=t,t=r),t===r&&(t=function(){var t,n,o,i,s,a=34*Se+15,u=Te[a];if(u)return Se=u.nextPos,u.result;t=Se,(n=ut())!==r?(40===e.charCodeAt(Se)?(o="(",Se++):(o=r,0===je&&Me(B)),o!==r&&(i=ot())!==r?(41===e.charCodeAt(Se)?(s=")",Se++):(s=r,0===je&&Me(M)),s===r&&(s=null),s!==r?(_e=t,n=new Gr(n,i),t=n):(Se=t,t=r)):(Se=t,t=r)):(Se=t,t=r);return Te[a]={nextPos:Se,result:t},t}())===r&&(t=function(){var t,n,o,i=34*Se+16,s=Te[i];if(s)return Se=s.nextPos,s.result;t=Se,33===e.charCodeAt(Se)?(n="!",Se++):(n=r,0===je&&Me(F));n===r&&("negate"===e.substr(Se,6).toLowerCase()?(n=e.substr(Se,6),Se+=6):(n=r,0===je&&Me(z)));n!==r&&pt()!==r&&(o=ze())!==r?(_e=t,n=new Ur(o,"negate"),t=n):(Se=t,t=r);t===r&&(t=Se,(n=rt())!==r&&pt()!==r&&(o=function(){var t,n,o=34*Se+17,i=Te[o];if(i)return Se=i.nextPos,i.result;t=Se,"empty"===e.substr(Se,5).toLowerCase()?(n=e.substr(Se,5),Se+=5):(n=r,0===je&&Me(H));n!==r&&(_e=t,n="empty");(t=n)===r&&(t=Se,"notempty"===e.substr(Se,8).toLowerCase()?(n=e.substr(Se,8),Se+=8):(n=r,0===je&&Me(W)),n!==r&&(_e=t,n="notempty"),t=n);return Te[o]={nextPos:Se,result:t},t}())!==r?(_e=t,n=function(e,t){return new Ur(e,t)}(n,o),t=n):(Se=t,t=r));return Te[i]={nextPos:Se,result:t},t}())===r&&(t=rt())===r&&(t=function(){var t,n,o,i,s=34*Se+20,a=Te[s];if(a)return Se=a.nextPos,a.result;t=Se,91===e.charCodeAt(Se)?(n="[",Se++):(n=r,0===je&&Me(ee));n!==r&&(o=ot())!==r?(93===e.charCodeAt(Se)?(i="]",Se++):(i=r,0===je&&Me(te)),i!==r?(_e=t,t=n=o):(Se=t,t=r)):(Se=t,t=r);return Te[s]={nextPos:Se,result:t},t}()),Te[s]={nextPos:Se,result:t},t)}function rt(){var t,n,o,i,s=34*Se+18,a=Te[s];return a?(Se=a.nextPos,a.result):(t=Se,pt()!==r?("undefined"===e.substr(Se,9)?(n="undefined",Se+=9):(n=r,0===je&&Me(U)),n===r&&("null"===e.substr(Se,4)?(n="null",Se+=4):(n=r,0===je&&Me(Q))),n!==r?(_e=t,t=null):(Se=t,t=r)):(Se=t,t=r),t===r&&(t=Se,pt()!==r&&(n=function(){var t,n,o,i,s=34*Se+19,a=Te[s];if(a)return Se=a.nextPos,a.result;t=Se,(n=function(){var t,n,o=34*Se+22,i=Te[o];if(i)return Se=i.nextPos,i.result;t=Se,"true"===e.substr(Se,4).toLowerCase()?(n=e.substr(Se,4),Se+=4):(n=r,0===je&&Me(re));n!==r&&(_e=t,n=!0);(t=n)===r&&(t=Se,"false"===e.substr(Se,5).toLowerCase()?(n=e.substr(Se,5),Se+=5):(n=r,0===je&&Me(oe)),n!==r&&(_e=t,n=!1),t=n);return Te[o]={nextPos:Se,result:t},t}())!==r&&(_e=t,n=n);(t=n)===r&&(t=Se,(n=function(){var t,n,o,i=34*Se+23,s=Te[i];if(s)return Se=s.nextPos,s.result;t=Se,"0x"===e.substr(Se,2)?(n="0x",Se+=2):(n=r,0===je&&Me(ie));n!==r&&(o=lt())!==r?(_e=t,n=parseInt(Re(),16),t=n):(Se=t,t=r);t===r&&(t=Se,se.test(e.charAt(Se))?(n=e.charAt(Se),Se++):(n=r,0===je&&Me(ae)),n===r&&(n=null),n!==r&&(o=function(){var t,n,o,i=34*Se+24,s=Te[i];if(s)return Se=s.nextPos,s.result;t=Se,(n=lt())!==r?(46===e.charCodeAt(Se)?(o=".",Se++):(o=r,0===je&&Me(ue)),o!==r&&lt()!==r?(_e=t,n=parseFloat(Re()),t=n):(Se=t,t=r)):(Se=t,t=r);t===r&&(t=Se,(n=function(){var t,n,o=34*Se+31,i=Te[o];if(i)return Se=i.nextPos,i.result;t=[],Ce.test(e.charAt(Se))?(n=e.charAt(Se),Se++):(n=r,0===je&&Me(Ee));if(n!==r)for(;n!==r;)t.push(n),Ce.test(e.charAt(Se))?(n=e.charAt(Se),Se++):(n=r,0===je&&Me(Ee));else t=r;return Te[o]={nextPos:Se,result:t},t}())!==r?((o=lt())===r&&(o=null),o!==r?(_e=t,n=parseInt(Re(),10),t=n):(Se=t,t=r)):(Se=t,t=r),t===r&&(t=Se,48===e.charCodeAt(Se)?(n="0",Se++):(n=r,0===je&&Me(le)),n!==r&&(_e=t,n=0),t=n));return Te[i]={nextPos:Se,result:t},t}())!==r?(_e=t,a=o,t=n=null==n?a:-a):(Se=t,t=r));var a;return Te[i]={nextPos:Se,result:t},t}())!==r&&(_e=t,n=n),(t=n)===r&&(t=Se,(n=ut())!==r&&(_e=t,n=n),(t=n)===r&&(t=Se,"''"===e.substr(Se,2)?(n="''",Se+=2):(n=r,0===je&&Me(G)),n!==r&&(_e=t,n=""),(t=n)===r&&(t=Se,'""'===e.substr(Se,2)?(n='""',Se+=2):(n=r,0===je&&Me(Y)),n!==r&&(_e=t,n=""),(t=n)===r&&(t=Se,39===e.charCodeAt(Se)?(n="'",Se++):(n=r,0===je&&Me(Z)),n!==r&&(o=it())!==r?(39===e.charCodeAt(Se)?(i="'",Se++):(i=r,0===je&&Me(Z)),i!==r?(_e=t,n=$(o),t=n):(Se=t,t=r)):(Se=t,t=r),t===r&&(t=Se,34===e.charCodeAt(Se)?(n='"',Se++):(n=r,0===je&&Me(X)),n!==r&&(o=it())!==r?(34===e.charCodeAt(Se)?(i='"',Se++):(i=r,0===je&&Me(X)),i!==r?(_e=t,n=$(o),t=n):(Se=t,t=r)):(Se=t,t=r)))))));return Te[s]={nextPos:Se,result:t},t}())!==r?(_e=t,t=new Jr(n)):(Se=t,t=r),t===r&&(t=Se,pt()!==r?(123===e.charCodeAt(Se)?(n="{",Se++):(n=r,0===je&&Me(J)),n!==r&&(o=function(){var e,t,n,o=34*Se+25,i=Te[o];if(i)return Se=i.nextPos,i.result;if(e=Se,t=[],(n=at())!==r)for(;n!==r;)t.push(n),n=at();else t=r;t!==r&&(_e=e,t=ce(t));return e=t,Te[o]={nextPos:Se,result:e},e}())!==r?(125===e.charCodeAt(Se)?(i="}",Se++):(i=r,0===je&&Me(K)),i!==r?(_e=t,t=function(e){return new Kr(e)}(o)):(Se=t,t=r)):(Se=t,t=r)):(Se=t,t=r))),Te[s]={nextPos:Se,result:t},t)}function ot(){var t,n,o,i,s,a,u,l,c=34*Se+21,p=Te[c];if(p)return Se=p.nextPos,p.result;if(t=Se,(n=ze())===r&&(n=null),n!==r){for(o=[],i=Se,(s=pt())!==r?(44===e.charCodeAt(Se)?(a=",",Se++):(a=r,0===je&&Me(ne)),a!==r&&(u=pt())!==r&&(l=ze())!==r?i=s=[s,a,u,l]:(Se=i,i=r)):(Se=i,i=r);i!==r;)o.push(i),i=Se,(s=pt())!==r?(44===e.charCodeAt(Se)?(a=",",Se++):(a=r,0===je&&Me(ne)),a!==r&&(u=pt())!==r&&(l=ze())!==r?i=s=[s,a,u,l]:(Se=i,i=r)):(Se=i,i=r);o!==r?(_e=t,t=n=function(e,t){if(null==e)return new Qr([]);var n=[e];if(Array.isArray(t))for(var r=function(e){return[].concat.apply([],e)}(t),o=3;o<r.length;o+=4)n.push(r[o]);return new Qr(n)}(n,o)):(Se=t,t=r)}else Se=t,t=r;return Te[c]={nextPos:Se,result:t},t}function it(){var e,t,n,o=34*Se+26,i=Te[o];if(i)return Se=i.nextPos,i.result;if(e=Se,t=[],(n=st())!==r)for(;n!==r;)t.push(n),n=st();else t=r;return t!==r&&(_e=e,t=ce(t)),e=t,Te[o]={nextPos:Se,result:e},e}function st(){var t,n,o=34*Se+27,i=Te[o];return i?(Se=i.nextPos,i.result):(t=Se,"\\'"===e.substr(Se,2)?(n="\\'",Se+=2):(n=r,0===je&&Me(pe)),n!==r&&(_e=t,n="'"),(t=n)===r&&(t=Se,'\\"'===e.substr(Se,2)?(n='\\"',Se+=2):(n=r,0===je&&Me(he)),n!==r&&(_e=t,n='"'),(t=n)===r&&(t=Se,de.test(e.charAt(Se))?(n=e.charAt(Se),Se++):(n=r,0===je&&Me(fe)),n!==r&&(_e=t,n=me()),t=n)),Te[o]={nextPos:Se,result:t},t)}function at(){var t,n,o=34*Se+28,i=Te[o];return i?(Se=i.nextPos,i.result):(t=Se,ye.test(e.charAt(Se))?(n=e.charAt(Se),Se++):(n=r,0===je&&Me(ge)),n!==r&&(_e=t,n=me()),t=n,Te[o]={nextPos:Se,result:t},t)}function ut(){var e,t,n,o,i,s,a=34*Se+29,u=Te[a];if(u)return Se=u.nextPos,u.result;if(e=Se,ct()!==r){if(t=[],n=Se,(o=lt())!==r){for(i=[],s=ct();s!==r;)i.push(s),s=ct();i!==r?n=o=[o,i]:(Se=n,n=r)}else Se=n,n=r;for(;n!==r;)if(t.push(n),n=Se,(o=lt())!==r){for(i=[],s=ct();s!==r;)i.push(s),s=ct();i!==r?n=o=[o,i]:(Se=n,n=r)}else Se=n,n=r;t!==r?(_e=e,e=me()):(Se=e,e=r)}else Se=e,e=r;return Te[a]={nextPos:Se,result:e},e}function lt(){var t,n,o=34*Se+30,i=Te[o];if(i)return Se=i.nextPos,i.result;if(t=[],ve.test(e.charAt(Se))?(n=e.charAt(Se),Se++):(n=r,0===je&&Me(be)),n!==r)for(;n!==r;)t.push(n),ve.test(e.charAt(Se))?(n=e.charAt(Se),Se++):(n=r,0===je&&Me(be));else t=r;return Te[o]={nextPos:Se,result:t},t}function ct(){var t,n,o=34*Se+32,i=Te[o];if(i)return Se=i.nextPos,i.result;if(t=[],qe.test(e.charAt(Se))?(n=e.charAt(Se),Se++):(n=r,0===je&&Me(we)),n!==r)for(;n!==r;)t.push(n),qe.test(e.charAt(Se))?(n=e.charAt(Se),Se++):(n=r,0===je&&Me(we));else t=r;return Te[o]={nextPos:Se,result:t},t}function pt(){var t,n,o=34*Se+33,i=Te[o];if(i)return Se=i.nextPos,i.result;for(je++,t=[],Pe.test(e.charAt(Se))?(n=e.charAt(Se),Se++):(n=r,0===je&&Me(xe));n!==r;)t.push(n),Pe.test(e.charAt(Se))?(n=e.charAt(Se),Se++):(n=r,0===je&&Me(xe));return je--,t===r&&(n=r,0===je&&Me(Oe)),Te[o]={nextPos:Se,result:t},t}function ht(e,t,n){return void 0===n&&(n=!1),t.reduce((function(e,t){return new Wr(t[1],e,t[3],n)}),e)}if((n=i())!==r&&Se===e.length)return n;throw n!==r&&Se<e.length&&Me({type:"end"}),Fe(Ve,Ie<e.length?e.charAt(Ie):null,Ie<e.length?Be(Ie,Ie+1):Be(Ie,Ie))},eo=function(e,t){this.at=e,this.code=t},to=function(){function e(){}return e.prototype.patchExpression=function(e){return e.replace(/=>/g,">=").replace(/=</g,"<=").replace(/<>/g,"!=").replace(/equals/g,"equal ").replace(/notequals/g,"notequal ")},e.prototype.createCondition=function(e){return this.parseExpression(e)},e.prototype.parseExpression=function(t){try{var n=e.parserCache[t];return void 0===n&&((n=Xr(this.patchExpression(t))).hasAsyncFunction()||(e.parserCache[t]=n)),n}catch(e){e instanceof $r&&(this.conditionError=new eo(e.location.start.offset,e.message))}},Object.defineProperty(e.prototype,"error",{get:function(){return this.conditionError},enumerable:!1,configurable:!0}),e.parserCache={},e}(),no=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ro=function(){function e(e){this.processValue=new _r,this.parser=new to,this.isAsyncValue=!1,this.hasFunctionValue=!1,this.setExpression(e)}return Object.defineProperty(e.prototype,"expression",{get:function(){return this.expressionValue},enumerable:!1,configurable:!0}),e.prototype.setExpression=function(e){this.expression!==e&&(this.expressionValue=e,this.operand=this.parser.parseExpression(e),this.hasFunctionValue=!!this.canRun()&&this.operand.hasFunction(),this.isAsyncValue=!!this.hasFunction()&&this.operand.hasAsyncFunction())},e.prototype.getVariables=function(){if(!this.operand)return[];var e=[];return this.operand.setVariables(e),e},e.prototype.hasFunction=function(){return this.hasFunctionValue},Object.defineProperty(e.prototype,"isAsync",{get:function(){return this.isAsyncValue},enumerable:!1,configurable:!0}),e.prototype.canRun=function(){return!!this.operand},e.prototype.run=function(e,t){var n=this;if(void 0===t&&(t=null),!this.operand)return this.expression&&Nr.warn("Invalid expression: "+this.expression),null;if(this.processValue.values=e,this.processValue.properties=t,!this.isAsync)return this.runValues();this.asyncFuncList=[],this.operand.addToAsyncList(this.asyncFuncList);for(var r=0;r<this.asyncFuncList.length;r++)this.asyncFuncList[r].onAsyncReady=function(){n.doAsyncFunctionReady()};for(r=0;r<this.asyncFuncList.length;r++)this.asyncFuncList[r].evaluateAsync(this.processValue);return!1},e.prototype.doAsyncFunctionReady=function(){for(var e=0;e<this.asyncFuncList.length;e++)if(!this.asyncFuncList[e].isReady)return;this.runValues()},e.prototype.runValues=function(){var e=this.operand.evaluate(this.processValue);return this.onComplete&&this.onComplete(e),e},e.createExpressionExecutor=function(t){return new e(t)},e}(),oo=function(){function e(t){this._id=e.IdCounter++,this.expression=t}return Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"expression",{get:function(){return this.expressionExecutor?this.expressionExecutor.expression:""},set:function(e){var t=this;this.expressionExecutor&&e===this.expression||(this.expressionExecutor=ro.createExpressionExecutor(e),this.expressionExecutor.onComplete=function(e){t.doOnComplete(e)},this.variables=void 0,this.containsFunc=void 0)},enumerable:!1,configurable:!0}),e.prototype.getVariables=function(){return void 0===this.variables&&(this.variables=this.expressionExecutor.getVariables()),this.variables},e.prototype.hasFunction=function(){return void 0===this.containsFunc&&(this.containsFunc=this.expressionExecutor.hasFunction()),this.containsFunc},Object.defineProperty(e.prototype,"isAsync",{get:function(){return this.expressionExecutor.isAsync},enumerable:!1,configurable:!0}),e.prototype.canRun=function(){return this.expressionExecutor.canRun()},e.prototype.runCore=function(e,t){return void 0===t&&(t=null),this.onBeforeAsyncRun&&this.isAsync&&this.onBeforeAsyncRun(this.id),this.expressionExecutor.run(e,t)},e.prototype.doOnComplete=function(e){this.onAfterAsyncRun&&this.isAsync&&this.onAfterAsyncRun(this.id)},e.IdCounter=1,e}(),io=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}no(t,e),t.prototype.run=function(e,t){return void 0===t&&(t=null),1==this.runCore(e,t)},t.prototype.doOnComplete=function(t){this.onRunComplete&&this.onRunComplete(1==t),e.prototype.doOnComplete.call(this,t)}}(oo),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return no(t,e),t.prototype.run=function(e,t){return void 0===t&&(t=null),this.runCore(e,t)},t.prototype.doOnComplete=function(t){this.onRunComplete&&this.onRunComplete(t),e.prototype.doOnComplete.call(this,t)},t}(oo)),so=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ao=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},uo=function(){function e(e){this.obj=e,this.properties=null,this.values=null}return e.prototype.getType=function(){return"bindings"},e.prototype.getNames=function(){var e=[];this.fillProperties();for(var t=0;t<this.properties.length;t++)this.properties[t].isVisible("",this.obj)&&e.push(this.properties[t].name);return e},e.prototype.getProperties=function(){var e=[];this.fillProperties();for(var t=0;t<this.properties.length;t++)e.push(this.properties[t]);return e},e.prototype.setBinding=function(e,t){this.values||(this.values={});var n=this.getJson();n!==t&&(t?this.values[e]=t:(delete this.values[e],0==Object.keys(this.values).length&&(this.values=null)),this.onChangedJSON(n))},e.prototype.clearBinding=function(e){this.setBinding(e,"")},e.prototype.isEmpty=function(){if(!this.values)return!0;for(var e in this.values)return!1;return!0},e.prototype.getValueNameByPropertyName=function(e){if(this.values)return this.values[e]},e.prototype.getPropertiesByValueName=function(e){if(!this.values)return[];var t=[];for(var n in this.values)this.values[n]==e&&t.push(n);return t},e.prototype.getJson=function(){if(!this.isEmpty()){var e={};for(var t in this.values)e[t]=this.values[t];return e}},e.prototype.setJson=function(e){var t=this.getJson();if(this.values=null,e)for(var n in this.values={},e)this.values[n]=e[n];this.onChangedJSON(t)},e.prototype.fillProperties=function(){if(null===this.properties){this.properties=[];for(var e=Sr.getPropertiesByObj(this.obj),t=0;t<e.length;t++)e[t].isBindable&&this.properties.push(e[t])}},e.prototype.onChangedJSON=function(e){this.obj&&this.obj.onBindingChanged(e,this.getJson())},e}(),lo=function(){function e(t,n,r){this.currentDependency=t,this.target=n,this.property=r,this.dependencies=[],this.id=""+ ++e.DependenciesCount}return e.prototype.addDependency=function(e,t){this.target===e&&this.property===t||this.dependencies.some((function(n){return n.obj===e&&n.prop===t}))||(this.dependencies.push({obj:e,prop:t,id:this.id}),e.registerPropertyChangedHandlers([t],this.currentDependency,this.id))},e.prototype.dispose=function(){this.dependencies.forEach((function(e){e.obj.unregisterPropertyChangedHandlers([e.prop],e.id)}))},e.DependenciesCount=0,e}(),co=(function(){function e(t){this._updater=t,this.dependencies=void 0,this.type=e.ComputedUpdaterType}Object.defineProperty(e.prototype,"updater",{get:function(){return this._updater},enumerable:!1,configurable:!0}),e.prototype.setDependencies=function(e){this.clearDependencies(),this.dependencies=e},e.prototype.getDependencies=function(){return this.dependencies},e.prototype.clearDependencies=function(){this.dependencies&&(this.dependencies.dispose(),this.dependencies=void 0)},e.prototype.dispose=function(){this.clearDependencies()},e.ComputedUpdaterType="__dependency_computed"}(),function(){function e(){this.dependencies={},this.propertyHash=e.createPropertiesHash(),this.eventList=[],this.isLoadingFromJsonValue=!1,this.loadingOwner=null,this.onPropertyChanged=this.addEvent(),this.onItemValuePropertyChanged=this.addEvent(),this.isCreating=!0,this.bindingsValue=new uo(this),mr.createProperties(this),this.onBaseCreating(),this.isCreating=!1}e.finishCollectDependencies=function(){var t=e.currentDependencis;return e.currentDependencis=void 0,t},e.startCollectDependencies=function(t,n,r){if(void 0!==e.currentDependencis)throw new Error("Attempt to collect nested dependencies. Nested dependencies are not supported.");e.currentDependencis=new lo(t,n,r)},e.collectDependency=function(t,n){void 0!==e.currentDependencis&&e.currentDependencis.addDependency(t,n)},Object.defineProperty(e,"commentSuffix",{get:function(){return lr.commentSuffix},set:function(e){lr.commentSuffix=e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"commentPrefix",{get:function(){return e.commentSuffix},set:function(t){e.commentSuffix=t},enumerable:!1,configurable:!0}),e.prototype.isValueEmpty=function(e,t){return void 0===t&&(t=!0),t&&(e=this.trimValue(e)),cr.isValueEmpty(e)},e.prototype.equals=function(e){return!!e&&(!this.isDisposed&&!e.isDisposed&&(this.getType()==e.getType()&&this.equalsCore(e)))},e.prototype.equalsCore=function(e){return this.name===e.name&&cr.isTwoValueEquals(this.toJSON(),e.toJSON(),!1,!0,!1)},e.prototype.trimValue=function(e){return e&&("string"==typeof e||e instanceof String)?e.trim():e},e.prototype.isPropertyEmpty=function(e){return""!==e&&this.isValueEmpty(e)},e.createPropertiesHash=function(){return{}},e.prototype.dispose=function(){for(var e=this,t=0;t<this.eventList.length;t++)this.eventList[t].clear();this.onPropertyValueChangedCallback=void 0,this.isDisposedValue=!0,Object.keys(this.dependencies).forEach((function(t){return e.dependencies[t].dispose()}))},Object.defineProperty(e.prototype,"isDisposed",{get:function(){return!0===this.isDisposedValue},enumerable:!1,configurable:!0}),e.prototype.addEvent=function(){var e=new po;return this.eventList.push(e),e},e.prototype.onBaseCreating=function(){},e.prototype.getType=function(){return"base"},e.prototype.isDescendantOf=function(e){return Sr.isDescendantOf(this.getType(),e)},e.prototype.getSurvey=function(e){return void 0===e&&(e=!1),null},Object.defineProperty(e.prototype,"isDesignMode",{get:function(){var e=this.getSurvey();return!!e&&e.isDesignMode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDesignModeV2",{get:function(){return lr.supportCreatorV2&&this.isDesignMode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"inSurvey",{get:function(){return!!this.getSurvey(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bindings",{get:function(){return this.bindingsValue},enumerable:!1,configurable:!0}),e.prototype.checkBindings=function(e,t){},e.prototype.updateBindings=function(e,t){var n=this.bindings.getValueNameByPropertyName(e);n&&this.updateBindingValue(n,t)},e.prototype.updateBindingValue=function(e,t){},e.prototype.getTemplate=function(){return this.getType()},Object.defineProperty(e.prototype,"isLoadingFromJson",{get:function(){return this.isLoadingFromJsonValue||this.getIsLoadingFromJson()},enumerable:!1,configurable:!0}),e.prototype.getIsLoadingFromJson=function(){return!(!this.loadingOwner||!this.loadingOwner.isLoadingFromJson)||this.isLoadingFromJsonValue},e.prototype.startLoadingFromJson=function(e){this.isLoadingFromJsonValue=!0,this.jsonObj=e},e.prototype.endLoadingFromJson=function(){this.isLoadingFromJsonValue=!1},e.prototype.toJSON=function(){return(new xr).toJsonObject(this)},e.prototype.fromJSON=function(e,t){(new xr).toObject(e,this,t),this.onSurveyLoad()},e.prototype.onSurveyLoad=function(){},e.prototype.clone=function(){var e=Sr.createClass(this.getType());return e.fromJSON(this.toJSON()),e},e.prototype.getPropertyByName=function(e){var t=this.getType();return this.classMetaData&&this.classMetaData.name===t||(this.classMetaData=Sr.findClass(t)),this.classMetaData?this.classMetaData.findProperty(e):null},e.prototype.isPropertyVisible=function(e){var t=this.getPropertyByName(e);return!!t&&t.isVisible("",this)},e.createProgressInfo=function(){return{questionCount:0,answeredQuestionCount:0,requiredQuestionCount:0,requiredAnsweredQuestionCount:0}},e.prototype.getProgressInfo=function(){return e.createProgressInfo()},e.prototype.localeChanged=function(){},e.prototype.locStrsChanged=function(){if(this.arraysInfo)for(var t in this.arraysInfo){if((r=this.arraysInfo[t])&&r.isItemValues){var n=this.getPropertyValue(t);n&&e.itemValueLocStrChanged&&e.itemValueLocStrChanged(n)}}if(this.localizableStrings)for(var t in this.localizableStrings){var r;(r=this.getLocalizableString(t))&&r.strChanged()}},e.prototype.getPropertyValue=function(e,t){void 0===t&&(t=null);var n=this.getPropertyValueWithoutDefault(e);if(this.isPropertyEmpty(n)){var r=this.localizableStrings?this.localizableStrings[e]:void 0;if(r)return r.text;if(null!=t)return t;var o=this.getDefaultPropertyValue(e);if(void 0!==o)return o}return n},e.prototype.getDefaultPropertyValue=function(e){var t=this.getPropertyByName(e);if(!(!t||t.isCustom&&this.isCreating)){var n=t.defaultValue;if(!this.isPropertyEmpty(n)&&!Array.isArray(n))return n;var r=this.localizableStrings?this.localizableStrings[e]:void 0;return r&&r.localizationName?this.getLocalizationString(r.localizationName):"boolean"!=t.type&&"switch"!=t.type&&(t.isCustom&&t.onGetValue?t.onGetValue(this):void 0)}},e.prototype.hasDefaultPropertyValue=function(e){return void 0!==this.getDefaultPropertyValue(e)},e.prototype.resetPropertyValue=function(e){var t=this.localizableStrings?this.localizableStrings[e]:void 0;t?(this.setLocalizableStringText(e,void 0),t.clear()):this.setPropertyValue(e,void 0)},e.prototype.getPropertyValueWithoutDefault=function(e){return this.getPropertyValueCore(this.propertyHash,e)},e.prototype.getPropertyValueCore=function(t,n){return this.isLoadingFromJson||e.collectDependency(this,n),this.getPropertyValueCoreHandler?this.getPropertyValueCoreHandler(t,n):t[n]},e.prototype.geValueFromHash=function(){return this.propertyHash.value},e.prototype.setPropertyValueCore=function(e,t,n){this.setPropertyValueCoreHandler?this.isDisposedValue?Nr.disposedObjectChangedProperty(t,this.getType()):this.setPropertyValueCoreHandler(e,t,n):e[t]=n},Object.defineProperty(e.prototype,"isEditingSurveyElement",{get:function(){var e=this.getSurvey();return!!e&&e.isEditingSurveyElement},enumerable:!1,configurable:!0}),e.prototype.iteratePropertiesHash=function(e){var t=this,n=[];for(var r in this.propertyHash)"value"===r&&this.isEditingSurveyElement&&Array.isArray(this.value)||n.push(r);n.forEach((function(n){return e(t.propertyHash,n)}))},e.prototype.setPropertyValue=function(e,t){if(!this.isLoadingFromJson){var n=this.getPropertyByName(e);n&&(t=n.settingValue(this,t))}var r=this.getPropertyValue(e);r&&Array.isArray(r)&&this.arraysInfo&&(!t||Array.isArray(t))?this.isTwoValueEquals(r,t)||this.setArrayPropertyDirectly(e,t):(this.setPropertyValueDirectly(e,t),this.isDisposedValue||this.isTwoValueEquals(r,t)||this.propertyValueChanged(e,r,t))},e.prototype.setArrayPropertyDirectly=function(e,t,n){void 0===n&&(n=!0);var r=this.arraysInfo[e];this.setArray(e,this.getPropertyValue(e),t,!!r&&r.isItemValues,r?n&&r.onPush:null)},e.prototype.setPropertyValueDirectly=function(e,t){this.setPropertyValueCore(this.propertyHash,e,t)},e.prototype.clearPropertyValue=function(e){this.setPropertyValueCore(this.propertyHash,e,null),delete this.propertyHash[e]},e.prototype.onPropertyValueChangedCallback=function(e,t,n,r,o){},e.prototype.itemValuePropertyChanged=function(e,t,n,r){this.onItemValuePropertyChanged.fire(this,{obj:e,name:t,oldValue:n,newValue:r,propertyName:e.ownerPropertyName})},e.prototype.onPropertyValueChanged=function(e,t,n){},e.prototype.propertyValueChanged=function(e,t,n,r,o){if(!this.isLoadingFromJson&&(this.updateBindings(e,n),this.onPropertyValueChanged(e,t,n),this.onPropertyChanged.fire(this,{name:e,oldValue:t,newValue:n}),this.doPropertyValueChangedCallback(e,t,n,r,this),this.checkConditionPropertyChanged(e),this.onPropChangeFunctions))for(var i=0;i<this.onPropChangeFunctions.length;i++)this.onPropChangeFunctions[i].name==e&&this.onPropChangeFunctions[i].func(n)},e.prototype.onBindingChanged=function(e,t){this.isLoadingFromJson||this.doPropertyValueChangedCallback("bindings",e,t)},Object.defineProperty(e.prototype,"isInternal",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.doPropertyValueChangedCallback=function(e,t,n,r,o){if(!this.isInternal){o||(o=this);var i=this.getSurvey();i||(i=this),i.onPropertyValueChangedCallback&&i.onPropertyValueChangedCallback(e,t,n,o,r),i!==this&&this.onPropertyValueChangedCallback&&this.onPropertyValueChangedCallback(e,t,n,o,r)}},e.prototype.addExpressionProperty=function(e,t,n){this.expressionInfo||(this.expressionInfo={}),this.expressionInfo[e]={onExecute:t,canRun:n}},e.prototype.getDataFilteredValues=function(){return{}},e.prototype.getDataFilteredProperties=function(){return{}},e.prototype.runConditionCore=function(e,t){if(this.expressionInfo)for(var n in this.expressionInfo)this.runConditionItemCore(n,e,t)},e.prototype.canRunConditions=function(){return!this.isDesignMode},e.prototype.checkConditionPropertyChanged=function(e){this.expressionInfo&&this.expressionInfo[e]&&this.canRunConditions()&&this.runConditionItemCore(e,this.getDataFilteredValues(),this.getDataFilteredProperties())},e.prototype.runConditionItemCore=function(e,t,n){var r=this,o=this.expressionInfo[e],i=this.getPropertyValue(e);i&&(o.canRun&&!o.canRun(this)||(o.runner||(o.runner=this.createExpressionRunner(i),o.runner.onRunComplete=function(e){o.onExecute(r,e)}),o.runner.expression=i,o.runner.run(t,n)))},e.prototype.doBeforeAsynRun=function(e){this.asynExpressionHash||(this.asynExpressionHash=[]);var t=!this.isAsyncExpressionRunning;this.asynExpressionHash[e]=!0,t&&this.onAsyncRunningChanged()},e.prototype.doAfterAsynRun=function(e){this.asynExpressionHash&&(delete this.asynExpressionHash[e],this.isAsyncExpressionRunning||this.onAsyncRunningChanged())},e.prototype.onAsyncRunningChanged=function(){},Object.defineProperty(e.prototype,"isAsyncExpressionRunning",{get:function(){return!!this.asynExpressionHash&&Object.keys(this.asynExpressionHash).length>0},enumerable:!1,configurable:!0}),e.prototype.createExpressionRunner=function(e){var t=this,n=new io(e);return n.onBeforeAsyncRun=function(e){t.doBeforeAsynRun(e)},n.onAfterAsyncRun=function(e){t.doAfterAsynRun(e)},n},e.prototype.registerPropertyChangedHandlers=function(e,t,n){void 0===n&&(n=null);for(var r=0;r<e.length;r++)this.registerFunctionOnPropertyValueChanged(e[r],t,n)},e.prototype.unregisterPropertyChangedHandlers=function(e,t){void 0===t&&(t=null);for(var n=0;n<e.length;n++)this.unRegisterFunctionOnPropertyValueChanged(e[n],t)},e.prototype.registerFunctionOnPropertyValueChanged=function(e,t,n){if(void 0===n&&(n=null),this.onPropChangeFunctions||(this.onPropChangeFunctions=[]),n)for(var r=0;r<this.onPropChangeFunctions.length;r++){var o=this.onPropChangeFunctions[r];if(o.name==e&&o.key==n)return void(o.func=t)}this.onPropChangeFunctions.push({name:e,func:t,key:n})},e.prototype.registerFunctionOnPropertiesValueChanged=function(e,t,n){void 0===n&&(n=null),this.registerPropertyChangedHandlers(e,t,n)},e.prototype.unRegisterFunctionOnPropertyValueChanged=function(e,t){if(void 0===t&&(t=null),this.onPropChangeFunctions)for(var n=0;n<this.onPropChangeFunctions.length;n++){var r=this.onPropChangeFunctions[n];if(r.name==e&&r.key==t)return void this.onPropChangeFunctions.splice(n,1)}},e.prototype.unRegisterFunctionOnPropertiesValueChanged=function(e,t){void 0===t&&(t=null),this.unregisterPropertyChangedHandlers(e,t)},e.prototype.createCustomLocalizableObj=function(e){var t=this.getLocalizableString(e);return t||this.createLocalizableString(e,this,!1,!0)},e.prototype.getLocale=function(){var e=this.getSurvey();return e?e.getLocale():""},e.prototype.getLocalizationString=function(e){return hr.getString(e,this.getLocale())},e.prototype.getLocalizationFormatString=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.getLocalizationString(e);return r&&r.format?r.format.apply(r,t):""},e.prototype.createLocalizableString=function(e,t,n,r){var o=this;void 0===n&&(n=!1),void 0===r&&(r=!1);var i=new ho(t,n,e);r&&(i.localizationName=!0===r?e:r),i.onStrChanged=function(t,n){o.propertyValueChanged(e,t,n)},this.localizableStrings||(this.localizableStrings={}),this.localizableStrings[e]=i;var s=this.getPropertyByName(e);return i.disableLocalization=s&&!1===s.isLocalizable,i},e.prototype.getLocalizableString=function(e){return this.localizableStrings?this.localizableStrings[e]:null},e.prototype.getLocalizableStringText=function(t,n){void 0===n&&(n=""),e.collectDependency(this,t);var r=this.getLocalizableString(t);if(!r)return"";var o=r.text;return o||n},e.prototype.setLocalizableStringText=function(e,t){var n=this.getLocalizableString(e);n&&(n.text!=t&&(n.text=t))},e.prototype.addUsedLocales=function(e){if(this.localizableStrings)for(var t in this.localizableStrings){(o=this.getLocalizableString(t))&&this.AddLocStringToUsedLocales(o,e)}if(this.arraysInfo)for(var t in this.arraysInfo){var n=this.getPropertyValue(t);if(n&&n.length)for(var r=0;r<n.length;r++){var o;(o=n[r])&&o.addUsedLocales&&o.addUsedLocales(e)}}},e.prototype.searchText=function(e,t){var n=[];this.getSearchableLocalizedStrings(n);for(var r=0;r<n.length;r++)n[r].setFindText(e)&&t.push({element:this,str:n[r]})},e.prototype.getSearchableLocalizedStrings=function(e){if(this.localizableStrings){var t=[];this.getSearchableLocKeys(t);for(var n=0;n<t.length;n++){var r=this.getLocalizableString(t[n]);r&&e.push(r)}}if(this.arraysInfo){var o=[];this.getSearchableItemValueKeys(o);for(n=0;n<o.length;n++){var i=this.getPropertyValue(o[n]);if(i)for(var s=0;s<i.length;s++)e.push(i[s].locText)}}},e.prototype.getSearchableLocKeys=function(e){},e.prototype.getSearchableItemValueKeys=function(e){},e.prototype.AddLocStringToUsedLocales=function(e,t){for(var n=e.getLocales(),r=0;r<n.length;r++)t.indexOf(n[r])<0&&t.push(n[r])},e.prototype.createItemValues=function(e){var t=this,n=this.createNewArray(e,(function(n){if(n.locOwner=t,n.ownerPropertyName=e,"function"==typeof n.getSurvey){var r=n.getSurvey();r&&"function"==typeof r.makeReactive&&r.makeReactive(n)}}));return this.arraysInfo[e].isItemValues=!0,n},e.prototype.notifyArrayChanged=function(e,t){e.onArrayChanged&&e.onArrayChanged(t)},e.prototype.createNewArrayCore=function(e){var t=null;return this.createArrayCoreHandler&&(t=this.createArrayCoreHandler(this.propertyHash,e)),t||(t=new Array,this.setPropertyValueCore(this.propertyHash,e,t)),t},e.prototype.ensureArray=function(e,t,n){if(void 0===t&&(t=null),void 0===n&&(n=null),!this.arraysInfo||!this.arraysInfo[e])return this.createNewArray(e,t,n)},e.prototype.createNewArray=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null);var r=this.createNewArrayCore(e);this.arraysInfo||(this.arraysInfo={}),this.arraysInfo[e]={onPush:t,isItemValues:!1};var o=this;return r.push=function(n){var i=Object.getPrototypeOf(r).push.call(r,n);if(!o.isDisposedValue){t&&t(n,r.length-1);var s=new co(r.length-1,0,[n],[]);o.propertyValueChanged(e,r,r,s),o.notifyArrayChanged(r,s)}return i},r.shift=function(){var t=Object.getPrototypeOf(r).shift.call(r);if(!o.isDisposedValue&&t){n&&n(t);var i=new co(r.length-1,1,[],[]);o.propertyValueChanged(e,r,r,i),o.notifyArrayChanged(r,i)}return t},r.unshift=function(n){var i=Object.getPrototypeOf(r).unshift.call(r,n);if(!o.isDisposedValue){t&&t(n,r.length-1);var s=new co(0,0,[n],[]);o.propertyValueChanged(e,r,r,s),o.notifyArrayChanged(r,s)}return i},r.pop=function(){var t=Object.getPrototypeOf(r).pop.call(r);if(!o.isDisposedValue){n&&n(t);var i=new co(r.length-1,1,[],[]);o.propertyValueChanged(e,r,r,i),o.notifyArrayChanged(r,i)}return t},r.splice=function(i,s){for(var a,u=[],l=2;l<arguments.length;l++)u[l-2]=arguments[l];i||(i=0),s||(s=0);var c=(a=Object.getPrototypeOf(r).splice).call.apply(a,ao([r,i,s],u));if(u||(u=[]),!o.isDisposedValue){if(n&&c)for(var p=0;p<c.length;p++)n(c[p]);if(t)for(p=0;p<u.length;p++)t(u[p],i+p);var h=new co(i,s,u,c);o.propertyValueChanged(e,r,r,h),o.notifyArrayChanged(r,h)}return c},r},e.prototype.getItemValueType=function(){},e.prototype.setArray=function(t,n,r,o,i){var s=[].concat(n);if(Object.getPrototypeOf(n).splice.call(n,0,n.length),r)for(var a=0;a<r.length;a++){var u=r[a];o&&e.createItemValue&&(u=e.createItemValue(u,this.getItemValueType())),Object.getPrototypeOf(n).push.call(n,u),i&&i(n[a])}var l=new co(0,s.length,n,s);this.propertyValueChanged(t,s,n,l),this.notifyArrayChanged(n,l)},e.prototype.isTwoValueEquals=function(e,t,n,r){return void 0===n&&(n=!1),void 0===r&&(r=!1),cr.isTwoValueEquals(e,t,!1,!n,r)},e.copyObject=function(e,t){for(var n in t){var r=t[n];"object"==typeof r&&(r={},this.copyObject(r,t[n])),e[n]=r}},e.prototype.copyCssClasses=function(t,n){n&&("string"==typeof n||n instanceof String?t.root=n:e.copyObject(t,n))},e.prototype.getValueInLowCase=function(e){return e&&"string"==typeof e?e.toLowerCase():e},e.prototype.getElementsInDesign=function(e){return void 0===e&&(e=!1),[]},e.currentDependencis=void 0}(),function(e,t,n,r){this.index=e,this.deleteCount=t,this.itemsToAdd=n,this.deletedItems=r}),po=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return so(t,e),t}(function(){function e(){}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0===this.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this.callbacks?this.callbacks.length:0},enumerable:!1,configurable:!0}),e.prototype.fireByCreatingOptions=function(e,t){if(this.callbacks)for(var n=0;n<this.callbacks.length;n++)if(this.callbacks[n](e,t()),!this.callbacks)return},e.prototype.fire=function(e,t){if(this.callbacks)for(var n=0;n<this.callbacks.length;n++)if(this.callbacks[n](e,t),!this.callbacks)return},e.prototype.clear=function(){this.callbacks=void 0},e.prototype.add=function(e){this.hasFunc(e)||(this.callbacks||(this.callbacks=new Array),this.callbacks.push(e),this.fireCallbackChanged())},e.prototype.remove=function(e){if(this.hasFunc(e)){var t=this.callbacks.indexOf(e,0);this.callbacks.splice(t,1),this.fireCallbackChanged()}},e.prototype.hasFunc=function(e){return null!=this.callbacks&&this.callbacks.indexOf(e,0)>-1},e.prototype.fireCallbackChanged=function(){this.onCallbacksChanged&&this.onCallbacksChanged()},e}()),ho=function(){function e(e,t,n){void 0===t&&(t=!1),this.owner=e,this.useMarkdown=t,this.name=n,this.values={},this.htmlValues={},this.onStringChanged=new po,this.onCreating()}return Object.defineProperty(e,"defaultLocale",{get:function(){return lr.localization.defaultLocaleName},set:function(e){lr.localization.defaultLocaleName=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localizationName",{get:function(){return this._localizationName},set:function(e){this._localizationName!=e&&(this._localizationName=e,this.strChanged())},enumerable:!1,configurable:!0}),e.prototype.getIsMultiple=function(){return!1},Object.defineProperty(e.prototype,"locale",{get:function(){if(this.owner&&this.owner.getLocale){var e=this.owner.getLocale();if(e||!this.sharedData)return e}return this.sharedData?this.sharedData.locale:""},enumerable:!1,configurable:!0}),e.prototype.strChanged=function(){this.searchableText=void 0,void 0!==this.renderedText&&(this.calculatedTextValue=this.calcText(),this.renderedText!==this.calculatedTextValue&&(this.renderedText=void 0,this.calculatedTextValue=void 0),this.htmlValues={},this.onChanged(),this.onStringChanged.fire(this,{}))},Object.defineProperty(e.prototype,"text",{get:function(){return this.pureText},set:function(e){this.setLocaleText(this.locale,e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"calculatedText",{get:function(){return this.renderedText=void 0!==this.calculatedTextValue?this.calculatedTextValue:this.calcText(),this.calculatedTextValue=void 0,this.renderedText},enumerable:!1,configurable:!0}),e.prototype.calcText=function(){var e=this.pureText;return e&&this.owner&&this.owner.getProcessedText&&e.indexOf("{")>-1&&(e=this.owner.getProcessedText(e)),this.onGetTextCallback&&(e=this.onGetTextCallback(e)),e},Object.defineProperty(e.prototype,"pureText",{get:function(){var e=this.locale;e||(e=this.defaultLoc);var t=this.getValue(e);if(this.isValueEmpty(t)&&e===this.defaultLoc&&(t=this.getValue(hr.defaultLocale)),this.isValueEmpty(t)){var n=this.getRootDialect(e);n&&(t=this.getValue(n))}return this.isValueEmpty(t)&&e!==this.defaultLoc&&(t=this.getValue(this.defaultLoc)),this.isValueEmpty(t)&&this.getLocalizationName()&&(t=this.getLocalizationStr(),this.onGetLocalizationTextCallback&&(t=this.onGetLocalizationTextCallback(t))),t||(t=this.defaultValue||""),t},enumerable:!1,configurable:!0}),e.prototype.getRootDialect=function(e){if(!e)return e;var t=e.indexOf("-");return t>-1?e.substring(0,t):""},e.prototype.getLocalizationName=function(){return this.sharedData?this.sharedData.localizationName:this.localizationName},e.prototype.getLocalizationStr=function(){var e=this.getLocalizationName();return e?hr.getString(e,this.locale):""},Object.defineProperty(e.prototype,"hasHtml",{get:function(){return this.hasHtmlValue()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"html",{get:function(){return this.hasHtml?this.getHtmlValue():""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0==this.getValuesKeys().length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textOrHtml",{get:function(){return this.hasHtml?this.getHtmlValue():this.calculatedText},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderedHtml",{get:function(){return this.textOrHtml},enumerable:!1,configurable:!0}),e.prototype.getLocaleText=function(e){var t=this.getLocaleTextCore(e);return t||""},e.prototype.getLocaleTextCore=function(e){return e||(e=this.defaultLoc),this.getValue(e)},e.prototype.isLocaleTextEqualsWithDefault=function(e,t){var n=this.getLocaleTextCore(e);return n===t||this.isValueEmpty(n)&&this.isValueEmpty(t)},e.prototype.clear=function(){this.setJson(void 0)},e.prototype.clearLocale=function(e){this.setLocaleText(e,void 0)},e.prototype.setLocaleText=function(e,t){if(e=this.getValueLoc(e),this.storeDefaultText||!this.isLocaleTextEqualsWithDefault(e,t)){if(lr.localization.storeDuplicatedTranslations||this.isValueEmpty(t)||!e||e==this.defaultLoc||this.getValue(e)||t!=this.getLocaleText(this.defaultLoc)){var n=this.curLocale;e||(e=this.defaultLoc);var r=this.onStrChanged&&e===n?this.pureText:void 0;delete this.htmlValues[e],this.isValueEmpty(t)?this.deleteValue(e):"string"==typeof t&&(this.canRemoveLocValue(e,t)?this.setLocaleText(e,null):(this.setValue(e,t),e==this.defaultLoc&&this.deleteValuesEqualsToDefault(t))),this.fireStrChanged(e,r)}}else{if(!this.isValueEmpty(t)||e&&e!==this.defaultLoc)return;var o=hr.defaultLocale,i=this.getValue(o);o&&!this.isValueEmpty(i)&&(this.setValue(o,t),this.fireStrChanged(o,i))}},e.prototype.isValueEmpty=function(e){return null==e||!this.localizationName&&""===e},Object.defineProperty(e.prototype,"curLocale",{get:function(){return this.locale?this.locale:this.defaultLoc},enumerable:!1,configurable:!0}),e.prototype.canRemoveLocValue=function(e,t){if(lr.localization.storeDuplicatedTranslations)return!1;if(e===this.defaultLoc)return!1;var n=this.getRootDialect(e);if(n){var r=this.getLocaleText(n);return r?r==t:this.canRemoveLocValue(n,t)}return t==this.getLocaleText(this.defaultLoc)},e.prototype.fireStrChanged=function(e,t){if(this.strChanged(),this.onStrChanged){var n=this.pureText;e===this.curLocale&&t===n||this.onStrChanged(t,n)}},e.prototype.hasNonDefaultText=function(){var e=this.getValuesKeys();return 0!=e.length&&(e.length>1||e[0]!=this.defaultLoc)},e.prototype.getLocales=function(){var e=this.getValuesKeys();return 0==e.length?[]:e},e.prototype.getJson=function(){if(this.sharedData)return this.sharedData.getJson();var e=this.getValuesKeys();return 0==e.length?null:1!=e.length||e[0]!=lr.localization.defaultLocaleName||lr.serialization.localizableStringSerializeAsObject?this.values:this.values[e[0]]},e.prototype.setJson=function(e){if(this.sharedData)this.sharedData.setJson(e);else if(this.values={},this.htmlValues={},null!=e){if("string"==typeof e)this.setLocaleText(null,e);else for(var t in e)this.setLocaleText(t,e[t]);this.strChanged()}},Object.defineProperty(e.prototype,"renderAs",{get:function(){return this.owner&&"function"==typeof this.owner.getRenderer&&this.owner.getRenderer(this.name)||e.defaultRenderer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderAsData",{get:function(){return this.owner&&"function"==typeof this.owner.getRendererContext&&this.owner.getRendererContext(this)||this},enumerable:!1,configurable:!0}),e.prototype.equals=function(e){return this.sharedData?this.sharedData.equals(e):!(!e||!e.values)&&cr.isTwoValueEquals(this.values,e.values,!1,!0,!1)},e.prototype.setFindText=function(e){if(this.searchText!=e){if(this.searchText=e,!this.searchableText){var t=this.textOrHtml;this.searchableText=t?t.toLowerCase():""}var n=this.searchableText,r=n&&e?n.indexOf(e):void 0;return r<0&&(r=void 0),null==r&&this.searchIndex==r||(this.searchIndex=r,this.onSearchChanged&&this.onSearchChanged()),null!=this.searchIndex}},e.prototype.onChanged=function(){},e.prototype.onCreating=function(){},e.prototype.hasHtmlValue=function(){if(!this.owner||!this.useMarkdown)return!1;var e=this.locale;if(e||(e=this.defaultLoc),void 0!==this.htmlValues[e])return!!this.htmlValues[e];var t=this.calculatedText;if(!t)return this.setHtmlValue(e,""),!1;if(this.getLocalizationName()&&t===this.getLocalizationStr())return this.setHtmlValue(e,""),!1;var n=this.owner.getMarkdownHtml(t,this.name);return this.setHtmlValue(e,n),!!n},e.prototype.setHtmlValue=function(e,t){this.htmlValues[e]=t},e.prototype.getHtmlValue=function(){var e=this.locale;return e||(e=this.defaultLoc),this.htmlValues[e]},e.prototype.deleteValuesEqualsToDefault=function(e){if(!lr.localization.storeDuplicatedTranslations)for(var t=this.getValuesKeys(),n=0;n<t.length;n++)t[n]!=this.defaultLoc&&this.getValue(t[n])==e&&this.deleteValue(t[n])},e.prototype.getValue=function(e){return this.sharedData?this.sharedData.getValue(e):this.values[this.getValueLoc(e)]},e.prototype.setValue=function(e,t){this.sharedData?this.sharedData.setValue(e,t):this.values[this.getValueLoc(e)]=t},e.prototype.deleteValue=function(e){this.sharedData?this.sharedData.deleteValue(e):delete this.values[this.getValueLoc(e)]},e.prototype.getValueLoc=function(e){return this.disableLocalization?lr.localization.defaultLocaleName:e},e.prototype.getValuesKeys=function(){return this.sharedData?this.sharedData.getValuesKeys():Object.keys(this.values)},Object.defineProperty(e.prototype,"defaultLoc",{get:function(){return lr.localization.defaultLocaleName},enumerable:!1,configurable:!0}),e.SerializeAsObject=!1,e.defaultRenderer="sv-string-viewer",e.editableRenderer="sv-string-editor",e}();!function(){function e(e){this.owner=e,this.values={}}e.prototype.getIsMultiple=function(){return!0},Object.defineProperty(e.prototype,"locale",{get:function(){return this.owner&&this.owner.getLocale?this.owner.getLocale():""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue("")},set:function(e){this.setValue("",e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return Array.isArray(this.value)?this.value.join("\n"):""},set:function(e){this.value=e?e.split("\n"):[]},enumerable:!1,configurable:!0}),e.prototype.getLocaleText=function(e){var t=this.getValueCore(e,!e||e===this.locale);return t&&Array.isArray(t)&&0!=t.length?t.join("\n"):""},e.prototype.setLocaleText=function(e,t){var n=t?t.split("\n"):null;this.setValue(e,n)},e.prototype.getValue=function(e){return this.getValueCore(e)},e.prototype.getValueCore=function(e,t){if(void 0===t&&(t=!0),e=this.getLocale(e),this.values[e])return this.values[e];if(t){var n=lr.localization.defaultLocaleName;if(e!==n&&this.values[n])return this.values[n]}return[]},e.prototype.setValue=function(e,t){e=this.getLocale(e);var n=cr.createCopy(this.values);t&&0!=t.length?this.values[e]=t:delete this.values[e],this.onValueChanged&&this.onValueChanged(n,this.values)},e.prototype.hasValue=function(e){return void 0===e&&(e=""),!this.isEmpty&&this.getValue(e).length>0},Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0==this.getValuesKeys().length},enumerable:!1,configurable:!0}),e.prototype.getLocale=function(e){return e||((e=this.locale)||lr.localization.defaultLocaleName)},e.prototype.getLocales=function(){var e=this.getValuesKeys();return 0==e.length?[]:e},e.prototype.getJson=function(){var e=this.getValuesKeys();return 0==e.length?null:1!=e.length||e[0]!=lr.localization.defaultLocaleName||lr.serialization.localizableStringSerializeAsObject?cr.createCopy(this.values):this.values[e[0]]},e.prototype.setJson=function(e){if(this.values={},e)if(Array.isArray(e))this.setValue(null,e);else for(var t in e)this.setValue(t,e[t])},e.prototype.getValuesKeys=function(){return Object.keys(this.values)}}();function fo(e){return"function"!=typeof e?e:e()}!function(){function e(){this._result=""}e.prototype.log=function(e){this._result+="->"+e},Object.defineProperty(e.prototype,"result",{get:function(){return this._result},enumerable:!1,configurable:!0})}();var mo=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yo=function(){function e(e,t,n,r,o){var i=this;void 0===r&&(r=null),this.container=e,this.model=t,this.itemsSelector=n,this.dotsItemSize=r,this.delayedUpdateFunction=o,this.resizeObserver=void 0,this.isInitialized=!1,this.minDimensionConst=56,this.separatorSize=17,this.separatorAddConst=1,this.paddingSizeConst=8,this.dotsSizeConst=48,this.recalcMinDimensionConst=!0,this.getComputedStyle=window.getComputedStyle.bind(window),this.model.updateCallback=function(e){e&&(i.isInitialized=!1),setTimeout((function(){i.process()}),1)},"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((function(e){window.requestAnimationFrame((function(){i.process()}))})),this.resizeObserver.observe(this.container.parentElement))}return e.prototype.getDimensions=function(e){return{scroll:e.scrollWidth,offset:e.offsetWidth}},e.prototype.getAvailableSpace=function(){var e=this.getComputedStyle(this.container),t=this.container.offsetWidth;return"border-box"===e.boxSizing&&(t-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)),t},e.prototype.calcItemSize=function(e){return e.offsetWidth},e.prototype.calcMinDimension=function(e){var t=this.minDimensionConst;return e.iconSize&&this.recalcMinDimensionConst&&(t=2*e.iconSize+this.paddingSizeConst),e.canShrink?t+(e.needSeparator?this.separatorSize:0):e.maxDimension},e.prototype.getRenderedVisibleActionsCount=function(){var e=this,t=0;return this.container.querySelectorAll(this.itemsSelector).forEach((function(n){e.calcItemSize(n)>0&&t++})),t},e.prototype.calcItemsSizes=function(){var e=this,t=this.model.actions;(this.container.querySelectorAll(this.itemsSelector)||[]).forEach((function(n,r){var o=t[r];e.calcActionDimensions(o,n)}))},e.prototype.calcActionDimensions=function(e,t){e.maxDimension=this.calcItemSize(t),e.minDimension=this.calcMinDimension(e)},Object.defineProperty(e.prototype,"isContainerVisible",{get:function(){return!!((e=this.container).offsetWidth||e.offsetHeight||e.getClientRects().length);var e},enumerable:!1,configurable:!0}),e.prototype.process=function(){var e=this;if(this.isContainerVisible&&!this.model.isResponsivenessDisabled){this.isInitialized||this.model.setActionsMode("large");var t=function(){var t,n=e.dotsItemSize;if(!e.dotsItemSize){var r=null===(t=e.container)||void 0===t?void 0:t.querySelector(".sv-dots");n=r&&e.calcItemSize(r)||e.dotsSizeConst}e.model.fit(e.getAvailableSpace(),n)};if(this.isInitialized)t();else{var n=function(){e.calcItemsSizes(),e.isInitialized=!0,t()};this.getRenderedVisibleActionsCount()<this.model.visibleActions.length?this.delayedUpdateFunction?this.delayedUpdateFunction(n):queueMicrotask?queueMicrotask(n):n():n()}}},e.prototype.dispose=function(){this.model.updateCallback=void 0,this.resizeObserver&&this.resizeObserver.disconnect()},e}(),go=function(e){function t(t,n,r,o,i,s){void 0===i&&(i=40);var a=e.call(this,t,n,r,o,s)||this;return a.minDimensionConst=i,a.recalcMinDimensionConst=!1,a}return mo(t,e),t.prototype.getDimensions=function(){return{scroll:this.container.scrollHeight,offset:this.container.offsetHeight}},t.prototype.getAvailableSpace=function(){var e=this.getComputedStyle(this.container),t=this.container.offsetHeight;return"border-box"===e.boxSizing&&(t-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)),t},t.prototype.calcItemSize=function(e){return e.offsetHeight},t.prototype.calcActionDimensions=function(e,t){e.maxDimension=this.calcItemSize(t),e.minDimension=this.calcItemSize(t)},t}(yo);Object(i.checkLibraryVersion)("1.9.126","survey-react-ui")}])}));