survey-react-ui 1.9.8 → 1.9.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/survey-react-ui.d.ts +21 -11
- package/survey-react-ui.js +76 -47
- package/survey-react-ui.min.js +2 -2
package/survey-react-ui.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.9.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.9.12
|
|
3
3
|
* Copyright (c) 2015-2022 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 re})),n.d(t,"attachKey2click",(function(){return oe})),n.d(t,"Model",(function(){return l})),n.d(t,"WindowModel",(function(){return c})),n.d(t,"SurveyNavigationBase",(function(){return X})),n.d(t,"SurveyTimerPanel",(function(){return Z})),n.d(t,"SurveyNavigation",(function(){return $})),n.d(t,"SurveyPage",(function(){return Q})),n.d(t,"SurveyRow",(function(){return v})),n.d(t,"SurveyPanel",(function(){return ye})),n.d(t,"SurveyFlowPanel",(function(){return ge})),n.d(t,"SurveyQuestion",(function(){return pe})),n.d(t,"SurveyElementErrors",(function(){return he})),n.d(t,"SurveyQuestionAndErrorsCell",(function(){return fe})),n.d(t,"SurveyElementBase",(function(){return h})),n.d(t,"SurveyQuestionElementBase",(function(){return f})),n.d(t,"SurveyQuestionCommentItem",(function(){return ae})),n.d(t,"SurveyQuestionComment",(function(){return se})),n.d(t,"SurveyQuestionCheckbox",(function(){return Ce})),n.d(t,"SurveyQuestionCheckboxItem",(function(){return Ee})),n.d(t,"SurveyQuestionRanking",(function(){return we})),n.d(t,"SurveyQuestionRankingItem",(function(){return Oe})),n.d(t,"SurveyQuestionDropdown",(function(){return Se})),n.d(t,"SurveyQuestionMatrix",(function(){return xe})),n.d(t,"SurveyQuestionMatrixRow",(function(){return Re})),n.d(t,"SurveyQuestionHtml",(function(){return je})),n.d(t,"SurveyQuestionFile",(function(){return ke})),n.d(t,"SurveyQuestionMultipleText",(function(){return Be})),n.d(t,"SurveyQuestionRadiogroup",(function(){return Ae})),n.d(t,"SurveyQuestionText",(function(){return Fe})),n.d(t,"SurveyQuestionBoolean",(function(){return Ve})),n.d(t,"SurveyQuestionBooleanCheckbox",(function(){return ze})),n.d(t,"SurveyQuestionEmpty",(function(){return Je})),n.d(t,"SurveyQuestionMatrixDropdownCell",(function(){return nt})),n.d(t,"SurveyQuestionMatrixDropdown",(function(){return ot})),n.d(t,"SurveyQuestionMatrixDynamic",(function(){return st})),n.d(t,"SurveyQuestionPanelDynamic",(function(){return ut})),n.d(t,"SurveyProgress",(function(){return pt})),n.d(t,"SurveyProgressButtons",(function(){return dt})),n.d(t,"SurveyQuestionRating",(function(){return mt})),n.d(t,"SurveyQuestionExpression",(function(){return vt})),n.d(t,"SurveyWindow",(function(){return bt})),n.d(t,"ReactQuestionFactory",(function(){return ee})),n.d(t,"ReactElementFactory",(function(){return a})),n.d(t,"SurveyQuestionImagePicker",(function(){return Et})),n.d(t,"SurveyQuestionImage",(function(){return wt})),n.d(t,"SurveyQuestionSignaturePad",(function(){return _t})),n.d(t,"SurveyQuestionButtonGroup",(function(){return Pt})),n.d(t,"SurveyQuestionCustom",(function(){return Rt})),n.d(t,"SurveyQuestionComposite",(function(){return It})),n.d(t,"DefaultTitle",(function(){return Tt})),n.d(t,"Popup",(function(){return R})),n.d(t,"List",(function(){return Mt})),n.d(t,"TitleActions",(function(){return A})),n.d(t,"TitleElement",(function(){return H})),n.d(t,"SurveyActionBar",(function(){return D})),n.d(t,"LogoImage",(function(){return At})),n.d(t,"SurveyHeader",(function(){return K})),n.d(t,"SvgIcon",(function(){return E})),n.d(t,"SurveyQuestionMatrixDynamicRemoveButton",(function(){return Ht})),n.d(t,"SurveyQuestionMatrixDetailButton",(function(){return Qt})),n.d(t,"SurveyQuestionMatrixDynamicDragDropIcon",(function(){return Ye})),n.d(t,"MatrixRow",(function(){return Ge})),n.d(t,"Skeleton",(function(){return Ut})),n.d(t,"SurveyLocStringViewer",(function(){return U})),n.d(t,"SurveyLocStringEditor",(function(){return Kt})),n.d(t,"ResponsivityManager",(function(){return Zt})),n.d(t,"VerticalResponsivityManager",(function(){return Gt})),n.d(t,"unwrap",(function(){return te}));var r,o=n(0),i=n.n(o),s=n(1),a=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}(),u=(r=function(e,t){return(r=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}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(e){function t(t){return void 0===t&&(t=null),e.call(this,t)||this}return u(t,e),t.prototype.render=function(){this.renderCallback&&this.renderCallback()},t.prototype.mergeCss=function(e,t){this.mergeValues(e,t)},t.prototype.doAfterRenderSurvey=function(e){this.afterRenderSurvey(e)},t.prototype.onLoadSurveyFromService=function(){this.currentPage&&(this.currentPage.setWasShown(!1),this.currentPage.onFirstRendering()),this.render()},t.prototype.onLoadingSurveyFromService=function(){this.render()},t.prototype.setCompletedState=function(t,n){e.prototype.setCompletedState.call(this,t,n),this.render()},t.prototype.start=function(){var t=e.prototype.start.call(this);return this.render(),t},t.prototype.wrapRow=function(e,t){var n=this.getRowWrapperComponentName(t),r=this.getRowWrapperComponentData(t);return a.Instance.createElement(n,{element:e,row:t,componentData:r})},t.prototype.wrapElement=function(e,t){var n=this.getElementWrapperComponentName(t),r=this.getElementWrapperComponentData(t);return a.Instance.createElement(n,{element:e,question:t,componentData:r})},t.prototype.wrapItemValue=function(e,t,n){var r=this.getItemValueWrapperComponentName(n,t),o=this.getItemValueWrapperComponentData(n,t);return a.Instance.createElement(r,{key:e.key,element:e,question:t,item:n,componentData:o})},t.prototype.wrapMatrixCell=function(e,t,n){void 0===n&&(n="cell");var r=this.getElementWrapperComponentName(t,n),o=this.getElementWrapperComponentData(t,n);return a.Instance.createElement(r,{element:e,cell:t,componentData:o})},t}(s.SurveyModel),c=function(e){function t(t,n){return void 0===t&&(t=null),void 0===n&&(n=null),e.call(this,t,n)||this}return u(t,e),t.prototype.createSurvey=function(e){return new l(e)},Object.defineProperty(t.prototype,"renderCallback",{get:function(){return this.survey.renderCallback},set:function(e){this.survey.renderCallback=e},enumerable:!1,configurable:!0}),t}(s.SurveyWindowModel);s.SurveyModel.platform="react";var p=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 p(t,e),t.renderLocString=function(e,t,n){return void 0===t&&(t=null),a.Instance.createElement(e.renderAs,{locStr:e.renderAsData,style:t,key:n})},t.prototype.componentDidMount=function(){this.makeBaseElementsReact()},t.prototype.componentWillUnmount=function(){this.unMakeBaseElementsReact()},t.prototype.componentDidUpdate=function(e,t){this.makeBaseElementsReact()},t.prototype.render=function(){if(!this.canRender())return null;this.startEndRendering(1);var e=this.renderElement();return this.startEndRendering(-1),e=this.wrapElement(e),this.changedStatePropNameValue=void 0,e},t.prototype.wrapElement=function(e){return e},Object.defineProperty(t.prototype,"isRendering",{get:function(){var e=this.getStateElement();return!!e&&e.reactRendering>0},enumerable:!1,configurable:!0}),t.prototype.getRenderedElement=function(){return this.getStateElement()},t.prototype.startEndRendering=function(e){var t=this.getRenderedElement();t&&(t.reactRendering||(t.reactRendering=0),t.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){return void 0===n&&(n=null),t.renderLocString(e,n)},t.prototype.makeBaseElementReact=function(e){var t=this;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){e&&(e.setPropertyValueCoreHandler=void 0,e.iteratePropertiesHash((function(e,t){var n=e[t];Array.isArray(n)&&((n=n).onArrayChanged=function(){})})))},t}(o.Component),d=function(e){function t(t){return e.call(this,t)||this}return p(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),t}(h),f=function(e){function t(t){return e.call(this,t)||this}return p(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(){e.prototype.componentWillUnmount.call(this),this.questionBase&&this.questionBase.beforeDestroyQuestionElement(this.control)},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.getRenderedElement=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(){return!(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,o=this.questionBase.survey;return o&&(r=o.wrapMatrixCell(t,e,n)),null!=r?r:t},t}(h),m=function(e){function t(t){var n=e.call(this,t)||this;return n.updateValueOnEvent=function(e){s.Helpers.isTwoValueEquals(n.questionBase.value,e.target.value)||n.setValueCore(e.target.value)},n.updateValueOnEvent=n.updateValueOnEvent.bind(n),n}return p(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();s.Helpers.isTwoValueEquals(n,t.value)||(t.value=this.getValue(n))}e.prototype.updateDomElement.call(this)},t.prototype.getValue=function(e){return s.Helpers.isValueEmpty(e)?"":e},t}(f),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)}}(),v=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=o.createRef(),n}return y(t,e),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,t=this;return e=this.row.visibleElements.map((function(e,n){var r=t.createElement(e,n),i=e.cssClasses;return o.createElement("div",{className:i.questionWrapper,style:e.rootStyle,"data-key":r.key,key:r.key,onFocus:e.focusIn},t.row.isNeedRender?r:a.Instance.createElement(e.skeletonComponentName,{element:e,css:t.css}))})),o.createElement("div",{ref:this.rootRef,className:this.row.getRowCss()},e)},t.prototype.renderElement=function(){var e=this.survey,t=this.renderElementContent();return e.wrapRow(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(e,t){return e.row!==this.row&&(e.row.isNeedRender=this.row.isNeedRender,this.stopLazyRendering()),!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 a.Instance.isElementRegistered(r)||(r="question"),a.Instance.createElement(r,{key:e.name+n,element:e,creator:this.creator,survey:this.survey,css:this.css})},t}(h),g=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=o.createRef(),n}return g(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.name===this.survey.currentPage.name||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 o.createElement(v,{key:e.id,row:e,survey:this.survey,creator:this.creator,css:t})},t}(h),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=i.a.createRef(),n}return C(t,e),t.prototype.updateSvg=function(){this.props.iconName&&Object(s.createSvg)(this.props.size,this.props.width,this.props.height,this.props.iconName,this.svgIconRef.current)},t.prototype.componentDidUpdate=function(){this.updateSvg()},t.prototype.render=function(){return i.a.createElement("span",{className:this.props.className,onClick:this.props.onClick},this.props.iconName?i.a.createElement("svg",{className:"sv-svg-icon",ref:this.svgIconRef,role:"img"},i.a.createElement("use",null)):null)},t.prototype.componentDidMount=function(){this.updateSvg()},t}(i.a.Component);a.Instance.registerElement("sv-svg-icon",(function(e){return i.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 ".concat(this.props.cssClasses);return i.a.createElement("div",{className:e})},t}(i.a.Component);a.Instance.registerElement("sv-action-bar-separator",(function(e){return i.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)}}(),_=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?i.a.createElement(w,null):null,n=a.Instance.createElement(this.item.component||"sv-action-bar-item",{item:this.item});return i.a.createElement("span",{className:e,id:this.item.id},i.a.createElement("div",{className:"sv-action__content"},t,n))},t}(h),S=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 i.a.createElement(i.a.Fragment,null,this.renderInnerButton())},t.prototype.renderText=function(){if(!this.item.hasTitle)return null;var e=this.item.getActionBarItemTitleCss();return i.a.createElement("span",{className:e}," ",this.item.title)},t.prototype.renderButtonContent=function(){var e=this.renderText(),t=this.item.iconName?i.a.createElement(E,{className:this.item.cssClasses.itemIcon,size:this.item.iconSize,iconName:this.item.iconName}):null;return i.a.createElement(i.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(),o=this.item.disableTabStop?-1:void 0;return oe(i.a.createElement("button",{className:t,type:"button",disabled:this.item.disabled,onClick:function(){return e.item.action(e.item)},title:n,tabIndex:o},r),null,{processEsc:!1})},t}(h);a.Instance.registerElement("sv-action-bar-item",(function(e){return i.a.createElement(S,e)}));var P=n(2),N=n.n(P),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)}}(),R=function(e){function t(t){var n=e.call(this,t)||this;return n.containerRef=i.a.createRef(),n.popup=new s.PopupBaseViewModel(n.props.model),n.popup.createPopupContainer(),n}return x(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.popup.mountPopupContainer(),this.popup.targetElement=this.containerRef.current.parentElement},t.prototype.componentWillUnmount=function(){this.popup.destroyPopupContainer()},t.prototype.shouldComponentUpdate=function(e){return e.model!==this.popup.model},t.prototype.render=function(){this.popup.model=this.model;var e=N.a.createPortal(i.a.createElement(I,{model:this.popup}),this.popup.container);return i.a.createElement("div",{ref:this.containerRef},e)},t}(h);a.Instance.registerElement("sv-popup",(function(e){return i.a.createElement(R,e)}));var I=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 x(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(){var e=this,t=this.model.showPointer?this.renderPointer():null,n=this.model.title?this.renderHeader():null,r=this.renderContent(),o=this.model.showFooter?this.renderFooter():null;return i.a.createElement("div",{className:"sv-popup__container",style:{left:this.model.left,top:this.model.top,height:this.model.height},onClick:function(t){e.clickInside(t)}},i.a.createElement("div",{className:"sv-popup_shadow"},t,n,i.a.createElement("div",{className:"sv-popup__scrolling-content"},r),o))},t.prototype.renderPointer=function(){return i.a.createElement("span",{style:{left:this.model.pointerTarget.left,top:this.model.pointerTarget.top},className:"sv-popup__pointer"})},t.prototype.renderHeader=function(){return i.a.createElement("div",{className:"sv-popup__header"},this.model.title)},t.prototype.renderContent=function(){var e=a.Instance.createElement(this.model.contentComponentName,this.model.contentComponentData);return i.a.createElement("div",{className:"sv-popup__content"},e)},t.prototype.renderCancelButton=function(){var e=this;return i.a.createElement("button",{type:"button",className:"sv-popup__footer-item sv-popup__button sv-popup__button--cancel",onClick:function(){e.model.cancel()}},this.model.cancelButtonText)},t.prototype.renderApplyButton=function(){var e=this;return i.a.createElement("button",{type:"button",className:"sv-popup__footer-item sv-popup__button sv-popup__button--apply",onClick:function(){e.model.apply()}},this.model.applyButtonText)},t.prototype.renderFooter=function(){return i.a.createElement("div",{className:"sv-popup__footer"},this.renderCancelButton(),this.model.isModal?this.renderApplyButton():null)},t.prototype.render=function(){var e=this,t=this.renderContainer(),n=(new s.CssClassBuilder).append("sv-popup").append(this.model.styleClass).toString(),r={display:this.model.isVisible?"":"none"};return i.a.createElement("div",{tabIndex:-1,className:n,style:r,onClick:function(t){e.model.clickOutside(),t.stopPropagation()},onKeyDown:this.handleKeydown},t)},t}(h);s.settings.showModal=function(e,t,n,r,o,a,u){void 0===u&&(u="popup");var l=Object(s.createPopupModalViewModel)(e,t,n,r,(function(){N.a.unmountComponentAtNode(l.container),l.destroyPopupContainer()}),void 0,o,a,u);N.a.render(i.a.createElement(I,{model:l}),l.container),l.model.isVisible=!0};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)}}(),T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.renderButtonContent=function(){var t=e.prototype.renderButtonContent.call(this);return i.a.createElement(i.a.Fragment,null,t,i.a.createElement(R,{model:this.item.popupModel}))},t}(S);a.Instance.registerElement("sv-action-bar-item-dropdown",(function(e){return i.a.createElement(T,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)}}(),D=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=i.a.createRef(),n}return k(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;this.model.initResponsivityManager(t)}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),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 i.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 i.a.createElement(_,{item:e,key:"item"+t})}))},t}(h);a.Instance.registerElement("sv-action-bar",(function(e){return i.a.createElement(D,e)}));var 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)}}(),M=function(e){function t(t){return e.call(this,t)||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=this.element.getTitleOwner();if(!e)return h.renderLocString(this.element.locTitle);var t=this.renderTitleSpans(e,this.cssClasses);return i.a.createElement(i.a.Fragment,null,t)},t.prototype.renderTitleSpans=function(e,t){var n=function(e){return i.a.createElement("span",{"data-key":e,key:e}," ")},r=[];e.isRequireTextOnStart&&(r.push(this.renderRequireText(e,t)),r.push(n("req-sp")));var o=e.no;return o&&(r.push(i.a.createElement("span",{"data-key":"q_num",key:"q_num",className:t.number,style:{position:"static"},"aria-hidden":!0},o)),r.push(n("num-sp"))),e.isRequireTextBeforeTitle&&(r.push(this.renderRequireText(e,t)),r.push(n("req-sp"))),r.push(h.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 i.a.createElement("span",{"data-key":"req-text",key:"req-text",className:t.requiredText||t.panel.requiredText,"aria-hidden":!0},e.requiredText)},t}(i.a.Component),L=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)}}(),A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(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=i.a.createElement(M,{element:this.element,cssClasses:this.cssClasses});return this.element.hasTitleActions?i.a.createElement("div",{className:"sv-title-actions"},i.a.createElement("span",{className:"sv-title-actions__title"},e),i.a.createElement(D,{model:this.element.getTitleToolbar()})):e},t}(i.a.Component);s.RendererFactory.Instance.registerRenderer("element","title-actions","sv-title-actions"),a.Instance.registerElement("sv-title-actions",(function(e){return i.a.createElement(A,e)}));var W=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 W(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=i.a.createElement(A,{element:e,cssClasses:e.cssClasses}),n=null,r=null;e.hasTitleEvents&&(n=function(){return e.toggleState()},r=function(e){Object(s.doKey2ClickUp)(e.nativeEvent)});var o=e.titleTagName;return i.a.createElement(o,{className:e.cssTitle,id:e.ariaTitleId,"aria-label":"radiogroup"===e.getType()?"":e.locTitle.renderedHtml,tabIndex:e.titleTabIndex,"aria-expanded":e.titleAriaExpanded,onClick:n,onKeyUp:r},t)},t}(i.a.Component),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)}}(),Q=function(e){function t(t){return e.call(this,t)||this}return F(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);return o.createElement("div",{ref:this.rootRef,className:this.panelBase.cssClasses.page.root},e,t,n)},t.prototype.renderTitle=function(){return o.createElement(H,{element:this.page})},t.prototype.renderDescription=function(){if(!this.page._showDescription)return null;var e=h.renderLocString(this.page.locDescription);return o.createElement("div",{className:this.panelBase.cssClasses.page.description},e)},t}(b),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)}}(),U=function(e){function t(t){return e.call(this,t)||this}return V(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.onChanged=function(){})},t.prototype.componentDidUpdate=function(e,t){e.locStr&&(e.locStr.onChanged=function(){}),this.reactOnStrChanged()},t.prototype.reactOnStrChanged=function(){var e=this;this.locStr&&(this.locStr.onChanged=function(){e.setState({changed:e.state&&e.state.changed?e.state.changed+1:1})})},t.prototype.render=function(){if(!this.locStr)return null;if(this.locStr.hasHtml){var e={__html:this.locStr.renderedHtml};return i.a.createElement("span",{className:"sv-string-viewer",style:this.style,dangerouslySetInnerHTML:e})}return i.a.createElement("span",{className:"sv-string-viewer",style:this.style},this.locStr.renderedHtml)},t}(i.a.Component);a.Instance.registerElement(s.LocalizableString.defaultRenderer,(function(e){return i.a.createElement(U,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)}}(),K=function(e){function t(t){var n=e.call(this,t)||this;return n.state={changed:0},n}return z(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.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=h.renderLocString(this.survey.locDescription);return i.a.createElement("div",{className:this.css.headerText,style:{maxWidth:this.survey.titleMaxWidth}},i.a.createElement(H,{element:this.survey}),i.a.createElement("h5",{className:this.css.description},e))},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 a.Instance.createElement(t,{data:n})},t.prototype.render=function(){return this.survey.renderedHasHeader?i.a.createElement("div",{className:this.css.header},this.renderLogoImage(this.survey.isLogoBefore),this.renderTitle(),this.renderLogoImage(this.survey.isLogoAfter),i.a.createElement("div",{className:this.css.headerClose})):null},t}(i.a.Component);a.Instance.registerElement("survey-header",(function(e){return i.a.createElement(K,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)}}(),Z=function(e){function t(t){var n=e.call(this,t)||this;return n.update=function(){n.setState({timeSpent:n.survey.timeSpent})},n}return J(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.survey.onTimer.add(this.update)},t.prototype.componentWillUnmount=function(){this.survey.onTimer.remove(this.update)},t.prototype.render=function(){return o.createElement("div",null,this.survey.timerInfoText)},t}(o.Component),G=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)}}(),X=function(e){function t(t){var n=e.call(this,t)||this;return n.updateStateFunction=null,n.state={update:0},n}return G(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},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}(o.Component),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)}}(),$=function(e){function t(t){var n=e.call(this,t)||this;return n.mouseDownPage=null,n.handlePrevClick=n.handlePrevClick.bind(n),n.handleNextClick=n.handleNextClick.bind(n),n.handleNextMouseDown=n.handleNextMouseDown.bind(n),n.handleMouseDown=n.handleMouseDown.bind(n),n.handleCompleteClick=n.handleCompleteClick.bind(n),n.handlePreviewClick=n.handlePreviewClick.bind(n),n.handleStartClick=n.handleStartClick.bind(n),n}return Y(t,e),t.prototype.handlePrevClick=function(e){this.survey.prevPage()},t.prototype.handleNextClick=function(e){this.mouseDownPage&&this.mouseDownPage!==this.survey.currentPage||(this.mouseDownPage=null,this.survey.nextPage())},t.prototype.handleNextMouseDown=function(e){return this.mouseDownPage=this.survey.currentPage,this.survey.navigationMouseDown()},t.prototype.handleMouseDown=function(e){return this.survey.navigationMouseDown()},t.prototype.handleCompleteClick=function(e){this.survey.completeLastPage()},t.prototype.handlePreviewClick=function(e){this.survey.showPreview()},t.prototype.handleStartClick=function(e){this.survey.start()},t.prototype.render=function(){if(!this.survey||"none"===this.survey.isNavigationButtonsShowing)return null;var e="starting"===this.survey.state,t=this.survey.isShowPrevButton?this.renderButton(this.handlePrevClick,this.handleMouseDown,this.survey.pagePrevText,this.survey.cssNavigationPrev):null,n=this.survey.isShowNextButton?this.renderButton(this.handleNextClick,this.handleNextMouseDown,this.survey.pageNextText,this.survey.cssNavigationNext):null,r=this.survey.isCompleteButtonVisible?this.renderButton(this.handleCompleteClick,this.handleMouseDown,this.survey.completeText,this.survey.cssNavigationComplete):null,i=!e&&this.survey.isLastPage&&this.survey.isPreviewButtonVisible?this.renderButton(this.handlePreviewClick,this.handleMouseDown,this.survey.previewText,this.survey.cssNavigationPreview):null,s=e?this.renderButton(this.handleStartClick,null,this.survey.startSurveyText,this.survey.cssNavigationStart):null;return o.createElement("div",{className:this.css.footer},s,t,n,i,r)},t.prototype.renderButton=function(e,t,n,r){return o.createElement("input",{className:r,style:{marginRight:"5px"},type:"button",onMouseDown:t,onClick:e,value:n})},t}(X),ee=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}();function te(e){return"function"!=typeof e?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)}}(),re=function(e){function t(t){var n=e.call(this,t)||this;n.previousJSON={},n.handleTryAgainClick=n.handleTryAgainClick.bind(n),n.createSurvey(t),n.updateSurvey(t,{});n.survey.currentPage;return n.rootRef=o.createRef(),n.rootNodeId=t.id||null,n.rootNodeClassName=t.className||"",n}return ne(t,e),Object.defineProperty(t,"cssType",{get:function(){return s.surveyCss.currentType},set:function(e){s.StylesManager.applyTheme(e)},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.survey},t.prototype.shouldComponentUpdate=function(e,t){return this.isModelJSONChanged(e)&&(this.createSurvey(e),this.updateSurvey(e,{})),!0},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateSurvey(this.props,t)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this);var t=this.rootRef.current;t&&this.survey&&this.survey.doAfterRenderSurvey(t),this.survey&&this.survey.startTimerFromUI()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.survey&&this.survey.stopTimer()},t.prototype.doRender=function(){var e;s.SvgRegistry.renderIcons(),e="completed"==this.survey.state?this.renderCompleted():"completedbefore"==this.survey.state?this.renderCompletedBefore():"loading"==this.survey.state?this.renderLoading():"starting"==this.survey.state?this.renderStartPage():this.renderSurvey();var t=o.createElement(K,{survey:this.survey}),n=o.createElement("div",{className:"sv_custom_header"});this.survey.hasLogo&&(n=null);var r=this.rootNodeClassName?this.rootNodeClassName+" "+this.css.root:this.css.root;return o.createElement("div",{id:this.rootNodeId,ref:this.rootRef,className:r},o.createElement("form",{onSubmit:function(e){e.preventDefault()}},n,o.createElement("div",{className:this.css.container},t,e)))},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.handleTryAgainClick=function(e){this.survey.doComplete()},t.prototype.renderCompleted=function(){if(!this.survey.showCompletedPage)return null;var e=null;if(this.survey.completedState){var t=null;if("error"==this.survey.completedState){var n=this.survey.getLocString("saveAgainButton");t=o.createElement("input",{type:"button",value:n,className:this.css.saveData.saveAgainButton,onClick:this.handleTryAgainClick})}var r=this.css.saveData[this.survey.completedState];e=o.createElement("div",{className:this.css.saveData.root},o.createElement("div",{className:r},o.createElement("span",null,this.survey.completedStateText),t))}var i={__html:this.survey.processedCompletedHtml};return o.createElement(o.Fragment,null,o.createElement("div",{dangerouslySetInnerHTML:i,className:this.survey.completedCss}),e)},t.prototype.renderCompletedBefore=function(){var e={__html:this.survey.processedCompletedBeforeHtml};return o.createElement("div",{dangerouslySetInnerHTML:e,className:this.css.body})},t.prototype.renderLoading=function(){var e={__html:this.survey.processedLoadingHtml};return o.createElement("div",{dangerouslySetInnerHTML:e,className:this.css.body})},t.prototype.renderStartPage=function(){var e=this.survey.startedPage?this.renderPage(this.survey.startedPage):null,t=this.survey.startedPage?this.survey.startedPage.id:"";return o.createElement(o.Fragment,null,o.createElement("div",{id:t,className:this.css.body},this.renderNavigation("top"),e,this.renderNavigation("bottom")))},t.prototype.renderSurvey=function(){var e=this.survey.currentPage?this.renderPage(this.survey.currentPage):null,t=this.survey.currentPage?this.survey.currentPage.id:"",n=this.survey.isShowProgressBarOnTop?this.renderProgress(!0):null,r=this.survey.isShowProgressBarOnBottom?this.renderProgress(!1):null,i=this.survey.bodyCss;return e||(i=this.css.bodyEmpty,e=this.renderEmptySurvey()),o.createElement("div",{id:t,className:i},n,this.renderTimerPanel("top"),this.renderNavigation("top"),e,this.renderTimerPanel("bottom"),r,this.renderNavigation("bottom"))},t.prototype.renderTimerPanel=function(e){return("top"!==e||this.survey.isTimerPanelShowingOnTop)&&("bottom"!==e||this.survey.isTimerPanelShowingOnBottom)?o.createElement(Z,{survey:this.survey}):null},t.prototype.renderPage=function(e){return o.createElement(Q,{survey:this.survey,page:e,css:this.css,creator:this})},t.prototype.renderProgress=function(e){return a.Instance.createElement("sv-progress-"+this.survey.progressBarType.toLowerCase(),{survey:this.survey,css:this.css,isTop:e})},t.prototype.renderNavigation=function(e){return"both"===this.survey.isNavigationButtonsShowing||"none"!==this.survey.isNavigationButtonsShowing&&this.survey.isNavigationButtonsShowing===e?o.createElement($,{survey:this.survey,css:this.css}):null},t.prototype.renderEmptySurvey=function(){return o.createElement("span",null,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 l(e.json)):this.survey=new l,e.css&&this.survey.mergeCss(e.css,this.css),this.setSurveyEvents()},t.prototype.isModelJSONChanged=function(e){return e.model?this.survey!==e.model:!!e.json&&!s.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.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 ee.Instance.createQuestion(!e.isDefaultRendering||e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isInputReadOnly,creator:this})},t.prototype.renderError=function(e,t,n){return o.createElement("div",{key:e},o.createElement("span",{className:n.error.icon,"aria-hidden":"true"}),o.createElement("span",{className:n.error.item},o.createElement(U,{locStr:t.locText})))},t.prototype.questionTitleLocation=function(){return this.survey.questionTitleLocation},t.prototype.questionErrorLocation=function(){return this.survey.questionErrorLocation},t}(h);function oe(e,t,n){return void 0===n&&(n={processEsc:!0}),t&&t.disableTabStop?o.cloneElement(e,{tabIndex:-1}):o.cloneElement(e,{tabIndex:0,onKeyUp:function(e){return e.preventDefault(),e.stopPropagation(),Object(s.doKey2ClickUp)(e,n),!1},onKeyDown:function(e){return function(e,t){if(void 0===t&&(t={processEsc:!0}),!e.target||"true"!==e.target.contentEditable){var n=e.which||e.keyCode,r=[13,32];t.processEsc&&r.push(27),-1!==r.indexOf(n)&&e.preventDefault()}}(e,n)}})}a.Instance.registerElement("survey",(function(e){return o.createElement(re,e)}));var ie=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)}}(),se=function(e){function t(t){return e.call(this,t)||this}return ie(t,e),t.prototype.renderElement=function(){var e=this,t=this.question.isInputTextUpdate?null:this.updateValueOnEvent,n=this.question.renderedPlaceHolder;return this.question.isReadOnlyRenderDiv()?o.createElement("div",null,this.question.value):o.createElement("textarea",{id:this.question.inputId,className:this.question.className,disabled:this.question.isInputReadOnly,readOnly:this.question.isInputReadOnly,ref:function(t){return e.control=t},maxLength:this.question.getMaxLength(),placeholder:n,onBlur:t,onInput:function(t){e.question.isInputTextUpdate?e.updateValueOnEvent(t):e.question.updateElement()},onKeyDown:function(t){e.question.onKeyDown(t)},cols:this.question.cols,rows:this.question.rows,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy,style:{resize:this.question.resizeStyle}})},t}(m),ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ie(t,e),t.prototype.canRender=function(){return!!this.props.question},t.prototype.renderElement=function(){var e=this,t=this.props.question,n=this.props.otherCss||this.cssClasses.comment,r=function(t){e.setState({comment:t.target.value})},i=this.state&&void 0!==this.state.comment?this.state.comment:t.comment||"";return t.isReadOnlyRenderDiv()?o.createElement("div",null,i):o.createElement("textarea",{className:n,value:i,disabled:this.isDisplayMode,maxLength:t.getOthersMaxLength(),placeholder:t.commentOrOtherPlaceHolder,onChange:r,onBlur:function(e){t.onCommentChange(e),r(e)},onInput:function(e){return t.onCommentInput(e)},"aria-required":t.isRequired,"aria-label":t.locTitle.renderedHtml,style:{resize:t.resizeStyle}})},t}(d);ee.Instance.registerQuestion("comment",(function(e){return o.createElement(se,e)}));var ue=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(t){var n=e.call(this,t)||this;return n.widgetRef=o.createRef(),n}return ue(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 o.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 o.createElement("div",{ref:this.widgetRef,dangerouslySetInnerHTML:n})}return o.createElement("div",{ref:this.widgetRef},t)},t}(f),ce=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)}}(),pe=function(e){function t(t){var n=e.call(this,t)||this;return n.isNeedFocus=!1,n.rootRef=o.createRef(),n}return ce(t,e),t.renderQuestionBody=function(e,t){return t.isVisible?t.customWidget?o.createElement(le,{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.renderElement=function(){var e=this.question,t=e.cssClasses,n=this.renderQuestion(),r=this.renderHeader(e),i=e.hasTitleOnLeftTop?r:null,s=e.hasTitleOnBottom?r:null,a=e.hasDescriptionUnderInput?this.renderDescription(t,!0):null,u=e&&e.hasComment?this.renderComment(t):null,l=this.question.isErrorsModeTooltip&&!this.question.hasParent?this.renderErrors(t,""):null,c=this.question.isErrorsModeTooltip&&this.question.hasParent?this.renderErrors(t,"tooltip"):null,p="top"!==this.creator.questionErrorLocation()||this.question.isErrorsModeTooltip?null:this.renderErrors(t,"top"),h="bottom"!==this.creator.questionErrorLocation()||this.question.isErrorsModeTooltip?null:this.renderErrors(t,"bottom"),d={};e.paddingLeft&&(d.paddingLeft=e.paddingLeft),e.paddingRight&&(d.paddingRight=e.paddingRight);var f={display:this.question.isCollapsed?"none":""};return o.createElement(o.Fragment,null,o.createElement("div",{ref:this.rootRef,id:e.id,className:e.getRootCss(),style:d,role:e.ariaRole,"aria-required":this.question.ariaRequired,"aria-invalid":this.question.ariaInvalid,"aria-labelledby":e.hasTitle?e.ariaTitleId:null},l,i,o.createElement("div",{className:e.cssContent,style:f,role:"presentation"},p,n,u,h,c,a),s))},t.prototype.wrapElement=function(e){var t,n=this.question.survey;return n&&(t=n.wrapElement(e,this.question)),null!=t?t:e},t.prototype.renderQuestion=function(){return t.renderQuestionBody(this.creator,this.question)},t.prototype.renderDescription=function(e,t){void 0===t&&(t=!1);var n=h.renderLocString(this.question.locDescription),r=t?e.descriptionUnderInput:e.description;return o.createElement("div",{className:r},n)},t.prototype.renderComment=function(e){var t=h.renderLocString(this.question.locCommentText);return o.createElement("div",{className:this.question.cssClasses.formGroup},o.createElement("div",null,t),o.createElement(ae,{question:this.question,cssClasses:e,otherCss:e.other,isDisplayMode:this.question.isInputReadOnly}))},t.prototype.renderHeader=function(e){var t=e.cssClasses,n=e.hasTitle?o.createElement(H,{element:e}):null,r=e.hasDescriptionUnderTitle?this.renderDescription(t):null;return o.createElement("div",{className:e.cssHeader,onClick:e.clickTitleFunction},n,r)},t.prototype.renderErrors=function(e,t){return o.createElement(he,{element:this.question,cssClasses:e,creator:this.creator,location:t,id:this.question.id+"_errors"})},t}(h);a.Instance.registerElement("question",(function(e){return o.createElement(pe,e)}));var he=function(e){function t(t){var n=e.call(this,t)||this;return n.state=n.getState(),n.tooltipRef=o.createRef(),n}return ce(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this.props.id},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.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),"tooltip"==this.props.location&&(this.tooltipRef.current&&!this.tooltipManager&&(this.tooltipManager=new s.TooltipManager(this.tooltipRef.current)),this.tooltipManager&&!this.tooltipRef.current&&this.disposeTooltipManager())},t.prototype.componentWillUnmount=function(){this.tooltipManager&&this.disposeTooltipManager()},t.prototype.disposeTooltipManager=function(){this.tooltipManager.dispose(),this.tooltipManager=void 0},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 o.createElement("div",{role:"alert","aria-live":"polite",className:this.element.cssError,id:this.id,ref:this.tooltipRef},e)},t}(d),de=function(e){function t(t){return e.call(this,t)||this}return ce(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.renderErrors=function(e){return this.getShowErrors()?o.createElement(he,{element:this.question,cssClasses:this.cssClasses,creator:this.creator,location:e}):null},t.prototype.renderContent=function(){var e=this.creator.questionErrorLocation(),t=this.renderErrors(e),n="top"!==e||this.question.isErrorsModeTooltip?null:t,r="bottom"!==e||this.question.isErrorsModeTooltip?null:t,i=this.renderQuestion();return o.createElement(o.Fragment,null,n,i,r)},t.prototype.getShowErrors=function(){return this.question.isVisible},t.prototype.renderQuestion=function(){return pe.renderQuestionBody(this.creator,this.question)},t}(d),fe=function(e){function t(t){var n=e.call(this,t)||this;return n.cellRef=o.createRef(),n}return ce(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.question.isErrorsModeTooltip?this.renderErrors("tooltip"):null;return o.createElement("td",{ref:this.cellRef,className:this.itemCss,"data-responsive-title":this.getHeaderText(),title:this.props.cell.getTitle(),style:e},this.wrapCell(this.props.cell,o.createElement("div",{className:this.cssClasses.cellQuestionWrapper},this.renderContent(),t)))},t.prototype.getCellStyle=function(){return null},t.prototype.getHeaderText=function(){return""},t.prototype.wrapCell=function(e,t){if(!e)return t;var n,r=this.question.survey;return r&&(n=r.wrapMatrixCell(t,e)),null!=n?n:t},t}(de),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(t){var n=e.call(this,t)||this;return n.hasBeenExpanded=!1,n}return me(t,e),Object.defineProperty(t.prototype,"panel",{get:function(){return this.panelBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this.renderHeader(),t=o.createElement(he,{element:this.panelBase,cssClasses:this.panelBase.cssClasses,creator:this.creator}),n={paddingLeft:this.panel.innerPaddingLeft,display:this.panel.isCollapsed?"none":void 0},r=null;if(!this.panel.isCollapsed||this.hasBeenExpanded){this.hasBeenExpanded=!0;var i=this.renderRows(this.panelBase.cssClasses),s=this.panelBase.cssClasses.panel.content;r=this.renderContent(n,i,s)}return o.createElement("div",{ref:this.rootRef,className:this.panelBase.getContainerCss(),onFocus:this.panelBase.focusIn},e,t,r)},t.prototype.renderHeader=function(){if(!this.panelBase.hasTitle&&!this.panelBase.hasDescription)return null;var e=this.renderTitle(),t=this.renderDescription();return o.createElement("div",{className:this.panelBase.cssClasses.panel.header},e,t)},t.prototype.wrapElement=function(e){var t,n=this.panel.survey;return n&&(t=n.wrapElement(e,this.panel)),null!=t?t:e},t.prototype.renderContent=function(e,t,n){var r=this.renderBottom();return o.createElement("div",{style:e,className:n,id:this.panel.contentId},t,r)},t.prototype.renderTitle=function(){return this.panelBase.title?o.createElement(H,{element:this.panelBase}):null},t.prototype.renderDescription=function(){if(!this.panelBase.description)return null;var e=h.renderLocString(this.panelBase.locDescription);return o.createElement("div",{className:this.panel.cssClasses.panel.description},e)},t.prototype.renderBottom=function(){var e=this.panel.getFooterToolbar();return e.hasActions?o.createElement(D,{model:e}):null},t}(b);a.Instance.registerElement("panel",(function(e){return o.createElement(ye,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)}}(),ge=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(){return[this.renderHtml()]},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 o.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++)t.push(this.renderNode(e[n]));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?o.createElement("div",{key:this.getNodeIndex()},n):o.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 r=o.createElement(pe,{key:n.name,element:n,creator:this.creator,css:this.css});return o.createElement("span",{key:this.getNodeIndex()},r)}return"div"===t?o.createElement("div",{key:this.getNodeIndex()},e.textContent):o.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 o.createElement("f-panel",{style:e},t)},t}(ye);a.Instance.registerElement("flowpanel",(function(e){return o.createElement(ge,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){return e.call(this,t)||this}return be(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 o.createElement("fieldset",{role:"presentation",className:this.question.getSelectBaseRootCss(),ref:function(t){return e.control=t}},o.createElement("legend",{role:"presentation",className:"sv-hidden"}),this.question.hasColumns?this.getColumns(t):this.getItems(t))},t.prototype.getColumns=function(e){var t=this;return this.question.columns.map((function(n,r){var i=n.map((function(n,o){return t.renderItem("item"+o,n,0===r&&0===o,e,""+r+o)}));return o.createElement("div",{key:"column"+r,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,i=this.renderItem(o,r,0==n,e,""+n);t.push(i)}return t},Object.defineProperty(t.prototype,"textStyle",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.renderItem=function(e,t,n,r,i){var s=o.createElement(Ee,{key:e,question:this.question,cssClasses:r,isDisplayMode:this.isDisplayMode,item:t,textStyle:this.textStyle,isFirst:n,index:i}),a=this.question.survey,u=null;return a&&(u=a.wrapItemValue(s,this.question,t)),null!=u?u:s},t}(f),Ee=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=function(e){var t=[].concat(n.question.renderedValue||[]),r=t.indexOf(n.item.value);e.target.checked?r<0&&t.push(n.item.value):r>-1&&t.splice(r,1),n.question.renderedValue=t},n.selectAllChanged=function(e){n.question.toggleSelectAll()},n}return be(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(){return!(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),t=this.question.isOtherItem(this.item)&&e?this.renderOther():null;return this.renderCheckbox(e,t)},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),r=this.hideCaption?"":this.renderLocString(this.item.locText),i=this.question.getItemClass(this.item),s=this.question.getLabelClass(this.item),a=this.item==this.question.selectAllItem?this.selectAllChanged:this.handleOnChange,u=this.item.locText;return o.createElement("div",{className:i,role:"presentation"},o.createElement("label",{className:s,"aria-label":this.question.getAriaItemLabel(this.item)},o.createElement("input",{className:this.cssClasses.itemControl,type:"checkbox",name:this.question.name,value:this.item.value,id:n,style:this.inputStyle,disabled:!this.question.getItemEnabled(this.item),checked:e,onChange:a,"aria-describedby":this.question.ariaDescribedBy}),this.cssClasses.materialDecorator?o.createElement("span",{className:this.cssClasses.materialDecorator},this.question.itemSvgIcon?o.createElement("svg",{className:this.cssClasses.itemDecorator},o.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,o.createElement("span",{className:this.cssClasses.controlLabel,title:u.renderedHtml},r)),t)},t.prototype.renderOther=function(){return o.createElement("div",{className:"form-group"},o.createElement(ae,{question:this.question,otherCss:this.cssClasses.other,cssClasses:this.cssClasses,isDisplayMode:this.isDisplayMode}))},t}(d);ee.Instance.registerQuestion("checkbox",(function(e){return o.createElement(Ce,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)}}(),we=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return qe(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this;return o.createElement("div",{className:this.question.rootClass,ref:function(t){return e.control=t}},this.getItems())},t.prototype.getItems=function(){for(var e=this,t=[],n=this.question.rankingChoices,r=function(r){var i=n[r];t.push(o.renderItem(i,r,(function(t){e.question.handleKeydown.call(e.question,t,i)}),(function(t){t.persist(),e.question.handlePointerDown.call(e.question,t,i,t.currentTarget)}),o.question.cssClasses,o.question.getItemClass(i),o.question))},o=this,i=0;i<n.length;i++)r(i);return t},t.prototype.renderItem=function(e,t,n,r,i,s,a){var u=e.value+"-"+t+"-item",l=this.renderLocString(e.locText),c=t,p=this.question.getNumberByIndex(t),h=o.createElement(Oe,{key:u,text:l,index:c,indexText:p,handleKeydown:n,handlePointerDown:r,cssClasses:i,itemClass:s,question:a}),d=this.question.survey,f=null;return d&&(f=d.wrapItemValue(h,this.question,e)),null!=f?f:h},t}(f),Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return qe(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,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return o.createElement("div",{tabIndex:0,className:this.itemClass,onKeyDown:this.handleKeydown,onPointerDown:this.handlePointerDown,"data-sv-drop-target-ranking-item":this.index},o.createElement("div",{tabIndex:-1,style:{outline:"none"}},o.createElement("div",{className:this.cssClasses.itemGhostNode}),o.createElement("div",{className:this.cssClasses.itemContent},o.createElement("div",{className:this.cssClasses.itemIconContainer},o.createElement("svg",{width:"10",height:"16",viewBox:"0 0 10 16",className:this.question.getIconHoverCss(),xmlns:"http://www.w3.org/2000/svg"},o.createElement("path",{d:"M6 2C6 0.9 6.9 0 8 0C9.1 0 10 0.9 10 2C10 3.1 9.1 4 8 4C6.9 4 6 3.1 6 2ZM2 0C0.9 0 0 0.9 0 2C0 3.1 0.9 4 2 4C3.1 4 4 3.1 4 2C4 0.9 3.1 0 2 0ZM8 6C6.9 6 6 6.9 6 8C6 9.1 6.9 10 8 10C9.1 10 10 9.1 10 8C10 6.9 9.1 6 8 6ZM2 6C0.9 6 0 6.9 0 8C0 9.1 0.9 10 2 10C3.1 10 4 9.1 4 8C4 6.9 3.1 6 2 6ZM8 12C6.9 12 6 12.9 6 14C6 15.1 6.9 16 8 16C9.1 16 10 15.1 10 14C10 12.9 9.1 12 8 12ZM2 12C0.9 12 0 12.9 0 14C0 15.1 0.9 16 2 16C3.1 16 4 15.1 4 14C4 12.9 3.1 12 2 12Z"})),o.createElement("svg",{width:"10",height:"24",viewBox:"0 0 10 24",className:this.question.getIconFocusCss(),xmlns:"http://www.w3.org/2000/svg"},o.createElement("path",{d:"M10 5L5 0L0 5H4V9H6V5H10Z"}),o.createElement("path",{d:"M6 19V15H4V19H0L5 24L10 19H6Z"}))),o.createElement("div",{className:this.cssClasses.itemIndex},this.indexText),o.createElement("div",{className:this.cssClasses.controlLabel},this.text))))},t}(d);ee.Instance.registerQuestion("ranking",(function(e){return o.createElement(we,e)}));var _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)}}(),Se=function(e){function t(t){return e.call(this,t)||this}return _e(t,e),t.prototype.setValueCore=function(e){this.questionBase.renderedValue=e},t.prototype.getValueCore=function(){return this.questionBase.renderedValue},t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.isOtherSelected?this.renderOther(e):null,n=this.renderSelect(e);return o.createElement("div",{className:this.question.renderCssRoot},n,t)},t.prototype.renderSelect=function(e){var t=this;return this.isDisplayMode?o.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),disabled:!0},this.question.readOnlyText):o.createElement("div",{className:e.selectWrapper},o.createElement("select",{id:this.question.inputId,className:this.question.getControlClass(),ref:function(e){return t.control=e},autoComplete:this.question.autoComplete,onChange:this.updateValueOnEvent,onInput:this.updateValueOnEvent,"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.showOptionsCaption?o.createElement("option",{value:""},this.question.optionsCaption):null,this.question.visibleChoices.map((function(e,t){return o.createElement(Pe,{key:"item"+t,item:e})}))))},t.prototype.renderOther=function(e){return o.createElement("div",{className:"form-group"},o.createElement(ae,{question:this.question,otherCss:e.other,cssClasses:e,isDisplayMode:this.isDisplayMode}))},t}(m),Pe=function(e){function t(t){return e.call(this,t)||this}return _e(t,e),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 o.createElement("option",{value:this.item.value,disabled:!this.item.isEnabled},this.item.text)},t}(d);ee.Instance.registerQuestion("dropdown",(function(e){return o.createElement(Se,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)}}(),xe=function(e){function t(t){var n=e.call(this,t)||this;return n.state={rowsChanged:0},n}return Ne(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?o.createElement("td",null):null,r=[],i=0;i<this.question.visibleColumns.length;i++){var s=this.question.visibleColumns[i],a="column"+i,u=this.renderLocString(s.locText);r.push(o.createElement("th",{className:this.question.cssClasses.headerCell,key:a},this.wrapCell({column:s},u,"column-header")))}var l=[],c=this.question.visibleRows;for(i=0;i<c.length;i++){var p=c[i];a="row-"+p.name+"-"+i;l.push(o.createElement(Re,{key:a,question:this.question,cssClasses:t,isDisplayMode:this.isDisplayMode,row:p,isFirst:0==i}))}var h=this.question.showHeader?o.createElement("thead",null,o.createElement("tr",null,n,r)):null;return o.createElement("div",{className:t.tableWrapper,ref:function(t){return e.control=t}},o.createElement("fieldset",null,o.createElement("legend",{"aria-label":this.question.locTitle.renderedHtml}),o.createElement("table",{className:t.root},h,o.createElement("tbody",null,l))))},t}(f),Re=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n}return Ne(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.handleOnChange=function(e){this.row.value=e.target.value,this.setState({value:this.row.value})},t.prototype.wrapCell=function(e,t,n){if(!n)return t;var r,o=this.question.survey;return o&&(r=o.wrapMatrixCell(t,e,n)),null!=r?r: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);e=o.createElement("td",{className:this.question.cssClasses.cell},this.wrapCell({row:this.row},t,"row-header"))}var n=this.generateTds();return o.createElement("tr",{className:this.row.rowClasses},e,n)},t.prototype.generateTds=function(){for(var e=this,t=[],n=this.row,r=0;r<this.question.visibleColumns.length;r++){var i=null,s=this.question.visibleColumns[r],a="value"+r,u=n.value==s.value,l=this.question.getItemClass(n,s),c=this.question.inputId+"_"+n.name+"_"+r;if(this.question.hasCellText){var p=this.question.isInputReadOnly?null:function(t){return function(){return e.cellClick(n,t)}};i=o.createElement("td",{key:a,className:l,onClick:p?p(s):null},this.renderLocString(this.question.getCellDisplayLocText(n.name,s)))}else i=o.createElement("td",{key:a,"data-responsive-title":s.locText.renderedHtml,className:this.question.cssClasses.cell},o.createElement("label",{className:l},o.createElement("input",{id:c,type:"radio",className:this.cssClasses.itemValue,name:n.fullName,value:s.value,disabled:this.isDisplayMode,checked:u,onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":s.locText.renderedHtml,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),o.createElement("span",{className:this.question.cssClasses.materialDecorator},o.createElement("svg",{className:this.question.cssClasses.itemDecorator,viewBox:"-12 -12 24 24"},o.createElement("circle",{r:"6",cx:"0",cy:"0"}),"s")),o.createElement("span",{className:"circle"}),o.createElement("span",{className:"check"}),o.createElement("span",{style:{display:"none"}},this.question.locTitle.renderedHtml)));t.push(i)}return t},t.prototype.cellClick=function(e,t){e.value=t.value,this.setState({value:this.row.value})},t}(d);ee.Instance.registerQuestion("matrix",(function(e){return o.createElement(xe,e)}));var Ie=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 Ie(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 o.createElement("div",{className:this.question.renderCssRoot,dangerouslySetInnerHTML:e})},t}(f);ee.Instance.registerQuestion("html",(function(e){return o.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)}}(),ke=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,t=this,n=this.renderPreview(),r=this.renderFileDecorator(),i=this.renderClearButton(this.question.cssClasses.removeButton),s=this.renderClearButton(this.question.cssClasses.removeButtonBottom);return e=o.createElement("input",{type:"file",disabled:this.isDisplayMode,className:this.isDisplayMode?this.question.getReadOnlyFileCss():this.question.cssClasses.fileInput,id:this.question.inputId,ref:function(e){return t.control=e},style:this.isDisplayMode?{color:"transparent"}:{},onChange:this.isDisplayMode?null: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}),o.createElement("div",{className:this.question.getFileRootCss()},e,r,i,n,s)},t.prototype.renderFileDecorator=function(){this.question.cssClasses;var e,t=null;return e=o.createElement("label",{role:"button",className:this.question.getChooseFileCss(),htmlFor:this.question.inputId,"aria-label":this.question.chooseButtonCaption},o.createElement("span",null,this.question.chooseButtonCaption),this.question.cssClasses.chooseFileIconId?o.createElement(E,{iconName:this.question.cssClasses.chooseFileIconId,size:"auto"}):null),this.question.isEmpty()&&(t=o.createElement("span",{className:this.question.cssClasses.noFileChosen},this.question.noFileChosenCaption)),o.createElement("div",{className:this.question.getFileDecoratorCss(),onDrop:this.question.onDrop,onDragOver:this.question.onDragOver,onDragLeave:this.question.onDragLeave},o.createElement("span",{className:this.question.cssClasses.dragAreaPlaceholder},this.question.dragAreaPlaceholder),o.createElement("div",{className:this.question.cssClasses.wrapper},e,t))},t.prototype.renderClearButton=function(e){return this.question.isEmpty()||this.isDisplayMode||!e?null:o.createElement("button",{type:"button",onClick:this.question.doClean,className:e},o.createElement("span",null,this.question.cleanButtonCaption),this.question.cssClasses.removeButtonIconId?o.createElement(E,{iconName:this.question.cssClasses.removeButtonIconId,size:"auto"}):null)},t.prototype.renderFileSign=function(e,t){var n=this;return e&&t.name?o.createElement("div",{className:e},o.createElement("a",{href:t.content,onClick:function(e){n.question.doDownloadFile(e,t)},title:t.name,download:t.name,style:{width:this.question.imageWidth+"px"}},t.name)):null},t.prototype.renderPreview=function(){var e=this;if(!this.question.previewValue)return null;var t=this.question.previewValue.map((function(t,n){return t?o.createElement("span",{key:e.question.inputId+"_"+n,className:e.question.cssClasses.preview},e.renderFileSign(e.question.cssClasses.fileSign,t),o.createElement("div",{className:e.question.cssClasses.imageWrapper},e.question.canPreviewImage(t)?o.createElement("img",{src:t.content,height:e.question.imageHeight,width:e.question.imageWidth,alt:"File preview"}):o.createElement("img",{className:e.question.cssClasses.defaultImage,height:e.question.imageHeight,width:e.question.imageWidth}),t.name&&!e.question.isReadOnly?o.createElement("div",{className:e.question.cssClasses.removeFileButton,onClick:function(){return e.question.doRemoveFile(t)}},o.createElement("span",{className:e.question.cssClasses.removeFile},e.question.removeFileCaption),e.question.cssClasses.removeFileSvgIconId?o.createElement(E,{iconName:e.question.cssClasses.removeFileSvgIconId,size:"auto",className:e.question.cssClasses.removeFileSvg}):null):null),e.renderFileSign(e.question.cssClasses.fileSignBottom,t)):null}));return o.createElement("div",{className:this.question.cssClasses.fileList},t)},t}(f);ee.Instance.registerQuestion("file",(function(e){return o.createElement(ke,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)}}(),Be=function(e){function t(t){return e.call(this,t)||this}return De(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=[],r=0;r<t.length;r++)n.push(this.renderRow(r,t[r],e));return o.createElement("table",{className:e.root},o.createElement("tbody",null,n))},t.prototype.renderItemTooltipError=function(e,t){return this.question.isErrorsModeTooltip?o.createElement(he,{element:e.editor,cssClasses:t,creator:this.creator,location:"tooltip",id:e.editor.id+"_errors"}):null},t.prototype.renderRow=function(e,t,n){for(var r="item"+e,i=[],s=0;s<t.length;s++){var a=t[s];i.push(o.createElement("td",{key:"item"+s,className:this.question.cssClasses.cell},o.createElement("label",{className:this.question.getItemLabelCss(a)},o.createElement("span",{className:n.itemTitle},o.createElement(M,{element:a.editor,cssClasses:a.editor.cssClasses})),o.createElement(Me,{cssClasses:n,itemCss:this.question.getItemCss(),question:a.editor,creator:this.creator}),this.renderItemTooltipError(a,n))))}return o.createElement("tr",{key:r,className:n.row},i)},t}(f),Me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return De(t,e),t.prototype.renderElement=function(){return o.createElement("div",{className:this.itemCss},this.renderContent())},t}(de);ee.Instance.registerQuestion("multipletext",(function(e){return o.createElement(Be,e)}));var 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)}}(),Ae=function(e){function t(t){return e.call(this,t)||this}return Le(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.canShowClearButton&&(n=o.createElement("div",null,o.createElement("input",{type:"button",className:this.question.cssClasses.clearButton,onClick:function(){return e.question.clearValue()},value:this.question.clearButtonCaption}))),o.createElement("fieldset",{className:this.question.getSelectBaseRootCss(),role:"presentation",ref:function(t){return e.control=t}},this.question.hasColumns?this.getColumns(t):this.getItems(t),n)},t.prototype.getColumns=function(e){var t=this,n=this.getStateValue();return this.question.columns.map((function(r,i){var s=r.map((function(r,o){return t.renderItem(r,n,e,""+i+o)}));return o.createElement("div",{key:"column"+i,className:t.question.getColumnClass(),role:"presentation"},s)}))},t.prototype.getItems=function(e){for(var t=[],n=this.getStateValue(),r=0;r<this.question.visibleChoices.length;r++){var o=this.question.visibleChoices[r],i=this.renderItem(o,n,e,""+r);t.push(i)}return t},Object.defineProperty(t.prototype,"textStyle",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.renderItem=function(e,t,n,r){var i="item"+r,s=o.createElement(We,{key:i,question:this.question,cssClasses:n,isDisplayMode:this.isDisplayMode,item:e,textStyle:this.textStyle,index:r,isChecked:t===e.value}),a=this.question.survey,u=null;return a&&(u=a.wrapItemValue(s,this.question,e)),null!=u?u:s},t.prototype.getStateValue=function(){return this.question.isEmpty()?"":this.question.renderedValue},t}(f),We=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n}return Le(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(){return!(this.question.customWidget&&!this.question.customWidgetData.isNeedRender&&!this.question.customWidget.widgetJson.isDefaultRender&&!this.question.customWidget.widgetJson.render)},t.prototype.handleOnChange=function(e){this.question.renderedValue=this.item.value},t.prototype.canRender=function(){return!!this.question&&!!this.item},t.prototype.renderElement=function(){var e=this.question.isOtherItem(this.item)&&this.question.isOtherSelected?this.renderOther(this.cssClasses):null,t=this.hideCaption?"":this.renderLocString(this.item.locText,this.textStyle),n=this.question.getItemClass(this.item),r=this.question.getLabelClass(this.item),i=this.item.locText,s=this.question.getControlLabelClass(this.item);return o.createElement("div",{className:n,role:"presentation"},o.createElement("label",{className:r,"aria-label":this.question.getAriaItemLabel(this.item)},o.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?o.createElement("span",{className:this.cssClasses.materialDecorator},this.question.itemSvgIcon?o.createElement("svg",{className:this.cssClasses.itemDecorator},o.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,o.createElement("span",{className:s,title:i.renderedHtml},t)),e)},t.prototype.renderOther=function(e){return o.createElement("div",{className:"form-group"},o.createElement(ae,{question:this.question,otherCss:e.other,cssClasses:e,isDisplayMode:this.isDisplayMode}))},t}(d);a.Instance.registerElement("survey-radiogroup-item",(function(e){return o.createElement(We,e)})),ee.Instance.registerQuestion("radiogroup",(function(e){return o.createElement(Ae,e)}));var He=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(t){var n=e.call(this,t)||this;return n._isWaitingForEnter=!1,n}return He(t,e),t.prototype.renderInput=function(){var e=this,t=this.question.getControlClass(),n=null,r=null,i=null;this.question.isInputTextUpdate?(n=function(t){return e._isWaitingForEnter=229===t.keyCode},r=function(t){e._isWaitingForEnter&&13!==t.keyCode||(e.updateValueOnEvent(t),e._isWaitingForEnter=!1)},i=function(t){t.persist(),setTimeout((function(){e.updateValueOnEvent(t)}),1)}):r=function(t){13===t.keyCode&&e.updateValueOnEvent(t)};var s=this.question.renderedPlaceHolder;return this.question.isReadOnlyRenderDiv()?o.createElement("div",null,this.question.value):o.createElement("input",{id:this.question.inputId,disabled:this.isDisplayMode,className:t,type:this.question.inputType,ref:function(t){return e.control=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:s,list:this.question.dataListId,autoComplete:this.question.autoComplete,onBlur:this.updateValueOnEvent,onChange:function(t){t.target===document.activeElement?e.question.isInputTextUpdate&&e.updateValueOnEvent(t):e.updateValueOnEvent(t)},onKeyUp:r,onKeyDown:n,onCompositionUpdate:i,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy})},t.prototype.renderElement=function(){return this.question.dataListId?o.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(o.createElement("option",{key:"item"+n,value:e[n]}));return o.createElement("datalist",{id:this.question.dataListId},t)},t}(m);ee.Instance.registerQuestion("text",(function(e){return o.createElement(Fe,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)}}(),Ve=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.checkRef=o.createRef(),n}return Qe(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.checkedValue=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.updateDomElement=function(){if(this.question){var t=this.checkRef.current;t&&(t.indeterminate=this.question.isIndeterminate),this.control=t,e.prototype.updateDomElement.call(this)}},t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=this.question.getItemCss();return o.createElement("div",{className:t.root},o.createElement("label",{className:n,onClick:this.handleOnClick},o.createElement("input",{ref:this.checkRef,type:"checkbox",name:this.question.name,value:null===this.question.checkedValue?"":this.question.checkedValue,id:this.question.inputId,className:t.control,disabled:this.isDisplayMode,checked:this.question.checkedValue||!1,onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),o.createElement("span",{className:this.question.getLabelCss(!1),onClick:function(t){return e.handleOnLabelClick(t,!1)}},this.renderLocString(this.question.locLabelFalse)),o.createElement("div",{className:t.switch,onClick:this.handleOnSwitchClick},o.createElement("span",{className:t.slider},this.question.isDeterminated&&t.sliderText?o.createElement("span",{className:t.sliderText},this.renderLocString(this.question.getCheckedLabel())):null)),o.createElement("span",{className:this.question.getLabelCss(!0),onClick:function(t){return e.handleOnLabelClick(t,!0)}},this.renderLocString(this.question.locLabelTrue))))},t}(f);ee.Instance.registerQuestion("boolean",(function(e){return o.createElement(Ve,e)}));var Ue=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){return e.call(this,t)||this}return Ue(t,e),t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.getItemCss();return o.createElement("div",{className:e.root},o.createElement("label",{className:t,onClick:this.handleOnClick},o.createElement("input",{ref:this.checkRef,type:"checkbox",name:this.question.name,value:null===this.question.checkedValue?"":this.question.checkedValue,id:this.question.inputId,className:e.control,disabled:this.isDisplayMode,checked:this.question.checkedValue||!1,onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),o.createElement("span",{className:e.materialDecorator},this.question.svgIcon?o.createElement("svg",{className:e.itemDecorator},o.createElement("use",{xlinkHref:this.question.svgIcon})):o.createElement("svg",{viewBox:"0 0 24 24",className:e.itemDecorator},o.createElement("rect",{className:e.uncheckedPath,x:"5",y:"10",width:"14",height:"4"}),o.createElement("polygon",{className:e.checkedPath,points:"19,10 14,10 14,5 10,5 10,10 5,10 5,14 10,14 10,19 14,19 14,14 19,14 "}),o.createElement("path",{className:e.indeterminatePath,d:"M22,0H2C0.9,0,0,0.9,0,2v20c0,1.1,0.9,2,2,2h20c1.1,0,2-0.9,2-2V2C24,0.9,23.1,0,22,0z M21,18L6,3h15V18z M3,6l15,15H3V6z"})),o.createElement("span",{className:"check"})),"hidden"===this.question.titleLocation&&o.createElement("span",{className:this.question.getLabelCss(!1)},this.renderLocString(this.question.locDisplayLabel))))},t}(Ve);ee.Instance.registerQuestion("sv-boolean-checkbox",(function(e){return o.createElement(ze,e)})),s.RendererFactory.Instance.registerRenderer("boolean","checkbox","sv-boolean-checkbox");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)}}(),Je=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:n.question.value},n}return Ke(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return o.createElement("div",null)},t}(f);ee.Instance.registerQuestion("empty",(function(e){return o.createElement(Je,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)}}(),Ge=function(e){function t(t){return e.call(this,t)||this}return Ze(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.render=function(){var e=this.model;return i.a.createElement("tr",{className:e.className,"data-sv-drop-target-matrix-row":e.row&&e.row.id},this.props.children)},t}(h);a.Instance.registerElement("sv-matrix-row",(function(e){return i.a.createElement(Ge,e)}));var Xe=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 Xe(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.onPointerDownHandler=function(e){this.question.startDragMatrixRow(e.nativeEvent,this.row)},t.prototype.renderElement=function(){var e=this;return i.a.createElement("span",{className:this.question.cssClasses.iconDrag,onPointerDown:function(t){return e.onPointerDownHandler(t)}})},t}(d);a.Instance.registerElement("sv-matrix-drag-drop-icon",(function(e){return i.a.createElement(Ye,e)}));var $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)}}(),et=function(e){function t(t){var n=e.call(this,t)||this;return n.state=n.getState(),n}return $e(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.updateStateOnCallback()}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question.visibleRowsChangedCallback=void 0,this.question.onRenderedTableResetCallback=void 0},t.prototype.renderElement=function(){return this.renderTableDiv()},t.prototype.renderTableDiv=function(){var e=this,t=this.renderHeader(),n=this.renderFooter(),r=this.renderRows(),i=this.question.horizontalScroll?{overflowX:"scroll"}:{};return o.createElement("div",{style:i,ref:function(t){return e.control=t}},o.createElement("table",{className:this.question.cssClasses.root},t,r,n))},t.prototype.renderHeader=function(){var e=this.question.renderedTable;if(!e.showHeader)return null;for(var t=[],n=e.headerRow.cells,r=0;r<n.length;r++){var i=n[r],s="column"+r,a={};i.width&&(a.width=i.width),i.minWidth&&(a.minWidth=i.minWidth);var u=this.renderCellContent(i,"column-header",{});t.push(o.createElement("th",{className:i.className,key:s,style:a},u))}return o.createElement("thead",null,o.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);return o.createElement("tfoot",null,t)},t.prototype.renderRows=function(){for(var e=this.question.cssClasses,t=[],n=this.question.renderedTable.rows,r=0;r<n.length;r++)t.push(this.renderRow(n[r].id,n[r],e));return o.createElement("tbody",null,t)},t.prototype.renderRow=function(e,t,n){for(var r=[],i=t.cells,s=0;s<i.length;s++)r.push(this.renderCell(i[s],s,n));var a="row"+e;return o.createElement(o.Fragment,{key:a},o.createElement(Ge,{model:t},r))},t.prototype.renderCell=function(e,t,n){var r="cell"+t;if(e.hasQuestion)return o.createElement(nt,{key:r,itemCss:e.className,cssClasses:n,cell:e,creator:this.creator});var i=e.hasTitle?"row-header":"",s=this.renderCellContent(e,i,n),a=null;return(e.width||e.minWidth)&&(a={},e.width&&(a.width=e.width),e.minWidth&&(a.minWidth=e.minWidth)),o.createElement("td",{className:e.className,key:r,style:a,colSpan:e.colSpans},s)},t.prototype.renderCellContent=function(e,t,n){var r=null,i=null,s=null,a=null;if((e.width||e.minWidth)&&(a={},e.width&&(a.width=e.width),e.minWidth&&(a.minWidth=e.minWidth)),e.hasTitle&&(t="row-header",r=this.renderLocString(e.locTitle),e.requiredText&&(i=o.createElement("span",null," "),s=o.createElement("span",null,e.requiredText))),e.isDragHandlerCell&&(r=o.createElement(o.Fragment,null,o.createElement(Ye,{item:{data:{row:e.row,question:this.question}}}))),e.isActionsCell&&(r=o.createElement(tt,{model:e.item.getData()})),e.hasPanel&&(r=o.createElement(ye,{key:e.panel.id,element:e.panel,survey:this.question.survey,cssClasses:n,isDisplayMode:this.isDisplayMode,creator:this.creator})),!r)return null;var u=o.createElement(o.Fragment,null,r,i,s);return this.wrapCell(e,u,t)},t}(f),tt=function(e){function t(t){return e.call(this,t)||this}return $e(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return o.createElement(D,{model:this.model,handleClick:!1})},t}(d),nt=function(e){function t(t){return e.call(this,t)||this}return $e(t,e),Object.defineProperty(t.prototype,"cell",{get:function(){return this.props.cell},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)}},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.isCheckbox?this.renderCellCheckboxButton():this.renderCellRadiogroupButton():pe.renderQuestionBody(this.creator,this.question)},t.prototype.renderCellCheckboxButton=function(){var e=this.cell.question.id+"item"+this.cell.choiceIndex;return o.createElement(Ee,{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 o.createElement(We,{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}(fe),rt=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)}}(),ot=function(e){function t(t){return e.call(this,t)||this}return rt(t,e),t}(et);ee.Instance.registerQuestion("matrixdropdown",(function(e){return o.createElement(ot,e)}));var it=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){var n=e.call(this,t)||this;return n.handleOnRowAddClick=n.handleOnRowAddClick.bind(n),n}return it(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 o.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=o.createElement("div",{className:e.emptyRowsText},t),r=this.renderAddRowButton(e,!0);return o.createElement("div",{className:e.emptyRowsSection},n,r)},t.prototype.renderAddRowButton=function(e,t){void 0===t&&(t=!1);var n=this.renderLocString(this.matrix.locAddRowText),r=o.createElement("button",{className:this.question.getAddRowButtonCss(t),type:"button",disabled:this.question.isInputReadOnly,onClick:this.question.isDesignMode?void 0:this.handleOnRowAddClick},n,o.createElement("span",{className:e.iconAdd}));return t?r:o.createElement("div",{className:e.footer},r)},t}(et);ee.Instance.registerQuestion("matrixdynamic",(function(e){return o.createElement(st,e)}));var at=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)}}(),ut=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnPanelAddClick=n.handleOnPanelAddClick.bind(n),n.handleOnPanelPrevClick=n.handleOnPanelPrevClick.bind(n),n.handleOnPanelNextClick=n.handleOnPanelNextClick.bind(n),n.handleOnRangeChange=n.handleOnRangeChange.bind(n),n}return at(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=null,this.question.currentIndexChangedCallback=null,this.question.renderModeChangedCallback=null},t.prototype.updateQuestionRendering=function(){this.setState({panelCounter:this.state?this.state.panelCounter+1:1})},t.prototype.handleOnPanelAddClick=function(e){this.question.addPanelUI()},t.prototype.handleOnPanelPrevClick=function(e){this.question.goToPrevPanel()},t.prototype.handleOnPanelNextClick=function(e){this.question.goToNextPanel()},t.prototype.handleOnRangeChange=function(e){this.question.currentIndex=e.target.value},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(o.createElement(lt,{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(o.createElement(lt,{key:this.question.currentIndex,element:n,question:this.question,index:this.question.currentIndex,cssClasses:this.question.cssClasses,isDisplayMode:this.isDisplayMode,creator:this.creator}))}var r=this.question.isRenderModeList?this.renderAddRowButton():null,i=this.question.isProgressTopShowing?this.renderNavigator():null,s=this.question.isProgressBottomShowing?this.renderNavigator():null,a={};this.question.horizontalScroll&&(a.overflowX="scroll");var u=this.renderNavigatorV2(),l=this.renderPlaceholder();return o.createElement("div",{className:this.question.cssClasses.root},l,i,o.createElement("div",{style:a},e),s,r,u)},t.prototype.renderNavigator=function(){var e=this.question.isRangeShowing?this.renderRange():null,t=this.rendrerPrevButton(),n=this.rendrerNextButton(),r=this.renderAddRowButton(),i=this.question.isProgressTopShowing?this.question.cssClasses.progressTop:this.question.cssClasses.progressBottom;return o.createElement("div",{style:{clear:"both"},className:i},o.createElement("div",{className:this.question.cssClasses.progressContainer},t,e,n),r,this.renderProgressText())},t.prototype.renderProgressText=function(){return o.createElement("div",{className:this.question.cssClasses.progressText},this.question.progressText)},t.prototype.rendrerPrevButton=function(){return o.createElement("div",{title:this.question.panelPrevText,onClick:this.handleOnPanelPrevClick},o.createElement(E,{className:this.question.getPrevButtonCss(),iconName:this.question.cssClasses.progressBtnIcon,size:"auto"}))},t.prototype.rendrerNextButton=function(){return o.createElement("div",{title:this.question.panelNextText,onClick:this.handleOnPanelNextClick},o.createElement(E,{className:this.question.getNextButtonCss(),iconName:this.question.cssClasses.progressBtnIcon,size:"auto"}))},t.prototype.renderRange=function(){var e,t=this;return o.createElement("div",{className:this.question.cssClasses.progress},o.createElement("div",{className:this.question.cssClasses.progressBar,style:{width:(e=t.question.panelCount-1,t.question.currentIndex/e*100+"%")},role:"progressbar"}))},t.prototype.renderAddRowButton=function(){return this.question.canAddPanel?o.createElement("button",{type:"button",className:this.question.getAddButtonCss(),onClick:this.handleOnPanelAddClick},o.createElement("span",{className:this.question.cssClasses.buttonAddText}," ",this.question.panelAddText," "),o.createElement("span",null)):null},t.prototype.renderNavigatorV2=function(){if(0===this.question.panelCount)return null;var e=this.question.isRangeShowing&&!this.question.isProgressTopShowing?this.renderRange():null,t=this.renderAddRowButton(),n=this.rendrerPrevButton(),r=this.rendrerNextButton(),i=this.renderProgressText();return this.question.cssClasses.footer?o.createElement("div",{className:this.question.cssClasses.footer},e,o.createElement("hr",{className:this.question.cssClasses.separator}),o.createElement("div",{className:this.question.cssClasses.footerButtonsContainer},t,this.question.isRenderModeList?null:o.createElement("div",{className:this.question.cssClasses.progressContainer},n,i,r))):null},t.prototype.renderPlaceholder=function(){return this.question.getShowNoEntriesPlaceholder()?o.createElement("div",{className:this.question.cssClasses.noEntriesPlaceholder},o.createElement("span",null,this.renderLocString(this.question.locNoEntriesText)),this.renderAddRowButton()):null},t}(f),lt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnPanelRemoveClick=n.handleOnPanelRemoveClick.bind(n),n}return at(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.handleOnPanelRemoveClick=function(e){this.question.removePanelUI(this.index)},t.prototype.render=function(){var t=e.prototype.render.call(this),n=this.renderButton(),r=this.question.isRenderModeList&&this.index<this.question.panelCount-1?o.createElement("hr",{className:this.question.cssClasses.separator}):null;return o.createElement(o.Fragment,null,o.createElement("div",{className:this.question.getPanelWrapperCss()},t,n),r)},t.prototype.renderButton=function(){return!this.question.canRemovePanel||this.question.isRenderModeList&&this.panel.isCollapsed?null:o.createElement("button",{className:this.question.getPanelRemoveButtonCss(),onClick:this.handleOnPanelRemoveClick,type:"button"},o.createElement("span",{className:this.question.cssClasses.buttonRemoveText}," ",this.question.panelRemoveText),o.createElement("span",{className:this.question.cssClasses.iconRemove}))},t}(ye);ee.Instance.registerQuestion("paneldynamic",(function(e){return o.createElement(ut,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)}}(),pt=function(e){function t(t){return e.call(this,t)||this}return ct(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=this.isTop?{}:{marginTop:"1em"},t={width:this.progress+"%"};return o.createElement("div",{className:this.css.progress,style:e},o.createElement("div",{style:t,className:this.css.progressBar,role:"progressbar","aria-valuemin":0,"aria-valuemax":100},o.createElement("span",{className:s.SurveyProgressModel.getProgressTextInBarCss(this.css)},this.progressText)),o.createElement("span",{className:s.SurveyProgressModel.getProgressTextUnderBarCss(this.css)},this.progressText))},t}(X);a.Instance.registerElement("sv-progress-pages",(function(e){return o.createElement(pt,e)})),a.Instance.registerElement("sv-progress-questions",(function(e){return o.createElement(pt,e)})),a.Instance.registerElement("sv-progress-correctQuestions",(function(e){return o.createElement(pt,e)})),a.Instance.registerElement("sv-progress-requiredQuestions",(function(e){return o.createElement(pt,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){var n=e.call(this,t)||this;return n.updateScroller=void 0,n.progressButtonsModel=new s.SurveyProgressButtonsModel(n.survey),n.listContainerRef=o.createRef(),n}return ht(t,e),t.prototype.render=function(){var e=this;return o.createElement("div",{className:this.css.progressButtonsContainerCenter},o.createElement("div",{className:this.css.progressButtonsContainer},o.createElement("div",{className:this.getScrollButtonCss(!0),role:"button",onClick:function(){return e.clickScrollButton(e.listContainerRef.current,!0)}}),o.createElement("div",{className:this.css.progressButtonsListContainer,ref:this.listContainerRef},o.createElement("ul",{className:this.css.progressButtonsList},this.getListElements())),o.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 o.createElement("li",{key:"listelement"+t,className:this.getListElementCss(t),onClick:this.isListElementClickable(t)?function(){return n.clickListElement(t)}:void 0},o.createElement("div",{className:this.css.progressButtonsPageTitle,title:e.navigationTitle||e.name},e.navigationTitle||e.name),o.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.scrollLeft+=70*(t?-1:1)},t.prototype.componentDidMount=function(){var e=this;this.updateScroller=setInterval((function(){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}(X);a.Instance.registerElement("sv-progress-buttons",(function(e){return o.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(t){var n=e.call(this,t)||this;return n.handleOnClick=n.handleOnClick.bind(n),n}return ft(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.renderElement=function(){var e=this,t=this.question.cssClasses,n=this.question.minRateDescription?this.renderLocString(this.question.locMinRateDescription):null,r=this.question.maxRateDescription?this.renderLocString(this.question.locMaxRateDescription):null,i=this.question.hasOther?this.renderOther(t):null;return o.createElement("div",{className:t.root,ref:function(t){return e.control=t}},o.createElement("fieldset",{role:"radiogroup"},o.createElement("legend",{role:"presentation",className:"sv-hidden"}),this.question.hasMinLabel?o.createElement("span",{className:t.minText},n):null,this.question.renderedRateItems.map((function(n,r){return e.renderItem("value"+r,n,r,t)})),this.question.hasMaxLabel?o.createElement("span",{className:t.maxText},r):null),i)},t.prototype.renderItem=function(e,t,n,r){var i=this.renderLocString(t.locText);return o.createElement("label",{key:e,className:this.question.getItemClass(t.itemValue)},o.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.name,id:this.question.inputId+"_"+n,value:t.value,disabled:this.isDisplayMode,checked:this.question.value==t.value,onClick:this.handleOnClick,onChange:function(){},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),o.createElement("span",{className:r.itemText},i))},t.prototype.renderOther=function(e){return o.createElement("div",{className:e.other},o.createElement(ae,{question:this.question,cssClasses:e,isDisplayMode:this.isDisplayMode}))},t}(f);ee.Instance.registerQuestion("rating",(function(e){return o.createElement(mt,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)}}(),vt=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.cssClasses;return o.createElement("div",{id:this.question.inputId,className:t.root,ref:function(t){return e.control=t}},this.question.formatedValue)},t}(f);ee.Instance.registerQuestion("expression",(function(e){return o.createElement(vt,e)}));var gt=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.handleOnExpanded=n.handleOnExpanded.bind(n),n}return gt(t,e),t.prototype.getStateElements=function(){return[this.window,this.window.survey]},t.prototype.handleOnExpanded=function(e){this.window.isExpanded=!this.window.isExpanded},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&this.window.isShowing},t.prototype.renderElement=function(){var e=this.renderWindowHeader(),t=this.window.isExpanded?this.renderBody():null;return o.createElement("div",{className:this.css.window.root,style:{position:"fixed",bottom:3,right:10,maxWidth:"60%"}},e,t)},t.prototype.renderWindowHeader=function(){var e={paddingRight:"10px"},t=this.window.isExpanded?this.css.window.header.buttonCollapsed:this.css.window.header.buttonExpanded;t="glyphicon pull-right "+t;var n=h.renderLocString(this.survey.locTitle);return o.createElement("div",{className:this.css.window.header.root},o.createElement("span",{onClick:this.handleOnExpanded,style:{width:"100%",cursor:"pointer"}},o.createElement("span",{className:this.css.window.header.title,style:e},n),o.createElement("span",{className:t,"aria-hidden":"true"})),this.window.isExpanded?o.createElement("span",{onClick:this.handleOnExpanded,style:{float:"right",cursor:"pointer"}},o.createElement("span",{className:this.css.window.header.title,style:e},"X")):null)},t.prototype.renderBody=function(){return o.createElement("div",{className:this.css.window.body},this.doRender())},t.prototype.createSurvey=function(t){t||(t={}),e.prototype.createSurvey.call(this,t),this.window=new c(null,this.survey),t.closeOnCompleteTimeout&&(this.window.closeOnCompleteTimeout=t.closeOnCompleteTimeout),this.window.isShowing=!0,this.window.isExpanded||!t.expanded&&!t.isExpanded||this.window.expand();var n=this;this.window.closeWindowOnCompleteCallback=function(){n.window.hide()}},t}(re),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(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n}return Ct(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},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.question.cssClasses;return o.createElement("fieldset",{className:e.root},o.createElement("legend",{role:"radio","aria-label":this.question.locTitle.renderedHtml}),this.getItems(e))},t.prototype.getItems=function(e){for(var t=[],n=0;n<this.question.visibleChoices.length;n++){var r=this.question.visibleChoices[n],o=this.question.name+"-"+r.value;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 r=this.question.isItemSelected(t),i=this.question.getItemClass(t),s=null;this.question.showLabel&&(s=o.createElement("span",{title:t.locText.renderedHtml,className:this.question.cssClasses.itemText},t.text?h.renderLocString(t.locText):t.value));var a={objectFit:this.question.imageFit},u=null;"image"===this.question.contentMode&&(u=o.createElement("img",{className:n.image,src:t.imageLink,width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,alt:t.locText.renderedHtml,style:a})),"video"===this.question.contentMode&&(u=o.createElement("video",{controls:!0,className:n.image,src:t.imageLink,width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,style:a}));var l=o.createElement("div",{key:e,className:i},o.createElement("label",{className:n.label},o.createElement("input",{style:{display:"none"},className:n.itemControl,id:this.question.getItemId(t),type:this.question.inputType,name:this.question.questionName,checked:r,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}),o.createElement("div",{className:this.question.cssClasses.itemDecorator},o.createElement("div",{className:this.question.cssClasses.imageContainer},u),s))),c=this.question.survey,p=null;return c&&(p=c.wrapItemValue(l,this.question,t)),null!=p?p:l},t}(f);ee.Instance.registerQuestion("imagepicker",(function(e){return o.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),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.canRender=function(){return e.prototype.canRender.call(this)&&!!this.question.imageLink},t.prototype.renderElement=function(){var e=this.question.cssClasses,t={objectFit:this.question.imageFit},n=null;return"image"===this.question.contentMode&&(n=o.createElement("img",{className:e.image,src:this.question.locImageLink.renderedHtml,alt:this.question.text||this.question.title,width:this.question.imageWidth?this.question.imageWidth+"px":void 0,height:this.question.imageHeight?this.question.imageHeight+"px":void 0,style:t})),"video"===this.question.contentMode&&(n=o.createElement("video",{controls:!0,className:e.image,src:this.question.imageLink,width:this.question.imageWidth?this.question.imageWidth+"px":void 0,height:this.question.imageHeight?this.question.imageHeight+"px":void 0,style:t})),o.createElement("div",{className:this.question.cssClasses.root},n)},t}(f);ee.Instance.registerQuestion("image",(function(e){return o.createElement(wt,e)}));var 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)}}(),_t=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:n.question.value},n}return Ot(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 o.createElement("div",{className:t.root,ref:function(t){return e.control=t},style:{height:this.question.height,width:this.question.width}},o.createElement("div",{className:t.placeholder,style:{display:this.question.needShowPlaceholder()?"":"none"}},this.question.placeHolderText),o.createElement("div",null,o.createElement("canvas",{tabIndex:0})),o.createElement("div",{className:t.controls},o.createElement("button",{type:"button",className:t.clearButton,title:this.question.clearButtonCaption},this.question.cssClasses.clearButtonIconId?o.createElement(E,{iconName:this.question.cssClasses.clearButtonIconId,size:"auto"}):o.createElement("span",null,"✖"))))},t}(f);ee.Instance.registerQuestion("signaturepad",(function(e){return o.createElement(_t,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)}}(),Pt=function(e){function t(t){return e.call(this,t)||this}return St(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.render=function(){var e=this.renderItems();return i.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 i.a.createElement(Nt,{key:e.question.inputId+"_"+n,item:t,question:e.question,index:n})}))},t}(f),Nt=function(e){function t(t){var n=e.call(this,t)||this;return n.model=new s.ButtonGroupItemModel(n.question,n.item,n.index),n}return St(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.render=function(){var e=this.renderIcon(),t=this.renderInput(),n=this.renderCaption();return i.a.createElement("label",{className:this.model.css.label,title:this.model.caption.renderedHtml},t,i.a.createElement("div",{className:this.model.css.decorator},e,n))},t.prototype.renderIcon=function(){return this.model.iconName?i.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 i.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 i.a.createElement("span",{className:this.model.css.caption,title:this.model.caption.renderedHtml},e)},t}(h),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)}}(),Rt=function(e){function t(t){return e.call(this,t)||this}return xt(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 pe.renderQuestionBody(this.creator,this.question.contentQuestion)},t}(m),It=function(e){function t(t){return e.call(this,t)||this}return xt(t,e),t.prototype.canRender=function(){return!!this.question.contentPanel},t.prototype.renderElement=function(){return o.createElement(ye,{element:this.question.contentPanel,creator:this.creator,survey:this.question.survey})},t}(m);ee.Instance.registerQuestion("custom",(function(e){return o.createElement(Rt,e)})),ee.Instance.registerQuestion("composite",(function(e){return o.createElement(It,e)}));var jt=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(){var t=null!==e&&e.apply(this,arguments)||this;return t.isNeedFocus=!1,t}return jt(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=this,t=null;if(this.element.isCollapsed||this.element.isExpanded){var n=s.DefaultTitleModel.getIconCss(this.cssClasses,this.element.isCollapsed),r=this.element.isExpanded,o=this.element.isExpanded?this.element.contentId:null;t=i.a.createElement("span",{className:n,tabIndex:0,onKeyUp:function(t){var n;13===t.keyCode&&(((n=e.element).isExpanded||n.isCollapsed)&&(n.toggleState(),e.isNeedFocus=n.isCollapsed))},"aria-expanded":r,"aria-controls":o})}return i.a.createElement(i.a.Fragment,null,i.a.createElement(M,{element:this.element,cssClasses:this.cssClasses}),t)},t.prototype.componentDidMount=function(){this.doAfterRender()},t.prototype.doAfterRender=function(){this.isNeedFocus&&(this.element.clickTitleFunction(),this.isNeedFocus=!1)},t}(i.a.Component);a.Instance.registerElement("sv-default-title",(function(e){return i.a.createElement(Tt,e)}));var 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)}}(),Dt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleKeydown=function(e){t.model.onKeyDown(e)},t}return kt(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={paddingLeft:this.model.getItemIndent(this.item),display:void 0===this.item.visible||this.item.visible?null:"none"},n=this.model.getItemClass(this.item),r=[];if(this.item.component)r.push(a.Instance.createElement(this.item.component,{item:this.item}));else{var o=this.item.iconName?i.a.createElement(E,{key:1,className:"sv-list__item-icon",iconName:this.item.iconName,size:24}):null;r.push(o),r.push(i.a.createElement("span",{key:2},this.item.title))}return oe(i.a.createElement("li",{style:t,className:n,onClick:function(){e.model.selectItem(e.item)},onPointerDown:function(t){return e.model.onPointerDown(t,e.item)}},r))},t}(h);a.Instance.registerElement("sv-list-item",(function(e){return i.a.createElement(Dt,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.handleKeydown=function(e){n.model.onKeyDown(e)},n.state={filteredText:n.model.filteredText||""},n}return Bt(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(){var e=this.renderItems();return i.a.createElement("div",{className:"sv-list__container"},this.searchElementContent(),i.a.createElement("ul",{className:"sv-list",onMouseDown:function(e){e.preventDefault()},onKeyDown:this.handleKeydown},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 i.a.createElement(Dt,{model:e.model,item:t,key:"item"+n})})):null},t.prototype.searchElementContent=function(){var e=this;if(this.model.needFilter){return i.a.createElement("div",{className:"sv-list__filter"},i.a.createElement(E,{className:"sv-list__filter-icon",iconName:"icon-search",size:"auto"}),i.a.createElement("input",{type:"text",className:"sv-list__input",placeholder:this.model.filteredTextPlaceholder,value:this.state.filteredText,onChange:function(t){t.target===document.activeElement&&(e.model.filteredText=t.target.value)}}))}return null},t}(h);a.Instance.registerElement("sv-list",(function(e){return i.a.createElement(Mt,e)}));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)}}(),At=function(e){function t(t){return e.call(this,t)||this}return Lt(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(i.a.createElement("div",{key:"logo-image",className:this.survey.logoClassNames},i.a.createElement("img",{className:this.survey.css.logoImage,src:this.survey.locLogo.renderedHtml,alt:this.survey.locTitle.renderedHtml,width:this.survey.logoWidth?this.survey.logoWidth:void 0,height:this.survey.logoHeight?this.survey.logoHeight:void 0,style:{objectFit:this.survey.logoFit}}))),i.a.createElement(i.a.Fragment,null,e)},t}(i.a.Component);a.Instance.registerElement("sv-logo-image",(function(e){return i.a.createElement(At,e)}));var Wt=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)}}(),Ht=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnRowRemoveClick=n.handleOnRowRemoveClick.bind(n),n}return Wt(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 i.a.createElement("button",{className:this.question.getRemoveRowButtonCss(),type:"button",onClick:this.handleOnRowRemoveClick,disabled:this.question.isInputReadOnly},e,i.a.createElement("span",{className:this.question.cssClasses.iconRemove}))},t}(d);a.Instance.registerElement("sv-matrix-remove-button",(function(e){return i.a.createElement(Ht,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)}}(),Qt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnShowHideClick=n.handleOnShowHideClick.bind(n),n}return Ft(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:null;return i.a.createElement("button",{type:"button",onClick:this.handleOnShowHideClick,className:this.question.getDetailPanelButtonCss(this.row),"aria-expanded":t,"aria-controls":n},i.a.createElement(E,{className:this.question.getDetailPanelIconCss(this.row),iconName:this.question.getDetailPanelIconId(this.row),size:"auto"}))},t}(d);a.Instance.registerElement("sv-matrix-detail-button",(function(e){return i.a.createElement(Qt,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)}}(),Ut=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vt(t,e),t.prototype.render=function(){return i.a.createElement("div",{className:"sv-skeleton-element"})},t}(i.a.Component);a.Instance.registerElement("sv-skeleton",(function(e){return i.a.createElement(Ut,e)}));var zt=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.onInput=function(e){n.locStr.text=e.target.innerText},n.onClick=function(e){e.preventDefault(),e.stopPropagation()},n.state={changed:0},n}return zt(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 i.a.createElement("span",{className:"sv-string-editor",contentEditable:"true",suppressContentEditableWarning:!0,style:this.style,dangerouslySetInnerHTML:e,onBlur:this.onInput,onClick:this.onClick})}return i.a.createElement("span",{className:"sv-string-editor",contentEditable:"true",suppressContentEditableWarning:!0,style:this.style,onBlur:this.onInput,onClick:this.onClick},this.locStr.renderedHtml)},t}(i.a.Component);a.Instance.registerElement(s.LocalizableString.editableRenderer,(function(e){return i.a.createElement(Kt,e)}));var Jt=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(){function e(e,t,n,r){var o=this;void 0===r&&(r=48),this.container=e,this.model=t,this.itemsSelector=n,this.dotsItemSize=r,this.resizeObserver=void 0,this.isInitialized=!1,this.minDimensionConst=56,this.separatorSize=17,this.separatorAddConst=1,this.paddingSizeConst=8,this.recalcMinDimensionConst=!0,this.getComputedStyle=window.getComputedStyle.bind(window),this.model.updateCallback=function(e){e?o.isInitialized=!1:o.process()},"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((function(e){return o.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.calcItemsSizes=function(){var e=this,t=this.model.actions;this.container.querySelectorAll(this.itemsSelector).forEach((function(n,r){var o=t[r];o.maxDimension=e.calcItemSize(n),o.minDimension=e.calcMinDimension(o)}))},Object.defineProperty(e.prototype,"isContainerVisible",{get:function(){return!!(this.container.offsetWidth||this.container.offsetHeight||this.container.getClientRects().length)},enumerable:!1,configurable:!0}),e.prototype.process=function(){this.isContainerVisible&&(this.isInitialized||(this.model.actions.forEach((function(e){return e.mode="large"})),this.calcItemsSizes(),this.isInitialized=!0),this.model.fit(this.getAvailableSpace(),this.dotsItemSize))},e.prototype.dispose=function(){this.model.updateCallback=void 0,this.resizeObserver&&this.resizeObserver.disconnect()},e}(),Gt=function(e){function t(t,n,r,o){var i=e.call(this,t,n,r,o)||this;return i.minDimensionConst=40,i.recalcMinDimensionConst=!1,i}return Jt(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}(Zt)}])}));
|
|
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 oe})),n.d(t,"attachKey2click",(function(){return ie})),n.d(t,"Model",(function(){return l})),n.d(t,"WindowModel",(function(){return p})),n.d(t,"SurveyNavigationBase",(function(){return Y})),n.d(t,"SurveyTimerPanel",(function(){return G})),n.d(t,"SurveyNavigation",(function(){return ee})),n.d(t,"SurveyPage",(function(){return V})),n.d(t,"SurveyRow",(function(){return g})),n.d(t,"SurveyPanel",(function(){return ve})),n.d(t,"SurveyFlowPanel",(function(){return be})),n.d(t,"SurveyQuestion",(function(){return he})),n.d(t,"SurveyElementErrors",(function(){return de})),n.d(t,"SurveyQuestionAndErrorsCell",(function(){return me})),n.d(t,"SurveyElementBase",(function(){return d})),n.d(t,"SurveyQuestionElementBase",(function(){return m})),n.d(t,"SurveyQuestionCommentItem",(function(){return ue})),n.d(t,"SurveyQuestionComment",(function(){return ae})),n.d(t,"SurveyQuestionCheckbox",(function(){return Ee})),n.d(t,"SurveyQuestionCheckboxItem",(function(){return qe})),n.d(t,"SurveyQuestionRanking",(function(){return Oe})),n.d(t,"SurveyQuestionRankingItem",(function(){return _e})),n.d(t,"SurveyQuestionDropdown",(function(){return Pe})),n.d(t,"SurveyQuestionMatrix",(function(){return Re})),n.d(t,"SurveyQuestionMatrixRow",(function(){return Ie})),n.d(t,"SurveyQuestionHtml",(function(){return Te})),n.d(t,"SurveyQuestionFile",(function(){return De})),n.d(t,"SurveyQuestionMultipleText",(function(){return Me})),n.d(t,"SurveyQuestionRadiogroup",(function(){return We})),n.d(t,"SurveyQuestionText",(function(){return Qe})),n.d(t,"SurveyQuestionBoolean",(function(){return Ue})),n.d(t,"SurveyQuestionBooleanCheckbox",(function(){return Ke})),n.d(t,"SurveyQuestionEmpty",(function(){return Ze})),n.d(t,"SurveyQuestionMatrixDropdownCell",(function(){return rt})),n.d(t,"SurveyQuestionMatrixDropdown",(function(){return it})),n.d(t,"SurveyQuestionMatrixDynamic",(function(){return at})),n.d(t,"SurveyQuestionPanelDynamic",(function(){return lt})),n.d(t,"SurveyProgress",(function(){return ht})),n.d(t,"SurveyProgressButtons",(function(){return ft})),n.d(t,"SurveyQuestionRating",(function(){return yt})),n.d(t,"SurveyQuestionExpression",(function(){return gt})),n.d(t,"SurveyWindow",(function(){return Ct})),n.d(t,"ReactQuestionFactory",(function(){return te})),n.d(t,"ReactElementFactory",(function(){return a})),n.d(t,"SurveyQuestionImagePicker",(function(){return qt})),n.d(t,"SurveyQuestionImage",(function(){return Ot})),n.d(t,"SurveyQuestionSignaturePad",(function(){return St})),n.d(t,"SurveyQuestionButtonGroup",(function(){return Nt})),n.d(t,"SurveyQuestionCustom",(function(){return It})),n.d(t,"SurveyQuestionComposite",(function(){return jt})),n.d(t,"DefaultTitle",(function(){return kt})),n.d(t,"Popup",(function(){return I})),n.d(t,"List",(function(){return Lt})),n.d(t,"TitleActions",(function(){return W})),n.d(t,"TitleElement",(function(){return F})),n.d(t,"SurveyActionBar",(function(){return B})),n.d(t,"LogoImage",(function(){return Wt})),n.d(t,"SurveyHeader",(function(){return J})),n.d(t,"SvgIcon",(function(){return q})),n.d(t,"SurveyQuestionMatrixDynamicRemoveButton",(function(){return Ft})),n.d(t,"SurveyQuestionMatrixDetailButton",(function(){return Vt})),n.d(t,"SurveyQuestionMatrixDynamicDragDropIcon",(function(){return $e})),n.d(t,"MatrixRow",(function(){return Xe})),n.d(t,"Skeleton",(function(){return zt})),n.d(t,"SurveyLocStringViewer",(function(){return z})),n.d(t,"SurveyLocStringEditor",(function(){return Jt})),n.d(t,"ResponsivityManager",(function(){return Gt})),n.d(t,"VerticalResponsivityManager",(function(){return Xt})),n.d(t,"unwrap",(function(){return ne}));var r,o=n(0),i=n.n(o),s=n(1),a=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}(),u=(r=function(e,t){return(r=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}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(e){function t(t){return void 0===t&&(t=null),e.call(this,t)||this}return u(t,e),t.prototype.render=function(){this.renderCallback&&this.renderCallback()},t.prototype.mergeCss=function(e,t){this.mergeValues(e,t)},t.prototype.doAfterRenderSurvey=function(e){this.afterRenderSurvey(e)},t.prototype.onLoadSurveyFromService=function(){this.currentPage&&(this.currentPage.setWasShown(!1),this.currentPage.onFirstRendering()),this.render()},t.prototype.onLoadingSurveyFromService=function(){this.render()},t.prototype.setCompletedState=function(t,n){e.prototype.setCompletedState.call(this,t,n),this.render()},t.prototype.start=function(){var t=e.prototype.start.call(this);return this.render(),t},t.prototype.wrapRow=function(e,t){return new c(this).wrapRow(e,t)},t.prototype.wrapElement=function(e,t){return new c(this).wrapElement(e,t)},t.prototype.wrapItemValue=function(e,t,n){return new c(this).wrapItemValue(e,t,n)},t.prototype.wrapMatrixCell=function(e,t,n){return void 0===n&&(n="cell"),new c(this).wrapMatrixCell(e,t,n)},t}(s.SurveyModel),c=function(){function e(e){this.survey=e}return e.prototype.wrapRow=function(e,t){var n=this.survey.getRowWrapperComponentName(t),r=this.survey.getRowWrapperComponentData(t);return a.Instance.createElement(n,{element:e,row:t,componentData:r})},e.prototype.wrapElement=function(e,t){var n=this.survey.getElementWrapperComponentName(t),r=this.survey.getElementWrapperComponentData(t);return a.Instance.createElement(n,{element:e,question:t,componentData:r})},e.prototype.wrapItemValue=function(e,t,n){var r=this.survey.getItemValueWrapperComponentName(n,t),o=this.survey.getItemValueWrapperComponentData(n,t);return a.Instance.createElement(r,{key:e.key,element:e,question:t,item:n,componentData:o})},e.prototype.wrapMatrixCell=function(e,t,n){void 0===n&&(n="cell");var r=this.survey.getElementWrapperComponentName(t,n),o=this.survey.getElementWrapperComponentData(t,n);return a.Instance.createElement(r,{element:e,cell:t,componentData:o})},e}(),p=function(e){function t(t,n){return void 0===t&&(t=null),void 0===n&&(n=null),e.call(this,t,n)||this}return u(t,e),t.prototype.createSurvey=function(e){return new l(e)},Object.defineProperty(t.prototype,"renderCallback",{get:function(){return this.survey.renderCallback},set:function(e){this.survey.renderCallback=e},enumerable:!1,configurable:!0}),t}(s.SurveyWindowModel);s.SurveyModel.platform="react";var h=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){return e.call(this,t)||this}return h(t,e),t.renderLocString=function(e,t,n){return void 0===t&&(t=null),a.Instance.createElement(e.renderAs,{locStr:e.renderAsData,style:t,key:n})},t.prototype.componentDidMount=function(){this.makeBaseElementsReact()},t.prototype.componentWillUnmount=function(){this.unMakeBaseElementsReact()},t.prototype.componentDidUpdate=function(e,t){this.makeBaseElementsReact()},t.prototype.render=function(){if(!this.canRender())return null;this.startEndRendering(1);var e=this.renderElement();return this.startEndRendering(-1),e=this.wrapElement(e),this.changedStatePropNameValue=void 0,e},t.prototype.wrapElement=function(e){return e},Object.defineProperty(t.prototype,"isRendering",{get:function(){var e=this.getStateElement();return!!e&&e.reactRendering>0},enumerable:!1,configurable:!0}),t.prototype.getRenderedElement=function(){return this.getStateElement()},t.prototype.startEndRendering=function(e){var t=this.getRenderedElement();t&&(t.reactRendering||(t.reactRendering=0),t.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){return void 0===n&&(n=null),t.renderLocString(e,n)},t.prototype.makeBaseElementReact=function(e){var t=this;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){e&&(e.setPropertyValueCoreHandler=void 0,e.iteratePropertiesHash((function(e,t){var n=e[t];Array.isArray(n)&&((n=n).onArrayChanged=function(){})})))},t}(o.Component),f=function(e){function t(t){return e.call(this,t)||this}return h(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),t}(d),m=function(e){function t(t){return e.call(this,t)||this}return h(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(){e.prototype.componentWillUnmount.call(this),this.questionBase&&this.questionBase.beforeDestroyQuestionElement(this.control)},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.getRenderedElement=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(){return!(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,o=this.questionBase.survey;return o&&(r=o.wrapMatrixCell(t,e,n)),null!=r?r:t},t}(d),y=function(e){function t(t){var n=e.call(this,t)||this;return n.updateValueOnEvent=function(e){s.Helpers.isTwoValueEquals(n.questionBase.value,e.target.value)||n.setValueCore(e.target.value)},n.updateValueOnEvent=n.updateValueOnEvent.bind(n),n}return h(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();s.Helpers.isTwoValueEquals(n,t.value)||(t.value=this.getValue(n))}e.prototype.updateDomElement.call(this)},t.prototype.getValue=function(e){return s.Helpers.isValueEmpty(e)?"":e},t}(m),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)}}(),g=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=o.createRef(),n.recalculateCss(),n}return v(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,t=this;return e=this.row.visibleElements.map((function(e,n){var r=t.createElement(e,n),i=e.cssClassesValue;return o.createElement("div",{className:i.questionWrapper,style:e.rootStyle,"data-key":r.key,key:r.key,onFocus:e.focusIn},t.row.isNeedRender?r:a.Instance.createElement(e.skeletonComponentName,{element:e,css:t.css}))})),o.createElement("div",{ref:this.rootRef,className:this.row.getRowCss()},e)},t.prototype.renderElement=function(){var e=this.survey,t=this.renderElementContent();return e.wrapRow(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(e,t){return e.row!==this.row&&(e.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 a.Instance.isElementRegistered(r)||(r="question"),a.Instance.createElement(r,{key:e.name+n,element:e,creator:this.creator,survey:this.survey,css:this.css})},t}(d),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)}}(),C=function(e){function t(t){var n=e.call(this,t)||this;return n.renderedRowsCache={},n.rootRef=o.createRef(),n}return b(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.name===this.survey.currentPage.name||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 o.createElement(g,{key:e.id,row:e,survey:this.survey,creator:this.creator,css:t})},t}(d),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)}}(),q=function(e){function t(t){var n=e.call(this,t)||this;return n.svgIconRef=i.a.createRef(),n}return E(t,e),t.prototype.updateSvg=function(){this.props.iconName&&Object(s.createSvg)(this.props.size,this.props.width,this.props.height,this.props.iconName,this.svgIconRef.current)},t.prototype.componentDidUpdate=function(){this.updateSvg()},t.prototype.render=function(){return i.a.createElement("span",{className:this.props.className,onClick:this.props.onClick},this.props.iconName?i.a.createElement("svg",{className:"sv-svg-icon",ref:this.svgIconRef,role:"img"},i.a.createElement("use",null)):null)},t.prototype.componentDidMount=function(){this.updateSvg()},t}(i.a.Component);a.Instance.registerElement("sv-svg-icon",(function(e){return i.a.createElement(q,e)}));var w=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)}}(),O=function(e){function t(t){return e.call(this,t)||this}return w(t,e),t.prototype.render=function(){var e="sv-action-bar-separator ".concat(this.props.cssClasses);return i.a.createElement("div",{className:e})},t}(i.a.Component);a.Instance.registerElement("sv-action-bar-separator",(function(e){return i.a.createElement(O,e)}));var _=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)}}(),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(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?i.a.createElement(O,null):null,n=a.Instance.createElement(this.item.component||"sv-action-bar-item",{item:this.item});return i.a.createElement("span",{className:e,id:this.item.id},i.a.createElement("div",{className:"sv-action__content"},t,n))},t}(d),P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(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 i.a.createElement(i.a.Fragment,null,this.renderInnerButton())},t.prototype.renderText=function(){if(!this.item.hasTitle)return null;var e=this.item.getActionBarItemTitleCss();return i.a.createElement("span",{className:e}," ",this.item.title)},t.prototype.renderButtonContent=function(){var e=this.renderText(),t=this.item.iconName?i.a.createElement(q,{className:this.item.cssClasses.itemIcon,size:this.item.iconSize,iconName:this.item.iconName}):null;return i.a.createElement(i.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(),o=this.item.disableTabStop?-1:void 0;return ie(i.a.createElement("button",{className:t,type:"button",disabled:this.item.disabled,onClick:function(){return e.item.action(e.item)},title:n,tabIndex:o},r),null,{processEsc:!1})},t}(d);a.Instance.registerElement("sv-action-bar-item",(function(e){return i.a.createElement(P,e)}));var N=n(2),x=n.n(N),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)}}(),I=function(e){function t(t){var n=e.call(this,t)||this;return n.containerRef=i.a.createRef(),n.popup=new s.PopupBaseViewModel(n.props.model),n.popup.createPopupContainer(),n}return R(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.popup.mountPopupContainer(),this.popup.targetElement=this.containerRef.current.parentElement},t.prototype.componentWillUnmount=function(){this.popup.destroyPopupContainer()},t.prototype.shouldComponentUpdate=function(e){return e.model!==this.popup.model},t.prototype.render=function(){this.popup.model=this.model;var e=x.a.createPortal(i.a.createElement(j,{model:this.popup}),this.popup.container);return i.a.createElement("div",{ref:this.containerRef},e)},t}(d);a.Instance.registerElement("sv-popup",(function(e){return i.a.createElement(I,e)}));var j=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 R(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(){var e=this,t=this.model.showPointer?this.renderPointer():null,n=this.model.title?this.renderHeader():null,r=this.renderContent(),o=this.model.showFooter?this.renderFooter():null;return i.a.createElement("div",{className:"sv-popup__container",style:{left:this.model.left,top:this.model.top,height:this.model.height},onClick:function(t){e.clickInside(t)}},i.a.createElement("div",{className:"sv-popup_shadow"},t,n,i.a.createElement("div",{className:"sv-popup__scrolling-content"},r),o))},t.prototype.renderPointer=function(){return i.a.createElement("span",{style:{left:this.model.pointerTarget.left,top:this.model.pointerTarget.top},className:"sv-popup__pointer"})},t.prototype.renderHeader=function(){return i.a.createElement("div",{className:"sv-popup__header"},this.model.title)},t.prototype.renderContent=function(){var e=a.Instance.createElement(this.model.contentComponentName,this.model.contentComponentData);return i.a.createElement("div",{className:"sv-popup__content"},e)},t.prototype.renderCancelButton=function(){var e=this;return i.a.createElement("button",{type:"button",className:"sv-popup__footer-item sv-popup__button sv-popup__button--cancel",onClick:function(){e.model.cancel()}},this.model.cancelButtonText)},t.prototype.renderApplyButton=function(){var e=this;return i.a.createElement("button",{type:"button",className:"sv-popup__footer-item sv-popup__button sv-popup__button--apply",onClick:function(){e.model.apply()}},this.model.applyButtonText)},t.prototype.renderFooter=function(){return i.a.createElement("div",{className:"sv-popup__footer"},this.renderCancelButton(),this.model.isModal?this.renderApplyButton():null)},t.prototype.render=function(){var e=this,t=this.renderContainer(),n=(new s.CssClassBuilder).append("sv-popup").append(this.model.styleClass).toString(),r={display:this.model.isVisible?"":"none"};return i.a.createElement("div",{tabIndex:-1,className:n,style:r,onClick:function(t){e.model.clickOutside(),t.stopPropagation()},onKeyDown:this.handleKeydown},t)},t}(d);s.settings.showModal=function(e,t,n,r,o,a,u){void 0===u&&(u="popup");var l=Object(s.createPopupModalViewModel)(e,t,n,r,(function(){x.a.unmountComponentAtNode(l.container),l.destroyPopupContainer()}),void 0,o,a,u);x.a.render(i.a.createElement(j,{model:l}),l.container),l.model.isVisible=!0};var T=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(){return null!==e&&e.apply(this,arguments)||this}return T(t,e),t.prototype.renderButtonContent=function(){var t=e.prototype.renderButtonContent.call(this);return i.a.createElement(i.a.Fragment,null,t,i.a.createElement(I,{model:this.item.popupModel}))},t}(P);a.Instance.registerElement("sv-action-bar-item-dropdown",(function(e){return i.a.createElement(k,e)}));var D=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.rootRef=i.a.createRef(),n}return D(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;this.model.initResponsivityManager(t)}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),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 i.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 i.a.createElement(S,{item:e,key:"item"+t})}))},t}(d);a.Instance.registerElement("sv-action-bar",(function(e){return i.a.createElement(B,e)}));var 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)}}(),L=function(e){function t(t){return e.call(this,t)||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=this.element.getTitleOwner();if(!e)return d.renderLocString(this.element.locTitle);var t=this.renderTitleSpans(e,this.cssClasses);return i.a.createElement(i.a.Fragment,null,t)},t.prototype.renderTitleSpans=function(e,t){var n=function(e){return i.a.createElement("span",{"data-key":e,key:e}," ")},r=[];e.isRequireTextOnStart&&(r.push(this.renderRequireText(e,t)),r.push(n("req-sp")));var o=e.no;return o&&(r.push(i.a.createElement("span",{"data-key":"q_num",key:"q_num",className:t.number,style:{position:"static"},"aria-hidden":!0},o)),r.push(n("num-sp"))),e.isRequireTextBeforeTitle&&(r.push(this.renderRequireText(e,t)),r.push(n("req-sp"))),r.push(d.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 i.a.createElement("span",{"data-key":"req-text",key:"req-text",className:t.requiredText||t.panel.requiredText,"aria-hidden":!0},e.requiredText)},t}(i.a.Component),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)}}(),W=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return A(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=i.a.createElement(L,{element:this.element,cssClasses:this.cssClasses});return this.element.hasTitleActions?i.a.createElement("div",{className:"sv-title-actions"},i.a.createElement("span",{className:"sv-title-actions__title"},e),i.a.createElement(B,{model:this.element.getTitleToolbar()})):e},t}(i.a.Component);s.RendererFactory.Instance.registerRenderer("element","title-actions","sv-title-actions"),a.Instance.registerElement("sv-title-actions",(function(e){return i.a.createElement(W,e)}));var H=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(t){return e.call(this,t)||this}return H(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=i.a.createElement(W,{element:e,cssClasses:e.cssClasses}),n=null,r=null;e.hasTitleEvents&&(n=function(){return e.toggleState()},r=function(e){Object(s.doKey2ClickUp)(e.nativeEvent)});var o=e.titleTagName;return i.a.createElement(o,{className:e.cssTitle,id:e.ariaTitleId,"aria-label":"radiogroup"===e.getType()?"":e.locTitle.renderedHtml,tabIndex:e.titleTabIndex,"aria-expanded":e.titleAriaExpanded,onClick:n,onKeyUp:r},t)},t}(i.a.Component),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)}}(),V=function(e){function t(t){return e.call(this,t)||this}return Q(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);return o.createElement("div",{ref:this.rootRef,className:this.panelBase.cssClasses.page.root},e,t,n)},t.prototype.renderTitle=function(){return o.createElement(F,{element:this.page})},t.prototype.renderDescription=function(){if(!this.page._showDescription)return null;var e=d.renderLocString(this.page.locDescription);return o.createElement("div",{className:this.panelBase.cssClasses.page.description},e)},t}(C),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)}}(),z=function(e){function t(t){return e.call(this,t)||this}return U(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.onChanged=function(){})},t.prototype.componentDidUpdate=function(e,t){e.locStr&&(e.locStr.onChanged=function(){}),this.reactOnStrChanged()},t.prototype.reactOnStrChanged=function(){var e=this;this.locStr&&(this.locStr.onChanged=function(){e.setState({changed:e.state&&e.state.changed?e.state.changed+1:1})})},t.prototype.render=function(){if(!this.locStr)return null;if(this.locStr.hasHtml){var e={__html:this.locStr.renderedHtml};return i.a.createElement("span",{className:"sv-string-viewer",style:this.style,dangerouslySetInnerHTML:e})}return i.a.createElement("span",{className:"sv-string-viewer",style:this.style},this.locStr.renderedHtml)},t}(i.a.Component);a.Instance.registerElement(s.LocalizableString.defaultRenderer,(function(e){return i.a.createElement(z,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)}}(),J=function(e){function t(t){var n=e.call(this,t)||this;return n.state={changed:0},n}return K(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.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=d.renderLocString(this.survey.locDescription);return i.a.createElement("div",{className:this.css.headerText,style:{maxWidth:this.survey.titleMaxWidth}},i.a.createElement(F,{element:this.survey}),i.a.createElement("h5",{className:this.css.description},e))},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 a.Instance.createElement(t,{data:n})},t.prototype.render=function(){return this.survey.renderedHasHeader?i.a.createElement("div",{className:this.css.header},this.renderLogoImage(this.survey.isLogoBefore),this.renderTitle(),this.renderLogoImage(this.survey.isLogoAfter),i.a.createElement("div",{className:this.css.headerClose})):null},t}(i.a.Component);a.Instance.registerElement("survey-header",(function(e){return i.a.createElement(J,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)}}(),G=function(e){function t(t){var n=e.call(this,t)||this;return n.update=function(){n.setState({timeSpent:n.survey.timeSpent})},n}return Z(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.survey.onTimer.add(this.update)},t.prototype.componentWillUnmount=function(){this.survey.onTimer.remove(this.update)},t.prototype.render=function(){return o.createElement("div",null,this.survey.timerInfoText)},t}(o.Component),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)}}(),Y=function(e){function t(t){var n=e.call(this,t)||this;return n.updateStateFunction=null,n.state={update:0},n}return X(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},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}(o.Component),$=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(t){var n=e.call(this,t)||this;return n.mouseDownPage=null,n.handlePrevClick=n.handlePrevClick.bind(n),n.handleNextClick=n.handleNextClick.bind(n),n.handleNextMouseDown=n.handleNextMouseDown.bind(n),n.handleMouseDown=n.handleMouseDown.bind(n),n.handleCompleteClick=n.handleCompleteClick.bind(n),n.handlePreviewClick=n.handlePreviewClick.bind(n),n.handleStartClick=n.handleStartClick.bind(n),n}return $(t,e),t.prototype.handlePrevClick=function(e){this.survey.prevPage()},t.prototype.handleNextClick=function(e){this.mouseDownPage&&this.mouseDownPage!==this.survey.currentPage||(this.mouseDownPage=null,this.survey.nextPage())},t.prototype.handleNextMouseDown=function(e){return this.mouseDownPage=this.survey.currentPage,this.survey.navigationMouseDown()},t.prototype.handleMouseDown=function(e){return this.survey.navigationMouseDown()},t.prototype.handleCompleteClick=function(e){this.survey.completeLastPage()},t.prototype.handlePreviewClick=function(e){this.survey.showPreview()},t.prototype.handleStartClick=function(e){this.survey.start()},t.prototype.render=function(){if(!this.survey||"none"===this.survey.isNavigationButtonsShowing)return null;var e="starting"===this.survey.state,t=this.survey.isShowPrevButton?this.renderButton(this.handlePrevClick,this.handleMouseDown,this.survey.pagePrevText,this.survey.cssNavigationPrev):null,n=this.survey.isShowNextButton?this.renderButton(this.handleNextClick,this.handleNextMouseDown,this.survey.pageNextText,this.survey.cssNavigationNext):null,r=this.survey.isCompleteButtonVisible?this.renderButton(this.handleCompleteClick,this.handleMouseDown,this.survey.completeText,this.survey.cssNavigationComplete):null,i=!e&&this.survey.isLastPage&&this.survey.isPreviewButtonVisible?this.renderButton(this.handlePreviewClick,this.handleMouseDown,this.survey.previewText,this.survey.cssNavigationPreview):null,s=e?this.renderButton(this.handleStartClick,null,this.survey.startSurveyText,this.survey.cssNavigationStart):null;return o.createElement("div",{className:this.css.footer},s,t,n,i,r)},t.prototype.renderButton=function(e,t,n,r){return o.createElement("input",{className:r,style:{marginRight:"5px"},type:"button",onMouseDown:t,onClick:e,value:n})},t}(Y),te=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}();function ne(e){return"function"!=typeof e?e:e()}var re=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)}}(),oe=function(e){function t(t){var n=e.call(this,t)||this;n.previousJSON={},n.handleTryAgainClick=n.handleTryAgainClick.bind(n),n.createSurvey(t),n.updateSurvey(t,{});n.survey.currentPage;return n.rootRef=o.createRef(),n.rootNodeId=t.id||null,n.rootNodeClassName=t.className||"",n}return re(t,e),Object.defineProperty(t,"cssType",{get:function(){return s.surveyCss.currentType},set:function(e){s.StylesManager.applyTheme(e)},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.survey},t.prototype.shouldComponentUpdate=function(e,t){return this.isModelJSONChanged(e)&&(this.createSurvey(e),this.updateSurvey(e,{})),!0},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateSurvey(this.props,t)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this);var t=this.rootRef.current;t&&this.survey&&this.survey.doAfterRenderSurvey(t),this.survey&&this.survey.startTimerFromUI()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.survey&&this.survey.stopTimer()},t.prototype.doRender=function(){var e;s.SvgRegistry.renderIcons(),e="completed"==this.survey.state?this.renderCompleted():"completedbefore"==this.survey.state?this.renderCompletedBefore():"loading"==this.survey.state?this.renderLoading():"starting"==this.survey.state?this.renderStartPage():this.renderSurvey();var t=o.createElement(J,{survey:this.survey}),n=o.createElement("div",{className:"sv_custom_header"});this.survey.hasLogo&&(n=null);var r=this.rootNodeClassName?this.rootNodeClassName+" "+this.css.root:this.css.root;return o.createElement("div",{id:this.rootNodeId,ref:this.rootRef,className:r},o.createElement("form",{onSubmit:function(e){e.preventDefault()}},n,o.createElement("div",{className:this.css.container},t,e)))},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.handleTryAgainClick=function(e){this.survey.doComplete()},t.prototype.renderCompleted=function(){if(!this.survey.showCompletedPage)return null;var e=null;if(this.survey.completedState){var t=null;if("error"==this.survey.completedState){var n=this.survey.getLocString("saveAgainButton");t=o.createElement("input",{type:"button",value:n,className:this.css.saveData.saveAgainButton,onClick:this.handleTryAgainClick})}var r=this.css.saveData[this.survey.completedState];e=o.createElement("div",{className:this.css.saveData.root},o.createElement("div",{className:r},o.createElement("span",null,this.survey.completedStateText),t))}var i={__html:this.survey.processedCompletedHtml};return o.createElement(o.Fragment,null,o.createElement("div",{dangerouslySetInnerHTML:i,className:this.survey.completedCss}),e)},t.prototype.renderCompletedBefore=function(){var e={__html:this.survey.processedCompletedBeforeHtml};return o.createElement("div",{dangerouslySetInnerHTML:e,className:this.css.body})},t.prototype.renderLoading=function(){var e={__html:this.survey.processedLoadingHtml};return o.createElement("div",{dangerouslySetInnerHTML:e,className:this.css.body})},t.prototype.renderStartPage=function(){var e=this.survey.startedPage?this.renderPage(this.survey.startedPage):null,t=this.survey.startedPage?this.survey.startedPage.id:"";return o.createElement(o.Fragment,null,o.createElement("div",{id:t,className:this.css.body},this.renderNavigation("top"),e,this.renderNavigation("bottom")))},t.prototype.renderSurvey=function(){var e=this.survey.currentPage?this.renderPage(this.survey.currentPage):null,t=this.survey.currentPage?this.survey.currentPage.id:"",n=this.survey.isShowProgressBarOnTop?this.renderProgress(!0):null,r=this.survey.isShowProgressBarOnBottom?this.renderProgress(!1):null,i=this.survey.bodyCss;return e||(i=this.css.bodyEmpty,e=this.renderEmptySurvey()),o.createElement("div",{id:t,className:i},n,this.renderTimerPanel("top"),this.renderNavigation("top"),e,this.renderTimerPanel("bottom"),r,this.renderNavigation("bottom"))},t.prototype.renderTimerPanel=function(e){return("top"!==e||this.survey.isTimerPanelShowingOnTop)&&("bottom"!==e||this.survey.isTimerPanelShowingOnBottom)?o.createElement(G,{survey:this.survey}):null},t.prototype.renderPage=function(e){return o.createElement(V,{survey:this.survey,page:e,css:this.css,creator:this})},t.prototype.renderProgress=function(e){return a.Instance.createElement("sv-progress-"+this.survey.progressBarType.toLowerCase(),{survey:this.survey,css:this.css,isTop:e})},t.prototype.renderNavigation=function(e){return"both"===this.survey.isNavigationButtonsShowing||"none"!==this.survey.isNavigationButtonsShowing&&this.survey.isNavigationButtonsShowing===e?o.createElement(ee,{survey:this.survey,css:this.css}):null},t.prototype.renderEmptySurvey=function(){return o.createElement("span",null,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 l(e.json)):this.survey=new l,e.css&&this.survey.mergeCss(e.css,this.css),this.setSurveyEvents()},t.prototype.isModelJSONChanged=function(e){return e.model?this.survey!==e.model:!!e.json&&!s.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.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 te.Instance.createQuestion(!e.isDefaultRendering||e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isInputReadOnly,creator:this})},t.prototype.renderError=function(e,t,n){return o.createElement("div",{key:e},o.createElement("span",{className:n.error.icon,"aria-hidden":"true"}),o.createElement("span",{className:n.error.item},o.createElement(z,{locStr:t.locText})))},t.prototype.questionTitleLocation=function(){return this.survey.questionTitleLocation},t.prototype.questionErrorLocation=function(){return this.survey.questionErrorLocation},t}(d);function ie(e,t,n){return void 0===n&&(n={processEsc:!0}),t&&t.disableTabStop?o.cloneElement(e,{tabIndex:-1}):o.cloneElement(e,{tabIndex:0,onKeyUp:function(e){return e.preventDefault(),e.stopPropagation(),Object(s.doKey2ClickUp)(e,n),!1},onKeyDown:function(e){return function(e,t){if(void 0===t&&(t={processEsc:!0}),!e.target||"true"!==e.target.contentEditable){var n=e.which||e.keyCode,r=[13,32];t.processEsc&&r.push(27),-1!==r.indexOf(n)&&e.preventDefault()}}(e,n)}})}a.Instance.registerElement("survey",(function(e){return o.createElement(oe,e)}));var 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)}}(),ae=function(e){function t(t){return e.call(this,t)||this}return se(t,e),t.prototype.renderElement=function(){var e=this,t=this.question.isInputTextUpdate?null:this.updateValueOnEvent,n=this.question.renderedPlaceHolder;return this.question.isReadOnlyRenderDiv()?o.createElement("div",null,this.question.value):o.createElement("textarea",{id:this.question.inputId,className:this.question.className,disabled:this.question.isInputReadOnly,readOnly:this.question.isInputReadOnly,ref:function(t){return e.control=t},maxLength:this.question.getMaxLength(),placeholder:n,onBlur:t,onInput:function(t){e.question.isInputTextUpdate?e.updateValueOnEvent(t):e.question.updateElement()},onKeyDown:function(t){e.question.onKeyDown(t)},cols:this.question.cols,rows:this.question.rows,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy,style:{resize:this.question.resizeStyle}})},t}(y),ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return se(t,e),t.prototype.canRender=function(){return!!this.props.question},t.prototype.renderElement=function(){var e=this,t=this.props.question,n=this.props.otherCss||this.cssClasses.comment,r=function(t){e.setState({comment:t.target.value})},i=this.state&&void 0!==this.state.comment?this.state.comment:t.comment||"";return t.isReadOnlyRenderDiv()?o.createElement("div",null,i):o.createElement("textarea",{className:n,value:i,disabled:this.isDisplayMode,maxLength:t.getOthersMaxLength(),placeholder:t.commentOrOtherPlaceHolder,onChange:r,onBlur:function(e){t.onCommentChange(e),r(e)},onInput:function(e){return t.onCommentInput(e)},"aria-required":t.isRequired,"aria-label":t.locTitle.renderedHtml,style:{resize:t.resizeStyle}})},t}(f);te.Instance.registerQuestion("comment",(function(e){return o.createElement(ae,e)}));var 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.widgetRef=o.createRef(),n}return le(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 o.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 o.createElement("div",{ref:this.widgetRef,dangerouslySetInnerHTML:n})}return o.createElement("div",{ref:this.widgetRef},t)},t}(m),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.isNeedFocus=!1,n.rootRef=o.createRef(),n}return pe(t,e),t.renderQuestionBody=function(e,t){return t.isVisible?t.customWidget?o.createElement(ce,{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.renderElement=function(){var e=this.question,t=e.cssClasses,n=this.renderQuestion(),r=this.renderHeader(e),i=e.hasTitleOnLeftTop?r:null,s=e.hasTitleOnBottom?r:null,a=e.hasDescriptionUnderInput?this.renderDescription(t,!0):null,u=e&&e.hasComment?this.renderComment(t):null,l=this.question.isErrorsModeTooltip&&!this.question.hasParent?this.renderErrors(t,""):null,c=this.question.isErrorsModeTooltip&&this.question.hasParent?this.renderErrors(t,"tooltip"):null,p="top"!==this.creator.questionErrorLocation()||this.question.isErrorsModeTooltip?null:this.renderErrors(t,"top"),h="bottom"!==this.creator.questionErrorLocation()||this.question.isErrorsModeTooltip?null:this.renderErrors(t,"bottom"),d={};e.paddingLeft&&(d.paddingLeft=e.paddingLeft),e.paddingRight&&(d.paddingRight=e.paddingRight);var f={display:this.question.isCollapsed?"none":""};return o.createElement(o.Fragment,null,o.createElement("div",{ref:this.rootRef,id:e.id,className:e.getRootCss(),style:d,role:e.ariaRole,"aria-required":this.question.ariaRequired,"aria-invalid":this.question.ariaInvalid,"aria-labelledby":e.hasTitle?e.ariaTitleId:null},l,i,o.createElement("div",{className:e.cssContent,style:f,role:"presentation"},p,n,u,h,c,a),s))},t.prototype.wrapElement=function(e){var t,n=this.question.survey;return n&&(t=n.wrapElement(e,this.question)),null!=t?t:e},t.prototype.renderQuestion=function(){return t.renderQuestionBody(this.creator,this.question)},t.prototype.renderDescription=function(e,t){void 0===t&&(t=!1);var n=d.renderLocString(this.question.locDescription),r=t?e.descriptionUnderInput:e.description;return o.createElement("div",{className:r},n)},t.prototype.renderComment=function(e){var t=d.renderLocString(this.question.locCommentText);return o.createElement("div",{className:this.question.cssClasses.formGroup},o.createElement("div",null,t),o.createElement(ue,{question:this.question,cssClasses:e,otherCss:e.other,isDisplayMode:this.question.isInputReadOnly}))},t.prototype.renderHeader=function(e){var t=e.cssClasses,n=e.hasTitle?o.createElement(F,{element:e}):null,r=e.hasDescriptionUnderTitle?this.renderDescription(t):null;return o.createElement("div",{className:e.cssHeader,onClick:e.clickTitleFunction},n,r)},t.prototype.renderErrors=function(e,t){return o.createElement(de,{element:this.question,cssClasses:e,creator:this.creator,location:t,id:this.question.id+"_errors"})},t}(d);a.Instance.registerElement("question",(function(e){return o.createElement(he,e)}));var de=function(e){function t(t){var n=e.call(this,t)||this;return n.state=n.getState(),n.tooltipRef=o.createRef(),n}return pe(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this.props.id},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.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),"tooltip"==this.props.location&&(this.tooltipRef.current&&!this.tooltipManager&&(this.tooltipManager=new s.TooltipManager(this.tooltipRef.current)),this.tooltipManager&&!this.tooltipRef.current&&this.disposeTooltipManager())},t.prototype.componentWillUnmount=function(){this.tooltipManager&&this.disposeTooltipManager()},t.prototype.disposeTooltipManager=function(){this.tooltipManager.dispose(),this.tooltipManager=void 0},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 o.createElement("div",{role:"alert","aria-live":"polite",className:this.element.cssError,id:this.id,ref:this.tooltipRef},e)},t}(f),fe=function(e){function t(t){return e.call(this,t)||this}return pe(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.renderErrors=function(e){return this.getShowErrors()?o.createElement(de,{element:this.question,cssClasses:this.cssClasses,creator:this.creator,location:e}):null},t.prototype.renderContent=function(){var e=this.creator.questionErrorLocation(),t=this.renderErrors(e),n="top"!==e||this.question.isErrorsModeTooltip?null:t,r="bottom"!==e||this.question.isErrorsModeTooltip?null:t,i=this.renderQuestion();return o.createElement(o.Fragment,null,n,i,r)},t.prototype.getShowErrors=function(){return this.question.isVisible},t.prototype.renderQuestion=function(){return he.renderQuestionBody(this.creator,this.question)},t}(f),me=function(e){function t(t){var n=e.call(this,t)||this;return n.cellRef=o.createRef(),n}return pe(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.question.isErrorsModeTooltip?this.renderErrors("tooltip"):null;return o.createElement("td",{ref:this.cellRef,className:this.itemCss,"data-responsive-title":this.getHeaderText(),title:this.props.cell.getTitle(),style:e},this.wrapCell(this.props.cell,o.createElement("div",{className:this.cssClasses.cellQuestionWrapper},this.renderContent(),t)))},t.prototype.getCellStyle=function(){return null},t.prototype.getHeaderText=function(){return""},t.prototype.wrapCell=function(e,t){if(!e)return t;var n,r=this.question.survey;return r&&(n=r.wrapMatrixCell(t,e)),null!=n?n:t},t}(fe),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)}}(),ve=function(e){function t(t){var n=e.call(this,t)||this;return n.hasBeenExpanded=!1,n}return ye(t,e),Object.defineProperty(t.prototype,"panel",{get:function(){return this.panelBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this.renderHeader(),t=o.createElement(de,{element:this.panelBase,cssClasses:this.panelBase.cssClasses,creator:this.creator}),n={paddingLeft:this.panel.innerPaddingLeft,display:this.panel.isCollapsed?"none":void 0},r=null;if(!this.panel.isCollapsed||this.hasBeenExpanded){this.hasBeenExpanded=!0;var i=this.renderRows(this.panelBase.cssClasses),s=this.panelBase.cssClasses.panel.content;r=this.renderContent(n,i,s)}return o.createElement("div",{ref:this.rootRef,className:this.panelBase.getContainerCss(),onFocus:this.panelBase.focusIn},e,t,r)},t.prototype.renderHeader=function(){if(!this.panelBase.hasTitle&&!this.panelBase.hasDescription)return null;var e=this.renderTitle(),t=this.renderDescription();return o.createElement("div",{className:this.panelBase.cssClasses.panel.header},e,t)},t.prototype.wrapElement=function(e){var t,n=this.panel.survey;return n&&(t=n.wrapElement(e,this.panel)),null!=t?t:e},t.prototype.renderContent=function(e,t,n){var r=this.renderBottom();return o.createElement("div",{style:e,className:n,id:this.panel.contentId},t,r)},t.prototype.renderTitle=function(){return this.panelBase.title?o.createElement(F,{element:this.panelBase}):null},t.prototype.renderDescription=function(){if(!this.panelBase.description)return null;var e=d.renderLocString(this.panelBase.locDescription);return o.createElement("div",{className:this.panel.cssClasses.panel.description},e)},t.prototype.renderBottom=function(){var e=this.panel.getFooterToolbar();return e.hasActions?o.createElement(B,{model:e}):null},t}(C);a.Instance.registerElement("panel",(function(e){return o.createElement(ve,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)}}(),be=function(e){function t(t){return e.call(this,t)||this}return ge(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(){return[this.renderHtml()]},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 o.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++)t.push(this.renderNode(e[n]));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?o.createElement("div",{key:this.getNodeIndex()},n):o.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 r=o.createElement(he,{key:n.name,element:n,creator:this.creator,css:this.css});return o.createElement("span",{key:this.getNodeIndex()},r)}return"div"===t?o.createElement("div",{key:this.getNodeIndex()},e.textContent):o.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 o.createElement("f-panel",{style:e},t)},t}(ve);a.Instance.registerElement("flowpanel",(function(e){return o.createElement(be,e)}));var Ce=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(t){return e.call(this,t)||this}return Ce(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 o.createElement("fieldset",{role:"presentation",className:this.question.getSelectBaseRootCss(),ref:function(t){return e.control=t}},o.createElement("legend",{role:"presentation",className:"sv-hidden"}),this.question.hasColumns?this.getColumns(t):this.getItems(t))},t.prototype.getColumns=function(e){var t=this;return this.question.columns.map((function(n,r){var i=n.map((function(n,o){return t.renderItem("item"+o,n,0===r&&0===o,e,""+r+o)}));return o.createElement("div",{key:"column"+r,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,i=this.renderItem(o,r,0==n,e,""+n);t.push(i)}return t},Object.defineProperty(t.prototype,"textStyle",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.renderItem=function(e,t,n,r,i){var s=o.createElement(qe,{key:e,question:this.question,cssClasses:r,isDisplayMode:this.isDisplayMode,item:t,textStyle:this.textStyle,isFirst:n,index:i}),a=this.question.survey,u=null;return a&&(u=a.wrapItemValue(s,this.question,t)),null!=u?u:s},t}(m),qe=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=function(e){var t=[].concat(n.question.renderedValue||[]),r=t.indexOf(n.item.value);e.target.checked?r<0&&t.push(n.item.value):r>-1&&t.splice(r,1),n.question.renderedValue=t},n.selectAllChanged=function(e){n.question.toggleSelectAll()},n}return Ce(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(){return!(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),t=this.question.isOtherItem(this.item)&&e?this.renderOther():null;return this.renderCheckbox(e,t)},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),r=this.hideCaption?"":this.renderLocString(this.item.locText),i=this.question.getItemClass(this.item),s=this.question.getLabelClass(this.item),a=this.item==this.question.selectAllItem?this.selectAllChanged:this.handleOnChange;this.item.locText;return o.createElement("div",{className:i,role:"presentation"},o.createElement("label",{className:s,"aria-label":this.question.getAriaItemLabel(this.item)},o.createElement("input",{className:this.cssClasses.itemControl,type:"checkbox",name:this.question.name,value:this.item.value,id:n,style:this.inputStyle,disabled:!this.question.getItemEnabled(this.item),checked:e,onChange:a,"aria-describedby":this.question.ariaDescribedBy}),this.cssClasses.materialDecorator?o.createElement("span",{className:this.cssClasses.materialDecorator},this.question.itemSvgIcon?o.createElement("svg",{className:this.cssClasses.itemDecorator},o.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,o.createElement("span",{className:this.cssClasses.controlLabel},r)),t)},t.prototype.renderOther=function(){return o.createElement("div",{className:"form-group"},o.createElement(ue,{question:this.question,otherCss:this.cssClasses.other,cssClasses:this.cssClasses,isDisplayMode:this.isDisplayMode}))},t}(f);te.Instance.registerQuestion("checkbox",(function(e){return o.createElement(Ee,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)}}(),Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return we(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this;return o.createElement("div",{className:this.question.rootClass,ref:function(t){return e.control=t}},this.getItems())},t.prototype.getItems=function(){for(var e=this,t=[],n=this.question.rankingChoices,r=function(r){var i=n[r];t.push(o.renderItem(i,r,(function(t){e.question.handleKeydown.call(e.question,t,i)}),(function(t){t.persist(),e.question.handlePointerDown.call(e.question,t,i,t.currentTarget)}),o.question.cssClasses,o.question.getItemClass(i),o.question))},o=this,i=0;i<n.length;i++)r(i);return t},t.prototype.renderItem=function(e,t,n,r,i,s,a){var u=e.value+"-"+t+"-item",l=this.renderLocString(e.locText),c=t,p=this.question.getNumberByIndex(t),h=o.createElement(_e,{key:u,text:l,index:c,indexText:p,handleKeydown:n,handlePointerDown:r,cssClasses:i,itemClass:s,question:a}),d=this.question.survey,f=null;return d&&(f=d.wrapItemValue(h,this.question,e)),null!=f?f:h},t}(m),_e=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return we(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,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return o.createElement("div",{tabIndex:0,className:this.itemClass,onKeyDown:this.handleKeydown,onPointerDown:this.handlePointerDown,"data-sv-drop-target-ranking-item":this.index},o.createElement("div",{tabIndex:-1,style:{outline:"none"}},o.createElement("div",{className:this.cssClasses.itemGhostNode}),o.createElement("div",{className:this.cssClasses.itemContent},o.createElement("div",{className:this.cssClasses.itemIconContainer},o.createElement("svg",{width:"10",height:"16",viewBox:"0 0 10 16",className:this.question.getIconHoverCss(),xmlns:"http://www.w3.org/2000/svg"},o.createElement("path",{d:"M6 2C6 0.9 6.9 0 8 0C9.1 0 10 0.9 10 2C10 3.1 9.1 4 8 4C6.9 4 6 3.1 6 2ZM2 0C0.9 0 0 0.9 0 2C0 3.1 0.9 4 2 4C3.1 4 4 3.1 4 2C4 0.9 3.1 0 2 0ZM8 6C6.9 6 6 6.9 6 8C6 9.1 6.9 10 8 10C9.1 10 10 9.1 10 8C10 6.9 9.1 6 8 6ZM2 6C0.9 6 0 6.9 0 8C0 9.1 0.9 10 2 10C3.1 10 4 9.1 4 8C4 6.9 3.1 6 2 6ZM8 12C6.9 12 6 12.9 6 14C6 15.1 6.9 16 8 16C9.1 16 10 15.1 10 14C10 12.9 9.1 12 8 12ZM2 12C0.9 12 0 12.9 0 14C0 15.1 0.9 16 2 16C3.1 16 4 15.1 4 14C4 12.9 3.1 12 2 12Z"})),o.createElement("svg",{width:"10",height:"24",viewBox:"0 0 10 24",className:this.question.getIconFocusCss(),xmlns:"http://www.w3.org/2000/svg"},o.createElement("path",{d:"M10 5L5 0L0 5H4V9H6V5H10Z"}),o.createElement("path",{d:"M6 19V15H4V19H0L5 24L10 19H6Z"}))),o.createElement("div",{className:this.cssClasses.itemIndex},this.indexText),o.createElement("div",{className:this.cssClasses.controlLabel},this.text))))},t}(f);te.Instance.registerQuestion("ranking",(function(e){return o.createElement(Oe,e)}));var 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)}}(),Pe=function(e){function t(t){return e.call(this,t)||this}return Se(t,e),t.prototype.setValueCore=function(e){this.questionBase.renderedValue=e},t.prototype.getValueCore=function(){return this.questionBase.renderedValue},t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.isOtherSelected?this.renderOther(e):null,n=this.renderSelect(e);return o.createElement("div",{className:this.question.renderCssRoot},n,t)},t.prototype.renderSelect=function(e){var t=this;return this.isDisplayMode?o.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),disabled:!0},this.question.readOnlyText):o.createElement("div",{className:e.selectWrapper},o.createElement("select",{id:this.question.inputId,className:this.question.getControlClass(),ref:function(e){return t.control=e},autoComplete:this.question.autoComplete,onChange:this.updateValueOnEvent,onInput:this.updateValueOnEvent,"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.showOptionsCaption?o.createElement("option",{value:""},this.question.optionsCaption):null,this.question.visibleChoices.map((function(e,t){return o.createElement(Ne,{key:"item"+t,item:e})}))))},t.prototype.renderOther=function(e){return o.createElement("div",{className:"form-group"},o.createElement(ue,{question:this.question,otherCss:e.other,cssClasses:e,isDisplayMode:this.isDisplayMode}))},t}(y),Ne=function(e){function t(t){return e.call(this,t)||this}return Se(t,e),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 o.createElement("option",{value:this.item.value,disabled:!this.item.isEnabled},this.item.text)},t}(f);te.Instance.registerQuestion("dropdown",(function(e){return o.createElement(Pe,e)}));var xe=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){var n=e.call(this,t)||this;return n.state={rowsChanged:0},n}return xe(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?o.createElement("td",null):null,r=[],i=0;i<this.question.visibleColumns.length;i++){var s=this.question.visibleColumns[i],a="column"+i,u=this.renderLocString(s.locText);r.push(o.createElement("th",{className:this.question.cssClasses.headerCell,key:a},this.wrapCell({column:s},u,"column-header")))}var l=[],c=this.question.visibleRows;for(i=0;i<c.length;i++){var p=c[i];a="row-"+p.name+"-"+i;l.push(o.createElement(Ie,{key:a,question:this.question,cssClasses:t,isDisplayMode:this.isDisplayMode,row:p,isFirst:0==i}))}var h=this.question.showHeader?o.createElement("thead",null,o.createElement("tr",null,n,r)):null;return o.createElement("div",{className:t.tableWrapper,ref:function(t){return e.control=t}},o.createElement("fieldset",null,o.createElement("legend",{"aria-label":this.question.locTitle.renderedHtml}),o.createElement("table",{className:t.root},h,o.createElement("tbody",null,l))))},t}(m),Ie=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n}return xe(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.handleOnChange=function(e){this.row.value=e.target.value,this.setState({value:this.row.value})},t.prototype.wrapCell=function(e,t,n){if(!n)return t;var r,o=this.question.survey;return o&&(r=o.wrapMatrixCell(t,e,n)),null!=r?r: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);e=o.createElement("td",{className:this.question.cssClasses.cell},this.wrapCell({row:this.row},t,"row-header"))}var n=this.generateTds();return o.createElement("tr",{className:this.row.rowClasses},e,n)},t.prototype.generateTds=function(){for(var e=this,t=[],n=this.row,r=0;r<this.question.visibleColumns.length;r++){var i=null,s=this.question.visibleColumns[r],a="value"+r,u=n.value==s.value,l=this.question.getItemClass(n,s),c=this.question.inputId+"_"+n.name+"_"+r;if(this.question.hasCellText){var p=this.question.isInputReadOnly?null:function(t){return function(){return e.cellClick(n,t)}};i=o.createElement("td",{key:a,className:l,onClick:p?p(s):null},this.renderLocString(this.question.getCellDisplayLocText(n.name,s)))}else i=o.createElement("td",{key:a,"data-responsive-title":s.locText.renderedHtml,className:this.question.cssClasses.cell},o.createElement("label",{className:l},o.createElement("input",{id:c,type:"radio",className:this.cssClasses.itemValue,name:n.fullName,value:s.value,disabled:this.isDisplayMode,checked:u,onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":s.locText.renderedHtml,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),o.createElement("span",{className:this.question.cssClasses.materialDecorator},o.createElement("svg",{className:this.question.cssClasses.itemDecorator,viewBox:"-12 -12 24 24"},o.createElement("circle",{r:"6",cx:"0",cy:"0"}),"s")),o.createElement("span",{className:"circle"}),o.createElement("span",{className:"check"}),o.createElement("span",{style:{display:"none"}},this.question.locTitle.renderedHtml)));t.push(i)}return t},t.prototype.cellClick=function(e,t){e.value=t.value,this.setState({value:this.row.value})},t}(f);te.Instance.registerQuestion("matrix",(function(e){return o.createElement(Re,e)}));var je=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)}}(),Te=function(e){function t(t){return e.call(this,t)||this}return je(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 o.createElement("div",{className:this.question.renderCssRoot,dangerouslySetInnerHTML:e})},t}(m);te.Instance.registerQuestion("html",(function(e){return o.createElement(Te,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)}}(),De=function(e){function t(t){return e.call(this,t)||this}return ke(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e,t=this,n=this.renderPreview(),r=this.renderFileDecorator(),i=this.renderClearButton(this.question.cssClasses.removeButton),s=this.renderClearButton(this.question.cssClasses.removeButtonBottom);return e=o.createElement("input",{type:"file",disabled:this.isDisplayMode,className:this.isDisplayMode?this.question.getReadOnlyFileCss():this.question.cssClasses.fileInput,id:this.question.inputId,ref:function(e){return t.control=e},style:this.isDisplayMode?{color:"transparent"}:{},onChange:this.isDisplayMode?null: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}),o.createElement("div",{className:this.question.getFileRootCss()},e,r,i,n,s)},t.prototype.renderFileDecorator=function(){this.question.cssClasses;var e,t=null;return e=o.createElement("label",{role:"button",className:this.question.getChooseFileCss(),htmlFor:this.question.inputId,"aria-label":this.question.chooseButtonCaption},o.createElement("span",null,this.question.chooseButtonCaption),this.question.cssClasses.chooseFileIconId?o.createElement(q,{iconName:this.question.cssClasses.chooseFileIconId,size:"auto"}):null),this.question.isEmpty()&&(t=o.createElement("span",{className:this.question.cssClasses.noFileChosen},this.question.noFileChosenCaption)),o.createElement("div",{className:this.question.getFileDecoratorCss(),onDrop:this.question.onDrop,onDragOver:this.question.onDragOver,onDragLeave:this.question.onDragLeave},o.createElement("span",{className:this.question.cssClasses.dragAreaPlaceholder},this.question.dragAreaPlaceholder),o.createElement("div",{className:this.question.cssClasses.wrapper},e,t))},t.prototype.renderClearButton=function(e){return this.question.isEmpty()||this.isDisplayMode||!e?null:o.createElement("button",{type:"button",onClick:this.question.doClean,className:e},o.createElement("span",null,this.question.cleanButtonCaption),this.question.cssClasses.removeButtonIconId?o.createElement(q,{iconName:this.question.cssClasses.removeButtonIconId,size:"auto"}):null)},t.prototype.renderFileSign=function(e,t){var n=this;return e&&t.name?o.createElement("div",{className:e},o.createElement("a",{href:t.content,onClick:function(e){n.question.doDownloadFile(e,t)},title:t.name,download:t.name,style:{width:this.question.imageWidth+"px"}},t.name)):null},t.prototype.renderPreview=function(){var e=this;if(!this.question.previewValue)return null;var t=this.question.previewValue.map((function(t,n){return t?o.createElement("span",{key:e.question.inputId+"_"+n,className:e.question.cssClasses.preview},e.renderFileSign(e.question.cssClasses.fileSign,t),o.createElement("div",{className:e.question.cssClasses.imageWrapper},e.question.canPreviewImage(t)?o.createElement("img",{src:t.content,height:e.question.imageHeight,width:e.question.imageWidth,alt:"File preview"}):o.createElement("img",{className:e.question.cssClasses.defaultImage,height:e.question.imageHeight,width:e.question.imageWidth}),t.name&&!e.question.isReadOnly?o.createElement("div",{className:e.question.cssClasses.removeFileButton,onClick:function(){return e.question.doRemoveFile(t)}},o.createElement("span",{className:e.question.cssClasses.removeFile},e.question.removeFileCaption),e.question.cssClasses.removeFileSvgIconId?o.createElement(q,{iconName:e.question.cssClasses.removeFileSvgIconId,size:"auto",className:e.question.cssClasses.removeFileSvg}):null):null),e.renderFileSign(e.question.cssClasses.fileSignBottom,t)):null}));return o.createElement("div",{className:this.question.cssClasses.fileList},t)},t}(m);te.Instance.registerQuestion("file",(function(e){return o.createElement(De,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){return e.call(this,t)||this}return Be(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=[],r=0;r<t.length;r++)n.push(this.renderRow(r,t[r],e));return o.createElement("table",{className:e.root},o.createElement("tbody",null,n))},t.prototype.renderItemTooltipError=function(e,t){return this.question.isErrorsModeTooltip?o.createElement(de,{element:e.editor,cssClasses:t,creator:this.creator,location:"tooltip",id:e.editor.id+"_errors"}):null},t.prototype.renderRow=function(e,t,n){for(var r="item"+e,i=[],s=0;s<t.length;s++){var a=t[s];i.push(o.createElement("td",{key:"item"+s,className:this.question.cssClasses.cell},o.createElement("label",{className:this.question.getItemLabelCss(a)},o.createElement("span",{className:n.itemTitle},o.createElement(L,{element:a.editor,cssClasses:a.editor.cssClasses})),o.createElement(Le,{cssClasses:n,itemCss:this.question.getItemCss(),question:a.editor,creator:this.creator}),this.renderItemTooltipError(a,n))))}return o.createElement("tr",{key:r,className:n.row},i)},t}(m),Le=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Be(t,e),t.prototype.renderElement=function(){return o.createElement("div",{className:this.itemCss},this.renderContent())},t}(fe);te.Instance.registerQuestion("multipletext",(function(e){return o.createElement(Me,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)}}(),We=function(e){function t(t){return e.call(this,t)||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,t=this.question.cssClasses,n=null;return this.question.canShowClearButton&&(n=o.createElement("div",null,o.createElement("input",{type:"button",className:this.question.cssClasses.clearButton,onClick:function(){return e.question.clearValue()},value:this.question.clearButtonCaption}))),o.createElement("fieldset",{className:this.question.getSelectBaseRootCss(),role:"presentation",ref:function(t){return e.control=t}},this.question.hasColumns?this.getColumns(t):this.getItems(t),n)},t.prototype.getColumns=function(e){var t=this,n=this.getStateValue();return this.question.columns.map((function(r,i){var s=r.map((function(r,o){return t.renderItem(r,n,e,""+i+o)}));return o.createElement("div",{key:"column"+i,className:t.question.getColumnClass(),role:"presentation"},s)}))},t.prototype.getItems=function(e){for(var t=[],n=this.getStateValue(),r=0;r<this.question.visibleChoices.length;r++){var o=this.question.visibleChoices[r],i=this.renderItem(o,n,e,""+r);t.push(i)}return t},Object.defineProperty(t.prototype,"textStyle",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.renderItem=function(e,t,n,r){var i="item"+r,s=o.createElement(He,{key:i,question:this.question,cssClasses:n,isDisplayMode:this.isDisplayMode,item:e,textStyle:this.textStyle,index:r,isChecked:t===e.value}),a=this.question.survey,u=null;return a&&(u=a.wrapItemValue(s,this.question,e)),null!=u?u:s},t.prototype.getStateValue=function(){return this.question.isEmpty()?"":this.question.renderedValue},t}(m),He=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n}return Ae(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(){return!(this.question.customWidget&&!this.question.customWidgetData.isNeedRender&&!this.question.customWidget.widgetJson.isDefaultRender&&!this.question.customWidget.widgetJson.render)},t.prototype.handleOnChange=function(e){this.question.renderedValue=this.item.value},t.prototype.canRender=function(){return!!this.question&&!!this.item},t.prototype.renderElement=function(){var e=this.question.isOtherItem(this.item)&&this.question.isOtherSelected?this.renderOther(this.cssClasses):null,t=this.hideCaption?"":this.renderLocString(this.item.locText,this.textStyle),n=this.question.getItemClass(this.item),r=this.question.getLabelClass(this.item),i=(this.item.locText,this.question.getControlLabelClass(this.item));return o.createElement("div",{className:n,role:"presentation"},o.createElement("label",{className:r,"aria-label":this.question.getAriaItemLabel(this.item)},o.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?o.createElement("span",{className:this.cssClasses.materialDecorator},this.question.itemSvgIcon?o.createElement("svg",{className:this.cssClasses.itemDecorator},o.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,o.createElement("span",{className:i},t)),e)},t.prototype.renderOther=function(e){return o.createElement("div",{className:"form-group"},o.createElement(ue,{question:this.question,otherCss:e.other,cssClasses:e,isDisplayMode:this.isDisplayMode}))},t}(f);a.Instance.registerElement("survey-radiogroup-item",(function(e){return o.createElement(He,e)})),te.Instance.registerQuestion("radiogroup",(function(e){return o.createElement(We,e)}));var Fe=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(e){function t(t){var n=e.call(this,t)||this;return n._isWaitingForEnter=!1,n}return Fe(t,e),t.prototype.renderInput=function(){var e=this,t=this.question.getControlClass(),n=null,r=null,i=null;this.question.isInputTextUpdate?(n=function(t){return e._isWaitingForEnter=229===t.keyCode},r=function(t){e._isWaitingForEnter&&13!==t.keyCode||(e.updateValueOnEvent(t),e._isWaitingForEnter=!1)},i=function(t){t.persist(),setTimeout((function(){e.updateValueOnEvent(t)}),1)}):r=function(t){13===t.keyCode&&e.updateValueOnEvent(t)};var s=this.question.renderedPlaceHolder;return this.question.isReadOnlyRenderDiv()?o.createElement("div",null,this.question.value):o.createElement("input",{id:this.question.inputId,disabled:this.isDisplayMode,className:t,type:this.question.inputType,ref:function(t){return e.control=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:s,list:this.question.dataListId,autoComplete:this.question.autoComplete,onBlur:this.updateValueOnEvent,onChange:function(t){t.target===document.activeElement?e.question.isInputTextUpdate&&e.updateValueOnEvent(t):e.updateValueOnEvent(t)},onKeyUp:r,onKeyDown:n,onCompositionUpdate:i,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy})},t.prototype.renderElement=function(){return this.question.dataListId?o.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(o.createElement("option",{key:"item"+n,value:e[n]}));return o.createElement("datalist",{id:this.question.dataListId},t)},t}(y);te.Instance.registerQuestion("text",(function(e){return o.createElement(Qe,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)}}(),Ue=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.checkRef=o.createRef(),n}return Ve(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.checkedValue=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.updateDomElement=function(){if(this.question){var t=this.checkRef.current;t&&(t.indeterminate=this.question.isIndeterminate),this.control=t,e.prototype.updateDomElement.call(this)}},t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=this.question.getItemCss();return o.createElement("div",{className:t.root},o.createElement("label",{className:n,onClick:this.handleOnClick},o.createElement("input",{ref:this.checkRef,type:"checkbox",name:this.question.name,value:null===this.question.checkedValue?"":this.question.checkedValue,id:this.question.inputId,className:t.control,disabled:this.isDisplayMode,checked:this.question.checkedValue||!1,onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),o.createElement("span",{className:this.question.getLabelCss(!1),onClick:function(t){return e.handleOnLabelClick(t,!1)}},this.renderLocString(this.question.locLabelFalse)),o.createElement("div",{className:t.switch,onClick:this.handleOnSwitchClick},o.createElement("span",{className:t.slider},this.question.isDeterminated&&t.sliderText?o.createElement("span",{className:t.sliderText},this.renderLocString(this.question.getCheckedLabel())):null)),o.createElement("span",{className:this.question.getLabelCss(!0),onClick:function(t){return e.handleOnLabelClick(t,!0)}},this.renderLocString(this.question.locLabelTrue))))},t}(m);te.Instance.registerQuestion("boolean",(function(e){return o.createElement(Ue,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)}}(),Ke=function(e){function t(t){return e.call(this,t)||this}return ze(t,e),t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.getItemCss();return o.createElement("div",{className:e.root},o.createElement("label",{className:t,onClick:this.handleOnClick},o.createElement("input",{ref:this.checkRef,type:"checkbox",name:this.question.name,value:null===this.question.checkedValue?"":this.question.checkedValue,id:this.question.inputId,className:e.control,disabled:this.isDisplayMode,checked:this.question.checkedValue||!1,onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),o.createElement("span",{className:e.materialDecorator},this.question.svgIcon?o.createElement("svg",{className:e.itemDecorator},o.createElement("use",{xlinkHref:this.question.svgIcon})):o.createElement("svg",{viewBox:"0 0 24 24",className:e.itemDecorator},o.createElement("rect",{className:e.uncheckedPath,x:"5",y:"10",width:"14",height:"4"}),o.createElement("polygon",{className:e.checkedPath,points:"19,10 14,10 14,5 10,5 10,10 5,10 5,14 10,14 10,19 14,19 14,14 19,14 "}),o.createElement("path",{className:e.indeterminatePath,d:"M22,0H2C0.9,0,0,0.9,0,2v20c0,1.1,0.9,2,2,2h20c1.1,0,2-0.9,2-2V2C24,0.9,23.1,0,22,0z M21,18L6,3h15V18z M3,6l15,15H3V6z"})),o.createElement("span",{className:"check"})),"hidden"===this.question.titleLocation&&o.createElement("span",{className:this.question.getLabelCss(!1)},this.renderLocString(this.question.locDisplayLabel))))},t}(Ue);te.Instance.registerQuestion("sv-boolean-checkbox",(function(e){return o.createElement(Ke,e)})),s.RendererFactory.Instance.registerRenderer("boolean","checkbox","sv-boolean-checkbox");var Je=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={value:n.question.value},n}return Je(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return o.createElement("div",null)},t}(m);te.Instance.registerQuestion("empty",(function(e){return o.createElement(Ze,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)}}(),Xe=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 Ge(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 i.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)},t}(d);a.Instance.registerElement("sv-matrix-row",(function(e){return i.a.createElement(Xe,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)}}(),$e=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ye(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item.data.question},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return i.a.createElement("span",{className:this.question.cssClasses.iconDrag})},t}(f);a.Instance.registerElement("sv-matrix-drag-drop-icon",(function(e){return i.a.createElement($e,e)}));var 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){var n=e.call(this,t)||this;return n.state=n.getState(),n}return et(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=void 0,this.question.onRenderedTableResetCallback=void 0,this.question.renderedTable.renderedRowsChangedCallback=void 0},t.prototype.renderElement=function(){return this.renderTableDiv()},t.prototype.renderTableDiv=function(){var e=this,t=this.renderHeader(),n=this.renderFooter(),r=this.renderRows(),i=this.question.horizontalScroll?{overflowX:"scroll"}:{};return o.createElement("div",{style:i,ref:function(t){return e.control=t}},o.createElement("table",{className:this.question.cssClasses.root},t,r,n))},t.prototype.renderHeader=function(){var e=this.question.renderedTable;if(!e.showHeader)return null;for(var t=[],n=e.headerRow.cells,r=0;r<n.length;r++){var i=n[r],s="column"+r,a={};i.width&&(a.width=i.width),i.minWidth&&(a.minWidth=i.minWidth);var u=this.renderCellContent(i,"column-header",{});t.push(o.createElement("th",{className:i.className,key:s,style:a},u))}return o.createElement("thead",null,o.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);return o.createElement("tfoot",null,t)},t.prototype.renderRows=function(){for(var e=this.question.cssClasses,t=[],n=this.question.renderedTable.rows,r=0;r<n.length;r++)t.push(this.renderRow(n[r].id,n[r],e));return o.createElement("tbody",null,t)},t.prototype.renderRow=function(e,t,n){for(var r=[],i=t.cells,s=0;s<i.length;s++)r.push(this.renderCell(i[s],s,n));var a="row"+e;return o.createElement(o.Fragment,{key:a},o.createElement(Xe,{model:t,parentMatrix:this.question},r))},t.prototype.renderCell=function(e,t,n){var r="cell"+t;if(e.hasQuestion)return o.createElement(rt,{key:r,itemCss:e.className,cssClasses:n,cell:e,creator:this.creator});var i=e.hasTitle?"row-header":"",s=this.renderCellContent(e,i,n),a=null;return(e.width||e.minWidth)&&(a={},e.width&&(a.width=e.width),e.minWidth&&(a.minWidth=e.minWidth)),o.createElement("td",{className:e.className,key:r,style:a,colSpan:e.colSpans},s)},t.prototype.renderCellContent=function(e,t,n){var r=null,i=null,s=null,a=null;if((e.width||e.minWidth)&&(a={},e.width&&(a.width=e.width),e.minWidth&&(a.minWidth=e.minWidth)),e.hasTitle&&(t="row-header",r=this.renderLocString(e.locTitle),e.requiredText&&(i=o.createElement("span",null," "),s=o.createElement("span",null,e.requiredText))),e.isDragHandlerCell&&(r=o.createElement(o.Fragment,null,o.createElement($e,{item:{data:{row:e.row,question:this.question}}}))),e.isActionsCell&&(r=o.createElement(nt,{model:e.item.getData()})),e.hasPanel&&(r=o.createElement(ve,{key:e.panel.id,element:e.panel,survey:this.question.survey,cssClasses:n,isDisplayMode:this.isDisplayMode,creator:this.creator})),!r)return null;var u=o.createElement(o.Fragment,null,r,i,s);return this.wrapCell(e,u,t)},t}(m),nt=function(e){function t(t){return e.call(this,t)||this}return et(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return o.createElement(B,{model:this.model,handleClick:!1})},t}(f),rt=function(e){function t(t){return e.call(this,t)||this}return et(t,e),Object.defineProperty(t.prototype,"cell",{get:function(){return this.props.cell},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)}},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.isCheckbox?this.renderCellCheckboxButton():this.renderCellRadiogroupButton():he.renderQuestionBody(this.creator,this.question)},t.prototype.renderCellCheckboxButton=function(){var e=this.cell.question.id+"item"+this.cell.choiceIndex;return o.createElement(qe,{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 o.createElement(He,{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}(me),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}(tt);te.Instance.registerQuestion("matrixdropdown",(function(e){return o.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){var n=e.call(this,t)||this;return n.handleOnRowAddClick=n.handleOnRowAddClick.bind(n),n}return st(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 o.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=o.createElement("div",{className:e.emptyRowsText},t),r=this.renderAddRowButton(e,!0);return o.createElement("div",{className:e.emptyRowsSection},n,r)},t.prototype.renderAddRowButton=function(e,t){void 0===t&&(t=!1);var n=this.renderLocString(this.matrix.locAddRowText),r=o.createElement("button",{className:this.question.getAddRowButtonCss(t),type:"button",disabled:this.question.isInputReadOnly,onClick:this.question.isDesignMode?void 0:this.handleOnRowAddClick},n,o.createElement("span",{className:e.iconAdd}));return t?r:o.createElement("div",{className:e.footer},r)},t}(tt);te.Instance.registerQuestion("matrixdynamic",(function(e){return o.createElement(at,e)}));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.handleOnPanelAddClick=n.handleOnPanelAddClick.bind(n),n.handleOnPanelPrevClick=n.handleOnPanelPrevClick.bind(n),n.handleOnPanelNextClick=n.handleOnPanelNextClick.bind(n),n.handleOnRangeChange=n.handleOnRangeChange.bind(n),n}return ut(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=null,this.question.currentIndexChangedCallback=null,this.question.renderModeChangedCallback=null},t.prototype.updateQuestionRendering=function(){this.setState({panelCounter:this.state?this.state.panelCounter+1:1})},t.prototype.handleOnPanelAddClick=function(e){this.question.addPanelUI()},t.prototype.handleOnPanelPrevClick=function(e){this.question.goToPrevPanel()},t.prototype.handleOnPanelNextClick=function(e){this.question.goToNextPanel()},t.prototype.handleOnRangeChange=function(e){this.question.currentIndex=e.target.value},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(o.createElement(ct,{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(o.createElement(ct,{key:this.question.currentIndex,element:n,question:this.question,index:this.question.currentIndex,cssClasses:this.question.cssClasses,isDisplayMode:this.isDisplayMode,creator:this.creator}))}var r=this.question.isRenderModeList?this.renderAddRowButton():null,i=this.question.isProgressTopShowing?this.renderNavigator():null,s=this.question.isProgressBottomShowing?this.renderNavigator():null,a={};this.question.horizontalScroll&&(a.overflowX="scroll");var u=this.renderNavigatorV2(),l=this.renderPlaceholder();return o.createElement("div",{className:this.question.cssClasses.root},l,i,o.createElement("div",{style:a},e),s,r,u)},t.prototype.renderNavigator=function(){var e=this.question.isRangeShowing?this.renderRange():null,t=this.rendrerPrevButton(),n=this.rendrerNextButton(),r=this.renderAddRowButton(),i=this.question.isProgressTopShowing?this.question.cssClasses.progressTop:this.question.cssClasses.progressBottom;return o.createElement("div",{style:{clear:"both"},className:i},o.createElement("div",{className:this.question.cssClasses.progressContainer},t,e,n),r,this.renderProgressText())},t.prototype.renderProgressText=function(){return o.createElement("div",{className:this.question.cssClasses.progressText},this.question.progressText)},t.prototype.rendrerPrevButton=function(){return o.createElement("div",{title:this.question.panelPrevText,onClick:this.handleOnPanelPrevClick},o.createElement(q,{className:this.question.getPrevButtonCss(),iconName:this.question.cssClasses.progressBtnIcon,size:"auto"}))},t.prototype.rendrerNextButton=function(){return o.createElement("div",{title:this.question.panelNextText,onClick:this.handleOnPanelNextClick},o.createElement(q,{className:this.question.getNextButtonCss(),iconName:this.question.cssClasses.progressBtnIcon,size:"auto"}))},t.prototype.renderRange=function(){var e,t=this;return o.createElement("div",{className:this.question.cssClasses.progress},o.createElement("div",{className:this.question.cssClasses.progressBar,style:{width:(e=t.question.panelCount-1,t.question.currentIndex/e*100+"%")},role:"progressbar"}))},t.prototype.renderAddRowButton=function(){return this.question.canAddPanel?o.createElement("button",{type:"button",className:this.question.getAddButtonCss(),onClick:this.handleOnPanelAddClick},o.createElement("span",{className:this.question.cssClasses.buttonAddText}," ",this.question.panelAddText," "),o.createElement("span",null)):null},t.prototype.renderNavigatorV2=function(){if(0===this.question.panelCount)return null;var e=this.question.isRangeShowing&&!this.question.isProgressTopShowing?this.renderRange():null,t=this.renderAddRowButton(),n=this.rendrerPrevButton(),r=this.rendrerNextButton(),i=this.renderProgressText();return this.question.cssClasses.footer?o.createElement("div",{className:this.question.cssClasses.footer},e,o.createElement("hr",{className:this.question.cssClasses.separator}),o.createElement("div",{className:this.question.cssClasses.footerButtonsContainer},t,this.question.isRenderModeList?null:o.createElement("div",{className:this.question.cssClasses.progressContainer},n,i,r))):null},t.prototype.renderPlaceholder=function(){return this.question.getShowNoEntriesPlaceholder()?o.createElement("div",{className:this.question.cssClasses.noEntriesPlaceholder},o.createElement("span",null,this.renderLocString(this.question.locNoEntriesText)),this.renderAddRowButton()):null},t}(m),ct=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnPanelRemoveClick=n.handleOnPanelRemoveClick.bind(n),n}return ut(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.handleOnPanelRemoveClick=function(e){this.question.removePanelUI(this.index)},t.prototype.render=function(){var t=e.prototype.render.call(this),n=this.renderButton(),r=this.question.isRenderModeList&&this.index<this.question.panelCount-1?o.createElement("hr",{className:this.question.cssClasses.separator}):null;return o.createElement(o.Fragment,null,o.createElement("div",{className:this.question.getPanelWrapperCss()},t,n),r)},t.prototype.renderButton=function(){return!this.question.canRemovePanel||this.question.isRenderModeList&&this.panel.isCollapsed?null:o.createElement("button",{className:this.question.getPanelRemoveButtonCss(),onClick:this.handleOnPanelRemoveClick,type:"button"},o.createElement("span",{className:this.question.cssClasses.buttonRemoveText}," ",this.question.panelRemoveText),o.createElement("span",{className:this.question.cssClasses.iconRemove}))},t}(ve);te.Instance.registerQuestion("paneldynamic",(function(e){return o.createElement(lt,e)}));var pt=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)}}(),ht=function(e){function t(t){return e.call(this,t)||this}return pt(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=this.isTop?{}:{marginTop:"1em"},t={width:this.progress+"%"};return o.createElement("div",{className:this.css.progress,style:e},o.createElement("div",{style:t,className:this.css.progressBar,role:"progressbar","aria-valuemin":0,"aria-valuemax":100},o.createElement("span",{className:s.SurveyProgressModel.getProgressTextInBarCss(this.css)},this.progressText)),o.createElement("span",{className:s.SurveyProgressModel.getProgressTextUnderBarCss(this.css)},this.progressText))},t}(Y);a.Instance.registerElement("sv-progress-pages",(function(e){return o.createElement(ht,e)})),a.Instance.registerElement("sv-progress-questions",(function(e){return o.createElement(ht,e)})),a.Instance.registerElement("sv-progress-correctQuestions",(function(e){return o.createElement(ht,e)})),a.Instance.registerElement("sv-progress-requiredQuestions",(function(e){return o.createElement(ht,e)}));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)}}(),ft=function(e){function t(t){var n=e.call(this,t)||this;return n.updateScroller=void 0,n.progressButtonsModel=new s.SurveyProgressButtonsModel(n.survey),n.listContainerRef=o.createRef(),n}return dt(t,e),t.prototype.render=function(){var e=this;return o.createElement("div",{className:this.css.progressButtonsContainerCenter},o.createElement("div",{className:this.css.progressButtonsContainer},o.createElement("div",{className:this.getScrollButtonCss(!0),role:"button",onClick:function(){return e.clickScrollButton(e.listContainerRef.current,!0)}}),o.createElement("div",{className:this.css.progressButtonsListContainer,ref:this.listContainerRef},o.createElement("ul",{className:this.css.progressButtonsList},this.getListElements())),o.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 o.createElement("li",{key:"listelement"+t,className:this.getListElementCss(t),onClick:this.isListElementClickable(t)?function(){return n.clickListElement(t)}:void 0},o.createElement("div",{className:this.css.progressButtonsPageTitle,title:e.navigationTitle||e.name},e.navigationTitle||e.name),o.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.scrollLeft+=70*(t?-1:1)},t.prototype.componentDidMount=function(){var e=this;this.updateScroller=setInterval((function(){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}(Y);a.Instance.registerElement("sv-progress-buttons",(function(e){return o.createElement(ft,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)}}(),yt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnClick=n.handleOnClick.bind(n),n}return mt(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.renderElement=function(){var e=this,t=this.question.cssClasses,n=this.question.minRateDescription?this.renderLocString(this.question.locMinRateDescription):null,r=this.question.maxRateDescription?this.renderLocString(this.question.locMaxRateDescription):null,i=this.question.hasOther?this.renderOther(t):null;return o.createElement("div",{className:t.root,ref:function(t){return e.control=t}},o.createElement("fieldset",{role:"radiogroup"},o.createElement("legend",{role:"presentation",className:"sv-hidden"}),this.question.hasMinLabel?o.createElement("span",{className:t.minText},n):null,this.question.renderedRateItems.map((function(n,r){return e.renderItem("value"+r,n,r,t)})),this.question.hasMaxLabel?o.createElement("span",{className:t.maxText},r):null),i)},t.prototype.renderItem=function(e,t,n,r){var i=this.renderLocString(t.locText);return o.createElement("label",{key:e,className:this.question.getItemClass(t.itemValue)},o.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.name,id:this.question.inputId+"_"+n,value:t.value,disabled:this.isDisplayMode,checked:this.question.value==t.value,onClick:this.handleOnClick,onChange:function(){},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),o.createElement("span",{className:r.itemText},i))},t.prototype.renderOther=function(e){return o.createElement("div",{className:e.other},o.createElement(ue,{question:this.question,cssClasses:e,isDisplayMode:this.isDisplayMode}))},t}(m);te.Instance.registerQuestion("rating",(function(e){return o.createElement(yt,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)}}(),gt=function(e){function t(t){return e.call(this,t)||this}return vt(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 o.createElement("div",{id:this.question.inputId,className:t.root,ref:function(t){return e.control=t}},this.question.formatedValue)},t}(m);te.Instance.registerQuestion("expression",(function(e){return o.createElement(gt,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)}}(),Ct=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnExpanded=n.handleOnExpanded.bind(n),n}return bt(t,e),t.prototype.getStateElements=function(){return[this.window,this.window.survey]},t.prototype.handleOnExpanded=function(e){this.window.isExpanded=!this.window.isExpanded},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&this.window.isShowing},t.prototype.renderElement=function(){var e=this.renderWindowHeader(),t=this.window.isExpanded?this.renderBody():null;return o.createElement("div",{className:this.css.window.root,style:{position:"fixed",bottom:3,right:10,maxWidth:"60%"}},e,t)},t.prototype.renderWindowHeader=function(){var e={paddingRight:"10px"},t=this.window.isExpanded?this.css.window.header.buttonCollapsed:this.css.window.header.buttonExpanded;t="glyphicon pull-right "+t;var n=d.renderLocString(this.survey.locTitle);return o.createElement("div",{className:this.css.window.header.root},o.createElement("span",{onClick:this.handleOnExpanded,style:{width:"100%",cursor:"pointer"}},o.createElement("span",{className:this.css.window.header.title,style:e},n),o.createElement("span",{className:t,"aria-hidden":"true"})),this.window.isExpanded?o.createElement("span",{onClick:this.handleOnExpanded,style:{float:"right",cursor:"pointer"}},o.createElement("span",{className:this.css.window.header.title,style:e},"X")):null)},t.prototype.renderBody=function(){return o.createElement("div",{className:this.css.window.body},this.doRender())},t.prototype.createSurvey=function(t){t||(t={}),e.prototype.createSurvey.call(this,t),this.window=new p(null,this.survey),t.closeOnCompleteTimeout&&(this.window.closeOnCompleteTimeout=t.closeOnCompleteTimeout),this.window.isShowing=!0,this.window.isExpanded||!t.expanded&&!t.isExpanded||this.window.expand();var n=this;this.window.closeWindowOnCompleteCallback=function(){n.window.hide()}},t}(oe),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)}}(),qt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n}return Et(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},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.question.cssClasses;return o.createElement("fieldset",{className:e.root},o.createElement("legend",{role:"radio","aria-label":this.question.locTitle.renderedHtml}),this.getItems(e))},t.prototype.getItems=function(e){for(var t=[],n=0;n<this.question.visibleChoices.length;n++){var r=this.question.visibleChoices[n],o=this.question.name+"-"+r.value;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 r=this.question.isItemSelected(t),i=this.question.getItemClass(t),s=null;this.question.showLabel&&(s=o.createElement("span",{className:this.question.cssClasses.itemText},t.text?d.renderLocString(t.locText):t.value));var a={objectFit:this.question.imageFit},u=null;"image"===this.question.contentMode&&(u=o.createElement("img",{className:n.image,src:t.imageLink,width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,alt:t.locText.renderedHtml,style:a})),"video"===this.question.contentMode&&(u=o.createElement("video",{controls:!0,className:n.image,src:t.imageLink,width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,style:a}));var l=o.createElement("div",{key:e,className:i},o.createElement("label",{className:n.label},o.createElement("input",{style:{display:"none"},className:n.itemControl,id:this.question.getItemId(t),type:this.question.inputType,name:this.question.questionName,checked:r,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}),o.createElement("div",{className:this.question.cssClasses.itemDecorator},o.createElement("div",{className:this.question.cssClasses.imageContainer},u),s))),c=this.question.survey,p=null;return c&&(p=c.wrapItemValue(l,this.question,t)),null!=p?p:l},t}(m);te.Instance.registerQuestion("imagepicker",(function(e){return o.createElement(qt,e)}));var wt=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)}}(),Ot=function(e){function t(t){return e.call(this,t)||this}return wt(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.canRender=function(){return e.prototype.canRender.call(this)&&!!this.question.imageLink},t.prototype.renderElement=function(){var e=this.question.cssClasses,t={objectFit:this.question.imageFit},n=null;return"image"===this.question.renderedMode&&(n=o.createElement("img",{className:e.image,src:this.question.locImageLink.renderedHtml,alt:this.question.text||this.question.title,width:this.question.renderedWidth,height:this.question.renderedHeight,style:t})),"video"===this.question.renderedMode&&(n=o.createElement("video",{controls:!0,className:e.image,src:this.question.imageLink,width:this.question.renderedWidth,height:this.question.renderedHeight,style:t})),"youtube"===this.question.renderedMode&&(n=o.createElement("iframe",{className:e.image,src:this.question.imageLink,width:this.question.renderedWidth,height:this.question.renderedHeight,style:t})),o.createElement("div",{className:this.question.cssClasses.root},n)},t}(m);te.Instance.registerQuestion("image",(function(e){return o.createElement(Ot,e)}));var _t=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){var n=e.call(this,t)||this;return n.state={value:n.question.value},n}return _t(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 o.createElement("div",{className:t.root,ref:function(t){return e.control=t},style:{height:this.question.height,width:this.question.width}},o.createElement("div",{className:t.placeholder,style:{display:this.question.needShowPlaceholder()?"":"none"}},this.question.placeHolderText),o.createElement("div",null,o.createElement("canvas",{tabIndex:0})),o.createElement("div",{className:t.controls},o.createElement("button",{type:"button",className:t.clearButton,title:this.question.clearButtonCaption},this.question.cssClasses.clearButtonIconId?o.createElement(q,{iconName:this.question.cssClasses.clearButtonIconId,size:"auto"}):o.createElement("span",null,"✖"))))},t}(m);te.Instance.registerQuestion("signaturepad",(function(e){return o.createElement(St,e)}));var Pt=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)}}(),Nt=function(e){function t(t){return e.call(this,t)||this}return Pt(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.render=function(){var e=this.renderItems();return i.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 i.a.createElement(xt,{key:e.question.inputId+"_"+n,item:t,question:e.question,index:n})}))},t}(m),xt=function(e){function t(t){var n=e.call(this,t)||this;return n.model=new s.ButtonGroupItemModel(n.question,n.item,n.index),n}return Pt(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.render=function(){var e=this.renderIcon(),t=this.renderInput(),n=this.renderCaption();return i.a.createElement("label",{className:this.model.css.label,title:this.model.caption.renderedHtml},t,i.a.createElement("div",{className:this.model.css.decorator},e,n))},t.prototype.renderIcon=function(){return this.model.iconName?i.a.createElement(q,{className:this.model.css.icon,iconName:this.model.iconName,size:this.model.iconSize||24}):null},t.prototype.renderInput=function(){var e=this;return i.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 i.a.createElement("span",{className:this.model.css.caption,title:this.model.caption.renderedHtml},e)},t}(d),Rt=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 Rt(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 he.renderQuestionBody(this.creator,this.question.contentQuestion)},t}(y),jt=function(e){function t(t){return e.call(this,t)||this}return Rt(t,e),t.prototype.canRender=function(){return!!this.question.contentPanel},t.prototype.renderElement=function(){return o.createElement(ve,{element:this.question.contentPanel,creator:this.creator,survey:this.question.survey})},t}(y);te.Instance.registerQuestion("custom",(function(e){return o.createElement(It,e)})),te.Instance.registerQuestion("composite",(function(e){return o.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)}}(),kt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isNeedFocus=!1,t}return Tt(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=this,t=null;if(this.element.isCollapsed||this.element.isExpanded){var n=s.DefaultTitleModel.getIconCss(this.cssClasses,this.element.isCollapsed),r=this.element.isExpanded,o=this.element.isExpanded?this.element.contentId:null;t=i.a.createElement("span",{className:n,tabIndex:0,onKeyUp:function(t){var n;13===t.keyCode&&(((n=e.element).isExpanded||n.isCollapsed)&&(n.toggleState(),e.isNeedFocus=n.isCollapsed))},"aria-expanded":r,"aria-controls":o})}return i.a.createElement(i.a.Fragment,null,i.a.createElement(L,{element:this.element,cssClasses:this.cssClasses}),t)},t.prototype.componentDidMount=function(){this.doAfterRender()},t.prototype.doAfterRender=function(){this.isNeedFocus&&(this.element.clickTitleFunction(),this.isNeedFocus=!1)},t}(i.a.Component);a.Instance.registerElement("sv-default-title",(function(e){return i.a.createElement(kt,e)}));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)}}(),Bt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleKeydown=function(e){t.model.onKeyDown(e)},t}return Dt(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={paddingLeft:this.model.getItemIndent(this.item),display:void 0===this.item.visible||this.item.visible?null:"none"},n=this.model.getItemClass(this.item),r=[];if(this.item.component)r.push(a.Instance.createElement(this.item.component,{item:this.item}));else{var o=this.item.iconName?i.a.createElement(q,{key:1,className:"sv-list__item-icon",iconName:this.item.iconName,size:24}):null;r.push(o),r.push(i.a.createElement("span",{key:2},this.item.title))}return ie(i.a.createElement("li",{style:t,className:n,onClick:function(){e.model.selectItem(e.item)},onPointerDown:function(t){return e.model.onPointerDown(t,e.item)}},r))},t}(d);a.Instance.registerElement("sv-list-item",(function(e){return i.a.createElement(Bt,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)}}(),Lt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleKeydown=function(e){n.model.onKeyDown(e)},n.state={filteredText:n.model.filteredText||""},n}return Mt(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(){var e=this.renderItems();return i.a.createElement("div",{className:"sv-list__container"},this.searchElementContent(),i.a.createElement("ul",{className:"sv-list",onMouseDown:function(e){e.preventDefault()},onKeyDown:this.handleKeydown},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 i.a.createElement(Bt,{model:e.model,item:t,key:"item"+n})})):null},t.prototype.searchElementContent=function(){var e=this;if(this.model.needFilter){return i.a.createElement("div",{className:"sv-list__filter"},i.a.createElement(q,{className:"sv-list__filter-icon",iconName:"icon-search",size:"auto"}),i.a.createElement("input",{type:"text",className:"sv-list__input",placeholder:this.model.filteredTextPlaceholder,value:this.state.filteredText,onChange:function(t){t.target===document.activeElement&&(e.model.filteredText=t.target.value)}}))}return null},t}(d);a.Instance.registerElement("sv-list",(function(e){return i.a.createElement(Lt,e)}));var At=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 At(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(i.a.createElement("div",{key:"logo-image",className:this.survey.logoClassNames},i.a.createElement("img",{className:this.survey.css.logoImage,src:this.survey.locLogo.renderedHtml,alt:this.survey.locTitle.renderedHtml,width:this.survey.logoWidth?this.survey.logoWidth:void 0,height:this.survey.logoHeight?this.survey.logoHeight:void 0,style:{objectFit:this.survey.logoFit}}))),i.a.createElement(i.a.Fragment,null,e)},t}(i.a.Component);a.Instance.registerElement("sv-logo-image",(function(e){return i.a.createElement(Wt,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)}}(),Ft=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnRowRemoveClick=n.handleOnRowRemoveClick.bind(n),n}return Ht(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 i.a.createElement("button",{className:this.question.getRemoveRowButtonCss(),type:"button",onClick:this.handleOnRowRemoveClick,disabled:this.question.isInputReadOnly},e,i.a.createElement("span",{className:this.question.cssClasses.iconRemove}))},t}(f);a.Instance.registerElement("sv-matrix-remove-button",(function(e){return i.a.createElement(Ft,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)}}(),Vt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnShowHideClick=n.handleOnShowHideClick.bind(n),n}return Qt(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:null;return i.a.createElement("button",{type:"button",onClick:this.handleOnShowHideClick,className:this.question.getDetailPanelButtonCss(this.row),"aria-expanded":t,"aria-controls":n},i.a.createElement(q,{className:this.question.getDetailPanelIconCss(this.row),iconName:this.question.getDetailPanelIconId(this.row),size:"auto"}))},t}(f);a.Instance.registerElement("sv-matrix-detail-button",(function(e){return i.a.createElement(Vt,e)}));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)}}(),zt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ut(t,e),t.prototype.render=function(){return i.a.createElement("div",{className:"sv-skeleton-element"})},t}(i.a.Component);a.Instance.registerElement("sv-skeleton",(function(e){return i.a.createElement(zt,e)}));var 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)}}(),Jt=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 Kt(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 i.a.createElement("span",{className:"sv-string-editor",contentEditable:"true",suppressContentEditableWarning:!0,style:this.style,dangerouslySetInnerHTML:e,onBlur:this.onInput,onClick:this.onClick})}return i.a.createElement("span",{className:"sv-string-editor",contentEditable:"true",suppressContentEditableWarning:!0,style:this.style,onBlur:this.onInput,onClick:this.onClick},this.locStr.renderedHtml)},t}(i.a.Component);a.Instance.registerElement(s.LocalizableString.editableRenderer,(function(e){return i.a.createElement(Jt,e)}));var Zt=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(){function e(e,t,n,r){var o=this;void 0===r&&(r=48),this.container=e,this.model=t,this.itemsSelector=n,this.dotsItemSize=r,this.resizeObserver=void 0,this.isInitialized=!1,this.minDimensionConst=56,this.separatorSize=17,this.separatorAddConst=1,this.paddingSizeConst=8,this.recalcMinDimensionConst=!0,this.getComputedStyle=window.getComputedStyle.bind(window),this.model.updateCallback=function(e){e?o.isInitialized=!1:o.process()},"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((function(e){return o.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.calcItemsSizes=function(){var e=this,t=this.model.actions;this.container.querySelectorAll(this.itemsSelector).forEach((function(n,r){var o=t[r];o.maxDimension=e.calcItemSize(n),o.minDimension=e.calcMinDimension(o)}))},Object.defineProperty(e.prototype,"isContainerVisible",{get:function(){return!!(this.container.offsetWidth||this.container.offsetHeight||this.container.getClientRects().length)},enumerable:!1,configurable:!0}),e.prototype.process=function(){this.isContainerVisible&&(this.isInitialized||(this.model.actions.forEach((function(e){return e.mode="large"})),this.calcItemsSizes(),this.isInitialized=!0),this.model.fit(this.getAvailableSpace(),this.dotsItemSize))},e.prototype.dispose=function(){this.model.updateCallback=void 0,this.resizeObserver&&this.resizeObserver.disconnect()},e}(),Xt=function(e){function t(t,n,r,o){var i=e.call(this,t,n,r,o)||this;return i.minDimensionConst=40,i.recalcMinDimensionConst=!1,i}return Zt(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}(Gt)}])}));
|