survey-react-ui 1.11.4 → 1.11.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.11.4
2
+ * surveyjs - Survey JavaScript library v1.11.6
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
6
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("survey-core"),require("react-dom")):"function"==typeof define&&define.amd?define("survey-react-ui",["react","survey-core","react-dom"],t):"object"==typeof exports?exports["survey-react-ui"]=t(require("react"),require("survey-core"),require("react-dom")):e.SurveyReact=t(e.React,e.Survey,e.ReactDOM)}(this,(function(e,t,n){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t,n){"use strict";n.r(t),n.d(t,"Survey",(function(){return Ee})),n.d(t,"attachKey2click",(function(){return we})),n.d(t,"ReactSurveyElementsWrapper",(function(){return a})),n.d(t,"SurveyNavigationBase",(function(){return Pe})),n.d(t,"SurveyTimerPanel",(function(){return Se})),n.d(t,"SurveyPage",(function(){return ue})),n.d(t,"SurveyRow",(function(){return g})),n.d(t,"SurveyPanel",(function(){return _e})),n.d(t,"SurveyFlowPanel",(function(){return Ve})),n.d(t,"SurveyQuestion",(function(){return ne})),n.d(t,"SurveyElementErrors",(function(){return re})),n.d(t,"SurveyQuestionAndErrorsCell",(function(){return ie})),n.d(t,"ReactSurveyElement",(function(){return p})),n.d(t,"SurveyElementBase",(function(){return c})),n.d(t,"SurveyQuestionElementBase",(function(){return h})),n.d(t,"SurveyQuestionCommentItem",(function(){return G})),n.d(t,"SurveyQuestionComment",(function(){return K})),n.d(t,"SurveyQuestionCheckbox",(function(){return Ne})),n.d(t,"SurveyQuestionCheckboxItem",(function(){return Ae})),n.d(t,"SurveyQuestionRanking",(function(){return Re})),n.d(t,"SurveyQuestionRankingItem",(function(){return De})),n.d(t,"SurveyQuestionRankingItemContent",(function(){return Le})),n.d(t,"RatingItem",(function(){return Fe})),n.d(t,"RatingItemStar",(function(){return ze})),n.d(t,"RatingItemSmiley",(function(){return We})),n.d(t,"RatingDropdownItem",(function(){return Qe})),n.d(t,"TagboxFilterString",(function(){return Ke})),n.d(t,"SurveyQuestionOptionItem",(function(){return Ye})),n.d(t,"SurveyQuestionDropdownBase",(function(){return $e})),n.d(t,"SurveyQuestionDropdown",(function(){return et})),n.d(t,"SurveyQuestionTagboxItem",(function(){return nt})),n.d(t,"SurveyQuestionTagbox",(function(){return ot})),n.d(t,"SurveyQuestionDropdownSelect",(function(){return st})),n.d(t,"SurveyQuestionMatrix",(function(){return ut})),n.d(t,"SurveyQuestionMatrixRow",(function(){return lt})),n.d(t,"SurveyQuestionMatrixCell",(function(){return ct})),n.d(t,"SurveyQuestionHtml",(function(){return ht})),n.d(t,"SurveyQuestionFile",(function(){return yt})),n.d(t,"SurveyFileChooseButton",(function(){return vt})),n.d(t,"SurveyFilePreview",(function(){return Ct})),n.d(t,"SurveyQuestionMultipleText",(function(){return wt})),n.d(t,"SurveyQuestionRadiogroup",(function(){return St})),n.d(t,"SurveyQuestionRadioItem",(function(){return xt})),n.d(t,"SurveyQuestionText",(function(){return It})),n.d(t,"SurveyQuestionBoolean",(function(){return Tt})),n.d(t,"SurveyQuestionBooleanCheckbox",(function(){return At})),n.d(t,"SurveyQuestionBooleanRadio",(function(){return Rt})),n.d(t,"SurveyQuestionEmpty",(function(){return Lt})),n.d(t,"SurveyQuestionMatrixDropdownCell",(function(){return Jt})),n.d(t,"SurveyQuestionMatrixDropdownBase",(function(){return Wt})),n.d(t,"SurveyQuestionMatrixDropdown",(function(){return Gt})),n.d(t,"SurveyQuestionMatrixDynamic",(function(){return Zt})),n.d(t,"SurveyQuestionMatrixDynamicAddButton",(function(){return $t})),n.d(t,"SurveyQuestionPanelDynamic",(function(){return cn})),n.d(t,"SurveyProgress",(function(){return dn})),n.d(t,"SurveyProgressButtons",(function(){return mn})),n.d(t,"SurveyProgressToc",(function(){return En})),n.d(t,"SurveyQuestionRating",(function(){return On})),n.d(t,"SurveyQuestionRatingDropdown",(function(){return qn})),n.d(t,"SurveyQuestionExpression",(function(){return xn})),n.d(t,"PopupSurvey",(function(){return In})),n.d(t,"SurveyWindow",(function(){return Vn})),n.d(t,"ReactQuestionFactory",(function(){return W})),n.d(t,"ReactElementFactory",(function(){return s})),n.d(t,"SurveyQuestionImagePicker",(function(){return Nn})),n.d(t,"SurveyQuestionImage",(function(){return Rn})),n.d(t,"SurveyQuestionSignaturePad",(function(){return Ln})),n.d(t,"SurveyQuestionButtonGroup",(function(){return Mn})),n.d(t,"SurveyQuestionCustom",(function(){return zn})),n.d(t,"SurveyQuestionComposite",(function(){return Hn})),n.d(t,"Popup",(function(){return V})),n.d(t,"ListItemContent",(function(){return Un})),n.d(t,"ListItemGroup",(function(){return Jn})),n.d(t,"List",(function(){return bn})),n.d(t,"TitleActions",(function(){return B})),n.d(t,"TitleElement",(function(){return H})),n.d(t,"SurveyActionBar",(function(){return L})),n.d(t,"LogoImage",(function(){return Gn})),n.d(t,"SurveyHeader",(function(){return ce})),n.d(t,"SvgIcon",(function(){return E})),n.d(t,"SurveyQuestionMatrixDynamicRemoveButton",(function(){return Zn})),n.d(t,"SurveyQuestionMatrixDetailButton",(function(){return Xn})),n.d(t,"SurveyQuestionMatrixDynamicDragDropIcon",(function(){return Bt})),n.d(t,"SurveyQuestionPanelDynamicAddButton",(function(){return tn})),n.d(t,"SurveyQuestionPanelDynamicRemoveButton",(function(){return tr})),n.d(t,"SurveyQuestionPanelDynamicPrevButton",(function(){return sn})),n.d(t,"SurveyQuestionPanelDynamicNextButton",(function(){return rn})),n.d(t,"SurveyQuestionPanelDynamicProgressText",(function(){return un})),n.d(t,"SurveyNavigationButton",(function(){return rr})),n.d(t,"QuestionErrorComponent",(function(){return ar})),n.d(t,"MatrixRow",(function(){return Mt})),n.d(t,"Skeleton",(function(){return lr})),n.d(t,"NotifierComponent",(function(){return fe})),n.d(t,"ComponentsContainer",(function(){return ye})),n.d(t,"CharacterCounterComponent",(function(){return Q})),n.d(t,"HeaderMobile",(function(){return pr})),n.d(t,"HeaderCell",(function(){return hr})),n.d(t,"Header",(function(){return dr})),n.d(t,"SurveyLocStringViewer",(function(){return ir})),n.d(t,"SurveyLocStringEditor",(function(){return mr})),n.d(t,"LoadingIndicatorComponent",(function(){return ft})),n.d(t,"SvgBundleComponent",(function(){return ve})),n.d(t,"SurveyModel",(function(){return i.SurveyModel})),n.d(t,"SurveyWindowModel",(function(){return i.SurveyWindowModel})),n.d(t,"settings",(function(){return i.settings})),n.d(t,"surveyLocalization",(function(){return i.surveyLocalization})),n.d(t,"surveyStrings",(function(){return i.surveyStrings})),n.d(t,"Model",(function(){return i.SurveyModel})),n.d(t,"ResponsivityManager",(function(){return di})),n.d(t,"VerticalResponsivityManager",(function(){return fi})),n.d(t,"unwrap",(function(){return pi}));var r=n(0),o=n.n(r),i=n(1),s=function(){function e(){this.creatorHash={}}return e.prototype.registerElement=function(e,t){this.creatorHash[e]=t},e.prototype.getAllTypes=function(){var e=new Array;for(var t in this.creatorHash)e.push(t);return e.sort()},e.prototype.isElementRegistered=function(e){return!!this.creatorHash[e]},e.prototype.createElement=function(e,t){var n=this.creatorHash[e];return null==n?null:n(t)},e.Instance=new e,e}(),a=function(){function e(){}return e.wrapRow=function(e,t,n){var r=e.getRowWrapperComponentName(n),o=e.getRowWrapperComponentData(n);return s.Instance.createElement(r,{element:t,row:n,componentData:o})},e.wrapElement=function(e,t,n){var r=e.getElementWrapperComponentName(n),o=e.getElementWrapperComponentData(n);return s.Instance.createElement(r,{element:t,question:n,componentData:o})},e.wrapQuestionContent=function(e,t,n){var r=e.getQuestionContentWrapperComponentName(n),o=e.getElementWrapperComponentData(n);return s.Instance.createElement(r,{element:t,question:n,componentData:o})},e.wrapItemValue=function(e,t,n,r){var o=e.getItemValueWrapperComponentName(r,n),i=e.getItemValueWrapperComponentData(r,n);return s.Instance.createElement(o,{key:null==t?void 0:t.key,element:t,question:n,item:r,componentData:i})},e.wrapMatrixCell=function(e,t,n,r){void 0===r&&(r="cell");var o=e.getElementWrapperComponentName(n,r),i=e.getElementWrapperComponentData(n,r);return s.Instance.createElement(o,{element:t,cell:n,componentData:i})},e}();i.SurveyModel.platform="react";var u,l=(u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(e){function t(t){var n=e.call(this,t)||this;return n._allowComponentUpdate=!0,n}return l(t,e),t.renderLocString=function(e,t,n){return void 0===t&&(t=null),s.Instance.createElement(e.renderAs,{locStr:e.renderAsData,style:t,key:n})},t.renderQuestionDescription=function(e){var n=t.renderLocString(e.locDescription);return r.createElement("div",{style:e.hasDescription?void 0:{display:"none"},id:e.ariaDescriptionId,className:e.cssDescription},n)},t.prototype.componentDidMount=function(){this.makeBaseElementsReact()},t.prototype.componentWillUnmount=function(){this.unMakeBaseElementsReact()},t.prototype.componentDidUpdate=function(e,t){this.makeBaseElementsReact(),this.getStateElements().forEach((function(e){e.afterRerender()}))},t.prototype.allowComponentUpdate=function(){this._allowComponentUpdate=!0,this.forceUpdate()},t.prototype.denyComponentUpdate=function(){this._allowComponentUpdate=!1},t.prototype.shouldComponentUpdate=function(e,t){return this._allowComponentUpdate&&this.unMakeBaseElementsReact(),this._allowComponentUpdate},t.prototype.render=function(){if(!this.canRender())return null;this.startEndRendering(1);var e=this.renderElement();return this.startEndRendering(-1),e&&(e=this.wrapElement(e)),this.changedStatePropNameValue=void 0,e},t.prototype.wrapElement=function(e){return e},Object.defineProperty(t.prototype,"isRendering",{get:function(){for(var e=0,t=this.getRenderedElements();e<t.length;e++){if(t[e].reactRendering>0)return!0}return!1},enumerable:!1,configurable:!0}),t.prototype.getRenderedElements=function(){return this.getStateElements()},t.prototype.startEndRendering=function(e){for(var t=0,n=this.getRenderedElements();t<n.length;t++){var r=n[t];r.reactRendering||(r.reactRendering=0),r.reactRendering+=e}},t.prototype.canRender=function(){return!0},t.prototype.renderElement=function(){return null},Object.defineProperty(t.prototype,"changedStatePropName",{get:function(){return this.changedStatePropNameValue},enumerable:!1,configurable:!0}),t.prototype.makeBaseElementsReact=function(){for(var e=this.getStateElements(),t=0;t<e.length;t++)e[t].enableOnElementRenderedEvent(),this.makeBaseElementReact(e[t])},t.prototype.unMakeBaseElementsReact=function(){for(var e=this.getStateElements(),t=0;t<e.length;t++)e[t].disableOnElementRenderedEvent(),this.unMakeBaseElementReact(e[t])},t.prototype.getStateElements=function(){var e=this.getStateElement();return e?[e]:[]},t.prototype.getStateElement=function(){return null},Object.defineProperty(t.prototype,"isDisplayMode",{get:function(){return this.props.isDisplayMode||!1},enumerable:!1,configurable:!0}),t.prototype.renderLocString=function(e,n,r){return void 0===n&&(n=null),t.renderLocString(e,n,r)},t.prototype.canMakeReact=function(e){return!!e&&!!e.iteratePropertiesHash},t.prototype.makeBaseElementReact=function(e){var t=this;this.canMakeReact(e)&&(e.iteratePropertiesHash((function(e,n){if(t.canUsePropInState(n)){var r=e[n];if(Array.isArray(r))(r=r).onArrayChanged=function(e){t.isRendering||(t.changedStatePropNameValue=n,t.setState((function(e){var t={};return t[n]=r,t})))}}})),e.setPropertyValueCoreHandler=function(e,n,r){if(e[n]!==r){if(e[n]=r,!t.canUsePropInState(n))return;if(t.isRendering)return;t.changedStatePropNameValue=n,t.setState((function(e){var t={};return t[n]=r,t}))}})},t.prototype.canUsePropInState=function(e){return!0},t.prototype.unMakeBaseElementReact=function(e){this.canMakeReact(e)&&(e.setPropertyValueCoreHandler=void 0,e.iteratePropertiesHash((function(e,t){var n=e[t];Array.isArray(n)&&((n=n).onArrayChanged=function(){})})))},t}(r.Component),p=function(e){function t(t){return e.call(this,t)||this}return l(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),t}(c),h=function(e){function t(t){return e.call(this,t)||this}return l(t,e),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateDomElement()},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.updateDomElement()},t.prototype.componentWillUnmount=function(){if(e.prototype.componentWillUnmount.call(this),this.questionBase){var t=this.control;this.questionBase.beforeDestroyQuestionElement(t),t&&t.removeAttribute("data-rendered")}},t.prototype.updateDomElement=function(){var e=this.control;e&&"r"!==e.getAttribute("data-rendered")&&(e.setAttribute("data-rendered","r"),this.questionBase.afterRenderQuestionElement(e))},Object.defineProperty(t.prototype,"questionBase",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.getRenderedElements=function(){return[this.questionBase]},Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.questionBase&&!!this.creator},t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&!(this.questionBase.customWidget&&!this.questionBase.customWidgetData.isNeedRender&&!this.questionBase.customWidget.widgetJson.isDefaultRender&&!this.questionBase.customWidget.widgetJson.render)},Object.defineProperty(t.prototype,"isDisplayMode",{get:function(){return this.props.isDisplayMode||!!this.questionBase&&this.questionBase.isInputReadOnly||!1},enumerable:!1,configurable:!0}),t.prototype.wrapCell=function(e,t,n){if(!n)return t;var r=this.questionBase.survey,o=null;return r&&(o=a.wrapMatrixCell(r,t,e,n)),null!=o?o:t},t.prototype.setControl=function(e){e&&(this.control=e)},t}(c),d=function(e){function t(t){var n=e.call(this,t)||this;return n.updateValueOnEvent=function(e){i.Helpers.isTwoValueEquals(n.questionBase.value,e.target.value,!1,!0,!1)||n.setValueCore(e.target.value)},n.updateValueOnEvent=n.updateValueOnEvent.bind(n),n}return l(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.setValueCore=function(e){this.questionBase.value=e},t.prototype.getValueCore=function(){return this.questionBase.value},t.prototype.updateDomElement=function(){if(this.control){var t=this.control,n=this.getValueCore();i.Helpers.isTwoValueEquals(n,t.value,!1,!0,!1)||(t.value=this.getValue(n))}e.prototype.updateDomElement.call(this)},t.prototype.getValue=function(e){return i.Helpers.isValueEmpty(e)?"":e},t}(h),f=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),m=function(e){function t(t){var n=e.call(this,t)||this;return n.element.cssClasses,n.rootRef=r.createRef(),n}return f(t,e),t.prototype.getStateElement=function(){return this.element},Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.row},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.props.css},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.rootRef.current&&this.element.setWrapperElement(this.rootRef.current)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.element.setWrapperElement(void 0)},t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(t.element!==this.element&&(t.element&&t.element.setWrapperElement(this.rootRef.current),this.element&&this.element.setWrapperElement(void 0)),this.element.cssClasses,!0)},t.prototype.renderElement=function(){var e=this.element,t=this.createElement(e,this.index),n=e.cssClassesValue;return r.createElement("div",{className:n.questionWrapper,style:e.rootStyle,"data-key":t.key,key:t.key,onFocus:function(){var t=e;t&&t.isQuestion&&t.focusIn()},ref:this.rootRef},this.row.isNeedRender?t:s.Instance.createElement(e.skeletonComponentName,{element:e,css:this.css}))},t.prototype.createElement=function(e,t){var n=t?"-"+t:0,r=e.getType();return s.Instance.isElementRegistered(r)||(r="question"),s.Instance.createElement(r,{key:e.name+n,element:e,creator:this.creator,survey:this.survey,css:this.css})},t}(c),y=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),g=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=r.createRef(),n.recalculateCss(),n}return y(t,e),t.prototype.recalculateCss=function(){this.row.visibleElements.map((function(e){return e.cssClasses}))},t.prototype.getStateElement=function(){return this.row},Object.defineProperty(t.prototype,"row",{get:function(){return this.props.row},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.props.css},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.row&&!!this.survey&&!!this.creator},t.prototype.renderElementContent=function(){var e=this,t=this.row.visibleElements.map((function(t,n){var o=n?"-"+n:0,i=t.name+o;return r.createElement(m,{element:t,index:n,row:e.row,survey:e.survey,creator:e.creator,css:e.css,key:i})}));return r.createElement("div",{ref:this.rootRef,className:this.row.getRowCss()},t)},t.prototype.renderElement=function(){var e=this.survey,t=this.renderElementContent();return a.wrapRow(e,t,this.row)||t},t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this);var n=this.rootRef.current;if(this.rootRef.current&&this.row.setRootElement(this.rootRef.current),n&&!this.row.isNeedRender){var r=n;setTimeout((function(){t.row.startLazyRendering(r)}),10)}},t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(t.row!==this.row&&(t.row.isNeedRender=this.row.isNeedRender,t.row.setRootElement(this.rootRef.current),this.row.setRootElement(void 0),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.row.setRootElement(void 0),this.stopLazyRendering()},t.prototype.createElement=function(e,t){var n=t?"-"+t:0,r=e.getType();return s.Instance.isElementRegistered(r)||(r="question"),s.Instance.createElement(r,{key:e.name+n,element:e,creator:this.creator,survey:this.survey,css:this.css})},t}(c),v=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),b=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=r.createRef(),n}return v(t,e),t.prototype.getStateElement=function(){return this.panelBase},t.prototype.canUsePropInState=function(t){return"elements"!==t&&e.prototype.canUsePropInState.call(this,t)},Object.defineProperty(t.prototype,"survey",{get:function(){return this.getSurvey()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.getCss()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panelBase",{get:function(){return this.getPanelBase()},enumerable:!1,configurable:!0}),t.prototype.getPanelBase=function(){return this.props.element||this.props.question},t.prototype.getSurvey=function(){return this.props.survey||(this.panelBase?this.panelBase.survey:null)},t.prototype.getCss=function(){return this.props.css},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.doAfterRender()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this);var t=this.rootRef.current;t&&t.removeAttribute("data-rendered")},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),t.page&&this.survey&&this.survey.activePage&&t.page.id===this.survey.activePage.id||this.doAfterRender()},t.prototype.doAfterRender=function(){var e=this.rootRef.current;e&&this.survey&&(this.panelBase.isPanel?this.survey.afterRenderPanel(this.panelBase,e):this.survey.afterRenderPage(e))},t.prototype.getIsVisible=function(){return this.panelBase.isVisible},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&!!this.survey&&!!this.panelBase&&!!this.panelBase.survey&&this.getIsVisible()},t.prototype.renderRows=function(e){var t=this;return this.panelBase.visibleRows.map((function(n){return t.createRow(n,e)}))},t.prototype.createRow=function(e,t){return r.createElement(g,{key:e.id,row:e,survey:this.survey,creator:this.creator,css:t})},t}(c),C=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),E=function(e){function t(t){var n=e.call(this,t)||this;return n.svgIconRef=o.a.createRef(),n}return C(t,e),t.prototype.updateSvg=function(){this.props.iconName&&Object(i.createSvg)(this.props.size,this.props.width,this.props.height,this.props.iconName,this.svgIconRef.current,this.props.title)},t.prototype.componentDidUpdate=function(){this.updateSvg()},t.prototype.render=function(){var e="sv-svg-icon";return this.props.className&&(e+=" "+this.props.className),this.props.iconName?o.a.createElement("svg",{className:e,style:this.props.style,onClick:this.props.onClick,ref:this.svgIconRef,role:"img"},o.a.createElement("use",null)):null},t.prototype.componentDidMount=function(){this.updateSvg()},t}(o.a.Component);s.Instance.registerElement("sv-svg-icon",(function(e){return o.a.createElement(E,e)}));var 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 "+this.props.cssClasses;return o.a.createElement("div",{className:e})},t}(o.a.Component);s.Instance.registerElement("sv-action-bar-separator",(function(e){return o.a.createElement(O,e)}));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)}}(),q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return P(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){var e=this.item.getActionRootCss(),t=this.item.needSeparator?o.a.createElement(O,null):null,n=s.Instance.createElement(this.item.component||"sv-action-bar-item",{item:this.item});return o.a.createElement("div",{className:e,id:this.item.id},o.a.createElement("div",{className:"sv-action__content"},t,n))},t}(c),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return P(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){return o.a.createElement(o.a.Fragment,null,this.renderInnerButton())},t.prototype.renderText=function(){if(!this.item.hasTitle)return null;var e=this.item.getActionBarItemTitleCss();return o.a.createElement("span",{className:e},this.item.title)},t.prototype.renderButtonContent=function(){var e=this.renderText(),t=this.item.iconName?o.a.createElement(E,{className:this.item.cssClasses.itemIcon,size:this.item.iconSize,iconName:this.item.iconName,title:this.item.tooltip||this.item.title}):null;return o.a.createElement(o.a.Fragment,null,t,e)},t.prototype.renderInnerButton=function(){var e=this,t=this.item.getActionBarItemCss(),n=this.item.tooltip||this.item.title,r=this.renderButtonContent(),i=this.item.disableTabStop?-1:void 0;return we(o.a.createElement("button",{className:t,type:"button",disabled:this.item.disabled,onClick:function(t){return e.item.action(e.item,e.item.getIsTrusted(t))},title:n,tabIndex:i,"aria-checked":this.item.ariaChecked,"aria-expanded":this.item.ariaExpanded,role:this.item.ariaRole},r),this.item,{processEsc:!1})},t}(c);s.Instance.registerElement("sv-action-bar-item",(function(e){return o.a.createElement(S,e)}));var x=n(2),_=n.n(x),I=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a 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.containerRef=o.a.createRef(),n.createModel(),n}return I(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.createModel=function(){this.popup=Object(i.createPopupViewModel)(this.props.model,void 0)},t.prototype.setTargetElement=function(){var e=this.containerRef.current;this.popup.setComponentElement(e,this.props.getTarget?this.props.getTarget(e):void 0,this.props.getArea?this.props.getArea(e):void 0)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.setTargetElement()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.setTargetElement()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.popup.resetComponentElement()},t.prototype.shouldComponentUpdate=function(t,n){var r;if(!e.prototype.shouldComponentUpdate.call(this,t,n))return!1;var o=t.model!==this.popup.model;return o&&(null===(r=this.popup)||void 0===r||r.dispose(),this.createModel()),o},t.prototype.render=function(){var e;return this.popup.model=this.model,e=this.model.isModal?o.a.createElement(T,{model:this.popup}):o.a.createElement(N,{model:this.popup}),o.a.createElement("div",{ref:this.containerRef},e)},t}(c);s.Instance.registerElement("sv-popup",(function(e){return o.a.createElement(V,e)}));var T=function(e){function t(t){var n=e.call(this,t)||this;return n.handleKeydown=function(e){n.model.onKeyDown(e)},n.clickInside=function(e){e.stopPropagation()},n}return I(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.model.isPositionSet&&this.model.isVisible&&this.model.updateOnShowing()},t.prototype.renderContainer=function(e){var t=this,n=e.showHeader?this.renderHeaderPopup(e):null,r=e.title?this.renderHeaderContent():null,i=this.renderContent(),s=e.showFooter?this.renderFooter(this.model):null;return o.a.createElement("div",{className:"sv-popup__container",style:{left:e.left,top:e.top,height:e.height,width:e.width,minWidth:e.minWidth},onClick:function(e){t.clickInside(e)}},o.a.createElement("div",{className:"sv-popup__shadow"},n,o.a.createElement("div",{className:"sv-popup__body-content"},r,o.a.createElement("div",{className:"sv-popup__scrolling-content"},i),s)))},t.prototype.renderHeaderContent=function(){return o.a.createElement("div",{className:"sv-popup__body-header"},this.model.title)},t.prototype.renderContent=function(){var e=s.Instance.createElement(this.model.contentComponentName,this.model.contentComponentData);return o.a.createElement("div",{className:"sv-popup__content"},e)},t.prototype.renderHeaderPopup=function(e){return null},t.prototype.renderFooter=function(e){return o.a.createElement("div",{className:"sv-popup__body-footer"},o.a.createElement(L,{model:e.footerToolbar}))},t.prototype.render=function(){var e=this,t=this.renderContainer(this.model),n=(new i.CssClassBuilder).append("sv-popup").append(this.model.styleClass).toString(),r={display:this.model.isVisible?"":"none"};return o.a.createElement("div",{tabIndex:-1,className:n,style:r,onClick:function(t){e.model.clickOutside(t)},onKeyDown:this.handleKeydown},t)},t}(c),N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return I(t,e),t.prototype.renderHeaderPopup=function(e){var t=e;return t?o.a.createElement("span",{style:{left:t.pointerTarget.left,top:t.pointerTarget.top},className:"sv-popup__pointer"}):null},t}(T);function A(e,t){var n=Object(i.createPopupModalViewModel)(e,t);return n.onVisibilityChanged.add((function(e,t){t.isVisible||(_.a.unmountComponentAtNode(n.container),n.dispose())})),_.a.render(o.a.createElement(T,{model:n}),n.container),n.model.isVisible=!0,n}i.settings.showModal=function(e,t,n,r,o,s,a){return void 0===a&&(a="popup"),A(Object(i.createDialogOptions)(e,t,n,r,void 0,void 0,o,s,a))},i.settings.showDialog=A;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)}}(),R=function(e){function t(t){var n=e.call(this,t)||this;return n.viewModel=new i.ActionDropdownViewModel(n.item),n}return j(t,e),t.prototype.renderInnerButton=function(){var t=e.prototype.renderInnerButton.call(this);return o.a.createElement(o.a.Fragment,null,t,o.a.createElement(V,{model:this.item.popupModel,getTarget:i.getActionDropdownButtonTarget}))},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.viewModel.dispose()},t}(S);s.Instance.registerElement("sv-action-bar-item-dropdown",(function(e){return o.a.createElement(R,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)}}(),L=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=o.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;t&&this.model.initResponsivityManager(t,(function(e){setTimeout(e)}))}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model.hasActions&&this.model.resetResponsivityManager()},t.prototype.componentDidUpdate=function(t,n){if(e.prototype.componentDidUpdate.call(this,t,n),t.model!=this.props.model&&this.model.hasActions){this.model.resetResponsivityManager();var r=this.rootRef.current;r&&this.model.initResponsivityManager(r,(function(e){setTimeout(e)}))}},t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){if(!this.model.hasActions)return null;var e=this.renderItems();return o.a.createElement("div",{ref:this.rootRef,className:this.model.getRootCss(),onClick:this.handleClick?function(e){e.stopPropagation()}:void 0},e)},t.prototype.renderItems=function(){return this.model.renderedActions.map((function(e,t){return o.a.createElement(q,{item:e,key:"item"+t})}))},t}(c);s.Instance.registerElement("sv-action-bar",(function(e){return o.a.createElement(L,e)}));var k=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),M=function(e){function t(t){return e.call(this,t)||this}return k(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){if(this.element.isTitleRenderedAsString)return c.renderLocString(this.element.locTitle);var e=this.renderTitleSpans(this.element.getTitleOwner(),this.cssClasses);return o.a.createElement(o.a.Fragment,null,e)},t.prototype.renderTitleSpans=function(e,t){var n=function(e){return o.a.createElement("span",{"data-key":e,key:e}," ")},r=[];e.isRequireTextOnStart&&(r.push(this.renderRequireText(e,t)),r.push(n("req-sp")));var i=e.no;if(i){var s=t.panel?t.panel.number:void 0;r.push(o.a.createElement("span",{"data-key":"q_num",key:"q_num",className:t.number||s,style:{position:"static"},"aria-hidden":!0},i)),r.push(n("num-sp"))}return e.isRequireTextBeforeTitle&&(r.push(this.renderRequireText(e,t)),r.push(n("req-sp"))),r.push(c.renderLocString(e.locTitle,null,"q_title")),e.isRequireTextAfterTitle&&(r.push(n("req-sp")),r.push(this.renderRequireText(e,t))),r},t.prototype.renderRequireText=function(e,t){return o.a.createElement("span",{"data-key":"req-text",key:"req-text",className:t.requiredText||t.panel.requiredText,"aria-hidden":!0},e.requiredText)},t}(o.a.Component),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)}}(),B=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return F(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=o.a.createElement(M,{element:this.element,cssClasses:this.cssClasses});return this.element.hasTitleActions?o.a.createElement("div",{className:"sv-title-actions"},o.a.createElement("span",{className:"sv-title-actions__title"},e),o.a.createElement(L,{model:this.element.getTitleToolbar()})):e},t}(o.a.Component);i.RendererFactory.Instance.registerRenderer("element","title-actions","sv-title-actions"),s.Instance.registerElement("sv-title-actions",(function(e){return o.a.createElement(B,e)}));var z=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),H=function(e){function t(t){return e.call(this,t)||this}return z(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.element;if(!e||!e.hasTitle)return null;var t=e.titleAriaLabel||void 0,n=o.a.createElement(B,{element:e,cssClasses:e.cssClasses}),r=void 0;e.hasTitleEvents&&(r=function(e){Object(i.doKey2ClickUp)(e.nativeEvent)});var s=e.titleTagName;return o.a.createElement(s,{className:e.cssTitle,id:e.ariaTitleId,"aria-label":t,tabIndex:e.titleTabIndex,"aria-expanded":e.titleAriaExpanded,role:e.titleAriaRole,onClick:void 0,onKeyUp:r},n)},t}(o.a.Component),W=function(){function e(){this.creatorHash={}}return e.prototype.registerQuestion=function(e,t){this.creatorHash[e]=t},e.prototype.getAllTypes=function(){var e=new Array;for(var t in this.creatorHash)e.push(t);return e.sort()},e.prototype.createQuestion=function(e,t){var n=this.creatorHash[e];return null==n?null:n(t)},e.Instance=new e,e}(),U=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getStateElement=function(){return this.props.counter},t.prototype.renderElement=function(){return o.a.createElement("div",{className:this.props.remainingCharacterCounter},this.props.counter.remainingCharacterCounter)},t}(c);s.Instance.registerElement("sv-character-counter",(function(e){return o.a.createElement(Q,e)}));var J=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),K=function(e){function t(t){return e.call(this,t)||this}return J(t,e),t.prototype.renderElement=function(){var e=this,t=this.question.isInputTextUpdate?void 0:this.updateValueOnEvent,n=this.question.renderedPlaceholder;if(this.question.isReadOnlyRenderDiv())return r.createElement("div",null,this.question.value);var o=this.question.getMaxLength()?r.createElement(Q,{counter:this.question.characterCounter,remainingCharacterCounter:this.question.cssClasses.remainingCharacterCounter}):null;return r.createElement(r.Fragment,null,r.createElement("textarea",{id:this.question.inputId,className:this.question.className,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,ref:function(t){return e.setControl(t)},maxLength:this.question.getMaxLength(),placeholder:n,onBlur:t,onInput:function(t){e.question.isInputTextUpdate?e.updateValueOnEvent(t):e.question.updateElement();var n=t.target.value;e.question.updateRemainingCharacterCounter(n)},onKeyDown:function(t){e.question.onKeyDown(t)},cols:this.question.cols,rows:this.question.rows,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage,style:{resize:this.question.resizeStyle}}),o)},t}(d),G=function(e){function t(t){var n=e.call(this,t)||this;return n.state={comment:n.getComment()||""},n}return J(t,e),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateDomElement()},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.updateDomElement()},t.prototype.updateDomElement=function(){if(this.control){var e=this.control,t=this.getComment()||"";i.Helpers.isTwoValueEquals(t,e.value,!1,!0,!1)||(e.value=t)}},t.prototype.setControl=function(e){e&&(this.control=e)},t.prototype.canRender=function(){return!!this.props.question},t.prototype.onCommentChange=function(e){this.props.question.onCommentChange(e)},t.prototype.onCommentInput=function(e){this.props.question.onCommentInput(e)},t.prototype.getComment=function(){return this.props.question.comment},t.prototype.setComment=function(e){this.props.question.comment=e},t.prototype.getId=function(){return this.props.question.commentId},t.prototype.getPlaceholder=function(){return this.props.question.renderedCommentPlaceholder},t.prototype.renderElement=function(){var e=this,t=this.props.question,n=this.props.otherCss||this.cssClasses.comment;if(t.isReadOnlyRenderDiv()){var o=this.getComment()||"";return r.createElement("div",null,o)}return r.createElement("textarea",{id:this.getId(),className:n,ref:function(t){return e.setControl(t)},disabled:this.isDisplayMode,maxLength:t.getOthersMaxLength(),placeholder:this.getPlaceholder(),onBlur:function(t){e.onCommentChange(t)},onInput:function(t){return e.onCommentInput(t)},"aria-required":t.isRequired||t.a11y_input_ariaRequired,"aria-label":t.ariaLabel||t.a11y_input_ariaLabel,style:{resize:t.resizeStyle}})},t}(p),Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return J(t,e),t.prototype.onCommentChange=function(e){this.props.question.onOtherValueChange(e)},t.prototype.onCommentInput=function(e){this.props.question.onOtherValueInput(e)},t.prototype.getComment=function(){return this.props.question.otherValue},t.prototype.setComment=function(e){this.props.question.otherValue=e},t.prototype.getId=function(){return this.props.question.otherId},t.prototype.getPlaceholder=function(){return this.props.question.otherPlaceholder},t}(G);W.Instance.registerQuestion("comment",(function(e){return r.createElement(K,e)}));var Z=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$=function(e){function t(t){var n=e.call(this,t)||this;return n.widgetRef=r.createRef(),n}return Z(t,e),t.prototype._afterRender=function(){if(this.questionBase.customWidget){var e=this.widgetRef.current;e&&(this.questionBase.customWidget.afterRender(this.questionBase,e),this.questionBase.customWidgetData.isNeedRender=!1)}},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.questionBase&&this._afterRender()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n);var r=!!this.questionBase.customWidget&&this.questionBase.customWidget.isDefaultRender;this.questionBase&&!r&&this._afterRender()},t.prototype.componentWillUnmount=function(){if(e.prototype.componentWillUnmount.call(this),this.questionBase.customWidget){var t=this.widgetRef.current;t&&this.questionBase.customWidget.willUnmount(this.questionBase,t)}},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&this.questionBase.visible},t.prototype.renderElement=function(){var e=this.questionBase.customWidget;if(e.isDefaultRender)return r.createElement("div",{ref:this.widgetRef},this.creator.createQuestionElement(this.questionBase));var t=null;if(e.widgetJson.render)t=e.widgetJson.render(this.questionBase);else if(e.htmlTemplate){var n={__html:e.htmlTemplate};return r.createElement("div",{ref:this.widgetRef,dangerouslySetInnerHTML:n})}return r.createElement("div",{ref:this.widgetRef},t)},t}(h),X=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return X(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.element,t=e.hasTitle?o.a.createElement(H,{element:e}):null,n=e.hasDescriptionUnderTitle?c.renderQuestionDescription(this.element):null,r=e.hasAdditionalTitleToolbar?o.a.createElement(L,{model:e.additionalTitleToolbar}):null,s={width:void 0};return e instanceof i.Question&&(s.width=e.titleWidth),o.a.createElement("div",{className:e.cssHeader,onClick:function(t){return e.clickTitleFunction&&e.clickTitleFunction(t.nativeEvent)},style:s},t,n,r)},t}(o.a.Component),te=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ne=function(e){function t(t){var n=e.call(this,t)||this;return n.isNeedFocus=!1,n.rootRef=r.createRef(),n}return te(t,e),t.renderQuestionBody=function(e,t){return t.customWidget?r.createElement($,{creator:e,question:t}):e.createQuestionElement(t)},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},t.prototype.renderQuestionContent=function(){var e=this.question,t={display:this.question.renderedIsExpanded?"":"none"},n=e.cssClasses,o=this.renderQuestion(),i=this.question.showErrorOnTop?this.renderErrors(n,"top"):null,s=this.question.showErrorOnBottom?this.renderErrors(n,"bottom"):null,a=e&&e.hasComment?this.renderComment(n):null,u=e.hasDescriptionUnderInput?this.renderDescription():null;return r.createElement("div",{className:e.cssContent||void 0,style:t,role:"presentation"},i,o,a,s,u)},t.prototype.renderElement=function(){var e=this.question,t=e.cssClasses,n=this.renderHeader(e),o=e.hasTitleOnLeftTop?n:null,i=e.hasTitleOnBottom?n:null,s=this.question.showErrorsAboveQuestion?this.renderErrors(t,""):null,a=this.question.showErrorsBelowQuestion?this.renderErrors(t,""):null,u=e.getRootStyle(),l=this.wrapQuestionContent(this.renderQuestionContent());return r.createElement(r.Fragment,null,r.createElement("div",{ref:this.rootRef,id:e.id,className:e.getRootCss(),style:u,role:e.ariaRole,"aria-required":this.question.ariaRequired,"aria-invalid":this.question.ariaInvalid,"aria-labelledby":e.ariaLabelledBy,"aria-describedby":e.ariaDescribedBy,"aria-expanded":null===e.ariaExpanded?void 0:"true"===e.ariaExpanded},s,o,l,i,a))},t.prototype.wrapElement=function(e){var t=this.question.survey,n=null;return t&&(n=a.wrapElement(t,e,this.question)),null!=n?n:e},t.prototype.wrapQuestionContent=function(e){var t=this.question.survey,n=null;return t&&(n=a.wrapQuestionContent(t,e,this.question)),null!=n?n:e},t.prototype.renderQuestion=function(){return t.renderQuestionBody(this.creator,this.question)},t.prototype.renderDescription=function(){return c.renderQuestionDescription(this.question)},t.prototype.renderComment=function(e){var t=c.renderLocString(this.question.locCommentText);return r.createElement("div",{className:this.question.getCommentAreaCss()},r.createElement("div",null,t),r.createElement(G,{question:this.question,cssClasses:e,otherCss:e.other,isDisplayMode:this.question.isInputReadOnly}))},t.prototype.renderHeader=function(e){return r.createElement(ee,{element:e})},t.prototype.renderErrors=function(e,t){return r.createElement(re,{element:this.question,cssClasses:e,creator:this.creator,location:t,id:this.question.id+"_errors"})},t}(c);s.Instance.registerElement("question",(function(e){return r.createElement(ne,e)}));var re=function(e){function t(t){var n=e.call(this,t)||this;return n.state=n.getState(),n}return te(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this.props.element.id+"_errors"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this.props.location},enumerable:!1,configurable:!0}),t.prototype.getState=function(e){return void 0===e&&(e=null),e?{error:e.error+1}:{error:0}},t.prototype.canRender=function(){return!!this.element&&this.element.hasVisibleErrors},t.prototype.componentWillUnmount=function(){},t.prototype.renderElement=function(){for(var e=[],t=0;t<this.element.errors.length;t++){var n="error"+t;e.push(this.creator.renderError(n,this.element.errors[t],this.cssClasses,this.element))}return r.createElement("div",{role:"alert","aria-live":"polite",className:this.element.cssError,id:this.id},e)},t}(p),oe=function(e){function t(t){return e.call(this,t)||this}return te(t,e),t.prototype.getStateElement=function(){return this.question},Object.defineProperty(t.prototype,"question",{get:function(){return this.getQuestion()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.getQuestion=function(){return this.props.question},Object.defineProperty(t.prototype,"itemCss",{get:function(){return this.props.itemCss},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.doAfterRender()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.doAfterRender()},t.prototype.doAfterRender=function(){},t.prototype.canRender=function(){return!!this.question},t.prototype.renderContent=function(){var e=this.renderQuestion();return r.createElement(r.Fragment,null,e)},t.prototype.getShowErrors=function(){return this.question.isVisible},t.prototype.renderQuestion=function(){return ne.renderQuestionBody(this.creator,this.question)},t}(p),ie=function(e){function t(t){var n=e.call(this,t)||this;return n.cellRef=r.createRef(),n}return te(t,e),t.prototype.componentWillUnmount=function(){if(e.prototype.componentWillUnmount.call(this),this.question){var t=this.cellRef.current;t&&t.removeAttribute("data-rendered")}},t.prototype.renderCellContent=function(){return r.createElement("div",{className:this.props.cell.cellQuestionWrapperClassName},this.renderQuestion())},t.prototype.renderElement=function(){var e=this.getCellStyle(),t=this.props.cell;return r.createElement("td",{ref:this.cellRef,className:this.itemCss,colSpan:t.colSpans,title:t.getTitle(),style:e,onFocus:function(){t.focusIn()}},this.wrapCell(this.props.cell,this.renderCellContent()))},t.prototype.getCellStyle=function(){return null},t.prototype.getHeaderText=function(){return""},t.prototype.wrapCell=function(e,t){if(!e)return t;var n=this.question.survey,r=null;return n&&(r=a.wrapMatrixCell(n,t,e,this.props.reason)),null!=r?r:t},t}(oe),se=function(e){function t(t){var n=e.call(this,t)||this;return n.state={changed:0},n.question&&n.registerCallback(n.question),n}return te(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.update=function(){this.setState({changed:this.state.changed+1})},t.prototype.registerCallback=function(e){var t=this;e.registerFunctionOnPropertyValueChanged("errors",(function(){t.update()}),"__reactSubscription")},t.prototype.unRegisterCallback=function(e){e.unRegisterFunctionOnPropertyValueChanged("errors","__reactSubscription")},t.prototype.componentDidUpdate=function(e){e.question&&e.question!==this.question&&this.unRegisterCallback(e.cell),this.question&&this.registerCallback(this.question)},t.prototype.componentWillUnmount=function(){this.question&&this.unRegisterCallback(this.question)},t.prototype.render=function(){return r.createElement(re,{element:this.question,creator:this.props.creator,cssClasses:this.question.cssClasses})},t}(r.Component),ae=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ue=function(e){function t(t){return e.call(this,t)||this}return ae(t,e),t.prototype.getPanelBase=function(){return this.props.page},Object.defineProperty(t.prototype,"page",{get:function(){return this.panelBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this.renderTitle(),t=this.renderDescription(),n=this.renderRows(this.panelBase.cssClasses),o=r.createElement(re,{element:this.panelBase,cssClasses:this.panelBase.cssClasses,creator:this.creator});return r.createElement("div",{ref:this.rootRef,className:this.page.cssRoot},e,t,o,n)},t.prototype.renderTitle=function(){return r.createElement(H,{element:this.page})},t.prototype.renderDescription=function(){if(!this.page._showDescription)return null;var e=c.renderLocString(this.page.locDescription);return r.createElement("div",{className:this.panelBase.cssClasses.page.description},e)},t}(b),le=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ce=function(e){function t(t){var n=e.call(this,t)||this;return n.state={changed:0},n.rootRef=o.a.createRef(),n}return le(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.survey.css},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var e=this;this.survey.afterRenderHeader(this.rootRef.current),this.survey.locLogo.onChanged=function(){e.setState({changed:e.state.changed+1})}},t.prototype.componentWillUnmount=function(){this.survey.locLogo.onChanged=function(){}},t.prototype.renderTitle=function(){if(!this.survey.renderedHasTitle)return null;var e=c.renderLocString(this.survey.locDescription);return o.a.createElement("div",{className:this.css.headerText,style:{maxWidth:this.survey.titleMaxWidth}},o.a.createElement(H,{element:this.survey}),this.survey.renderedHasDescription?o.a.createElement("div",{className:this.css.description},e):null)},t.prototype.renderLogoImage=function(e){if(!e)return null;var t=this.survey.getElementWrapperComponentName(this.survey,"logo-image"),n=this.survey.getElementWrapperComponentData(this.survey,"logo-image");return s.Instance.createElement(t,{data:n})},t.prototype.render=function(){return this.survey.renderedHasHeader?o.a.createElement("div",{className:this.css.header,ref:this.rootRef},this.renderLogoImage(this.survey.isLogoBefore),this.renderTitle(),this.renderLogoImage(this.survey.isLogoAfter),o.a.createElement("div",{className:this.css.headerClose})):null},t}(o.a.Component);s.Instance.registerElement("survey-header",(function(e){return o.a.createElement(ce,e)}));var pe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),he=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return pe(t,e),t.prototype.render=function(){return o.a.createElement("div",{className:"sv-brand-info"},o.a.createElement("a",{className:"sv-brand-info__logo",href:"https://surveyjs.io/?utm_source=built-in_links&utm_medium=online_survey_tool&utm_campaign=landing_page"},o.a.createElement("img",{src:"https://surveyjs.io/Content/Images/poweredby.svg"})),o.a.createElement("div",{className:"sv-brand-info__text"},"Try and see how easy it is to ",o.a.createElement("a",{href:"https://surveyjs.io/create-survey?utm_source=built-in_links&utm_medium=online_survey_tool&utm_campaign=create_survey"},"create a survey")),o.a.createElement("div",{className:"sv-brand-info__terms"},o.a.createElement("a",{href:"https://surveyjs.io/TermsOfUse"},"Terms of Use & Privacy Statement")))},t}(o.a.Component),de=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return de(t,e),Object.defineProperty(t.prototype,"notifier",{get:function(){return this.props.notifier},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.notifier},t.prototype.renderElement=function(){if(!this.notifier.isDisplayed)return null;var e={visibility:this.notifier.active?"visible":"hidden"};return o.a.createElement("div",{className:this.notifier.css,style:e,role:"alert","aria-live":"polite"},o.a.createElement("span",null,this.notifier.message),o.a.createElement(L,{model:this.notifier.actionBar}))},t}(c);s.Instance.registerElement("sv-notifier",(function(e){return o.a.createElement(fe,e)}));var me=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return me(t,e),t.prototype.render=function(){var e=this,t=this.props.survey.getContainerContent(this.props.container),n=!1!==this.props.needRenderWrapper;return 0==t.length?null:n?o.a.createElement("div",{className:"sv-components-column sv-components-container-"+this.props.container},t.map((function(t){return s.Instance.createElement(t.component,{survey:e.props.survey,model:t.data,container:e.props.container,key:t.id})}))):o.a.createElement(o.a.Fragment,null,t.map((function(t){return s.Instance.createElement(t.component,{survey:e.props.survey,model:t.data,container:e.props.container,key:t.id})})))},t}(o.a.Component);s.Instance.registerElement("sv-components-container",(function(e){return o.a.createElement(ye,e)}));var ge=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ve=function(e){function t(t){var n=e.call(this,t)||this;return n.containerRef=o.a.createRef(),n}return ge(t,e),t.prototype.componentDidMount=function(){this.containerRef.current&&(this.containerRef.current.innerHTML=i.SvgRegistry.iconsRenderedHtml())},t.prototype.render=function(){return o.a.createElement("svg",{style:{display:"none"},id:"sv-icon-holder-global-container",ref:this.containerRef})},t}(o.a.Component),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(){return(Ce=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ee=function(e){function t(t){var n=e.call(this,t)||this;return n.previousJSON={},n.isSurveyUpdated=!1,n.createSurvey(t),n.updateSurvey(t,{}),n.rootRef=r.createRef(),n.rootNodeId=t.id||null,n.rootNodeClassName=t.className||"",n}return be(t,e),Object.defineProperty(t,"cssType",{get:function(){return i.surveyCss.currentType},set:function(e){i.StylesManager.applyTheme(e)},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.survey},t.prototype.onSurveyUpdated=function(){if(this.survey){var e=this.rootRef.current;e&&this.survey.afterRenderSurvey(e),this.survey.startTimerFromUI()}},t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(this.isModelJSONChanged(t)&&(this.destroySurvey(),this.createSurvey(t),this.updateSurvey(t,{}),this.isSurveyUpdated=!0),!0)},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateSurvey(this.props,t),this.isSurveyUpdated&&(this.onSurveyUpdated(),this.isSurveyUpdated=!1)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.onSurveyUpdated()},t.prototype.destroySurvey=function(){this.survey&&(this.survey.renderCallback=void 0,this.survey.onPartialSend.clear(),this.survey.stopTimer(),this.survey.destroyResizeObserver())},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.destroySurvey()},t.prototype.doRender=function(){var e;e="completed"==this.survey.state?this.renderCompleted():"completedbefore"==this.survey.state?this.renderCompletedBefore():"loading"==this.survey.state?this.renderLoading():"empty"==this.survey.state?this.renderEmptySurvey():this.renderSurvey();var t=this.survey.backgroundImage?r.createElement("div",{className:this.css.rootBackgroundImage,style:this.survey.backgroundImageStyle}):null,n="basic"===this.survey.headerView?r.createElement(ce,{survey:this.survey}):null,o=r.createElement("div",{className:"sv_custom_header"});this.survey.hasLogo&&(o=null);var i=this.survey.getRootCss(),s=this.rootNodeClassName?this.rootNodeClassName+" "+i:i;return r.createElement("div",{id:this.rootNodeId,ref:this.rootRef,className:s,style:this.survey.themeVariables},this.survey.needRenderIcons?r.createElement(ve,null):null,r.createElement("div",{className:this.survey.wrapperFormCss},t,r.createElement("form",{onSubmit:function(e){e.preventDefault()}},o,r.createElement("div",{className:this.css.container},n,r.createElement(ye,{survey:this.survey,container:"header",needRenderWrapper:!1}),e,r.createElement(ye,{survey:this.survey,container:"footer",needRenderWrapper:!1}))),this.survey.showBrandInfo?r.createElement(he,null):null,r.createElement(fe,{notifier:this.survey.notifier})))},t.prototype.renderElement=function(){return this.doRender()},Object.defineProperty(t.prototype,"css",{get:function(){return this.survey.css},set:function(e){this.survey.css=e},enumerable:!1,configurable:!0}),t.prototype.renderCompleted=function(){if(!this.survey.showCompletedPage)return null;var e={__html:this.survey.processedCompletedHtml};return r.createElement(r.Fragment,null,r.createElement("div",{dangerouslySetInnerHTML:e,className:this.survey.completedCss}),r.createElement(ye,{survey:this.survey,container:"completePage",needRenderWrapper:!1}))},t.prototype.renderCompletedBefore=function(){var e={__html:this.survey.processedCompletedBeforeHtml};return r.createElement("div",{dangerouslySetInnerHTML:e,className:this.survey.completedBeforeCss})},t.prototype.renderLoading=function(){var e={__html:this.survey.processedLoadingHtml};return r.createElement("div",{dangerouslySetInnerHTML:e,className:this.survey.loadingBodyCss})},t.prototype.renderSurvey=function(){var e=this.survey.activePage?this.renderPage(this.survey.activePage):null,t=(this.survey.isShowStartingPage,this.survey.activePage?this.survey.activePage.id:""),n=this.survey.bodyCss,o={};return this.survey.renderedWidth&&(o.maxWidth=this.survey.renderedWidth),r.createElement("div",{className:this.survey.bodyContainerCss},r.createElement(ye,{survey:this.survey,container:"left"}),r.createElement("div",{className:"sv-components-column sv-components-column--expandable"},r.createElement(ye,{survey:this.survey,container:"center"}),r.createElement("div",{id:t,className:n,style:o},r.createElement(ye,{survey:this.survey,container:"contentTop"}),e,r.createElement(ye,{survey:this.survey,container:"contentBottom"}))),r.createElement(ye,{survey:this.survey,container:"right"}))},t.prototype.renderPage=function(e){return r.createElement(ue,{survey:this.survey,page:e,css:this.css,creator:this})},t.prototype.renderEmptySurvey=function(){return r.createElement("div",{className:this.css.bodyEmpty},this.survey.emptySurveyText)},t.prototype.createSurvey=function(e){e||(e={}),this.previousJSON={},e?e.model?this.survey=e.model:e.json&&(this.previousJSON=e.json,this.survey=new i.SurveyModel(e.json)):this.survey=new i.SurveyModel,e.css&&(this.survey.css=this.css),this.setSurveyEvents()},t.prototype.isModelJSONChanged=function(e){return e.model?this.survey!==e.model:!!e.json&&!i.Helpers.isTwoValueEquals(e.json,this.previousJSON)},t.prototype.updateSurvey=function(e,t){if(e)for(var n in t=t||{},e)"model"!=n&&"children"!=n&&"json"!=n&&("css"!=n?e[n]!==t[n]&&(0==n.indexOf("on")&&this.survey[n]&&this.survey[n].add?(t[n]&&this.survey[n].remove(t[n]),this.survey[n].add(e[n])):this.survey[n]=e[n]):(this.survey.mergeValues(e.css,this.survey.getCss()),this.survey.updateNavigationCss(),this.survey.updateElementCss()))},t.prototype.setSurveyEvents=function(){var e=this;this.survey.renderCallback=function(){var t=e.state&&e.state.modelChanged?e.state.modelChanged:0;e.setState({modelChanged:t+1})},this.survey.onPartialSend.add((function(t){e.state&&e.setState(e.state)}))},t.prototype.createQuestionElement=function(e){return W.Instance.createQuestion(e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isInputReadOnly,creator:this})},t.prototype.renderError=function(e,t,n,r){return s.Instance.createElement(this.survey.questionErrorComponent,{key:e,error:t,cssClasses:n,element:r})},t.prototype.questionTitleLocation=function(){return this.survey.questionTitleLocation},t.prototype.questionErrorLocation=function(){return this.survey.questionErrorLocation},t}(c);function we(e,t,n){return void 0===n&&(n={processEsc:!0,disableTabStop:!1}),t&&t.disableTabStop||n&&n.disableTabStop?r.cloneElement(e,{tabIndex:-1}):(n=Ce({},n),r.cloneElement(e,{tabIndex:0,onKeyUp:function(e){return e.preventDefault(),e.stopPropagation(),Object(i.doKey2ClickUp)(e,n),!1},onKeyDown:function(e){return Object(i.doKey2ClickDown)(e,n)},onBlur:function(e){return Object(i.doKey2ClickBlur)(e)}}))}s.Instance.registerElement("survey",(function(e){return r.createElement(Ee,e)}));var Oe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a 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.updateStateFunction=null,n.state={update:0},n}return Oe(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.props.css||this.survey.css},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(this.survey){var e=this;this.updateStateFunction=function(){e.setState({update:e.state.update+1})},this.survey.onPageVisibleChanged.add(this.updateStateFunction)}},t.prototype.componentWillUnmount=function(){this.survey&&this.updateStateFunction&&(this.survey.onPageVisibleChanged.remove(this.updateStateFunction),this.updateStateFunction=null)},t}(r.Component),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)}}(),Se=function(e){function t(t){var n=e.call(this,t)||this;return n.circleLength=440,n}return qe(t,e),t.prototype.getStateElement=function(){return this.timerModel},Object.defineProperty(t.prototype,"timerModel",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progress",{get:function(){return-this.timerModel.progress*this.circleLength},enumerable:!1,configurable:!0}),t.prototype.render=function(){if(!this.timerModel.isRunning)return null;var e=r.createElement("div",{className:this.timerModel.survey.getCss().timerRoot},this.timerModel.text);if(this.timerModel.showTimerAsClock){var t={strokeDasharray:this.circleLength,strokeDashoffset:this.progress},n=this.timerModel.showProgress?r.createElement(E,{className:this.timerModel.getProgressCss(),style:t,iconName:"icon-timercircle",size:"auto"}):null;e=r.createElement("div",{className:this.timerModel.rootCss},n,r.createElement("div",{className:this.timerModel.textContainerCss},r.createElement("span",{className:this.timerModel.majorTextCss},this.timerModel.clockMajorText),this.timerModel.clockMinorText?r.createElement("span",{className:this.timerModel.minorTextCss},this.timerModel.clockMinorText):null))}return e},t}(p);s.Instance.registerElement("sv-timerpanel",(function(e){return r.createElement(Se,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)}}(),_e=function(e){function t(t){var n=e.call(this,t)||this;return n.hasBeenExpanded=!1,n}return xe(t,e),Object.defineProperty(t.prototype,"panel",{get:function(){return this.panelBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.renderHeader(),n=r.createElement(re,{element:this.panelBase,cssClasses:this.panelBase.cssClasses,creator:this.creator}),o={paddingLeft:this.panel.innerPaddingLeft,display:this.panel.renderedIsExpanded?void 0:"none"},i=null;if(this.panel.renderedIsExpanded){var s=this.renderRows(this.panelBase.cssClasses),a=this.panelBase.cssClasses.panel.content;i=this.renderContent(o,s,a)}return r.createElement("div",{ref:this.rootRef,className:this.panelBase.getContainerCss(),onFocus:function(){e.panelBase&&e.panelBase.focusIn()},id:this.panelBase.id},this.panel.showErrorsAbovePanel?n:null,t,this.panel.showErrorsAbovePanel?null:n,i)},t.prototype.renderHeader=function(){return this.panel.hasTitle||this.panel.hasDescription?r.createElement(ee,{element:this.panel}):null},t.prototype.wrapElement=function(e){var t=this.panel.survey,n=null;return t&&(n=a.wrapElement(t,e,this.panel)),null!=n?n:e},t.prototype.renderContent=function(e,t,n){var o=this.renderBottom();return r.createElement("div",{style:e,className:n,id:this.panel.contentId},t,o)},t.prototype.renderTitle=function(){return this.panelBase.title?r.createElement(H,{element:this.panelBase}):null},t.prototype.renderDescription=function(){if(!this.panelBase.description)return null;var e=c.renderLocString(this.panelBase.locDescription);return r.createElement("div",{className:this.panel.cssClasses.panel.description},e)},t.prototype.renderBottom=function(){var e=this.panel.getFooterToolbar();return e.hasActions?r.createElement(L,{model:e}):null},t.prototype.getIsVisible=function(){return this.panelBase.getIsContentVisible()},t}(b);s.Instance.registerElement("panel",(function(e){return r.createElement(_e,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)}}(),Ve=function(e){function t(t){return e.call(this,t)||this}return Ie(t,e),Object.defineProperty(t.prototype,"flowPanel",{get:function(){return this.panel},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.flowPanel&&(this.flowPanel.onCustomHtmlProducing=function(){return""},this.flowPanel.onGetHtmlForQuestion=this.renderQuestion)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.flowPanel&&(this.flowPanel.onCustomHtmlProducing=null,this.flowPanel.onGetHtmlForQuestion=null)},t.prototype.getQuestion=function(e){return this.flowPanel.getQuestionByName(e)},t.prototype.renderQuestion=function(e){return"<question>"+e.name+"</question>"},t.prototype.renderRows=function(){var e=this.renderHtml();return e?[e]:[]},t.prototype.getNodeIndex=function(){return this.renderedIndex++},t.prototype.renderHtml=function(){if(!this.flowPanel)return null;var e="<span>"+this.flowPanel.produceHtml()+"</span>";if(!DOMParser){var t={__html:e};return r.createElement("div",{dangerouslySetInnerHTML:t})}var n=(new DOMParser).parseFromString(e,"text/xml");return this.renderedIndex=0,this.renderParentNode(n)},t.prototype.renderNodes=function(e){for(var t=[],n=0;n<e.length;n++){var r=this.renderNode(e[n]);r&&t.push(r)}return t},t.prototype.getStyle=function(e){var t={};return"b"===e.toLowerCase()&&(t.fontWeight="bold"),"i"===e.toLowerCase()&&(t.fontStyle="italic"),"u"===e.toLowerCase()&&(t.textDecoration="underline"),t},t.prototype.renderParentNode=function(e){var t=e.nodeName.toLowerCase(),n=this.renderNodes(this.getChildDomNodes(e));return"div"===t?r.createElement("div",{key:this.getNodeIndex()},n):r.createElement("span",{key:this.getNodeIndex(),style:this.getStyle(t)},n)},t.prototype.renderNode=function(e){if(!this.hasTextChildNodesOnly(e))return this.renderParentNode(e);var t=e.nodeName.toLowerCase();if("question"===t){var n=this.flowPanel.getQuestionByName(e.textContent);if(!n)return null;var o=r.createElement(ne,{key:n.name,element:n,creator:this.creator,css:this.css});return r.createElement("span",{key:this.getNodeIndex()},o)}return"div"===t?r.createElement("div",{key:this.getNodeIndex()},e.textContent):r.createElement("span",{key:this.getNodeIndex(),style:this.getStyle(t)},e.textContent)},t.prototype.getChildDomNodes=function(e){for(var t=[],n=0;n<e.childNodes.length;n++)t.push(e.childNodes[n]);return t},t.prototype.hasTextChildNodesOnly=function(e){for(var t=e.childNodes,n=0;n<t.length;n++)if("#text"!==t[n].nodeName.toLowerCase())return!1;return!0},t.prototype.renderContent=function(e,t){return r.createElement("f-panel",{style:e},t)},t}(_e);s.Instance.registerElement("flowpanel",(function(e){return r.createElement(Ve,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)}}(),Ne=function(e){function t(t){return e.call(this,t)||this}return Te(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses;return r.createElement("fieldset",{className:this.question.getSelectBaseRootCss(),ref:function(t){return e.setControl(t)},role:this.question.a11y_input_ariaRole,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage},r.createElement("legend",{className:"sv-hidden"},this.question.locTitle.renderedHtml),this.getHeader(),this.question.hasColumns?this.getColumnedBody(t):this.getBody(t),this.getFooter(),this.question.isOtherSelected?this.renderOther():null)},t.prototype.getHeader=function(){var e=this;if(this.question.hasHeadItems)return this.question.headItems.map((function(t,n){return e.renderItem("item_h"+n,t,!1,e.question.cssClasses)}))},t.prototype.getFooter=function(){var e=this;if(this.question.hasFootItems)return this.question.footItems.map((function(t,n){return e.renderItem("item_f"+n,t,!1,e.question.cssClasses)}))},t.prototype.getColumnedBody=function(e){return r.createElement("div",{className:e.rootMultiColumn},this.getColumns(e))},t.prototype.getColumns=function(e){var t=this;return this.question.columns.map((function(n,o){var i=n.map((function(n,r){return t.renderItem("item"+r,n,0===o&&0===r,e,""+o+r)}));return r.createElement("div",{key:"column"+o,className:t.question.getColumnClass(),role:"presentation"},i)}))},t.prototype.getBody=function(e){return this.question.blockedRow?r.createElement("div",{className:e.rootRow},this.getItems(e,this.question.dataChoices)):r.createElement(r.Fragment,null,this.getItems(e,this.question.bodyItems))},t.prototype.getItems=function(e,t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i="item"+r,s=this.renderItem(i,o,0==r,e,""+r);s&&n.push(s)}return n},Object.defineProperty(t.prototype,"textStyle",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.renderOther=function(){var e=this.question.cssClasses;return r.createElement("div",{className:this.question.getCommentAreaCss(!0)},r.createElement(Y,{question:this.question,otherCss:e.other,cssClasses:e,isDisplayMode:this.isDisplayMode}))},t.prototype.renderItem=function(e,t,n,r,o){var i=s.Instance.createElement(this.question.itemComponent,{key:e,question:this.question,cssClasses:r,isDisplayMode:this.isDisplayMode,item:t,textStyle:this.textStyle,index:o,isFirst:n}),u=this.question.survey,l=null;return u&&i&&(l=a.wrapItemValue(u,i,this.question,t)),null!=l?l:i},t}(h),Ae=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=function(e){n.question.clickItemHandler(n.item,e.target.checked)},n}return Te(t,e),t.prototype.getStateElement=function(){return this.item},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textStyle",{get:function(){return this.props.textStyle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isFirst",{get:function(){return this.props.isFirst},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hideCaption",{get:function(){return!0===this.props.hideCaption},enumerable:!1,configurable:!0}),t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(!!this.question&&!(this.question.customWidget&&!this.question.customWidgetData.isNeedRender&&!this.question.customWidget.widgetJson.isDefaultRender&&!this.question.customWidget.widgetJson.render))},t.prototype.canRender=function(){return!!this.item&&!!this.question},t.prototype.renderElement=function(){var e=this.question.isItemSelected(this.item);return this.renderCheckbox(e,null)},Object.defineProperty(t.prototype,"inputStyle",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.renderCheckbox=function(e,t){var n=this.question.getItemId(this.item),o=this.question.getItemClass(this.item),i=this.question.getLabelClass(this.item),s=this.hideCaption?null:r.createElement("span",{className:this.cssClasses.controlLabel},this.renderLocString(this.item.locText,this.textStyle));return r.createElement("div",{className:o,role:"presentation"},r.createElement("label",{className:i},r.createElement("input",{className:this.cssClasses.itemControl,type:"checkbox",role:"option",name:this.question.name+this.item.id,value:this.item.value,id:n,style:this.inputStyle,disabled:!this.question.getItemEnabled(this.item),readOnly:this.question.isReadOnlyAttr,checked:e,onChange:this.handleOnChange}),this.cssClasses.materialDecorator?r.createElement("span",{className:this.cssClasses.materialDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:this.cssClasses.itemDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,s),t)},t}(p);s.Instance.registerElement("survey-checkbox-item",(function(e){return r.createElement(Ae,e)})),W.Instance.registerQuestion("checkbox",(function(e){return r.createElement(Ne,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)}}(),Re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return je(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this;if(this.question.selectToRankEnabled){return r.createElement("div",{className:this.question.rootClass,ref:function(t){return e.setControl(t)}},r.createElement("div",{className:this.question.getContainerClasses("from"),"data-ranking":"from-container"},this.getItems(this.question.renderedUnRankingChoices,!0),0===this.question.renderedUnRankingChoices.length?r.createElement("div",{className:this.question.cssClasses.containerPlaceholder}," ",this.renderLocString(this.question.locSelectToRankEmptyRankedAreaText)," "):null),r.createElement("div",{className:this.question.cssClasses.containersDivider}),r.createElement("div",{className:this.question.getContainerClasses("to"),"data-ranking":"to-container"},this.getItems(),0===this.question.renderedRankingChoices.length?r.createElement("div",{className:this.question.cssClasses.containerPlaceholder}," ",this.renderLocString(this.question.locSelectToRankEmptyUnrankedAreaText)," "):null))}return r.createElement("div",{className:this.question.rootClass,ref:function(t){return e.setControl(t)}},this.getItems())},t.prototype.getItems=function(e,t){var n=this;void 0===e&&(e=this.question.renderedRankingChoices);for(var r=[],o=function(o){var s=e[o];r.push(i.renderItem(s,o,(function(e){n.question.handleKeydown.call(n.question,e,s)}),(function(e){e.persist(),n.question.handlePointerDown.call(n.question,e,s,e.currentTarget)}),(function(e){e.persist(),n.question.handlePointerUp.call(n.question,e,s,e.currentTarget)}),i.question.cssClasses,i.question.getItemClass(s),i.question,t))},i=this,s=0;s<e.length;s++)o(s);return r},t.prototype.renderItem=function(e,t,n,o,i,s,u,l,c){e.renderedId;var p=this.renderLocString(e.locText),h=t,d=this.question.getNumberByIndex(h),f=this.question.getItemTabIndex(e),m=r.createElement(De,{key:e.value,text:p,index:h,indexText:d,itemTabIndex:f,handleKeydown:n,handlePointerDown:o,handlePointerUp:i,cssClasses:s,itemClass:u,question:l,unrankedItem:c,item:e}),y=this.question.survey,g=null;return y&&(g=a.wrapItemValue(y,m,this.question,e)),null!=g?g:m},t}(h),De=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return je(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,"handlePointerUp",{get:function(){return this.props.handlePointerUp},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemClass",{get:function(){return this.props.itemClass},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemTabIndex",{get:function(){return this.props.itemTabIndex},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"unrankedItem",{get:function(){return this.props.unrankedItem},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.renderEmptyIcon=function(){return r.createElement("svg",null,r.createElement("use",{xlinkHref:this.question.dashSvgIcon}))},t.prototype.renderElement=function(){var e=s.Instance.createElement(this.question.itemComponent,{item:this.item,cssClasses:this.cssClasses});return r.createElement("div",{tabIndex:this.itemTabIndex,className:this.itemClass,onKeyDown:this.handleKeydown,onPointerDown:this.handlePointerDown,onPointerUp:this.handlePointerUp,"data-sv-drop-target-ranking-item":this.index},r.createElement("div",{tabIndex:-1,style:{outline:"none"}},r.createElement("div",{className:this.cssClasses.itemGhostNode}),r.createElement("div",{className:this.cssClasses.itemContent},r.createElement("div",{className:this.cssClasses.itemIconContainer},r.createElement("svg",{className:this.question.getIconHoverCss()},r.createElement("use",{xlinkHref:this.question.dragDropSvgIcon})),r.createElement("svg",{className:this.question.getIconFocusCss()},r.createElement("use",{xlinkHref:this.question.arrowsSvgIcon}))),r.createElement("div",{className:this.question.getItemIndexClasses(this.item)},!this.unrankedItem&&this.indexText?this.indexText:this.renderEmptyIcon()),e)))},t}(p),Le=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return je(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return r.createElement("div",{className:this.cssClasses.controlLabel},c.renderLocString(this.item.locText))},t}(p);s.Instance.registerElement("sv-ranking-item",(function(e){return r.createElement(Le,e)})),W.Instance.registerQuestion("ranking",(function(e){return r.createElement(Re,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)}}(),Me=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnMouseDown=n.handleOnMouseDown.bind(n),n}return ke(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.handleOnMouseDown=function(e){this.question.onMouseDown()},t}(c),Fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ke(t,e),t.prototype.render=function(){var e=this.renderLocString(this.item.locText);return o.a.createElement("label",{onMouseDown:this.handleOnMouseDown,className:this.question.getItemClassByText(this.item.itemValue,this.item.text)},o.a.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.questionName,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:function(){},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage}),o.a.createElement("span",{className:this.question.cssClasses.itemText},e))},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this)},t}(Me);s.Instance.registerElement("sv-rating-item",(function(e){return o.a.createElement(Fe,e)}));var 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)}}(),ze=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Be(t,e),t.prototype.render=function(){var e=this;return o.a.createElement("label",{onMouseDown:this.handleOnMouseDown,className:this.question.getItemClass(this.item.itemValue),onMouseOver:function(t){return e.question.onItemMouseIn(e.item)},onMouseOut:function(t){return e.question.onItemMouseOut(e.item)}},o.a.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.questionName,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:function(){},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage}),o.a.createElement(E,{className:"sv-star",size:"auto",iconName:this.question.itemStarIcon,title:this.item.text}),o.a.createElement(E,{className:"sv-star-2",size:"auto",iconName:this.question.itemStarIconAlt,title:this.item.text}))},t}(Me);s.Instance.registerElement("sv-rating-item-star",(function(e){return o.a.createElement(ze,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)}}(),We=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return He(t,e),t.prototype.render=function(){var e=this;return o.a.createElement("label",{onMouseDown:this.handleOnMouseDown,style:this.question.getItemStyle(this.item.itemValue,this.item.highlight),className:this.question.getItemClass(this.item.itemValue),onMouseOver:function(t){return e.question.onItemMouseIn(e.item)},onMouseOut:function(t){return e.question.onItemMouseOut(e.item)}},o.a.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.questionName,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:function(){},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage}),o.a.createElement(E,{size:"auto",iconName:this.question.getItemSmileyIconName(this.item.itemValue),title:this.item.text}))},t}(Me);s.Instance.registerElement("sv-rating-item-smiley",(function(e){return o.a.createElement(We,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)}}(),Qe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ue(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){if(!this.item)return null;var e=this.props.item,t=this.renderDescription(e);return o.a.createElement("div",{className:"sd-rating-dropdown-item"},o.a.createElement("span",{className:"sd-rating-dropdown-item_text"},e.title),t)},t.prototype.renderDescription=function(e){return e.description?o.a.createElement("div",{className:"sd-rating-dropdown-item_description"},this.renderLocString(e.description,void 0,"locString")):null},t}(c);s.Instance.registerElement("sv-rating-dropdown-item",(function(e){return o.a.createElement(Qe,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)}}(),Ke=function(e){function t(t){return e.call(this,t)||this}return Je(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateDomElement()},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.updateDomElement()},t.prototype.updateDomElement=function(){if(this.inputElement){var e=this.inputElement,t=this.model.inputStringRendered;i.Helpers.isTwoValueEquals(t,e.value,!1,!0,!1)||(e.value=this.model.inputStringRendered)}},t.prototype.onChange=function(e){var t=i.settings.environment.root;e.target===t.activeElement&&(this.model.inputStringRendered=e.target.value)},t.prototype.keyhandler=function(e){this.model.inputKeyHandler(e)},t.prototype.onBlur=function(e){this.model.onBlur(e)},t.prototype.onFocus=function(e){this.model.onFocus(e)},t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this;return r.createElement("div",{className:this.question.cssClasses.hint},this.model.showHintPrefix?r.createElement("div",{className:this.question.cssClasses.hintPrefix},r.createElement("span",null,this.model.hintStringPrefix)):null,r.createElement("div",{className:this.question.cssClasses.hintSuffixWrapper},this.model.showHintString?r.createElement("div",{className:this.question.cssClasses.hintSuffix},r.createElement("span",{style:{visibility:"hidden"},"data-bind":"text: model.filterString"},this.model.inputStringRendered),r.createElement("span",null,this.model.hintStringSuffix)):null,r.createElement("input",{type:"text",autoComplete:"off",id:this.question.getInputId(),inputMode:this.model.inputMode,ref:function(t){return e.inputElement=t},className:this.question.cssClasses.filterStringInput,disabled:this.question.isInputReadOnly,readOnly:!!this.model.filterReadOnly||void 0,size:this.model.inputStringRendered?void 0:1,role:this.model.filterStringEnabled?this.question.ariaRole:void 0,"aria-expanded":null===this.question.ariaExpanded?void 0:"true"===this.question.ariaExpanded,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-controls":this.model.listElementId,"aria-activedescendant":this.model.ariaActivedescendant,placeholder:this.model.filterStringPlaceholder,onKeyDown:function(t){e.keyhandler(t)},onChange:function(t){e.onChange(t)},onBlur:function(t){e.onBlur(t)},onFocus:function(t){e.onFocus(t)}})))},t}(c);W.Instance.registerQuestion("sv-tagbox-filter",(function(e){return r.createElement(Ke,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)}}(),Ye=function(e){function t(t){var n=e.call(this,t)||this;return n.state={changed:0},n.setupModel(),n}return Ge(t,e),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.setupModel()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.item&&(this.item.locText.onChanged=function(){})},t.prototype.setupModel=function(){if(this.item.locText){var e=this;this.item.locText.onChanged=function(){e.setState({changed:e.state.changed+1})}}},t.prototype.getStateElement=function(){return this.item},Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.item},t.prototype.renderElement=function(){return r.createElement("option",{value:this.item.value,disabled:!this.item.isEnabled},this.item.text)},t}(p),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)}}(),$e=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.click=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onClick(e)},t.chevronPointerDown=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.chevronPointerDown(e)},t.clear=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onClear(e)},t.keyhandler=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.keyHandler(e)},t.blur=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onBlur(e),t.updateInputDomElement()},t.focus=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onFocus(e)},t}return Ze(t,e),t.prototype.getStateElement=function(){return this.question.dropdownListModel},t.prototype.setValueCore=function(e){this.questionBase.renderedValue=e},t.prototype.getValueCore=function(){return this.questionBase.renderedValue},t.prototype.renderReadOnlyElement=function(){return r.createElement("div",null,this.question.readOnlyText)},t.prototype.renderSelect=function(e){var t,n,o=null;if(this.question.isReadOnly){var i=this.question.selectedItemLocText?this.renderLocString(this.question.selectedItemLocText):"";o=r.createElement("div",{id:this.question.inputId,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,tabIndex:this.question.isDisabledAttr?void 0:0,className:this.question.getControlClass()},i,this.renderReadOnlyElement())}else o=r.createElement(r.Fragment,null,this.renderInput(this.question.dropdownListModel),r.createElement(V,{model:null===(n=null===(t=this.question)||void 0===t?void 0:t.dropdownListModel)||void 0===n?void 0:n.popupModel}));return r.createElement("div",{className:e.selectWrapper,onClick:this.click},o,this.createChevronButton())},t.prototype.renderValueElement=function(e){return this.question.showInputFieldComponent?s.Instance.createElement(this.question.inputFieldComponentName,{item:e.getSelectedAction(),question:this.question}):this.question.showSelectedItemLocText?this.renderLocString(this.question.selectedItemLocText):null},t.prototype.renderInput=function(e){var t=this,n=this.renderValueElement(e),o=i.settings.environment.root;return r.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),tabIndex:e.noTabIndex?void 0:0,disabled:this.question.isDisabledAttr,required:this.question.isRequired,onKeyDown:this.keyhandler,onBlur:this.blur,role:this.question.ariaRole,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage,"aria-expanded":null===this.question.ariaExpanded?void 0:"true"===this.question.ariaExpanded,"aria-controls":e.listElementId,"aria-activedescendant":e.ariaActivedescendant},e.showHintPrefix?r.createElement("div",{className:this.question.cssClasses.hintPrefix},r.createElement("span",null,e.hintStringPrefix)):null,r.createElement("div",{className:this.question.cssClasses.controlValue},e.showHintString?r.createElement("div",{className:this.question.cssClasses.hintSuffix},r.createElement("span",{style:{visibility:"hidden"},"data-bind":"text: model.filterString"},e.inputStringRendered),r.createElement("span",null,e.hintStringSuffix)):null,n,r.createElement("input",{type:"text",autoComplete:"off",id:this.question.getInputId(),ref:function(e){return t.inputElement=e},className:this.question.cssClasses.filterStringInput,role:e.filterStringEnabled?this.question.ariaRole:void 0,"aria-expanded":null===this.question.ariaExpanded?void 0:"true"===this.question.ariaExpanded,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-controls":e.listElementId,"aria-activedescendant":e.ariaActivedescendant,placeholder:e.placeholderRendered,readOnly:!!e.filterReadOnly||void 0,tabIndex:e.noTabIndex?void 0:-1,disabled:this.question.isDisabledAttr,inputMode:e.inputMode,onChange:function(t){!function(t){t.target===o.activeElement&&(e.inputStringRendered=t.target.value)}(t)},onBlur:this.blur,onFocus:this.focus})),this.createClearButton())},t.prototype.createClearButton=function(){if(!this.question.allowClear||!this.question.cssClasses.cleanButtonIconId)return null;var e={display:this.question.showClearButton?"":"none"};return r.createElement("div",{className:this.question.cssClasses.cleanButton,style:e,onClick:this.clear,"aria-hidden":"true"},r.createElement(E,{className:this.question.cssClasses.cleanButtonSvg,iconName:this.question.cssClasses.cleanButtonIconId,title:this.question.clearCaption,size:"auto"}))},t.prototype.createChevronButton=function(){return this.question.cssClasses.chevronButtonIconId?r.createElement("div",{className:this.question.cssClasses.chevronButton,"aria-hidden":"true",onPointerDown:this.chevronPointerDown},r.createElement(E,{className:this.question.cssClasses.chevronButtonSvg,iconName:this.question.cssClasses.chevronButtonIconId,size:"auto"})):null},t.prototype.renderOther=function(e){return r.createElement("div",{className:this.question.getCommentAreaCss(!0)},r.createElement(Y,{question:this.question,otherCss:e.other,cssClasses:e,isDisplayMode:this.isDisplayMode,isOther:!0}))},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateInputDomElement()},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.updateInputDomElement()},t.prototype.updateInputDomElement=function(){if(this.inputElement){var e=this.inputElement,t=this.question.dropdownListModel.inputStringRendered;i.Helpers.isTwoValueEquals(t,e.value,!1,!0,!1)||(e.value=this.question.dropdownListModel.inputStringRendered)}},t}(d),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)}}(),et=function(e){function t(t){return e.call(this,t)||this}return Xe(t,e),t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.isOtherSelected?this.renderOther(e):null,n=this.renderSelect(e);return r.createElement("div",{className:this.question.renderCssRoot},n,t)},t}($e);W.Instance.registerQuestion("dropdown",(function(e){return r.createElement(et,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)}}(),nt=function(e){function t(t){return e.call(this,t)||this}return tt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.item&&!!this.question},t.prototype.renderElement=function(){var e=this,t=this.renderLocString(this.item.locText);return r.createElement("div",{className:"sv-tagbox__item"},r.createElement("div",{className:"sv-tagbox__item-text"},t),r.createElement("div",{className:this.question.cssClasses.cleanItemButton,onClick:function(t){e.question.dropdownListModel.deselectItem(e.item.value),t.stopPropagation()}},r.createElement(E,{className:this.question.cssClasses.cleanItemButtonSvg,iconName:this.question.cssClasses.cleanItemButtonIconId,size:"auto"})))},t}(p),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.prototype.renderItem=function(e,t){return r.createElement(nt,{key:e,question:this.question,item:t})},t.prototype.renderInput=function(e){var t=this,n=e,o=this.question.selectedChoices.map((function(e,n){return t.renderItem("item"+n,e)}));return r.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),tabIndex:e.noTabIndex?void 0:0,disabled:this.question.isInputReadOnly,required:this.question.isRequired,onKeyDown:this.keyhandler,onBlur:this.blur,role:this.question.ariaRole,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage,"aria-expanded":null===this.question.ariaExpanded?void 0:"true"===this.question.ariaExpanded,"aria-controls":e.listElementId,"aria-activedescendant":e.ariaActivedescendant},r.createElement("div",{className:this.question.cssClasses.controlValue},o,r.createElement(Ke,{model:n,question:this.question})),this.createClearButton())},t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.isOtherSelected?this.renderOther(e):null,n=this.renderSelect(e);return r.createElement("div",{className:this.question.renderCssRoot},n,t)},t.prototype.renderReadOnlyElement=function(){return this.question.locReadOnlyText?this.renderLocString(this.question.locReadOnlyText):null},t}($e);W.Instance.registerQuestion("tagbox",(function(e){return r.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){return e.call(this,t)||this}return it(t,e),t.prototype.renderSelect=function(e){var t=this,n=this.isDisplayMode?r.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),disabled:!0},this.question.readOnlyText):r.createElement("select",{id:this.question.inputId,className:this.question.getControlClass(),ref:function(e){return t.setControl(e)},autoComplete:this.question.autocomplete,onChange:this.updateValueOnEvent,onInput:this.updateValueOnEvent,onClick:function(e){t.question.onClick(e)},onKeyUp:function(e){t.question.onKeyUp(e)},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage,required:this.question.isRequired},this.question.allowClear?r.createElement("option",{value:""},this.question.placeholder):null,this.question.visibleChoices.map((function(e,t){return r.createElement(Ye,{key:"item"+t,item:e})})));return r.createElement("div",{className:e.selectWrapper},n,this.createChevronButton())},t}(et);W.Instance.registerQuestion("sv-dropdown-select",(function(e){return r.createElement(st,e)})),i.RendererFactory.Instance.registerRenderer("dropdown","select","sv-dropdown-select");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.state={rowsChanged:0},n}return at(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(e.prototype.componentDidMount.call(this),this.question){var t=this;this.question.visibleRowsChangedCallback=function(){t.setState({rowsChanged:t.state.rowsChanged+1})}}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question&&(this.question.visibleRowsChangedCallback=null)},t.prototype.renderElement=function(){for(var e=this,t=this.question.cssClasses,n=this.question.hasRows?r.createElement("td",null):null,o=[],i=0;i<this.question.visibleColumns.length;i++){var s=this.question.visibleColumns[i],a="column"+i,u=this.renderLocString(s.locText),l={};this.question.columnMinWidth&&(l.minWidth=this.question.columnMinWidth,l.width=this.question.columnMinWidth),o.push(r.createElement("th",{className:this.question.cssClasses.headerCell,style:l,key:a},this.wrapCell({column:s},u,"column-header")))}var c=[],p=this.question.visibleRows;for(i=0;i<p.length;i++){var h=p[i];a="row-"+h.name+"-"+i;c.push(r.createElement(lt,{key:a,question:this.question,cssClasses:t,row:h,isFirst:0==i}))}var d=this.question.showHeader?r.createElement("thead",null,r.createElement("tr",null,n,o)):null;return r.createElement("div",{className:t.tableWrapper,ref:function(t){return e.setControl(t)}},r.createElement("fieldset",null,r.createElement("legend",{className:"sv-hidden"},this.question.locTitle.renderedHtml),r.createElement("table",{className:this.question.getTableCss()},d,r.createElement("tbody",null,c))))},t}(h),lt=function(e){function t(t){return e.call(this,t)||this}return at(t,e),t.prototype.getStateElement=function(){return this.row?this.row.item:e.prototype.getStateElement.call(this)},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.row},enumerable:!1,configurable:!0}),t.prototype.wrapCell=function(e,t,n){if(!n)return t;var r=this.question.survey,o=null;return r&&(o=a.wrapMatrixCell(r,t,e,n)),null!=o?o:t},t.prototype.canRender=function(){return!!this.row},t.prototype.renderElement=function(){var e=null;if(this.question.hasRows){var t=this.renderLocString(this.row.locText),n={};this.question.rowTitleWidth&&(n.minWidth=this.question.rowTitleWidth,n.width=this.question.rowTitleWidth),e=r.createElement("td",{style:n,className:this.row.rowTextClasses},this.wrapCell({row:this.row},t,"row-header"))}var o=this.generateTds();return r.createElement("tr",{className:this.row.rowClasses||void 0},e,o)},t.prototype.generateTds=function(){for(var e=this,t=[],n=this.row,o=this.question.cellComponent,i=function(){var i=null,l=a.question.visibleColumns[u],c="value"+u,p=a.question.getItemClass(n,l);if(a.question.hasCellText){var h=function(t){return function(){return e.cellClick(n,t)}};i=r.createElement("td",{key:c,className:p,onClick:h?h(l):function(){}},a.renderLocString(a.question.getCellDisplayLocText(n.name,l)))}else{var d=s.Instance.createElement(o,{question:a.question,row:a.row,column:l,columnIndex:u,cssClasses:a.cssClasses,cellChanged:function(){e.cellClick(e.row,l)}});i=r.createElement("td",{key:c,"data-responsive-title":l.locText.renderedHtml,className:a.question.cssClasses.cell},d)}t.push(i)},a=this,u=0;u<this.question.visibleColumns.length;u++)i();return t},t.prototype.cellClick=function(e,t){e.value=t.value,this.setState({value:this.row.value})},t}(p),ct=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnMouseDown=n.handleOnMouseDown.bind(n),n.handleOnChange=n.handleOnChange.bind(n),n}return at(t,e),t.prototype.handleOnChange=function(e){this.props.cellChanged&&this.props.cellChanged()},t.prototype.handleOnMouseDown=function(e){this.question.onMouseDown()},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.row},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"column",{get:function(){return this.props.column},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"columnIndex",{get:function(){return this.props.columnIndex},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.question&&!!this.row},t.prototype.renderElement=function(){var e=this.row.value==this.column.value,t=this.question.inputId+"_"+this.row.name+"_"+this.columnIndex,n=this.question.getItemClass(this.row,this.column),o=this.question.isMobile?r.createElement("span",{className:this.question.cssClasses.cellResponsiveTitle},this.renderLocString(this.column.locText)):void 0;return r.createElement("label",{onMouseDown:this.handleOnMouseDown,className:n},this.renderInput(t,e),r.createElement("span",{className:this.question.cssClasses.materialDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:this.cssClasses.itemDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null),o)},t.prototype.renderInput=function(e,t){return r.createElement("input",{id:e,type:"radio",className:this.cssClasses.itemValue,name:this.row.fullName,value:this.column.value,disabled:this.row.isDisabledAttr,readOnly:this.row.isReadOnlyAttr,checked:t,onChange:this.handleOnChange,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.getCellAriaLabel(this.row.locText.renderedHtml,this.column.locText.renderedHtml),"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage})},t}(p);s.Instance.registerElement("survey-matrix-cell",(function(e){return r.createElement(ct,e)})),W.Instance.registerQuestion("matrix",(function(e){return r.createElement(ut,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,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.reactOnStrChanged()},t.prototype.componentWillUnmount=function(){this.question.locHtml.onChanged=function(){}},t.prototype.componentDidUpdate=function(e,t){this.reactOnStrChanged()},t.prototype.reactOnStrChanged=function(){var e=this;this.question.locHtml.onChanged=function(){e.setState({changed:e.state&&e.state.changed?e.state.changed+1:1})}},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&!!this.question.html},t.prototype.renderElement=function(){var e={__html:this.question.locHtml.renderedHtml};return r.createElement("div",{className:this.question.renderCssRoot,dangerouslySetInnerHTML:e})},t}(h);W.Instance.registerQuestion("html",(function(e){return r.createElement(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(){return null!==e&&e.apply(this,arguments)||this}return dt(t,e),t.prototype.render=function(){return r.createElement("div",{className:"sd-loading-indicator"},r.createElement(E,{iconName:"icon-loading",size:"auto"}))},t}(r.Component),mt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yt=function(e){function t(t){return e.call(this,t)||this}return mt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e,t=this,n=this.question.allowShowPreview?this.renderPreview():null,o=this.question.showLoadingIndicator?this.renderLoadingIndicator():null,i=this.question.isPlayingVideo?this.renderVideo():null,s=this.question.showFileDecorator?this.renderFileDecorator():null,a=this.question.showRemoveButton?this.renderClearButton(this.question.cssClasses.removeButton):null,u=this.question.showRemoveButtonBottom?this.renderClearButton(this.question.cssClasses.removeButtonBottom):null,l=this.question.fileNavigatorVisible?r.createElement(L,{model:this.question.fileNavigator}):null;return e=this.question.isReadOnlyAttr?r.createElement("input",{readOnly:!0,type:"file",className:this.isDisplayMode?this.question.getReadOnlyFileCss():this.question.cssClasses.fileInput,id:this.question.inputId,ref:function(e){return t.setControl(e)},style:this.isDisplayMode?{color:"transparent"}:{},multiple:this.question.allowMultiple,placeholder:this.question.title,accept:this.question.acceptedTypes}):this.question.isDisabledAttr?r.createElement("input",{disabled:!0,type:"file",className:this.isDisplayMode?this.question.getReadOnlyFileCss():this.question.cssClasses.fileInput,id:this.question.inputId,ref:function(e){return t.setControl(e)},style:this.isDisplayMode?{color:"transparent"}:{},multiple:this.question.allowMultiple,placeholder:this.question.title,accept:this.question.acceptedTypes}):this.question.hasFileUI?r.createElement("input",{type:"file",disabled:this.isDisplayMode,tabIndex:-1,className:this.isDisplayMode?this.question.getReadOnlyFileCss():this.question.cssClasses.fileInput,id:this.question.inputId,ref:function(e){return t.setControl(e)},style:this.isDisplayMode?{color:"transparent"}:{},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage,multiple:this.question.allowMultiple,title:this.question.inputTitle,accept:this.question.acceptedTypes,capture:this.question.renderCapture}):null,r.createElement("div",{className:this.question.fileRootCss},e,r.createElement("div",{className:this.question.cssClasses.dragArea,onDrop:this.question.onDrop,onDragOver:this.question.onDragOver,onDragLeave:this.question.onDragLeave,onDragEnter:this.question.onDragEnter},s,o,i,a,n,u,l))},t.prototype.renderFileDecorator=function(){var e=this.question.showChooseButton?this.renderChooseButton():null,t=this.question.actionsContainerVisible?r.createElement(L,{model:this.question.actionsContainer}):null,n=this.question.isEmpty()?r.createElement("span",{className:this.question.cssClasses.noFileChosen},this.question.noFileChosenCaption):null;return r.createElement("div",{className:this.question.getFileDecoratorCss()},r.createElement("span",{className:this.question.cssClasses.dragAreaPlaceholder},this.renderLocString(this.question.locRenderedPlaceholder)),r.createElement("div",{className:this.question.cssClasses.wrapper},e,t,n))},t.prototype.renderChooseButton=function(){return r.createElement(vt,{data:{question:this.question}})},t.prototype.renderClearButton=function(e){return this.question.isUploading?null:r.createElement("button",{type:"button",onClick:this.question.doClean,className:e},r.createElement("span",null,this.question.clearButtonCaption),this.question.cssClasses.removeButtonIconId?r.createElement(E,{iconName:this.question.cssClasses.removeButtonIconId,size:"auto",title:this.question.clearButtonCaption}):null)},t.prototype.renderPreview=function(){return s.Instance.createElement("sv-file-preview",{question:this.question})},t.prototype.renderLoadingIndicator=function(){return r.createElement("div",{className:this.question.cssClasses.loadingIndicator},r.createElement(ft,null))},t.prototype.renderVideo=function(){return r.createElement("div",{className:this.question.cssClasses.videoContainer},r.createElement(q,{item:this.question.changeCameraAction}),r.createElement(q,{item:this.question.closeCameraAction}),r.createElement("video",{autoPlay:!0,playsInline:!0,id:this.question.videoId,className:this.question.cssClasses.video}),r.createElement(q,{item:this.question.takePictureAction}))},t}(h);W.Instance.registerQuestion("file",(function(e){return r.createElement(yt,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)}}(),vt=function(e){function t(t){return e.call(this,t)||this}return gt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item&&this.props.item.data.question||this.props.data.question},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this;return we(o.a.createElement("label",{tabIndex:0,className:this.question.getChooseFileCss(),htmlFor:this.question.inputId,"aria-label":this.question.chooseButtonText,onClick:function(t){return e.question.chooseFile(t.nativeEvent)}},this.question.cssClasses.chooseFileIconId?o.a.createElement(E,{title:this.question.chooseButtonText,iconName:this.question.cssClasses.chooseFileIconId,size:"auto"}):null,o.a.createElement("span",null,this.question.chooseButtonText)))},t}(p);s.Instance.registerElement("sv-file-choose-btn",(function(e){return o.a.createElement(vt,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(){return null!==e&&e.apply(this,arguments)||this}return bt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.renderFileSign=function(e,t){var n=this;return e&&t.name?o.a.createElement("div",{className:e},o.a.createElement("a",{href:t.content,onClick:function(e){n.question.doDownloadFile(e,t)},title:t.name,download:t.name,style:{width:this.question.imageWidth}},t.name)):null},t.prototype.renderElement=function(){var e=this,t=this.question.previewValue.map((function(t,n){return t?o.a.createElement("span",{key:e.question.inputId+"_"+n,className:e.question.cssClasses.previewItem,onClick:function(t){return e.question.doDownloadFileFromContainer(t)},style:{display:e.question.isPreviewVisible(n)?void 0:"none"}},e.renderFileSign(e.question.cssClasses.fileSign,t),o.a.createElement("div",{className:e.question.getImageWrapperCss(t)},e.question.canPreviewImage(t)?o.a.createElement("img",{src:t.content,style:{height:e.question.imageHeight,width:e.question.imageWidth},alt:"File preview"}):e.question.cssClasses.defaultImage?o.a.createElement(E,{iconName:e.question.cssClasses.defaultImageIconId,size:"auto",className:e.question.cssClasses.defaultImage}):null,t.name&&!e.question.isReadOnly?o.a.createElement("div",{className:e.question.getRemoveButtonCss(),onClick:function(n){return e.question.doRemoveFile(t,n)}},o.a.createElement("span",{className:e.question.cssClasses.removeFile},e.question.removeFileCaption),e.question.cssClasses.removeFileSvgIconId?o.a.createElement(E,{title:e.question.removeFileCaption,iconName:e.question.cssClasses.removeFileSvgIconId,size:"auto",className:e.question.cssClasses.removeFileSvg}):null):null),e.renderFileSign(e.question.cssClasses.fileSignBottom,t)):null}));return o.a.createElement("div",{className:this.question.cssClasses.fileList||void 0},t)},t.prototype.canRender=function(){return this.question.showPreviewContainer},t}(c);s.Instance.registerElement("sv-file-preview",(function(e){return o.a.createElement(Ct,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)}}(),wt=function(e){function t(t){return e.call(this,t)||this}return Et(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){for(var e=this.question.cssClasses,t=this.question.getRows(),n=[],o=0;o<t.length;o++)t[o].isVisible&&n.push(this.renderRow(o,t[o].cells,e));return r.createElement("table",{className:this.question.getQuestionRootCss()},r.createElement("tbody",null,n))},t.prototype.renderCell=function(e,t,n){var o;return o=e.isErrorsCell?r.createElement(se,{question:e.item.editor,creator:this.creator}):r.createElement(Ot,{question:this.question,item:e.item,creator:this.creator,cssClasses:t}),r.createElement("td",{key:"item"+n,className:e.className,onFocus:function(){e.item.focusIn()}},o)},t.prototype.renderRow=function(e,t,n){for(var o="item"+e,i=[],s=0;s<t.length;s++){var a=t[s];i.push(this.renderCell(a,n,s))}return r.createElement("tr",{key:o,className:n.row},i)},t}(h),Ot=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Et(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElements=function(){return[this.item,this.item.editor]},Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this.item,t=this.cssClasses,n={};return this.question.itemTitleWidth&&(n.minWidth=this.question.itemTitleWidth,n.width=this.question.itemTitleWidth),r.createElement("label",{className:this.question.getItemLabelCss(e)},r.createElement("span",{className:t.itemTitle,style:n},r.createElement(M,{element:e.editor,cssClasses:e.editor.cssClasses})),r.createElement(Pt,{cssClasses:t,itemCss:this.question.getItemCss(),question:e.editor,creator:this.creator}))},t}(p),Pt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Et(t,e),t.prototype.renderElement=function(){return r.createElement("div",{className:this.itemCss},this.renderContent())},t}(oe);W.Instance.registerQuestion("multipletext",(function(e){return r.createElement(wt,e)}));var 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)}}(),St=function(e){function t(t){return e.call(this,t)||this}return qt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=null;return this.question.showClearButtonInContent&&(n=r.createElement("div",null,r.createElement("input",{type:"button",className:this.question.cssClasses.clearButton,onClick:function(){return e.question.clearValue(!0)},value:this.question.clearButtonCaption}))),r.createElement("fieldset",{className:this.question.getSelectBaseRootCss(),ref:function(t){return e.setControl(t)},role:this.question.a11y_input_ariaRole,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage},this.question.hasColumns?this.getColumnedBody(t):this.getBody(t),this.getFooter(),this.question.isOtherSelected?this.renderOther(t):null,n)},t.prototype.getFooter=function(){var e=this;if(this.question.hasFootItems)return this.question.footItems.map((function(t,n){return e.renderItem("item_f"+n,t,!1,e.question.cssClasses)}))},t.prototype.getColumnedBody=function(e){return r.createElement("div",{className:e.rootMultiColumn},this.getColumns(e))},t.prototype.getColumns=function(e){var t=this,n=this.getStateValue();return this.question.columns.map((function(o,i){var s=o.map((function(r,o){return t.renderItem("item"+i+o,r,n,e,""+i+o)}));return r.createElement("div",{key:"column"+i,className:t.question.getColumnClass(),role:"presentation"},s)}))},t.prototype.getBody=function(e){return this.question.blockedRow?r.createElement("div",{className:e.rootRow},this.getItems(e,this.question.dataChoices)):r.createElement(r.Fragment,null,this.getItems(e,this.question.bodyItems))},t.prototype.getItems=function(e,t){for(var n=[],r=this.getStateValue(),o=0;o<t.length;o++){var i=t[o],s=this.renderItem("item"+o,i,r,e,""+o);n.push(s)}return n},Object.defineProperty(t.prototype,"textStyle",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.renderOther=function(e){return r.createElement("div",{className:this.question.getCommentAreaCss(!0)},r.createElement(Y,{question:this.question,otherCss:e.other,cssClasses:e,isDisplayMode:this.isDisplayMode}))},t.prototype.renderItem=function(e,t,n,r,o){var i=s.Instance.createElement(this.question.itemComponent,{key:e,question:this.question,cssClasses:r,isDisplayMode:this.isDisplayMode,item:t,textStyle:this.textStyle,index:o,isChecked:n===t.value}),u=this.question.survey,l=null;return u&&(l=a.wrapItemValue(u,i,this.question,t)),null!=l?l:i},t.prototype.getStateValue=function(){return this.question.isEmpty()?"":this.question.renderedValue},t}(h),xt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n.handleOnMouseDown=n.handleOnMouseDown.bind(n),n}return qt(t,e),t.prototype.getStateElement=function(){return this.item},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textStyle",{get:function(){return this.props.textStyle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isChecked",{get:function(){return this.props.isChecked},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hideCaption",{get:function(){return!0===this.props.hideCaption},enumerable:!1,configurable:!0}),t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(!!this.question&&!(this.question.customWidget&&!this.question.customWidgetData.isNeedRender&&!this.question.customWidget.widgetJson.isDefaultRender&&!this.question.customWidget.widgetJson.render))},t.prototype.handleOnChange=function(e){this.question.clickItemHandler(this.item)},t.prototype.handleOnMouseDown=function(e){this.question.onMouseDown()},t.prototype.canRender=function(){return!!this.question&&!!this.item},t.prototype.renderElement=function(){var e=this.question.getItemClass(this.item),t=this.question.getLabelClass(this.item),n=this.question.getControlLabelClass(this.item),o=this.hideCaption?null:r.createElement("span",{className:n},this.renderLocString(this.item.locText,this.textStyle));return r.createElement("div",{className:e,role:"presentation"},r.createElement("label",{onMouseDown:this.handleOnMouseDown,className:t},r.createElement("input",{"aria-errormessage":this.question.ariaErrormessage,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),readOnly:this.question.isReadOnlyAttr,onChange:this.handleOnChange}),this.cssClasses.materialDecorator?r.createElement("span",{className:this.cssClasses.materialDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:this.cssClasses.itemDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,o))},t}(p);s.Instance.registerElement("survey-radiogroup-item",(function(e){return r.createElement(xt,e)})),W.Instance.registerQuestion("radiogroup",(function(e){return r.createElement(St,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)}}(),It=function(e){function t(t){return e.call(this,t)||this}return _t(t,e),t.prototype.renderInput=function(){var e=this,t=this.question.getControlClass(),n=this.question.renderedPlaceholder;if(this.question.isReadOnlyRenderDiv())return r.createElement("div",null,this.question.inputValue);var o=this.question.getMaxLength()?r.createElement(Q,{counter:this.question.characterCounter,remainingCharacterCounter:this.question.cssClasses.remainingCharacterCounter}):null;return r.createElement(r.Fragment,null,r.createElement("input",{id:this.question.inputId,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,className:t,type:this.question.inputType,ref:function(t){return e.setControl(t)},style:this.question.inputStyle,maxLength:this.question.getMaxLength(),min:this.question.renderedMin,max:this.question.renderedMax,step:this.question.renderedStep,size:this.question.inputSize,placeholder:n,list:this.question.dataListId,autoComplete:this.question.autocomplete,onBlur:this.question.onBlur,onFocus:this.question.onFocus,onChange:this.question.onChange,onKeyUp:this.question.onKeyUp,onKeyDown:this.question.onKeyDown,onCompositionUpdate:function(t){return e.question.onCompositionUpdate(t.nativeEvent)},"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage}),o)},t.prototype.renderElement=function(){return this.question.dataListId?r.createElement("div",null,this.renderInput(),this.renderDataList()):this.renderInput()},t.prototype.setValueCore=function(e){this.question.inputValue=e},t.prototype.getValueCore=function(){return this.question.inputValue},t.prototype.renderDataList=function(){if(!this.question.dataListId)return null;var e=this.question.dataList;if(0==e.length)return null;for(var t=[],n=0;n<e.length;n++)t.push(r.createElement("option",{key:"item"+n,value:e[n]}));return r.createElement("datalist",{id:this.question.dataListId},t)},t}(d);W.Instance.registerQuestion("text",(function(e){return r.createElement(It,e)}));var Vt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n.handleOnClick=n.handleOnClick.bind(n),n.handleOnLabelClick=n.handleOnLabelClick.bind(n),n.handleOnSwitchClick=n.handleOnSwitchClick.bind(n),n.handleOnKeyDown=n.handleOnKeyDown.bind(n),n.checkRef=r.createRef(),n}return Vt(t,e),t.prototype.getStateElement=function(){return this.question},Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.doCheck=function(e){this.question.booleanValue=e},t.prototype.handleOnChange=function(e){this.doCheck(e.target.checked)},t.prototype.handleOnClick=function(e){this.question.onLabelClick(e,!0)},t.prototype.handleOnSwitchClick=function(e){this.question.onSwitchClickModel(e.nativeEvent)},t.prototype.handleOnLabelClick=function(e,t){this.question.onLabelClick(e,t)},t.prototype.handleOnKeyDown=function(e){this.question.onKeyDownCore(e)},t.prototype.updateDomElement=function(){if(this.question){var t=this.checkRef.current;t&&(t.indeterminate=this.question.isIndeterminate),this.setControl(t),e.prototype.updateDomElement.call(this)}},t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=this.question.getItemCss();return r.createElement("div",{className:t.root,onKeyDown:this.handleOnKeyDown},r.createElement("label",{className:n,onClick:this.handleOnClick},r.createElement("input",{ref:this.checkRef,type:"checkbox",name:this.question.name,value:null===this.question.booleanValue?"":this.question.booleanValue,id:this.question.inputId,className:t.control,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,checked:this.question.booleanValue||!1,onChange:this.handleOnChange,role:this.question.a11y_input_ariaRole,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage}),r.createElement("div",{className:t.sliderGhost,onClick:function(t){return e.handleOnLabelClick(t,e.question.swapOrder)}},r.createElement("span",{className:this.question.getLabelCss(this.question.swapOrder)},this.renderLocString(this.question.locLabelLeft))),r.createElement("div",{className:t.switch,onClick:this.handleOnSwitchClick},r.createElement("span",{className:t.slider},this.question.isDeterminated&&t.sliderText?r.createElement("span",{className:t.sliderText},this.renderLocString(this.question.getCheckedLabel())):null)),r.createElement("div",{className:t.sliderGhost,onClick:function(t){return e.handleOnLabelClick(t,!e.question.swapOrder)}},r.createElement("span",{className:this.question.getLabelCss(!this.question.swapOrder)},this.renderLocString(this.question.locLabelRight)))))},t}(h);W.Instance.registerQuestion("boolean",(function(e){return r.createElement(Tt,e)}));var Nt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),At=function(e){function t(t){return e.call(this,t)||this}return Nt(t,e),t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.getCheckboxItemCss(),n=this.question.canRenderLabelDescription?c.renderQuestionDescription(this.question):null;return r.createElement("div",{className:e.rootCheckbox},r.createElement("div",{className:t},r.createElement("label",{className:e.checkboxLabel},r.createElement("input",{ref:this.checkRef,type:"checkbox",name:this.question.name,value:null===this.question.booleanValue?"":this.question.booleanValue,id:this.question.inputId,className:e.controlCheckbox,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,checked:this.question.booleanValue||!1,onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage}),r.createElement("span",{className:e.checkboxMaterialDecorator},this.question.svgIcon?r.createElement("svg",{className:e.checkboxItemDecorator},r.createElement("use",{xlinkHref:this.question.svgIcon})):null,r.createElement("span",{className:"check"})),this.question.isLabelRendered&&r.createElement("span",{className:e.checkboxControlLabel,id:this.question.labelRenderedAriaID},r.createElement(B,{element:this.question,cssClasses:this.question.cssClasses}))),n))},t}(Tt);W.Instance.registerQuestion("sv-boolean-checkbox",(function(e){return r.createElement(At,e)})),i.RendererFactory.Instance.registerRenderer("boolean","checkbox","sv-boolean-checkbox");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)}}(),Rt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=function(e){n.question.booleanValue="true"==e.nativeEvent.target.value},n}return jt(t,e),t.prototype.renderRadioItem=function(e,t){var n=this.question.cssClasses;return r.createElement("div",{role:"presentation",className:this.question.getRadioItemClass(n,e)},r.createElement("label",{className:n.radioLabel},r.createElement("input",{type:"radio",name:this.question.name,value:e,"aria-errormessage":this.question.ariaErrormessage,checked:e===this.question.booleanValueRendered,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,className:n.itemRadioControl,onChange:this.handleOnChange}),this.question.cssClasses.materialRadioDecorator?r.createElement("span",{className:n.materialRadioDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:n.itemRadioDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,r.createElement("span",{className:n.radioControlLabel},this.renderLocString(t))))},t.prototype.renderElement=function(){var e=this.question.cssClasses;return r.createElement("div",{className:e.rootRadio},r.createElement("fieldset",{role:"presentation",className:e.radioFieldset},this.question.swapOrder?r.createElement(r.Fragment,null,this.renderRadioItem(!0,this.question.locLabelTrue),this.renderRadioItem(!1,this.question.locLabelFalse)):r.createElement(r.Fragment,null,this.renderRadioItem(!1,this.question.locLabelFalse),this.renderRadioItem(!0,this.question.locLabelTrue))))},t}(Tt);W.Instance.registerQuestion("sv-boolean-radio",(function(e){return r.createElement(Rt,e)})),i.RendererFactory.Instance.registerRenderer("boolean","radio","sv-boolean-radio");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)}}(),Lt=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:n.question.value},n}return Dt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return r.createElement("div",null)},t}(h);W.Instance.registerQuestion("empty",(function(e){return r.createElement(Lt,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)}}(),Mt=function(e){function t(t){var n=e.call(this,t)||this;return n.root=o.a.createRef(),n.onPointerDownHandler=function(e){n.parentMatrix.onPointerDown(e.nativeEvent,n.model.row)},n}return kt(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.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.root.current&&this.model.setRootElement(this.root.current)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model.setRootElement(void 0)},t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(t.model!==this.model&&(t.element&&t.element.setRootElement(this.root.current),this.model&&this.model.setRootElement(void 0)),!0)},t.prototype.render=function(){var e=this,t=this.model;return t.visible?o.a.createElement("tr",{ref:this.root,className:t.className,"data-sv-drop-target-matrix-row":t.row&&t.row.id,onPointerDown:function(t){return e.onPointerDownHandler(t)}},this.props.children):null},t}(c);s.Instance.registerElement("sv-matrix-row",(function(e){return o.a.createElement(Mt,e)}));var Ft=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ft(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item.data.question},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return this.question.iconDragElement?o.a.createElement("svg",{className:this.question.cssClasses.dragElementDecorator},o.a.createElement("use",{xlinkHref:this.question.iconDragElement})):o.a.createElement("span",{className:this.question.cssClasses.iconDrag})},t}(p);s.Instance.registerElement("sv-matrix-drag-drop-icon",(function(e){return o.a.createElement(Bt,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)}}(),Ht=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return zt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"table",{get:function(){return this.question.renderedTable},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.table},t.prototype.wrapCell=function(e,t,n){return this.props.wrapCell(e,t,n)},t.prototype.renderHeader=function(){var e=this.question.renderedTable;if(!e.showHeader)return null;for(var t=[],n=e.headerRow.cells,o=0;o<n.length;o++){var i=n[o],s="column"+o,a={};i.width&&(a.width=i.width),i.minWidth&&(a.minWidth=i.minWidth);var u=this.renderCellContent(i,"column-header",{}),l=i.hasTitle?r.createElement("th",{className:i.className,key:s,style:a}," ",u," "):r.createElement("td",{className:i.className,key:s,style:a});t.push(l)}return r.createElement("thead",null,r.createElement("tr",null,t))},t.prototype.renderFooter=function(){var e=this.question.renderedTable;if(!e.showFooter)return null;var t=this.renderRow("footer",e.footerRow,this.question.cssClasses,"row-footer");return r.createElement("tfoot",null,t)},t.prototype.renderRows=function(){for(var e=this.question.cssClasses,t=[],n=this.question.renderedTable.renderedRows,o=0;o<n.length;o++)t.push(this.renderRow(n[o].id,n[o],e));return r.createElement("tbody",null,t)},t.prototype.renderRow=function(e,t,n,o){for(var i=[],s=t.cells,a=0;a<s.length;a++)i.push(this.renderCell(s[a],a,n,o));var u="row"+e;return r.createElement(r.Fragment,{key:u},"row-footer"==o?r.createElement("tr",null,i):r.createElement(Mt,{model:t,parentMatrix:this.question},i))},t.prototype.renderCell=function(e,t,n,o){var i="cell"+t;if(e.hasQuestion)return r.createElement(Jt,{key:i,cssClasses:n,cell:e,creator:this.creator,reason:o});var s=o;s||(s=e.hasTitle?"row-header":"");var a=this.renderCellContent(e,s,n),u=null;return(e.width||e.minWidth)&&(u={},e.width&&(u.width=e.width),e.minWidth&&(u.minWidth=e.minWidth)),r.createElement("td",{className:e.className,key:i,style:u,colSpan:e.colSpans,title:e.getTitle()},a)},t.prototype.renderCellContent=function(e,t,n){var o=null,i=null;if((e.width||e.minWidth)&&(i={},e.width&&(i.width=e.width),e.minWidth&&(i.minWidth=e.minWidth)),e.hasTitle){t="row-header";var a=this.renderLocString(e.locTitle),u=e.column?r.createElement(Qt,{column:e.column,question:this.question}):null;o=r.createElement(r.Fragment,null,a,u)}if(e.isDragHandlerCell&&(o=r.createElement(r.Fragment,null,r.createElement(Bt,{item:{data:{row:e.row,question:this.question}}}))),e.isActionsCell&&(o=s.Instance.createElement("sv-matrixdynamic-actions-cell",{question:this.question,cssClasses:n,cell:e,model:e.item.getData()})),e.hasPanel&&(o=r.createElement(_e,{key:e.panel.id,element:e.panel,survey:this.question.survey,cssClasses:n,isDisplayMode:this.isDisplayMode,creator:this.creator})),e.isErrorsCell&&e.isErrorsCell)return r.createElement(se,{question:e.question,creator:this.creator});if(!o)return null;var l=r.createElement(r.Fragment,null,o);return this.wrapCell(e,l,t)},t.prototype.renderElement=function(){var e=this.renderHeader(),t=this.renderFooter(),n=this.renderRows();return r.createElement("table",{className:this.question.getTableCss()},e,n,t)},t}(c),Wt=function(e){function t(t){var n=e.call(this,t)||this;n.question.renderedTable;return n.state=n.getState(),n}return zt(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.onRenderedTableResetCallback=function(){t.updateStateOnCallback()}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question.onRenderedTableResetCallback=function(){}},t.prototype.renderElement=function(){return this.renderTableDiv()},t.prototype.renderTableDiv=function(){var e=this,t=this.question.showHorizontalScroll?{overflowX:"scroll"}:{};return r.createElement("div",{style:t,className:this.question.cssClasses.tableWrapper,ref:function(t){return e.setControl(t)}},r.createElement(Ht,{question:this.question,creator:this.creator,wrapCell:function(t,n,r){return e.wrapCell(t,n,r)}}))},t}(h),Ut=function(e){function t(t){return e.call(this,t)||this}return zt(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return r.createElement(L,{model:this.model,handleClick:!1})},t}(p);s.Instance.registerElement("sv-matrixdynamic-actions-cell",(function(e){return r.createElement(Ut,e)}));var Qt=function(e){function t(t){return e.call(this,t)||this}return zt(t,e),Object.defineProperty(t.prototype,"column",{get:function(){return this.props.column},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.column},t.prototype.renderElement=function(){return this.column.isRenderedRequired?r.createElement(r.Fragment,null,r.createElement("span",null," "),r.createElement("span",{className:this.question.cssClasses.cellRequiredText},this.column.requiredText)):null},t}(p),Jt=function(e){function t(t){return e.call(this,t)||this}return zt(t,e),Object.defineProperty(t.prototype,"cell",{get:function(){return this.props.cell},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemCss",{get:function(){return this.cell?this.cell.className:""},enumerable:!1,configurable:!0}),t.prototype.getQuestion=function(){var t=e.prototype.getQuestion.call(this);return t||(this.cell?this.cell.question:null)},t.prototype.doAfterRender=function(){var e=this.cellRef.current;if(e&&this.cell&&this.question&&this.question.survey&&"r"!==e.getAttribute("data-rendered")){e.setAttribute("data-rendered","r");var t={cell:this.cell,cellQuestion:this.question,htmlElement:e,row:this.cell.row,column:this.cell.cell.column};this.question.survey.matrixAfterCellRender(this.question,t),this.question.afterRenderCore(e)}},t.prototype.getShowErrors=function(){return this.question.isVisible&&(!this.cell.isChoice||this.cell.isFirstChoice)},t.prototype.getCellStyle=function(){var t=e.prototype.getCellStyle.call(this);return(this.cell.width||this.cell.minWidth)&&(t||(t={}),this.cell.width&&(t.width=this.cell.width),this.cell.minWidth&&(t.minWidth=this.cell.minWidth)),t},t.prototype.getHeaderText=function(){return this.cell.headers},t.prototype.renderCellContent=function(){var t=e.prototype.renderCellContent.call(this),n=this.cell.showResponsiveTitle?r.createElement("span",{className:this.cell.responsiveTitleCss},this.renderLocString(this.cell.responsiveLocTitle)):null;return r.createElement(r.Fragment,null,n,t)},t.prototype.renderQuestion=function(){return this.question.isVisible?this.cell.isChoice?this.cell.isOtherChoice?this.renderOtherComment():this.cell.isCheckbox?this.renderCellCheckboxButton():this.renderCellRadiogroupButton():ne.renderQuestionBody(this.creator,this.question):r.createElement(r.Fragment,null)},t.prototype.renderOtherComment=function(){var e=this.cell.question,t=e.cssClasses||{};return r.createElement(Y,{question:e,cssClasses:t,otherCss:t.other,isDisplayMode:e.isInputReadOnly})},t.prototype.renderCellCheckboxButton=function(){var e=this.cell.question.id+"item"+this.cell.choiceIndex;return r.createElement(Ae,{key:e,question:this.cell.question,cssClasses:this.cell.question.cssClasses,isDisplayMode:this.cell.question.isInputReadOnly,item:this.cell.item,isFirst:this.cell.isFirstChoice,index:this.cell.choiceIndex.toString(),hideCaption:!0})},t.prototype.renderCellRadiogroupButton=function(){var e=this.cell.question.id+"item"+this.cell.choiceIndex;return r.createElement(xt,{key:e,question:this.cell.question,cssClasses:this.cell.question.cssClasses,isDisplayMode:this.cell.question.isInputReadOnly,item:this.cell.item,index:this.cell.choiceIndex.toString(),isChecked:this.cell.question.value===this.cell.item.value,isDisabled:this.cell.question.isReadOnly||!this.cell.item.isEnabled,hideCaption:!0})},t}(ie),Kt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gt=function(e){function t(t){return e.call(this,t)||this}return Kt(t,e),t}(Wt);W.Instance.registerQuestion("matrixdropdown",(function(e){return r.createElement(Gt,e)}));var Yt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnRowAddClick=n.handleOnRowAddClick.bind(n),n}return Yt(t,e),Object.defineProperty(t.prototype,"matrix",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.handleOnRowAddClick=function(e){this.matrix.addRowUI()},t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.renderedTable.showTable?this.renderTableDiv():this.renderNoRowsContent(e);return r.createElement("div",null,this.renderAddRowButtonOnTop(e),t,this.renderAddRowButtonOnBottom(e))},t.prototype.renderAddRowButtonOnTop=function(e){return this.matrix.renderedTable.showAddRowOnTop?this.renderAddRowButton(e):null},t.prototype.renderAddRowButtonOnBottom=function(e){return this.matrix.renderedTable.showAddRowOnBottom?this.renderAddRowButton(e):null},t.prototype.renderNoRowsContent=function(e){var t=this.renderLocString(this.matrix.locEmptyRowsText),n=r.createElement("div",{className:e.emptyRowsText},t),o=this.matrix.renderedTable.showAddRow?this.renderAddRowButton(e,!0):void 0;return r.createElement("div",{className:e.emptyRowsSection},n,o)},t.prototype.renderAddRowButton=function(e,t){return void 0===t&&(t=!1),s.Instance.createElement("sv-matrixdynamic-add-btn",{question:this.question,cssClasses:e,isEmptySection:t})},t}(Wt);W.Instance.registerQuestion("matrixdynamic",(function(e){return r.createElement(Zt,e)}));var $t=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnRowAddClick=n.handleOnRowAddClick.bind(n),n}return Yt(t,e),Object.defineProperty(t.prototype,"matrix",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.handleOnRowAddClick=function(e){this.matrix.addRowUI()},t.prototype.renderElement=function(){var e=this.renderLocString(this.matrix.locAddRowText),t=r.createElement("button",{className:this.matrix.getAddRowButtonCss(this.props.isEmptySection),type:"button",disabled:this.matrix.isInputReadOnly,onClick:this.matrix.isDesignMode?void 0:this.handleOnRowAddClick},e,r.createElement("span",{className:this.props.cssClasses.iconAdd}));return this.props.isEmptySection?t:r.createElement("div",{className:this.props.cssClasses.footer},t)},t}(p);s.Instance.registerElement("sv-matrixdynamic-add-btn",(function(e){return r.createElement($t,e)}));var Xt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),en=function(e){function t(t){return e.call(this,t)||this}return Xt(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this.props.item&&this.props.item.data||this.props.data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item&&this.props.item.data.question||this.props.data.question},enumerable:!1,configurable:!0}),t}(p),tn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.addPanelUI()},t}return Xt(t,e),t.prototype.renderElement=function(){if(!this.question.canAddPanel)return null;var e=this.renderLocString(this.question.locPanelAddText);return o.a.createElement("button",{type:"button",className:this.question.getAddButtonCss(),onClick:this.handleClick},o.a.createElement("span",{className:this.question.cssClasses.buttonAddText},e))},t}(en);s.Instance.registerElement("sv-paneldynamic-add-btn",(function(e){return o.a.createElement(tn,e)}));var nn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.goToNextPanel()},t}return nn(t,e),t.prototype.renderElement=function(){return o.a.createElement("div",{title:this.question.panelNextText,onClick:this.handleClick,className:this.question.getNextButtonCss()},o.a.createElement(E,{iconName:this.question.cssClasses.progressBtnIcon,size:"auto"}))},t}(en);s.Instance.registerElement("sv-paneldynamic-next-btn",(function(e){return o.a.createElement(rn,e)}));var on=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.goToPrevPanel()},t}return on(t,e),t.prototype.renderElement=function(){return o.a.createElement("div",{title:this.question.panelPrevText,onClick:this.handleClick,className:this.question.getPrevButtonCss()},o.a.createElement(E,{iconName:this.question.cssClasses.progressBtnIcon,size:"auto"}))},t}(en);s.Instance.registerElement("sv-paneldynamic-prev-btn",(function(e){return o.a.createElement(sn,e)}));var an=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),un=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return an(t,e),t.prototype.renderElement=function(){return o.a.createElement("div",{className:this.question.cssClasses.progressText},this.question.progressText)},t}(en);s.Instance.registerElement("sv-paneldynamic-progress-text",(function(e){return o.a.createElement(un,e)}));var ln=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cn=function(e){function t(t){return e.call(this,t)||this}return ln(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.setState({panelCounter:0});var t=this;this.question.panelCountChangedCallback=function(){t.updateQuestionRendering()},this.question.currentIndexChangedCallback=function(){t.updateQuestionRendering()},this.question.renderModeChangedCallback=function(){t.updateQuestionRendering()}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question.panelCountChangedCallback=function(){},this.question.currentIndexChangedCallback=function(){},this.question.renderModeChangedCallback=function(){}},t.prototype.updateQuestionRendering=function(){this.setState({panelCounter:this.state?this.state.panelCounter+1:1})},t.prototype.renderElement=function(){var e=this,t=[];this.question.renderedPanels.forEach((function(n,o){t.push(r.createElement(pn,{key:n.id,element:n,question:e.question,index:o,cssClasses:e.question.cssClasses,isDisplayMode:e.isDisplayMode,creator:e.creator}))}));var n=this.question.isRenderModeList&&this.question.showLegacyNavigation?this.renderAddRowButton():null,o=this.question.isProgressTopShowing?this.renderNavigator():null,i=this.question.isProgressBottomShowing?this.renderNavigator():null,s=this.renderNavigatorV2(),a=this.renderPlaceholder();return r.createElement("div",{className:this.question.cssClasses.root},a,o,r.createElement("div",{className:this.question.cssClasses.panelsContainer},t),i,n,s)},t.prototype.renderNavigator=function(){if(!this.question.showLegacyNavigation)return this.question.isRangeShowing&&this.question.isProgressTopShowing?this.renderRange():null;var e=this.question.isRangeShowing?this.renderRange():null,t=this.rendrerPrevButton(),n=this.rendrerNextButton(),o=this.renderAddRowButton(),i=this.question.isProgressTopShowing?this.question.cssClasses.progressTop:this.question.cssClasses.progressBottom;return r.createElement("div",{className:i},r.createElement("div",{style:{clear:"both"}},r.createElement("div",{className:this.question.cssClasses.progressContainer},t,e,n),o,this.renderProgressText()))},t.prototype.renderProgressText=function(){return r.createElement(un,{data:{question:this.question}})},t.prototype.rendrerPrevButton=function(){return r.createElement(sn,{data:{question:this.question}})},t.prototype.rendrerNextButton=function(){return r.createElement(rn,{data:{question:this.question}})},t.prototype.renderRange=function(){return r.createElement("div",{className:this.question.cssClasses.progress},r.createElement("div",{className:this.question.cssClasses.progressBar,style:{width:this.question.progress},role:"progressbar"}))},t.prototype.renderAddRowButton=function(){return s.Instance.createElement("sv-paneldynamic-add-btn",{data:{question:this.question}})},t.prototype.renderNavigatorV2=function(){if(!this.question.showNavigation)return null;var e=this.question.isRangeShowing&&this.question.isProgressBottomShowing?this.renderRange():null;return r.createElement("div",{className:this.question.cssClasses.footer},r.createElement("hr",{className:this.question.cssClasses.separator}),e,this.question.footerToolbar.visibleActions.length?r.createElement("div",{className:this.question.cssClasses.footerButtonsContainer},r.createElement(L,{model:this.question.footerToolbar})):null)},t.prototype.renderPlaceholder=function(){return this.question.getShowNoEntriesPlaceholder()?r.createElement("div",{className:this.question.cssClasses.noEntriesPlaceholder},r.createElement("span",null,this.renderLocString(this.question.locNoEntriesText)),this.renderAddRowButton()):null},t}(h),pn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ln(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),t.prototype.getSurvey=function(){return this.question?this.question.survey:null},t.prototype.getCss=function(){var e=this.getSurvey();return e?e.getCss():{}},t.prototype.render=function(){var t=e.prototype.render.call(this),n=this.renderButton(),o=this.question.showSeparator(this.index)?r.createElement("hr",{className:this.question.cssClasses.separator}):null;return r.createElement(r.Fragment,null,r.createElement("div",{className:this.question.getPanelWrapperCss(this.panel)},t,n),o)},t.prototype.renderButton=function(){return"right"!==this.question.panelRemoveButtonLocation||!this.question.canRemovePanel||this.question.isRenderModeList&&this.panel.isCollapsed?null:s.Instance.createElement("sv-paneldynamic-remove-btn",{data:{question:this.question,panel:this.panel}})},t}(_e);W.Instance.registerQuestion("paneldynamic",(function(e){return r.createElement(cn,e)}));var hn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dn=function(e){function t(t){return e.call(this,t)||this}return hn(t,e),Object.defineProperty(t.prototype,"isTop",{get:function(){return this.props.isTop},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progress",{get:function(){return this.survey.progressValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progressText",{get:function(){return this.survey.progressText},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e={width:this.progress+"%"};return r.createElement("div",{className:this.survey.getProgressCssClasses(this.props.container)},r.createElement("div",{style:e,className:this.css.progressBar,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-label":"progress"},r.createElement("span",{className:i.SurveyProgressModel.getProgressTextInBarCss(this.css)},this.progressText)),r.createElement("span",{className:i.SurveyProgressModel.getProgressTextUnderBarCss(this.css)},this.progressText))},t}(Pe);s.Instance.registerElement("sv-progress-pages",(function(e){return r.createElement(dn,e)})),s.Instance.registerElement("sv-progress-questions",(function(e){return r.createElement(dn,e)})),s.Instance.registerElement("sv-progress-correctquestions",(function(e){return r.createElement(dn,e)})),s.Instance.registerElement("sv-progress-requiredquestions",(function(e){return r.createElement(dn,e)}));var fn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mn=function(e){function t(t){var n=e.call(this,t)||this;return n.listContainerRef=r.createRef(),n}return fn(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"container",{get:function(){return this.props.container},enumerable:!1,configurable:!0}),t.prototype.onResize=function(e){this.setState({canShowItemTitles:e}),this.setState({canShowHeader:!e})},t.prototype.onUpdateScroller=function(e){this.setState({hasScroller:e})},t.prototype.onUpdateSettings=function(){this.setState({canShowItemTitles:this.model.showItemTitles}),this.setState({canShowFooter:!this.model.showItemTitles})},t.prototype.render=function(){var e=this;return r.createElement("div",{className:this.model.getRootCss(this.props.container),style:{maxWidth:this.model.progressWidth},role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-label":"progress"},this.state.canShowHeader?r.createElement("div",{className:this.css.progressButtonsHeader},r.createElement("div",{className:this.css.progressButtonsPageTitle,title:this.model.headerText},this.model.headerText)):null,r.createElement("div",{className:this.css.progressButtonsContainer},r.createElement("div",{className:this.model.getScrollButtonCss(this.state.hasScroller,!0),role:"button",onClick:function(){return e.clickScrollButton(e.listContainerRef.current,!0)}}),r.createElement("div",{className:this.css.progressButtonsListContainer,ref:this.listContainerRef},r.createElement("ul",{className:this.css.progressButtonsList},this.getListElements())),r.createElement("div",{className:this.model.getScrollButtonCss(this.state.hasScroller,!1),role:"button",onClick:function(){return e.clickScrollButton(e.listContainerRef.current,!1)}})),this.state.canShowFooter?r.createElement("div",{className:this.css.progressButtonsFooter},r.createElement("div",{className:this.css.progressButtonsPageTitle,title:this.model.footerText},this.model.footerText)):null)},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,o=c.renderLocString(e.locNavigationTitle);return r.createElement("li",{key:"listelement"+t,className:this.model.getListElementCss(t),onClick:this.model.isListElementClickable(t)?function(){return n.model.clickListElement(e)}:void 0,"data-page-number":this.model.getItemNumber(e)},r.createElement("div",{className:this.css.progressButtonsConnector}),this.state.canShowItemTitles?r.createElement(r.Fragment,null,r.createElement("div",{className:this.css.progressButtonsPageTitle,title:e.renderedNavigationTitle},o),r.createElement("div",{className:this.css.progressButtonsPageDescription,title:e.navigationDescription},e.navigationDescription)):null,r.createElement("div",{className:this.css.progressButtonsButton},r.createElement("div",{className:this.css.progressButtonsButtonBackground}),r.createElement("div",{className:this.css.progressButtonsButtonContent}),r.createElement("span",null,this.model.getItemNumber(e))))},t.prototype.clickScrollButton=function(e,t){e&&(e.scrollLeft+=70*(t?-1:1))},t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this),setTimeout((function(){t.respManager=new i.ProgressButtonsResponsivityManager(t.model,t.listContainerRef.current,t)}),10)},t.prototype.componentWillUnmount=function(){this.respManager&&this.respManager.dispose(),e.prototype.componentWillUnmount.call(this)},t}(Pe);s.Instance.registerElement("sv-progress-buttons",(function(e){return r.createElement(mn,e)}));var yn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleKeydown=function(e){t.model.onKeyDown(e)},t}return yn(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){var e=this;if(!this.item)return null;var t={paddingInlineStart:this.model.getItemIndent(this.item)},n=this.model.getItemClass(this.item),r=this.item.component||"sv-list-item-content",i=s.Instance.createElement(r,{item:this.item,key:this.item.id,model:this.model}),a=o.a.createElement("div",{style:t,className:this.model.cssClasses.itemBody,title:this.item.locTitle.calculatedText,onMouseOver:function(t){e.model.onItemHover(e.item)},onMouseLeave:function(t){e.model.onItemLeave(e.item)}},i),u=this.item.needSeparator?o.a.createElement("div",{className:this.model.cssClasses.itemSeparator}):null,l={display:this.model.isItemVisible(this.item)?null:"none"};return we(o.a.createElement("li",{className:n,role:"option",style:l,id:this.item.elementId,"aria-selected":this.model.isItemSelected(this.item),onClick:function(t){e.model.onItemClick(e.item),t.stopPropagation()},onPointerDown:function(t){return e.model.onPointerDown(t,e.item)}},u,a),this.item)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.onLastItemRended(this.item)},t}(c);s.Instance.registerElement("sv-list-item",(function(e){return o.a.createElement(gn,e)}));var vn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleKeydown=function(e){n.model.onKeyDown(e)},n.handleMouseMove=function(e){n.model.onMouseMove(e)},n.state={filterString:n.model.filterString||""},n.listContainerRef=o.a.createRef(),n}return vn(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.listContainerRef&&this.listContainerRef.current&&this.model.initListContainerHtmlElement(this.listContainerRef.current)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model&&this.model.initListContainerHtmlElement(void 0)},t.prototype.renderElement=function(){return o.a.createElement("div",{className:this.model.cssClasses.root,ref:this.listContainerRef},this.searchElementContent(),this.emptyContent(),this.renderList())},t.prototype.renderList=function(){if(!this.model.renderElements)return null;var e=this.renderItems(),t={display:this.model.isEmpty?"none":null};return o.a.createElement("ul",{className:this.model.getListClass(),style:t,role:"listbox",id:this.model.elementId,onMouseDown:function(e){e.preventDefault()},onKeyDown:this.handleKeydown,onMouseMove:this.handleMouseMove},e)},t.prototype.renderItems=function(){var e=this;if(!this.model)return null;var t=this.model.renderedActions;return t?t.map((function(t,n){return o.a.createElement(gn,{model:e.model,item:t,key:"item"+n})})):null},t.prototype.searchElementContent=function(){var e=this;if(this.model.showFilter){var t=this.model.showSearchClearButton&&this.model.filterString?o.a.createElement("button",{className:this.model.cssClasses.searchClearButtonIcon,onClick:function(t){e.model.onClickSearchClearButton(t)}},o.a.createElement(E,{iconName:"icon-searchclear",size:"auto"})):null;return o.a.createElement("div",{className:this.model.cssClasses.filter},o.a.createElement("div",{className:this.model.cssClasses.filterIcon},o.a.createElement(E,{iconName:"icon-search",size:"auto"})),o.a.createElement("input",{type:"text",className:this.model.cssClasses.filterInput,"aria-label":this.model.filterStringPlaceholder,placeholder:this.model.filterStringPlaceholder,value:this.state.filterString,onKeyUp:function(t){e.model.goToItems(t)},onChange:function(t){var n=i.settings.environment.root;t.target===n.activeElement&&(e.model.filterString=t.target.value)}}),t)}return null},t.prototype.emptyContent=function(){var e={display:this.model.isEmpty?null:"none"};return o.a.createElement("div",{className:this.model.cssClasses.emptyContainer,style:e},o.a.createElement("div",{className:this.model.cssClasses.emptyText,"aria-label":this.model.emptyMessage},this.model.emptyMessage))},t}(c);s.Instance.registerElement("sv-list",(function(e){return o.a.createElement(bn,e)}));var Cn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),En=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Cn(t,e),t.prototype.render=function(){var e,t=this.props.model;return e=t.isMobile?r.createElement("div",{onClick:t.togglePopup},r.createElement(E,{iconName:t.icon,size:24}),r.createElement(V,{model:t.popupModel})):r.createElement(bn,{model:t.listModel}),r.createElement("div",{className:t.containerCss},e)},t}(Pe);s.Instance.registerElement("sv-navigation-toc",(function(e){return r.createElement(En,e)}));var wn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),On=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnClick=n.handleOnClick.bind(n),n}return wn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.handleOnClick=function(e){this.question.setValueFromClick(e.target.value),this.setState({value:this.question.value})},t.prototype.renderItem=function(e,t){return s.Instance.createElement(this.question.itemComponent,{question:this.question,item:e,index:t,key:"value"+t,handleOnClick:this.handleOnClick,isDisplayMode:this.isDisplayMode})},t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=this.question.minRateDescription?this.renderLocString(this.question.locMinRateDescription):null,o=this.question.maxRateDescription?this.renderLocString(this.question.locMaxRateDescription):null;return r.createElement("div",{className:this.question.ratingRootCss,ref:function(t){return e.setControl(t)}},r.createElement("fieldset",{role:"radiogroup"},r.createElement("legend",{role:"presentation",className:"sv-hidden"}),this.question.hasMinLabel?r.createElement("span",{className:t.minText},n):null,this.question.renderedRateItems.map((function(t,n){return e.renderItem(t,n)})),this.question.hasMaxLabel?r.createElement("span",{className:t.maxText},o):null))},t}(h);W.Instance.registerQuestion("rating",(function(e){return r.createElement(On,e)}));var Pn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qn=function(e){function t(t){return e.call(this,t)||this}return Pn(t,e),t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.renderSelect(e);return r.createElement("div",{className:this.question.cssClasses.rootDropdown},t)},t}($e);W.Instance.registerQuestion("sv-rating-dropdown",(function(e){return r.createElement(qn,e)})),i.RendererFactory.Instance.registerRenderer("rating","dropdown","sv-rating-dropdown");var Sn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xn=function(e){function t(t){return e.call(this,t)||this}return Sn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses;return r.createElement("div",{id:this.question.inputId,className:t.root,ref:function(t){return e.setControl(t)}},this.question.formatedValue)},t}(h);W.Instance.registerQuestion("expression",(function(e){return r.createElement(xn,e)}));var _n=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),In=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnExpanded=n.handleOnExpanded.bind(n),n}return _n(t,e),t.prototype.getStateElements=function(){return[this.popup,this.popup.survey]},t.prototype.handleOnExpanded=function(e){this.popup.changeExpandCollapse()},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&this.popup.isShowing},t.prototype.renderElement=function(){var e=this,t=this.renderWindowHeader(),n=this.renderBody(),o={};return this.popup.renderedWidth&&(o.width=this.popup.renderedWidth,o.maxWidth=this.popup.renderedWidth),r.createElement("div",{className:this.popup.cssRoot,style:o,onScroll:function(){return e.popup.onScroll()}},r.createElement("div",{className:this.popup.cssRootContent},t,n))},t.prototype.renderWindowHeader=function(){var e,t=this.popup,n=(t.cssHeaderRoot,null),o=null,i=null;return t.isCollapsed?(" "+t.cssRootCollapsedMod,n=this.renderTitleCollapsed(t),e=this.renderExpandIcon()):e=this.renderCollapseIcon(),t.allowClose&&(o=this.renderCloseButton(this.popup)),t.allowFullScreen&&(i=this.renderAllowFullScreenButon(this.popup)),r.createElement("div",{className:t.cssHeaderRoot},n,r.createElement("div",{className:t.cssHeaderButtonsContainer},i,r.createElement("div",{className:t.cssHeaderCollapseButton,onClick:this.handleOnExpanded},e),o))},t.prototype.renderTitleCollapsed=function(e){return e.locTitle?r.createElement("div",{className:e.cssHeaderTitleCollapsed},e.locTitle.renderedHtml):null},t.prototype.renderExpandIcon=function(){return r.createElement(E,{iconName:"icon-restore_16x16",size:16})},t.prototype.renderCollapseIcon=function(){return r.createElement(E,{iconName:"icon-minimize_16x16",size:16})},t.prototype.renderCloseButton=function(e){return r.createElement("div",{className:e.cssHeaderCloseButton,onClick:function(){e.hide()}},r.createElement(E,{iconName:"icon-close_16x16",size:16}))},t.prototype.renderAllowFullScreenButon=function(e){var t;return t=e.isFullScreen?r.createElement(E,{iconName:"icon-back-to-panel_16x16",size:16}):r.createElement(E,{iconName:"icon-full-screen_16x16",size:16}),r.createElement("div",{className:e.cssHeaderFullScreenButton,onClick:function(){e.toggleFullScreen()}},t)},t.prototype.renderBody=function(){return r.createElement("div",{className:this.popup.cssBody},this.doRender())},t.prototype.createSurvey=function(t){t||(t={}),e.prototype.createSurvey.call(this,t),this.popup=new i.PopupSurveyModel(null,this.survey),t.closeOnCompleteTimeout&&(this.popup.closeOnCompleteTimeout=t.closeOnCompleteTimeout),this.popup.allowClose=t.allowClose,this.popup.allowFullScreen=t.allowFullScreen,this.popup.isShowing=!0,this.popup.isExpanded||!t.expanded&&!t.isExpanded||this.popup.expand()},t}(Ee),Vn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _n(t,e),t}(In),Tn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nn=function(e){function t(t){return e.call(this,t)||this}return Tn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this.question.cssClasses;return r.createElement("fieldset",{className:this.question.getSelectBaseRootCss()},r.createElement("legend",{className:"sv-hidden"},this.question.locTitle.renderedHtml),this.question.hasColumns?this.getColumns(e):this.getItems(e))},t.prototype.getColumns=function(e){var t=this;return this.question.columns.map((function(n,o){var i=n.map((function(n,r){return t.renderItem("item"+r,n,e)}));return r.createElement("div",{key:"column"+o,className:t.question.getColumnClass(),role:"presentation"},i)}))},t.prototype.getItems=function(e){for(var t=[],n=0;n<this.question.visibleChoices.length;n++){var r=this.question.visibleChoices[n],o="item"+n;t.push(this.renderItem(o,r,e))}return t},Object.defineProperty(t.prototype,"textStyle",{get:function(){return{marginLeft:"3px",display:"inline",position:"static"}},enumerable:!1,configurable:!0}),t.prototype.renderItem=function(e,t,n){var o=r.createElement(An,{key:e,question:this.question,item:t,cssClasses:n}),i=this.question.survey,s=null;return i&&(s=a.wrapItemValue(i,o,this.question,t)),null!=s?s:o},t}(h),An=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n}return Tn(t,e),t.prototype.getStateElement=function(){return this.item},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.reactOnStrChanged()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.item.locImageLink.onChanged=function(){}},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.reactOnStrChanged()},t.prototype.reactOnStrChanged=function(){var e=this;this.item.locImageLink.onChanged=function(){e.setState({locImageLinkchanged:e.state&&e.state.locImageLink?e.state.locImageLink+1:1})}},Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.handleOnChange=function(e){if(!this.question.isReadOnlyAttr){if(this.question.multiSelect)if(e.target.checked)this.question.value=this.question.value.concat(e.target.value);else{var t=this.question.value;t.splice(this.question.value.indexOf(e.target.value),1),this.question.value=t}else this.question.value=e.target.value;this.setState({value:this.question.value})}},t.prototype.renderElement=function(){var e=this,t=this.item,n=this.question,o=this.cssClasses,i=n.isItemSelected(t),s=n.getItemClass(t),a=null;n.showLabel&&(a=r.createElement("span",{className:n.cssClasses.itemText},t.text?c.renderLocString(t.locText):t.value));var u={objectFit:this.question.imageFit},l=null;if(t.locImageLink.renderedHtml&&"image"===this.question.contentMode&&(l=r.createElement("img",{className:o.image,src:t.locImageLink.renderedHtml,width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,alt:t.locText.renderedHtml,style:u,onLoad:function(n){e.question.onContentLoaded(t,n.nativeEvent)},onError:function(e){t.onErrorHandler(t,e.nativeEvent)}})),t.locImageLink.renderedHtml&&"video"===this.question.contentMode&&(l=r.createElement("video",{controls:!0,className:o.image,src:t.locImageLink.renderedHtml,width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,style:u,onLoadedMetadata:function(n){e.question.onContentLoaded(t,n.nativeEvent)},onError:function(e){t.onErrorHandler(t,e.nativeEvent)}})),!t.locImageLink.renderedHtml||t.contentNotLoaded){var p={width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,objectFit:this.question.imageFit};l=r.createElement("div",{className:o.itemNoImage,style:p},o.itemNoImageSvgIcon?r.createElement(E,{className:o.itemNoImageSvgIcon,iconName:this.question.cssClasses.itemNoImageSvgIconId,size:48}):null)}return r.createElement("div",{className:s},r.createElement("label",{className:o.label},r.createElement("input",{className:o.itemControl,id:this.question.getItemId(t),type:this.question.inputType,name:this.question.questionName,checked:i,value:t.value,disabled:!this.question.getItemEnabled(t),readOnly:this.question.isReadOnlyAttr,onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage}),r.createElement("div",{className:this.question.cssClasses.itemDecorator},r.createElement("div",{className:this.question.cssClasses.imageContainer},this.question.cssClasses.checkedItemDecorator?r.createElement("span",{className:this.question.cssClasses.checkedItemDecorator},this.question.cssClasses.checkedItemSvgIconId?r.createElement(E,{size:"auto",className:this.question.cssClasses.checkedItemSvgIcon,iconName:this.question.cssClasses.checkedItemSvgIconId}):null):null,l),a)))},t}(p);W.Instance.registerQuestion("imagepicker",(function(e){return r.createElement(Nn,e)}));var jn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Rn=function(e){function t(t){return e.call(this,t)||this}return jn(t,e),t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this),this.question.locImageLink.onChanged=function(){t.forceUpdate()}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question.locImageLink.onChanged=function(){}},Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.getImageCss(),n={objectFit:this.question.imageFit,width:this.question.renderedStyleWidth,height:this.question.renderedStyleHeight};this.question.imageLink&&!this.question.contentNotLoaded||(n.display="none");var o=null;"image"===this.question.renderedMode&&(o=r.createElement("img",{className:t,src:this.question.locImageLink.renderedHtml,alt:this.question.altText||this.question.title,width:this.question.renderedWidth,height:this.question.renderedHeight,style:n,onLoad:function(t){e.question.onLoadHandler()},onError:function(t){e.question.onErrorHandler()}})),"video"===this.question.renderedMode&&(o=r.createElement("video",{controls:!0,className:t,src:this.question.locImageLink.renderedHtml,width:this.question.renderedWidth,height:this.question.renderedHeight,style:n,onLoadedMetadata:function(t){e.question.onLoadHandler()},onError:function(t){e.question.onErrorHandler()}})),"youtube"===this.question.renderedMode&&(o=r.createElement("iframe",{className:t,src:this.question.locImageLink.renderedHtml,width:this.question.renderedWidth,height:this.question.renderedHeight,style:n}));var i=null;return this.question.imageLink&&!this.question.contentNotLoaded||(i=r.createElement("div",{className:this.question.cssClasses.noImage},r.createElement(E,{iconName:this.question.cssClasses.noImageSvgIconId,size:48}))),r.createElement("div",{className:this.question.cssClasses.root},o,i)},t}(h);W.Instance.registerQuestion("image",(function(e){return r.createElement(Rn,e)}));var Dn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ln=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:n.question.value},n}return Dn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=this.question.showLoadingIndicator?this.renderLoadingIndicator():null,o=this.renderCleanButton();return r.createElement("div",{className:t.root,ref:function(t){return e.setControl(t)},style:{width:this.question.renderedCanvasWidth}},r.createElement("div",{className:t.placeholder,style:{display:this.question.needShowPlaceholder()?"":"none"}},this.renderLocString(this.question.locRenderedPlaceholder)),r.createElement("div",null,this.renderBackgroundImage(),r.createElement("canvas",{tabIndex:-1,className:this.question.cssClasses.canvas,onBlur:this.question.onBlur})),o,n)},t.prototype.renderBackgroundImage=function(){return this.question.backgroundImage?r.createElement("img",{className:this.question.cssClasses.backgroundImage,src:this.question.backgroundImage,style:{width:this.question.renderedCanvasWidth}}):null},t.prototype.renderLoadingIndicator=function(){return r.createElement("div",{className:this.question.cssClasses.loadingIndicator},r.createElement(ft,null))},t.prototype.renderCleanButton=function(){var e=this;if(!this.question.canShowClearButton)return null;var t=this.question.cssClasses;return r.createElement("div",{className:t.controls},r.createElement("button",{type:"button",className:t.clearButton,title:this.question.clearButtonCaption,onClick:function(){return e.question.clearValue(!0)}},this.question.cssClasses.clearButtonIconId?r.createElement(E,{iconName:this.question.cssClasses.clearButtonIconId,size:"auto"}):r.createElement("span",null,"✖")))},t}(h);W.Instance.registerQuestion("signaturepad",(function(e){return r.createElement(Ln,e)}));var kn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mn=function(e){function t(t){return e.call(this,t)||this}return kn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.question},t.prototype.renderElement=function(){var e=this.renderItems();return o.a.createElement("div",{className:this.question.cssClasses.root},e)},t.prototype.renderItems=function(){var e=this;return this.question.visibleChoices.map((function(t,n){return o.a.createElement(Fn,{key:e.question.inputId+"_"+n,item:t,question:e.question,index:n})}))},t}(h),Fn=function(e){function t(t){return e.call(this,t)||this}return kn(t,e),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){this.model=new i.ButtonGroupItemModel(this.question,this.item,this.index);var e=this.renderIcon(),t=this.renderInput(),n=this.renderCaption();return o.a.createElement("label",{role:"radio",className:this.model.css.label,title:this.model.caption.renderedHtml},t,o.a.createElement("div",{className:this.model.css.decorator},e,n))},t.prototype.renderIcon=function(){return this.model.iconName?o.a.createElement(E,{className:this.model.css.icon,iconName:this.model.iconName,size:this.model.iconSize||24}):null},t.prototype.renderInput=function(){var e=this;return o.a.createElement("input",{className:this.model.css.control,id:this.model.id,type:"radio",name:this.model.name,checked:this.model.selected,value:this.model.value,disabled:this.model.readOnly,onChange:function(){e.model.onChange()},"aria-required":this.model.isRequired,"aria-label":this.model.caption.renderedHtml,"aria-invalid":this.model.hasErrors,"aria-errormessage":this.model.describedBy,role:"radio"})},t.prototype.renderCaption=function(){if(!this.model.showCaption)return null;var e=this.renderLocString(this.model.caption);return o.a.createElement("span",{className:this.model.css.caption,title:this.model.caption.renderedHtml},e)},t}(c),Bn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zn=function(e){function t(t){return e.call(this,t)||this}return Bn(t,e),t.prototype.getStateElements=function(){var t=e.prototype.getStateElements.call(this);return this.question.contentQuestion&&t.push(this.question.contentQuestion),t},t.prototype.renderElement=function(){return ne.renderQuestionBody(this.creator,this.question.contentQuestion)},t}(d),Hn=function(e){function t(t){return e.call(this,t)||this}return Bn(t,e),t.prototype.canRender=function(){return!!this.question.contentPanel},t.prototype.renderElement=function(){return r.createElement(_e,{element:this.question.contentPanel,creator:this.creator,survey:this.question.survey})},t}(d);W.Instance.registerQuestion("custom",(function(e){return r.createElement(zn,e)})),W.Instance.registerQuestion("composite",(function(e){return r.createElement(Hn,e)}));var Wn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Un=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wn(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(){if(!this.item)return null;var e=[],t=this.renderLocString(this.item.locTitle,void 0,"locString");if(this.item.iconName){var n=o.a.createElement(E,{key:"icon",className:this.model.cssClasses.itemIcon,iconName:this.item.iconName,size:this.item.iconSize,"aria-label":this.item.title});e.push(n),e.push(o.a.createElement("span",{key:"text"},t))}else e.push(t);if(this.item.markerIconName){n=o.a.createElement(E,{key:"marker",className:this.item.cssClasses.itemMarkerIcon,iconName:this.item.markerIconName,size:this.item.markerIconSize});e.push(n)}return o.a.createElement(o.a.Fragment,null,e)},t}(c);s.Instance.registerElement("sv-list-item-content",(function(e){return o.a.createElement(Un,e)}));var Qn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Qn(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;if(!this.item)return null;var t=s.Instance.createElement("sv-list-item-content",{item:this.item,key:"content"+this.item.id,model:this.model});return o.a.createElement(o.a.Fragment,null,t,o.a.createElement(V,{model:null===(e=this.item)||void 0===e?void 0:e.popupModel}))},t}(c);s.Instance.registerElement("sv-list-item-group",(function(e){return o.a.createElement(Jn,e)}));var Kn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gn=function(e){function t(t){return e.call(this,t)||this}return Kn(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=[];return e.push(o.a.createElement("div",{key:"logo-image",className:this.survey.logoClassNames},o.a.createElement("img",{className:this.survey.css.logoImage,src:this.survey.locLogo.renderedHtml,alt:this.survey.locTitle.renderedHtml,width:this.survey.renderedLogoWidth,height:this.survey.renderedLogoHeight,style:{objectFit:this.survey.logoFit,width:this.survey.renderedStyleLogoWidth,height:this.survey.renderedStyleLogoHeight}}))),o.a.createElement(o.a.Fragment,null,e)},t}(o.a.Component);s.Instance.registerElement("sv-logo-image",(function(e){return o.a.createElement(Gn,e)}));var Yn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnRowRemoveClick=n.handleOnRowRemoveClick.bind(n),n}return Yn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item.data.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.item.data.row},enumerable:!1,configurable:!0}),t.prototype.handleOnRowRemoveClick=function(e){this.question.removeRowUI(this.row)},t.prototype.renderElement=function(){var e=this.renderLocString(this.question.locRemoveRowText);return o.a.createElement("button",{className:this.question.getRemoveRowButtonCss(),type:"button",onClick:this.handleOnRowRemoveClick,disabled:this.question.isInputReadOnly},e,o.a.createElement("span",{className:this.question.cssClasses.iconRemove}))},t}(p);s.Instance.registerElement("sv-matrix-remove-button",(function(e){return o.a.createElement(Zn,e)}));var $n=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnShowHideClick=n.handleOnShowHideClick.bind(n),n}return $n(t,e),t.prototype.getStateElement=function(){return this.props.item},Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item.data.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.item.data.row},enumerable:!1,configurable:!0}),t.prototype.handleOnShowHideClick=function(e){this.row.showHideDetailPanelClick()},t.prototype.renderElement=function(){var e=this.row.isDetailPanelShowing,t=e,n=e?this.row.detailPanelId:void 0;return o.a.createElement("button",{type:"button",onClick:this.handleOnShowHideClick,className:this.question.getDetailPanelButtonCss(this.row),"aria-expanded":t,"aria-controls":n},o.a.createElement(E,{className:this.question.getDetailPanelIconCss(this.row),iconName:this.question.getDetailPanelIconId(this.row),size:"auto"}))},t}(p);s.Instance.registerElement("sv-matrix-detail-button",(function(e){return o.a.createElement(Xn,e)}));var er=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.removePanelUI(t.data.panel)},t}return er(t,e),t.prototype.renderElement=function(){var e=this.renderLocString(this.question.locPanelRemoveText);return o.a.createElement("button",{className:this.question.getPanelRemoveButtonCss(),onClick:this.handleClick,type:"button"},o.a.createElement("span",{className:this.question.cssClasses.buttonRemoveText},e),o.a.createElement("span",{className:this.question.cssClasses.iconRemove}))},t}(en);s.Instance.registerElement("sv-paneldynamic-remove-btn",(function(e){return o.a.createElement(tr,e)}));var nr=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nr(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return this.item.isVisible},t.prototype.renderElement=function(){return o.a.createElement("input",{className:this.item.innerCss,type:"button",disabled:this.item.disabled,onMouseDown:this.item.data&&this.item.data.mouseDown,onClick:this.item.action,title:this.item.getTooltip(),value:this.item.title})},t}(p);s.Instance.registerElement("sv-nav-btn",(function(e){return o.a.createElement(rr,e)}));var or=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ir=function(e){function t(t){var n=e.call(this,t)||this;return n.onChangedHandler=function(e,t){n.isRendering||n.setState({changed:n.state&&n.state.changed?n.state.changed+1:1})},n.rootRef=o.a.createRef(),n}return or(t,e),Object.defineProperty(t.prototype,"locStr",{get:function(){return this.props.locStr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this.props.style},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.reactOnStrChanged()},t.prototype.componentWillUnmount=function(){this.locStr&&this.locStr.onStringChanged.remove(this.onChangedHandler)},t.prototype.componentDidUpdate=function(e,t){e.locStr&&e.locStr.onStringChanged.remove(this.onChangedHandler),this.reactOnStrChanged()},t.prototype.reactOnStrChanged=function(){this.locStr&&this.locStr.onStringChanged.add(this.onChangedHandler)},t.prototype.render=function(){if(!this.locStr)return null;this.isRendering=!0;var e=this.renderString();return this.isRendering=!1,e},t.prototype.renderString=function(){var e=this.locStr.allowLineBreaks?"sv-string-viewer sv-string-viewer--multiline":"sv-string-viewer";if(this.locStr.hasHtml){var t={__html:this.locStr.renderedHtml};return o.a.createElement("span",{ref:this.rootRef,className:e,style:this.style,dangerouslySetInnerHTML:t})}return o.a.createElement("span",{ref:this.rootRef,className:e,style:this.style},this.locStr.renderedHtml)},t}(o.a.Component);s.Instance.registerElement(i.LocalizableString.defaultRenderer,(function(e){return o.a.createElement(ir,e)}));var sr=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ar=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return sr(t,e),t.prototype.render=function(){return o.a.createElement("div",null,o.a.createElement("span",{className:this.props.cssClasses.error.icon||void 0,"aria-hidden":"true"}),o.a.createElement("span",{className:this.props.cssClasses.error.item||void 0},o.a.createElement(ir,{locStr:this.props.error.locText})))},t}(o.a.Component);s.Instance.registerElement("sv-question-error",(function(e){return o.a.createElement(ar,e)}));var ur=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ur(t,e),t.prototype.render=function(){var e;return o.a.createElement("div",{className:"sv-skeleton-element",id:null===(e=this.props.element)||void 0===e?void 0:e.id})},t}(o.a.Component);s.Instance.registerElement("sv-skeleton",(function(e){return o.a.createElement(lr,e)}));var cr=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return cr(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.renderLogoImage=function(){var e=this.model.survey.getElementWrapperComponentName(this.model.survey,"logo-image"),t=this.model.survey.getElementWrapperComponentData(this.model.survey,"logo-image");return s.Instance.createElement(e,{data:t})},t.prototype.render=function(){return o.a.createElement("div",{className:"sv-header--mobile"},this.model.survey.hasLogo?o.a.createElement("div",{className:"sv-header__logo"},this.renderLogoImage()):null,this.model.survey.hasTitle?o.a.createElement("div",{className:"sv-header__title",style:{maxWidth:this.model.textAreaWidth}},o.a.createElement(H,{element:this.model.survey})):null,this.model.survey.renderedHasDescription?o.a.createElement("div",{className:"sv-header__description",style:{maxWidth:this.model.textAreaWidth}},o.a.createElement("div",{className:this.model.survey.css.description},c.renderLocString(this.model.survey.locDescription))):null)},t}(o.a.Component),hr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return cr(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.renderLogoImage=function(){var e=this.model.survey.getElementWrapperComponentName(this.model.survey,"logo-image"),t=this.model.survey.getElementWrapperComponentData(this.model.survey,"logo-image");return s.Instance.createElement(e,{data:t})},t.prototype.render=function(){return o.a.createElement("div",{className:this.model.css,style:this.model.style},o.a.createElement("div",{className:"sv-header__cell-content",style:this.model.contentStyle},this.model.showLogo?o.a.createElement("div",{className:"sv-header__logo"},this.renderLogoImage()):null,this.model.showTitle?o.a.createElement("div",{className:"sv-header__title",style:{maxWidth:this.model.textAreaWidth}},o.a.createElement(H,{element:this.model.survey})):null,this.model.showDescription?o.a.createElement("div",{className:"sv-header__description",style:{maxWidth:this.model.textAreaWidth}},o.a.createElement("div",{className:this.model.survey.css.description},c.renderLocString(this.model.survey.locDescription))):null))},t}(o.a.Component),dr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return cr(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){if(this.model.survey=this.props.survey,"advanced"!==this.props.survey.headerView)return null;var e=null;return e=this.props.survey.isMobile?o.a.createElement(pr,{model:this.model}):o.a.createElement("div",{className:this.model.contentClasses,style:{maxWidth:this.model.maxWidth}},this.model.cells.map((function(e,t){return o.a.createElement(hr,{key:t,model:e})}))),o.a.createElement("div",{className:this.model.headerClasses,style:{height:this.model.renderedHeight}},this.model.backgroundImage?o.a.createElement("div",{style:this.model.backgroundImageStyle,className:this.model.backgroundImageClasses}):null,e)},t}(c);s.Instance.registerElement("sv-header",(function(e){return o.a.createElement(dr,e)}));var fr=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mr=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 fr(t,e),Object.defineProperty(t.prototype,"locStr",{get:function(){return this.props.locStr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this.props.style},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(this.locStr){var e=this;this.locStr.onChanged=function(){e.setState({changed:e.state.changed+1})}}},t.prototype.componentWillUnmount=function(){this.locStr&&(this.locStr.onChanged=function(){})},t.prototype.render=function(){if(!this.locStr)return null;if(this.locStr.hasHtml){var e={__html:this.locStr.renderedHtml};return o.a.createElement("span",{className:"sv-string-editor",contentEditable:"true",suppressContentEditableWarning:!0,style:this.style,dangerouslySetInnerHTML:e,onBlur:this.onInput,onClick:this.onClick})}return o.a.createElement("span",{className:"sv-string-editor",contentEditable:"true",suppressContentEditableWarning:!0,style:this.style,onBlur:this.onInput,onClick:this.onClick},this.locStr.renderedHtml)},t}(o.a.Component);s.Instance.registerElement(i.LocalizableString.editableRenderer,(function(e){return o.a.createElement(mr,e)}));var yr=function(){function e(){}return e.isAvailable=function(){return"undefined"!=typeof window},e.isFileReaderAvailable=function(){return!!e.isAvailable()&&!!window.FileReader},e.getLocation=function(){if(e.isAvailable())return window.location},e.getVisualViewport=function(){return e.isAvailable()?window.visualViewport:null},e.getInnerWidth=function(){if(e.isAvailable())return window.innerWidth},e.getInnerHeight=function(){return e.isAvailable()?window.innerHeight:null},e.getWindow=function(){if(e.isAvailable())return window},e.hasOwn=function(t){if(e.isAvailable())return t in window},e.getSelection=function(){if(e.isAvailable()&&window.getSelection)return window.getSelection()},e.requestAnimationFrame=function(t){if(e.isAvailable())return window.requestAnimationFrame(t)},e.addEventListener=function(t,n){e.isAvailable()&&window.addEventListener(t,n)},e.removeEventListener=function(t,n){e.isAvailable()&&window.removeEventListener(t,n)},e.matchMedia=function(t){return e.isAvailable()&&void 0!==window.matchMedia?window.matchMedia(t):null},e}(),gr=function(){function e(){}return e.isAvailable=function(){return"undefined"!=typeof document},e.getBody=function(){if(e.isAvailable())return document.body},e.getDocumentElement=function(){if(e.isAvailable())return document.documentElement},e.getDocument=function(){if(e.isAvailable())return document},e.getCookie=function(){if(e.isAvailable())return document.cookie},e.setCookie=function(t){e.isAvailable()&&(document.cookie=t)},e.activeElementBlur=function(){if(e.isAvailable()){var t=document.activeElement;t&&t.blur&&t.blur()}},e.createElement=function(t){if(e.isAvailable())return document.createElement(t)},e.getComputedStyle=function(t){return e.isAvailable()?document.defaultView.getComputedStyle(t):new CSSStyleDeclaration},e.addEventListener=function(t,n){e.isAvailable()&&document.addEventListener(t,n)},e.removeEventListener=function(t,n){e.isAvailable()&&document.removeEventListener(t,n)},e}(),vr="undefined"!=typeof globalThis?globalThis.document:(void 0).document,br={designMode:{showEmptyDescriptions:!0,showEmptyTitles:!0},get allowShowEmptyDescriptionInDesignMode(){return this.designMode.showEmptyDescriptions},set allowShowEmptyDescriptionInDesignMode(e){this.designMode.showEmptyDescriptions=e},get allowShowEmptyTitleInDesignMode(){return this.designMode.showEmptyTitles},set allowShowEmptyTitleInDesignMode(e){this.designMode.showEmptyTitles=e},localization:{useLocalTimeZone:!0,storeDuplicatedTranslations:!1,defaultLocaleName:"default"},get useLocalTimeZone(){return this.localization.useLocalTimeZone},set useLocalTimeZone(e){this.localization.useLocalTimeZone=e},get storeDuplicatedTranslations(){return this.localization.storeDuplicatedTranslations},set storeDuplicatedTranslations(e){this.localization.storeDuplicatedTranslations=e},get defaultLocaleName(){return this.localization.defaultLocaleName},set defaultLocaleName(e){this.localization.defaultLocaleName=e},web:{onBeforeRequestChoices:function(e,t){},encodeUrlParams:!0,cacheLoadedChoices:!0,disableQuestionWhileLoadingChoices:!1,surveyServiceUrl:"https://api.surveyjs.io/public/v1/Survey"},get webserviceEncodeParameters(){return this.web.encodeUrlParams},set webserviceEncodeParameters(e){this.web.encodeUrlParams=e},get useCachingForChoicesRestful(){return this.web.cacheLoadedChoices},set useCachingForChoicesRestful(e){this.web.cacheLoadedChoices=e},get useCachingForChoicesRestfull(){return this.web.cacheLoadedChoices},set useCachingForChoicesRestfull(e){this.web.cacheLoadedChoices=e},get disableOnGettingChoicesFromWeb(){return this.web.disableQuestionWhileLoadingChoices},set disableOnGettingChoicesFromWeb(e){this.web.disableQuestionWhileLoadingChoices=e},get surveyServiceUrl(){return this.web.surveyServiceUrl},set surveyServiceUrl(e){this.web.surveyServiceUrl=e},triggers:{changeNavigationButtonsOnComplete:!0,executeCompleteOnValueChanged:!1,executeSkipOnValueChanged:!0},get executeCompleteTriggerOnValueChanged(){return this.triggers.executeCompleteOnValueChanged},set executeCompleteTriggerOnValueChanged(e){this.triggers.executeCompleteOnValueChanged=e},get changeNavigationButtonsOnCompleteTrigger(){return this.triggers.changeNavigationButtonsOnComplete},set changeNavigationButtonsOnCompleteTrigger(e){this.triggers.changeNavigationButtonsOnComplete=e},get executeSkipTriggerOnValueChanged(){return this.triggers.executeSkipOnValueChanged},set executeSkipTriggerOnValueChanged(e){this.triggers.executeSkipOnValueChanged=e},serialization:{itemValueSerializeAsObject:!1,itemValueSerializeDisplayText:!1,localizableStringSerializeAsObject:!1},get itemValueAlwaysSerializeAsObject(){return this.serialization.itemValueSerializeAsObject},set itemValueAlwaysSerializeAsObject(e){this.serialization.itemValueSerializeAsObject=e},get itemValueAlwaysSerializeText(){return this.serialization.itemValueSerializeDisplayText},set itemValueAlwaysSerializeText(e){this.serialization.itemValueSerializeDisplayText=e},get serializeLocalizableStringAsObject(){return this.serialization.localizableStringSerializeAsObject},set serializeLocalizableStringAsObject(e){this.serialization.localizableStringSerializeAsObject=e},lazyRender:{enabled:!1,firstBatchSize:3},get lazyRowsRendering(){return this.lazyRender.enabled},set lazyRowsRendering(e){this.lazyRender.enabled=e},get lazyRowsRenderingStartRow(){return this.lazyRender.firstBatchSize},set lazyRowsRenderingStartRow(e){this.lazyRender.firstBatchSize=e},matrix:{defaultCellType:"dropdown",defaultRowName:"default",totalsSuffix:"-total",maxRowCount:1e3,maxRowCountInCondition:1,renderRemoveAsIcon:!0,columnWidthsByType:{file:{minWidth:"240px"},comment:{minWidth:"200px"}},rateSize:"small"},get matrixDefaultRowName(){return this.matrix.defaultRowName},set matrixDefaultRowName(e){this.matrix.defaultRowName=e},get matrixDefaultCellType(){return this.matrix.defaultCellType},set matrixDefaultCellType(e){this.matrix.defaultCellType=e},get matrixTotalValuePostFix(){return this.matrix.totalsSuffix},set matrixTotalValuePostFix(e){this.matrix.totalsSuffix=e},get matrixMaximumRowCount(){return this.matrix.maxRowCount},set matrixMaximumRowCount(e){this.matrix.maxRowCount=e},get matrixMaxRowCountInCondition(){return this.matrix.maxRowCountInCondition},set matrixMaxRowCountInCondition(e){this.matrix.maxRowCountInCondition=e},get matrixRenderRemoveAsIcon(){return this.matrix.renderRemoveAsIcon},set matrixRenderRemoveAsIcon(e){this.matrix.renderRemoveAsIcon=e},panel:{maxPanelCount:100,maxPanelCountInCondition:1},get panelDynamicMaxPanelCountInCondition(){return this.panel.maxPanelCountInCondition},set panelDynamicMaxPanelCountInCondition(e){this.panel.maxPanelCountInCondition=e},get panelMaximumPanelCount(){return this.panel.maxPanelCount},set panelMaximumPanelCount(e){this.panel.maxPanelCount=e},readOnly:{enableValidation:!1,commentRenderMode:"textarea",textRenderMode:"input"},get readOnlyCommentRenderMode(){return this.readOnly.commentRenderMode},set readOnlyCommentRenderMode(e){this.readOnly.commentRenderMode=e},get readOnlyTextRenderMode(){return this.readOnly.textRenderMode},set readOnlyTextRenderMode(e){this.readOnly.textRenderMode=e},numbering:{includeQuestionsWithHiddenNumber:!1,includeQuestionsWithHiddenTitle:!1},get setQuestionVisibleIndexForHiddenTitle(){return this.numbering.includeQuestionsWithHiddenTitle},set setQuestionVisibleIndexForHiddenTitle(e){this.numbering.includeQuestionsWithHiddenTitle=e},get setQuestionVisibleIndexForHiddenNumber(){return this.numbering.includeQuestionsWithHiddenNumber},set setQuestionVisibleIndexForHiddenNumber(e){this.numbering.includeQuestionsWithHiddenNumber=e},enterKeyAction:"default",comparator:{trimStrings:!0,caseSensitive:!1,normalizeTextCallback:function(e,t){return e}},expressionDisableConversionChar:"#",get commentPrefix(){return br.commentSuffix},set commentPrefix(e){br.commentSuffix=e},commentSuffix:"-Comment",itemValueSeparator:"|",ratingMaximumRateValueCount:20,tagboxCloseOnSelect:!1,dropdownSearchDelay:500,confirmActionFunc:function(e){return confirm(e)},confirmActionAsync:function(e,t,n,r,o){return function(e,t,n,r,o){var i=new ci(void 0),s=br.showDialog({componentName:"sv-string-viewer",data:{locStr:i,locString:i,model:i},onApply:function(){return t(!0),!0},onCancel:function(){return t(!1),!1},title:e,displayMode:"popup",isFocusedContent:!1,cssClass:"sv-popup--confirm-delete"},o),a=s.footerToolbar,u=a.getActionById("apply"),l=a.getActionById("cancel");return l.title=wr.getString("cancel",r),l.innerCss="sv-popup__body-footer-item sv-popup__button sd-btn sd-btn--small",u.title=n||wr.getString("ok",r),u.innerCss="sv-popup__body-footer-item sv-popup__button sv-popup__button--danger sd-btn sd-btn--small sd-btn--danger",function(e){e.width="min-content"}(s),!0}(e,t,n,r,o)},minWidth:"300px",maxWidth:"100%",maxConditionRunCountOnValueChanged:10,notifications:{lifetime:2e3},autoAdvanceDelay:300,showItemsInOrder:"default",noneItemValue:"none",refuseItemValue:"refused",dontKnowItemValue:"dontknow",specialChoicesOrder:{selectAllItem:[-1],noneItem:[1],refuseItem:[2],dontKnowItem:[3],otherItem:[4]},choicesSeparator:", ",supportedValidators:{question:["expression"],comment:["text","regex"],text:["numeric","text","regex","email"],checkbox:["answercount"],imagepicker:["answercount"]},minDate:"",maxDate:"",showModal:void 0,showDialog:void 0,supportCreatorV2:!1,showDefaultItemsInCreatorV2:!0,customIcons:{},rankingDragHandleArea:"entireItem",environment:vr?{root:vr,_rootElement:gr.getBody(),get rootElement(){var e;return null!==(e=this._rootElement)&&void 0!==e?e:gr.getBody()},set rootElement(e){this._rootElement=e},_popupMountContainer:gr.getBody(),get popupMountContainer(){var e;return null!==(e=this._popupMountContainer)&&void 0!==e?e:gr.getBody()},set popupMountContainer(e){this._popupMountContainer=e},svgMountContainer:vr.head,stylesSheetsMountContainer:vr.head}:void 0,showMaxLengthIndicator:!0,animationEnabled:!0,titleTags:{survey:"h3",page:"h4",panel:"h4",question:"h5"},questions:{inputTypes:["color","date","datetime-local","email","month","number","password","range","tel","text","time","url","week"],dataList:["","name","honorific-prefix","given-name","additional-name","family-name","honorific-suffix","nickname","organization-title","username","new-password","current-password","organization","street-address","address-line1","address-line2","address-line3","address-level4","address-level3","address-level2","address-level1","country","country-name","postal-code","cc-name","cc-given-name","cc-additional-name","cc-family-name","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc","cc-type","transaction-currency","transaction-amount","language","bday","bday-day","bday-month","bday-year","sex","url","photo","tel","tel-country-code","tel-national","tel-area-code","tel-local","tel-local-prefix","tel-local-suffix","tel-extension","email","impp"]},legacyProgressBarView:!1,maskSettings:{patternPlaceholderChar:"_",patternEscapeChar:"\\",patternDefinitions:{9:/[0-9]/,a:/[a-zA-Z]/,"#":/[a-zA-Z0-9]/}}},Cr=function(){function e(){}return e.isValueEmpty=function(t){if(Array.isArray(t)&&0===t.length)return!0;if(t&&e.isValueObject(t)&&t.constructor===Object){for(var n in t)if(!e.isValueEmpty(t[n]))return!1;return!0}return!t&&0!==t&&!1!==t},e.isArrayContainsEqual=function(t,n){if(!Array.isArray(t)||!Array.isArray(n))return!1;if(t.length!==n.length)return!1;for(var r=0;r<t.length;r++){for(var o=0;o<n.length&&!e.isTwoValueEquals(t[r],n[o]);o++);if(o===n.length)return!1}return!0},e.isArraysEqual=function(t,n,r,o,i){if(void 0===r&&(r=!1),!Array.isArray(t)||!Array.isArray(n))return!1;if(t.length!==n.length)return!1;if(r){for(var s=[],a=[],u=0;u<t.length;u++)s.push(t[u]),a.push(n[u]);s.sort(),a.sort(),t=s,n=a}for(u=0;u<t.length;u++)if(!e.isTwoValueEquals(t[u],n[u],r,o,i))return!1;return!0},e.compareStrings=function(e,t){var n=br.comparator.normalizeTextCallback;if(e&&(e=n(e,"compare").trim()),t&&(t=n(t,"compare").trim()),!e&&!t)return 0;if(!e)return-1;if(!t)return 1;if(e===t)return 0;for(var r=-1,o=0;o<e.length&&o<t.length;o++){if(this.isCharDigit(e[o])&&this.isCharDigit(t[o])){r=o;break}if(e[o]!==t[o])break}if(r>-1){var i=this.getNumberFromStr(e,r),s=this.getNumberFromStr(t,r);if(!Number.isNaN(i)&&!Number.isNaN(s)&&i!==s)return i>s?1:-1}return e>t?1:-1},e.isTwoValueEquals=function(t,n,r,o,i){if(void 0===r&&(r=!1),t===n)return!0;if(Array.isArray(t)&&0===t.length&&void 0===n)return!0;if(Array.isArray(n)&&0===n.length&&void 0===t)return!0;if(null==t&&""===n)return!0;if(null==n&&""===t)return!0;if(void 0===i&&(i=br.comparator.trimStrings),void 0===o&&(o=br.comparator.caseSensitive),"string"==typeof t&&"string"==typeof n){var s=br.comparator.normalizeTextCallback;return t=s(t,"compare"),n=s(n,"compare"),i&&(t=t.trim(),n=n.trim()),o||(t=t.toLowerCase(),n=n.toLowerCase()),t===n}if(t instanceof Date&&n instanceof Date)return t.getTime()==n.getTime();if(e.isConvertibleToNumber(t)&&e.isConvertibleToNumber(n)&&parseInt(t)===parseInt(n)&&parseFloat(t)===parseFloat(n))return!0;if(!e.isValueEmpty(t)&&e.isValueEmpty(n)||e.isValueEmpty(t)&&!e.isValueEmpty(n))return!1;if((!0===t||!1===t)&&"string"==typeof n)return t.toString()===n.toLocaleLowerCase();if((!0===n||!1===n)&&"string"==typeof t)return n.toString()===t.toLocaleLowerCase();if(!e.isValueObject(t)&&!e.isValueObject(n))return t==n;if(!e.isValueObject(t)||!e.isValueObject(n))return!1;if(t.equals&&n.equals)return t.equals(n);if(Array.isArray(t)&&Array.isArray(n))return e.isArraysEqual(t,n,r,o,i);for(var a in t)if(t.hasOwnProperty(a)){if(!n.hasOwnProperty(a))return!1;if(!this.isTwoValueEquals(t[a],n[a],r,o,i))return!1}for(a in n)if(n.hasOwnProperty(a)&&!t.hasOwnProperty(a))return!1;return!0},e.randomizeArray=function(e){for(var t=e.length-1;t>0;t--){var n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}return e},e.getUnbindValue=function(t){if(Array.isArray(t)){for(var n=[],r=0;r<t.length;r++)n.push(e.getUnbindValue(t[r]));return n}return!t||!e.isValueObject(t)||t instanceof Date?t:JSON.parse(JSON.stringify(t))},e.createCopy=function(e){var t={};if(!e)return t;for(var n in e)t[n]=e[n];return t},e.isConvertibleToNumber=function(e){return null!=e&&!Array.isArray(e)&&!isNaN(e)},e.isValueObject=function(e,t){return e instanceof Object&&(!t||!Array.isArray(e))},e.isNumber=function(e){return!isNaN(this.getNumber(e))},e.getNumber=function(e){if("string"==typeof e&&e&&0==e.indexOf("0x")&&e.length>32)return NaN;e=this.prepareStringToNumber(e);var t=parseFloat(e);return isNaN(t)||!isFinite(e)?NaN:t},e.prepareStringToNumber=function(e){if("string"!=typeof e||!e)return e;var t=e.indexOf(",");return t>-1&&e.indexOf(",",t+1)<0?e.replace(",","."):e},e.getMaxLength=function(e,t){return e<0&&(e=t),e>0?e:null},e.getRemainingCharacterCounterText=function(e,t){return!t||t<=0||!br.showMaxLengthIndicator?"":[e?e.length:"0",t].join("/")},e.getNumberByIndex=function(t,n){if(t<0)return"";var r=1,o="",i=".",s=!0,a="A",u="";if(n){for(var l=(u=n).length-1,c=!1,p=0;p<u.length;p++)if(e.isCharDigit(u[p])){c=!0;break}for(var h=function(){return c&&!e.isCharDigit(u[l])||e.isCharNotLetterAndDigit(u[l])};l>=0&&h();)l--;var d="";for(l<u.length-1&&(d=u.substring(l+1),u=u.substring(0,l+1)),l=u.length-1;l>=0&&!h()&&(l--,c););a=u.substring(l+1),o=u.substring(0,l+1),parseInt(a)?r=parseInt(a):1==a.length&&(s=!1),(d||o)&&(i=d)}if(s){for(var f=(t+r).toString();f.length<a.length;)f="0"+f;return o+f+i}return o+String.fromCharCode(a.charCodeAt(0)+t)+i},e.isCharNotLetterAndDigit=function(t){return t.toUpperCase()==t.toLowerCase()&&!e.isCharDigit(t)},e.isCharDigit=function(e){return e>="0"&&e<="9"},e.getNumberFromStr=function(e,t){if(!this.isCharDigit(e[t]))return NaN;for(var n="";t<e.length&&this.isCharDigit(e[t]);)n+=e[t],t++;return n?this.getNumber(n):NaN},e.countDecimals=function(t){if(e.isNumber(t)&&Math.floor(t)!==t){var n=t.toString().split(".");return n.length>1&&n[1].length||0}return 0},e.correctAfterPlusMinis=function(t,n,r){var o=e.countDecimals(t),i=e.countDecimals(n);if(o>0||i>0){var s=Math.max(o,i);r=parseFloat(r.toFixed(s))}return r},e.sumAnyValues=function(t,n){if(!e.isNumber(t)||!e.isNumber(n)){if(Array.isArray(t)&&Array.isArray(n))return[].concat(t).concat(n);if(Array.isArray(t)||Array.isArray(n)){var r=Array.isArray(t)?t:n,o=r===t?n:t;if("string"==typeof o){var i=r.join(", ");return r===t?i+o:o+i}if("number"==typeof o){for(var s=0,a=0;a<r.length;a++)"number"==typeof r[a]&&(s=e.correctAfterPlusMinis(s,r[a],s+r[a]));return e.correctAfterPlusMinis(s,o,s+o)}}return t+n}return"string"==typeof t||"string"==typeof n?t+n:e.correctAfterPlusMinis(t,n,t+n)},e.correctAfterMultiple=function(t,n,r){var o=e.countDecimals(t)+e.countDecimals(n);return o>0&&(r=parseFloat(r.toFixed(o))),r},e.convertArrayValueToObject=function(t,n,r){void 0===r&&(r=void 0);var o=new Array;if(!t||!Array.isArray(t))return o;for(var i=0;i<t.length;i++){var s=void 0;Array.isArray(r)&&(s=e.findObjByPropValue(r,n,t[i])),s||((s={})[n]=t[i]),o.push(s)}return o},e.findObjByPropValue=function(t,n,r){for(var o=0;o<t.length;o++)if(e.isTwoValueEquals(t[o][n],r))return t[o]},e.convertArrayObjectToValue=function(t,n){var r=new Array;if(!t||!Array.isArray(t))return r;for(var o=0;o<t.length;o++){var i=t[o]?t[o][n]:void 0;e.isValueEmpty(i)||r.push(i)}return r},e.convertDateToString=function(e){var t=function(e){return e<10?"0"+e.toString():e.toString()};return e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())},e.convertDateTimeToString=function(e){var t=function(e){return e<10?"0"+e.toString():e.toString()};return this.convertDateToString(e)+" "+t(e.getHours())+":"+t(e.getMinutes())},e.convertValToQuestionVal=function(t,n){return t instanceof Date?"datetime-local"===n?e.convertDateTimeToString(t):e.convertDateToString(t):t},e.compareVerions=function(e,t){if(!e&&!t)return 0;for(var n=e.split("."),r=t.split("."),o=n.length,i=r.length,s=0;s<o&&s<i;s++){var a=n[s],u=r[s];if(a.length!==u.length)return a.length<u.length?-1:1;if(a!==u)return a<u?-1:1}return o===i?0:o<i?-1:1},e}();String.prototype.format||(String.prototype.format=function(){var e=arguments;return this.replace(/{(\d+)}/g,(function(t,n){return void 0!==e[n]?e[n]:t}))});var Er={pagePrevText:"Previous",pageNextText:"Next",completeText:"Complete",previewText:"Preview",editText:"Edit",startSurveyText:"Start",otherItemText:"Other (describe)",noneItemText:"None",refuseItemText:"Refuse to answer",dontKnowItemText:"Don't know",selectAllItemText:"Select All",progressText:"Page {0} of {1}",indexText:"{0} of {1}",panelDynamicProgressText:"{0} of {1}",panelDynamicTabTextFormat:"Panel {panelIndex}",questionsProgressText:"Answered {0}/{1} questions",emptySurvey:"The survey doesn't contain any visible elements.",completingSurvey:"Thank you for completing the survey",completingSurveyBefore:"You have already completed this survey.",loadingSurvey:"Loading Survey...",placeholder:"Select...",ratingOptionsCaption:"Select...",value:"value",requiredError:"Response required.",requiredErrorInPanel:"Response required: answer at least one question.",requiredInAllRowsError:"Response required: answer questions in all rows.",eachRowUniqueError:"Each row must have a unique value.",numericError:"The value should be numeric.",minError:"The value should not be less than {0}",maxError:"The value should not be greater than {0}",textMinLength:"Please enter at least {0} character(s).",textMaxLength:"Please enter no more than {0} character(s).",textMinMaxLength:"Please enter at least {0} and no more than {1} characters.",minRowCountError:"Please fill in at least {0} row(s).",minSelectError:"Please select at least {0} option(s).",maxSelectError:"Please select no more than {0} option(s).",numericMinMax:"The '{0}' should be at least {1} and at most {2}",numericMin:"The '{0}' should be at least {1}",numericMax:"The '{0}' should be at most {1}",invalidEmail:"Please enter a valid e-mail address.",invalidExpression:"The expression: {0} should return 'true'.",urlRequestError:"The request returned error '{0}'. {1}",urlGetChoicesError:"The request returned empty data or the 'path' property is incorrect",exceedMaxSize:"The file size should not exceed {0}.",noUploadFilesHandler:"Files cannot be uploaded. Please add a handler for the 'onUploadFiles' event.",otherRequiredError:"Response required: enter another value.",uploadingFile:"Your file is uploading. Please wait several seconds and try again.",loadingFile:"Loading...",chooseFile:"Choose file(s)...",noFileChosen:"No file selected",filePlaceholder:"Drag and drop a file here or click the button below to select a file to upload.",confirmDelete:"Are you sure you want to delete this record?",keyDuplicationError:"This value should be unique.",addColumn:"Add Column",addRow:"Add Row",removeRow:"Remove",emptyRowsText:"There are no rows.",addPanel:"Add new",removePanel:"Remove",showDetails:"Show Details",hideDetails:"Hide Details",choices_Item:"item",matrix_column:"Column",matrix_row:"Row",multipletext_itemname:"text",savingData:"The results are being saved on the server...",savingDataError:"An error occurred and we could not save the results.",savingDataSuccess:"The results were saved successfully!",savingExceedSize:"Your response exceeds 64KB. Please reduce the size of your file(s) and try again or contact the survey owner.",saveAgainButton:"Try again",timerMin:"min",timerSec:"sec",timerSpentAll:"You have spent {0} on this page and {1} in total.",timerSpentPage:"You have spent {0} on this page.",timerSpentSurvey:"You have spent {0} in total.",timerLimitAll:"You have spent {0} of {1} on this page and {2} of {3} in total.",timerLimitPage:"You have spent {0} of {1} on this page.",timerLimitSurvey:"You have spent {0} of {1} in total.",clearCaption:"Clear",signaturePlaceHolder:"Sign here",signaturePlaceHolderReadOnly:"No signature",chooseFileCaption:"Select File",takePhotoCaption:"Take Photo",photoPlaceholder:"Click the button below to take a photo using the camera.",fileOrPhotoPlaceholder:"Drag and drop or select a file to upload or take a photo using the camera.",replaceFileCaption:"Replace file",removeFileCaption:"Remove this file",booleanCheckedLabel:"Yes",booleanUncheckedLabel:"No",confirmRemoveFile:"Are you sure that you want to remove this file: {0}?",confirmRemoveAllFiles:"Are you sure that you want to remove all files?",questionTitlePatternText:"Question Title",modalCancelButtonText:"Cancel",modalApplyButtonText:"Apply",filterStringPlaceholder:"Type to search...",emptyMessage:"No data to display",noEntriesText:"No entries yet.\nClick the button below to add a new entry.",noEntriesReadonlyText:"No entries",tabTitlePlaceholder:"New Panel",more:"More",tagboxDoneButtonCaption:"OK",selectToRankEmptyRankedAreaText:"All choices are selected for ranking",selectToRankEmptyUnrankedAreaText:"Drag choices here to rank them",ok:"OK",cancel:"Cancel"},wr={currentLocaleValue:"",defaultLocaleValue:"en",locales:{},localeNames:{},supportedLocales:[],get currentLocale(){return this.currentLocaleValue===this.defaultLocaleValue?"":this.currentLocaleValue},set currentLocale(e){"cz"===e&&(e="cs"),this.currentLocaleValue=e},get defaultLocale(){return this.defaultLocaleValue},set defaultLocale(e){"cz"===e&&(e="cs"),this.defaultLocaleValue=e},getLocaleStrings:function(e){return this.locales[e]},getString:function(e,t){var n=this;void 0===t&&(t=null);var r=new Array,o=function(e){var t=n.locales[e];t&&r.push(t)},i=function(e){if(e){o(e);var t=e.indexOf("-");t<1||(e=e.substring(0,t),o(e))}};i(t),i(this.currentLocale),i(this.defaultLocale),"en"!==this.defaultLocale&&o("en");for(var s=0;s<r.length;s++){var a=r[s][e];if(void 0!==a)return a}return this.onGetExternalString(e,t)},getLocales:function(e){void 0===e&&(e=!1);var t=[];t.push("");var n=this.locales;if(this.supportedLocales&&this.supportedLocales.length>0){n={};for(var r=0;r<this.supportedLocales.length;r++)n[this.supportedLocales[r]]=!0}for(var o in n)e&&o==this.defaultLocale||t.push(o);var i=function(e){if(!e)return"";var t=wr.localeNames[e];return t||(t=e),t.toLowerCase()};return t.sort((function(e,t){var n=i(e),r=i(t);return n===r?0:n<r?-1:1})),t},onGetExternalString:function(e,t){}};wr.locales.en=Er,wr.localeNames.en="english";var Or=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pr=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e};function qr(e,t,n){var r=e.getLocalizableString(n);if(!r){var o=void 0;"object"==typeof t.localizable&&t.localizable.defaultStr&&(o=t.localizable.defaultStr),r=e.createLocalizableString(n,e,!0,o),"object"==typeof t.localizable&&"function"==typeof t.localizable.onGetTextCallback&&(r.onGetTextCallback=t.localizable.onGetTextCallback)}}function Sr(e){return void 0===e&&(e={}),function(t,n){var r=function(e,t){if(t&&"object"==typeof t&&t.type===_o.ComputedUpdaterType){Io.startCollectDependencies((function(){return e[n]=t.updater()}),e,n);var r=t.updater(),o=Io.finishCollectDependencies();return t.setDependencies(o),e.dependencies[n]&&e.dependencies[n].dispose(),e.dependencies[n]=t,r}return t};e&&e.localizable?(Object.defineProperty(t,n,{get:function(){return function(e,t,n){qr(e,t,n);var r=e.getLocalizableStringText(n);if(r)return r;if("object"==typeof t.localizable&&t.localizable.defaultStr){var o=e.getLocale?e.getLocale():"";return wr.getString(t.localizable.defaultStr,o)}return""}(this,e,n)},set:function(t){qr(this,e,n);var o=r(this,t);this.setLocalizableStringText(n,o),e&&e.onSet&&e.onSet(o,this)}}),Object.defineProperty(t,"object"==typeof e.localizable&&e.localizable.name?e.localizable.name:"loc"+n.charAt(0).toUpperCase()+n.slice(1),{get:function(){return qr(this,e,n),this.getLocalizableString(n)}})):Object.defineProperty(t,n,{get:function(){var t=null;return e&&("function"==typeof e.getDefaultValue&&(t=e.getDefaultValue(this)),void 0!==e.defaultValue&&(t=e.defaultValue)),this.getPropertyValue(n,t)},set:function(t){var o=r(this,t);this.setPropertyValue(n,o),e&&e.onSet&&e.onSet(o,this)}})}}function xr(e,t,n){e.ensureArray(n,(function(n,r){var o=t?t.onPush:null;o&&o(n,r,e)}),(function(n,r){var o=t?t.onRemove:null;o&&o(n,r,e)}))}var _r=function(){function e(t,n,r){void 0===r&&(r=!1),this.name=n,this.isRequiredValue=!1,this.isUniqueValue=!1,this.isSerializable=!0,this.isLightSerializable=!0,this.isCustom=!1,this.isDynamicChoices=!1,this.isBindable=!1,this.category="",this.categoryIndex=-1,this.visibleIndex=-1,this.maxLength=-1,this.isArray=!1,this.classInfoValue=t,this.isRequiredValue=r,this.idValue=e.Index++}return Object.defineProperty(e.prototype,"id",{get:function(){return this.idValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classInfo",{get:function(){return this.classInfoValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this.typeValue?this.typeValue:"string"},set:function(e){"itemvalues"===e&&(e="itemvalue[]"),"textitems"===e&&(e="textitem[]"),this.typeValue=e,this.typeValue.indexOf("[]")===this.typeValue.length-2&&(this.isArray=!0,this.className=this.typeValue.substring(0,this.typeValue.length-2))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRequired",{get:function(){return this.isRequiredValue},set:function(e){e!==this.isRequired&&(this.isRequiredValue=e,this.classInfo&&this.classInfo.resetAllProperties())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUnique",{get:function(){return this.isUniqueValue},set:function(e){this.isUniqueValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uniquePropertyName",{get:function(){return this.uniquePropertyValue},set:function(e){this.uniquePropertyValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasToUseGetValue",{get:function(){return this.onGetValue||this.serializationProperty},enumerable:!1,configurable:!0}),e.prototype.getDefaultValue=function(t){var n=this.defaultValueFunc?this.defaultValueFunc(t):this.defaultValueValue;return e.getItemValuesDefaultValue&&Br.isDescendantOf(this.className,"itemvalue")&&(n=e.getItemValuesDefaultValue(this.defaultValueValue||[],this.className)),n},Object.defineProperty(e.prototype,"defaultValue",{get:function(){return this.getDefaultValue(void 0)},set:function(e){this.defaultValueValue=e},enumerable:!1,configurable:!0}),e.prototype.isDefaultValue=function(e){return this.isDefaultValueByObj(void 0,e)},e.prototype.isDefaultValueByObj=function(e,t){var n=this.getDefaultValue(e);return Cr.isValueEmpty(n)?this.isLocalizable?null==t:!1===t&&("boolean"==this.type||"switch"==this.type)||""===t||Cr.isValueEmpty(t):Cr.isTwoValueEquals(t,n,!1,!0,!1)},e.prototype.getSerializableValue=function(e){return this.onSerializeValue?this.onSerializeValue(e):this.getValue(e)},e.prototype.getValue=function(e){return this.onGetValue?this.onGetValue(e):this.serializationProperty&&e[this.serializationProperty]?e[this.serializationProperty].getJson():e[this.name]},e.prototype.getPropertyValue=function(e){return this.isLocalizable?e[this.serializationProperty]?e[this.serializationProperty].text:null:this.getValue(e)},Object.defineProperty(e.prototype,"hasToUseSetValue",{get:function(){return this.onSetValue||this.serializationProperty},enumerable:!1,configurable:!0}),e.prototype.settingValue=function(e,t){return!this.onSettingValue||e.isLoadingFromJson?t:this.onSettingValue(e,t)},e.prototype.setValue=function(e,t,n){this.onSetValue?this.onSetValue(e,t,n):this.serializationProperty&&e[this.serializationProperty]?e[this.serializationProperty].setJson(t):(t&&"string"==typeof t&&("number"==this.type&&(t=parseInt(t)),"boolean"!=this.type&&"switch"!=this.type||(t="true"===t.toLowerCase())),e[this.name]=t)},e.prototype.validateValue=function(e){var t=this.choices;return!Array.isArray(t)||0===t.length||t.indexOf(e)>-1},e.prototype.getObjType=function(e){return this.classNamePart?e.replace(this.classNamePart,""):e},Object.defineProperty(e.prototype,"choices",{get:function(){return this.getChoices(null)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasChoices",{get:function(){return!!this.choicesValue||!!this.choicesfunc},enumerable:!1,configurable:!0}),e.prototype.getChoices=function(e,t){return void 0===t&&(t=null),null!=this.choicesValue?this.choicesValue:null!=this.choicesfunc?this.choicesfunc(e,t):null},e.prototype.setChoices=function(e,t){void 0===t&&(t=null),this.choicesValue=e,this.choicesfunc=t},e.prototype.getBaseValue=function(){return this.baseValue?"function"==typeof this.baseValue?this.baseValue():this.baseValue:""},e.prototype.setBaseValue=function(e){this.baseValue=e},Object.defineProperty(e.prototype,"readOnly",{get:function(){return null!=this.readOnlyValue&&this.readOnlyValue},set:function(e){this.readOnlyValue=e},enumerable:!1,configurable:!0}),e.prototype.isEnable=function(e){return!this.readOnly&&(!e||!this.enableIf||this.enableIf(this.getOriginalObj(e)))},e.prototype.isVisible=function(e,t){void 0===t&&(t=null);var n=!this.layout||this.layout==e;return!(!this.visible||!n)&&(!this.visibleIf||!t||this.visibleIf(this.getOriginalObj(t)))},e.prototype.getOriginalObj=function(e){if(e&&e.getOriginalObj){var t=e.getOriginalObj();if(t&&Br.findProperty(t.getType(),this.name))return t}return e},Object.defineProperty(e.prototype,"visible",{get:function(){return null==this.visibleValue||this.visibleValue},set:function(e){this.visibleValue=e},enumerable:!1,configurable:!0}),e.prototype.isAvailableInVersion=function(e){return!(!this.alternativeName&&!this.oldName)||this.isAvailableInVersionCore(e)},e.prototype.getSerializedName=function(e){return this.alternativeName?this.isAvailableInVersionCore(e)?this.name:this.alternativeName||this.oldName:this.name},e.prototype.getSerializedProperty=function(e,t){return!this.oldName||this.isAvailableInVersionCore(t)?this:e&&e.getType?Br.findProperty(e.getType(),this.oldName):null},e.prototype.isAvailableInVersionCore=function(e){return!e||!this.version||Cr.compareVerions(this.version,e)<=0},Object.defineProperty(e.prototype,"isLocalizable",{get:function(){return null!=this.isLocalizableValue&&this.isLocalizableValue},set:function(e){this.isLocalizableValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataList",{get:function(){return Array.isArray(this.dataListValue)?this.dataListValue:[]},set:function(e){this.dataListValue=e},enumerable:!1,configurable:!0}),e.prototype.mergeWith=function(t){for(var n=e.mergableValues,r=0;r<n.length;r++)this.mergeValue(t,n[r])},e.prototype.addDependedProperty=function(e){this.dependedProperties||(this.dependedProperties=[]),this.dependedProperties.indexOf(e)<0&&this.dependedProperties.push(e)},e.prototype.getDependedProperties=function(){return this.dependedProperties?this.dependedProperties:[]},e.prototype.schemaType=function(){if("choicesByUrl"!==this.className)return"string"===this.className?this.className:this.className||this.baseClassName?"array":"switch"==this.type?"boolean":"boolean"==this.type||"number"==this.type?this.type:"string"},e.prototype.schemaRef=function(){if(this.className)return this.className},e.prototype.mergeValue=function(e,t){null==this[t]&&null!=e[t]&&(this[t]=e[t])},e.Index=1,e.mergableValues=["typeValue","choicesValue","baseValue","readOnlyValue","visibleValue","isSerializable","isLightSerializable","isCustom","isBindable","isUnique","uniquePropertyName","isDynamicChoices","isLocalizableValue","className","alternativeName","oldName","layout","version","classNamePart","baseClassName","defaultValue","defaultValueFunc","serializationProperty","onGetValue","onSetValue","onSettingValue","displayName","category","categoryIndex","visibleIndex","nextToProperty","overridingProperty","showMode","dependedProperties","visibleIf","enableIf","onExecuteExpression","onPropertyEditorUpdate","maxLength","maxValue","minValue","dataListValue"],e}(),Ir=function(){function e(){}return e.addProperty=function(t,n){t=t.toLowerCase();var r=e.properties;r[t]||(r[t]=[]),r[t].push(n)},e.removeProperty=function(t,n){t=t.toLowerCase();var r=e.properties;if(r[t])for(var o=r[t],i=0;i<o.length;i++)if(o[i].name==n){r[t].splice(i,1);break}},e.removeAllProperties=function(t){t=t.toLowerCase(),delete e.properties[t]},e.addClass=function(t,n){t=t.toLowerCase(),n&&(n=n.toLowerCase()),e.parentClasses[t]=n},e.getProperties=function(t){t=t.toLowerCase();for(var n=[],r=e.properties;t;){var o=r[t];if(o)for(var i=0;i<o.length;i++)n.push(o[i]);t=e.parentClasses[t]}return n},e.createProperties=function(t){t&&t.getType&&e.createPropertiesCore(t,t.getType())},e.createPropertiesCore=function(t,n){var r=e.properties;r[n]&&e.createPropertiesInObj(t,r[n]);var o=e.parentClasses[n];o&&e.createPropertiesCore(t,o)},e.createPropertiesInObj=function(t,n){for(var r=0;r<n.length;r++)e.createPropertyInObj(t,n[r])},e.createPropertyInObj=function(t,n){if(!(e.checkIsPropertyExists(t,n.name)||n.serializationProperty&&e.checkIsPropertyExists(t,n.serializationProperty))){if(n.isLocalizable&&n.serializationProperty&&t.createCustomLocalizableObj){t.createCustomLocalizableObj(n.name).defaultValue=n.defaultValue;var r={get:function(){return t.getLocalizableString(n.name)}};Object.defineProperty(t,n.serializationProperty,r);var o={get:function(){return t.getLocalizableStringText(n.name)},set:function(e){t.setLocalizableStringText(n.name,e)}};Object.defineProperty(t,n.name,o)}else{var i=n.defaultValue,s=n.isArray||"multiplevalues"===n.type;if("function"==typeof t.createNewArray&&(Br.isDescendantOf(n.className,"itemvalue")?(t.createNewArray(n.name,(function(e){e.locOwner=t,e.ownerPropertyName=n.name})),s=!0):s&&t.createNewArray(n.name),s&&(Array.isArray(i)&&t.setPropertyValue(n.name,i),i=null)),t.getPropertyValue&&t.setPropertyValue){o={get:function(){return n.onGetValue?n.onGetValue(t):t.getPropertyValue(n.name,i)},set:function(e){n.onSetValue?n.onSetValue(t,e,null):t.setPropertyValue(n.name,e)}};Object.defineProperty(t,n.name,o)}}"condition"!==n.type&&"expression"!==n.type||n.onExecuteExpression&&t.addExpressionProperty(n.name,n.onExecuteExpression)}},e.checkIsPropertyExists=function(e,t){return e.hasOwnProperty(t)||e[t]},e.properties={},e.parentClasses={},e}(),Vr=function(){function e(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=null),this.name=e,this.creator=n,this.parentName=r,e=e.toLowerCase(),this.isCustomValue=!n&&"survey"!==e,this.parentName&&(this.parentName=this.parentName.toLowerCase(),Ir.addClass(e,this.parentName),n&&this.makeParentRegularClass()),this.properties=new Array;for(var o=0;o<t.length;o++)this.createProperty(t[o],this.isCustom)}return e.prototype.find=function(e){for(var t=0;t<this.properties.length;t++)if(this.properties[t].name==e)return this.properties[t];return null},e.prototype.findProperty=function(e){return this.fillAllProperties(),this.hashProperties[e]},e.prototype.getAllProperties=function(){return this.fillAllProperties(),this.allProperties},e.prototype.getRequiredProperties=function(){if(this.requiredProperties)return this.requiredProperties;this.requiredProperties=[];for(var e=this.getAllProperties(),t=0;t<e.length;t++)e[t].isRequired&&this.requiredProperties.push(e[t]);return this.requiredProperties},e.prototype.resetAllProperties=function(){this.allProperties=void 0,this.requiredProperties=void 0,this.hashProperties=void 0;for(var e=Br.getChildrenClasses(this.name),t=0;t<e.length;t++)e[t].resetAllProperties()},Object.defineProperty(e.prototype,"isCustom",{get:function(){return this.isCustomValue},enumerable:!1,configurable:!0}),e.prototype.fillAllProperties=function(){var e=this;if(!this.allProperties){this.allProperties=[],this.hashProperties={};var t={};this.properties.forEach((function(e){return t[e.name]=e}));var n=this.parentName?Br.findClass(this.parentName):null;if(n)n.getAllProperties().forEach((function(n){var r=t[n.name];r?(r.mergeWith(n),e.addPropCore(r)):e.addPropCore(n)}));this.properties.forEach((function(t){e.hashProperties[t.name]||e.addPropCore(t)}))}},e.prototype.addPropCore=function(e){this.allProperties.push(e),this.hashProperties[e.name]=e,e.alternativeName&&(this.hashProperties[e.alternativeName]=e)},e.prototype.isOverridedProp=function(e){return!!this.parentName&&!!Br.findProperty(this.parentName,e)},e.prototype.hasRegularChildClass=function(){if(this.isCustom){this.isCustomValue=!1;for(var e=0;e<this.properties.length;e++)this.properties[e].isCustom=!1;Ir.removeAllProperties(this.name),this.makeParentRegularClass()}},e.prototype.makeParentRegularClass=function(){if(this.parentName){var e=Br.findClass(this.parentName);e&&e.hasRegularChildClass()}},e.prototype.createProperty=function(t,n){void 0===n&&(n=!1);var r="string"==typeof t?t:t.name;if(r){var o=null,i=r.indexOf(e.typeSymbol);i>-1&&(o=r.substring(i+1),r=r.substring(0,i));var s=this.getIsPropertyNameRequired(r)||!!t.isRequired;r=this.getPropertyName(r);var a=new _r(this,r,s);if(o&&(a.type=o),"object"==typeof t){if(t.type&&(a.type=t.type),void 0!==t.default&&(a.defaultValue=t.default),void 0!==t.defaultFunc&&(a.defaultValueFunc=t.defaultFunc),Cr.isValueEmpty(t.isSerializable)||(a.isSerializable=t.isSerializable),Cr.isValueEmpty(t.isLightSerializable)||(a.isLightSerializable=t.isLightSerializable),Cr.isValueEmpty(t.maxLength)||(a.maxLength=t.maxLength),void 0!==t.displayName&&(a.displayName=t.displayName),Cr.isValueEmpty(t.category)||(a.category=t.category),Cr.isValueEmpty(t.categoryIndex)||(a.categoryIndex=t.categoryIndex),Cr.isValueEmpty(t.nextToProperty)||(a.nextToProperty=t.nextToProperty),Cr.isValueEmpty(t.overridingProperty)||(a.overridingProperty=t.overridingProperty),Cr.isValueEmpty(t.visibleIndex)||(a.visibleIndex=t.visibleIndex),Cr.isValueEmpty(t.showMode)||(a.showMode=t.showMode),Cr.isValueEmpty(t.maxValue)||(a.maxValue=t.maxValue),Cr.isValueEmpty(t.minValue)||(a.minValue=t.minValue),Cr.isValueEmpty(t.dataList)||(a.dataList=t.dataList),Cr.isValueEmpty(t.isDynamicChoices)||(a.isDynamicChoices=t.isDynamicChoices),Cr.isValueEmpty(t.isBindable)||(a.isBindable=t.isBindable),Cr.isValueEmpty(t.isUnique)||(a.isUnique=t.isUnique),Cr.isValueEmpty(t.uniqueProperty)||(a.uniquePropertyName=t.uniqueProperty),Cr.isValueEmpty(t.isArray)||(a.isArray=t.isArray),!0!==t.visible&&!1!==t.visible||(a.visible=t.visible),t.visibleIf&&(a.visibleIf=t.visibleIf),t.enableIf&&(a.enableIf=t.enableIf),t.onExecuteExpression&&(a.onExecuteExpression=t.onExecuteExpression),t.onPropertyEditorUpdate&&(a.onPropertyEditorUpdate=t.onPropertyEditorUpdate),!0===t.readOnly&&(a.readOnly=!0),t.choices){var u="function"==typeof t.choices?t.choices:null,l="function"!=typeof t.choices?t.choices:null;a.setChoices(l,u)}if(t.baseValue&&a.setBaseValue(t.baseValue),t.onSerializeValue&&(a.onSerializeValue=t.onSerializeValue),t.onGetValue&&(a.onGetValue=t.onGetValue),t.onSetValue&&(a.onSetValue=t.onSetValue),t.onSettingValue&&(a.onSettingValue=t.onSettingValue),t.isLocalizable&&(t.serializationProperty="loc"+a.name),t.serializationProperty)a.serializationProperty=t.serializationProperty,a.serializationProperty&&0==a.serializationProperty.indexOf("loc")&&(a.isLocalizable=!0);t.isLocalizable&&(a.isLocalizable=t.isLocalizable),t.className&&(a.className=t.className),t.baseClassName&&(a.baseClassName=t.baseClassName,a.isArray=!0),!0===a.isArray&&(a.isArray=!0),t.classNamePart&&(a.classNamePart=t.classNamePart),t.alternativeName&&(a.alternativeName=t.alternativeName),t.oldName&&(a.oldName=t.oldName),t.layout&&(a.layout=t.layout),t.version&&(a.version=t.version),t.dependsOn&&this.addDependsOnProperties(a,t.dependsOn)}return this.properties.push(a),n&&!this.isOverridedProp(a.name)&&(a.isCustom=!0,Ir.addProperty(this.name,a)),a}},e.prototype.addDependsOnProperties=function(e,t){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addDependsOnProperty(e,t[n]);else this.addDependsOnProperty(e,t)},e.prototype.addDependsOnProperty=function(e,t){var n=this.find(t);n||(n=Br.findProperty(this.parentName,t)),n&&n.addDependedProperty(e.name)},e.prototype.getIsPropertyNameRequired=function(t){return t.length>0&&t[0]==e.requiredSymbol},e.prototype.getPropertyName=function(e){return this.getIsPropertyNameRequired(e)?e=e.slice(1):e},e.requiredSymbol="!",e.typeSymbol=":",e}(),Tr=function(){function e(){this.classes={},this.alternativeNames={},this.childrenClasses={},this.dynamicPropsCache={}}return e.prototype.getObjPropertyValue=function(e,t){if(this.isObjWrapper(e)&&this.isNeedUseObjWrapper(e,t)){var n=e.getOriginalObj(),r=Br.findProperty(n.getType(),t);if(r)return this.getObjPropertyValueCore(n,r)}var o=Br.findProperty(e.getType(),t);return o?this.getObjPropertyValueCore(e,o):e[t]},e.prototype.setObjPropertyValue=function(e,t,n){if(e[t]!==n)if(e[t]&&e[t].setJson)e[t].setJson(n);else{if(Array.isArray(n)){for(var r=[],o=0;o<n.length;o++)r.push(n[o]);n=r}e[t]=n}},e.prototype.getObjPropertyValueCore=function(e,t){if(!t.isSerializable)return e[t.name];if(t.isLocalizable){if(t.isArray)return e[t.name];if(t.serializationProperty)return e[t.serializationProperty].text}return e.getPropertyValue(t.name)},e.prototype.isObjWrapper=function(e){return!!e.getOriginalObj&&!!e.getOriginalObj()},e.prototype.isNeedUseObjWrapper=function(e,t){if(!e.getDynamicProperties)return!0;var n=e.getDynamicProperties();if(!Array.isArray(n))return!1;for(var r=0;r<n.length;r++)if(n[r].name===t)return!0;return!1},e.prototype.addClass=function(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=null),e=e.toLowerCase();var o=new Vr(e,t,n,r);(this.classes[e]=o,r)&&(r=r.toLowerCase(),this.childrenClasses[r]||(this.childrenClasses[r]=[]),this.childrenClasses[r].push(o));return o},e.prototype.removeClass=function(e){var t=this.findClass(e);if(t&&(delete this.classes[t.name],t.parentName)){var n=this.childrenClasses[t.parentName].indexOf(t);n>-1&&this.childrenClasses[t.parentName].splice(n,1)}},e.prototype.overrideClassCreatore=function(e,t){this.overrideClassCreator(e,t)},e.prototype.overrideClassCreator=function(e,t){e=e.toLowerCase();var n=this.findClass(e);n&&(n.creator=t)},e.prototype.getProperties=function(e){var t=this.findClass(e);return t?t.getAllProperties():[]},e.prototype.getPropertiesByObj=function(e){var t=e&&e.getType?e.getType():void 0;if(!t)return[];for(var n=this.getProperties(t),r=this.getDynamicPropertiesByObj(e),o=r.length-1;o>=0;o--)this.findProperty(t,r[o].name)&&r.splice(o,1);return 0===r.length?n:[].concat(n).concat(r)},e.prototype.addDynamicPropertiesIntoObj=function(e,t,n){var r=this;n.forEach((function(n){r.addDynamicPropertyIntoObj(e,t,n.name,!1),n.serializationProperty&&r.addDynamicPropertyIntoObj(e,t,n.serializationProperty,!0),n.alternativeName&&r.addDynamicPropertyIntoObj(e,t,n.alternativeName,!1)}))},e.prototype.addDynamicPropertyIntoObj=function(e,t,n,r){var o={configurable:!0,get:function(){return t[n]}};r||(o.set=function(e){t[n]=e}),Object.defineProperty(e,n,o)},e.prototype.getDynamicPropertiesByObj=function(e,t){if(void 0===t&&(t=null),!e||!e.getType)return[];if(e.getDynamicProperties)return e.getDynamicProperties();if(!e.getDynamicType&&!t)return[];var n=t||e.getDynamicType();return this.getDynamicPropertiesByTypes(e.getType(),n)},e.prototype.getDynamicPropertiesByTypes=function(e,t,n){if(!t)return[];var r=t+"-"+e;if(this.dynamicPropsCache[r])return this.dynamicPropsCache[r];var o=this.getProperties(t);if(!o||0==o.length)return[];for(var i={},s=this.getProperties(e),a=0;a<s.length;a++)i[s[a].name]=s[a];var u=[];n||(n=[]);for(var l=0;l<o.length;l++){var c=o[l];!i[c.name]&&n.indexOf(c.name)<0&&u.push(c)}return this.dynamicPropsCache[r]=u,u},e.prototype.hasOriginalProperty=function(e,t){return!!this.getOriginalProperty(e,t)},e.prototype.getOriginalProperty=function(e,t){var n=this.findProperty(e.getType(),t);return n||(this.isObjWrapper(e)?this.findProperty(e.getOriginalObj().getType(),t):null)},e.prototype.getProperty=function(e,t){var n=this.findProperty(e,t);if(!n)return n;var r=this.findClass(e);if(n.classInfo===r)return n;var o=new _r(r,n.name,n.isRequired);return o.mergeWith(n),o.isArray=n.isArray,r.properties.push(o),r.resetAllProperties(),o},e.prototype.findProperty=function(e,t){var n=this.findClass(e);return n?n.findProperty(t):null},e.prototype.findProperties=function(e,t){var n=new Array,r=this.findClass(e);if(!r)return n;for(var o=0;o<t.length;o++){var i=r.findProperty(t[o]);i&&n.push(i)}return n},e.prototype.getAllPropertiesByName=function(e){for(var t=new Array,n=this.getAllClasses(),r=0;r<n.length;r++)for(var o=this.findClass(n[r]),i=0;i<o.properties.length;i++)if(o.properties[i].name==e){t.push(o.properties[i]);break}return t},e.prototype.getAllClasses=function(){var e=new Array;for(var t in this.classes)e.push(t);return e},e.prototype.createClass=function(e,t){void 0===t&&(t=void 0),e=e.toLowerCase();var n=this.findClass(e);if(!n)return null;if(n.creator)return n.creator(t);for(var r=n.parentName;r;){if(!(n=this.findClass(r)))return null;if(r=n.parentName,n.creator)return this.createCustomType(e,n.creator,t)}return null},e.prototype.createCustomType=function(e,t,n){void 0===n&&(n=void 0),e=e.toLowerCase();var r=t(n),o=e,i=r.getTemplate?r.getTemplate():r.getType();return r.getType=function(){return o},r.getTemplate=function(){return i},Ir.createProperties(r),r},e.prototype.getChildrenClasses=function(e,t){void 0===t&&(t=!1),e=e.toLowerCase();var n=[];return this.fillChildrenClasses(e,t,n),n},e.prototype.getRequiredProperties=function(e){var t=this.findClass(e);if(!t)return[];for(var n=t.getRequiredProperties(),r=[],o=0;o<n.length;o++)r.push(n[o].name);return r},e.prototype.addProperties=function(e,t){e=e.toLowerCase();for(var n=this.findClass(e),r=0;r<t.length;r++)this.addCustomPropertyCore(n,t[r])},e.prototype.addProperty=function(e,t){return this.addCustomPropertyCore(this.findClass(e),t)},e.prototype.addCustomPropertyCore=function(e,t){if(!e)return null;var n=e.createProperty(t,!0);return n&&(this.clearDynamicPropsCache(e),e.resetAllProperties()),n},e.prototype.removeProperty=function(e,t){var n=this.findClass(e);if(!n)return!1;var r=n.find(t);r&&(this.clearDynamicPropsCache(n),this.removePropertyFromClass(n,r),n.resetAllProperties(),Ir.removeProperty(n.name,t))},e.prototype.clearDynamicPropsCache=function(e){this.dynamicPropsCache={}},e.prototype.removePropertyFromClass=function(e,t){var n=e.properties.indexOf(t);n<0||e.properties.splice(n,1)},e.prototype.fillChildrenClasses=function(e,t,n){var r=this.childrenClasses[e];if(r)for(var o=0;o<r.length;o++)t&&!r[o].creator||n.push(r[o]),this.fillChildrenClasses(r[o].name,t,n)},e.prototype.findClass=function(e){e=e.toLowerCase();var t=this.classes[e];if(!t){var n=this.alternativeNames[e];if(n&&n!=e)return this.findClass(n)}return t},e.prototype.isDescendantOf=function(e,t){if(!e||!t)return!1;e=e.toLowerCase(),t=t.toLowerCase();var n=this.findClass(e);if(!n)return!1;var r=n;do{if(r.name===t)return!0;r=this.classes[r.parentName]}while(r);return!1},e.prototype.addAlterNativeClassName=function(e,t){this.alternativeNames[t.toLowerCase()]=e.toLowerCase()},e.prototype.generateSchema=function(e){void 0===e&&(e=void 0),e||(e="survey");var t=this.findClass(e);if(!t)return null;var n={$schema:"http://json-schema.org/draft-07/schema#",title:"SurveyJS Library json schema",type:"object",properties:{},definitions:{locstring:this.generateLocStrClass()}};return this.generateSchemaProperties(t,n,n.definitions,!0),n},e.prototype.generateLocStrClass=function(){var e={},t=Br.findProperty("survey","locale");if(t){var n=t.getChoices(null);Array.isArray(n)&&(n.indexOf("en")<0&&n.splice(0,0,"en"),n.splice(0,0,"default"),n.forEach((function(t){t&&(e[t]={type:"string"})})))}return{$id:"locstring",type:"object",properties:e}},e.prototype.generateSchemaProperties=function(e,t,n,r){if(e){var o=t.properties,i=[];"question"!==e.name&&"panel"!==e.name||(o.type={type:"string"},i.push("type"));for(var s=0;s<e.properties.length;s++){var a=e.properties[s];e.parentName&&Br.findProperty(e.parentName,a.name)||(o[a.name]=this.generateSchemaProperty(a,n,r),a.isRequired&&i.push(a.name))}i.length>0&&(t.required=i)}},e.prototype.generateSchemaProperty=function(e,t,n){if(e.isLocalizable)return{oneOf:[{type:"string"},{$ref:this.getChemeRefName("locstring",n)}]};var r=e.schemaType(),o=e.schemaRef(),i={};if(r&&(i.type=r),e.hasChoices){var s=e.getChoices(null);Array.isArray(s)&&s.length>0&&(i.enum=this.getChoicesValues(s))}if(o&&("array"===r?"string"===e.className?i.items={type:e.className}:i.items={$ref:this.getChemeRefName(e.className,n)}:i.$ref=this.getChemeRefName(o,n),this.generateChemaClass(e.className,t,!1)),e.baseClassName){var a=this.getChildrenClasses(e.baseClassName,!0);"question"==e.baseClassName&&a.push(this.findClass("panel")),i.items={anyOf:[]};for(var u=0;u<a.length;u++){var l=a[u].name;i.items.anyOf.push({$ref:this.getChemeRefName(l,n)}),this.generateChemaClass(l,t,!1)}}return i},e.prototype.getChemeRefName=function(e,t){return t?"#/definitions/"+e:e},e.prototype.generateChemaClass=function(e,t,n){if(!t[e]){var r=this.findClass(e);if(r){var o=!!r.parentName&&"base"!=r.parentName;o&&this.generateChemaClass(r.parentName,t,n);var i={type:"object",$id:e};t[e]=i;var s={properties:{}};this.generateSchemaProperties(r,s,t,n),o?i.allOf=[{$ref:this.getChemeRefName(r.parentName,n)},{properties:s.properties}]:i.properties=s.properties,Array.isArray(s.required)&&(i.required=s.required)}}},e.prototype.getChoicesValues=function(e){var t=new Array;return e.forEach((function(e){"object"==typeof e&&void 0!==e.value?t.push(e.value):t.push(e)})),t},e}(),Nr=function(){function e(e,t){this.type=e,this.message=t,this.description="",this.at=-1,this.end=-1}return e.prototype.getFullDescription=function(){return this.message+(this.description?"\n"+this.description:"")},e}(),Ar=function(e){function t(t,n){var r=e.call(this,"unknownproperty","Unknown property in class '"+n+"': '"+t+"'.")||this;return r.propertyName=t,r.className=n,r}return Or(t,e),t}(Nr),jr=function(e){function t(t,n,r){var o=e.call(this,n,r)||this;return o.baseClassName=t,o.type=n,o.message=r,o}return Or(t,e),t}(Nr),Rr=function(e){function t(t,n){var r=e.call(this,n,"missingtypeproperty","The property type is missing in the object. Please take a look at property: '"+t+"'.")||this;return r.propertyName=t,r.baseClassName=n,r}return Or(t,e),t}(jr),Dr=function(e){function t(t,n){var r=e.call(this,n,"incorrecttypeproperty","The property type is incorrect in the object. Please take a look at property: '"+t+"'.")||this;return r.propertyName=t,r.baseClassName=n,r}return Or(t,e),t}(jr),Lr=function(e){function t(t,n){var r=e.call(this,"requiredproperty","The property '"+t+"' is required in class '"+n+"'.")||this;return r.propertyName=t,r.className=n,r}return Or(t,e),t}(Nr),kr=function(e){function t(t,n){var r=e.call(this,"arrayproperty","The property '"+t+"' should be an array in '"+n+"'.")||this;return r.propertyName=t,r.className=n,r}return Or(t,e),t}(Nr),Mr=function(e){function t(t,n){var r=e.call(this,"incorrectvalue","The property value: '"+n+"' is incorrect for property '"+t.name+"'.")||this;return r.property=t,r.value=n,r}return Or(t,e),t}(Nr),Fr=function(){function e(){this.errors=new Array,this.lightSerializing=!1}return Object.defineProperty(e,"metaData",{get:function(){return e.metaDataValue},enumerable:!1,configurable:!0}),e.prototype.toJsonObject=function(e,t){return this.toJsonObjectCore(e,null,t)},e.prototype.toObject=function(e,t,n){this.toObjectCore(e,t,n);var r=this.getRequiredError(t,e);r&&this.addNewError(r,e,t)},e.prototype.toObjectCore=function(t,n,r){if(t){var o=null,i=void 0,s=!0;if(n.getType&&(i=n.getType(),o=Br.getProperties(i),s=!!i&&!Br.isDescendantOf(i,"itemvalue")),o){for(var a in n.startLoadingFromJson&&n.startLoadingFromJson(t),o=this.addDynamicProperties(n,t,o),this.options=r,t)if(a!==e.typePropertyName)if(a!==e.positionPropertyName){var u=this.findProperty(o,a);u?this.valueToObj(t[a],n,u,t,r):s&&this.addNewError(new Ar(a.toString(),i),t,n)}else n[a]=t[a];this.options=void 0,n.endLoadingFromJson&&n.endLoadingFromJson()}}},e.prototype.toJsonObjectCore=function(t,n,r){if(!t||!t.getType)return t;if("function"==typeof t.getData)return t.getData();var o={};null==n||n.className||(o[e.typePropertyName]=n.getObjType(t.getType()));var i=!0===r;return r&&!0!==r||(r={}),i&&(r.storeDefaults=i),this.propertiesToJson(t,Br.getProperties(t.getType()),o,r),this.propertiesToJson(t,this.getDynamicProperties(t),o,r),o},e.prototype.getDynamicProperties=function(e){return Br.getDynamicPropertiesByObj(e)},e.prototype.addDynamicProperties=function(e,t,n){if(!e.getDynamicPropertyName&&!e.getDynamicProperties)return n;if(e.getDynamicPropertyName){var r=e.getDynamicPropertyName();if(!r)return n;r&&t[r]&&(e[r]=t[r])}var o=this.getDynamicProperties(e);return 0===o.length?n:[].concat(n).concat(o)},e.prototype.propertiesToJson=function(e,t,n,r){for(var o=0;o<t.length;o++)this.valueToJson(e,n,t[o],r)},e.prototype.valueToJson=function(e,t,n,r){r||(r={}),!1===n.isSerializable||!1===n.isLightSerializable&&this.lightSerializing||r.version&&!n.isAvailableInVersion(r.version)||this.valueToJsonCore(e,t,n,r)},e.prototype.valueToJsonCore=function(e,t,n,r){var o=n.getSerializedProperty(e,r.version);if(o&&o!==n)this.valueToJsonCore(e,t,o,r);else{var i=n.getSerializableValue(e);if(r.storeDefaults||!n.isDefaultValueByObj(e,i)){if(this.isValueArray(i)){for(var s=[],a=0;a<i.length;a++)s.push(this.toJsonObjectCore(i[a],n,r));i=s.length>0?s:null}else i=this.toJsonObjectCore(i,n,r);if(null!=i){var u=n.getSerializedName(r.version),l="function"==typeof e.getPropertyValue&&null!==e.getPropertyValue(u,null);(r.storeDefaults&&l||!n.isDefaultValueByObj(e,i))&&(Br.onSerializingProperty&&Br.onSerializingProperty(e,n,i,t)||(t[u]=this.removePosOnValueToJson(n,i)))}}}},e.prototype.valueToObj=function(e,t,n,r,o){if(null!=e)if(this.removePos(n,e),null!=n&&n.hasToUseSetValue)n.setValue(t,e,this);else{if(n.isArray&&!Array.isArray(e)&&e){e=[e];var i=r&&n.alternativeName&&r[n.alternativeName]?n.alternativeName:n.name;this.addNewError(new kr(i,t.getType()),r||e,t)}if(this.isValueArray(e))this.valueToArray(e,t,n.name,n,o);else{var s=this.createNewObj(e,n);s.newObj&&(this.toObjectCore(e,s.newObj,o),e=s.newObj),s.error||(null!=n?(n.setValue(t,e,this),o&&o.validatePropertyValues&&(n.validateValue(e)||this.addNewError(new Mr(n,e),r,t))):t[n.name]=e)}}},e.prototype.removePosOnValueToJson=function(e,t){return e.isCustom&&t?(this.removePosFromObj(t),t):t},e.prototype.removePos=function(e,t){!e||!e.type||e.type.indexOf("value")<0||this.removePosFromObj(t)},e.prototype.removePosFromObj=function(t){if(t&&"function"!=typeof t.getType){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.removePosFromObj(t[n]);if("object"==typeof t)for(var r in t[e.positionPropertyName]&&delete t[e.positionPropertyName],t)this.removePosFromObj(t[r])}},e.prototype.isValueArray=function(e){return e&&Array.isArray(e)},e.prototype.createNewObj=function(e,t){var n={newObj:null,error:null},r=this.getClassNameForNewObj(e,t);return n.newObj=r?Br.createClass(r,e):null,n.error=this.checkNewObjectOnErrors(n.newObj,e,t,r),n},e.prototype.getClassNameForNewObj=function(t,n){var r=null!=n&&n.className?n.className:void 0;if(r||(r=t[e.typePropertyName]),!r)return r;r=r.toLowerCase();var o=n.classNamePart;return o&&r.indexOf(o)<0&&(r+=o),r},e.prototype.checkNewObjectOnErrors=function(e,t,n,r){var o=null;return e?o=this.getRequiredError(e,t):n.baseClassName&&(o=r?new Dr(n.name,n.baseClassName):new Rr(n.name,n.baseClassName)),o&&this.addNewError(o,t,e),o},e.prototype.getRequiredError=function(e,t){if(!e.getType||"function"==typeof e.getData)return null;var n=Br.findClass(e.getType());if(!n)return null;var r=n.getRequiredProperties();if(!Array.isArray(r))return null;for(var o=0;o<r.length;o++){var i=r[o];if(Cr.isValueEmpty(i.defaultValue)&&!t[i.name])return new Lr(i.name,e.getType())}return null},e.prototype.addNewError=function(t,n,r){if(t.jsonObj=n,t.element=r,this.errors.push(t),n){var o=n[e.positionPropertyName];o&&(t.at=o.start,t.end=o.end)}},e.prototype.valueToArray=function(e,t,n,r,o){if(!t[n]||this.isValueArray(t[n])){t[n]&&e.length>0&&t[n].splice(0,t[n].length);var i=t[n]?t[n]:[];this.addValuesIntoArray(e,i,r,o),t[n]||(t[n]=i)}},e.prototype.addValuesIntoArray=function(e,t,n,r){for(var o=0;o<e.length;o++){var i=this.createNewObj(e[o],n);i.newObj?(e[o].name&&(i.newObj.name=e[o].name),e[o].valueName&&(i.newObj.valueName=e[o].valueName.toString()),t.push(i.newObj),this.toObjectCore(e[o],i.newObj,r)):i.error||t.push(e[o])}},e.prototype.findProperty=function(e,t){if(!e)return null;for(var n=0;n<e.length;n++){var r=e[n];if(r.name==t||r.alternativeName==t)return r}return null},e.typePropertyName="type",e.positionPropertyName="pos",e.metaDataValue=new Tr,e}(),Br=Fr.metaData,zr=function(){function e(){this.values=null,this.properties=null}return e.prototype.getFirstName=function(e,t){if(void 0===t&&(t=null),!e)return e;var n="";if(t&&(n=this.getFirstPropertyName(e,t)))return n;for(var r=0;r<e.length;r++){var o=e[r];if("."==o||"["==o)break;n+=o}return n},e.prototype.hasValue=function(e,t){return void 0===t&&(t=null),t||(t=this.values),this.getValueCore(e,t).hasValue},e.prototype.getValue=function(e,t){return void 0===t&&(t=null),t||(t=this.values),this.getValueCore(e,t).value},e.prototype.setValue=function(e,t,n){if(t){var r=this.getNonNestedObject(e,t,!0);r&&(e=r.value,t=r.text,e&&t&&(e[t]=n))}},e.prototype.getValueInfo=function(e){if(e.path)return e.value=this.getValueFromPath(e.path,this.values),e.hasValue=null!==e.value&&!Cr.isValueEmpty(e.value),void(!e.hasValue&&e.path.length>1&&"length"==e.path[e.path.length-1]&&(e.hasValue=!0,e.value=0));var t=this.getValueCore(e.name,this.values);e.value=t.value,e.hasValue=t.hasValue,e.path=t.hasValue?t.path:null,e.sctrictCompare=t.sctrictCompare},e.prototype.isAnyKeyChanged=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];if(r){var o=r.toLowerCase();if(e.hasOwnProperty(r))return!0;if(r!==o&&e.hasOwnProperty(o))return!0;var i=this.getFirstName(r);if(e.hasOwnProperty(i)){if(r===i)return!0;var s=e[i];if(null!=s){if(!s.hasOwnProperty("oldValue")||!s.hasOwnProperty("newValue"))return!0;var a={};a[i]=s.oldValue;var u=this.getValue(r,a);a[i]=s.newValue;var l=this.getValue(r,a);if(!Cr.isTwoValueEquals(u,l,!1,!1,!1))return!0}}}}return!1},e.prototype.getValueFromPath=function(e,t){if(2===e.length&&"@survey"===e[0])return this.getValueFromSurvey(e[1]);for(var n=0;t&&n<e.length;){var r=e[n];if(Cr.isNumber(r)&&Array.isArray(t)&&r>=t.length)return null;t=t[r],n++}return t},e.prototype.getValueCore=function(e,t){var n=this.getQuestionDirectly(e);if(n)return{hasValue:!0,value:n.value,path:[e],sctrictCompare:n.requireStrictCompare};var r=this.getValueFromValues(e,t);if(e&&!r.hasValue){var o=this.getValueFromSurvey(e);void 0!==o&&(r.hasValue=!0,r.value=o,r.path=["@survey",e])}return r},e.prototype.getQuestionDirectly=function(e){if(this.properties&&this.properties.survey)return this.properties.survey.getQuestionByValueName(e)},e.prototype.getValueFromSurvey=function(e){if(this.properties&&this.properties.survey)return this.properties.survey.getBuiltInVariableValue(e.toLocaleLowerCase())},e.prototype.getValueFromValues=function(e,t){var n={hasValue:!1,value:null,path:null},r=t;if(!r&&0!==r&&!1!==r)return n;e&&e.lastIndexOf(".length")>-1&&e.lastIndexOf(".length")===e.length-".length".length&&(n.value=0,n.hasValue=!0);var o=this.getNonNestedObject(r,e,!1);return o?(n.path=o.path,n.value=o.text?this.getObjectValue(o.value,o.text):o.value,n.hasValue=!Cr.isValueEmpty(n.value),n):n},e.prototype.getNonNestedObject=function(e,t,n){for(var r=new Array,o=0,i=this.getNonNestedObjectCore(e,t,n,r);!i&&o<r.length;)o=r.length,i=this.getNonNestedObjectCore(e,t,n,r);return i},e.prototype.getNonNestedObjectCore=function(e,t,n,r){var o=this.getFirstPropertyName(t,e,n,r);o&&r.push(o);for(var i=o?[o]:null;t!=o&&e;){if("["==t[0]){var s=this.getObjInArray(e,t);if(!s)return null;e=s.value,t=s.text,i.push(s.index)}else{if(!o&&t==this.getFirstName(t))return{value:e,text:t,path:i};if(e=this.getObjectValue(e,o),Cr.isValueEmpty(e)&&!n)return null;t=t.substring(o.length)}t&&"."==t[0]&&(t=t.substring(1)),(o=this.getFirstPropertyName(t,e,n,r))&&i.push(o)}return{value:e,text:t,path:i}},e.prototype.getObjInArray=function(e,t){if(!Array.isArray(e))return null;for(var n=1,r="";n<t.length&&"]"!=t[n];)r+=t[n],n++;return t=n<t.length?t.substring(n+1):"",(n=this.getIntValue(r))<0||n>=e.length?null:{value:e[n],text:t,index:n}},e.prototype.getFirstPropertyName=function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=void 0),!e)return e;if(t||(t={}),t.hasOwnProperty(e))return e;var o=e.toLowerCase(),i=o[0],s=i.toUpperCase();for(var a in t)if(!(Array.isArray(r)&&r.indexOf(a)>-1)){var u=a[0];if(u===s||u===i){var l=a.toLowerCase();if(l==o)return a;if(o.length<=l.length)continue;var c=o[l.length];if("."!=c&&"["!=c)continue;if(l==o.substring(0,l.length))return a}}if(n&&"["!==e[0]){var p=e.indexOf(".");return p>-1&&(t[e=e.substring(0,p)]={}),e}return""},e.prototype.getObjectValue=function(e,t){return t?e[t]:null},e.prototype.getIntValue=function(e){return"0"==e||(0|e)>0&&e%1==0?Number(e):-1},e}(),Hr=function(){function e(){}return e.disposedObjectChangedProperty=function(t,n){e.warn('An attempt to set a property "'+t+'" of a disposed object "'+n+'"')},e.inCorrectQuestionValue=function(t,n){var r=JSON.stringify(n,null,3);e.warn("An attempt to assign an incorrect value"+r+' to the following question: "'+t+'"')},e.warn=function(e){console.warn(e)},e.error=function(e){console.error(e)},e}(),Wr=function(){function e(){this.functionHash={},this.isAsyncHash={}}return e.prototype.register=function(e,t,n){void 0===n&&(n=!1),this.functionHash[e]=t,n&&(this.isAsyncHash[e]=!0)},e.prototype.unregister=function(e){delete this.functionHash[e],delete this.isAsyncHash[e]},e.prototype.hasFunction=function(e){return!!this.functionHash[e]},e.prototype.isAsyncFunction=function(e){return!!this.isAsyncHash[e]},e.prototype.clear=function(){this.functionHash={}},e.prototype.getAll=function(){var e=[];for(var t in this.functionHash)e.push(t);return e.sort()},e.prototype.run=function(e,t,n,r){void 0===n&&(n=null);var o=this.functionHash[e];if(!o)return Hr.warn("Unknown function name: "+e),null;var i={func:o};if(n)for(var s in n)i[s]=n[s];return i.func(t,r)},e.Instance=new e,e}();Wr.Instance.register;function Ur(e,t){if(null!=e)if(Array.isArray(e))for(var n=0;n<e.length;n++)Ur(e[n],t);else Cr.isNumber(e)&&(e=Cr.getNumber(e)),t.push(e)}function Qr(e){var t=[];Ur(e,t);for(var n=0,r=0;r<t.length;r++)n=Cr.correctAfterPlusMinis(n,t[r],n+t[r]);return n}function Jr(e,t){var n=[];Ur(e,n);for(var r=void 0,o=0;o<n.length;o++)void 0===r&&(r=n[o]),t?r>n[o]&&(r=n[o]):r<n[o]&&(r=n[o]);return r}function Kr(e,t,n,r,o,i){return!e||Cr.isValueEmpty(e[t])||i&&!i.run(e)?n:r(n,o?function(e){return"string"==typeof e?Cr.isNumber(e)?Cr.getNumber(e):void 0:e}(e[t]):1)}function Gr(e,t,n,r){void 0===r&&(r=!0);var o=function(e,t){if(e.length<2||e.length>3)return null;var n=e[0];if(!n)return null;if(!Array.isArray(n)&&!Array.isArray(Object.keys(n)))return null;var r=e[1];if("string"!=typeof r&&!(r instanceof String))return null;var o=e.length>2?e[2]:void 0;if("string"==typeof o||o instanceof String||(o=void 0),!o){var i=Array.isArray(t)&&t.length>2?t[2]:void 0;i&&i.toString()&&(o=i.toString())}return{data:n,name:r,expression:o}}(e,t);if(o){var i=o.expression?new wo(o.expression):void 0;i&&i.isAsync&&(i=void 0);var s=void 0;if(Array.isArray(o.data))for(var a=0;a<o.data.length;a++)s=Kr(o.data[a],o.name,s,n,r,i);else for(var u in o.data)s=Kr(o.data[u],o.name,s,n,r,i);return s}}function Yr(e,t){var n=Gr(e,t,(function(e,t){return null==e&&(e=0),null==t||null==t?e:Cr.correctAfterPlusMinis(e,t,e+t)}));return void 0!==n?n:0}function Zr(e,t){var n=Gr(e,t,(function(e,t){return null==e&&(e=0),null==t||null==t?e:e+1}),!1);return void 0!==n?n:0}function $r(e,t,n){if("days"===n)return to([e,t]);var r=e?new Date(e):new Date,o=t?new Date(t):new Date;n=n||"years";var i=12*(o.getFullYear()-r.getFullYear())+o.getMonth()-r.getMonth();return o.getDate()<r.getDate()&&(i-=1),"months"===n?i:~~(i/12)}function Xr(e){if(!e)return!1;for(var t=e.questions,n=0;n<t.length;n++)if(!t[n].validate(!1))return!1;return!0}function eo(e){var t=new Date;return br.localization.useLocalTimeZone?t.setHours(0,0,0,0):t.setUTCHours(0,0,0,0),Array.isArray(e)&&1==e.length&&t.setDate(t.getDate()+e[0]),t}function to(e){if(!Array.isArray(e)||2!==e.length)return 0;if(!e[0]||!e[1])return 0;var t=new Date(e[0]),n=new Date(e[1]),r=Math.abs(n-t);return Math.ceil(r/864e5)}function no(e){var t=eo(void 0);return e&&e[0]&&(t=new Date(e[0])),t}function ro(e,t){if(e&&t){for(var n=["row","panel","survey"],r=0;r<n.length;r++){var o=e[n[r]];if(o&&o.getQuestionByName){var i=o.getQuestionByName(t);if(i)return i}}return null}}Wr.Instance.register("sum",Qr),Wr.Instance.register("min",(function(e){return Jr(e,!0)})),Wr.Instance.register("max",(function(e){return Jr(e,!1)})),Wr.Instance.register("count",(function(e){var t=[];return Ur(e,t),t.length})),Wr.Instance.register("avg",(function(e){var t=[];Ur(e,t);var n=Qr(e);return t.length>0?n/t.length:0})),Wr.Instance.register("sumInArray",Yr),Wr.Instance.register("minInArray",(function(e,t){return Gr(e,t,(function(e,t){return null==e?t:null==t||null==t||e<t?e:t}))})),Wr.Instance.register("maxInArray",(function(e,t){return Gr(e,t,(function(e,t){return null==e?t:null==t||null==t||e>t?e:t}))})),Wr.Instance.register("countInArray",Zr),Wr.Instance.register("avgInArray",(function(e,t){var n=Zr(e,t);return 0==n?0:Yr(e,t)/n})),Wr.Instance.register("iif",(function(e){return e||3===e.length?e[0]?e[1]:e[2]:""})),Wr.Instance.register("getDate",(function(e){return!e&&e.length<1?null:e[0]?new Date(e[0]):null})),Wr.Instance.register("age",(function(e){return!Array.isArray(e)||e.length<1||!e[0]?null:$r(e[0],void 0,(e.length>1?e[1]:"")||"years")})),Wr.Instance.register("dateDiff",(function(e){return!Array.isArray(e)||e.length<2||!e[0]||!e[1]?null:$r(e[0],e[1],(e.length>2?e[2]:"")||"days")})),Wr.Instance.register("isContainerReady",(function(e){if(!e&&e.length<1)return!1;if(!e[0]||!this.survey)return!1;var t=e[0],n=this.survey.getPageByName(t);if(n||(n=this.survey.getPanelByName(t)),!n){var r=this.survey.getQuestionByName(t);if(!r||!Array.isArray(r.panels))return!1;if(!(e.length>1)){for(var o=0;o<r.panels.length;o++)if(!Xr(r.panels[o]))return!1;return!0}e[1]<r.panels.length&&(n=r.panels[e[1]])}return Xr(n)})),Wr.Instance.register("isDisplayMode",(function(){return this.survey&&this.survey.isDisplayMode})),Wr.Instance.register("currentDate",(function(){return new Date})),Wr.Instance.register("today",eo),Wr.Instance.register("getYear",(function(e){if(1===e.length&&e[0])return new Date(e[0]).getFullYear()})),Wr.Instance.register("currentYear",(function(){return(new Date).getFullYear()})),Wr.Instance.register("diffDays",to),Wr.Instance.register("year",(function(e){return no(e).getFullYear()})),Wr.Instance.register("month",(function(e){return no(e).getMonth()+1})),Wr.Instance.register("day",(function(e){return no(e).getDate()})),Wr.Instance.register("weekday",(function(e){return no(e).getDay()})),Wr.Instance.register("displayValue",(function(e){var t=ro(this,e[0]);return t?t.displayValue:""})),Wr.Instance.register("propertyValue",(function(e){if(2===e.length&&e[0]&&e[1]){var t=ro(this,e[0]);return t?t[e[1]]:void 0}})),Wr.Instance.register("substring",(function(e){if(e.length<2)return"";var t=e[0];if(!t||"string"!=typeof t)return"";var n=e[1];if(!Cr.isNumber(n))return"";var r=e.length>2?e[2]:void 0;return Cr.isNumber(r)?t.substring(n,r):t.substring(n)}));var oo=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),io=function(){function e(){}return e.prototype.toString=function(e){return void 0===e&&(e=void 0),""},e.prototype.hasFunction=function(){return!1},e.prototype.hasAsyncFunction=function(){return!1},e.prototype.addToAsyncList=function(e){},e.prototype.isEqual=function(e){return!!e&&e.getType()===this.getType()&&this.isContentEqual(e)},e.prototype.areOperatorsEquals=function(e,t){return!e&&!t||!!e&&e.isEqual(t)},e}(),so=function(e){function t(t,n,r,o){void 0===n&&(n=null),void 0===r&&(r=null),void 0===o&&(o=!1);var i=e.call(this)||this;return i.operatorName=t,i.left=n,i.right=r,i.isArithmeticValue=o,i.consumer=o?ho.binaryFunctions.arithmeticOp(t):ho.binaryFunctions[t],null==i.consumer&&ho.throwInvalidOperatorError(t),i}return oo(t,e),Object.defineProperty(t.prototype,"requireStrictCompare",{get:function(){return this.getIsOperandRequireStrict(this.left)||this.getIsOperandRequireStrict(this.right)},enumerable:!1,configurable:!0}),t.prototype.getIsOperandRequireStrict=function(e){return!!e&&e.requireStrictCompare},t.prototype.getType=function(){return"binary"},Object.defineProperty(t.prototype,"isArithmetic",{get:function(){return this.isArithmeticValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isConjunction",{get:function(){return"or"==this.operatorName||"and"==this.operatorName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"conjunction",{get:function(){return this.isConjunction?this.operatorName:""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"operator",{get:function(){return this.operatorName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leftOperand",{get:function(){return this.left},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightOperand",{get:function(){return this.right},enumerable:!1,configurable:!0}),t.prototype.isContentEqual=function(e){var t=e;return t.operator===this.operator&&this.areOperatorsEquals(this.left,t.left)&&this.areOperatorsEquals(this.right,t.right)},t.prototype.evaluateParam=function(e,t){return null==e?null:e.evaluate(t)},t.prototype.evaluate=function(e){return this.consumer.call(this,this.evaluateParam(this.left,e),this.evaluateParam(this.right,e),this.requireStrictCompare)},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return"("+ho.safeToString(this.left,e)+" "+ho.operatorToString(this.operatorName)+" "+ho.safeToString(this.right,e)+")"},t.prototype.setVariables=function(e){null!=this.left&&this.left.setVariables(e),null!=this.right&&this.right.setVariables(e)},t.prototype.hasFunction=function(){return!!this.left&&this.left.hasFunction()||!!this.right&&this.right.hasFunction()},t.prototype.hasAsyncFunction=function(){return!!this.left&&this.left.hasAsyncFunction()||!!this.right&&this.right.hasAsyncFunction()},t.prototype.addToAsyncList=function(e){this.left&&this.left.addToAsyncList(e),this.right&&this.right.addToAsyncList(e)},t}(io),ao=function(e){function t(t,n){var r=e.call(this)||this;return r.expressionValue=t,r.operatorName=n,r.consumer=ho.unaryFunctions[n],null==r.consumer&&ho.throwInvalidOperatorError(n),r}return oo(t,e),Object.defineProperty(t.prototype,"operator",{get:function(){return this.operatorName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"expression",{get:function(){return this.expressionValue},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"unary"},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return ho.operatorToString(this.operatorName)+" "+this.expression.toString(e)},t.prototype.isContentEqual=function(e){var t=e;return t.operator==this.operator&&this.areOperatorsEquals(this.expression,t.expression)},t.prototype.hasFunction=function(){return this.expression.hasFunction()},t.prototype.hasAsyncFunction=function(){return this.expression.hasAsyncFunction()},t.prototype.addToAsyncList=function(e){this.expression.addToAsyncList(e)},t.prototype.evaluate=function(e){var t=this.expression.evaluate(e);return this.consumer.call(this,t)},t.prototype.setVariables=function(e){this.expression.setVariables(e)},t}(io),uo=function(e){function t(t){var n=e.call(this)||this;return n.values=t,n}return oo(t,e),t.prototype.getType=function(){return"array"},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return"["+this.values.map((function(t){return t.toString(e)})).join(", ")+"]"},t.prototype.evaluate=function(e){return this.values.map((function(t){return t.evaluate(e)}))},t.prototype.setVariables=function(e){this.values.forEach((function(t){t.setVariables(e)}))},t.prototype.hasFunction=function(){return this.values.some((function(e){return e.hasFunction()}))},t.prototype.hasAsyncFunction=function(){return this.values.some((function(e){return e.hasAsyncFunction()}))},t.prototype.addToAsyncList=function(e){this.values.forEach((function(t){return t.addToAsyncList(e)}))},t.prototype.isContentEqual=function(e){var t=e;if(t.values.length!==this.values.length)return!1;for(var n=0;n<this.values.length;n++)if(!t.values[n].isEqual(this.values[n]))return!1;return!0},t}(io),lo=function(e){function t(t){var n=e.call(this)||this;return n.value=t,n}return oo(t,e),t.prototype.getType=function(){return"const"},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return this.value.toString()},Object.defineProperty(t.prototype,"correctValue",{get:function(){return this.getCorrectValue(this.value)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"requireStrictCompare",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.evaluate=function(){return this.getCorrectValue(this.value)},t.prototype.setVariables=function(e){},t.prototype.getCorrectValue=function(e){return e&&"string"==typeof e?this.isBooleanValue(e)?"true"===e.toLowerCase():e.length>1&&this.isQuote(e[0])&&this.isQuote(e[e.length-1])?e.substring(1,e.length-1):ho.isNumeric(e)?0==e.indexOf("0x")?parseInt(e):e.length>1&&"0"==e[0]&&(e.length<2||"."!==e[1]&&","!==e[1])?e:parseFloat(e):e:e},t.prototype.isContentEqual=function(e){return e.value==this.value},t.prototype.isQuote=function(e){return"'"==e||'"'==e},t.prototype.isBooleanValue=function(e){return e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())},t}(io),co=function(e){function t(n){var r=e.call(this,n)||this;return r.variableName=n,r.valueInfo={},r.useValueAsItIs=!1,r.variableName&&r.variableName.length>1&&r.variableName[0]===t.DisableConversionChar&&(r.variableName=r.variableName.substring(1),r.useValueAsItIs=!0),r}return oo(t,e),Object.defineProperty(t,"DisableConversionChar",{get:function(){return br.expressionDisableConversionChar},set:function(e){br.expressionDisableConversionChar=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"requireStrictCompare",{get:function(){return!0===this.valueInfo.sctrictCompare},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"variable"},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var n=e(this);if(n)return n}return"{"+(this.useValueAsItIs?t.DisableConversionChar:"")+this.variableName+"}"},Object.defineProperty(t.prototype,"variable",{get:function(){return this.variableName},enumerable:!1,configurable:!0}),t.prototype.evaluate=function(e){return this.valueInfo.name=this.variableName,e.getValueInfo(this.valueInfo),this.valueInfo.hasValue?this.getCorrectValue(this.valueInfo.value):null},t.prototype.setVariables=function(e){e.push(this.variableName)},t.prototype.getCorrectValue=function(t){return this.useValueAsItIs?t:e.prototype.getCorrectValue.call(this,t)},t.prototype.isContentEqual=function(e){return e.variable==this.variable},t}(lo),po=function(e){function t(t,n){var r=e.call(this)||this;return r.originalValue=t,r.parameters=n,r.isReadyValue=!1,Array.isArray(n)&&0===n.length&&(r.parameters=new uo([])),r}return oo(t,e),t.prototype.getType=function(){return"function"},t.prototype.evaluateAsync=function(e){var t=this;this.isReadyValue=!1;var n=new zr;n.values=Cr.createCopy(e.values),n.properties=Cr.createCopy(e.properties),n.properties.returnResult=function(e){t.asynResult=e,t.isReadyValue=!0,t.onAsyncReady()},this.evaluateCore(n)},t.prototype.evaluate=function(e){return this.isReady?this.asynResult:this.evaluateCore(e)},t.prototype.evaluateCore=function(e){return Wr.Instance.run(this.originalValue,this.parameters.evaluate(e),e.properties,this.parameters.values)},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return this.originalValue+"("+this.parameters.toString(e)+")"},t.prototype.setVariables=function(e){this.parameters.setVariables(e)},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.isReadyValue},enumerable:!1,configurable:!0}),t.prototype.hasFunction=function(){return!0},t.prototype.hasAsyncFunction=function(){return Wr.Instance.isAsyncFunction(this.originalValue)},t.prototype.addToAsyncList=function(e){this.hasAsyncFunction()&&e.push(this)},t.prototype.isContentEqual=function(e){var t=e;return t.originalValue==this.originalValue&&this.areOperatorsEquals(t.parameters,this.parameters)},t}(io),ho=function(){function e(){}return e.throwInvalidOperatorError=function(e){throw new Error("Invalid operator: '"+e+"'")},e.safeToString=function(e,t){return null==e?"":e.toString(t)},e.toOperandString=function(t){return!t||e.isNumeric(t)||e.isBooleanValue(t)||(t="'"+t+"'"),t},e.isSpaceString=function(e){return!!e&&!e.replace(" ","")},e.isNumeric=function(t){return(!t||!(t.indexOf("-")>-1||t.indexOf("+")>1||t.indexOf("*")>-1||t.indexOf("^")>-1||t.indexOf("/")>-1||t.indexOf("%")>-1))&&(!e.isSpaceString(t)&&Cr.isNumber(t))},e.isBooleanValue=function(e){return!!e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())},e.countDecimals=function(e){if(Cr.isNumber(e)&&Math.floor(e)!==e){var t=e.toString().split(".");return t.length>1&&t[1].length||0}return 0},e.plusMinus=function(t,n,r){var o=e.countDecimals(t),i=e.countDecimals(n);if(o>0||i>0){var s=Math.max(o,i);r=parseFloat(r.toFixed(s))}return r},e.isTwoValueEquals=function(e,t,n){return void 0===n&&(n=!0),"undefined"===e&&(e=void 0),"undefined"===t&&(t=void 0),Cr.isTwoValueEquals(e,t,n)},e.operatorToString=function(t){var n=e.signs[t];return null==n?t:n},e.convertValForDateCompare=function(e,t){if(t instanceof Date&&"string"==typeof e){var n=new Date(e);return n.setHours(0,0,0),n}return e},e.unaryFunctions={empty:function(e){return Cr.isValueEmpty(e)},notempty:function(t){return!e.unaryFunctions.empty(t)},negate:function(e){return!e}},e.binaryFunctions={arithmeticOp:function(t){var n=function(e,t){return Cr.isValueEmpty(e)?"number"==typeof t?0:"string"==typeof e?e:"string"==typeof t?"":Array.isArray(t)?[]:0:e};return function(r,o){r=n(r,o),o=n(o,r);var i=e.binaryFunctions[t];return null==i?null:i.call(this,r,o)}},and:function(e,t){return e&&t},or:function(e,t){return e||t},plus:function(e,t){return Cr.sumAnyValues(e,t)},minus:function(e,t){return Cr.correctAfterPlusMinis(e,t,e-t)},mul:function(e,t){return Cr.correctAfterMultiple(e,t,e*t)},div:function(e,t){return t?e/t:null},mod:function(e,t){return t?e%t:null},power:function(e,t){return Math.pow(e,t)},greater:function(t,n){return null!=t&&null!=n&&(t=e.convertValForDateCompare(t,n))>(n=e.convertValForDateCompare(n,t))},less:function(t,n){return null!=t&&null!=n&&(t=e.convertValForDateCompare(t,n))<(n=e.convertValForDateCompare(n,t))},greaterorequal:function(t,n){return!!e.binaryFunctions.equal(t,n)||e.binaryFunctions.greater(t,n)},lessorequal:function(t,n){return!!e.binaryFunctions.equal(t,n)||e.binaryFunctions.less(t,n)},equal:function(t,n,r){return t=e.convertValForDateCompare(t,n),n=e.convertValForDateCompare(n,t),e.isTwoValueEquals(t,n,!0!==r)},notequal:function(t,n,r){return!e.binaryFunctions.equal(t,n,r)},contains:function(t,n){return e.binaryFunctions.containsCore(t,n,!0)},notcontains:function(t,n){return!t&&!Cr.isValueEmpty(n)||e.binaryFunctions.containsCore(t,n,!1)},anyof:function(t,n){if(Cr.isValueEmpty(t)&&Cr.isValueEmpty(n))return!0;if(Cr.isValueEmpty(t)||!Array.isArray(t)&&0===t.length)return!1;if(Cr.isValueEmpty(n))return!0;if(!Array.isArray(t))return e.binaryFunctions.contains(n,t);if(!Array.isArray(n))return e.binaryFunctions.contains(t,n);for(var r=0;r<n.length;r++)if(e.binaryFunctions.contains(t,n[r]))return!0;return!1},allof:function(t,n){if(!t&&!Cr.isValueEmpty(n))return!1;if(!Array.isArray(n))return e.binaryFunctions.contains(t,n);for(var r=0;r<n.length;r++)if(!e.binaryFunctions.contains(t,n[r]))return!1;return!0},containsCore:function(t,n,r){if(!t&&0!==t&&!1!==t)return!1;if(t.length||(t=t.toString(),("string"==typeof n||n instanceof String)&&(t=t.toUpperCase(),n=n.toUpperCase())),"string"==typeof t||t instanceof String){if(!n)return!1;n=n.toString();var o=t.indexOf(n)>-1;return r?o:!o}for(var i=Array.isArray(n)?n:[n],s=0;s<i.length;s++){var a=0;for(n=i[s];a<t.length&&!e.isTwoValueEquals(t[a],n);a++);if(a==t.length)return!r}return r}},e.signs={less:"<",lessorequal:"<=",greater:">",greaterorequal:">=",equal:"==",notequal:"!=",plus:"+",minus:"-",mul:"*",div:"/",and:"and",or:"or",power:"^",mod:"%",negate:"!"},e}(),fo=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mo=function(e){function t(n,r,o,i){var s=e.call(this)||this;return s.message=n,s.expected=r,s.found=o,s.location=i,s.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(s,t),s}return fo(t,e),t.buildMessage=function(e,t){function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}function r(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function o(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function i(e){switch(e.type){case"literal":return'"'+r(e.text)+'"';case"class":var t=e.parts.map((function(e){return Array.isArray(e)?o(e[0])+"-"+o(e[1]):o(e)}));return"["+(e.inverted?"^":"")+t+"]";case"any":return"any character";case"end":return"end of input";case"other":return e.description}}return"Expected "+function(e){var t,n,r=e.map(i);if(r.sort(),r.length>0){for(t=1,n=1;t<r.length;t++)r[t-1]!==r[t]&&(r[n]=r[t],n++);r.length=n}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(e)+" but "+(((s=t)?'"'+r(s)+'"':"end of input")+" found.");var s},t}(Error);var yo=function(e,t){t=void 0!==t?t:{};var n,r={},o={Expression:ze},i=ze,s=function(e,t){return ht(e,t,!0)},a=Re("||",!1),u=Re("or",!0),l=Re("&&",!1),c=Re("and",!0),p=function(e,t){return ht(e,t)},h=Re("<=",!1),d=Re("lessorequal",!0),f=Re(">=",!1),m=Re("greaterorequal",!0),y=Re("==",!1),g=Re("equal",!0),v=Re("=",!1),b=Re("!=",!1),C=Re("notequal",!0),E=Re("<",!1),w=Re("less",!0),O=Re(">",!1),P=Re("greater",!0),q=Re("+",!1),S=Re("-",!1),x=Re("*",!1),_=Re("/",!1),I=Re("%",!1),V=Re("^",!1),T=Re("power",!0),N=Re("*=",!1),A=Re("contains",!0),j=Re("contain",!0),R=Re("notcontains",!0),D=Re("notcontain",!0),L=Re("anyof",!0),k=Re("allof",!0),M=Re("(",!1),F=Re(")",!1),B=Re("!",!1),z=Re("negate",!0),H=Re("empty",!0),W=Re("notempty",!0),U=Re("undefined",!1),Q=Re("null",!1),J=Re("{",!1),K=Re("}",!1),G=Re("''",!1),Y=Re('""',!1),Z=Re("'",!1),$=function(e){return"'"+e+"'"},X=Re('"',!1),ee=Re("[",!1),te=Re("]",!1),ne=Re(",",!1),re=Re("true",!0),oe=Re("false",!0),ie=Re("0x",!1),se=/^[\-]/,ae=De(["-"],!1,!1),ue=Re(".",!1),le=Re("0",!1),ce=function(e){return e.join("")},pe=Re("\\'",!1),he=Re('\\"',!1),de=/^[^"']/,fe=De(['"',"'"],!0,!1),me=function(){return je()},ye=/^[^{}]/,ge=De(["{","}"],!0,!1),ve=/^[0-9]/,be=De([["0","9"]],!1,!1),Ce=/^[1-9]/,Ee=De([["1","9"]],!1,!1),we=/^[a-zA-Z_]/,Oe=De([["a","z"],["A","Z"],"_"],!1,!1),Pe=Le("whitespace"),qe=/^[ \t\n\r]/,Se=De([" ","\t","\n","\r"],!1,!1),xe=0,_e=0,Ie=[{line:1,column:1}],Ve=0,Te=[],Ne=0,Ae={};if(void 0!==t.startRule){if(!(t.startRule in o))throw new Error("Can't start parsing from rule \""+t.startRule+'".');i=o[t.startRule]}function je(){return e.substring(_e,xe)}function Re(e,t){return{type:"literal",text:e,ignoreCase:t}}function De(e,t,n){return{type:"class",parts:e,inverted:t,ignoreCase:n}}function Le(e){return{type:"other",description:e}}function ke(t){var n,r=Ie[t];if(r)return r;for(n=t-1;!Ie[n];)n--;for(r={line:(r=Ie[n]).line,column:r.column};n<t;)10===e.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return Ie[t]=r,r}function Me(e,t){var n=ke(e),r=ke(t);return{start:{offset:e,line:n.line,column:n.column},end:{offset:t,line:r.line,column:r.column}}}function Fe(e){xe<Ve||(xe>Ve&&(Ve=xe,Te=[]),Te.push(e))}function Be(e,t,n){return new mo(mo.buildMessage(e,t),e,t,n)}function ze(){var e,t,n,o,i,a,u,l,c=34*xe+0,p=Ae[c];if(p)return xe=p.nextPos,p.result;if(e=xe,pt()!==r)if((t=We())!==r){for(n=[],o=xe,(i=pt())!==r&&(a=He())!==r&&(u=pt())!==r&&(l=We())!==r?o=i=[i,a,u,l]:(xe=o,o=r);o!==r;)n.push(o),o=xe,(i=pt())!==r&&(a=He())!==r&&(u=pt())!==r&&(l=We())!==r?o=i=[i,a,u,l]:(xe=o,o=r);n!==r&&(o=pt())!==r?(_e=e,e=s(t,n)):(xe=e,e=r)}else xe=e,e=r;else xe=e,e=r;return Ae[c]={nextPos:xe,result:e},e}function He(){var t,n,o=34*xe+1,i=Ae[o];return i?(xe=i.nextPos,i.result):(t=xe,"||"===e.substr(xe,2)?(n="||",xe+=2):(n=r,0===Ne&&Fe(a)),n===r&&("or"===e.substr(xe,2).toLowerCase()?(n=e.substr(xe,2),xe+=2):(n=r,0===Ne&&Fe(u))),n!==r&&(_e=t,n="or"),t=n,Ae[o]={nextPos:xe,result:t},t)}function We(){var e,t,n,o,i,a,u,l,c=34*xe+2,p=Ae[c];if(p)return xe=p.nextPos,p.result;if(e=xe,(t=Qe())!==r){for(n=[],o=xe,(i=pt())!==r&&(a=Ue())!==r&&(u=pt())!==r&&(l=Qe())!==r?o=i=[i,a,u,l]:(xe=o,o=r);o!==r;)n.push(o),o=xe,(i=pt())!==r&&(a=Ue())!==r&&(u=pt())!==r&&(l=Qe())!==r?o=i=[i,a,u,l]:(xe=o,o=r);n!==r?(_e=e,e=t=s(t,n)):(xe=e,e=r)}else xe=e,e=r;return Ae[c]={nextPos:xe,result:e},e}function Ue(){var t,n,o=34*xe+3,i=Ae[o];return i?(xe=i.nextPos,i.result):(t=xe,"&&"===e.substr(xe,2)?(n="&&",xe+=2):(n=r,0===Ne&&Fe(l)),n===r&&("and"===e.substr(xe,3).toLowerCase()?(n=e.substr(xe,3),xe+=3):(n=r,0===Ne&&Fe(c))),n!==r&&(_e=t,n="and"),t=n,Ae[o]={nextPos:xe,result:t},t)}function Qe(){var e,t,n,o,i,s,a,u,l=34*xe+4,c=Ae[l];if(c)return xe=c.nextPos,c.result;if(e=xe,(t=Ke())!==r){for(n=[],o=xe,(i=pt())!==r&&(s=Je())!==r&&(a=pt())!==r&&(u=Ke())!==r?o=i=[i,s,a,u]:(xe=o,o=r);o!==r;)n.push(o),o=xe,(i=pt())!==r&&(s=Je())!==r&&(a=pt())!==r&&(u=Ke())!==r?o=i=[i,s,a,u]:(xe=o,o=r);n!==r?(_e=e,e=t=p(t,n)):(xe=e,e=r)}else xe=e,e=r;return Ae[l]={nextPos:xe,result:e},e}function Je(){var t,n,o=34*xe+5,i=Ae[o];return i?(xe=i.nextPos,i.result):(t=xe,"<="===e.substr(xe,2)?(n="<=",xe+=2):(n=r,0===Ne&&Fe(h)),n===r&&("lessorequal"===e.substr(xe,11).toLowerCase()?(n=e.substr(xe,11),xe+=11):(n=r,0===Ne&&Fe(d))),n!==r&&(_e=t,n="lessorequal"),(t=n)===r&&(t=xe,">="===e.substr(xe,2)?(n=">=",xe+=2):(n=r,0===Ne&&Fe(f)),n===r&&("greaterorequal"===e.substr(xe,14).toLowerCase()?(n=e.substr(xe,14),xe+=14):(n=r,0===Ne&&Fe(m))),n!==r&&(_e=t,n="greaterorequal"),(t=n)===r&&(t=xe,"=="===e.substr(xe,2)?(n="==",xe+=2):(n=r,0===Ne&&Fe(y)),n===r&&("equal"===e.substr(xe,5).toLowerCase()?(n=e.substr(xe,5),xe+=5):(n=r,0===Ne&&Fe(g))),n!==r&&(_e=t,n="equal"),(t=n)===r&&(t=xe,61===e.charCodeAt(xe)?(n="=",xe++):(n=r,0===Ne&&Fe(v)),n===r&&("equal"===e.substr(xe,5).toLowerCase()?(n=e.substr(xe,5),xe+=5):(n=r,0===Ne&&Fe(g))),n!==r&&(_e=t,n="equal"),(t=n)===r&&(t=xe,"!="===e.substr(xe,2)?(n="!=",xe+=2):(n=r,0===Ne&&Fe(b)),n===r&&("notequal"===e.substr(xe,8).toLowerCase()?(n=e.substr(xe,8),xe+=8):(n=r,0===Ne&&Fe(C))),n!==r&&(_e=t,n="notequal"),(t=n)===r&&(t=xe,60===e.charCodeAt(xe)?(n="<",xe++):(n=r,0===Ne&&Fe(E)),n===r&&("less"===e.substr(xe,4).toLowerCase()?(n=e.substr(xe,4),xe+=4):(n=r,0===Ne&&Fe(w))),n!==r&&(_e=t,n="less"),(t=n)===r&&(t=xe,62===e.charCodeAt(xe)?(n=">",xe++):(n=r,0===Ne&&Fe(O)),n===r&&("greater"===e.substr(xe,7).toLowerCase()?(n=e.substr(xe,7),xe+=7):(n=r,0===Ne&&Fe(P))),n!==r&&(_e=t,n="greater"),t=n)))))),Ae[o]={nextPos:xe,result:t},t)}function Ke(){var e,t,n,o,i,a,u,l,c=34*xe+6,p=Ae[c];if(p)return xe=p.nextPos,p.result;if(e=xe,(t=Ye())!==r){for(n=[],o=xe,(i=pt())!==r&&(a=Ge())!==r&&(u=pt())!==r&&(l=Ye())!==r?o=i=[i,a,u,l]:(xe=o,o=r);o!==r;)n.push(o),o=xe,(i=pt())!==r&&(a=Ge())!==r&&(u=pt())!==r&&(l=Ye())!==r?o=i=[i,a,u,l]:(xe=o,o=r);n!==r?(_e=e,e=t=s(t,n)):(xe=e,e=r)}else xe=e,e=r;return Ae[c]={nextPos:xe,result:e},e}function Ge(){var t,n,o=34*xe+7,i=Ae[o];return i?(xe=i.nextPos,i.result):(t=xe,43===e.charCodeAt(xe)?(n="+",xe++):(n=r,0===Ne&&Fe(q)),n!==r&&(_e=t,n="plus"),(t=n)===r&&(t=xe,45===e.charCodeAt(xe)?(n="-",xe++):(n=r,0===Ne&&Fe(S)),n!==r&&(_e=t,n="minus"),t=n),Ae[o]={nextPos:xe,result:t},t)}function Ye(){var e,t,n,o,i,a,u,l,c=34*xe+8,p=Ae[c];if(p)return xe=p.nextPos,p.result;if(e=xe,(t=$e())!==r){for(n=[],o=xe,(i=pt())!==r&&(a=Ze())!==r&&(u=pt())!==r&&(l=$e())!==r?o=i=[i,a,u,l]:(xe=o,o=r);o!==r;)n.push(o),o=xe,(i=pt())!==r&&(a=Ze())!==r&&(u=pt())!==r&&(l=$e())!==r?o=i=[i,a,u,l]:(xe=o,o=r);n!==r?(_e=e,e=t=s(t,n)):(xe=e,e=r)}else xe=e,e=r;return Ae[c]={nextPos:xe,result:e},e}function Ze(){var t,n,o=34*xe+9,i=Ae[o];return i?(xe=i.nextPos,i.result):(t=xe,42===e.charCodeAt(xe)?(n="*",xe++):(n=r,0===Ne&&Fe(x)),n!==r&&(_e=t,n="mul"),(t=n)===r&&(t=xe,47===e.charCodeAt(xe)?(n="/",xe++):(n=r,0===Ne&&Fe(_)),n!==r&&(_e=t,n="div"),(t=n)===r&&(t=xe,37===e.charCodeAt(xe)?(n="%",xe++):(n=r,0===Ne&&Fe(I)),n!==r&&(_e=t,n="mod"),t=n)),Ae[o]={nextPos:xe,result:t},t)}function $e(){var e,t,n,o,i,a,u,l,c=34*xe+10,p=Ae[c];if(p)return xe=p.nextPos,p.result;if(e=xe,(t=et())!==r){for(n=[],o=xe,(i=pt())!==r&&(a=Xe())!==r&&(u=pt())!==r&&(l=et())!==r?o=i=[i,a,u,l]:(xe=o,o=r);o!==r;)n.push(o),o=xe,(i=pt())!==r&&(a=Xe())!==r&&(u=pt())!==r&&(l=et())!==r?o=i=[i,a,u,l]:(xe=o,o=r);n!==r?(_e=e,e=t=s(t,n)):(xe=e,e=r)}else xe=e,e=r;return Ae[c]={nextPos:xe,result:e},e}function Xe(){var t,n,o=34*xe+11,i=Ae[o];return i?(xe=i.nextPos,i.result):(t=xe,94===e.charCodeAt(xe)?(n="^",xe++):(n=r,0===Ne&&Fe(V)),n===r&&("power"===e.substr(xe,5).toLowerCase()?(n=e.substr(xe,5),xe+=5):(n=r,0===Ne&&Fe(T))),n!==r&&(_e=t,n="power"),t=n,Ae[o]={nextPos:xe,result:t},t)}function et(){var e,t,n,o,i,s,a,u,l=34*xe+12,c=Ae[l];if(c)return xe=c.nextPos,c.result;if(e=xe,(t=nt())!==r){for(n=[],o=xe,(i=pt())!==r&&(s=tt())!==r&&(a=pt())!==r?((u=nt())===r&&(u=null),u!==r?o=i=[i,s,a,u]:(xe=o,o=r)):(xe=o,o=r);o!==r;)n.push(o),o=xe,(i=pt())!==r&&(s=tt())!==r&&(a=pt())!==r?((u=nt())===r&&(u=null),u!==r?o=i=[i,s,a,u]:(xe=o,o=r)):(xe=o,o=r);n!==r?(_e=e,e=t=p(t,n)):(xe=e,e=r)}else xe=e,e=r;return Ae[l]={nextPos:xe,result:e},e}function tt(){var t,n,o=34*xe+13,i=Ae[o];return i?(xe=i.nextPos,i.result):(t=xe,"*="===e.substr(xe,2)?(n="*=",xe+=2):(n=r,0===Ne&&Fe(N)),n===r&&("contains"===e.substr(xe,8).toLowerCase()?(n=e.substr(xe,8),xe+=8):(n=r,0===Ne&&Fe(A)),n===r&&("contain"===e.substr(xe,7).toLowerCase()?(n=e.substr(xe,7),xe+=7):(n=r,0===Ne&&Fe(j)))),n!==r&&(_e=t,n="contains"),(t=n)===r&&(t=xe,"notcontains"===e.substr(xe,11).toLowerCase()?(n=e.substr(xe,11),xe+=11):(n=r,0===Ne&&Fe(R)),n===r&&("notcontain"===e.substr(xe,10).toLowerCase()?(n=e.substr(xe,10),xe+=10):(n=r,0===Ne&&Fe(D))),n!==r&&(_e=t,n="notcontains"),(t=n)===r&&(t=xe,"anyof"===e.substr(xe,5).toLowerCase()?(n=e.substr(xe,5),xe+=5):(n=r,0===Ne&&Fe(L)),n!==r&&(_e=t,n="anyof"),(t=n)===r&&(t=xe,"allof"===e.substr(xe,5).toLowerCase()?(n=e.substr(xe,5),xe+=5):(n=r,0===Ne&&Fe(k)),n!==r&&(_e=t,n="allof"),t=n))),Ae[o]={nextPos:xe,result:t},t)}function nt(){var t,n,o,i,s=34*xe+14,a=Ae[s];return a?(xe=a.nextPos,a.result):(t=xe,40===e.charCodeAt(xe)?(n="(",xe++):(n=r,0===Ne&&Fe(M)),n!==r&&pt()!==r&&(o=ze())!==r&&pt()!==r?(41===e.charCodeAt(xe)?(i=")",xe++):(i=r,0===Ne&&Fe(F)),i===r&&(i=null),i!==r?(_e=t,t=n=o):(xe=t,t=r)):(xe=t,t=r),t===r&&(t=function(){var t,n,o,i,s,a=34*xe+15,u=Ae[a];if(u)return xe=u.nextPos,u.result;t=xe,(n=ut())!==r?(40===e.charCodeAt(xe)?(o="(",xe++):(o=r,0===Ne&&Fe(M)),o!==r&&(i=ot())!==r?(41===e.charCodeAt(xe)?(s=")",xe++):(s=r,0===Ne&&Fe(F)),s===r&&(s=null),s!==r?(_e=t,n=new po(n,i),t=n):(xe=t,t=r)):(xe=t,t=r)):(xe=t,t=r);return Ae[a]={nextPos:xe,result:t},t}())===r&&(t=function(){var t,n,o,i=34*xe+16,s=Ae[i];if(s)return xe=s.nextPos,s.result;t=xe,33===e.charCodeAt(xe)?(n="!",xe++):(n=r,0===Ne&&Fe(B));n===r&&("negate"===e.substr(xe,6).toLowerCase()?(n=e.substr(xe,6),xe+=6):(n=r,0===Ne&&Fe(z)));n!==r&&pt()!==r&&(o=ze())!==r?(_e=t,n=new ao(o,"negate"),t=n):(xe=t,t=r);t===r&&(t=xe,(n=rt())!==r&&pt()!==r&&(o=function(){var t,n,o=34*xe+17,i=Ae[o];if(i)return xe=i.nextPos,i.result;t=xe,"empty"===e.substr(xe,5).toLowerCase()?(n=e.substr(xe,5),xe+=5):(n=r,0===Ne&&Fe(H));n!==r&&(_e=t,n="empty");(t=n)===r&&(t=xe,"notempty"===e.substr(xe,8).toLowerCase()?(n=e.substr(xe,8),xe+=8):(n=r,0===Ne&&Fe(W)),n!==r&&(_e=t,n="notempty"),t=n);return Ae[o]={nextPos:xe,result:t},t}())!==r?(_e=t,n=function(e,t){return new ao(e,t)}(n,o),t=n):(xe=t,t=r));return Ae[i]={nextPos:xe,result:t},t}())===r&&(t=rt())===r&&(t=function(){var t,n,o,i,s=34*xe+20,a=Ae[s];if(a)return xe=a.nextPos,a.result;t=xe,91===e.charCodeAt(xe)?(n="[",xe++):(n=r,0===Ne&&Fe(ee));n!==r&&(o=ot())!==r?(93===e.charCodeAt(xe)?(i="]",xe++):(i=r,0===Ne&&Fe(te)),i!==r?(_e=t,t=n=o):(xe=t,t=r)):(xe=t,t=r);return Ae[s]={nextPos:xe,result:t},t}()),Ae[s]={nextPos:xe,result:t},t)}function rt(){var t,n,o,i,s=34*xe+18,a=Ae[s];return a?(xe=a.nextPos,a.result):(t=xe,pt()!==r?("undefined"===e.substr(xe,9)?(n="undefined",xe+=9):(n=r,0===Ne&&Fe(U)),n===r&&("null"===e.substr(xe,4)?(n="null",xe+=4):(n=r,0===Ne&&Fe(Q))),n!==r?(_e=t,t=null):(xe=t,t=r)):(xe=t,t=r),t===r&&(t=xe,pt()!==r&&(n=function(){var t,n,o,i,s=34*xe+19,a=Ae[s];if(a)return xe=a.nextPos,a.result;t=xe,(n=function(){var t,n,o=34*xe+22,i=Ae[o];if(i)return xe=i.nextPos,i.result;t=xe,"true"===e.substr(xe,4).toLowerCase()?(n=e.substr(xe,4),xe+=4):(n=r,0===Ne&&Fe(re));n!==r&&(_e=t,n=!0);(t=n)===r&&(t=xe,"false"===e.substr(xe,5).toLowerCase()?(n=e.substr(xe,5),xe+=5):(n=r,0===Ne&&Fe(oe)),n!==r&&(_e=t,n=!1),t=n);return Ae[o]={nextPos:xe,result:t},t}())!==r&&(_e=t,n=n);(t=n)===r&&(t=xe,(n=function(){var t,n,o,i=34*xe+23,s=Ae[i];if(s)return xe=s.nextPos,s.result;t=xe,"0x"===e.substr(xe,2)?(n="0x",xe+=2):(n=r,0===Ne&&Fe(ie));n!==r&&(o=lt())!==r?(_e=t,n=parseInt(je(),16),t=n):(xe=t,t=r);t===r&&(t=xe,se.test(e.charAt(xe))?(n=e.charAt(xe),xe++):(n=r,0===Ne&&Fe(ae)),n===r&&(n=null),n!==r&&(o=function(){var t,n,o,i=34*xe+24,s=Ae[i];if(s)return xe=s.nextPos,s.result;t=xe,(n=lt())!==r?(46===e.charCodeAt(xe)?(o=".",xe++):(o=r,0===Ne&&Fe(ue)),o!==r&&lt()!==r?(_e=t,n=parseFloat(je()),t=n):(xe=t,t=r)):(xe=t,t=r);t===r&&(t=xe,(n=function(){var t,n,o=34*xe+31,i=Ae[o];if(i)return xe=i.nextPos,i.result;t=[],Ce.test(e.charAt(xe))?(n=e.charAt(xe),xe++):(n=r,0===Ne&&Fe(Ee));if(n!==r)for(;n!==r;)t.push(n),Ce.test(e.charAt(xe))?(n=e.charAt(xe),xe++):(n=r,0===Ne&&Fe(Ee));else t=r;return Ae[o]={nextPos:xe,result:t},t}())!==r?((o=lt())===r&&(o=null),o!==r?(_e=t,n=parseInt(je(),10),t=n):(xe=t,t=r)):(xe=t,t=r),t===r&&(t=xe,48===e.charCodeAt(xe)?(n="0",xe++):(n=r,0===Ne&&Fe(le)),n!==r&&(_e=t,n=0),t=n));return Ae[i]={nextPos:xe,result:t},t}())!==r?(_e=t,a=o,t=n=null==n?a:-a):(xe=t,t=r));var a;return Ae[i]={nextPos:xe,result:t},t}())!==r&&(_e=t,n=n),(t=n)===r&&(t=xe,(n=ut())!==r&&(_e=t,n=n),(t=n)===r&&(t=xe,"''"===e.substr(xe,2)?(n="''",xe+=2):(n=r,0===Ne&&Fe(G)),n!==r&&(_e=t,n=""),(t=n)===r&&(t=xe,'""'===e.substr(xe,2)?(n='""',xe+=2):(n=r,0===Ne&&Fe(Y)),n!==r&&(_e=t,n=""),(t=n)===r&&(t=xe,39===e.charCodeAt(xe)?(n="'",xe++):(n=r,0===Ne&&Fe(Z)),n!==r&&(o=it())!==r?(39===e.charCodeAt(xe)?(i="'",xe++):(i=r,0===Ne&&Fe(Z)),i!==r?(_e=t,n=$(o),t=n):(xe=t,t=r)):(xe=t,t=r),t===r&&(t=xe,34===e.charCodeAt(xe)?(n='"',xe++):(n=r,0===Ne&&Fe(X)),n!==r&&(o=it())!==r?(34===e.charCodeAt(xe)?(i='"',xe++):(i=r,0===Ne&&Fe(X)),i!==r?(_e=t,n=$(o),t=n):(xe=t,t=r)):(xe=t,t=r)))))));return Ae[s]={nextPos:xe,result:t},t}())!==r?(_e=t,t=new lo(n)):(xe=t,t=r),t===r&&(t=xe,pt()!==r?(123===e.charCodeAt(xe)?(n="{",xe++):(n=r,0===Ne&&Fe(J)),n!==r&&(o=function(){var e,t,n,o=34*xe+25,i=Ae[o];if(i)return xe=i.nextPos,i.result;if(e=xe,t=[],(n=at())!==r)for(;n!==r;)t.push(n),n=at();else t=r;t!==r&&(_e=e,t=ce(t));return e=t,Ae[o]={nextPos:xe,result:e},e}())!==r?(125===e.charCodeAt(xe)?(i="}",xe++):(i=r,0===Ne&&Fe(K)),i!==r?(_e=t,t=function(e){return new co(e)}(o)):(xe=t,t=r)):(xe=t,t=r)):(xe=t,t=r))),Ae[s]={nextPos:xe,result:t},t)}function ot(){var t,n,o,i,s,a,u,l,c=34*xe+21,p=Ae[c];if(p)return xe=p.nextPos,p.result;if(t=xe,(n=ze())===r&&(n=null),n!==r){for(o=[],i=xe,(s=pt())!==r?(44===e.charCodeAt(xe)?(a=",",xe++):(a=r,0===Ne&&Fe(ne)),a!==r&&(u=pt())!==r&&(l=ze())!==r?i=s=[s,a,u,l]:(xe=i,i=r)):(xe=i,i=r);i!==r;)o.push(i),i=xe,(s=pt())!==r?(44===e.charCodeAt(xe)?(a=",",xe++):(a=r,0===Ne&&Fe(ne)),a!==r&&(u=pt())!==r&&(l=ze())!==r?i=s=[s,a,u,l]:(xe=i,i=r)):(xe=i,i=r);o!==r?(_e=t,t=n=function(e,t){if(null==e)return new uo([]);var n=[e];if(Array.isArray(t))for(var r=function(e){return[].concat.apply([],e)}(t),o=3;o<r.length;o+=4)n.push(r[o]);return new uo(n)}(n,o)):(xe=t,t=r)}else xe=t,t=r;return Ae[c]={nextPos:xe,result:t},t}function it(){var e,t,n,o=34*xe+26,i=Ae[o];if(i)return xe=i.nextPos,i.result;if(e=xe,t=[],(n=st())!==r)for(;n!==r;)t.push(n),n=st();else t=r;return t!==r&&(_e=e,t=ce(t)),e=t,Ae[o]={nextPos:xe,result:e},e}function st(){var t,n,o=34*xe+27,i=Ae[o];return i?(xe=i.nextPos,i.result):(t=xe,"\\'"===e.substr(xe,2)?(n="\\'",xe+=2):(n=r,0===Ne&&Fe(pe)),n!==r&&(_e=t,n="'"),(t=n)===r&&(t=xe,'\\"'===e.substr(xe,2)?(n='\\"',xe+=2):(n=r,0===Ne&&Fe(he)),n!==r&&(_e=t,n='"'),(t=n)===r&&(t=xe,de.test(e.charAt(xe))?(n=e.charAt(xe),xe++):(n=r,0===Ne&&Fe(fe)),n!==r&&(_e=t,n=me()),t=n)),Ae[o]={nextPos:xe,result:t},t)}function at(){var t,n,o=34*xe+28,i=Ae[o];return i?(xe=i.nextPos,i.result):(t=xe,ye.test(e.charAt(xe))?(n=e.charAt(xe),xe++):(n=r,0===Ne&&Fe(ge)),n!==r&&(_e=t,n=me()),t=n,Ae[o]={nextPos:xe,result:t},t)}function ut(){var e,t,n,o,i,s,a=34*xe+29,u=Ae[a];if(u)return xe=u.nextPos,u.result;if(e=xe,ct()!==r){if(t=[],n=xe,(o=lt())!==r){for(i=[],s=ct();s!==r;)i.push(s),s=ct();i!==r?n=o=[o,i]:(xe=n,n=r)}else xe=n,n=r;for(;n!==r;)if(t.push(n),n=xe,(o=lt())!==r){for(i=[],s=ct();s!==r;)i.push(s),s=ct();i!==r?n=o=[o,i]:(xe=n,n=r)}else xe=n,n=r;t!==r?(_e=e,e=me()):(xe=e,e=r)}else xe=e,e=r;return Ae[a]={nextPos:xe,result:e},e}function lt(){var t,n,o=34*xe+30,i=Ae[o];if(i)return xe=i.nextPos,i.result;if(t=[],ve.test(e.charAt(xe))?(n=e.charAt(xe),xe++):(n=r,0===Ne&&Fe(be)),n!==r)for(;n!==r;)t.push(n),ve.test(e.charAt(xe))?(n=e.charAt(xe),xe++):(n=r,0===Ne&&Fe(be));else t=r;return Ae[o]={nextPos:xe,result:t},t}function ct(){var t,n,o=34*xe+32,i=Ae[o];if(i)return xe=i.nextPos,i.result;if(t=[],we.test(e.charAt(xe))?(n=e.charAt(xe),xe++):(n=r,0===Ne&&Fe(Oe)),n!==r)for(;n!==r;)t.push(n),we.test(e.charAt(xe))?(n=e.charAt(xe),xe++):(n=r,0===Ne&&Fe(Oe));else t=r;return Ae[o]={nextPos:xe,result:t},t}function pt(){var t,n,o=34*xe+33,i=Ae[o];if(i)return xe=i.nextPos,i.result;for(Ne++,t=[],qe.test(e.charAt(xe))?(n=e.charAt(xe),xe++):(n=r,0===Ne&&Fe(Se));n!==r;)t.push(n),qe.test(e.charAt(xe))?(n=e.charAt(xe),xe++):(n=r,0===Ne&&Fe(Se));return Ne--,t===r&&(n=r,0===Ne&&Fe(Pe)),Ae[o]={nextPos:xe,result:t},t}function ht(e,t,n){return void 0===n&&(n=!1),t.reduce((function(e,t){return new so(t[1],e,t[3],n)}),e)}if((n=i())!==r&&xe===e.length)return n;throw n!==r&&xe<e.length&&Fe({type:"end"}),Be(Te,Ve<e.length?e.charAt(Ve):null,Ve<e.length?Me(Ve,Ve+1):Me(Ve,Ve))},go=function(e,t){this.at=e,this.code=t},vo=function(){function e(){}return e.prototype.patchExpression=function(e){return e.replace(/=>/g,">=").replace(/=</g,"<=").replace(/<>/g,"!=").replace(/equals/g,"equal ").replace(/notequals/g,"notequal ")},e.prototype.createCondition=function(e){return this.parseExpression(e)},e.prototype.parseExpression=function(t){try{var n=e.parserCache[t];return void 0===n&&((n=yo(this.patchExpression(t))).hasAsyncFunction()||(e.parserCache[t]=n)),n}catch(e){e instanceof mo&&(this.conditionError=new go(e.location.start.offset,e.message))}},Object.defineProperty(e.prototype,"error",{get:function(){return this.conditionError},enumerable:!1,configurable:!0}),e.parserCache={},e}(),bo=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Co=function(){function e(e){this.processValue=new zr,this.parser=new vo,this.isAsyncValue=!1,this.hasFunctionValue=!1,this.setExpression(e)}return Object.defineProperty(e.prototype,"expression",{get:function(){return this.expressionValue},enumerable:!1,configurable:!0}),e.prototype.setExpression=function(e){this.expression!==e&&(this.expressionValue=e,this.operand=this.parser.parseExpression(e),this.hasFunctionValue=!!this.canRun()&&this.operand.hasFunction(),this.isAsyncValue=!!this.hasFunction()&&this.operand.hasAsyncFunction())},e.prototype.getVariables=function(){if(!this.operand)return[];var e=[];return this.operand.setVariables(e),e},e.prototype.hasFunction=function(){return this.hasFunctionValue},Object.defineProperty(e.prototype,"isAsync",{get:function(){return this.isAsyncValue},enumerable:!1,configurable:!0}),e.prototype.canRun=function(){return!!this.operand},e.prototype.run=function(e,t){var n=this;if(void 0===t&&(t=null),!this.operand)return this.expression&&Hr.warn("Invalid expression: "+this.expression),null;if(this.processValue.values=e,this.processValue.properties=t,!this.isAsync)return this.runValues();this.asyncFuncList=[],this.operand.addToAsyncList(this.asyncFuncList);for(var r=0;r<this.asyncFuncList.length;r++)this.asyncFuncList[r].onAsyncReady=function(){n.doAsyncFunctionReady()};for(r=0;r<this.asyncFuncList.length;r++)this.asyncFuncList[r].evaluateAsync(this.processValue);return!1},e.prototype.doAsyncFunctionReady=function(){for(var e=0;e<this.asyncFuncList.length;e++)if(!this.asyncFuncList[e].isReady)return;this.runValues()},e.prototype.runValues=function(){var e=this.operand.evaluate(this.processValue);return this.onComplete&&this.onComplete(e),e},e.createExpressionExecutor=function(t){return new e(t)},e}(),Eo=function(){function e(t){this._id=e.IdCounter++,this.expression=t}return Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"expression",{get:function(){return this.expressionExecutor?this.expressionExecutor.expression:""},set:function(e){var t=this;this.expressionExecutor&&e===this.expression||(this.expressionExecutor=Co.createExpressionExecutor(e),this.expressionExecutor.onComplete=function(e){t.doOnComplete(e)},this.variables=void 0,this.containsFunc=void 0)},enumerable:!1,configurable:!0}),e.prototype.getVariables=function(){return void 0===this.variables&&(this.variables=this.expressionExecutor.getVariables()),this.variables},e.prototype.hasFunction=function(){return void 0===this.containsFunc&&(this.containsFunc=this.expressionExecutor.hasFunction()),this.containsFunc},Object.defineProperty(e.prototype,"isAsync",{get:function(){return this.expressionExecutor.isAsync},enumerable:!1,configurable:!0}),e.prototype.canRun=function(){return this.expressionExecutor.canRun()},e.prototype.runCore=function(e,t){return void 0===t&&(t=null),this.onBeforeAsyncRun&&this.isAsync&&this.onBeforeAsyncRun(this.id),this.expressionExecutor.run(e,t)},e.prototype.doOnComplete=function(e){this.onAfterAsyncRun&&this.isAsync&&this.onAfterAsyncRun(this.id)},e.IdCounter=1,e}(),wo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return bo(t,e),t.prototype.run=function(e,t){return void 0===t&&(t=null),1==this.runCore(e,t)},t.prototype.doOnComplete=function(t){this.onRunComplete&&this.onRunComplete(1==t),e.prototype.doOnComplete.call(this,t)},t}(Eo),Oo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return bo(t,e),t.prototype.run=function(e,t){return void 0===t&&(t=null),this.runCore(e,t)},t.prototype.doOnComplete=function(t){this.onRunComplete&&this.onRunComplete(t),e.prototype.doOnComplete.call(this,t)},t}(Eo),Po=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qo=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},So=function(){function e(e){this.obj=e,this.properties=null,this.values=null}return e.prototype.getType=function(){return"bindings"},e.prototype.getNames=function(){var e=[];this.fillProperties();for(var t=0;t<this.properties.length;t++)this.properties[t].isVisible("",this.obj)&&e.push(this.properties[t].name);return e},e.prototype.getProperties=function(){var e=[];this.fillProperties();for(var t=0;t<this.properties.length;t++)e.push(this.properties[t]);return e},e.prototype.setBinding=function(e,t){this.values||(this.values={});var n=this.getJson();n!==t&&(t?this.values[e]=t:(delete this.values[e],0==Object.keys(this.values).length&&(this.values=null)),this.onChangedJSON(n))},e.prototype.clearBinding=function(e){this.setBinding(e,"")},e.prototype.isEmpty=function(){if(!this.values)return!0;for(var e in this.values)return!1;return!0},e.prototype.getValueNameByPropertyName=function(e){if(this.values)return this.values[e]},e.prototype.getPropertiesByValueName=function(e){if(!this.values)return[];var t=[];for(var n in this.values)this.values[n]==e&&t.push(n);return t},e.prototype.getJson=function(){if(!this.isEmpty()){var e={};for(var t in this.values)e[t]=this.values[t];return e}},e.prototype.setJson=function(e){var t=this.getJson();if(this.values=null,e)for(var n in this.values={},e)this.values[n]=e[n];this.onChangedJSON(t)},e.prototype.fillProperties=function(){if(null===this.properties){this.properties=[];for(var e=Br.getPropertiesByObj(this.obj),t=0;t<e.length;t++)e[t].isBindable&&this.properties.push(e[t])}},e.prototype.onChangedJSON=function(e){this.obj&&this.obj.onBindingChanged(e,this.getJson())},e}(),xo=function(){function e(t,n,r){this.currentDependency=t,this.target=n,this.property=r,this.dependencies=[],this.id=""+ ++e.DependenciesCount}return e.prototype.addDependency=function(e,t){this.target===e&&this.property===t||this.dependencies.some((function(n){return n.obj===e&&n.prop===t}))||(this.dependencies.push({obj:e,prop:t,id:this.id}),e.registerPropertyChangedHandlers([t],this.currentDependency,this.id))},e.prototype.dispose=function(){this.dependencies.forEach((function(e){e.obj.unregisterPropertyChangedHandlers([e.prop],e.id)}))},e.DependenciesCount=0,e}(),_o=function(){function e(t){this._updater=t,this.dependencies=void 0,this.type=e.ComputedUpdaterType}return Object.defineProperty(e.prototype,"updater",{get:function(){return this._updater},enumerable:!1,configurable:!0}),e.prototype.setDependencies=function(e){this.clearDependencies(),this.dependencies=e},e.prototype.getDependencies=function(){return this.dependencies},e.prototype.clearDependencies=function(){this.dependencies&&(this.dependencies.dispose(),this.dependencies=void 0)},e.prototype.dispose=function(){this.clearDependencies()},e.ComputedUpdaterType="__dependency_computed",e}(),Io=function(){function e(){this.dependencies={},this.propertyHash=e.createPropertiesHash(),this.eventList=[],this.isLoadingFromJsonValue=!1,this.loadingOwner=null,this.onPropertyChanged=this.addEvent(),this.onItemValuePropertyChanged=this.addEvent(),this.isCreating=!0,this.animationAllowedLock=0,this.supportOnElementRenderedEvent=!0,this.onElementRenderedEventEnabled=!1,this._onElementRerendered=new To,this.bindingsValue=new So(this),Ir.createProperties(this),this.onBaseCreating(),this.isCreating=!1}return e.finishCollectDependencies=function(){var t=e.currentDependencis;return e.currentDependencis=void 0,t},e.startCollectDependencies=function(t,n,r){if(void 0!==e.currentDependencis)throw new Error("Attempt to collect nested dependencies. Nested dependencies are not supported.");e.currentDependencis=new xo(t,n,r)},e.collectDependency=function(t,n){void 0!==e.currentDependencis&&e.currentDependencis.addDependency(t,n)},Object.defineProperty(e,"commentSuffix",{get:function(){return br.commentSuffix},set:function(e){br.commentSuffix=e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"commentPrefix",{get:function(){return e.commentSuffix},set:function(t){e.commentSuffix=t},enumerable:!1,configurable:!0}),e.prototype.isValueEmpty=function(e,t){return void 0===t&&(t=!0),t&&(e=this.trimValue(e)),Cr.isValueEmpty(e)},e.prototype.equals=function(e){return!!e&&(!this.isDisposed&&!e.isDisposed&&(this.getType()==e.getType()&&this.equalsCore(e)))},e.prototype.equalsCore=function(e){return this.name===e.name&&Cr.isTwoValueEquals(this.toJSON(),e.toJSON(),!1,!0,!1)},e.prototype.trimValue=function(e){return e&&("string"==typeof e||e instanceof String)?e.trim():e},e.prototype.isPropertyEmpty=function(e){return""!==e&&this.isValueEmpty(e)},e.createPropertiesHash=function(){return{}},e.prototype.dispose=function(){for(var e=this,t=0;t<this.eventList.length;t++)this.eventList[t].clear();this.onPropertyValueChangedCallback=void 0,this.isDisposedValue=!0,Object.keys(this.dependencies).forEach((function(t){return e.dependencies[t].dispose()}))},Object.defineProperty(e.prototype,"isDisposed",{get:function(){return!0===this.isDisposedValue},enumerable:!1,configurable:!0}),e.prototype.addEvent=function(){var e=new To;return this.eventList.push(e),e},e.prototype.onBaseCreating=function(){},e.prototype.getType=function(){return"base"},e.prototype.isDescendantOf=function(e){return Br.isDescendantOf(this.getType(),e)},e.prototype.getSurvey=function(e){return void 0===e&&(e=!1),null},Object.defineProperty(e.prototype,"isDesignMode",{get:function(){var e=this.getSurvey();return!!e&&e.isDesignMode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDesignModeV2",{get:function(){return br.supportCreatorV2&&this.isDesignMode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"inSurvey",{get:function(){return!!this.getSurvey(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bindings",{get:function(){return this.bindingsValue},enumerable:!1,configurable:!0}),e.prototype.checkBindings=function(e,t){},e.prototype.updateBindings=function(e,t){var n=this.bindings.getValueNameByPropertyName(e);n&&this.updateBindingValue(n,t)},e.prototype.updateBindingValue=function(e,t){},e.prototype.getTemplate=function(){return this.getType()},Object.defineProperty(e.prototype,"isLoadingFromJson",{get:function(){return this.isLoadingFromJsonValue||this.getIsLoadingFromJson()},enumerable:!1,configurable:!0}),e.prototype.getIsLoadingFromJson=function(){return!(!this.loadingOwner||!this.loadingOwner.isLoadingFromJson)||this.isLoadingFromJsonValue},e.prototype.startLoadingFromJson=function(e){this.isLoadingFromJsonValue=!0,this.jsonObj=e},e.prototype.endLoadingFromJson=function(){this.isLoadingFromJsonValue=!1},e.prototype.toJSON=function(e){return(new Fr).toJsonObject(this,e)},e.prototype.fromJSON=function(e,t){(new Fr).toObject(e,this,t),this.onSurveyLoad()},e.prototype.onSurveyLoad=function(){},e.prototype.clone=function(){var e=Br.createClass(this.getType());return e.fromJSON(this.toJSON()),e},e.prototype.getPropertyByName=function(e){var t=this.getType();return this.classMetaData&&this.classMetaData.name===t||(this.classMetaData=Br.findClass(t)),this.classMetaData?this.classMetaData.findProperty(e):null},e.prototype.isPropertyVisible=function(e){var t=this.getPropertyByName(e);return!!t&&t.isVisible("",this)},e.createProgressInfo=function(){return{questionCount:0,answeredQuestionCount:0,requiredQuestionCount:0,requiredAnsweredQuestionCount:0}},e.prototype.getProgressInfo=function(){return e.createProgressInfo()},e.prototype.localeChanged=function(){},e.prototype.locStrsChanged=function(){if(this.arraysInfo)for(var t in this.arraysInfo){if((r=this.arraysInfo[t])&&r.isItemValues){var n=this.getPropertyValue(t);n&&e.itemValueLocStrChanged&&e.itemValueLocStrChanged(n)}}if(this.localizableStrings)for(var t in this.localizableStrings){var r;(r=this.getLocalizableString(t))&&r.strChanged()}},e.prototype.getPropertyValue=function(e,t){void 0===t&&(t=null);var n=this.getPropertyValueWithoutDefault(e);if(this.isPropertyEmpty(n)){var r=this.localizableStrings?this.localizableStrings[e]:void 0;if(r)return r.text;if(null!=t)return t;var o=this.getDefaultPropertyValue(e);if(void 0!==o)return o}return n},e.prototype.getDefaultPropertyValue=function(e){var t=this.getPropertyByName(e);if(!(!t||t.isCustom&&this.isCreating)){var n=t.defaultValue;if(!this.isPropertyEmpty(n)&&!Array.isArray(n))return n;var r=this.localizableStrings?this.localizableStrings[e]:void 0;return r&&r.localizationName?this.getLocalizationString(r.localizationName):"boolean"!=t.type&&"switch"!=t.type&&(t.isCustom&&t.onGetValue?t.onGetValue(this):void 0)}},e.prototype.hasDefaultPropertyValue=function(e){return void 0!==this.getDefaultPropertyValue(e)},e.prototype.resetPropertyValue=function(e){var t=this.localizableStrings?this.localizableStrings[e]:void 0;t?(this.setLocalizableStringText(e,void 0),t.clear()):this.setPropertyValue(e,void 0)},e.prototype.getPropertyValueWithoutDefault=function(e){return this.getPropertyValueCore(this.propertyHash,e)},e.prototype.getPropertyValueCore=function(t,n){return this.isLoadingFromJson||e.collectDependency(this,n),this.getPropertyValueCoreHandler?this.getPropertyValueCoreHandler(t,n):t[n]},e.prototype.geValueFromHash=function(){return this.propertyHash.value},e.prototype.setPropertyValueCore=function(e,t,n){this.setPropertyValueCoreHandler?this.isDisposedValue?Hr.disposedObjectChangedProperty(t,this.getType()):this.setPropertyValueCoreHandler(e,t,n):e[t]=n},Object.defineProperty(e.prototype,"isEditingSurveyElement",{get:function(){var e=this.getSurvey();return!!e&&e.isEditingSurveyElement},enumerable:!1,configurable:!0}),e.prototype.iteratePropertiesHash=function(e){var t=this,n=[];for(var r in this.propertyHash)"value"===r&&this.isEditingSurveyElement&&Array.isArray(this.value)||n.push(r);n.forEach((function(n){return e(t.propertyHash,n)}))},e.prototype.setPropertyValue=function(e,t){if(!this.isLoadingFromJson){var n=this.getPropertyByName(e);n&&(t=n.settingValue(this,t))}var r=this.getPropertyValue(e);r&&Array.isArray(r)&&this.arraysInfo&&(!t||Array.isArray(t))?this.isTwoValueEquals(r,t)||this.setArrayPropertyDirectly(e,t):(this.setPropertyValueDirectly(e,t),this.isDisposedValue||this.isTwoValueEquals(r,t)||this.propertyValueChanged(e,r,t))},e.prototype.setArrayPropertyDirectly=function(e,t,n){void 0===n&&(n=!0);var r=this.arraysInfo[e];this.setArray(e,this.getPropertyValue(e),t,!!r&&r.isItemValues,r?n&&r.onPush:null)},e.prototype.setPropertyValueDirectly=function(e,t){this.setPropertyValueCore(this.propertyHash,e,t)},e.prototype.clearPropertyValue=function(e){this.setPropertyValueCore(this.propertyHash,e,null),delete this.propertyHash[e]},e.prototype.onPropertyValueChangedCallback=function(e,t,n,r,o){},e.prototype.itemValuePropertyChanged=function(e,t,n,r){this.onItemValuePropertyChanged.fire(this,{obj:e,name:t,oldValue:n,newValue:r,propertyName:e.ownerPropertyName})},e.prototype.onPropertyValueChanged=function(e,t,n){},e.prototype.propertyValueChanged=function(e,t,n,r,o){if(!this.isLoadingFromJson&&(this.updateBindings(e,n),this.onPropertyValueChanged(e,t,n),this.onPropertyChanged.fire(this,{name:e,oldValue:t,newValue:n}),this.doPropertyValueChangedCallback(e,t,n,r,this),this.checkConditionPropertyChanged(e),this.onPropChangeFunctions))for(var i=0;i<this.onPropChangeFunctions.length;i++)this.onPropChangeFunctions[i].name==e&&this.onPropChangeFunctions[i].func(n,r)},e.prototype.onBindingChanged=function(e,t){this.isLoadingFromJson||this.doPropertyValueChangedCallback("bindings",e,t)},Object.defineProperty(e.prototype,"isInternal",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.doPropertyValueChangedCallback=function(e,t,n,r,o){var i=function(i){i&&i.onPropertyValueChangedCallback&&i.onPropertyValueChangedCallback(e,t,n,o,r)};if(this.isInternal)i(this);else{o||(o=this);var s=this.getSurvey();s||(s=this),i(s),s!==this&&i(this)}},e.prototype.addExpressionProperty=function(e,t,n){this.expressionInfo||(this.expressionInfo={}),this.expressionInfo[e]={onExecute:t,canRun:n}},e.prototype.getDataFilteredValues=function(){return{}},e.prototype.getDataFilteredProperties=function(){return{}},e.prototype.runConditionCore=function(e,t){if(this.expressionInfo)for(var n in this.expressionInfo)this.runConditionItemCore(n,e,t)},e.prototype.canRunConditions=function(){return!this.isDesignMode},e.prototype.checkConditionPropertyChanged=function(e){this.expressionInfo&&this.expressionInfo[e]&&this.canRunConditions()&&this.runConditionItemCore(e,this.getDataFilteredValues(),this.getDataFilteredProperties())},e.prototype.runConditionItemCore=function(e,t,n){var r=this,o=this.expressionInfo[e],i=this.getPropertyValue(e);i&&(o.canRun&&!o.canRun(this)||(o.runner||(o.runner=this.createExpressionRunner(i),o.runner.onRunComplete=function(e){o.onExecute(r,e)}),o.runner.expression=i,o.runner.run(t,n)))},e.prototype.doBeforeAsynRun=function(e){this.asynExpressionHash||(this.asynExpressionHash=[]);var t=!this.isAsyncExpressionRunning;this.asynExpressionHash[e]=!0,t&&this.onAsyncRunningChanged()},e.prototype.doAfterAsynRun=function(e){this.asynExpressionHash&&(delete this.asynExpressionHash[e],this.isAsyncExpressionRunning||this.onAsyncRunningChanged())},e.prototype.onAsyncRunningChanged=function(){},Object.defineProperty(e.prototype,"isAsyncExpressionRunning",{get:function(){return!!this.asynExpressionHash&&Object.keys(this.asynExpressionHash).length>0},enumerable:!1,configurable:!0}),e.prototype.createExpressionRunner=function(e){var t=this,n=new Oo(e);return n.onBeforeAsyncRun=function(e){t.doBeforeAsynRun(e)},n.onAfterAsyncRun=function(e){t.doAfterAsynRun(e)},n},e.prototype.registerPropertyChangedHandlers=function(e,t,n){void 0===n&&(n=null);for(var r=0;r<e.length;r++)this.registerFunctionOnPropertyValueChanged(e[r],t,n)},e.prototype.unregisterPropertyChangedHandlers=function(e,t){void 0===t&&(t=null);for(var n=0;n<e.length;n++)this.unRegisterFunctionOnPropertyValueChanged(e[n],t)},e.prototype.registerFunctionOnPropertyValueChanged=function(e,t,n){if(void 0===n&&(n=null),this.onPropChangeFunctions||(this.onPropChangeFunctions=[]),n)for(var r=0;r<this.onPropChangeFunctions.length;r++){var o=this.onPropChangeFunctions[r];if(o.name==e&&o.key==n)return void(o.func=t)}this.onPropChangeFunctions.push({name:e,func:t,key:n})},e.prototype.registerFunctionOnPropertiesValueChanged=function(e,t,n){void 0===n&&(n=null),this.registerPropertyChangedHandlers(e,t,n)},e.prototype.unRegisterFunctionOnPropertyValueChanged=function(e,t){if(void 0===t&&(t=null),this.onPropChangeFunctions)for(var n=0;n<this.onPropChangeFunctions.length;n++){var r=this.onPropChangeFunctions[n];if(r.name==e&&r.key==t)return void this.onPropChangeFunctions.splice(n,1)}},e.prototype.unRegisterFunctionOnPropertiesValueChanged=function(e,t){void 0===t&&(t=null),this.unregisterPropertyChangedHandlers(e,t)},e.prototype.createCustomLocalizableObj=function(e){var t=this.getLocalizableString(e);return t||this.createLocalizableString(e,this,!1,!0)},e.prototype.getLocale=function(){var e=this.getSurvey();return e?e.getLocale():""},e.prototype.getLocalizationString=function(e){return wr.getString(e,this.getLocale())},e.prototype.getLocalizationFormatString=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.getLocalizationString(e);return r&&r.format?r.format.apply(r,t):""},e.prototype.createLocalizableString=function(e,t,n,r){var o=this;void 0===n&&(n=!1),void 0===r&&(r=!1);var i=new ci(t,n,e);r&&(i.localizationName=!0===r?e:r),i.onStrChanged=function(t,n){o.propertyValueChanged(e,t,n)},this.localizableStrings||(this.localizableStrings={}),this.localizableStrings[e]=i;var s=this.getPropertyByName(e);return i.disableLocalization=s&&!1===s.isLocalizable,i},e.prototype.getLocalizableString=function(e){return this.localizableStrings?this.localizableStrings[e]:null},e.prototype.getLocalizableStringText=function(t,n){void 0===n&&(n=""),e.collectDependency(this,t);var r=this.getLocalizableString(t);if(!r)return"";var o=r.text;return o||n},e.prototype.setLocalizableStringText=function(e,t){var n=this.getLocalizableString(e);n&&(n.text!=t&&(n.text=t))},e.prototype.addUsedLocales=function(e){if(this.localizableStrings)for(var t in this.localizableStrings){(o=this.getLocalizableString(t))&&this.AddLocStringToUsedLocales(o,e)}if(this.arraysInfo)for(var t in this.arraysInfo){var n=this.getPropertyValue(t);if(n&&n.length)for(var r=0;r<n.length;r++){var o;(o=n[r])&&o.addUsedLocales&&o.addUsedLocales(e)}}},e.prototype.searchText=function(e,t){var n=[];this.getSearchableLocalizedStrings(n);for(var r=0;r<n.length;r++)n[r].setFindText(e)&&t.push({element:this,str:n[r]})},e.prototype.getSearchableLocalizedStrings=function(e){if(this.localizableStrings){var t=[];this.getSearchableLocKeys(t);for(var n=0;n<t.length;n++){var r=this.getLocalizableString(t[n]);r&&e.push(r)}}if(this.arraysInfo){var o=[];this.getSearchableItemValueKeys(o);for(n=0;n<o.length;n++){var i=this.getPropertyValue(o[n]);if(i)for(var s=0;s<i.length;s++)e.push(i[s].locText)}}},e.prototype.getSearchableLocKeys=function(e){},e.prototype.getSearchableItemValueKeys=function(e){},e.prototype.AddLocStringToUsedLocales=function(e,t){for(var n=e.getLocales(),r=0;r<n.length;r++)t.indexOf(n[r])<0&&t.push(n[r])},e.prototype.createItemValues=function(e){var t=this,n=this.createNewArray(e,(function(n){if(n.locOwner=t,n.ownerPropertyName=e,"function"==typeof n.getSurvey){var r=n.getSurvey();r&&"function"==typeof r.makeReactive&&r.makeReactive(n)}}));return this.arraysInfo[e].isItemValues=!0,n},e.prototype.notifyArrayChanged=function(e,t){e.onArrayChanged&&e.onArrayChanged(t)},e.prototype.createNewArrayCore=function(e){var t=null;return this.createArrayCoreHandler&&(t=this.createArrayCoreHandler(this.propertyHash,e)),t||(t=new Array,this.setPropertyValueCore(this.propertyHash,e,t)),t},e.prototype.ensureArray=function(e,t,n){if(void 0===t&&(t=null),void 0===n&&(n=null),!this.arraysInfo||!this.arraysInfo[e])return this.createNewArray(e,t,n)},e.prototype.createNewArray=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null);var r=this.createNewArrayCore(e);this.arraysInfo||(this.arraysInfo={}),this.arraysInfo[e]={onPush:t,isItemValues:!1};var o=this;return r.push=function(n){var i=Object.getPrototypeOf(r).push.call(r,n);if(!o.isDisposedValue){t&&t(n,r.length-1);var s=new Vo(r.length-1,0,[n],[]);o.propertyValueChanged(e,r,r,s),o.notifyArrayChanged(r,s)}return i},r.shift=function(){var t=Object.getPrototypeOf(r).shift.call(r);if(!o.isDisposedValue&&t){n&&n(t);var i=new Vo(r.length-1,1,[],[]);o.propertyValueChanged(e,r,r,i),o.notifyArrayChanged(r,i)}return t},r.unshift=function(n){var i=Object.getPrototypeOf(r).unshift.call(r,n);if(!o.isDisposedValue){t&&t(n,r.length-1);var s=new Vo(0,0,[n],[]);o.propertyValueChanged(e,r,r,s),o.notifyArrayChanged(r,s)}return i},r.pop=function(){var t=Object.getPrototypeOf(r).pop.call(r);if(!o.isDisposedValue){n&&n(t);var i=new Vo(r.length-1,1,[],[]);o.propertyValueChanged(e,r,r,i),o.notifyArrayChanged(r,i)}return t},r.splice=function(i,s){for(var a,u=[],l=2;l<arguments.length;l++)u[l-2]=arguments[l];i||(i=0),s||(s=0);var c=(a=Object.getPrototypeOf(r).splice).call.apply(a,qo([r,i,s],u));if(u||(u=[]),!o.isDisposedValue){if(n&&c)for(var p=0;p<c.length;p++)n(c[p]);if(t)for(p=0;p<u.length;p++)t(u[p],i+p);var h=new Vo(i,s,u,c);o.propertyValueChanged(e,r,r,h),o.notifyArrayChanged(r,h)}return c},r},e.prototype.getItemValueType=function(){},e.prototype.setArray=function(t,n,r,o,i){var s=[].concat(n);if(Object.getPrototypeOf(n).splice.call(n,0,n.length),r)for(var a=0;a<r.length;a++){var u=r[a];o&&e.createItemValue&&(u=e.createItemValue(u,this.getItemValueType())),Object.getPrototypeOf(n).push.call(n,u),i&&i(n[a])}var l=new Vo(0,s.length,n,s);this.propertyValueChanged(t,s,n,l),this.notifyArrayChanged(n,l)},e.prototype.isTwoValueEquals=function(e,t,n,r){return void 0===n&&(n=!1),void 0===r&&(r=!1),Cr.isTwoValueEquals(e,t,!1,!n,r)},e.copyObject=function(e,t){for(var n in t){var r=t[n];"object"==typeof r&&(r={},this.copyObject(r,t[n])),e[n]=r}},e.prototype.copyCssClasses=function(t,n){n&&("string"==typeof n||n instanceof String?t.root=n:e.copyObject(t,n))},e.prototype.getValueInLowCase=function(e){return e&&"string"==typeof e?e.toLowerCase():e},e.prototype.getElementsInDesign=function(e){return void 0===e&&(e=!1),[]},Object.defineProperty(e.prototype,"animationAllowed",{get:function(){return this.getIsAnimationAllowed()},enumerable:!1,configurable:!0}),e.prototype.getIsAnimationAllowed=function(){return br.animationEnabled&&this.animationAllowedLock>=0&&!this.isLoadingFromJson&&!this.isDisposed&&(!!this.onElementRerendered||!this.supportOnElementRenderedEvent)},e.prototype.blockAnimations=function(){this.animationAllowedLock--},e.prototype.releaseAnimations=function(){this.animationAllowedLock++},e.prototype.enableOnElementRenderedEvent=function(){this.onElementRenderedEventEnabled=!0},e.prototype.disableOnElementRenderedEvent=function(){this.onElementRenderedEventEnabled=!1},Object.defineProperty(e.prototype,"onElementRerendered",{get:function(){return this.supportOnElementRenderedEvent&&this.onElementRenderedEventEnabled?this._onElementRerendered:void 0},enumerable:!1,configurable:!0}),e.prototype.afterRerender=function(){var e;null===(e=this.onElementRerendered)||void 0===e||e.fire(this,void 0)},e.currentDependencis=void 0,e}(),Vo=function(e,t,n,r){this.index=e,this.deleteCount=t,this.itemsToAdd=n,this.deletedItems=r},To=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Po(t,e),t}(function(){function e(){}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0===this.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this.callbacks?this.callbacks.length:0},enumerable:!1,configurable:!0}),e.prototype.fireByCreatingOptions=function(e,t){if(this.callbacks)for(var n=0;n<this.callbacks.length;n++)if(this.callbacks[n](e,t()),!this.callbacks)return},e.prototype.fire=function(e,t){if(this.callbacks)for(var n=[].concat(this.callbacks),r=0;r<n.length;r++)if(n[r](e,t),!this.callbacks)return},e.prototype.clear=function(){this.callbacks=void 0},e.prototype.add=function(e){this.hasFunc(e)||(this.callbacks||(this.callbacks=new Array),this.callbacks.push(e),this.fireCallbackChanged())},e.prototype.remove=function(e){if(this.hasFunc(e)){var t=this.callbacks.indexOf(e,0);this.callbacks.splice(t,1),this.fireCallbackChanged()}},e.prototype.hasFunc=function(e){return null!=this.callbacks&&this.callbacks.indexOf(e,0)>-1},e.prototype.fireCallbackChanged=function(){this.onCallbacksChanged&&this.onCallbacksChanged()},e}()),No=function(){function e(){this.classes=[]}return e.prototype.isEmpty=function(){return""===this.toString()},e.prototype.append=function(e,t){return void 0===t&&(t=!0),e&&t&&("string"==typeof e&&(e=e.trim()),this.classes.push(e)),this},e.prototype.toString=function(){return this.classes.join(" ")},e}(),Ao=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jo=function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s},Ro={root:"sv-action-bar",defaultSizeMode:"sv-action-bar--default-size-mode",smallSizeMode:"sv-action-bar--small-size-mode",item:"sv-action-bar-item",itemWithTitle:"",itemAsIcon:"sv-action-bar-item--icon",itemActive:"sv-action-bar-item--active",itemPressed:"sv-action-bar-item--pressed",itemIcon:"sv-action-bar-item__icon",itemTitle:"sv-action-bar-item__title",itemTitleWithIcon:"sv-action-bar-item__title--with-icon"},Do=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.sizeMode="default",t}var n;return Ao(t,e),t.prototype.getMarkdownHtml=function(e,t){return this.locOwner?this.locOwner.getMarkdownHtml(e,t):void 0},t.prototype.getRenderer=function(e){return this.locOwner?this.locOwner.getRenderer(e):null},t.prototype.getRendererContext=function(e){return this.locOwner?this.locOwner.getRendererContext(e):e},t.prototype.getProcessedText=function(e){return this.locOwner?this.locOwner.getProcessedText(e):e},t.prototype.getLocale=function(){return this.locOwner?this.locOwner.getLocale():""},t.prototype.getRenderedActions=function(){return this.actions},t.prototype.locStrsChanged=function(){e.prototype.locStrsChanged.call(this),this.actions.forEach((function(e){e.locTitle&&e.locTitle.strChanged(),e.locStrsChanged()}))},t.prototype.raiseUpdate=function(e){this.isEmpty=!this.actions.some((function(e){return e.visible})),this.updateCallback&&this.updateCallback(e)},t.prototype.onSet=function(){var e=this;this.actions.forEach((function(t){e.setActionCssClasses(t)})),this.raiseUpdate(!0)},t.prototype.onPush=function(e){this.setActionCssClasses(e),e.owner=this,this.raiseUpdate(!0)},t.prototype.onRemove=function(e){e.owner=null,this.raiseUpdate(!0)},t.prototype.setActionCssClasses=function(e){e.cssClasses=this.cssClasses},Object.defineProperty(t.prototype,"hasActions",{get:function(){return(this.actions||[]).length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedActions",{get:function(){return this.getRenderedActions()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visibleActions",{get:function(){return this.actions.filter((function(e){return!1!==e.visible}))},enumerable:!1,configurable:!0}),t.prototype.getRootCss=function(){var e="small"===this.sizeMode?this.cssClasses.smallSizeMode:this.cssClasses.defaultSizeMode;return(new No).append(this.cssClasses.root+(e?" "+e:"")+(this.containerCss?" "+this.containerCss:"")).append(this.cssClasses.root+"--empty",this.isEmpty).toString()},t.prototype.getDefaultCssClasses=function(){return Ro},Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.cssClassesValue||(this.cssClassesValue=this.getDefaultCssClasses()),this.cssClassesValue},set:function(e){var t=this;this.cssClassesValue={},this.copyCssClasses(this.cssClassesValue,this.getDefaultCssClasses()),function e(t,n){if(!n||!t)return;if("object"!=typeof n)return;for(var r in t){var o=t[r];!Array.isArray(o)&&o&&"object"==typeof o?(n[r]&&"object"==typeof n[r]||(n[r]={}),e(o,n[r])):n[r]=o}}(e,this.cssClasses),this.actions.forEach((function(e){t.setActionCssClasses(e)}))},enumerable:!1,configurable:!0}),t.prototype.createAction=function(e){return e instanceof Yo?e:new Zo(e)},t.prototype.addAction=function(e,t){void 0===t&&(t=!0);var n=this.createAction(e);return this.actions.push(n),this.sortItems(),n},t.prototype.sortItems=function(){this.actions=[].concat(this.actions.filter((function(e){return void 0===e.visibleIndex||e.visibleIndex>=0}))).sort((function(e,t){return e.visibleIndex-t.visibleIndex}))},t.prototype.setItems=function(e,t){var n=this;void 0===t&&(t=!0),this.actions=e.map((function(e){return n.createAction(e)})),t&&this.sortItems()},t.prototype.popupAfterShowCallback=function(e){},t.prototype.mouseOverHandler=function(e){var t=this;e.isHovered=!0,this.actions.forEach((function(n){n===e&&e.popupModel?(e.showPopupDelayed(t.subItemsShowDelay),t.popupAfterShowCallback(e)):n.popupModel&&n.popupModel.isVisible&&n.hidePopupDelayed(t.subItemsHideDelay)}))},t.prototype.initResponsivityManager=function(e,t){},t.prototype.resetResponsivityManager=function(){},t.prototype.getActionById=function(e){for(var t=0;t<this.actions.length;t++)if(this.actions[t].id===e)return this.actions[t];return null},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.actions.forEach((function(e){return e.dispose()})),this.actions.length=0},jo([(n={onSet:function(e,t){t.onSet()},onPush:function(e,t,n){n.onPush(e)},onRemove:function(e,t,n){n.onRemove(e)}},function(e,t){Object.defineProperty(e,t,{get:function(){return xr(this,n,t),this.getPropertyValue(t)},set:function(e){xr(this,n,t);var r=this.getPropertyValue(t);e!==r&&(r?r.splice.apply(r,Pr([0,r.length],e||[])):this.setPropertyValue(t,e),n&&n.onSet&&n.onSet(e,this))}})})],t.prototype,"actions",void 0),jo([Sr({})],t.prototype,"containerCss",void 0),jo([Sr({defaultValue:!1})],t.prototype,"isEmpty",void 0),jo([Sr({defaultValue:300})],t.prototype,"subItemsShowDelay",void 0),jo([Sr({defaultValue:300})],t.prototype,"subItemsHideDelay",void 0),t}(Io),Lo=function(){function e(){}return e.focusElement=function(e){e&&e.focus()},e.visibility=function(e){var t=gr.getComputedStyle(e);return"none"!==t.display&&"hidden"!==t.visibility&&(!e.parentElement||this.visibility(e.parentElement))},e.getNextElementPreorder=function(e){var t=e.nextElementSibling?e.nextElementSibling:e.parentElement.firstElementChild;return this.visibility(t)?t:this.getNextElementPreorder(t)},e.getNextElementPostorder=function(e){var t=e.previousElementSibling?e.previousElementSibling:e.parentElement.lastElementChild;return this.visibility(t)?t:this.getNextElementPostorder(t)},e.hasHorizontalScroller=function(e){return!!e&&e.scrollWidth>e.offsetWidth},e.hasVerticalScroller=function(e){return!!e&&e.scrollHeight>e.offsetHeight},e}(),ko=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mo=function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s},Fo={root:"sv-list__container",item:"sv-list__item",searchClearButtonIcon:"sv-list__filter-clear-button",loadingIndicator:"sv-list__loading-indicator",itemSelected:"sv-list__item--selected",itemWithIcon:"sv-list__item--with-icon",itemDisabled:"sv-list__item--disabled",itemFocused:"sv-list__item--focused",itemHovered:"sv-list__item--hovered",itemTextWrap:"sv-list__item-text--wrap",itemIcon:"sv-list__item-icon",itemMarkerIcon:"sv-list-item__marker-icon",itemSeparator:"sv-list__item-separator",itemBody:"sv-list__item-body",itemsContainer:"sv-list",itemsContainerFiltering:"sv-list--filtering",filter:"sv-list__filter",filterIcon:"sv-list__filter-icon",filterInput:"sv-list__input",emptyContainer:"sv-list__empty-container",emptyText:"sv-list__empty-text"},Bo=function(e){function t(n,r,o,i,s){var a=e.call(this)||this;if(a.onSelectionChanged=r,a.allowSelection=o,a.elementId=s,a.onItemClick=function(e){if(!a.isItemDisabled(e)){a.isExpanded=!1,a.allowSelection&&(a.selectedItem=e),a.onSelectionChanged&&a.onSelectionChanged(e);var t=e.action;t&&t(e)}},a.onItemHover=function(e){a.mouseOverHandler(e)},a.isItemDisabled=function(e){return void 0!==e.enabled&&!e.enabled},a.isItemSelected=function(e){return a.areSameItems(a.selectedItem,e)},a.isItemFocused=function(e){return a.areSameItems(a.focusedItem,e)},a.getListClass=function(){return(new No).append(a.cssClasses.itemsContainer).append(a.cssClasses.itemsContainerFiltering,!!a.filterString&&a.visibleActions.length!==a.visibleItems.length).toString()},a.getItemClass=function(e){return(new No).append(a.cssClasses.item).append(a.cssClasses.itemWithIcon,!!e.iconName).append(a.cssClasses.itemDisabled,a.isItemDisabled(e)).append(a.cssClasses.itemFocused,a.isItemFocused(e)).append(a.cssClasses.itemSelected,a.isItemSelected(e)).append(a.cssClasses.itemHovered,e.isHovered).append(a.cssClasses.itemTextWrap,a.textWrapEnabled).append(e.css).toString()},a.getItemIndent=function(e){return((e.level||0)+1)*t.INDENT+"px"},-1!==Object.keys(n).indexOf("items")){var u=n;Object.keys(u).forEach((function(e){switch(e){case"items":a.setItems(u.items);break;case"onFilterStringChangedCallback":a.setOnFilterStringChangedCallback(u.onFilterStringChangedCallback);break;case"onTextSearchCallback":a.setOnTextSearchCallback(u.onTextSearchCallback);break;default:a[e]=u[e]}}))}else a.setItems(n),a.selectedItem=i;return a}return ko(t,e),t.prototype.hasText=function(e,t){if(!t)return!0;var n=e.title||"";if(this.onTextSearchCallback)return this.onTextSearchCallback(e,t);var r=n.toLocaleLowerCase();return(r=br.comparator.normalizeTextCallback(r,"filter")).indexOf(t.toLocaleLowerCase())>-1},t.prototype.isItemVisible=function(e){return e.visible&&(!this.shouldProcessFilter||this.hasText(e,this.filterString))},t.prototype.getRenderedActions=function(){var t=e.prototype.getRenderedActions.call(this);if(this.filterString){var n=[];return t.forEach((function(e){n.push(e),e.items&&e.items.forEach((function(t){var r=new Zo(t);r.iconName||(r.iconName=e.iconName),n.push(r)}))})),n}return t},Object.defineProperty(t.prototype,"visibleItems",{get:function(){var e=this;return this.visibleActions.filter((function(t){return e.isItemVisible(t)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shouldProcessFilter",{get:function(){return!this.onFilterStringChangedCallback},enumerable:!1,configurable:!0}),t.prototype.onFilterStringChanged=function(e){var t=this;this.onFilterStringChangedCallback&&this.onFilterStringChangedCallback(e),this.isEmpty=0===this.renderedActions.filter((function(e){return t.isItemVisible(e)})).length},t.prototype.scrollToItem=function(e,t){var n=this;void 0===t&&(t=0),setTimeout((function(){if(n.listContainerHtmlElement){var r=n.listContainerHtmlElement.querySelector("."+e);r&&setTimeout((function(){r.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}),t)}}),t)},t.prototype.setOnFilterStringChangedCallback=function(e){this.onFilterStringChangedCallback=e},t.prototype.setOnTextSearchCallback=function(e){this.onTextSearchCallback=e},t.prototype.setItems=function(t,n){var r=this;void 0===n&&(n=!0),e.prototype.setItems.call(this,t,n),this.elementId&&this.renderedActions.forEach((function(e){e.elementId=r.elementId+e.id})),!this.isAllDataLoaded&&this.actions.length&&this.actions.push(this.loadingIndicator)},t.prototype.onSet=function(){this.showFilter=this.searchEnabled&&(this.forceShowFilter||(this.actions||[]).length>t.MINELEMENTCOUNT),e.prototype.onSet.call(this)},t.prototype.getDefaultCssClasses=function(){return Fo},t.prototype.popupAfterShowCallback=function(e){this.addScrollEventListener((function(){e.hidePopup()}))},t.prototype.onItemLeave=function(e){e.hidePopupDelayed(this.subItemsHideDelay)},t.prototype.areSameItems=function(e,t){return this.areSameItemsCallback?this.areSameItemsCallback(e,t):!!e&&!!t&&e.id==t.id},Object.defineProperty(t.prototype,"filterStringPlaceholder",{get:function(){return this.getLocalizationString("filterStringPlaceholder")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"emptyMessage",{get:function(){return this.isAllDataLoaded?this.getLocalizationString("emptyMessage"):this.loadingText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scrollableContainer",{get:function(){return this.listContainerHtmlElement.querySelector("."+this.getDefaultCssClasses().itemsContainer)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"loadingText",{get:function(){return this.getLocalizationString("loadingFile")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"loadingIndicator",{get:function(){return this.loadingIndicatorValue||(this.loadingIndicatorValue=new Zo({id:"loadingIndicator",title:this.loadingText,action:function(){},css:this.cssClasses.loadingIndicator})),this.loadingIndicatorValue},enumerable:!1,configurable:!0}),t.prototype.goToItems=function(e){if("ArrowDown"===e.key||40===e.keyCode){var t=e.target.parentElement.parentElement.querySelector("ul"),n=function(e){for(var t,n=0;n<e.children.length;n++)t||"none"===getComputedStyle(e.children[n]).display||(t=e.children[n]);return t}(t);t&&n&&(Lo.focusElement(n),e.preventDefault())}},t.prototype.onMouseMove=function(e){this.resetFocusedItem()},t.prototype.onKeyDown=function(e){var t=e.target;"ArrowDown"===e.key||40===e.keyCode?(Lo.focusElement(Lo.getNextElementPreorder(t)),e.preventDefault()):"ArrowUp"!==e.key&&38!==e.keyCode||(Lo.focusElement(Lo.getNextElementPostorder(t)),e.preventDefault())},t.prototype.onPointerDown=function(e,t){},t.prototype.refresh=function(){this.filterString="",this.resetFocusedItem()},t.prototype.onClickSearchClearButton=function(e){e.currentTarget.parentElement.querySelector("input").focus(),this.refresh()},t.prototype.resetFocusedItem=function(){this.focusedItem=void 0},t.prototype.focusFirstVisibleItem=function(){this.focusedItem=this.visibleItems[0]},t.prototype.focusLastVisibleItem=function(){this.focusedItem=this.visibleItems[this.visibleItems.length-1]},t.prototype.initFocusedItem=function(){var e=this;this.focusedItem=this.visibleItems.filter((function(t){return t.visible&&e.isItemSelected(t)}))[0],this.focusedItem||this.focusFirstVisibleItem()},t.prototype.focusNextVisibleItem=function(){if(this.focusedItem){var e=this.visibleItems,t=e.indexOf(this.focusedItem),n=e[t+1];n?this.focusedItem=n:this.focusFirstVisibleItem()}else this.initFocusedItem()},t.prototype.focusPrevVisibleItem=function(){if(this.focusedItem){var e=this.visibleItems,t=e.indexOf(this.focusedItem),n=e[t-1];n?this.focusedItem=n:this.focusLastVisibleItem()}else this.initFocusedItem()},t.prototype.selectFocusedItem=function(){this.focusedItem&&this.onItemClick(this.focusedItem)},t.prototype.initListContainerHtmlElement=function(e){this.listContainerHtmlElement=e},t.prototype.onLastItemRended=function(e){this.isAllDataLoaded||e===this.actions[this.actions.length-1]&&this.listContainerHtmlElement&&(this.hasVerticalScroller=Lo.hasVerticalScroller(this.scrollableContainer))},t.prototype.scrollToFocusedItem=function(){this.scrollToItem(this.getDefaultCssClasses().itemFocused)},t.prototype.scrollToSelectedItem=function(){this.scrollToItem(this.getDefaultCssClasses().itemSelected,110)},t.prototype.addScrollEventListener=function(e){e&&(this.removeScrollEventListener(),this.scrollHandler=e),this.scrollHandler&&this.scrollableContainer.addEventListener("scroll",this.scrollHandler)},t.prototype.removeScrollEventListener=function(){this.scrollHandler&&this.scrollableContainer.removeEventListener("scroll",this.scrollHandler)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.loadingIndicatorValue&&this.loadingIndicatorValue.dispose(),this.listContainerHtmlElement=void 0},t.INDENT=16,t.MINELEMENTCOUNT=10,Mo([Sr({defaultValue:!0,onSet:function(e,t){t.onSet()}})],t.prototype,"searchEnabled",void 0),Mo([Sr({defaultValue:!1})],t.prototype,"showFilter",void 0),Mo([Sr({defaultValue:!1})],t.prototype,"forceShowFilter",void 0),Mo([Sr({defaultValue:!1})],t.prototype,"isExpanded",void 0),Mo([Sr({})],t.prototype,"selectedItem",void 0),Mo([Sr()],t.prototype,"focusedItem",void 0),Mo([Sr({onSet:function(e,t){t.onFilterStringChanged(t.filterString)}})],t.prototype,"filterString",void 0),Mo([Sr({defaultValue:!1})],t.prototype,"hasVerticalScroller",void 0),Mo([Sr({defaultValue:!0})],t.prototype,"isAllDataLoaded",void 0),Mo([Sr({defaultValue:!1})],t.prototype,"showSearchClearButton",void 0),Mo([Sr({defaultValue:!0})],t.prototype,"renderElements",void 0),Mo([Sr({defaultValue:!1})],t.prototype,"textWrapEnabled",void 0),t}(Do),zo=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ho=function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s},Wo=function(e){function t(t,n,r,o){var i=e.call(this)||this;if(i.focusFirstInputSelector="",i.onCancel=function(){},i.onApply=function(){return!0},i.onHide=function(){},i.onShow=function(){},i.onDispose=function(){},i.onVisibilityChanged=i.addEvent(),i.onFooterActionsCreated=i.addEvent(),i.onRecalculatePosition=i.addEvent(),i.contentComponentName=t,i.contentComponentData=n,r&&"string"==typeof r)i.verticalPosition=r,i.horizontalPosition=o;else if(r){var s=r;for(var a in s)i[a]=s[a]}return i}return zo(t,e),t.prototype.refreshInnerModel=function(){var e=this.contentComponentData.model;e&&e.refresh&&e.refresh()},Object.defineProperty(t.prototype,"isVisible",{get:function(){return this.getPropertyValue("isVisible",!1)},set:function(e){this.isVisible!==e&&(this.setPropertyValue("isVisible",e),this.onVisibilityChanged.fire(this,{model:this,isVisible:e}))},enumerable:!1,configurable:!0}),t.prototype.toggleVisibility=function(){this.isVisible=!this.isVisible},t.prototype.show=function(){this.isVisible||(this.isVisible=!0)},t.prototype.hide=function(){this.isVisible&&(this.isVisible=!1)},t.prototype.recalculatePosition=function(e){this.onRecalculatePosition.fire(this,{isResetHeight:e})},t.prototype.updateFooterActions=function(e){var t={actions:e};return this.onFooterActionsCreated.fire(this,t),t.actions},t.prototype.onHiding=function(){this.refreshInnerModel(),this.onHide()},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.onDispose()},Ho([Sr()],t.prototype,"contentComponentName",void 0),Ho([Sr()],t.prototype,"contentComponentData",void 0),Ho([Sr({defaultValue:"bottom"})],t.prototype,"verticalPosition",void 0),Ho([Sr({defaultValue:"left"})],t.prototype,"horizontalPosition",void 0),Ho([Sr({defaultValue:!0})],t.prototype,"showPointer",void 0),Ho([Sr({defaultValue:!1})],t.prototype,"isModal",void 0),Ho([Sr({defaultValue:!0})],t.prototype,"canShrink",void 0),Ho([Sr({defaultValue:!0})],t.prototype,"isFocusedContent",void 0),Ho([Sr({defaultValue:!0})],t.prototype,"isFocusedContainer",void 0),Ho([Sr({defaultValue:""})],t.prototype,"cssClass",void 0),Ho([Sr({defaultValue:""})],t.prototype,"title",void 0),Ho([Sr({defaultValue:"auto"})],t.prototype,"overlayDisplayMode",void 0),Ho([Sr({defaultValue:"popup"})],t.prototype,"displayMode",void 0),Ho([Sr({defaultValue:"flex"})],t.prototype,"positionMode",void 0),t}(Io);var Uo=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qo=function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s},Jo=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e};function Ko(e,t,n){var r,o=t.onSelectionChanged;t.onSelectionChanged=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];a.hasTitle&&(a.title=e.title),o&&o(e,t)};var i=Go(t,n),s=Object.assign({},e,{component:"sv-action-bar-item-dropdown",popupModel:i,action:function(t,n){e.action&&e.action(),i.isFocusedContent=i.isFocusedContent||!n,i.show()}}),a=new Zo(s);return a.data=null===(r=i.contentComponentData)||void 0===r?void 0:r.model,a}function Go(e,t){var n=new Bo(e);n.onSelectionChanged=function(t){e.onSelectionChanged&&e.onSelectionChanged(t),o.hide()};var r=t||{};r.onDispose=function(){n.dispose()};var o=new Wo("sv-list",{model:n},r);return o.isFocusedContent=n.showFilter,o.onShow=function(){r.onShow&&r.onShow(),n.scrollToSelectedItem()},o}var Yo=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.rendredIdValue=t.getNextRendredId(),n.markerIconSize=16,n}return Uo(t,e),t.getNextRendredId=function(){return t.renderedId++},Object.defineProperty(t.prototype,"renderedId",{get:function(){return this.rendredIdValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"owner",{get:function(){return this.ownerValue},set:function(e){e!==this.owner&&(this.ownerValue=e,this.locStrsChanged())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visible",{get:function(){return this.getVisible()},set:function(e){this.setVisible(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{get:function(){return this.getEnabled()},set:function(e){this.setEnabled(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"component",{get:function(){return this.getComponent()},set:function(e){this.setComponent(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locTitle",{get:function(){return this.getLocTitle()},set:function(e){this.setLocTitle(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this.getTitle()},set:function(e){this.setTitle(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.cssClassesValue||Ro},set:function(e){this.cssClassesValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this.visible&&"popup"!==this.mode&&"removed"!==this.mode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return void 0!==this.enabled&&!this.enabled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canShrink",{get:function(){return!!this.iconName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTitle",{get:function(){return("small"!=this.mode&&(this.showTitle||void 0===this.showTitle)||!this.iconName)&&!!this.title},enumerable:!1,configurable:!0}),t.prototype.getActionBarItemTitleCss=function(){return(new No).append(this.cssClasses.itemTitle).append(this.cssClasses.itemTitleWithIcon,!!this.iconName).toString()},t.prototype.getActionBarItemCss=function(){return(new No).append(this.cssClasses.item).append(this.cssClasses.itemWithTitle,this.hasTitle).append(this.cssClasses.itemAsIcon,!this.hasTitle).append(this.cssClasses.itemActive,!!this.active).append(this.cssClasses.itemPressed,!!this.pressed).append(this.innerCss).toString()},t.prototype.getActionRootCss=function(){return(new No).append("sv-action").append(this.css).append("sv-action--space",this.needSpace).append("sv-action--hidden",!this.isVisible).toString()},t.prototype.getTooltip=function(){return this.tooltip||this.title},t.prototype.getIsTrusted=function(e){return e.originalEvent?e.originalEvent.isTrusted:e.isTrusted},t.prototype.showPopup=function(){this.popupModel&&this.popupModel.show()},t.prototype.hidePopup=function(){this.popupModel&&this.popupModel.hide()},t.prototype.clearPopupTimeouts=function(){this.showPopupTimeout&&clearTimeout(this.showPopupTimeout),this.hidePopupTimeout&&clearTimeout(this.hidePopupTimeout)},t.prototype.showPopupDelayed=function(e){var t=this;this.clearPopupTimeouts(),this.showPopupTimeout=setTimeout((function(){t.clearPopupTimeouts(),t.showPopup()}),e)},t.prototype.hidePopupDelayed=function(e){var t,n=this;(null===(t=this.popupModel)||void 0===t?void 0:t.isVisible)?(this.clearPopupTimeouts(),this.hidePopupTimeout=setTimeout((function(){n.clearPopupTimeouts(),n.hidePopup(),n.isHovered=!1}),e)):(this.clearPopupTimeouts(),this.isHovered=!1)},t.renderedId=1,Qo([Sr()],t.prototype,"tooltip",void 0),Qo([Sr()],t.prototype,"showTitle",void 0),Qo([Sr()],t.prototype,"innerCss",void 0),Qo([Sr()],t.prototype,"active",void 0),Qo([Sr()],t.prototype,"pressed",void 0),Qo([Sr()],t.prototype,"data",void 0),Qo([Sr()],t.prototype,"popupModel",void 0),Qo([Sr()],t.prototype,"needSeparator",void 0),Qo([Sr()],t.prototype,"template",void 0),Qo([Sr({defaultValue:"large"})],t.prototype,"mode",void 0),Qo([Sr()],t.prototype,"visibleIndex",void 0),Qo([Sr()],t.prototype,"disableTabStop",void 0),Qo([Sr()],t.prototype,"disableShrink",void 0),Qo([Sr()],t.prototype,"disableHide",void 0),Qo([Sr({defaultValue:!1})],t.prototype,"needSpace",void 0),Qo([Sr()],t.prototype,"ariaChecked",void 0),Qo([Sr()],t.prototype,"ariaExpanded",void 0),Qo([Sr({defaultValue:"button"})],t.prototype,"ariaRole",void 0),Qo([Sr()],t.prototype,"iconName",void 0),Qo([Sr({defaultValue:24})],t.prototype,"iconSize",void 0),Qo([Sr()],t.prototype,"markerIconName",void 0),Qo([Sr()],t.prototype,"markerIconSize",void 0),Qo([Sr()],t.prototype,"css",void 0),Qo([Sr({defaultValue:!1})],t.prototype,"isPressed",void 0),Qo([Sr({defaultValue:!1})],t.prototype,"isHovered",void 0),t}(Io),Zo=function(e){function t(t){var n=e.call(this)||this;if(n.innerItem=t,n.locTitleChanged=function(){var e=n.locTitle.renderedHtml;n.setPropertyValue("_title",e||void 0)},n.locTitle=t?t.locTitle:null,t)for(var r in t)"locTitle"===r||"title"===r&&n.locTitle&&n.title||(n[r]=t[r]);return n.locTitleName&&n.locTitleChanged(),n.registerFunctionOnPropertyValueChanged("_title",(function(){n.raiseUpdate(!0)})),n.locStrChangedInPopupModel(),n}return Uo(t,e),t.prototype.raiseUpdate=function(e){void 0===e&&(e=!1),this.updateCallback&&this.updateCallback(e)},t.prototype.createLocTitle=function(){return this.createLocalizableString("title",this,!0)},t.prototype.setItems=function(e,t){this.markerIconName="icon-next_16x16",this.component="sv-list-item-group",this.items=Jo([],e);var n=Go({items:e,onSelectionChanged:t,searchEnabled:!1},{horizontalPosition:"right",showPointer:!1,canShrink:!1});n.cssClass="sv-popup-inner",this.popupModel=n},t.prototype.getLocTitle=function(){return this.locTitleValue},t.prototype.setLocTitle=function(e){e||this.locTitleValue||(e=this.createLocTitle()),this.locTitleValue&&this.locTitleValue.onStringChanged.remove(this.locTitleChanged),this.locTitleValue=e,this.locTitleValue.onStringChanged.add(this.locTitleChanged),this.locTitleChanged()},t.prototype.getTitle=function(){return this._title},t.prototype.setTitle=function(e){this._title=e},Object.defineProperty(t.prototype,"locTitleName",{get:function(){return this.locTitle.localizationName},set:function(e){this.locTitle.localizationName=e},enumerable:!1,configurable:!0}),t.prototype.locStrsChanged=function(){e.prototype.locStrsChanged.call(this),this.locTooltipChanged(),this.locStrChangedInPopupModel()},t.prototype.locStrChangedInPopupModel=function(){if(this.popupModel&&this.popupModel.contentComponentData&&this.popupModel.contentComponentData.model){var e=this.popupModel.contentComponentData.model;if(Array.isArray(e.actions))e.actions.forEach((function(e){e.locStrsChanged&&e.locStrsChanged()}))}},t.prototype.locTooltipChanged=function(){this.locTooltipName&&(this.tooltip=wr.getString(this.locTooltipName,this.locTitle.locale))},t.prototype.getLocale=function(){return this.owner?this.owner.getLocale():""},t.prototype.getMarkdownHtml=function(e,t){return this.owner?this.owner.getMarkdownHtml(e,t):void 0},t.prototype.getProcessedText=function(e){return this.owner?this.owner.getProcessedText(e):e},t.prototype.getRenderer=function(e){return this.owner?this.owner.getRenderer(e):null},t.prototype.getRendererContext=function(e){return this.owner?this.owner.getRendererContext(e):e},t.prototype.setVisible=function(e){this._visible=e},t.prototype.getVisible=function(){return this._visible},t.prototype.setEnabled=function(e){this._enabled=e},t.prototype.getEnabled=function(){return this.enabledIf?this.enabledIf():this._enabled},t.prototype.setComponent=function(e){this._component=e},t.prototype.getComponent=function(){return this._component},t.prototype.dispose=function(){this.updateCallback=void 0,this.action=void 0,e.prototype.dispose.call(this),this.popupModel&&this.popupModel.dispose(),this.locTitleValue&&(this.locTitleValue.onStringChanged.remove(this.locTitleChanged),this.locTitleChanged=void 0)},Qo([Sr()],t.prototype,"id",void 0),Qo([Sr({defaultValue:!0,onSet:function(e,t){t.raiseUpdate()}})],t.prototype,"_visible",void 0),Qo([Sr({onSet:function(e,t){t.locTooltipChanged()}})],t.prototype,"locTooltipName",void 0),Qo([Sr()],t.prototype,"_enabled",void 0),Qo([Sr()],t.prototype,"action",void 0),Qo([Sr()],t.prototype,"_component",void 0),Qo([Sr()],t.prototype,"items",void 0),Qo([Sr({onSet:function(e,t){t.locTitleValue.text!==e&&(t.locTitleValue.text=e)}})],t.prototype,"_title",void 0),t}(Yo),$o=(function(){function e(e){this.item=e,this.funcKey="sv-dropdown-action",this.setupPopupCallbacks()}e.prototype.setupPopupCallbacks=function(){var e=this,t=this.popupModel=this.item.popupModel;t&&t.registerPropertyChangedHandlers(["isVisible"],(function(){t.isVisible?e.item.pressed=!0:e.item.pressed=!1}),this.funcKey)},e.prototype.removePopupCallbacks=function(){this.popupModel&&this.popupModel.unregisterPropertyChangedHandlers(["isVisible"],this.funcKey)},e.prototype.dispose=function(){this.removePopupCallbacks()}}(),function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Xo=function(e){function t(){var n=e.call(this)||this;return n.minVisibleItemsCount=0,n.isResponsivenessDisabled=!1,n.dotsItem=Ko({id:"dotsItem-id"+t.ContainerID++,css:"sv-dots",innerCss:"sv-dots__item",iconName:"icon-more",visible:!1,tooltip:wr.getString("more")},{items:[],allowSelection:!1}),n}return $o(t,e),t.prototype.hideItemsGreaterN=function(e){var t=this.getActionsToHide();e=Math.max(e,this.minVisibleItemsCount-(this.visibleActions.length-t.length));var n=[];t.forEach((function(t){e<=0&&(t.removePriority?t.mode="removed":(t.mode="popup",n.push(t.innerItem))),e--})),this.hiddenItemsListModel.setItems(n)},t.prototype.getActionsToHide=function(){return this.visibleActions.filter((function(e){return!e.disableHide})).sort((function(e,t){return e.removePriority||0-t.removePriority||0}))},t.prototype.getVisibleItemsCount=function(e){this.visibleActions.filter((function(e){return e.disableHide})).forEach((function(t){return e-=t.minDimension}));for(var t=this.getActionsToHide().map((function(e){return e.minDimension})),n=0,r=0;r<t.length;r++)if((n+=t[r])>e)return r;return r},t.prototype.updateItemMode=function(e,t){for(var n=this.visibleActions,r=n.length-1;r>=0;r--)t>e&&!n[r].disableShrink?(t-=n[r].maxDimension-n[r].minDimension,n[r].mode="small"):n[r].mode="large";if(t>e){var o=this.visibleActions.filter((function(e){return e.removePriority}));o.sort((function(e,t){return e.removePriority-t.removePriority}));for(r=0;r<o.length;r++)t>e&&(t-=n[r].disableShrink?o[r].maxDimension:o[r].minDimension,o[r].mode="removed")}},Object.defineProperty(t.prototype,"hiddenItemsListModel",{get:function(){return this.dotsItem.data},enumerable:!1,configurable:!0}),t.prototype.onSet=function(){var t=this;this.actions.forEach((function(e){return e.updateCallback=function(e){return t.raiseUpdate(e)}})),e.prototype.onSet.call(this)},t.prototype.onPush=function(t){var n=this;t.updateCallback=function(e){return n.raiseUpdate(e)},e.prototype.onPush.call(this,t)},t.prototype.getRenderedActions=function(){return 1===this.actions.length&&this.actions[0].iconName?this.actions:this.actions.concat([this.dotsItem])},t.prototype.raiseUpdate=function(t){this.isResponsivenessDisabled||e.prototype.raiseUpdate.call(this,t)},t.prototype.fit=function(e,t){if(!(e<=0)){this.dotsItem.visible=!1;var n=0,r=0;this.visibleActions.forEach((function(e){n+=e.minDimension,r+=e.maxDimension})),e>=r?this.setActionsMode("large"):e<n?(this.setActionsMode("small"),this.hideItemsGreaterN(this.getVisibleItemsCount(e-t)),this.dotsItem.visible=!!this.hiddenItemsListModel.actions.length):this.updateItemMode(e,r)}},t.prototype.initResponsivityManager=function(e,t){this.responsivityManager=new di(e,this,":scope > .sv-action:not(.sv-dots) > .sv-action__content",null,t)},t.prototype.resetResponsivityManager=function(){this.responsivityManager&&(this.responsivityManager.dispose(),this.responsivityManager=void 0)},t.prototype.setActionsMode=function(e){this.actions.forEach((function(t){"small"==e&&t.disableShrink||(t.mode=e)}))},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.dotsItem.data.dispose(),this.dotsItem.dispose(),this.resetResponsivityManager()},t.ContainerID=1,t}(Do);(function(){function e(e,t){var n=this;void 0===t&&(t=!1),this.func=e,this.isMultiple=t,this._isCompleted=!1,this.execute=function(){n._isCompleted||(n.func(),n._isCompleted=!n.isMultiple)}}e.prototype.discard=function(){this._isCompleted=!0},Object.defineProperty(e.prototype,"isCompleted",{get:function(){return this._isCompleted},enumerable:!1,configurable:!0})})(),function(){function e(t){void 0===t&&(t=100),this.interval=t,setTimeout(e.Instance().tick,t)}e.Instance=function(){return e.instance||(e.instance=new e),e.instance},e.prototype.tick=function(){try{for(var t=[],n=0;n<e.tasks.length;n++){var r=e.tasks[n];r.execute(),r.isCompleted?"function"==typeof r.dispose&&r.dispose():t.push(r)}e.tasks=t}finally{setTimeout(e.Instance().tick,this.interval)}},e.schedule=function(t){e.tasks.push(t)},e.instance=void 0,e.tasks=[]}();var ei,ti=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ni=function(){function e(){this.cancelQueue=[]}return e.prototype.getMsFromRule=function(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))},e.prototype.reflow=function(e){return e.offsetHeight},e.prototype.getAnimationsCount=function(e){var t="";return getComputedStyle&&(t=getComputedStyle(e).animationName),t&&"none"!=t?t.split(", ").length:0},e.prototype.getAnimationDuration=function(e){for(var t=getComputedStyle(e),n=t.animationDelay.split(", "),r=t.animationDuration.split(", "),o=0,i=0;i<Math.max(r.length,n.length);i++)o=Math.max(o,this.getMsFromRule(r[i%r.length])+this.getMsFromRule(n[i%n.length]));return o},e.prototype.addCancelCallback=function(e){this.cancelQueue.push(e)},e.prototype.removeCancelCallback=function(e){this.cancelQueue.indexOf(e)>=0&&this.cancelQueue.splice(this.cancelQueue.indexOf(e),1)},e.prototype.onAnimationEnd=function(e,t,n){var r,o=this,i=this.getAnimationsCount(e),s=function(i){void 0===i&&(i=!0),o.afterAnimationRun(e,n),t(i),clearTimeout(r),o.removeCancelCallback(s),e.removeEventListener("animationend",a)},a=function(e){e.target==e.currentTarget&&--i<=0&&s(!1)};i>0?(e.addEventListener("animationend",a),this.addCancelCallback(s),r=setTimeout((function(){s(!1)}),this.getAnimationDuration(e)+10)):(this.afterAnimationRun(e,n),t(!0))},e.prototype.afterAnimationRun=function(e,t){e&&t&&t.onAfterRunAnimation&&t.onAfterRunAnimation(e)},e.prototype.beforeAnimationRun=function(e,t){e&&t&&t.onBeforeRunAnimation&&t.onBeforeRunAnimation(e)},e.prototype.getCssClasses=function(e){return e.cssClass.replace(/\s+$/,"").split(/\s+/)},e.prototype.runAnimation=function(e,t,n){e&&(null==t?void 0:t.cssClass)?(this.reflow(e),this.getCssClasses(t).forEach((function(t){e.classList.add(t)})),this.onAnimationEnd(e,n,t)):n(!0)},e.prototype.clearHtmlElement=function(e,t){e&&t.cssClass&&this.getCssClasses(t).forEach((function(t){e.classList.remove(t)}))},e.prototype.onNextRender=function(e,t){var n=this;if(void 0===t&&(t=!1),!t&&yr.isAvailable()){var r=function(){e(!0),cancelAnimationFrame(o)},o=yr.requestAnimationFrame((function(){o=yr.requestAnimationFrame((function(){e(!1),n.removeCancelCallback(r)}))}));this.addCancelCallback(r)}else e(!0)},e.prototype.cancel=function(){[].concat(this.cancelQueue).forEach((function(e){return e()})),this.cancelQueue=[]},e}(),ri=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ti(t,e),t.prototype.onEnter=function(e){var t=this,n=e.getAnimatedElement(),r=e.getEnterOptions?e.getEnterOptions():{};this.beforeAnimationRun(n,r),this.runAnimation(n,r,(function(){t.clearHtmlElement(n,r)}))},t.prototype.onLeave=function(e,t){var n=this,r=e.getAnimatedElement(),o=e.getLeaveOptions?e.getLeaveOptions():{};this.beforeAnimationRun(r,o),this.runAnimation(r,o,(function(e){t(),n.onNextRender((function(){n.clearHtmlElement(r,o)}),e)}))},t}(ni),oi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ti(t,e),t.prototype.runGroupAnimation=function(e,t,n,r,o){var i=this,s={isAddingRunning:t.length>0,isDeletingRunning:n.length>0,isReorderingRunning:r.length>0},a=t.map((function(t){return e.getAnimatedElement(t)})),u=t.map((function(t){return e.getEnterOptions?e.getEnterOptions(t,s):{}})),l=n.map((function(t){return e.getAnimatedElement(t)})),c=n.map((function(t){return e.getLeaveOptions?e.getLeaveOptions(t,s):{}})),p=r.map((function(t){return e.getAnimatedElement(t.item)})),h=r.map((function(t){return e.getReorderOptions?e.getReorderOptions(t.item,t.movedForward,s):{}}));t.forEach((function(e,t){i.beforeAnimationRun(a[t],u[t])})),n.forEach((function(e,t){i.beforeAnimationRun(l[t],c[t])})),r.forEach((function(e,t){i.beforeAnimationRun(p[t],h[t])}));var d=t.length+n.length+p.length,f=function(e){--d<=0&&(o&&o(),i.onNextRender((function(){t.forEach((function(e,t){i.clearHtmlElement(a[t],u[t])})),n.forEach((function(e,t){i.clearHtmlElement(l[t],c[t])})),r.forEach((function(e,t){i.clearHtmlElement(p[t],h[t])}))}),e))};t.forEach((function(e,t){i.runAnimation(a[t],u[t],f)})),n.forEach((function(e,t){i.runAnimation(l[t],c[t],f)})),r.forEach((function(e,t){i.runAnimation(p[t],h[t],f)}))},t}(ni),ii=function(){function e(e,t,n){var r=this;this.animationOptions=e,this.update=t,this.getCurrentValue=n,this._debouncedSync=function(e){var t,n=this,r=!1,o=!1;return{run:function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];o=!1,t=i,r||(r=!0,queueMicrotask((function(){o||e.apply(n,t),o=!1,r=!1})))},cancel:function(){o=!0}}}((function(e){r.animation.cancel();try{r._sync(e)}catch(t){r.update(e)}}))}return e.prototype.onNextRender=function(e,t){var n=this,r=this.animationOptions.getRerenderEvent();if(r){var o=function(){r.remove(i),n.cancelCallback=void 0},i=function(){e(),o()};this.cancelCallback=function(){t&&t(),o()},r.add(i)}else{if(!yr.isAvailable())throw new Error("Can't get next render");var s=yr.requestAnimationFrame((function(){e(),n.cancelCallback=void 0}));this.cancelCallback=function(){t&&t(),cancelAnimationFrame(s),n.cancelCallback=void 0}}},e.prototype.sync=function(e){this.animationOptions.isAnimationEnabled()?this._debouncedSync.run(e):(this.cancel(),this.update(e))},e.prototype.cancel=function(){this._debouncedSync.cancel(),this.cancelCallback&&this.cancelCallback(),this.animation.cancel()},e}(),si=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.animation=new ri,t}return ti(t,e),t.prototype._sync=function(e){var t=this;e!==this.getCurrentValue()?e?(this.onNextRender((function(){t.animation.onEnter(t.animationOptions)})),this.update(e)):this.animation.onLeave(this.animationOptions,(function(){t.update(e)})):this.update(e)},t}(ii),ai=(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.animation=new oi,t}ti(t,e),t.prototype._sync=function(e){var t,n,r=this,o=this.getCurrentValue(),i=null===(t=this.animationOptions.allowSyncRemovalAddition)||void 0===t||t,s=function(e,t,n){var r=new Map,o=new Map,i=new Map,s=new Map;e.forEach((function(e){var t=n(e);if(r.has(t))throw new Error("keys must be unique");r.set(n(e),e)})),t.forEach((function(e){var t=n(e);if(o.has(t))throw new Error("keys must be unique");o.set(t,e)}));var a=[],u=[];o.forEach((function(e,t){r.has(t)?i.set(t,i.size):a.push(e)})),r.forEach((function(e,t){o.has(t)?s.set(t,s.size):u.push(e)}));var l=[];i.forEach((function(e,t){var n=s.get(t),r=o.get(t);n!==e&&l.push({item:r,movedForward:n<e})}));var c=new Array(e.length),p=0,h=Array.from(i.keys());e.forEach((function(e,t){i.has(n(e))?(c[t]=o.get(h[p]),p++):c[t]=e}));var d=new Map,f=[];c.forEach((function(e){var t=n(e);o.has(t)?f.length>0&&(d.set(t,f),f=[]):f.push(e)}));var m=new Array;return o.forEach((function(e,t){d.has(t)&&d.get(t).forEach((function(e){m.push(e)})),m.push(e)})),f.forEach((function(e){m.push(e)})),{reorderedItems:l,deletedItems:u,addedItems:a,mergedItems:m}}(o,e,null!==(n=this.animationOptions.getKey)&&void 0!==n?n:function(e){return e}),a=s.addedItems,u=s.deletedItems,l=s.reorderedItems,c=s.mergedItems;!i&&(l.length>0||a.length>0)&&(u=[],c=e);var p=function(){r.animation.runGroupAnimation(r.animationOptions,a,u,l,(function(){u.length>0&&r.update(e)}))};[a,u,l].some((function(e){return e.length>0}))?u.length<=0||l.length>0||a.length>0?(this.onNextRender(p,(function(){r.update(e)})),this.update(c)):p():this.update(e)}}(ii),function(e){function t(t,n,r,o){var i=e.call(this,t,n,r)||this;return i.mergeValues=o,i.animation=new oi,i}ti(t,e),t.prototype._sync=function(e){var t=this,n=[].concat(this.getCurrentValue());if(n[0]!==e[0]){var r=this.mergeValues?this.mergeValues(e,n):[].concat(n,e);this.onNextRender((function(){t.animation.runGroupAnimation(t.animationOptions,e,n,[],(function(){t.update(e)}))}),(function(){return t.update(e)})),this.update(r,!0)}else this.update(e)}}(ii),function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),ui=function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s},li=function(e){function t(){var t=e.call(this)||this;return t.createLocTitleProperty(),t}return ai(t,e),t.prototype.createLocTitleProperty=function(){return this.createLocalizableString("title",this,!0)},Object.defineProperty(t.prototype,"title",{get:function(){return this.getLocalizableStringText("title",this.getDefaultTitleValue())},set:function(e){this.setLocalizableStringText("title",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locTitle",{get:function(){return this.getLocalizableString("title")},enumerable:!1,configurable:!0}),t.prototype.getDefaultTitleValue=function(){},t.prototype.updateDescriptionVisibility=function(e){var t=!1;if(this.isDesignMode){var n=Br.findProperty(this.getType(),"description");t=!!(null==n?void 0:n.placeholder)}this.hasDescription=!!e||t&&this.isDesignMode},Object.defineProperty(t.prototype,"locDescription",{get:function(){return this.getLocalizableString("description")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleTagName",{get:function(){var e=this.getDefaultTitleTagName(),t=this.getSurvey();return t?t.getElementTitleTagName(this,e):e},enumerable:!1,configurable:!0}),t.prototype.getDefaultTitleTagName=function(){return br.titleTags[this.getType()]},Object.defineProperty(t.prototype,"hasTitle",{get:function(){return this.title.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTitleActions",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTitleEvents",{get:function(){return this.hasTitleActions},enumerable:!1,configurable:!0}),t.prototype.getTitleToolbar=function(){return null},t.prototype.getTitleOwner=function(){},Object.defineProperty(t.prototype,"isTitleOwner",{get:function(){return!!this.getTitleOwner()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isTitleRenderedAsString",{get:function(){return this.getIsTitleRenderedAsString()},enumerable:!1,configurable:!0}),t.prototype.toggleState=function(){},Object.defineProperty(t.prototype,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssTitle",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ariaTitleId",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ariaDescriptionId",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleTabIndex",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleAriaExpanded",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleAriaRole",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ariaLabel",{get:function(){return this.locTitle.renderedHtml},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleAriaLabel",{get:function(){return this.ariaLabel},enumerable:!1,configurable:!0}),t.prototype.getIsTitleRenderedAsString=function(){return!this.isTitleOwner},ui([Sr()],t.prototype,"hasDescription",void 0),ui([Sr({localizable:!0,onSet:function(e,t){t.updateDescriptionVisibility(e)}})],t.prototype,"description",void 0),t}(Io);!function(e){e[e.InsideEmptyPanel=1]="InsideEmptyPanel",e[e.MultilineRight=2]="MultilineRight",e[e.MultilineLeft=3]="MultilineLeft",e[e.Top=4]="Top",e[e.Right=5]="Right",e[e.Bottom=6]="Bottom",e[e.Left=7]="Left"}(ei||(ei={}));!function(e){function t(n){var r=e.call(this)||this;return r.selectedElementInDesignValue=r,r.disableDesignActions=t.CreateDisabledDesignElements,r.parentQuestionValue=null,r.isContentElement=!1,r.isEditableTemplateElement=!1,r.isInteractiveDesignElement=!0,r.isSingleInRow=!0,r._renderedIsExpanded=!0,r._isAnimatingCollapseExpand=!1,r.animationCollapsed=new si(r.getExpandCollapseAnimationOptions(),(function(e){r._renderedIsExpanded=e,r.animationAllowed&&(e?r.isAnimatingCollapseExpand=!0:r.updateElementCss(!1))}),(function(){return r.renderedIsExpanded})),r.name=n,r.createNewArray("errors"),r.createNewArray("titleActions"),r.registerPropertyChangedHandlers(["isReadOnly"],(function(){r.onReadOnlyChanged()})),r.registerPropertyChangedHandlers(["errors"],(function(){r.updateVisibleErrors()})),r.registerPropertyChangedHandlers(["isSingleInRow"],(function(){r.updateElementCss(!1)})),r}ai(t,e),t.getProgressInfoByElements=function(e,t){for(var n=Io.createProgressInfo(),r=0;r<e.length;r++)if(e[r].isVisible){var o=e[r].getProgressInfo();n.questionCount+=o.questionCount,n.answeredQuestionCount+=o.answeredQuestionCount,n.requiredQuestionCount+=o.requiredQuestionCount,n.requiredAnsweredQuestionCount+=o.requiredAnsweredQuestionCount}return t&&n.questionCount>0&&(0==n.requiredQuestionCount&&(n.requiredQuestionCount=1),n.answeredQuestionCount>0&&(n.requiredAnsweredQuestionCount=1)),n},t.ScrollElementToTop=function(e,n,r){var o=br.environment.root;if(!e||void 0===o)return!1;var i=o.getElementById(e);return t.ScrollElementToViewCore(i,!1,n,r)},t.ScrollElementToViewCore=function(e,t,n,r){if(!e||!e.scrollIntoView)return!1;var o=n?-1:e.getBoundingClientRect().top,i=o<0,s=-1;if(!i&&t&&(i=(s=e.getBoundingClientRect().left)<0),!i&&yr.isAvailable()){var a=yr.getInnerHeight();if(!(i=a>0&&a<o)&&t){var u=yr.getInnerWidth();i=u>0&&u<s}}return i&&e.scrollIntoView(r),i},t.GetFirstNonTextElement=function(e,t){if(void 0===t&&(t=!1),!e||!e.length||0==e.length)return null;if(t){var n=e[0];"#text"===n.nodeName&&(n.data=""),"#text"===(n=e[e.length-1]).nodeName&&(n.data="")}for(var r=0;r<e.length;r++)if("#text"!=e[r].nodeName&&"#comment"!=e[r].nodeName)return e[r];return null},t.FocusElement=function(e){if(!e||!gr.isAvailable())return!1;var n=t.focusElementCore(e);return n||setTimeout((function(){t.focusElementCore(e)}),10),n},t.focusElementCore=function(e){var n=br.environment.root;if(!n)return!1;var r=n.getElementById(e);return!(!r||r.disabled||"none"===r.style.display||null===r.offsetParent)&&(t.ScrollElementToViewCore(r,!0,!1),r.focus(),!0)},t.prototype.onPropertyValueChanged=function(t,n,r){e.prototype.onPropertyValueChanged.call(this,t,n,r),"state"===t&&(this.updateElementCss(!1),this.notifyStateChanged(n),this.stateChangedCallback&&this.stateChangedCallback())},t.prototype.getSkeletonComponentNameCore=function(){return this.survey?this.survey.getSkeletonComponentName(this):""},Object.defineProperty(t.prototype,"parentQuestion",{get:function(){return this.parentQuestionValue},enumerable:!1,configurable:!0}),t.prototype.setParentQuestion=function(e){this.parentQuestionValue=e,this.onParentQuestionChanged()},t.prototype.onParentQuestionChanged=function(){},Object.defineProperty(t.prototype,"skeletonComponentName",{get:function(){return this.getSkeletonComponentNameCore()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this.getPropertyValue("state")},set:function(e){this.setPropertyValue("state",e),this.renderedIsExpanded=!("collapsed"===this.state&&!this.isDesignMode)},enumerable:!1,configurable:!0}),t.prototype.notifyStateChanged=function(e){this.survey&&this.survey.elementContentVisibilityChanged(this)},Object.defineProperty(t.prototype,"isCollapsed",{get:function(){return"collapsed"===this.state&&!this.isDesignMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isExpanded",{get:function(){return"expanded"===this.state},enumerable:!1,configurable:!0}),t.prototype.collapse=function(){this.isDesignMode||(this.state="collapsed")},t.prototype.expand=function(){this.state="expanded"},t.prototype.toggleState=function(){return this.isCollapsed?(this.expand(),!0):!this.isExpanded||(this.collapse(),!1)},Object.defineProperty(t.prototype,"hasStateButton",{get:function(){return this.isExpanded||this.isCollapsed},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shortcutText",{get:function(){return this.title||this.name},enumerable:!1,configurable:!0}),t.prototype.getTitleToolbar=function(){return this.titleToolbarValue||(this.titleToolbarValue=this.createActionContainer(!0),this.titleToolbarValue.containerCss=(this.isPanel?this.cssClasses.panel.titleBar:this.cssClasses.titleBar)||"sv-action-title-bar",this.titleToolbarValue.setItems(this.getTitleActions())),this.titleToolbarValue},t.prototype.createActionContainer=function(e){var t=e?new Xo:new Do;return this.survey&&this.survey.getCss().actionBar&&(t.cssClasses=this.survey.getCss().actionBar),t},Object.defineProperty(t.prototype,"titleActions",{get:function(){return this.getPropertyValue("titleActions")},enumerable:!1,configurable:!0}),t.prototype.getTitleActions=function(){return this.isTitleActionRequested||(this.updateTitleActions(),this.isTitleActionRequested=!0),this.titleActions},t.prototype.getDefaultTitleActions=function(){return[]},t.prototype.updateTitleActions=function(){var e=this.getDefaultTitleActions();this.survey&&(e=this.survey.getUpdatedElementTitleActions(this,e)),this.setPropertyValue("titleActions",e)},Object.defineProperty(t.prototype,"hasTitleActions",{get:function(){return this.getTitleActions().length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTitleEvents",{get:function(){return void 0!==this.state&&"default"!==this.state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleTabIndex",{get:function(){return this.isPage||"default"===this.state?void 0:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleAriaExpanded",{get:function(){if(!this.isPage&&"default"!==this.state)return"expanded"===this.state?"true":"false"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleAriaRole",{get:function(){if(!this.isPage&&"default"!==this.state)return"button"},enumerable:!1,configurable:!0}),t.prototype.setSurveyImpl=function(e,t){this.surveyImplValue=e,this.surveyImplValue?(this.surveyDataValue=this.surveyImplValue.getSurveyData(),this.setSurveyCore(this.surveyImplValue.getSurvey()),this.textProcessorValue=this.surveyImplValue.getTextProcessor(),this.onSetData()):(this.setSurveyCore(null),this.surveyDataValue=null),this.survey&&(this.updateDescriptionVisibility(this.description),this.clearCssClasses())},t.prototype.canRunConditions=function(){return e.prototype.canRunConditions.call(this)&&!!this.data},t.prototype.getDataFilteredValues=function(){return this.data?this.data.getFilteredValues():{}},t.prototype.getDataFilteredProperties=function(){var e=this.data?this.data.getFilteredProperties():{};return e.question=this,e},Object.defineProperty(t.prototype,"surveyImpl",{get:function(){return this.surveyImplValue},enumerable:!1,configurable:!0}),t.prototype.__setData=function(e){br.supportCreatorV2&&(this.surveyDataValue=e)},Object.defineProperty(t.prototype,"data",{get:function(){return this.surveyDataValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.getSurvey()},enumerable:!1,configurable:!0}),t.prototype.getSurvey=function(e){return void 0===e&&(e=!1),this.surveyValue||this.surveyImplValue&&this.setSurveyCore(this.surveyImplValue.getSurvey()),this.surveyValue},t.prototype.setSurveyCore=function(e){this.surveyValue=e,this.surveyChangedCallback&&this.surveyChangedCallback()},Object.defineProperty(t.prototype,"isInternal",{get:function(){return this.isContentElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"areInvisibleElementsShowing",{get:function(){return!!this.survey&&this.survey.areInvisibleElementsShowing&&!this.isContentElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isReadOnly",{get:function(){return this.readOnly},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"readOnly",{get:function(){return this.getPropertyValue("readOnly")},set:function(e){this.readOnly!=e&&(this.setPropertyValue("readOnly",e),this.isLoadingFromJson||this.setPropertyValue("isReadOnly",this.isReadOnly))},enumerable:!1,configurable:!0}),t.prototype.onReadOnlyChanged=function(){this.readOnlyChangedCallback&&this.readOnlyChangedCallback()},Object.defineProperty(t.prototype,"css",{get:function(){return this.survey?this.survey.getCss():{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssClassesValue",{get:function(){return this.getPropertyValueWithoutDefault("cssClassesValue")},set:function(e){this.setPropertyValue("cssClassesValue",e)},enumerable:!1,configurable:!0}),t.prototype.ensureCssClassesValue=function(){this.cssClassesValue||(this.cssClassesValue=this.calcCssClasses(this.css),this.updateElementCssCore(this.cssClassesValue))},Object.defineProperty(t.prototype,"cssClasses",{get:function(){this.cssClassesValue;return this.survey?(this.ensureCssClassesValue(),this.cssClassesValue):this.calcCssClasses(this.css)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssTitleNumber",{get:function(){var e=this.cssClasses;return e.number?e.number:e.panel?e.panel.number:void 0},enumerable:!1,configurable:!0}),t.prototype.calcCssClasses=function(e){},t.prototype.updateElementCssCore=function(e){},Object.defineProperty(t.prototype,"cssError",{get:function(){return""},enumerable:!1,configurable:!0}),t.prototype.updateElementCss=function(e){this.clearCssClasses()},t.prototype.clearCssClasses=function(){this.cssClassesValue=void 0},t.prototype.getIsLoadingFromJson=function(){return!!e.prototype.getIsLoadingFromJson.call(this)||!!this.surveyValue&&this.surveyValue.isLoadingFromJson},Object.defineProperty(t.prototype,"name",{get:function(){return this.getPropertyValue("name","")},set:function(e){var t=this.name;this.setPropertyValue("name",this.getValidName(e)),!this.isLoadingFromJson&&t&&this.onNameChanged(t)},enumerable:!1,configurable:!0}),t.prototype.getValidName=function(e){return e},t.prototype.onNameChanged=function(e){},t.prototype.updateBindingValue=function(e,t){this.data&&!this.isTwoValueEquals(t,this.data.getValue(e))&&this.data.setValue(e,t,!1)},Object.defineProperty(t.prototype,"errors",{get:function(){return this.getPropertyValue("errors")},set:function(e){this.setPropertyValue("errors",e)},enumerable:!1,configurable:!0}),t.prototype.updateVisibleErrors=function(){for(var e=0,t=0;t<this.errors.length;t++)this.errors[t].visible&&e++;this.hasVisibleErrors=e>0},Object.defineProperty(t.prototype,"containsErrors",{get:function(){return this.getPropertyValue("containsErrors",!1)},enumerable:!1,configurable:!0}),t.prototype.updateContainsErrors=function(){this.setPropertyValue("containsErrors",this.getContainsErrors())},t.prototype.getContainsErrors=function(){return this.errors.length>0},Object.defineProperty(t.prototype,"selectedElementInDesign",{get:function(){return this.selectedElementInDesignValue},set:function(e){this.selectedElementInDesignValue=e},enumerable:!1,configurable:!0}),t.prototype.updateCustomWidgets=function(){},t.prototype.onSurveyLoad=function(){},Object.defineProperty(t.prototype,"wasRendered",{get:function(){return!!this.wasRenderedValue},enumerable:!1,configurable:!0}),t.prototype.onFirstRendering=function(){this.wasRenderedValue=!0,this.ensureCssClassesValue()},t.prototype.endLoadingFromJson=function(){e.prototype.endLoadingFromJson.call(this),this.survey||this.onSurveyLoad(),this.updateDescriptionVisibility(this.description)},t.prototype.setVisibleIndex=function(e){return 0},Object.defineProperty(t.prototype,"isPage",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPanel",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isQuestion",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.delete=function(e){},t.prototype.getLocale=function(){return this.survey?this.survey.getLocale():this.locOwner?this.locOwner.getLocale():""},t.prototype.getMarkdownHtml=function(e,t){return this.survey?this.survey.getSurveyMarkdownHtml(this,e,t):this.locOwner?this.locOwner.getMarkdownHtml(e,t):void 0},t.prototype.getRenderer=function(e){return this.survey&&"function"==typeof this.survey.getRendererForString?this.survey.getRendererForString(this,e):this.locOwner&&"function"==typeof this.locOwner.getRenderer?this.locOwner.getRenderer(e):null},t.prototype.getRendererContext=function(e){return this.survey&&"function"==typeof this.survey.getRendererContextForString?this.survey.getRendererContextForString(this,e):this.locOwner&&"function"==typeof this.locOwner.getRendererContext?this.locOwner.getRendererContext(e):e},t.prototype.getProcessedText=function(e){return this.isLoadingFromJson?e:this.textProcessor?this.textProcessor.processText(e,this.getUseDisplayValuesInDynamicTexts()):this.locOwner?this.locOwner.getProcessedText(e):e},t.prototype.getUseDisplayValuesInDynamicTexts=function(){return!0},t.prototype.removeSelfFromList=function(e){if(e&&Array.isArray(e)){var t=e.indexOf(this);t>-1&&e.splice(t,1)}},Object.defineProperty(t.prototype,"textProcessor",{get:function(){return this.textProcessorValue},enumerable:!1,configurable:!0}),t.prototype.getProcessedHtml=function(e){return e&&this.textProcessor?this.textProcessor.processText(e,!0):e},t.prototype.onSetData=function(){},Object.defineProperty(t.prototype,"parent",{get:function(){return this.getPropertyValue("parent",null)},set:function(e){this.setPropertyValue("parent",e)},enumerable:!1,configurable:!0}),t.prototype.getPage=function(e){for(;e&&e.parent;)e=e.parent;return e&&"page"==e.getType()?e:null},t.prototype.moveToBase=function(e,t,n){if(void 0===n&&(n=null),!t)return!1;e.removeElement(this);var r=-1;return Cr.isNumber(n)&&(r=parseInt(n)),-1==r&&n&&n.getType&&(r=t.indexOf(n)),t.addElement(this,r),!0},t.prototype.setPage=function(e,t){var n=this.getPage(e);"string"==typeof t&&this.getSurvey().pages.forEach((function(e){t===e.name&&(t=e)}));n!==t&&(e&&e.removeElement(this),t&&t.addElement(this,-1))},t.prototype.getSearchableLocKeys=function(e){e.push("title"),e.push("description")},Object.defineProperty(t.prototype,"isDefaultV2Theme",{get:function(){return this.survey&&"sd-root-modern"==this.survey.getCss().root},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasParent",{get:function(){return this.parent&&!this.parent.isPage&&!this.parent.originalPage||void 0===this.parent},enumerable:!1,configurable:!0}),t.prototype.shouldAddRunnerStyles=function(){return!this.isDesignMode&&this.isDefaultV2Theme},Object.defineProperty(t.prototype,"isCompact",{get:function(){return this.survey&&this.survey.isCompact},enumerable:!1,configurable:!0}),t.prototype.canHaveFrameStyles=function(){return void 0!==this.parent&&(!this.hasParent||this.parent&&this.parent.showPanelAsPage)},t.prototype.getHasFrameV2=function(){return this.shouldAddRunnerStyles()&&this.canHaveFrameStyles()},t.prototype.getIsNested=function(){return this.shouldAddRunnerStyles()&&!this.canHaveFrameStyles()},t.prototype.getCssRoot=function(e){var t=!!this.isCollapsed||!!this.isExpanded;return(new No).append(e.withFrame,this.getHasFrameV2()&&!this.isCompact).append(e.compact,this.isCompact&&this.getHasFrameV2()).append(e.collapsed,!!this.isCollapsed).append(e.expandableAnimating,t&&this.isAnimatingCollapseExpand).append(e.expanded,!!this.isExpanded&&this.renderedIsExpanded).append(e.expandable,t).append(e.nested,this.getIsNested()).toString()},Object.defineProperty(t.prototype,"width",{get:function(){return this.getPropertyValue("width","")},set:function(e){this.setPropertyValue("width",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minWidth",{get:function(){return this.getPropertyValue("minWidth")},set:function(e){this.setPropertyValue("minWidth",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxWidth",{get:function(){return this.getPropertyValue("maxWidth")},set:function(e){this.setPropertyValue("maxWidth",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderWidth",{get:function(){return this.getPropertyValue("renderWidth","")},set:function(e){this.setPropertyValue("renderWidth",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"indent",{get:function(){return this.getPropertyValue("indent")},set:function(e){this.setPropertyValue("indent",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightIndent",{get:function(){return this.getPropertyValue("rightIndent",0)},set:function(e){this.setPropertyValue("rightIndent",e)},enumerable:!1,configurable:!0}),t.prototype.getRootStyle=function(){var e={};return this.paddingLeft&&(e["--sv-element-add-padding-left"]=this.paddingLeft),this.paddingRight&&(e["--sv-element-add-padding-right"]=this.paddingRight),e},Object.defineProperty(t.prototype,"paddingLeft",{get:function(){return this.getPropertyValue("paddingLeft","")},set:function(e){this.setPropertyValue("paddingLeft",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paddingRight",{get:function(){return this.getPropertyValue("paddingRight","")},set:function(e){this.setPropertyValue("paddingRight",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rootStyle",{get:function(){var e={},t=this.minWidth;return"auto"!=t&&(t="min(100%, "+this.minWidth+")"),this.allowRootStyle&&this.renderWidth&&(e.flexGrow=1,e.flexShrink=1,e.flexBasis=this.renderWidth,e.minWidth=t,e.maxWidth=this.maxWidth),e},enumerable:!1,configurable:!0}),t.prototype.isContainsSelection=function(e){var t=void 0,n=gr.getDocument();if(gr.isAvailable()&&n&&n.selection)t=n.selection.createRange().parentElement();else{var r=yr.getSelection();if(r&&r.rangeCount>0){var o=r.getRangeAt(0);o.startOffset!==o.endOffset&&(t=o.startContainer.parentNode)}}return t==e},Object.defineProperty(t.prototype,"clickTitleFunction",{get:function(){var e=this;if(this.needClickTitleFunction())return function(t){if(!t||!e.isContainsSelection(t.target))return e.processTitleClick()}},enumerable:!1,configurable:!0}),t.prototype.needClickTitleFunction=function(){return"default"!==this.state},t.prototype.processTitleClick=function(){"default"!==this.state&&this.toggleState()},Object.defineProperty(t.prototype,"hasAdditionalTitleToolbar",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"additionalTitleToolbar",{get:function(){return this.getAdditionalTitleToolbar()},enumerable:!1,configurable:!0}),t.prototype.getAdditionalTitleToolbar=function(){return null},t.prototype.getCssTitle=function(e){var t="default"!==this.state;return(new No).append(e.title).append(e.titleNumInline,(this.no||"").length>4||t).append(e.titleExpandable,t).append(e.titleExpanded,this.isExpanded).append(e.titleCollapsed,this.isCollapsed).append(e.titleDisabled,this.isDisabledStyle).append(e.titleReadOnly,this.isReadOnly).append(e.titleOnError,this.containsErrors).toString()},Object.defineProperty(t.prototype,"isDisabledStyle",{get:function(){return this.getIsDisableAndReadOnlyStyles(!1)[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isReadOnlyStyle",{get:function(){return this.getIsDisableAndReadOnlyStyles(!1)[0]},enumerable:!1,configurable:!0}),t.prototype.getIsDisableAndReadOnlyStyles=function(e){var t=this.isPreviewStyle,n=e||this.isReadOnly;return[n&&!t,!this.isDefaultV2Theme&&(n||t)]},Object.defineProperty(t.prototype,"isPreviewStyle",{get:function(){return!!this.survey&&"preview"===this.survey.state},enumerable:!1,configurable:!0}),t.prototype.localeChanged=function(){e.prototype.localeChanged.call(this),this.updateDescriptionVisibility(this.description),this.errors.length>0&&this.errors.forEach((function(e){e.updateText()}))},t.prototype.setWrapperElement=function(e){this.wrapperElement=e},t.prototype.getWrapperElement=function(){return this.wrapperElement},Object.defineProperty(t.prototype,"isAnimatingCollapseExpand",{get:function(){return this._isAnimatingCollapseExpand||this._renderedIsExpanded!=this.isExpanded},set:function(e){e!==this._isAnimatingCollapseExpand&&(this._isAnimatingCollapseExpand=e,this.updateElementCss(!1))},enumerable:!1,configurable:!0}),t.prototype.onElementExpanded=function(e){},t.prototype.getExpandCollapseAnimationOptions=function(){var e=this,t=function(t){e.isAnimatingCollapseExpand=!0,t.style.setProperty("--animation-height",t.offsetHeight+"px")},n=function(t){e.isAnimatingCollapseExpand=!1};return{getRerenderEvent:function(){return e.onElementRerendered},getEnterOptions:function(){return{cssClass:(e.isPanel?e.cssClasses.panel:e.cssClasses).contentFadeIn,onBeforeRunAnimation:t,onAfterRunAnimation:function(t){n(),e.onElementExpanded(!0)}}},getLeaveOptions:function(){return{cssClass:(e.isPanel?e.cssClasses.panel:e.cssClasses).contentFadeOut,onBeforeRunAnimation:t,onAfterRunAnimation:n}},getAnimatedElement:function(){var t,n=e.isPanel?e.cssClasses.panel:e.cssClasses;if(n.content){var r=function(e){if(!e)return e;return e.replace(/\s*?([\w-]+)\s*?/g,".$1")}(n.content);if(r)return null===(t=e.getWrapperElement())||void 0===t?void 0:t.querySelector(":scope "+r)}},isAnimationEnabled:function(){return e.isExpandCollapseAnimationEnabled}}},Object.defineProperty(t.prototype,"isExpandCollapseAnimationEnabled",{get:function(){return this.animationAllowed&&!this.isDesignMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedIsExpanded",{get:function(){return!!this._renderedIsExpanded},set:function(e){var t=this._renderedIsExpanded;this.animationCollapsed.sync(e),this.isExpandCollapseAnimationEnabled||t||!this.renderedIsExpanded||this.onElementExpanded(!1)},enumerable:!1,configurable:!0}),t.prototype.getIsAnimationAllowed=function(){return e.prototype.getIsAnimationAllowed.call(this)&&!!this.survey&&!this.survey.isEndLoadingFromJson},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.titleToolbarValue&&this.titleToolbarValue.dispose()},t.CreateDisabledDesignElements=!1,ui([Sr({defaultValue:null})],t.prototype,"dragTypeOverMe",void 0),ui([Sr({defaultValue:!1})],t.prototype,"isDragMe",void 0),ui([Sr({defaultValue:!1})],t.prototype,"hasVisibleErrors",void 0),ui([Sr({defaultValue:!0})],t.prototype,"isSingleInRow",void 0),ui([Sr({defaultValue:!0})],t.prototype,"allowRootStyle",void 0),ui([Sr()],t.prototype,"_renderedIsExpanded",void 0)}(li);var ci=function(){function e(e,t,n){var r;void 0===t&&(t=!1),this.owner=e,this.useMarkdown=t,this.name=n,this.values={},this.htmlValues={},this._allowLineBreaks=!1,this.onStringChanged=new To,e instanceof li&&(this._allowLineBreaks="text"==(null===(r=Br.findProperty(e.getType(),n))||void 0===r?void 0:r.type)),this.onCreating()}return Object.defineProperty(e,"defaultLocale",{get:function(){return br.localization.defaultLocaleName},set:function(e){br.localization.defaultLocaleName=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localizationName",{get:function(){return this._localizationName},set:function(e){this._localizationName!=e&&(this._localizationName=e,this.strChanged())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allowLineBreaks",{get:function(){return this._allowLineBreaks},enumerable:!1,configurable:!0}),e.prototype.getIsMultiple=function(){return!1},Object.defineProperty(e.prototype,"locale",{get:function(){if(this.owner&&this.owner.getLocale){var e=this.owner.getLocale();if(e||!this.sharedData)return e}return this.sharedData?this.sharedData.locale:""},enumerable:!1,configurable:!0}),e.prototype.strChanged=function(){this.searchableText=void 0,void 0!==this.renderedText&&(this.calculatedTextValue=this.calcText(),this.renderedText!==this.calculatedTextValue&&(this.renderedText=void 0,this.calculatedTextValue=void 0),this.htmlValues={},this.onChanged(),this.onStringChanged.fire(this,{}))},Object.defineProperty(e.prototype,"text",{get:function(){return this.pureText},set:function(e){this.setLocaleText(this.locale,e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"calculatedText",{get:function(){return this.renderedText=void 0!==this.calculatedTextValue?this.calculatedTextValue:this.calcText(),this.calculatedTextValue=void 0,this.renderedText},enumerable:!1,configurable:!0}),e.prototype.calcText=function(){var e=this.pureText;return e&&this.owner&&this.owner.getProcessedText&&e.indexOf("{")>-1&&(e=this.owner.getProcessedText(e)),this.onGetTextCallback&&(e=this.onGetTextCallback(e)),e},Object.defineProperty(e.prototype,"pureText",{get:function(){var e=this.locale;e||(e=this.defaultLoc);var t=this.getValue(e);if(this.isValueEmpty(t)&&e===this.defaultLoc&&(t=this.getValue(wr.defaultLocale)),this.isValueEmpty(t)){var n=this.getRootDialect(e);n&&(t=this.getValue(n))}return this.isValueEmpty(t)&&e!==this.defaultLoc&&(t=this.getValue(this.defaultLoc)),this.isValueEmpty(t)&&this.getLocalizationName()&&(t=this.getLocalizationStr(),this.onGetLocalizationTextCallback&&(t=this.onGetLocalizationTextCallback(t))),t||(t=this.defaultValue||""),t},enumerable:!1,configurable:!0}),e.prototype.getRootDialect=function(e){if(!e)return e;var t=e.indexOf("-");return t>-1?e.substring(0,t):""},e.prototype.getLocalizationName=function(){return this.sharedData?this.sharedData.localizationName:this.localizationName},e.prototype.getLocalizationStr=function(){var e=this.getLocalizationName();return e?wr.getString(e,this.locale):""},Object.defineProperty(e.prototype,"hasHtml",{get:function(){return this.hasHtmlValue()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"html",{get:function(){return this.hasHtml?this.getHtmlValue():""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0==this.getValuesKeys().length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textOrHtml",{get:function(){return this.hasHtml?this.getHtmlValue():this.calculatedText},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderedHtml",{get:function(){return this.textOrHtml},enumerable:!1,configurable:!0}),e.prototype.getLocaleText=function(e){var t=this.getLocaleTextCore(e);return t||""},e.prototype.getLocaleTextCore=function(e){return e||(e=this.defaultLoc),this.getValue(e)},e.prototype.isLocaleTextEqualsWithDefault=function(e,t){var n=this.getLocaleTextCore(e);return n===t||this.isValueEmpty(n)&&this.isValueEmpty(t)},e.prototype.clear=function(){this.setJson(void 0)},e.prototype.clearLocale=function(e){this.setLocaleText(e,void 0)},e.prototype.setLocaleText=function(e,t){if(e=this.getValueLoc(e),this.storeDefaultText||!this.isLocaleTextEqualsWithDefault(e,t)){if(br.localization.storeDuplicatedTranslations||this.isValueEmpty(t)||!e||e==this.defaultLoc||this.getValue(e)||t!=this.getLocaleText(this.defaultLoc)){var n=this.curLocale;e||(e=this.defaultLoc);var r=this.onStrChanged&&e===n?this.pureText:void 0;delete this.htmlValues[e],this.isValueEmpty(t)?this.deleteValue(e):"string"==typeof t&&(this.canRemoveLocValue(e,t)?this.setLocaleText(e,null):(this.setValue(e,t),e==this.defaultLoc&&this.deleteValuesEqualsToDefault(t))),this.fireStrChanged(e,r)}}else{if(!this.isValueEmpty(t)||e&&e!==this.defaultLoc)return;var o=wr.defaultLocale,i=this.getValue(o);o&&!this.isValueEmpty(i)&&(this.setValue(o,t),this.fireStrChanged(o,i))}},e.prototype.isValueEmpty=function(e){return null==e||!this.localizationName&&""===e},Object.defineProperty(e.prototype,"curLocale",{get:function(){return this.locale?this.locale:this.defaultLoc},enumerable:!1,configurable:!0}),e.prototype.canRemoveLocValue=function(e,t){if(br.localization.storeDuplicatedTranslations)return!1;if(e===this.defaultLoc)return!1;var n=this.getRootDialect(e);if(n){var r=this.getLocaleText(n);return r?r==t:this.canRemoveLocValue(n,t)}return t==this.getLocaleText(this.defaultLoc)},e.prototype.fireStrChanged=function(e,t){if(this.strChanged(),this.onStrChanged){var n=this.pureText;e===this.curLocale&&t===n||this.onStrChanged(t,n)}},e.prototype.hasNonDefaultText=function(){var e=this.getValuesKeys();return 0!=e.length&&(e.length>1||e[0]!=this.defaultLoc)},e.prototype.getLocales=function(){var e=this.getValuesKeys();return 0==e.length?[]:e},e.prototype.getJson=function(){if(this.sharedData)return this.sharedData.getJson();var e=this.getValuesKeys();if(0==e.length)return null;if(1==e.length&&e[0]==br.localization.defaultLocaleName&&!br.serialization.localizableStringSerializeAsObject)return this.values[e[0]];var t={};for(var n in this.values)t[n]=this.values[n];return t},e.prototype.setJson=function(e){if(this.sharedData)this.sharedData.setJson(e);else if(this.values={},this.htmlValues={},null!=e){if("string"==typeof e)this.setLocaleText(null,e);else for(var t in e)this.setLocaleText(t,e[t]);this.strChanged()}},Object.defineProperty(e.prototype,"renderAs",{get:function(){return this.owner&&"function"==typeof this.owner.getRenderer&&this.owner.getRenderer(this.name)||e.defaultRenderer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderAsData",{get:function(){return this.owner&&"function"==typeof this.owner.getRendererContext&&this.owner.getRendererContext(this)||this},enumerable:!1,configurable:!0}),e.prototype.equals=function(e){return this.sharedData?this.sharedData.equals(e):!(!e||!e.values)&&Cr.isTwoValueEquals(this.values,e.values,!1,!0,!1)},e.prototype.setFindText=function(e){if(this.searchText!=e){if(this.searchText=e,!this.searchableText){var t=this.textOrHtml;this.searchableText=t?t.toLowerCase():""}var n=this.searchableText,r=n&&e?n.indexOf(e):void 0;return r<0&&(r=void 0),null==r&&this.searchIndex==r||(this.searchIndex=r,this.onSearchChanged&&this.onSearchChanged()),null!=this.searchIndex}},e.prototype.onChanged=function(){},e.prototype.onCreating=function(){},e.prototype.hasHtmlValue=function(){if(!this.owner||!this.useMarkdown)return!1;var e=this.locale;if(e||(e=this.defaultLoc),void 0!==this.htmlValues[e])return!!this.htmlValues[e];var t=this.calculatedText;if(!t)return this.setHtmlValue(e,""),!1;if(this.getLocalizationName()&&t===this.getLocalizationStr())return this.setHtmlValue(e,""),!1;var n=this.owner.getMarkdownHtml(t,this.name);return this.setHtmlValue(e,n),!!n},e.prototype.setHtmlValue=function(e,t){this.htmlValues[e]=t},e.prototype.getHtmlValue=function(){var e=this.locale;return e||(e=this.defaultLoc),this.htmlValues[e]},e.prototype.deleteValuesEqualsToDefault=function(e){if(!br.localization.storeDuplicatedTranslations)for(var t=this.getValuesKeys(),n=0;n<t.length;n++)t[n]!=this.defaultLoc&&this.getValue(t[n])==e&&this.deleteValue(t[n])},e.prototype.getValue=function(e){return this.sharedData?this.sharedData.getValue(e):this.values[this.getValueLoc(e)]},e.prototype.setValue=function(e,t){this.sharedData?this.sharedData.setValue(e,t):this.values[this.getValueLoc(e)]=t},e.prototype.deleteValue=function(e){this.sharedData?this.sharedData.deleteValue(e):delete this.values[this.getValueLoc(e)]},e.prototype.getValueLoc=function(e){return this.disableLocalization?br.localization.defaultLocaleName:e},e.prototype.getValuesKeys=function(){return this.sharedData?this.sharedData.getValuesKeys():Object.keys(this.values)},Object.defineProperty(e.prototype,"defaultLoc",{get:function(){return br.localization.defaultLocaleName},enumerable:!1,configurable:!0}),e.SerializeAsObject=!1,e.defaultRenderer="sv-string-viewer",e.editableRenderer="sv-string-editor",e}();!function(){function e(e){this.owner=e,this.values={}}e.prototype.getIsMultiple=function(){return!0},Object.defineProperty(e.prototype,"locale",{get:function(){return this.owner&&this.owner.getLocale?this.owner.getLocale():""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue("")},set:function(e){this.setValue("",e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return Array.isArray(this.value)?this.value.join("\n"):""},set:function(e){this.value=e?e.split("\n"):[]},enumerable:!1,configurable:!0}),e.prototype.getLocaleText=function(e){var t=this.getValueCore(e,!e||e===this.locale);return t&&Array.isArray(t)&&0!=t.length?t.join("\n"):""},e.prototype.setLocaleText=function(e,t){var n=t?t.split("\n"):null;this.setValue(e,n)},e.prototype.getValue=function(e){return this.getValueCore(e)},e.prototype.getValueCore=function(e,t){if(void 0===t&&(t=!0),e=this.getLocale(e),this.values[e])return this.values[e];if(t){var n=br.localization.defaultLocaleName;if(e!==n&&this.values[n])return this.values[n]}return[]},e.prototype.setValue=function(e,t){e=this.getLocale(e);var n=Cr.createCopy(this.values);t&&0!=t.length?this.values[e]=t:delete this.values[e],this.onValueChanged&&this.onValueChanged(n,this.values)},e.prototype.hasValue=function(e){return void 0===e&&(e=""),!this.isEmpty&&this.getValue(e).length>0},Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0==this.getValuesKeys().length},enumerable:!1,configurable:!0}),e.prototype.getLocale=function(e){return e||((e=this.locale)||br.localization.defaultLocaleName)},e.prototype.getLocales=function(){var e=this.getValuesKeys();return 0==e.length?[]:e},e.prototype.getJson=function(){var e=this.getValuesKeys();return 0==e.length?null:1!=e.length||e[0]!=br.localization.defaultLocaleName||br.serialization.localizableStringSerializeAsObject?Cr.createCopy(this.values):this.values[e[0]]},e.prototype.setJson=function(e){if(this.values={},e)if(Array.isArray(e))this.setValue(null,e);else for(var t in e)this.setValue(t,e[t])},e.prototype.getValuesKeys=function(){return Object.keys(this.values)}}();function pi(e){return"function"!=typeof e?e:e()}!function(){function e(){this._result=""}e.prototype.log=function(e){this._result+="->"+e},Object.defineProperty(e.prototype,"result",{get:function(){return this._result},enumerable:!1,configurable:!0})}();var hi=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),di=function(){function e(e,t,n,r,o){var i=this;void 0===r&&(r=null),this.container=e,this.model=t,this.itemsSelector=n,this.dotsItemSize=r,this.delayedUpdateFunction=o,this.resizeObserver=void 0,this.isInitialized=!1,this.minDimensionConst=56,this.separatorSize=17,this.separatorAddConst=1,this.paddingSizeConst=8,this.dotsSizeConst=48,this.recalcMinDimensionConst=!0,this.getComputedStyle=function(e){return gr.getComputedStyle(e)},this.model.updateCallback=function(e){e&&(i.isInitialized=!1),setTimeout((function(){i.process()}),1)},"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((function(e){yr.requestAnimationFrame((function(){i.process()}))})),this.resizeObserver.observe(this.container.parentElement))}return e.prototype.getDimensions=function(e){return{scroll:e.scrollWidth,offset:e.offsetWidth}},e.prototype.getAvailableSpace=function(){var e=this.getComputedStyle(this.container),t=this.container.offsetWidth;return"border-box"===e.boxSizing&&(t-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)),t},e.prototype.calcItemSize=function(e){return e.offsetWidth},e.prototype.calcMinDimension=function(e){var t=this.minDimensionConst;return e.iconSize&&this.recalcMinDimensionConst&&(t=2*e.iconSize+this.paddingSizeConst),e.canShrink?t+(e.needSeparator?this.separatorSize:0):e.maxDimension},e.prototype.getRenderedVisibleActionsCount=function(){var e=this,t=0;return this.container.querySelectorAll(this.itemsSelector).forEach((function(n){e.calcItemSize(n)>0&&t++})),t},e.prototype.calcItemsSizes=function(){var e=this,t=this.model.actions;(this.container.querySelectorAll(this.itemsSelector)||[]).forEach((function(n,r){var o=t[r];e.calcActionDimensions(o,n)}))},e.prototype.calcActionDimensions=function(e,t){e.maxDimension=this.calcItemSize(t),e.minDimension=this.calcMinDimension(e)},Object.defineProperty(e.prototype,"isContainerVisible",{get:function(){return!!((e=this.container).offsetWidth||e.offsetHeight||e.getClientRects().length);var e},enumerable:!1,configurable:!0}),e.prototype.process=function(){var e=this;if(this.isContainerVisible&&!this.model.isResponsivenessDisabled){this.isInitialized||this.model.setActionsMode("large");var t=function(){var t,n=e.dotsItemSize;if(!e.dotsItemSize){var r=null===(t=e.container)||void 0===t?void 0:t.querySelector(".sv-dots");n=r&&e.calcItemSize(r)||e.dotsSizeConst}e.model.fit(e.getAvailableSpace(),n)};if(this.isInitialized)t();else{var n=function(){e.calcItemsSizes(),e.isInitialized=!0,t()};this.getRenderedVisibleActionsCount()<this.model.visibleActions.length?this.delayedUpdateFunction?this.delayedUpdateFunction(n):queueMicrotask?queueMicrotask(n):n():n()}}},e.prototype.dispose=function(){this.model.updateCallback=void 0,this.resizeObserver&&this.resizeObserver.disconnect()},e}(),fi=function(e){function t(t,n,r,o,i,s){void 0===i&&(i=40);var a=e.call(this,t,n,r,o,s)||this;return a.minDimensionConst=i,a.recalcMinDimensionConst=!1,a}return hi(t,e),t.prototype.getDimensions=function(){return{scroll:this.container.scrollHeight,offset:this.container.offsetHeight}},t.prototype.getAvailableSpace=function(){var e=this.getComputedStyle(this.container),t=this.container.offsetHeight;return"border-box"===e.boxSizing&&(t-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)),t},t.prototype.calcItemSize=function(e){return e.offsetHeight},t.prototype.calcActionDimensions=function(e,t){e.maxDimension=this.calcItemSize(t),e.minDimension=this.calcItemSize(t)},t}(di);Object(i.checkLibraryVersion)("1.11.4","survey-react-ui")}])}));
6
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("survey-core"),require("react-dom")):"function"==typeof define&&define.amd?define("survey-react-ui",["react","survey-core","react-dom"],t):"object"==typeof exports?exports["survey-react-ui"]=t(require("react"),require("survey-core"),require("react-dom")):e.SurveyReact=t(e.React,e.Survey,e.ReactDOM)}(this,(function(e,t,n){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t,n){"use strict";n.r(t),n.d(t,"Survey",(function(){return Ee})),n.d(t,"attachKey2click",(function(){return we})),n.d(t,"ReactSurveyElementsWrapper",(function(){return a})),n.d(t,"SurveyNavigationBase",(function(){return Pe})),n.d(t,"SurveyTimerPanel",(function(){return Se})),n.d(t,"SurveyPage",(function(){return ue})),n.d(t,"SurveyRow",(function(){return g})),n.d(t,"SurveyPanel",(function(){return _e})),n.d(t,"SurveyFlowPanel",(function(){return Ve})),n.d(t,"SurveyQuestion",(function(){return ne})),n.d(t,"SurveyElementErrors",(function(){return re})),n.d(t,"SurveyQuestionAndErrorsCell",(function(){return ie})),n.d(t,"ReactSurveyElement",(function(){return p})),n.d(t,"SurveyElementBase",(function(){return c})),n.d(t,"SurveyQuestionElementBase",(function(){return h})),n.d(t,"SurveyQuestionCommentItem",(function(){return G})),n.d(t,"SurveyQuestionComment",(function(){return K})),n.d(t,"SurveyQuestionCheckbox",(function(){return Ne})),n.d(t,"SurveyQuestionCheckboxItem",(function(){return Ae})),n.d(t,"SurveyQuestionRanking",(function(){return Re})),n.d(t,"SurveyQuestionRankingItem",(function(){return De})),n.d(t,"SurveyQuestionRankingItemContent",(function(){return Le})),n.d(t,"RatingItem",(function(){return Fe})),n.d(t,"RatingItemStar",(function(){return ze})),n.d(t,"RatingItemSmiley",(function(){return We})),n.d(t,"RatingDropdownItem",(function(){return Qe})),n.d(t,"TagboxFilterString",(function(){return Ke})),n.d(t,"SurveyQuestionOptionItem",(function(){return Ye})),n.d(t,"SurveyQuestionDropdownBase",(function(){return $e})),n.d(t,"SurveyQuestionDropdown",(function(){return et})),n.d(t,"SurveyQuestionTagboxItem",(function(){return nt})),n.d(t,"SurveyQuestionTagbox",(function(){return ot})),n.d(t,"SurveyQuestionDropdownSelect",(function(){return st})),n.d(t,"SurveyQuestionMatrix",(function(){return ut})),n.d(t,"SurveyQuestionMatrixRow",(function(){return lt})),n.d(t,"SurveyQuestionMatrixCell",(function(){return ct})),n.d(t,"SurveyQuestionHtml",(function(){return ht})),n.d(t,"SurveyQuestionFile",(function(){return yt})),n.d(t,"SurveyFileChooseButton",(function(){return vt})),n.d(t,"SurveyFilePreview",(function(){return Ct})),n.d(t,"SurveyQuestionMultipleText",(function(){return wt})),n.d(t,"SurveyQuestionRadiogroup",(function(){return St})),n.d(t,"SurveyQuestionRadioItem",(function(){return xt})),n.d(t,"SurveyQuestionText",(function(){return It})),n.d(t,"SurveyQuestionBoolean",(function(){return Tt})),n.d(t,"SurveyQuestionBooleanCheckbox",(function(){return At})),n.d(t,"SurveyQuestionBooleanRadio",(function(){return Rt})),n.d(t,"SurveyQuestionEmpty",(function(){return Lt})),n.d(t,"SurveyQuestionMatrixDropdownCell",(function(){return Jt})),n.d(t,"SurveyQuestionMatrixDropdownBase",(function(){return Wt})),n.d(t,"SurveyQuestionMatrixDropdown",(function(){return Gt})),n.d(t,"SurveyQuestionMatrixDynamic",(function(){return Zt})),n.d(t,"SurveyQuestionMatrixDynamicAddButton",(function(){return $t})),n.d(t,"SurveyQuestionPanelDynamic",(function(){return cn})),n.d(t,"SurveyProgress",(function(){return dn})),n.d(t,"SurveyProgressButtons",(function(){return mn})),n.d(t,"SurveyProgressToc",(function(){return En})),n.d(t,"SurveyQuestionRating",(function(){return On})),n.d(t,"SurveyQuestionRatingDropdown",(function(){return qn})),n.d(t,"SurveyQuestionExpression",(function(){return xn})),n.d(t,"PopupSurvey",(function(){return In})),n.d(t,"SurveyWindow",(function(){return Vn})),n.d(t,"ReactQuestionFactory",(function(){return W})),n.d(t,"ReactElementFactory",(function(){return s})),n.d(t,"SurveyQuestionImagePicker",(function(){return Nn})),n.d(t,"SurveyQuestionImage",(function(){return Rn})),n.d(t,"SurveyQuestionSignaturePad",(function(){return Ln})),n.d(t,"SurveyQuestionButtonGroup",(function(){return Mn})),n.d(t,"SurveyQuestionCustom",(function(){return zn})),n.d(t,"SurveyQuestionComposite",(function(){return Hn})),n.d(t,"Popup",(function(){return V})),n.d(t,"ListItemContent",(function(){return Un})),n.d(t,"ListItemGroup",(function(){return Jn})),n.d(t,"List",(function(){return bn})),n.d(t,"TitleActions",(function(){return B})),n.d(t,"TitleElement",(function(){return H})),n.d(t,"SurveyActionBar",(function(){return L})),n.d(t,"LogoImage",(function(){return Gn})),n.d(t,"SurveyHeader",(function(){return ce})),n.d(t,"SvgIcon",(function(){return E})),n.d(t,"SurveyQuestionMatrixDynamicRemoveButton",(function(){return Zn})),n.d(t,"SurveyQuestionMatrixDetailButton",(function(){return Xn})),n.d(t,"SurveyQuestionMatrixDynamicDragDropIcon",(function(){return Bt})),n.d(t,"SurveyQuestionPanelDynamicAddButton",(function(){return tn})),n.d(t,"SurveyQuestionPanelDynamicRemoveButton",(function(){return tr})),n.d(t,"SurveyQuestionPanelDynamicPrevButton",(function(){return sn})),n.d(t,"SurveyQuestionPanelDynamicNextButton",(function(){return rn})),n.d(t,"SurveyQuestionPanelDynamicProgressText",(function(){return un})),n.d(t,"SurveyNavigationButton",(function(){return rr})),n.d(t,"QuestionErrorComponent",(function(){return ar})),n.d(t,"MatrixRow",(function(){return Mt})),n.d(t,"Skeleton",(function(){return lr})),n.d(t,"NotifierComponent",(function(){return fe})),n.d(t,"ComponentsContainer",(function(){return ye})),n.d(t,"CharacterCounterComponent",(function(){return Q})),n.d(t,"HeaderMobile",(function(){return pr})),n.d(t,"HeaderCell",(function(){return hr})),n.d(t,"Header",(function(){return dr})),n.d(t,"SurveyLocStringViewer",(function(){return ir})),n.d(t,"SurveyLocStringEditor",(function(){return mr})),n.d(t,"LoadingIndicatorComponent",(function(){return ft})),n.d(t,"SvgBundleComponent",(function(){return ve})),n.d(t,"SurveyModel",(function(){return i.SurveyModel})),n.d(t,"SurveyWindowModel",(function(){return i.SurveyWindowModel})),n.d(t,"settings",(function(){return i.settings})),n.d(t,"surveyLocalization",(function(){return i.surveyLocalization})),n.d(t,"surveyStrings",(function(){return i.surveyStrings})),n.d(t,"Model",(function(){return i.SurveyModel})),n.d(t,"ResponsivityManager",(function(){return di})),n.d(t,"VerticalResponsivityManager",(function(){return fi})),n.d(t,"unwrap",(function(){return pi}));var r=n(0),o=n.n(r),i=n(1),s=function(){function e(){this.creatorHash={}}return e.prototype.registerElement=function(e,t){this.creatorHash[e]=t},e.prototype.getAllTypes=function(){var e=new Array;for(var t in this.creatorHash)e.push(t);return e.sort()},e.prototype.isElementRegistered=function(e){return!!this.creatorHash[e]},e.prototype.createElement=function(e,t){var n=this.creatorHash[e];return null==n?null:n(t)},e.Instance=new e,e}(),a=function(){function e(){}return e.wrapRow=function(e,t,n){var r=e.getRowWrapperComponentName(n),o=e.getRowWrapperComponentData(n);return s.Instance.createElement(r,{element:t,row:n,componentData:o})},e.wrapElement=function(e,t,n){var r=e.getElementWrapperComponentName(n),o=e.getElementWrapperComponentData(n);return s.Instance.createElement(r,{element:t,question:n,componentData:o})},e.wrapQuestionContent=function(e,t,n){var r=e.getQuestionContentWrapperComponentName(n),o=e.getElementWrapperComponentData(n);return s.Instance.createElement(r,{element:t,question:n,componentData:o})},e.wrapItemValue=function(e,t,n,r){var o=e.getItemValueWrapperComponentName(r,n),i=e.getItemValueWrapperComponentData(r,n);return s.Instance.createElement(o,{key:null==t?void 0:t.key,element:t,question:n,item:r,componentData:i})},e.wrapMatrixCell=function(e,t,n,r){void 0===r&&(r="cell");var o=e.getElementWrapperComponentName(n,r),i=e.getElementWrapperComponentData(n,r);return s.Instance.createElement(o,{element:t,cell:n,componentData:i})},e}();i.SurveyModel.platform="react";var u,l=(u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(e){function t(t){var n=e.call(this,t)||this;return n._allowComponentUpdate=!0,n}return l(t,e),t.renderLocString=function(e,t,n){return void 0===t&&(t=null),s.Instance.createElement(e.renderAs,{locStr:e.renderAsData,style:t,key:n})},t.renderQuestionDescription=function(e){var n=t.renderLocString(e.locDescription);return r.createElement("div",{style:e.hasDescription?void 0:{display:"none"},id:e.ariaDescriptionId,className:e.cssDescription},n)},t.prototype.componentDidMount=function(){this.makeBaseElementsReact()},t.prototype.componentWillUnmount=function(){this.unMakeBaseElementsReact()},t.prototype.componentDidUpdate=function(e,t){this.makeBaseElementsReact(),this.getStateElements().forEach((function(e){e.afterRerender()}))},t.prototype.allowComponentUpdate=function(){this._allowComponentUpdate=!0,this.forceUpdate()},t.prototype.denyComponentUpdate=function(){this._allowComponentUpdate=!1},t.prototype.shouldComponentUpdate=function(e,t){return this._allowComponentUpdate&&this.unMakeBaseElementsReact(),this._allowComponentUpdate},t.prototype.render=function(){if(!this.canRender())return null;this.startEndRendering(1);var e=this.renderElement();return this.startEndRendering(-1),e&&(e=this.wrapElement(e)),this.changedStatePropNameValue=void 0,e},t.prototype.wrapElement=function(e){return e},Object.defineProperty(t.prototype,"isRendering",{get:function(){for(var e=0,t=this.getRenderedElements();e<t.length;e++){if(t[e].reactRendering>0)return!0}return!1},enumerable:!1,configurable:!0}),t.prototype.getRenderedElements=function(){return this.getStateElements()},t.prototype.startEndRendering=function(e){for(var t=0,n=this.getRenderedElements();t<n.length;t++){var r=n[t];r.reactRendering||(r.reactRendering=0),r.reactRendering+=e}},t.prototype.canRender=function(){return!0},t.prototype.renderElement=function(){return null},Object.defineProperty(t.prototype,"changedStatePropName",{get:function(){return this.changedStatePropNameValue},enumerable:!1,configurable:!0}),t.prototype.makeBaseElementsReact=function(){for(var e=this.getStateElements(),t=0;t<e.length;t++)e[t].enableOnElementRenderedEvent(),this.makeBaseElementReact(e[t])},t.prototype.unMakeBaseElementsReact=function(){for(var e=this.getStateElements(),t=0;t<e.length;t++)e[t].disableOnElementRenderedEvent(),this.unMakeBaseElementReact(e[t])},t.prototype.getStateElements=function(){var e=this.getStateElement();return e?[e]:[]},t.prototype.getStateElement=function(){return null},Object.defineProperty(t.prototype,"isDisplayMode",{get:function(){return this.props.isDisplayMode||!1},enumerable:!1,configurable:!0}),t.prototype.renderLocString=function(e,n,r){return void 0===n&&(n=null),t.renderLocString(e,n,r)},t.prototype.canMakeReact=function(e){return!!e&&!!e.iteratePropertiesHash},t.prototype.makeBaseElementReact=function(e){var t=this;this.canMakeReact(e)&&(e.iteratePropertiesHash((function(e,n){if(t.canUsePropInState(n)){var r=e[n];if(Array.isArray(r))(r=r).onArrayChanged=function(e){t.isRendering||(t.changedStatePropNameValue=n,t.setState((function(e){var t={};return t[n]=r,t})))}}})),e.setPropertyValueCoreHandler=function(e,n,r){if(e[n]!==r){if(e[n]=r,!t.canUsePropInState(n))return;if(t.isRendering)return;t.changedStatePropNameValue=n,t.setState((function(e){var t={};return t[n]=r,t}))}})},t.prototype.canUsePropInState=function(e){return!0},t.prototype.unMakeBaseElementReact=function(e){this.canMakeReact(e)&&(e.setPropertyValueCoreHandler=void 0,e.iteratePropertiesHash((function(e,t){var n=e[t];Array.isArray(n)&&((n=n).onArrayChanged=function(){})})))},t}(r.Component),p=function(e){function t(t){return e.call(this,t)||this}return l(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),t}(c),h=function(e){function t(t){return e.call(this,t)||this}return l(t,e),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateDomElement()},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.updateDomElement()},t.prototype.componentWillUnmount=function(){if(e.prototype.componentWillUnmount.call(this),this.questionBase){var t=this.control;this.questionBase.beforeDestroyQuestionElement(t),t&&t.removeAttribute("data-rendered")}},t.prototype.updateDomElement=function(){var e=this.control;e&&"r"!==e.getAttribute("data-rendered")&&(e.setAttribute("data-rendered","r"),this.questionBase.afterRenderQuestionElement(e))},Object.defineProperty(t.prototype,"questionBase",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.getRenderedElements=function(){return[this.questionBase]},Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.questionBase&&!!this.creator},t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&!(this.questionBase.customWidget&&!this.questionBase.customWidgetData.isNeedRender&&!this.questionBase.customWidget.widgetJson.isDefaultRender&&!this.questionBase.customWidget.widgetJson.render)},Object.defineProperty(t.prototype,"isDisplayMode",{get:function(){return this.props.isDisplayMode||!!this.questionBase&&this.questionBase.isInputReadOnly||!1},enumerable:!1,configurable:!0}),t.prototype.wrapCell=function(e,t,n){if(!n)return t;var r=this.questionBase.survey,o=null;return r&&(o=a.wrapMatrixCell(r,t,e,n)),null!=o?o:t},t.prototype.setControl=function(e){e&&(this.control=e)},t}(c),d=function(e){function t(t){var n=e.call(this,t)||this;return n.updateValueOnEvent=function(e){i.Helpers.isTwoValueEquals(n.questionBase.value,e.target.value,!1,!0,!1)||n.setValueCore(e.target.value)},n.updateValueOnEvent=n.updateValueOnEvent.bind(n),n}return l(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.setValueCore=function(e){this.questionBase.value=e},t.prototype.getValueCore=function(){return this.questionBase.value},t.prototype.updateDomElement=function(){if(this.control){var t=this.control,n=this.getValueCore();i.Helpers.isTwoValueEquals(n,t.value,!1,!0,!1)||(t.value=this.getValue(n))}e.prototype.updateDomElement.call(this)},t.prototype.getValue=function(e){return i.Helpers.isValueEmpty(e)?"":e},t}(h),f=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),m=function(e){function t(t){var n=e.call(this,t)||this;return n.element.cssClasses,n.rootRef=r.createRef(),n}return f(t,e),t.prototype.getStateElement=function(){return this.element},Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.row},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.props.css},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.rootRef.current&&this.element.setWrapperElement(this.rootRef.current)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.element.setWrapperElement(void 0)},t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(t.element!==this.element&&(t.element&&t.element.setWrapperElement(this.rootRef.current),this.element&&this.element.setWrapperElement(void 0)),this.element.cssClasses,!0)},t.prototype.renderElement=function(){var e=this.element,t=this.createElement(e,this.index),n=e.cssClassesValue;return r.createElement("div",{className:n.questionWrapper,style:e.rootStyle,"data-key":t.key,key:t.key,onFocus:function(){var t=e;t&&t.isQuestion&&t.focusIn()},ref:this.rootRef},this.row.isNeedRender?t:s.Instance.createElement(e.skeletonComponentName,{element:e,css:this.css}))},t.prototype.createElement=function(e,t){var n=t?"-"+t:0,r=e.getType();return s.Instance.isElementRegistered(r)||(r="question"),s.Instance.createElement(r,{key:e.name+n,element:e,creator:this.creator,survey:this.survey,css:this.css})},t}(c),y=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),g=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=r.createRef(),n.recalculateCss(),n}return y(t,e),t.prototype.recalculateCss=function(){this.row.visibleElements.map((function(e){return e.cssClasses}))},t.prototype.getStateElement=function(){return this.row},Object.defineProperty(t.prototype,"row",{get:function(){return this.props.row},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.props.css},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.row&&!!this.survey&&!!this.creator},t.prototype.renderElementContent=function(){var e=this,t=this.row.visibleElements.map((function(t,n){var o=n?"-"+n:0,i=t.name+o;return r.createElement(m,{element:t,index:n,row:e.row,survey:e.survey,creator:e.creator,css:e.css,key:i})}));return r.createElement("div",{ref:this.rootRef,className:this.row.getRowCss()},t)},t.prototype.renderElement=function(){var e=this.survey,t=this.renderElementContent();return a.wrapRow(e,t,this.row)||t},t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this);var n=this.rootRef.current;if(this.rootRef.current&&this.row.setRootElement(this.rootRef.current),n&&!this.row.isNeedRender){var r=n;setTimeout((function(){t.row.startLazyRendering(r)}),10)}},t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(t.row!==this.row&&(t.row.isNeedRender=this.row.isNeedRender,t.row.setRootElement(this.rootRef.current),this.row.setRootElement(void 0),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.row.setRootElement(void 0),this.stopLazyRendering()},t.prototype.createElement=function(e,t){var n=t?"-"+t:0,r=e.getType();return s.Instance.isElementRegistered(r)||(r="question"),s.Instance.createElement(r,{key:e.name+n,element:e,creator:this.creator,survey:this.survey,css:this.css})},t}(c),v=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),b=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=r.createRef(),n}return v(t,e),t.prototype.getStateElement=function(){return this.panelBase},t.prototype.canUsePropInState=function(t){return"elements"!==t&&e.prototype.canUsePropInState.call(this,t)},Object.defineProperty(t.prototype,"survey",{get:function(){return this.getSurvey()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.getCss()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panelBase",{get:function(){return this.getPanelBase()},enumerable:!1,configurable:!0}),t.prototype.getPanelBase=function(){return this.props.element||this.props.question},t.prototype.getSurvey=function(){return this.props.survey||(this.panelBase?this.panelBase.survey:null)},t.prototype.getCss=function(){return this.props.css},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.doAfterRender()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this);var t=this.rootRef.current;t&&t.removeAttribute("data-rendered")},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),t.page&&this.survey&&this.survey.activePage&&t.page.id===this.survey.activePage.id||this.doAfterRender()},t.prototype.doAfterRender=function(){var e=this.rootRef.current;e&&this.survey&&(this.panelBase.isPanel?this.survey.afterRenderPanel(this.panelBase,e):this.survey.afterRenderPage(e))},t.prototype.getIsVisible=function(){return this.panelBase.isVisible},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&!!this.survey&&!!this.panelBase&&!!this.panelBase.survey&&this.getIsVisible()},t.prototype.renderRows=function(e){var t=this;return this.panelBase.visibleRows.map((function(n){return t.createRow(n,e)}))},t.prototype.createRow=function(e,t){return r.createElement(g,{key:e.id,row:e,survey:this.survey,creator:this.creator,css:t})},t}(c),C=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),E=function(e){function t(t){var n=e.call(this,t)||this;return n.svgIconRef=o.a.createRef(),n}return C(t,e),t.prototype.updateSvg=function(){this.props.iconName&&Object(i.createSvg)(this.props.size,this.props.width,this.props.height,this.props.iconName,this.svgIconRef.current,this.props.title)},t.prototype.componentDidUpdate=function(){this.updateSvg()},t.prototype.render=function(){var e="sv-svg-icon";return this.props.className&&(e+=" "+this.props.className),this.props.iconName?o.a.createElement("svg",{className:e,style:this.props.style,onClick:this.props.onClick,ref:this.svgIconRef,role:"img"},o.a.createElement("use",null)):null},t.prototype.componentDidMount=function(){this.updateSvg()},t}(o.a.Component);s.Instance.registerElement("sv-svg-icon",(function(e){return o.a.createElement(E,e)}));var 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 "+this.props.cssClasses;return o.a.createElement("div",{className:e})},t}(o.a.Component);s.Instance.registerElement("sv-action-bar-separator",(function(e){return o.a.createElement(O,e)}));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)}}(),q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return P(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){var e=this.item.getActionRootCss(),t=this.item.needSeparator?o.a.createElement(O,null):null,n=s.Instance.createElement(this.item.component||"sv-action-bar-item",{item:this.item});return o.a.createElement("div",{className:e,id:this.item.id},o.a.createElement("div",{className:"sv-action__content"},t,n))},t}(c),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return P(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){return o.a.createElement(o.a.Fragment,null,this.renderInnerButton())},t.prototype.renderText=function(){if(!this.item.hasTitle)return null;var e=this.item.getActionBarItemTitleCss();return o.a.createElement("span",{className:e},this.item.title)},t.prototype.renderButtonContent=function(){var e=this.renderText(),t=this.item.iconName?o.a.createElement(E,{className:this.item.cssClasses.itemIcon,size:this.item.iconSize,iconName:this.item.iconName,title:this.item.tooltip||this.item.title}):null;return o.a.createElement(o.a.Fragment,null,t,e)},t.prototype.renderInnerButton=function(){var e=this,t=this.item.getActionBarItemCss(),n=this.item.tooltip||this.item.title,r=this.renderButtonContent(),i=this.item.disableTabStop?-1:void 0;return we(o.a.createElement("button",{className:t,type:"button",disabled:this.item.disabled,onMouseDown:function(){return e.item.doMouseDown()},onFocus:function(t){return e.item.doFocus(t)},onClick:function(t){return e.item.doAction(t)},title:n,tabIndex:i,"aria-checked":this.item.ariaChecked,"aria-expanded":this.item.ariaExpanded,role:this.item.ariaRole},r),this.item,{processEsc:!1})},t}(c);s.Instance.registerElement("sv-action-bar-item",(function(e){return o.a.createElement(S,e)}));var x=n(2),_=n.n(x),I=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a 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.containerRef=o.a.createRef(),n.createModel(),n}return I(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.createModel=function(){this.popup=Object(i.createPopupViewModel)(this.props.model,void 0)},t.prototype.setTargetElement=function(){var e=this.containerRef.current;this.popup.setComponentElement(e,this.props.getTarget?this.props.getTarget(e):void 0,this.props.getArea?this.props.getArea(e):void 0)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.setTargetElement()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.setTargetElement()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.popup.resetComponentElement()},t.prototype.shouldComponentUpdate=function(t,n){var r;if(!e.prototype.shouldComponentUpdate.call(this,t,n))return!1;var o=t.model!==this.popup.model;return o&&(null===(r=this.popup)||void 0===r||r.dispose(),this.createModel()),o},t.prototype.render=function(){var e;return this.popup.model=this.model,e=this.model.isModal?o.a.createElement(T,{model:this.popup}):o.a.createElement(N,{model:this.popup}),o.a.createElement("div",{ref:this.containerRef},e)},t}(c);s.Instance.registerElement("sv-popup",(function(e){return o.a.createElement(V,e)}));var T=function(e){function t(t){var n=e.call(this,t)||this;return n.handleKeydown=function(e){n.model.onKeyDown(e)},n.clickInside=function(e){e.stopPropagation()},n}return I(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.model.isPositionSet&&this.model.isVisible&&this.model.updateOnShowing()},t.prototype.renderContainer=function(e){var t=this,n=e.showHeader?this.renderHeaderPopup(e):null,r=e.title?this.renderHeaderContent():null,i=this.renderContent(),s=e.showFooter?this.renderFooter(this.model):null;return o.a.createElement("div",{className:"sv-popup__container",style:{left:e.left,top:e.top,height:e.height,width:e.width,minWidth:e.minWidth},onClick:function(e){t.clickInside(e)}},o.a.createElement("div",{className:"sv-popup__shadow"},n,o.a.createElement("div",{className:"sv-popup__body-content"},r,o.a.createElement("div",{className:"sv-popup__scrolling-content"},i),s)))},t.prototype.renderHeaderContent=function(){return o.a.createElement("div",{className:"sv-popup__body-header"},this.model.title)},t.prototype.renderContent=function(){var e=s.Instance.createElement(this.model.contentComponentName,this.model.contentComponentData);return o.a.createElement("div",{className:"sv-popup__content"},e)},t.prototype.renderHeaderPopup=function(e){return null},t.prototype.renderFooter=function(e){return o.a.createElement("div",{className:"sv-popup__body-footer"},o.a.createElement(L,{model:e.footerToolbar}))},t.prototype.render=function(){var e=this,t=this.renderContainer(this.model),n=(new i.CssClassBuilder).append("sv-popup").append(this.model.styleClass).toString(),r={display:this.model.isVisible?"":"none"};return o.a.createElement("div",{tabIndex:-1,className:n,style:r,onClick:function(t){e.model.clickOutside(t)},onKeyDown:this.handleKeydown},t)},t}(c),N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return I(t,e),t.prototype.renderHeaderPopup=function(e){var t=e;return t?o.a.createElement("span",{style:{left:t.pointerTarget.left,top:t.pointerTarget.top},className:"sv-popup__pointer"}):null},t}(T);function A(e,t){var n=Object(i.createPopupModalViewModel)(e,t);return n.onVisibilityChanged.add((function(e,t){t.isVisible||(_.a.unmountComponentAtNode(n.container),n.dispose())})),_.a.render(o.a.createElement(T,{model:n}),n.container),n.model.isVisible=!0,n}i.settings.showModal=function(e,t,n,r,o,s,a){return void 0===a&&(a="popup"),A(Object(i.createDialogOptions)(e,t,n,r,void 0,void 0,o,s,a))},i.settings.showDialog=A;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)}}(),R=function(e){function t(t){var n=e.call(this,t)||this;return n.viewModel=new i.ActionDropdownViewModel(n.item),n}return j(t,e),t.prototype.renderInnerButton=function(){var t=e.prototype.renderInnerButton.call(this);return o.a.createElement(o.a.Fragment,null,t,o.a.createElement(V,{model:this.item.popupModel,getTarget:i.getActionDropdownButtonTarget}))},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.viewModel.dispose()},t}(S);s.Instance.registerElement("sv-action-bar-item-dropdown",(function(e){return o.a.createElement(R,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)}}(),L=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=o.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;t&&this.model.initResponsivityManager(t,(function(e){setTimeout(e)}))}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model.hasActions&&this.model.resetResponsivityManager()},t.prototype.componentDidUpdate=function(t,n){if(e.prototype.componentDidUpdate.call(this,t,n),t.model!=this.props.model&&this.model.hasActions){this.model.resetResponsivityManager();var r=this.rootRef.current;r&&this.model.initResponsivityManager(r,(function(e){setTimeout(e)}))}},t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){if(!this.model.hasActions)return null;var e=this.renderItems();return o.a.createElement("div",{ref:this.rootRef,className:this.model.getRootCss(),onClick:this.handleClick?function(e){e.stopPropagation()}:void 0},e)},t.prototype.renderItems=function(){return this.model.renderedActions.map((function(e,t){return o.a.createElement(q,{item:e,key:"item"+t})}))},t}(c);s.Instance.registerElement("sv-action-bar",(function(e){return o.a.createElement(L,e)}));var k=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),M=function(e){function t(t){return e.call(this,t)||this}return k(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){if(this.element.isTitleRenderedAsString)return c.renderLocString(this.element.locTitle);var e=this.renderTitleSpans(this.element.getTitleOwner(),this.cssClasses);return o.a.createElement(o.a.Fragment,null,e)},t.prototype.renderTitleSpans=function(e,t){var n=function(e){return o.a.createElement("span",{"data-key":e,key:e}," ")},r=[];e.isRequireTextOnStart&&(r.push(this.renderRequireText(e,t)),r.push(n("req-sp")));var i=e.no;if(i){var s=t.panel?t.panel.number:void 0;r.push(o.a.createElement("span",{"data-key":"q_num",key:"q_num",className:t.number||s,style:{position:"static"},"aria-hidden":!0},i)),r.push(n("num-sp"))}return e.isRequireTextBeforeTitle&&(r.push(this.renderRequireText(e,t)),r.push(n("req-sp"))),r.push(c.renderLocString(e.locTitle,null,"q_title")),e.isRequireTextAfterTitle&&(r.push(n("req-sp")),r.push(this.renderRequireText(e,t))),r},t.prototype.renderRequireText=function(e,t){return o.a.createElement("span",{"data-key":"req-text",key:"req-text",className:t.requiredText||t.panel.requiredText,"aria-hidden":!0},e.requiredText)},t}(o.a.Component),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)}}(),B=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return F(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=o.a.createElement(M,{element:this.element,cssClasses:this.cssClasses});return this.element.hasTitleActions?o.a.createElement("div",{className:"sv-title-actions"},o.a.createElement("span",{className:"sv-title-actions__title"},e),o.a.createElement(L,{model:this.element.getTitleToolbar()})):e},t}(o.a.Component);i.RendererFactory.Instance.registerRenderer("element","title-actions","sv-title-actions"),s.Instance.registerElement("sv-title-actions",(function(e){return o.a.createElement(B,e)}));var z=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),H=function(e){function t(t){return e.call(this,t)||this}return z(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.element;if(!e||!e.hasTitle)return null;var t=e.titleAriaLabel||void 0,n=o.a.createElement(B,{element:e,cssClasses:e.cssClasses}),r=void 0;e.hasTitleEvents&&(r=function(e){Object(i.doKey2ClickUp)(e.nativeEvent)});var s=e.titleTagName;return o.a.createElement(s,{className:e.cssTitle,id:e.ariaTitleId,"aria-label":t,tabIndex:e.titleTabIndex,"aria-expanded":e.titleAriaExpanded,role:e.titleAriaRole,onClick:void 0,onKeyUp:r},n)},t}(o.a.Component),W=function(){function e(){this.creatorHash={}}return e.prototype.registerQuestion=function(e,t){this.creatorHash[e]=t},e.prototype.getAllTypes=function(){var e=new Array;for(var t in this.creatorHash)e.push(t);return e.sort()},e.prototype.createQuestion=function(e,t){var n=this.creatorHash[e];return null==n?null:n(t)},e.Instance=new e,e}(),U=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getStateElement=function(){return this.props.counter},t.prototype.renderElement=function(){return o.a.createElement("div",{className:this.props.remainingCharacterCounter},this.props.counter.remainingCharacterCounter)},t}(c);s.Instance.registerElement("sv-character-counter",(function(e){return o.a.createElement(Q,e)}));var J=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),K=function(e){function t(t){return e.call(this,t)||this}return J(t,e),t.prototype.renderElement=function(){var e=this,t=this.question.isInputTextUpdate?void 0:this.updateValueOnEvent,n=this.question.renderedPlaceholder;if(this.question.isReadOnlyRenderDiv())return r.createElement("div",null,this.question.value);var o=this.question.getMaxLength()?r.createElement(Q,{counter:this.question.characterCounter,remainingCharacterCounter:this.question.cssClasses.remainingCharacterCounter}):null;return r.createElement(r.Fragment,null,r.createElement("textarea",{id:this.question.inputId,className:this.question.className,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,ref:function(t){return e.setControl(t)},maxLength:this.question.getMaxLength(),placeholder:n,onBlur:t,onInput:function(t){e.question.isInputTextUpdate?e.updateValueOnEvent(t):e.question.updateElement();var n=t.target.value;e.question.updateRemainingCharacterCounter(n)},onKeyDown:function(t){e.question.onKeyDown(t)},cols:this.question.cols,rows:this.question.rows,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage,style:{resize:this.question.resizeStyle}}),o)},t}(d),G=function(e){function t(t){var n=e.call(this,t)||this;return n.state={comment:n.getComment()||""},n}return J(t,e),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateDomElement()},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.updateDomElement()},t.prototype.updateDomElement=function(){if(this.control){var e=this.control,t=this.getComment()||"";i.Helpers.isTwoValueEquals(t,e.value,!1,!0,!1)||(e.value=t)}},t.prototype.setControl=function(e){e&&(this.control=e)},t.prototype.canRender=function(){return!!this.props.question},t.prototype.onCommentChange=function(e){this.props.question.onCommentChange(e)},t.prototype.onCommentInput=function(e){this.props.question.onCommentInput(e)},t.prototype.getComment=function(){return this.props.question.comment},t.prototype.setComment=function(e){this.props.question.comment=e},t.prototype.getId=function(){return this.props.question.commentId},t.prototype.getPlaceholder=function(){return this.props.question.renderedCommentPlaceholder},t.prototype.renderElement=function(){var e=this,t=this.props.question,n=this.props.otherCss||this.cssClasses.comment;if(t.isReadOnlyRenderDiv()){var o=this.getComment()||"";return r.createElement("div",null,o)}return r.createElement("textarea",{id:this.getId(),className:n,ref:function(t){return e.setControl(t)},disabled:this.isDisplayMode,maxLength:t.getOthersMaxLength(),rows:t.commentAreaRows,placeholder:this.getPlaceholder(),onBlur:function(t){e.onCommentChange(t)},onInput:function(t){return e.onCommentInput(t)},"aria-required":t.isRequired||t.a11y_input_ariaRequired,"aria-label":t.ariaLabel||t.a11y_input_ariaLabel,style:{resize:t.resizeStyle}})},t}(p),Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return J(t,e),t.prototype.onCommentChange=function(e){this.props.question.onOtherValueChange(e)},t.prototype.onCommentInput=function(e){this.props.question.onOtherValueInput(e)},t.prototype.getComment=function(){return this.props.question.otherValue},t.prototype.setComment=function(e){this.props.question.otherValue=e},t.prototype.getId=function(){return this.props.question.otherId},t.prototype.getPlaceholder=function(){return this.props.question.otherPlaceholder},t}(G);W.Instance.registerQuestion("comment",(function(e){return r.createElement(K,e)}));var Z=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$=function(e){function t(t){var n=e.call(this,t)||this;return n.widgetRef=r.createRef(),n}return Z(t,e),t.prototype._afterRender=function(){if(this.questionBase.customWidget){var e=this.widgetRef.current;e&&(this.questionBase.customWidget.afterRender(this.questionBase,e),this.questionBase.customWidgetData.isNeedRender=!1)}},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.questionBase&&this._afterRender()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n);var r=!!this.questionBase.customWidget&&this.questionBase.customWidget.isDefaultRender;this.questionBase&&!r&&this._afterRender()},t.prototype.componentWillUnmount=function(){if(e.prototype.componentWillUnmount.call(this),this.questionBase.customWidget){var t=this.widgetRef.current;t&&this.questionBase.customWidget.willUnmount(this.questionBase,t)}},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&this.questionBase.visible},t.prototype.renderElement=function(){var e=this.questionBase.customWidget;if(e.isDefaultRender)return r.createElement("div",{ref:this.widgetRef},this.creator.createQuestionElement(this.questionBase));var t=null;if(e.widgetJson.render)t=e.widgetJson.render(this.questionBase);else if(e.htmlTemplate){var n={__html:e.htmlTemplate};return r.createElement("div",{ref:this.widgetRef,dangerouslySetInnerHTML:n})}return r.createElement("div",{ref:this.widgetRef},t)},t}(h),X=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return X(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.element,t=e.hasTitle?o.a.createElement(H,{element:e}):null,n=e.hasDescriptionUnderTitle?c.renderQuestionDescription(this.element):null,r=e.hasAdditionalTitleToolbar?o.a.createElement(L,{model:e.additionalTitleToolbar}):null,s={width:void 0};return e instanceof i.Question&&(s.width=e.titleWidth),o.a.createElement("div",{className:e.cssHeader,onClick:function(t){return e.clickTitleFunction&&e.clickTitleFunction(t.nativeEvent)},style:s},t,n,r)},t}(o.a.Component),te=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ne=function(e){function t(t){var n=e.call(this,t)||this;return n.isNeedFocus=!1,n.rootRef=r.createRef(),n}return te(t,e),t.renderQuestionBody=function(e,t){return t.customWidget?r.createElement($,{creator:e,question:t}):e.createQuestionElement(t)},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},t.prototype.renderQuestionContent=function(){var e=this.question,t={display:this.question.renderedIsExpanded?"":"none"},n=e.cssClasses,o=this.renderQuestion(),i=this.question.showErrorOnTop?this.renderErrors(n,"top"):null,s=this.question.showErrorOnBottom?this.renderErrors(n,"bottom"):null,a=e&&e.hasComment?this.renderComment(n):null,u=e.hasDescriptionUnderInput?this.renderDescription():null;return r.createElement("div",{className:e.cssContent||void 0,style:t,role:"presentation"},i,o,a,s,u)},t.prototype.renderElement=function(){var e=this.question,t=e.cssClasses,n=this.renderHeader(e),o=e.hasTitleOnLeftTop?n:null,i=e.hasTitleOnBottom?n:null,s=this.question.showErrorsAboveQuestion?this.renderErrors(t,""):null,a=this.question.showErrorsBelowQuestion?this.renderErrors(t,""):null,u=e.getRootStyle(),l=this.wrapQuestionContent(this.renderQuestionContent());return r.createElement(r.Fragment,null,r.createElement("div",{ref:this.rootRef,id:e.id,className:e.getRootCss(),style:u,role:e.ariaRole,"aria-required":this.question.ariaRequired,"aria-invalid":this.question.ariaInvalid,"aria-labelledby":e.ariaLabelledBy,"aria-describedby":e.ariaDescribedBy,"aria-expanded":null===e.ariaExpanded?void 0:"true"===e.ariaExpanded},s,o,l,i,a))},t.prototype.wrapElement=function(e){var t=this.question.survey,n=null;return t&&(n=a.wrapElement(t,e,this.question)),null!=n?n:e},t.prototype.wrapQuestionContent=function(e){var t=this.question.survey,n=null;return t&&(n=a.wrapQuestionContent(t,e,this.question)),null!=n?n:e},t.prototype.renderQuestion=function(){return t.renderQuestionBody(this.creator,this.question)},t.prototype.renderDescription=function(){return c.renderQuestionDescription(this.question)},t.prototype.renderComment=function(e){var t=c.renderLocString(this.question.locCommentText);return r.createElement("div",{className:this.question.getCommentAreaCss()},r.createElement("div",null,t),r.createElement(G,{question:this.question,cssClasses:e,otherCss:e.other,isDisplayMode:this.question.isInputReadOnly}))},t.prototype.renderHeader=function(e){return r.createElement(ee,{element:e})},t.prototype.renderErrors=function(e,t){return r.createElement(re,{element:this.question,cssClasses:e,creator:this.creator,location:t,id:this.question.id+"_errors"})},t}(c);s.Instance.registerElement("question",(function(e){return r.createElement(ne,e)}));var re=function(e){function t(t){var n=e.call(this,t)||this;return n.state=n.getState(),n}return te(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this.props.element.id+"_errors"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this.props.location},enumerable:!1,configurable:!0}),t.prototype.getState=function(e){return void 0===e&&(e=null),e?{error:e.error+1}:{error:0}},t.prototype.canRender=function(){return!!this.element&&this.element.hasVisibleErrors},t.prototype.componentWillUnmount=function(){},t.prototype.renderElement=function(){for(var e=[],t=0;t<this.element.errors.length;t++){var n="error"+t;e.push(this.creator.renderError(n,this.element.errors[t],this.cssClasses,this.element))}return r.createElement("div",{role:"alert","aria-live":"polite",className:this.element.cssError,id:this.id},e)},t}(p),oe=function(e){function t(t){return e.call(this,t)||this}return te(t,e),t.prototype.getStateElement=function(){return this.question},Object.defineProperty(t.prototype,"question",{get:function(){return this.getQuestion()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.getQuestion=function(){return this.props.question},Object.defineProperty(t.prototype,"itemCss",{get:function(){return this.props.itemCss},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.doAfterRender()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.doAfterRender()},t.prototype.doAfterRender=function(){},t.prototype.canRender=function(){return!!this.question},t.prototype.renderContent=function(){var e=this.renderQuestion();return r.createElement(r.Fragment,null,e)},t.prototype.getShowErrors=function(){return this.question.isVisible},t.prototype.renderQuestion=function(){return ne.renderQuestionBody(this.creator,this.question)},t}(p),ie=function(e){function t(t){var n=e.call(this,t)||this;return n.cellRef=r.createRef(),n}return te(t,e),t.prototype.componentWillUnmount=function(){if(e.prototype.componentWillUnmount.call(this),this.question){var t=this.cellRef.current;t&&t.removeAttribute("data-rendered")}},t.prototype.renderCellContent=function(){return r.createElement("div",{className:this.props.cell.cellQuestionWrapperClassName},this.renderQuestion())},t.prototype.renderElement=function(){var e=this.getCellStyle(),t=this.props.cell;return r.createElement("td",{ref:this.cellRef,className:this.itemCss,colSpan:t.colSpans,title:t.getTitle(),style:e,onFocus:function(){t.focusIn()}},this.wrapCell(this.props.cell,this.renderCellContent()))},t.prototype.getCellStyle=function(){return null},t.prototype.getHeaderText=function(){return""},t.prototype.wrapCell=function(e,t){if(!e)return t;var n=this.question.survey,r=null;return n&&(r=a.wrapMatrixCell(n,t,e,this.props.reason)),null!=r?r:t},t}(oe),se=function(e){function t(t){var n=e.call(this,t)||this;return n.state={changed:0},n.question&&n.registerCallback(n.question),n}return te(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.update=function(){this.setState({changed:this.state.changed+1})},t.prototype.registerCallback=function(e){var t=this;e.registerFunctionOnPropertyValueChanged("errors",(function(){t.update()}),"__reactSubscription")},t.prototype.unRegisterCallback=function(e){e.unRegisterFunctionOnPropertyValueChanged("errors","__reactSubscription")},t.prototype.componentDidUpdate=function(e){e.question&&e.question!==this.question&&this.unRegisterCallback(e.cell),this.question&&this.registerCallback(this.question)},t.prototype.componentWillUnmount=function(){this.question&&this.unRegisterCallback(this.question)},t.prototype.render=function(){return r.createElement(re,{element:this.question,creator:this.props.creator,cssClasses:this.question.cssClasses})},t}(r.Component),ae=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ue=function(e){function t(t){return e.call(this,t)||this}return ae(t,e),t.prototype.getPanelBase=function(){return this.props.page},Object.defineProperty(t.prototype,"page",{get:function(){return this.panelBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this.renderTitle(),t=this.renderDescription(),n=this.renderRows(this.panelBase.cssClasses),o=r.createElement(re,{element:this.panelBase,cssClasses:this.panelBase.cssClasses,creator:this.creator});return r.createElement("div",{ref:this.rootRef,className:this.page.cssRoot},e,t,o,n)},t.prototype.renderTitle=function(){return r.createElement(H,{element:this.page})},t.prototype.renderDescription=function(){if(!this.page._showDescription)return null;var e=c.renderLocString(this.page.locDescription);return r.createElement("div",{className:this.panelBase.cssClasses.page.description},e)},t}(b),le=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ce=function(e){function t(t){var n=e.call(this,t)||this;return n.state={changed:0},n.rootRef=o.a.createRef(),n}return le(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.survey.css},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var e=this;this.survey.afterRenderHeader(this.rootRef.current),this.survey.locLogo.onChanged=function(){e.setState({changed:e.state.changed+1})}},t.prototype.componentWillUnmount=function(){this.survey.locLogo.onChanged=function(){}},t.prototype.renderTitle=function(){if(!this.survey.renderedHasTitle)return null;var e=c.renderLocString(this.survey.locDescription);return o.a.createElement("div",{className:this.css.headerText,style:{maxWidth:this.survey.titleMaxWidth}},o.a.createElement(H,{element:this.survey}),this.survey.renderedHasDescription?o.a.createElement("div",{className:this.css.description},e):null)},t.prototype.renderLogoImage=function(e){if(!e)return null;var t=this.survey.getElementWrapperComponentName(this.survey,"logo-image"),n=this.survey.getElementWrapperComponentData(this.survey,"logo-image");return s.Instance.createElement(t,{data:n})},t.prototype.render=function(){return this.survey.renderedHasHeader?o.a.createElement("div",{className:this.css.header,ref:this.rootRef},this.renderLogoImage(this.survey.isLogoBefore),this.renderTitle(),this.renderLogoImage(this.survey.isLogoAfter),o.a.createElement("div",{className:this.css.headerClose})):null},t}(o.a.Component);s.Instance.registerElement("survey-header",(function(e){return o.a.createElement(ce,e)}));var pe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),he=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return pe(t,e),t.prototype.render=function(){return o.a.createElement("div",{className:"sv-brand-info"},o.a.createElement("a",{className:"sv-brand-info__logo",href:"https://surveyjs.io/?utm_source=built-in_links&utm_medium=online_survey_tool&utm_campaign=landing_page"},o.a.createElement("img",{src:"https://surveyjs.io/Content/Images/poweredby.svg"})),o.a.createElement("div",{className:"sv-brand-info__text"},"Try and see how easy it is to ",o.a.createElement("a",{href:"https://surveyjs.io/create-survey?utm_source=built-in_links&utm_medium=online_survey_tool&utm_campaign=create_survey"},"create a survey")),o.a.createElement("div",{className:"sv-brand-info__terms"},o.a.createElement("a",{href:"https://surveyjs.io/TermsOfUse"},"Terms of Use & Privacy Statement")))},t}(o.a.Component),de=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return de(t,e),Object.defineProperty(t.prototype,"notifier",{get:function(){return this.props.notifier},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.notifier},t.prototype.renderElement=function(){if(!this.notifier.isDisplayed)return null;var e={visibility:this.notifier.active?"visible":"hidden"};return o.a.createElement("div",{className:this.notifier.css,style:e,role:"alert","aria-live":"polite"},o.a.createElement("span",null,this.notifier.message),o.a.createElement(L,{model:this.notifier.actionBar}))},t}(c);s.Instance.registerElement("sv-notifier",(function(e){return o.a.createElement(fe,e)}));var me=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return me(t,e),t.prototype.render=function(){var e=this,t=this.props.survey.getContainerContent(this.props.container),n=!1!==this.props.needRenderWrapper;return 0==t.length?null:n?o.a.createElement("div",{className:"sv-components-column sv-components-container-"+this.props.container},t.map((function(t){return s.Instance.createElement(t.component,{survey:e.props.survey,model:t.data,container:e.props.container,key:t.id})}))):o.a.createElement(o.a.Fragment,null,t.map((function(t){return s.Instance.createElement(t.component,{survey:e.props.survey,model:t.data,container:e.props.container,key:t.id})})))},t}(o.a.Component);s.Instance.registerElement("sv-components-container",(function(e){return o.a.createElement(ye,e)}));var ge=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ve=function(e){function t(t){var n=e.call(this,t)||this;return n.containerRef=o.a.createRef(),n}return ge(t,e),t.prototype.componentDidMount=function(){this.containerRef.current&&(this.containerRef.current.innerHTML=i.SvgRegistry.iconsRenderedHtml())},t.prototype.render=function(){return o.a.createElement("svg",{style:{display:"none"},id:"sv-icon-holder-global-container",ref:this.containerRef})},t}(o.a.Component),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(){return(Ce=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ee=function(e){function t(t){var n=e.call(this,t)||this;return n.previousJSON={},n.isSurveyUpdated=!1,n.createSurvey(t),n.updateSurvey(t,{}),n.rootRef=r.createRef(),n.rootNodeId=t.id||null,n.rootNodeClassName=t.className||"",n}return be(t,e),Object.defineProperty(t,"cssType",{get:function(){return i.surveyCss.currentType},set:function(e){i.StylesManager.applyTheme(e)},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.survey},t.prototype.onSurveyUpdated=function(){if(this.survey){var e=this.rootRef.current;e&&this.survey.afterRenderSurvey(e),this.survey.startTimerFromUI()}},t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(this.isModelJSONChanged(t)&&(this.destroySurvey(),this.createSurvey(t),this.updateSurvey(t,{}),this.isSurveyUpdated=!0),!0)},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateSurvey(this.props,t),this.isSurveyUpdated&&(this.onSurveyUpdated(),this.isSurveyUpdated=!1)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.onSurveyUpdated()},t.prototype.destroySurvey=function(){this.survey&&(this.survey.renderCallback=void 0,this.survey.onPartialSend.clear(),this.survey.stopTimer(),this.survey.destroyResizeObserver())},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.destroySurvey()},t.prototype.doRender=function(){var e;e="completed"==this.survey.state?this.renderCompleted():"completedbefore"==this.survey.state?this.renderCompletedBefore():"loading"==this.survey.state?this.renderLoading():"empty"==this.survey.state?this.renderEmptySurvey():this.renderSurvey();var t=this.survey.backgroundImage?r.createElement("div",{className:this.css.rootBackgroundImage,style:this.survey.backgroundImageStyle}):null,n="basic"===this.survey.headerView?r.createElement(ce,{survey:this.survey}):null,o=r.createElement("div",{className:"sv_custom_header"});this.survey.hasLogo&&(o=null);var i=this.survey.getRootCss(),s=this.rootNodeClassName?this.rootNodeClassName+" "+i:i;return r.createElement("div",{id:this.rootNodeId,ref:this.rootRef,className:s,style:this.survey.themeVariables,lang:this.survey.locale||"en",dir:this.survey.localeDir},this.survey.needRenderIcons?r.createElement(ve,null):null,r.createElement("div",{className:this.survey.wrapperFormCss},t,r.createElement("form",{onSubmit:function(e){e.preventDefault()}},o,r.createElement("div",{className:this.css.container},n,r.createElement(ye,{survey:this.survey,container:"header",needRenderWrapper:!1}),e,r.createElement(ye,{survey:this.survey,container:"footer",needRenderWrapper:!1}))),this.survey.showBrandInfo?r.createElement(he,null):null,r.createElement(fe,{notifier:this.survey.notifier})))},t.prototype.renderElement=function(){return this.doRender()},Object.defineProperty(t.prototype,"css",{get:function(){return this.survey.css},set:function(e){this.survey.css=e},enumerable:!1,configurable:!0}),t.prototype.renderCompleted=function(){if(!this.survey.showCompletedPage)return null;var e={__html:this.survey.processedCompletedHtml};return r.createElement(r.Fragment,null,r.createElement("div",{dangerouslySetInnerHTML:e,className:this.survey.completedCss}),r.createElement(ye,{survey:this.survey,container:"completePage",needRenderWrapper:!1}))},t.prototype.renderCompletedBefore=function(){var e={__html:this.survey.processedCompletedBeforeHtml};return r.createElement("div",{dangerouslySetInnerHTML:e,className:this.survey.completedBeforeCss})},t.prototype.renderLoading=function(){var e={__html:this.survey.processedLoadingHtml};return r.createElement("div",{dangerouslySetInnerHTML:e,className:this.survey.loadingBodyCss})},t.prototype.renderSurvey=function(){var e=this.survey.activePage?this.renderPage(this.survey.activePage):null,t=(this.survey.isShowStartingPage,this.survey.activePage?this.survey.activePage.id:""),n=this.survey.bodyCss,o={};return this.survey.renderedWidth&&(o.maxWidth=this.survey.renderedWidth),r.createElement("div",{className:this.survey.bodyContainerCss},r.createElement(ye,{survey:this.survey,container:"left"}),r.createElement("div",{className:"sv-components-column sv-components-column--expandable"},r.createElement(ye,{survey:this.survey,container:"center"}),r.createElement("div",{id:t,className:n,style:o},r.createElement(ye,{survey:this.survey,container:"contentTop"}),e,r.createElement(ye,{survey:this.survey,container:"contentBottom"}))),r.createElement(ye,{survey:this.survey,container:"right"}))},t.prototype.renderPage=function(e){return r.createElement(ue,{survey:this.survey,page:e,css:this.css,creator:this})},t.prototype.renderEmptySurvey=function(){return r.createElement("div",{className:this.css.bodyEmpty},this.survey.emptySurveyText)},t.prototype.createSurvey=function(e){e||(e={}),this.previousJSON={},e?e.model?this.survey=e.model:e.json&&(this.previousJSON=e.json,this.survey=new i.SurveyModel(e.json)):this.survey=new i.SurveyModel,e.css&&(this.survey.css=this.css),this.setSurveyEvents()},t.prototype.isModelJSONChanged=function(e){return e.model?this.survey!==e.model:!!e.json&&!i.Helpers.isTwoValueEquals(e.json,this.previousJSON)},t.prototype.updateSurvey=function(e,t){if(e)for(var n in t=t||{},e)"model"!=n&&"children"!=n&&"json"!=n&&("css"!=n?e[n]!==t[n]&&(0==n.indexOf("on")&&this.survey[n]&&this.survey[n].add?(t[n]&&this.survey[n].remove(t[n]),this.survey[n].add(e[n])):this.survey[n]=e[n]):(this.survey.mergeValues(e.css,this.survey.getCss()),this.survey.updateNavigationCss(),this.survey.updateElementCss()))},t.prototype.setSurveyEvents=function(){var e=this;this.survey.renderCallback=function(){var t=e.state&&e.state.modelChanged?e.state.modelChanged:0;e.setState({modelChanged:t+1})},this.survey.onPartialSend.add((function(t){e.state&&e.setState(e.state)}))},t.prototype.createQuestionElement=function(e){return W.Instance.createQuestion(e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isInputReadOnly,creator:this})},t.prototype.renderError=function(e,t,n,r){return s.Instance.createElement(this.survey.questionErrorComponent,{key:e,error:t,cssClasses:n,element:r})},t.prototype.questionTitleLocation=function(){return this.survey.questionTitleLocation},t.prototype.questionErrorLocation=function(){return this.survey.questionErrorLocation},t}(c);function we(e,t,n){return void 0===n&&(n={processEsc:!0,disableTabStop:!1}),t&&t.disableTabStop||n&&n.disableTabStop?r.cloneElement(e,{tabIndex:-1}):(n=Ce({},n),r.cloneElement(e,{tabIndex:0,onKeyUp:function(e){return e.preventDefault(),e.stopPropagation(),Object(i.doKey2ClickUp)(e,n),!1},onKeyDown:function(e){return Object(i.doKey2ClickDown)(e,n)},onBlur:function(e){return Object(i.doKey2ClickBlur)(e)}}))}s.Instance.registerElement("survey",(function(e){return r.createElement(Ee,e)}));var Oe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a 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.updateStateFunction=null,n.state={update:0},n}return Oe(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.props.css||this.survey.css},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(this.survey){var e=this;this.updateStateFunction=function(){e.setState({update:e.state.update+1})},this.survey.onPageVisibleChanged.add(this.updateStateFunction)}},t.prototype.componentWillUnmount=function(){this.survey&&this.updateStateFunction&&(this.survey.onPageVisibleChanged.remove(this.updateStateFunction),this.updateStateFunction=null)},t}(r.Component),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)}}(),Se=function(e){function t(t){var n=e.call(this,t)||this;return n.circleLength=440,n}return qe(t,e),t.prototype.getStateElement=function(){return this.timerModel},Object.defineProperty(t.prototype,"timerModel",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progress",{get:function(){return-this.timerModel.progress*this.circleLength},enumerable:!1,configurable:!0}),t.prototype.render=function(){if(!this.timerModel.isRunning)return null;var e=r.createElement("div",{className:this.timerModel.survey.getCss().timerRoot},this.timerModel.text);if(this.timerModel.showTimerAsClock){var t={strokeDasharray:this.circleLength,strokeDashoffset:this.progress},n=this.timerModel.showProgress?r.createElement(E,{className:this.timerModel.getProgressCss(),style:t,iconName:"icon-timercircle",size:"auto"}):null;e=r.createElement("div",{className:this.timerModel.rootCss},n,r.createElement("div",{className:this.timerModel.textContainerCss},r.createElement("span",{className:this.timerModel.majorTextCss},this.timerModel.clockMajorText),this.timerModel.clockMinorText?r.createElement("span",{className:this.timerModel.minorTextCss},this.timerModel.clockMinorText):null))}return e},t}(p);s.Instance.registerElement("sv-timerpanel",(function(e){return r.createElement(Se,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)}}(),_e=function(e){function t(t){var n=e.call(this,t)||this;return n.hasBeenExpanded=!1,n}return xe(t,e),Object.defineProperty(t.prototype,"panel",{get:function(){return this.panelBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.renderHeader(),n=r.createElement(re,{element:this.panelBase,cssClasses:this.panelBase.cssClasses,creator:this.creator}),o={paddingLeft:this.panel.innerPaddingLeft,display:this.panel.renderedIsExpanded?void 0:"none"},i=null;if(this.panel.renderedIsExpanded){var s=this.renderRows(this.panelBase.cssClasses),a=this.panelBase.cssClasses.panel.content;i=this.renderContent(o,s,a)}return r.createElement("div",{ref:this.rootRef,className:this.panelBase.getContainerCss(),onFocus:function(){e.panelBase&&e.panelBase.focusIn()},id:this.panelBase.id},this.panel.showErrorsAbovePanel?n:null,t,this.panel.showErrorsAbovePanel?null:n,i)},t.prototype.renderHeader=function(){return this.panel.hasTitle||this.panel.hasDescription?r.createElement(ee,{element:this.panel}):null},t.prototype.wrapElement=function(e){var t=this.panel.survey,n=null;return t&&(n=a.wrapElement(t,e,this.panel)),null!=n?n:e},t.prototype.renderContent=function(e,t,n){var o=this.renderBottom();return r.createElement("div",{style:e,className:n,id:this.panel.contentId},t,o)},t.prototype.renderTitle=function(){return this.panelBase.title?r.createElement(H,{element:this.panelBase}):null},t.prototype.renderDescription=function(){if(!this.panelBase.description)return null;var e=c.renderLocString(this.panelBase.locDescription);return r.createElement("div",{className:this.panel.cssClasses.panel.description},e)},t.prototype.renderBottom=function(){var e=this.panel.getFooterToolbar();return e.hasActions?r.createElement(L,{model:e}):null},t.prototype.getIsVisible=function(){return this.panelBase.getIsContentVisible()},t}(b);s.Instance.registerElement("panel",(function(e){return r.createElement(_e,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)}}(),Ve=function(e){function t(t){return e.call(this,t)||this}return Ie(t,e),Object.defineProperty(t.prototype,"flowPanel",{get:function(){return this.panel},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.flowPanel&&(this.flowPanel.onCustomHtmlProducing=function(){return""},this.flowPanel.onGetHtmlForQuestion=this.renderQuestion)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.flowPanel&&(this.flowPanel.onCustomHtmlProducing=null,this.flowPanel.onGetHtmlForQuestion=null)},t.prototype.getQuestion=function(e){return this.flowPanel.getQuestionByName(e)},t.prototype.renderQuestion=function(e){return"<question>"+e.name+"</question>"},t.prototype.renderRows=function(){var e=this.renderHtml();return e?[e]:[]},t.prototype.getNodeIndex=function(){return this.renderedIndex++},t.prototype.renderHtml=function(){if(!this.flowPanel)return null;var e="<span>"+this.flowPanel.produceHtml()+"</span>";if(!DOMParser){var t={__html:e};return r.createElement("div",{dangerouslySetInnerHTML:t})}var n=(new DOMParser).parseFromString(e,"text/xml");return this.renderedIndex=0,this.renderParentNode(n)},t.prototype.renderNodes=function(e){for(var t=[],n=0;n<e.length;n++){var r=this.renderNode(e[n]);r&&t.push(r)}return t},t.prototype.getStyle=function(e){var t={};return"b"===e.toLowerCase()&&(t.fontWeight="bold"),"i"===e.toLowerCase()&&(t.fontStyle="italic"),"u"===e.toLowerCase()&&(t.textDecoration="underline"),t},t.prototype.renderParentNode=function(e){var t=e.nodeName.toLowerCase(),n=this.renderNodes(this.getChildDomNodes(e));return"div"===t?r.createElement("div",{key:this.getNodeIndex()},n):r.createElement("span",{key:this.getNodeIndex(),style:this.getStyle(t)},n)},t.prototype.renderNode=function(e){if(!this.hasTextChildNodesOnly(e))return this.renderParentNode(e);var t=e.nodeName.toLowerCase();if("question"===t){var n=this.flowPanel.getQuestionByName(e.textContent);if(!n)return null;var o=r.createElement(ne,{key:n.name,element:n,creator:this.creator,css:this.css});return r.createElement("span",{key:this.getNodeIndex()},o)}return"div"===t?r.createElement("div",{key:this.getNodeIndex()},e.textContent):r.createElement("span",{key:this.getNodeIndex(),style:this.getStyle(t)},e.textContent)},t.prototype.getChildDomNodes=function(e){for(var t=[],n=0;n<e.childNodes.length;n++)t.push(e.childNodes[n]);return t},t.prototype.hasTextChildNodesOnly=function(e){for(var t=e.childNodes,n=0;n<t.length;n++)if("#text"!==t[n].nodeName.toLowerCase())return!1;return!0},t.prototype.renderContent=function(e,t){return r.createElement("f-panel",{style:e},t)},t}(_e);s.Instance.registerElement("flowpanel",(function(e){return r.createElement(Ve,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)}}(),Ne=function(e){function t(t){return e.call(this,t)||this}return Te(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses;return r.createElement("fieldset",{className:this.question.getSelectBaseRootCss(),ref:function(t){return e.setControl(t)},role:this.question.a11y_input_ariaRole,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage},r.createElement("legend",{className:"sv-hidden"},this.question.locTitle.renderedHtml),this.getHeader(),this.question.hasColumns?this.getColumnedBody(t):this.getBody(t),this.getFooter(),this.question.isOtherSelected?this.renderOther():null)},t.prototype.getHeader=function(){var e=this;if(this.question.hasHeadItems)return this.question.headItems.map((function(t,n){return e.renderItem("item_h"+n,t,!1,e.question.cssClasses)}))},t.prototype.getFooter=function(){var e=this;if(this.question.hasFootItems)return this.question.footItems.map((function(t,n){return e.renderItem("item_f"+n,t,!1,e.question.cssClasses)}))},t.prototype.getColumnedBody=function(e){return r.createElement("div",{className:e.rootMultiColumn},this.getColumns(e))},t.prototype.getColumns=function(e){var t=this;return this.question.columns.map((function(n,o){var i=n.map((function(n,r){return t.renderItem("item"+r,n,0===o&&0===r,e,""+o+r)}));return r.createElement("div",{key:"column"+o,className:t.question.getColumnClass(),role:"presentation"},i)}))},t.prototype.getBody=function(e){return this.question.blockedRow?r.createElement("div",{className:e.rootRow},this.getItems(e,this.question.dataChoices)):r.createElement(r.Fragment,null,this.getItems(e,this.question.bodyItems))},t.prototype.getItems=function(e,t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i="item"+r,s=this.renderItem(i,o,0==r,e,""+r);s&&n.push(s)}return n},Object.defineProperty(t.prototype,"textStyle",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.renderOther=function(){var e=this.question.cssClasses;return r.createElement("div",{className:this.question.getCommentAreaCss(!0)},r.createElement(Y,{question:this.question,otherCss:e.other,cssClasses:e,isDisplayMode:this.isDisplayMode}))},t.prototype.renderItem=function(e,t,n,r,o){var i=s.Instance.createElement(this.question.itemComponent,{key:e,question:this.question,cssClasses:r,isDisplayMode:this.isDisplayMode,item:t,textStyle:this.textStyle,index:o,isFirst:n}),u=this.question.survey,l=null;return u&&i&&(l=a.wrapItemValue(u,i,this.question,t)),null!=l?l:i},t}(h),Ae=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=function(e){n.question.clickItemHandler(n.item,e.target.checked)},n}return Te(t,e),t.prototype.getStateElement=function(){return this.item},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textStyle",{get:function(){return this.props.textStyle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isFirst",{get:function(){return this.props.isFirst},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hideCaption",{get:function(){return!0===this.props.hideCaption},enumerable:!1,configurable:!0}),t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(!!this.question&&!(this.question.customWidget&&!this.question.customWidgetData.isNeedRender&&!this.question.customWidget.widgetJson.isDefaultRender&&!this.question.customWidget.widgetJson.render))},t.prototype.canRender=function(){return!!this.item&&!!this.question},t.prototype.renderElement=function(){var e=this.question.isItemSelected(this.item);return this.renderCheckbox(e,null)},Object.defineProperty(t.prototype,"inputStyle",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.renderCheckbox=function(e,t){var n=this.question.getItemId(this.item),o=this.question.getItemClass(this.item),i=this.question.getLabelClass(this.item),s=this.hideCaption?null:r.createElement("span",{className:this.cssClasses.controlLabel},this.renderLocString(this.item.locText,this.textStyle));return r.createElement("div",{className:o,role:"presentation"},r.createElement("label",{className:i},r.createElement("input",{className:this.cssClasses.itemControl,type:"checkbox",name:this.question.name+this.item.id,value:this.item.value,id:n,style:this.inputStyle,disabled:!this.question.getItemEnabled(this.item),readOnly:this.question.isReadOnlyAttr,checked:e,onChange:this.handleOnChange,required:this.question.hasRequiredError()}),this.cssClasses.materialDecorator?r.createElement("span",{className:this.cssClasses.materialDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:this.cssClasses.itemDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,s),t)},t}(p);s.Instance.registerElement("survey-checkbox-item",(function(e){return r.createElement(Ae,e)})),W.Instance.registerQuestion("checkbox",(function(e){return r.createElement(Ne,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)}}(),Re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return je(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this;if(this.question.selectToRankEnabled){return r.createElement("div",{className:this.question.rootClass,ref:function(t){return e.setControl(t)}},r.createElement("div",{className:this.question.getContainerClasses("from"),"data-ranking":"from-container"},this.getItems(this.question.renderedUnRankingChoices,!0),0===this.question.renderedUnRankingChoices.length?r.createElement("div",{className:this.question.cssClasses.containerPlaceholder}," ",this.renderLocString(this.question.locSelectToRankEmptyRankedAreaText)," "):null),r.createElement("div",{className:this.question.cssClasses.containersDivider}),r.createElement("div",{className:this.question.getContainerClasses("to"),"data-ranking":"to-container"},this.getItems(),0===this.question.renderedRankingChoices.length?r.createElement("div",{className:this.question.cssClasses.containerPlaceholder}," ",this.renderLocString(this.question.locSelectToRankEmptyUnrankedAreaText)," "):null))}return r.createElement("div",{className:this.question.rootClass,ref:function(t){return e.setControl(t)}},this.getItems())},t.prototype.getItems=function(e,t){var n=this;void 0===e&&(e=this.question.renderedRankingChoices);for(var r=[],o=function(o){var s=e[o];r.push(i.renderItem(s,o,(function(e){n.question.handleKeydown.call(n.question,e,s)}),(function(e){e.persist(),n.question.handlePointerDown.call(n.question,e,s,e.currentTarget)}),(function(e){e.persist(),n.question.handlePointerUp.call(n.question,e,s,e.currentTarget)}),i.question.cssClasses,i.question.getItemClass(s),i.question,t))},i=this,s=0;s<e.length;s++)o(s);return r},t.prototype.renderItem=function(e,t,n,o,i,s,u,l,c){e.renderedId;var p=this.renderLocString(e.locText),h=t,d=this.question.getNumberByIndex(h),f=this.question.getItemTabIndex(e),m=r.createElement(De,{key:e.value,text:p,index:h,indexText:d,itemTabIndex:f,handleKeydown:n,handlePointerDown:o,handlePointerUp:i,cssClasses:s,itemClass:u,question:l,unrankedItem:c,item:e}),y=this.question.survey,g=null;return y&&(g=a.wrapItemValue(y,m,this.question,e)),null!=g?g:m},t}(h),De=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return je(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,"handlePointerUp",{get:function(){return this.props.handlePointerUp},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemClass",{get:function(){return this.props.itemClass},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemTabIndex",{get:function(){return this.props.itemTabIndex},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"unrankedItem",{get:function(){return this.props.unrankedItem},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.renderEmptyIcon=function(){return r.createElement("svg",null,r.createElement("use",{xlinkHref:this.question.dashSvgIcon}))},t.prototype.renderElement=function(){var e=s.Instance.createElement(this.question.itemComponent,{item:this.item,cssClasses:this.cssClasses});return r.createElement("div",{tabIndex:this.itemTabIndex,className:this.itemClass,onKeyDown:this.handleKeydown,onPointerDown:this.handlePointerDown,onPointerUp:this.handlePointerUp,"data-sv-drop-target-ranking-item":this.index},r.createElement("div",{tabIndex:-1,style:{outline:"none"}},r.createElement("div",{className:this.cssClasses.itemGhostNode}),r.createElement("div",{className:this.cssClasses.itemContent},r.createElement("div",{className:this.cssClasses.itemIconContainer},r.createElement("svg",{className:this.question.getIconHoverCss()},r.createElement("use",{xlinkHref:this.question.dragDropSvgIcon})),r.createElement("svg",{className:this.question.getIconFocusCss()},r.createElement("use",{xlinkHref:this.question.arrowsSvgIcon}))),r.createElement("div",{className:this.question.getItemIndexClasses(this.item)},!this.unrankedItem&&this.indexText?this.indexText:this.renderEmptyIcon()),e)))},t}(p),Le=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return je(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return r.createElement("div",{className:this.cssClasses.controlLabel},c.renderLocString(this.item.locText))},t}(p);s.Instance.registerElement("sv-ranking-item",(function(e){return r.createElement(Le,e)})),W.Instance.registerQuestion("ranking",(function(e){return r.createElement(Re,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)}}(),Me=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnMouseDown=n.handleOnMouseDown.bind(n),n}return ke(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.handleOnMouseDown=function(e){this.question.onMouseDown()},t}(c),Fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ke(t,e),t.prototype.render=function(){var e=this.renderLocString(this.item.locText);return o.a.createElement("label",{onMouseDown:this.handleOnMouseDown,className:this.question.getItemClassByText(this.item.itemValue,this.item.text)},o.a.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.questionName,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:function(){},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage}),o.a.createElement("span",{className:this.question.cssClasses.itemText,"data-text":this.item.text},e))},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this)},t}(Me);s.Instance.registerElement("sv-rating-item",(function(e){return o.a.createElement(Fe,e)}));var 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)}}(),ze=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Be(t,e),t.prototype.render=function(){var e=this;return o.a.createElement("label",{onMouseDown:this.handleOnMouseDown,className:this.question.getItemClass(this.item.itemValue),onMouseOver:function(t){return e.question.onItemMouseIn(e.item)},onMouseOut:function(t){return e.question.onItemMouseOut(e.item)}},o.a.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.questionName,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:function(){},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage}),o.a.createElement(E,{className:"sv-star",size:"auto",iconName:this.question.itemStarIcon,title:this.item.text}),o.a.createElement(E,{className:"sv-star-2",size:"auto",iconName:this.question.itemStarIconAlt,title:this.item.text}))},t}(Me);s.Instance.registerElement("sv-rating-item-star",(function(e){return o.a.createElement(ze,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)}}(),We=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return He(t,e),t.prototype.render=function(){var e=this;return o.a.createElement("label",{onMouseDown:this.handleOnMouseDown,style:this.question.getItemStyle(this.item.itemValue,this.item.highlight),className:this.question.getItemClass(this.item.itemValue),onMouseOver:function(t){return e.question.onItemMouseIn(e.item)},onMouseOut:function(t){return e.question.onItemMouseOut(e.item)}},o.a.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.questionName,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:function(){},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage}),o.a.createElement(E,{size:"auto",iconName:this.question.getItemSmileyIconName(this.item.itemValue),title:this.item.text}))},t}(Me);s.Instance.registerElement("sv-rating-item-smiley",(function(e){return o.a.createElement(We,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)}}(),Qe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ue(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){if(!this.item)return null;var e=this.props.item,t=this.renderDescription(e);return o.a.createElement("div",{className:"sd-rating-dropdown-item"},o.a.createElement("span",{className:"sd-rating-dropdown-item_text"},e.title),t)},t.prototype.renderDescription=function(e){return e.description?o.a.createElement("div",{className:"sd-rating-dropdown-item_description"},this.renderLocString(e.description,void 0,"locString")):null},t}(c);s.Instance.registerElement("sv-rating-dropdown-item",(function(e){return o.a.createElement(Qe,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)}}(),Ke=function(e){function t(t){return e.call(this,t)||this}return Je(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateDomElement()},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.updateDomElement()},t.prototype.updateDomElement=function(){if(this.inputElement){var e=this.inputElement,t=this.model.inputStringRendered;i.Helpers.isTwoValueEquals(t,e.value,!1,!0,!1)||(e.value=this.model.inputStringRendered)}},t.prototype.onChange=function(e){var t=i.settings.environment.root;e.target===t.activeElement&&(this.model.inputStringRendered=e.target.value)},t.prototype.keyhandler=function(e){this.model.inputKeyHandler(e)},t.prototype.onBlur=function(e){this.model.onBlur(e)},t.prototype.onFocus=function(e){this.model.onFocus(e)},t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this;return r.createElement("div",{className:this.question.cssClasses.hint},this.model.showHintPrefix?r.createElement("div",{className:this.question.cssClasses.hintPrefix},r.createElement("span",null,this.model.hintStringPrefix)):null,r.createElement("div",{className:this.question.cssClasses.hintSuffixWrapper},this.model.showHintString?r.createElement("div",{className:this.question.cssClasses.hintSuffix},r.createElement("span",{style:{visibility:"hidden"},"data-bind":"text: model.filterString"},this.model.inputStringRendered),r.createElement("span",null,this.model.hintStringSuffix)):null,r.createElement("input",{type:"text",autoComplete:"off",id:this.question.getInputId(),inputMode:this.model.inputMode,ref:function(t){return e.inputElement=t},className:this.question.cssClasses.filterStringInput,disabled:this.question.isInputReadOnly,readOnly:!!this.model.filterReadOnly||void 0,size:this.model.inputStringRendered?void 0:1,role:this.model.filterStringEnabled?this.question.ariaRole:void 0,"aria-expanded":null===this.question.ariaExpanded?void 0:"true"===this.question.ariaExpanded,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-controls":this.model.listElementId,"aria-activedescendant":this.model.ariaActivedescendant,placeholder:this.model.filterStringPlaceholder,onKeyDown:function(t){e.keyhandler(t)},onChange:function(t){e.onChange(t)},onBlur:function(t){e.onBlur(t)},onFocus:function(t){e.onFocus(t)}})))},t}(c);W.Instance.registerQuestion("sv-tagbox-filter",(function(e){return r.createElement(Ke,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)}}(),Ye=function(e){function t(t){var n=e.call(this,t)||this;return n.state={changed:0},n.setupModel(),n}return Ge(t,e),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.setupModel()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.item&&(this.item.locText.onChanged=function(){})},t.prototype.setupModel=function(){if(this.item.locText){var e=this;this.item.locText.onChanged=function(){e.setState({changed:e.state.changed+1})}}},t.prototype.getStateElement=function(){return this.item},Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.item},t.prototype.renderElement=function(){return r.createElement("option",{value:this.item.value,disabled:!this.item.isEnabled},this.item.text)},t}(p),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)}}(),$e=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.click=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onClick(e)},t.chevronPointerDown=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.chevronPointerDown(e)},t.clear=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onClear(e)},t.keyhandler=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.keyHandler(e)},t.blur=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onBlur(e),t.updateInputDomElement()},t.focus=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onFocus(e)},t}return Ze(t,e),t.prototype.getStateElement=function(){return this.question.dropdownListModel},t.prototype.setValueCore=function(e){this.questionBase.renderedValue=e},t.prototype.getValueCore=function(){return this.questionBase.renderedValue},t.prototype.renderReadOnlyElement=function(){return r.createElement("div",null,this.question.readOnlyText)},t.prototype.renderSelect=function(e){var t,n,o=null;if(this.question.isReadOnly){var i=this.question.selectedItemLocText?this.renderLocString(this.question.selectedItemLocText):"";o=r.createElement("div",{id:this.question.inputId,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,tabIndex:this.question.isDisabledAttr?void 0:0,className:this.question.getControlClass()},i,this.renderReadOnlyElement())}else o=r.createElement(r.Fragment,null,this.renderInput(this.question.dropdownListModel),r.createElement(V,{model:null===(n=null===(t=this.question)||void 0===t?void 0:t.dropdownListModel)||void 0===n?void 0:n.popupModel}));return r.createElement("div",{className:e.selectWrapper,onClick:this.click},o,this.createChevronButton())},t.prototype.renderValueElement=function(e){return this.question.showInputFieldComponent?s.Instance.createElement(this.question.inputFieldComponentName,{item:e.getSelectedAction(),question:this.question}):this.question.showSelectedItemLocText?this.renderLocString(this.question.selectedItemLocText):null},t.prototype.renderInput=function(e){var t=this,n=this.renderValueElement(e),o=i.settings.environment.root;return r.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),tabIndex:e.noTabIndex?void 0:0,disabled:this.question.isDisabledAttr,required:this.question.isRequired,onKeyDown:this.keyhandler,onBlur:this.blur,role:this.question.ariaRole,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage,"aria-expanded":null===this.question.ariaExpanded?void 0:"true"===this.question.ariaExpanded,"aria-controls":e.listElementId,"aria-activedescendant":e.ariaActivedescendant},e.showHintPrefix?r.createElement("div",{className:this.question.cssClasses.hintPrefix},r.createElement("span",null,e.hintStringPrefix)):null,r.createElement("div",{className:this.question.cssClasses.controlValue},e.showHintString?r.createElement("div",{className:this.question.cssClasses.hintSuffix},r.createElement("span",{style:{visibility:"hidden"},"data-bind":"text: model.filterString"},e.inputStringRendered),r.createElement("span",null,e.hintStringSuffix)):null,n,r.createElement("input",{type:"text",autoComplete:"off",id:this.question.getInputId(),ref:function(e){return t.inputElement=e},className:this.question.cssClasses.filterStringInput,role:e.filterStringEnabled?this.question.ariaRole:void 0,"aria-expanded":null===this.question.ariaExpanded?void 0:"true"===this.question.ariaExpanded,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-controls":e.listElementId,"aria-activedescendant":e.ariaActivedescendant,placeholder:e.placeholderRendered,readOnly:!!e.filterReadOnly||void 0,tabIndex:e.noTabIndex?void 0:-1,disabled:this.question.isDisabledAttr,inputMode:e.inputMode,onChange:function(t){!function(t){t.target===o.activeElement&&(e.inputStringRendered=t.target.value)}(t)},onBlur:this.blur,onFocus:this.focus})),this.createClearButton())},t.prototype.createClearButton=function(){if(!this.question.allowClear||!this.question.cssClasses.cleanButtonIconId)return null;var e={display:this.question.showClearButton?"":"none"};return r.createElement("div",{className:this.question.cssClasses.cleanButton,style:e,onClick:this.clear,"aria-hidden":"true"},r.createElement(E,{className:this.question.cssClasses.cleanButtonSvg,iconName:this.question.cssClasses.cleanButtonIconId,title:this.question.clearCaption,size:"auto"}))},t.prototype.createChevronButton=function(){return this.question.cssClasses.chevronButtonIconId?r.createElement("div",{className:this.question.cssClasses.chevronButton,"aria-hidden":"true",onPointerDown:this.chevronPointerDown},r.createElement(E,{className:this.question.cssClasses.chevronButtonSvg,iconName:this.question.cssClasses.chevronButtonIconId,size:"auto"})):null},t.prototype.renderOther=function(e){return r.createElement("div",{className:this.question.getCommentAreaCss(!0)},r.createElement(Y,{question:this.question,otherCss:e.other,cssClasses:e,isDisplayMode:this.isDisplayMode,isOther:!0}))},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateInputDomElement()},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.updateInputDomElement()},t.prototype.updateInputDomElement=function(){if(this.inputElement){var e=this.inputElement,t=this.question.dropdownListModel.inputStringRendered;i.Helpers.isTwoValueEquals(t,e.value,!1,!0,!1)||(e.value=this.question.dropdownListModel.inputStringRendered)}},t}(d),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)}}(),et=function(e){function t(t){return e.call(this,t)||this}return Xe(t,e),t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.isOtherSelected?this.renderOther(e):null,n=this.renderSelect(e);return r.createElement("div",{className:this.question.renderCssRoot},n,t)},t}($e);W.Instance.registerQuestion("dropdown",(function(e){return r.createElement(et,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)}}(),nt=function(e){function t(t){return e.call(this,t)||this}return tt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.item&&!!this.question},t.prototype.renderElement=function(){var e=this,t=this.renderLocString(this.item.locText);return r.createElement("div",{className:"sv-tagbox__item"},r.createElement("div",{className:"sv-tagbox__item-text"},t),r.createElement("div",{className:this.question.cssClasses.cleanItemButton,onClick:function(t){e.question.dropdownListModel.deselectItem(e.item.value),t.stopPropagation()}},r.createElement(E,{className:this.question.cssClasses.cleanItemButtonSvg,iconName:this.question.cssClasses.cleanItemButtonIconId,size:"auto"})))},t}(p),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.prototype.renderItem=function(e,t){return r.createElement(nt,{key:e,question:this.question,item:t})},t.prototype.renderInput=function(e){var t=this,n=e,o=this.question.selectedChoices.map((function(e,n){return t.renderItem("item"+n,e)}));return r.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),tabIndex:e.noTabIndex?void 0:0,disabled:this.question.isInputReadOnly,required:this.question.isRequired,onKeyDown:this.keyhandler,onBlur:this.blur,role:this.question.ariaRole,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage,"aria-expanded":null===this.question.ariaExpanded?void 0:"true"===this.question.ariaExpanded,"aria-controls":e.listElementId,"aria-activedescendant":e.ariaActivedescendant},r.createElement("div",{className:this.question.cssClasses.controlValue},o,r.createElement(Ke,{model:n,question:this.question})),this.createClearButton())},t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.isOtherSelected?this.renderOther(e):null,n=this.renderSelect(e);return r.createElement("div",{className:this.question.renderCssRoot},n,t)},t.prototype.renderReadOnlyElement=function(){return this.question.locReadOnlyText?this.renderLocString(this.question.locReadOnlyText):null},t}($e);W.Instance.registerQuestion("tagbox",(function(e){return r.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){return e.call(this,t)||this}return it(t,e),t.prototype.renderSelect=function(e){var t=this,n=this.isDisplayMode?r.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),disabled:!0},this.question.readOnlyText):r.createElement("select",{id:this.question.inputId,className:this.question.getControlClass(),ref:function(e){return t.setControl(e)},autoComplete:this.question.autocomplete,onChange:this.updateValueOnEvent,onInput:this.updateValueOnEvent,onClick:function(e){t.question.onClick(e)},onKeyUp:function(e){t.question.onKeyUp(e)},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage,required:this.question.isRequired},this.question.allowClear?r.createElement("option",{value:""},this.question.placeholder):null,this.question.visibleChoices.map((function(e,t){return r.createElement(Ye,{key:"item"+t,item:e})})));return r.createElement("div",{className:e.selectWrapper},n,this.createChevronButton())},t}(et);W.Instance.registerQuestion("sv-dropdown-select",(function(e){return r.createElement(st,e)})),i.RendererFactory.Instance.registerRenderer("dropdown","select","sv-dropdown-select");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.state={rowsChanged:0},n}return at(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(e.prototype.componentDidMount.call(this),this.question){var t=this;this.question.visibleRowsChangedCallback=function(){t.setState({rowsChanged:t.state.rowsChanged+1})}}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question&&(this.question.visibleRowsChangedCallback=null)},t.prototype.renderElement=function(){for(var e=this,t=this.question.cssClasses,n=this.question.hasRows?r.createElement("td",null):null,o=[],i=0;i<this.question.visibleColumns.length;i++){var s=this.question.visibleColumns[i],a="column"+i,u=this.renderLocString(s.locText),l={};this.question.columnMinWidth&&(l.minWidth=this.question.columnMinWidth,l.width=this.question.columnMinWidth),o.push(r.createElement("th",{className:this.question.cssClasses.headerCell,style:l,key:a},this.wrapCell({column:s},u,"column-header")))}var c=[],p=this.question.visibleRows;for(i=0;i<p.length;i++){var h=p[i];a="row-"+h.name+"-"+i;c.push(r.createElement(lt,{key:a,question:this.question,cssClasses:t,row:h,isFirst:0==i}))}var d=this.question.showHeader?r.createElement("thead",null,r.createElement("tr",null,n,o)):null;return r.createElement("div",{className:t.tableWrapper,ref:function(t){return e.setControl(t)}},r.createElement("fieldset",null,r.createElement("legend",{className:"sv-hidden"},this.question.locTitle.renderedHtml),r.createElement("table",{className:this.question.getTableCss()},d,r.createElement("tbody",null,c))))},t}(h),lt=function(e){function t(t){return e.call(this,t)||this}return at(t,e),t.prototype.getStateElement=function(){return this.row?this.row.item:e.prototype.getStateElement.call(this)},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.row},enumerable:!1,configurable:!0}),t.prototype.wrapCell=function(e,t,n){if(!n)return t;var r=this.question.survey,o=null;return r&&(o=a.wrapMatrixCell(r,t,e,n)),null!=o?o:t},t.prototype.canRender=function(){return!!this.row},t.prototype.renderElement=function(){var e=null;if(this.question.hasRows){var t=this.renderLocString(this.row.locText),n={};this.question.rowTitleWidth&&(n.minWidth=this.question.rowTitleWidth,n.width=this.question.rowTitleWidth),e=r.createElement("td",{style:n,className:this.row.rowTextClasses},this.wrapCell({row:this.row},t,"row-header"))}var o=this.generateTds();return r.createElement("tr",{className:this.row.rowClasses||void 0},e,o)},t.prototype.generateTds=function(){for(var e=this,t=[],n=this.row,o=this.question.cellComponent,i=function(){var i=null,l=a.question.visibleColumns[u],c="value"+u,p=a.question.getItemClass(n,l);if(a.question.hasCellText){var h=function(t){return function(){return e.cellClick(n,t)}};i=r.createElement("td",{key:c,className:p,onClick:h?h(l):function(){}},a.renderLocString(a.question.getCellDisplayLocText(n.name,l)))}else{var d=s.Instance.createElement(o,{question:a.question,row:a.row,column:l,columnIndex:u,cssClasses:a.cssClasses,cellChanged:function(){e.cellClick(e.row,l)}});i=r.createElement("td",{key:c,"data-responsive-title":l.locText.renderedHtml,className:a.question.cssClasses.cell},d)}t.push(i)},a=this,u=0;u<this.question.visibleColumns.length;u++)i();return t},t.prototype.cellClick=function(e,t){e.value=t.value,this.setState({value:this.row.value})},t}(p),ct=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnMouseDown=n.handleOnMouseDown.bind(n),n.handleOnChange=n.handleOnChange.bind(n),n}return at(t,e),t.prototype.handleOnChange=function(e){this.props.cellChanged&&this.props.cellChanged()},t.prototype.handleOnMouseDown=function(e){this.question.onMouseDown()},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.row},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"column",{get:function(){return this.props.column},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"columnIndex",{get:function(){return this.props.columnIndex},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.question&&!!this.row},t.prototype.renderElement=function(){var e=this.row.value==this.column.value,t=this.question.inputId+"_"+this.row.name+"_"+this.columnIndex,n=this.question.getItemClass(this.row,this.column),o=this.question.isMobile?r.createElement("span",{className:this.question.cssClasses.cellResponsiveTitle},this.renderLocString(this.column.locText)):void 0;return r.createElement("label",{onMouseDown:this.handleOnMouseDown,className:n},this.renderInput(t,e),r.createElement("span",{className:this.question.cssClasses.materialDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:this.cssClasses.itemDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null),o)},t.prototype.renderInput=function(e,t){return r.createElement("input",{id:e,type:"radio",className:this.cssClasses.itemValue,name:this.row.fullName,value:this.column.value,disabled:this.row.isDisabledAttr,readOnly:this.row.isReadOnlyAttr,checked:t,onChange:this.handleOnChange,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.getCellAriaLabel(this.row.locText.renderedHtml,this.column.locText.renderedHtml),"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage})},t}(p);s.Instance.registerElement("survey-matrix-cell",(function(e){return r.createElement(ct,e)})),W.Instance.registerQuestion("matrix",(function(e){return r.createElement(ut,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,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.reactOnStrChanged()},t.prototype.componentWillUnmount=function(){this.question.locHtml.onChanged=function(){}},t.prototype.componentDidUpdate=function(e,t){this.reactOnStrChanged()},t.prototype.reactOnStrChanged=function(){var e=this;this.question.locHtml.onChanged=function(){e.setState({changed:e.state&&e.state.changed?e.state.changed+1:1})}},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&!!this.question.html},t.prototype.renderElement=function(){var e={__html:this.question.locHtml.renderedHtml};return r.createElement("div",{className:this.question.renderCssRoot,dangerouslySetInnerHTML:e})},t}(h);W.Instance.registerQuestion("html",(function(e){return r.createElement(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(){return null!==e&&e.apply(this,arguments)||this}return dt(t,e),t.prototype.render=function(){return r.createElement("div",{className:"sd-loading-indicator"},r.createElement(E,{iconName:"icon-loading",size:"auto"}))},t}(r.Component),mt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yt=function(e){function t(t){return e.call(this,t)||this}return mt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e,t=this,n=this.question.allowShowPreview?this.renderPreview():null,o=this.question.showLoadingIndicator?this.renderLoadingIndicator():null,i=this.question.isPlayingVideo?this.renderVideo():null,s=this.question.showFileDecorator?this.renderFileDecorator():null,a=this.question.showRemoveButton?this.renderClearButton(this.question.cssClasses.removeButton):null,u=this.question.showRemoveButtonBottom?this.renderClearButton(this.question.cssClasses.removeButtonBottom):null,l=this.question.fileNavigatorVisible?r.createElement(L,{model:this.question.fileNavigator}):null;return e=this.question.isReadOnlyAttr?r.createElement("input",{readOnly:!0,type:"file",className:this.isDisplayMode?this.question.getReadOnlyFileCss():this.question.cssClasses.fileInput,id:this.question.inputId,ref:function(e){return t.setControl(e)},style:this.isDisplayMode?{color:"transparent"}:{},multiple:this.question.allowMultiple,placeholder:this.question.title,accept:this.question.acceptedTypes}):this.question.isDisabledAttr?r.createElement("input",{disabled:!0,type:"file",className:this.isDisplayMode?this.question.getReadOnlyFileCss():this.question.cssClasses.fileInput,id:this.question.inputId,ref:function(e){return t.setControl(e)},style:this.isDisplayMode?{color:"transparent"}:{},multiple:this.question.allowMultiple,placeholder:this.question.title,accept:this.question.acceptedTypes}):this.question.hasFileUI?r.createElement("input",{type:"file",disabled:this.isDisplayMode,tabIndex:-1,className:this.isDisplayMode?this.question.getReadOnlyFileCss():this.question.cssClasses.fileInput,id:this.question.inputId,ref:function(e){return t.setControl(e)},style:this.isDisplayMode?{color:"transparent"}:{},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage,multiple:this.question.allowMultiple,title:this.question.inputTitle,accept:this.question.acceptedTypes,capture:this.question.renderCapture}):null,r.createElement("div",{className:this.question.fileRootCss},e,r.createElement("div",{className:this.question.cssClasses.dragArea,onDrop:this.question.onDrop,onDragOver:this.question.onDragOver,onDragLeave:this.question.onDragLeave,onDragEnter:this.question.onDragEnter},s,o,i,a,n,u,l))},t.prototype.renderFileDecorator=function(){var e=this.question.showChooseButton?this.renderChooseButton():null,t=this.question.actionsContainerVisible?r.createElement(L,{model:this.question.actionsContainer}):null,n=this.question.isEmpty()?r.createElement("span",{className:this.question.cssClasses.noFileChosen},this.question.noFileChosenCaption):null;return r.createElement("div",{className:this.question.getFileDecoratorCss()},r.createElement("span",{className:this.question.cssClasses.dragAreaPlaceholder},this.renderLocString(this.question.locRenderedPlaceholder)),r.createElement("div",{className:this.question.cssClasses.wrapper},e,t,n))},t.prototype.renderChooseButton=function(){return r.createElement(vt,{data:{question:this.question}})},t.prototype.renderClearButton=function(e){return this.question.isUploading?null:r.createElement("button",{type:"button",onClick:this.question.doClean,className:e},r.createElement("span",null,this.question.clearButtonCaption),this.question.cssClasses.removeButtonIconId?r.createElement(E,{iconName:this.question.cssClasses.removeButtonIconId,size:"auto",title:this.question.clearButtonCaption}):null)},t.prototype.renderPreview=function(){return s.Instance.createElement("sv-file-preview",{question:this.question})},t.prototype.renderLoadingIndicator=function(){return r.createElement("div",{className:this.question.cssClasses.loadingIndicator},r.createElement(ft,null))},t.prototype.renderVideo=function(){return r.createElement("div",{className:this.question.cssClasses.videoContainer},r.createElement(q,{item:this.question.changeCameraAction}),r.createElement(q,{item:this.question.closeCameraAction}),r.createElement("video",{autoPlay:!0,playsInline:!0,id:this.question.videoId,className:this.question.cssClasses.video}),r.createElement(q,{item:this.question.takePictureAction}))},t}(h);W.Instance.registerQuestion("file",(function(e){return r.createElement(yt,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)}}(),vt=function(e){function t(t){return e.call(this,t)||this}return gt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item&&this.props.item.data.question||this.props.data.question},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this;return we(o.a.createElement("label",{tabIndex:0,className:this.question.getChooseFileCss(),htmlFor:this.question.inputId,"aria-label":this.question.chooseButtonText,onClick:function(t){return e.question.chooseFile(t.nativeEvent)}},this.question.cssClasses.chooseFileIconId?o.a.createElement(E,{title:this.question.chooseButtonText,iconName:this.question.cssClasses.chooseFileIconId,size:"auto"}):null,o.a.createElement("span",null,this.question.chooseButtonText)))},t}(p);s.Instance.registerElement("sv-file-choose-btn",(function(e){return o.a.createElement(vt,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(){return null!==e&&e.apply(this,arguments)||this}return bt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.renderFileSign=function(e,t){var n=this;return e&&t.name?o.a.createElement("div",{className:e},o.a.createElement("a",{href:t.content,onClick:function(e){n.question.doDownloadFile(e,t)},title:t.name,download:t.name,style:{width:this.question.imageWidth}},t.name)):null},t.prototype.renderElement=function(){var e=this,t=this.question.previewValue.map((function(t,n){return t?o.a.createElement("span",{key:e.question.inputId+"_"+n,className:e.question.cssClasses.previewItem,onClick:function(t){return e.question.doDownloadFileFromContainer(t)},style:{display:e.question.isPreviewVisible(n)?void 0:"none"}},e.renderFileSign(e.question.cssClasses.fileSign,t),o.a.createElement("div",{className:e.question.getImageWrapperCss(t)},e.question.canPreviewImage(t)?o.a.createElement("img",{src:t.content,style:{height:e.question.imageHeight,width:e.question.imageWidth},alt:"File preview"}):e.question.cssClasses.defaultImage?o.a.createElement(E,{iconName:e.question.cssClasses.defaultImageIconId,size:"auto",className:e.question.cssClasses.defaultImage}):null,t.name&&!e.question.isReadOnly?o.a.createElement("div",{className:e.question.getRemoveButtonCss(),onClick:function(n){return e.question.doRemoveFile(t,n)}},o.a.createElement("span",{className:e.question.cssClasses.removeFile},e.question.removeFileCaption),e.question.cssClasses.removeFileSvgIconId?o.a.createElement(E,{title:e.question.removeFileCaption,iconName:e.question.cssClasses.removeFileSvgIconId,size:"auto",className:e.question.cssClasses.removeFileSvg}):null):null),e.renderFileSign(e.question.cssClasses.fileSignBottom,t)):null}));return o.a.createElement("div",{className:this.question.cssClasses.fileList||void 0},t)},t.prototype.canRender=function(){return this.question.showPreviewContainer},t}(c);s.Instance.registerElement("sv-file-preview",(function(e){return o.a.createElement(Ct,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)}}(),wt=function(e){function t(t){return e.call(this,t)||this}return Et(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){for(var e=this.question.cssClasses,t=this.question.getRows(),n=[],o=0;o<t.length;o++)t[o].isVisible&&n.push(this.renderRow(o,t[o].cells,e));return r.createElement("table",{className:this.question.getQuestionRootCss()},r.createElement("tbody",null,n))},t.prototype.renderCell=function(e,t,n){var o;return o=e.isErrorsCell?r.createElement(se,{question:e.item.editor,creator:this.creator}):r.createElement(Ot,{question:this.question,item:e.item,creator:this.creator,cssClasses:t}),r.createElement("td",{key:"item"+n,className:e.className,onFocus:function(){e.item.focusIn()}},o)},t.prototype.renderRow=function(e,t,n){for(var o="item"+e,i=[],s=0;s<t.length;s++){var a=t[s];i.push(this.renderCell(a,n,s))}return r.createElement("tr",{key:o,className:n.row},i)},t}(h),Ot=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Et(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElements=function(){return[this.item,this.item.editor]},Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this.item,t=this.cssClasses,n={};return this.question.itemTitleWidth&&(n.minWidth=this.question.itemTitleWidth,n.width=this.question.itemTitleWidth),r.createElement("label",{className:this.question.getItemLabelCss(e)},r.createElement("span",{className:t.itemTitle,style:n},r.createElement(M,{element:e.editor,cssClasses:e.editor.cssClasses})),r.createElement(Pt,{cssClasses:t,itemCss:this.question.getItemCss(),question:e.editor,creator:this.creator}))},t}(p),Pt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Et(t,e),t.prototype.renderElement=function(){return r.createElement("div",{className:this.itemCss},this.renderContent())},t}(oe);W.Instance.registerQuestion("multipletext",(function(e){return r.createElement(wt,e)}));var 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)}}(),St=function(e){function t(t){return e.call(this,t)||this}return qt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=null;return this.question.showClearButtonInContent&&(n=r.createElement("div",null,r.createElement("input",{type:"button",className:this.question.cssClasses.clearButton,onClick:function(){return e.question.clearValue(!0)},value:this.question.clearButtonCaption}))),r.createElement("fieldset",{className:this.question.getSelectBaseRootCss(),ref:function(t){return e.setControl(t)},role:this.question.a11y_input_ariaRole,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage},this.question.hasColumns?this.getColumnedBody(t):this.getBody(t),this.getFooter(),this.question.isOtherSelected?this.renderOther(t):null,n)},t.prototype.getFooter=function(){var e=this;if(this.question.hasFootItems)return this.question.footItems.map((function(t,n){return e.renderItem("item_f"+n,t,!1,e.question.cssClasses)}))},t.prototype.getColumnedBody=function(e){return r.createElement("div",{className:e.rootMultiColumn},this.getColumns(e))},t.prototype.getColumns=function(e){var t=this,n=this.getStateValue();return this.question.columns.map((function(o,i){var s=o.map((function(r,o){return t.renderItem("item"+i+o,r,n,e,""+i+o)}));return r.createElement("div",{key:"column"+i,className:t.question.getColumnClass(),role:"presentation"},s)}))},t.prototype.getBody=function(e){return this.question.blockedRow?r.createElement("div",{className:e.rootRow},this.getItems(e,this.question.dataChoices)):r.createElement(r.Fragment,null,this.getItems(e,this.question.bodyItems))},t.prototype.getItems=function(e,t){for(var n=[],r=this.getStateValue(),o=0;o<t.length;o++){var i=t[o],s=this.renderItem("item"+o,i,r,e,""+o);n.push(s)}return n},Object.defineProperty(t.prototype,"textStyle",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.renderOther=function(e){return r.createElement("div",{className:this.question.getCommentAreaCss(!0)},r.createElement(Y,{question:this.question,otherCss:e.other,cssClasses:e,isDisplayMode:this.isDisplayMode}))},t.prototype.renderItem=function(e,t,n,r,o){var i=s.Instance.createElement(this.question.itemComponent,{key:e,question:this.question,cssClasses:r,isDisplayMode:this.isDisplayMode,item:t,textStyle:this.textStyle,index:o,isChecked:n===t.value}),u=this.question.survey,l=null;return u&&(l=a.wrapItemValue(u,i,this.question,t)),null!=l?l:i},t.prototype.getStateValue=function(){return this.question.isEmpty()?"":this.question.renderedValue},t}(h),xt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n.handleOnMouseDown=n.handleOnMouseDown.bind(n),n}return qt(t,e),t.prototype.getStateElement=function(){return this.item},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textStyle",{get:function(){return this.props.textStyle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isChecked",{get:function(){return this.props.isChecked},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hideCaption",{get:function(){return!0===this.props.hideCaption},enumerable:!1,configurable:!0}),t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(!!this.question&&!(this.question.customWidget&&!this.question.customWidgetData.isNeedRender&&!this.question.customWidget.widgetJson.isDefaultRender&&!this.question.customWidget.widgetJson.render))},t.prototype.handleOnChange=function(e){this.question.clickItemHandler(this.item)},t.prototype.handleOnMouseDown=function(e){this.question.onMouseDown()},t.prototype.canRender=function(){return!!this.question&&!!this.item},t.prototype.renderElement=function(){var e=this.question.getItemClass(this.item),t=this.question.getLabelClass(this.item),n=this.question.getControlLabelClass(this.item),o=this.hideCaption?null:r.createElement("span",{className:n},this.renderLocString(this.item.locText,this.textStyle));return r.createElement("div",{className:e,role:"presentation"},r.createElement("label",{onMouseDown:this.handleOnMouseDown,className:t},r.createElement("input",{"aria-errormessage":this.question.ariaErrormessage,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),readOnly:this.question.isReadOnlyAttr,onChange:this.handleOnChange}),this.cssClasses.materialDecorator?r.createElement("span",{className:this.cssClasses.materialDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:this.cssClasses.itemDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,o))},t}(p);s.Instance.registerElement("survey-radiogroup-item",(function(e){return r.createElement(xt,e)})),W.Instance.registerQuestion("radiogroup",(function(e){return r.createElement(St,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)}}(),It=function(e){function t(t){return e.call(this,t)||this}return _t(t,e),t.prototype.renderInput=function(){var e=this,t=this.question.getControlClass(),n=this.question.renderedPlaceholder;if(this.question.isReadOnlyRenderDiv())return r.createElement("div",null,this.question.inputValue);var o=this.question.getMaxLength()?r.createElement(Q,{counter:this.question.characterCounter,remainingCharacterCounter:this.question.cssClasses.remainingCharacterCounter}):null;return r.createElement(r.Fragment,null,r.createElement("input",{id:this.question.inputId,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,className:t,type:this.question.inputType,ref:function(t){return e.setControl(t)},style:this.question.inputStyle,maxLength:this.question.getMaxLength(),min:this.question.renderedMin,max:this.question.renderedMax,step:this.question.renderedStep,size:this.question.inputSize,placeholder:n,list:this.question.dataListId,autoComplete:this.question.autocomplete,onBlur:this.question.onBlur,onFocus:this.question.onFocus,onChange:this.question.onChange,onKeyUp:this.question.onKeyUp,onKeyDown:this.question.onKeyDown,onCompositionUpdate:function(t){return e.question.onCompositionUpdate(t.nativeEvent)},"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage}),o)},t.prototype.renderElement=function(){return this.question.dataListId?r.createElement("div",null,this.renderInput(),this.renderDataList()):this.renderInput()},t.prototype.setValueCore=function(e){this.question.inputValue=e},t.prototype.getValueCore=function(){return this.question.inputValue},t.prototype.renderDataList=function(){if(!this.question.dataListId)return null;var e=this.question.dataList;if(0==e.length)return null;for(var t=[],n=0;n<e.length;n++)t.push(r.createElement("option",{key:"item"+n,value:e[n]}));return r.createElement("datalist",{id:this.question.dataListId},t)},t}(d);W.Instance.registerQuestion("text",(function(e){return r.createElement(It,e)}));var Vt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n.handleOnClick=n.handleOnClick.bind(n),n.handleOnLabelClick=n.handleOnLabelClick.bind(n),n.handleOnSwitchClick=n.handleOnSwitchClick.bind(n),n.handleOnKeyDown=n.handleOnKeyDown.bind(n),n.checkRef=r.createRef(),n}return Vt(t,e),t.prototype.getStateElement=function(){return this.question},Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.doCheck=function(e){this.question.booleanValue=e},t.prototype.handleOnChange=function(e){this.doCheck(e.target.checked)},t.prototype.handleOnClick=function(e){this.question.onLabelClick(e,!0)},t.prototype.handleOnSwitchClick=function(e){this.question.onSwitchClickModel(e.nativeEvent)},t.prototype.handleOnLabelClick=function(e,t){this.question.onLabelClick(e,t)},t.prototype.handleOnKeyDown=function(e){this.question.onKeyDownCore(e)},t.prototype.updateDomElement=function(){if(this.question){var t=this.checkRef.current;t&&(t.indeterminate=this.question.isIndeterminate),this.setControl(t),e.prototype.updateDomElement.call(this)}},t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=this.question.getItemCss();return r.createElement("div",{className:t.root,onKeyDown:this.handleOnKeyDown},r.createElement("label",{className:n,onClick:this.handleOnClick},r.createElement("input",{ref:this.checkRef,type:"checkbox",name:this.question.name,value:null===this.question.booleanValue?"":this.question.booleanValue,id:this.question.inputId,className:t.control,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,checked:this.question.booleanValue||!1,onChange:this.handleOnChange,role:this.question.a11y_input_ariaRole,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage}),r.createElement("div",{className:t.sliderGhost,onClick:function(t){return e.handleOnLabelClick(t,e.question.swapOrder)}},r.createElement("span",{className:this.question.getLabelCss(this.question.swapOrder)},this.renderLocString(this.question.locLabelLeft))),r.createElement("div",{className:t.switch,onClick:this.handleOnSwitchClick},r.createElement("span",{className:t.slider},this.question.isDeterminated&&t.sliderText?r.createElement("span",{className:t.sliderText},this.renderLocString(this.question.getCheckedLabel())):null)),r.createElement("div",{className:t.sliderGhost,onClick:function(t){return e.handleOnLabelClick(t,!e.question.swapOrder)}},r.createElement("span",{className:this.question.getLabelCss(!this.question.swapOrder)},this.renderLocString(this.question.locLabelRight)))))},t}(h);W.Instance.registerQuestion("boolean",(function(e){return r.createElement(Tt,e)}));var Nt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),At=function(e){function t(t){return e.call(this,t)||this}return Nt(t,e),t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.getCheckboxItemCss(),n=this.question.canRenderLabelDescription?c.renderQuestionDescription(this.question):null;return r.createElement("div",{className:e.rootCheckbox},r.createElement("div",{className:t},r.createElement("label",{className:e.checkboxLabel},r.createElement("input",{ref:this.checkRef,type:"checkbox",name:this.question.name,value:null===this.question.booleanValue?"":this.question.booleanValue,id:this.question.inputId,className:e.controlCheckbox,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,checked:this.question.booleanValue||!1,onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage}),r.createElement("span",{className:e.checkboxMaterialDecorator},this.question.svgIcon?r.createElement("svg",{className:e.checkboxItemDecorator},r.createElement("use",{xlinkHref:this.question.svgIcon})):null,r.createElement("span",{className:"check"})),this.question.isLabelRendered&&r.createElement("span",{className:e.checkboxControlLabel,id:this.question.labelRenderedAriaID},r.createElement(B,{element:this.question,cssClasses:this.question.cssClasses}))),n))},t}(Tt);W.Instance.registerQuestion("sv-boolean-checkbox",(function(e){return r.createElement(At,e)})),i.RendererFactory.Instance.registerRenderer("boolean","checkbox","sv-boolean-checkbox");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)}}(),Rt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=function(e){n.question.booleanValue="true"==e.nativeEvent.target.value},n}return jt(t,e),t.prototype.renderRadioItem=function(e,t){var n=this.question.cssClasses;return r.createElement("div",{role:"presentation",className:this.question.getRadioItemClass(n,e)},r.createElement("label",{className:n.radioLabel},r.createElement("input",{type:"radio",name:this.question.name,value:e,"aria-errormessage":this.question.ariaErrormessage,checked:e===this.question.booleanValueRendered,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,className:n.itemRadioControl,onChange:this.handleOnChange}),this.question.cssClasses.materialRadioDecorator?r.createElement("span",{className:n.materialRadioDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:n.itemRadioDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,r.createElement("span",{className:n.radioControlLabel},this.renderLocString(t))))},t.prototype.renderElement=function(){var e=this.question.cssClasses;return r.createElement("div",{className:e.rootRadio},r.createElement("fieldset",{role:"presentation",className:e.radioFieldset},this.question.swapOrder?r.createElement(r.Fragment,null,this.renderRadioItem(!0,this.question.locLabelTrue),this.renderRadioItem(!1,this.question.locLabelFalse)):r.createElement(r.Fragment,null,this.renderRadioItem(!1,this.question.locLabelFalse),this.renderRadioItem(!0,this.question.locLabelTrue))))},t}(Tt);W.Instance.registerQuestion("sv-boolean-radio",(function(e){return r.createElement(Rt,e)})),i.RendererFactory.Instance.registerRenderer("boolean","radio","sv-boolean-radio");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)}}(),Lt=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:n.question.value},n}return Dt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return r.createElement("div",null)},t}(h);W.Instance.registerQuestion("empty",(function(e){return r.createElement(Lt,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)}}(),Mt=function(e){function t(t){var n=e.call(this,t)||this;return n.root=o.a.createRef(),n.onPointerDownHandler=function(e){n.parentMatrix.onPointerDown(e.nativeEvent,n.model.row)},n}return kt(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.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.root.current&&this.model.setRootElement(this.root.current)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model.setRootElement(void 0)},t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(t.model!==this.model&&(t.element&&t.element.setRootElement(this.root.current),this.model&&this.model.setRootElement(void 0)),!0)},t.prototype.render=function(){var e=this,t=this.model;return t.visible?o.a.createElement("tr",{ref:this.root,className:t.className,"data-sv-drop-target-matrix-row":t.row&&t.row.id,onPointerDown:function(t){return e.onPointerDownHandler(t)}},this.props.children):null},t}(c);s.Instance.registerElement("sv-matrix-row",(function(e){return o.a.createElement(Mt,e)}));var Ft=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ft(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item.data.question},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return this.question.iconDragElement?o.a.createElement("svg",{className:this.question.cssClasses.dragElementDecorator},o.a.createElement("use",{xlinkHref:this.question.iconDragElement})):o.a.createElement("span",{className:this.question.cssClasses.iconDrag})},t}(p);s.Instance.registerElement("sv-matrix-drag-drop-icon",(function(e){return o.a.createElement(Bt,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)}}(),Ht=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return zt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"table",{get:function(){return this.question.renderedTable},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.table},t.prototype.wrapCell=function(e,t,n){return this.props.wrapCell(e,t,n)},t.prototype.renderHeader=function(){var e=this.question.renderedTable;if(!e.showHeader)return null;for(var t=[],n=e.headerRow.cells,o=0;o<n.length;o++){var i=n[o],s="column"+o,a={};i.width&&(a.width=i.width),i.minWidth&&(a.minWidth=i.minWidth);var u=this.renderCellContent(i,"column-header",{}),l=i.hasTitle?r.createElement("th",{className:i.className,key:s,style:a}," ",u," "):r.createElement("td",{className:i.className,key:s,style:a});t.push(l)}return r.createElement("thead",null,r.createElement("tr",null,t))},t.prototype.renderFooter=function(){var e=this.question.renderedTable;if(!e.showFooter)return null;var t=this.renderRow("footer",e.footerRow,this.question.cssClasses,"row-footer");return r.createElement("tfoot",null,t)},t.prototype.renderRows=function(){for(var e=this.question.cssClasses,t=[],n=this.question.renderedTable.renderedRows,o=0;o<n.length;o++)t.push(this.renderRow(n[o].id,n[o],e));return r.createElement("tbody",null,t)},t.prototype.renderRow=function(e,t,n,o){for(var i=[],s=t.cells,a=0;a<s.length;a++)i.push(this.renderCell(s[a],a,n,o));var u="row"+e;return r.createElement(r.Fragment,{key:u},"row-footer"==o?r.createElement("tr",null,i):r.createElement(Mt,{model:t,parentMatrix:this.question},i))},t.prototype.renderCell=function(e,t,n,o){var i="cell"+t;if(e.hasQuestion)return r.createElement(Jt,{key:i,cssClasses:n,cell:e,creator:this.creator,reason:o});var s=o;s||(s=e.hasTitle?"row-header":"");var a=this.renderCellContent(e,s,n),u=null;return(e.width||e.minWidth)&&(u={},e.width&&(u.width=e.width),e.minWidth&&(u.minWidth=e.minWidth)),r.createElement("td",{className:e.className,key:i,style:u,colSpan:e.colSpans,title:e.getTitle()},a)},t.prototype.renderCellContent=function(e,t,n){var o=null,i=null;if((e.width||e.minWidth)&&(i={},e.width&&(i.width=e.width),e.minWidth&&(i.minWidth=e.minWidth)),e.hasTitle){t="row-header";var a=this.renderLocString(e.locTitle),u=e.column?r.createElement(Qt,{column:e.column,question:this.question}):null;o=r.createElement(r.Fragment,null,a,u)}if(e.isDragHandlerCell&&(o=r.createElement(r.Fragment,null,r.createElement(Bt,{item:{data:{row:e.row,question:this.question}}}))),e.isActionsCell&&(o=s.Instance.createElement("sv-matrixdynamic-actions-cell",{question:this.question,cssClasses:n,cell:e,model:e.item.getData()})),e.hasPanel&&(o=r.createElement(_e,{key:e.panel.id,element:e.panel,survey:this.question.survey,cssClasses:n,isDisplayMode:this.isDisplayMode,creator:this.creator})),e.isErrorsCell&&e.isErrorsCell)return r.createElement(se,{question:e.question,creator:this.creator});if(!o)return null;var l=r.createElement(r.Fragment,null,o);return this.wrapCell(e,l,t)},t.prototype.renderElement=function(){var e=this.renderHeader(),t=this.renderFooter(),n=this.renderRows();return r.createElement("table",{className:this.question.getTableCss()},e,n,t)},t}(c),Wt=function(e){function t(t){var n=e.call(this,t)||this;n.question.renderedTable;return n.state=n.getState(),n}return zt(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.onRenderedTableResetCallback=function(){t.updateStateOnCallback()}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question.onRenderedTableResetCallback=function(){}},t.prototype.renderElement=function(){return this.renderTableDiv()},t.prototype.renderTableDiv=function(){var e=this,t=this.question.showHorizontalScroll?{overflowX:"scroll"}:{};return r.createElement("div",{style:t,className:this.question.cssClasses.tableWrapper,ref:function(t){return e.setControl(t)}},r.createElement(Ht,{question:this.question,creator:this.creator,wrapCell:function(t,n,r){return e.wrapCell(t,n,r)}}))},t}(h),Ut=function(e){function t(t){return e.call(this,t)||this}return zt(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return r.createElement(L,{model:this.model,handleClick:!1})},t}(p);s.Instance.registerElement("sv-matrixdynamic-actions-cell",(function(e){return r.createElement(Ut,e)}));var Qt=function(e){function t(t){return e.call(this,t)||this}return zt(t,e),Object.defineProperty(t.prototype,"column",{get:function(){return this.props.column},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.column},t.prototype.renderElement=function(){return this.column.isRenderedRequired?r.createElement(r.Fragment,null,r.createElement("span",null," "),r.createElement("span",{className:this.question.cssClasses.cellRequiredText},this.column.requiredText)):null},t}(p),Jt=function(e){function t(t){return e.call(this,t)||this}return zt(t,e),Object.defineProperty(t.prototype,"cell",{get:function(){return this.props.cell},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemCss",{get:function(){return this.cell?this.cell.className:""},enumerable:!1,configurable:!0}),t.prototype.getQuestion=function(){var t=e.prototype.getQuestion.call(this);return t||(this.cell?this.cell.question:null)},t.prototype.doAfterRender=function(){var e=this.cellRef.current;if(e&&this.cell&&this.question&&this.question.survey&&"r"!==e.getAttribute("data-rendered")){e.setAttribute("data-rendered","r");var t={cell:this.cell,cellQuestion:this.question,htmlElement:e,row:this.cell.row,column:this.cell.cell.column};this.question.survey.matrixAfterCellRender(this.question,t),this.question.afterRenderCore(e)}},t.prototype.getShowErrors=function(){return this.question.isVisible&&(!this.cell.isChoice||this.cell.isFirstChoice)},t.prototype.getCellStyle=function(){var t=e.prototype.getCellStyle.call(this);return(this.cell.width||this.cell.minWidth)&&(t||(t={}),this.cell.width&&(t.width=this.cell.width),this.cell.minWidth&&(t.minWidth=this.cell.minWidth)),t},t.prototype.getHeaderText=function(){return this.cell.headers},t.prototype.renderCellContent=function(){var t=e.prototype.renderCellContent.call(this),n=this.cell.showResponsiveTitle?r.createElement("span",{className:this.cell.responsiveTitleCss},this.renderLocString(this.cell.responsiveLocTitle)):null;return r.createElement(r.Fragment,null,n,t)},t.prototype.renderQuestion=function(){return this.question.isVisible?this.cell.isChoice?this.cell.isOtherChoice?this.renderOtherComment():this.cell.isCheckbox?this.renderCellCheckboxButton():this.renderCellRadiogroupButton():ne.renderQuestionBody(this.creator,this.question):r.createElement(r.Fragment,null)},t.prototype.renderOtherComment=function(){var e=this.cell.question,t=e.cssClasses||{};return r.createElement(Y,{question:e,cssClasses:t,otherCss:t.other,isDisplayMode:e.isInputReadOnly})},t.prototype.renderCellCheckboxButton=function(){var e=this.cell.question.id+"item"+this.cell.choiceIndex;return r.createElement(Ae,{key:e,question:this.cell.question,cssClasses:this.cell.question.cssClasses,isDisplayMode:this.cell.question.isInputReadOnly,item:this.cell.item,isFirst:this.cell.isFirstChoice,index:this.cell.choiceIndex.toString(),hideCaption:!0})},t.prototype.renderCellRadiogroupButton=function(){var e=this.cell.question.id+"item"+this.cell.choiceIndex;return r.createElement(xt,{key:e,question:this.cell.question,cssClasses:this.cell.question.cssClasses,isDisplayMode:this.cell.question.isInputReadOnly,item:this.cell.item,index:this.cell.choiceIndex.toString(),isChecked:this.cell.question.value===this.cell.item.value,isDisabled:this.cell.question.isReadOnly||!this.cell.item.isEnabled,hideCaption:!0})},t}(ie),Kt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gt=function(e){function t(t){return e.call(this,t)||this}return Kt(t,e),t}(Wt);W.Instance.registerQuestion("matrixdropdown",(function(e){return r.createElement(Gt,e)}));var Yt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnRowAddClick=n.handleOnRowAddClick.bind(n),n}return Yt(t,e),Object.defineProperty(t.prototype,"matrix",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.handleOnRowAddClick=function(e){this.matrix.addRowUI()},t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.renderedTable.showTable?this.renderTableDiv():this.renderNoRowsContent(e);return r.createElement("div",null,this.renderAddRowButtonOnTop(e),t,this.renderAddRowButtonOnBottom(e))},t.prototype.renderAddRowButtonOnTop=function(e){return this.matrix.renderedTable.showAddRowOnTop?this.renderAddRowButton(e):null},t.prototype.renderAddRowButtonOnBottom=function(e){return this.matrix.renderedTable.showAddRowOnBottom?this.renderAddRowButton(e):null},t.prototype.renderNoRowsContent=function(e){var t=this.renderLocString(this.matrix.locEmptyRowsText),n=r.createElement("div",{className:e.emptyRowsText},t),o=this.matrix.renderedTable.showAddRow?this.renderAddRowButton(e,!0):void 0;return r.createElement("div",{className:e.emptyRowsSection},n,o)},t.prototype.renderAddRowButton=function(e,t){return void 0===t&&(t=!1),s.Instance.createElement("sv-matrixdynamic-add-btn",{question:this.question,cssClasses:e,isEmptySection:t})},t}(Wt);W.Instance.registerQuestion("matrixdynamic",(function(e){return r.createElement(Zt,e)}));var $t=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnRowAddClick=n.handleOnRowAddClick.bind(n),n}return Yt(t,e),Object.defineProperty(t.prototype,"matrix",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.handleOnRowAddClick=function(e){this.matrix.addRowUI()},t.prototype.renderElement=function(){var e=this.renderLocString(this.matrix.locAddRowText),t=r.createElement("button",{className:this.matrix.getAddRowButtonCss(this.props.isEmptySection),type:"button",disabled:this.matrix.isInputReadOnly,onClick:this.matrix.isDesignMode?void 0:this.handleOnRowAddClick},e,r.createElement("span",{className:this.props.cssClasses.iconAdd}));return this.props.isEmptySection?t:r.createElement("div",{className:this.props.cssClasses.footer},t)},t}(p);s.Instance.registerElement("sv-matrixdynamic-add-btn",(function(e){return r.createElement($t,e)}));var Xt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),en=function(e){function t(t){return e.call(this,t)||this}return Xt(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this.props.item&&this.props.item.data||this.props.data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item&&this.props.item.data.question||this.props.data.question},enumerable:!1,configurable:!0}),t}(p),tn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.addPanelUI()},t}return Xt(t,e),t.prototype.renderElement=function(){if(!this.question.canAddPanel)return null;var e=this.renderLocString(this.question.locPanelAddText);return o.a.createElement("button",{type:"button",className:this.question.getAddButtonCss(),onClick:this.handleClick},o.a.createElement("span",{className:this.question.cssClasses.buttonAddText},e))},t}(en);s.Instance.registerElement("sv-paneldynamic-add-btn",(function(e){return o.a.createElement(tn,e)}));var nn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.goToNextPanel()},t}return nn(t,e),t.prototype.renderElement=function(){return o.a.createElement("div",{title:this.question.panelNextText,onClick:this.handleClick,className:this.question.getNextButtonCss()},o.a.createElement(E,{iconName:this.question.cssClasses.progressBtnIcon,size:"auto"}))},t}(en);s.Instance.registerElement("sv-paneldynamic-next-btn",(function(e){return o.a.createElement(rn,e)}));var on=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.goToPrevPanel()},t}return on(t,e),t.prototype.renderElement=function(){return o.a.createElement("div",{title:this.question.panelPrevText,onClick:this.handleClick,className:this.question.getPrevButtonCss()},o.a.createElement(E,{iconName:this.question.cssClasses.progressBtnIcon,size:"auto"}))},t}(en);s.Instance.registerElement("sv-paneldynamic-prev-btn",(function(e){return o.a.createElement(sn,e)}));var an=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),un=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return an(t,e),t.prototype.renderElement=function(){return o.a.createElement("div",{className:this.question.cssClasses.progressText},this.question.progressText)},t}(en);s.Instance.registerElement("sv-paneldynamic-progress-text",(function(e){return o.a.createElement(un,e)}));var ln=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cn=function(e){function t(t){return e.call(this,t)||this}return ln(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.setState({panelCounter:0});var t=this;this.question.panelCountChangedCallback=function(){t.updateQuestionRendering()},this.question.currentIndexChangedCallback=function(){t.updateQuestionRendering()},this.question.renderModeChangedCallback=function(){t.updateQuestionRendering()}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question.panelCountChangedCallback=function(){},this.question.currentIndexChangedCallback=function(){},this.question.renderModeChangedCallback=function(){}},t.prototype.updateQuestionRendering=function(){this.setState({panelCounter:this.state?this.state.panelCounter+1:1})},t.prototype.renderElement=function(){var e=this,t=[];this.question.renderedPanels.forEach((function(n,o){t.push(r.createElement(pn,{key:n.id,element:n,question:e.question,index:o,cssClasses:e.question.cssClasses,isDisplayMode:e.isDisplayMode,creator:e.creator}))}));var n=this.question.isRenderModeList&&this.question.showLegacyNavigation?this.renderAddRowButton():null,o=this.question.isProgressTopShowing?this.renderNavigator():null,i=this.question.isProgressBottomShowing?this.renderNavigator():null,s=this.renderNavigatorV2(),a=this.renderPlaceholder();return r.createElement("div",{className:this.question.cssClasses.root},a,o,r.createElement("div",{className:this.question.cssClasses.panelsContainer},t),i,n,s)},t.prototype.renderNavigator=function(){if(!this.question.showLegacyNavigation)return this.question.isRangeShowing&&this.question.isProgressTopShowing?this.renderRange():null;var e=this.question.isRangeShowing?this.renderRange():null,t=this.rendrerPrevButton(),n=this.rendrerNextButton(),o=this.renderAddRowButton(),i=this.question.isProgressTopShowing?this.question.cssClasses.progressTop:this.question.cssClasses.progressBottom;return r.createElement("div",{className:i},r.createElement("div",{style:{clear:"both"}},r.createElement("div",{className:this.question.cssClasses.progressContainer},t,e,n),o,this.renderProgressText()))},t.prototype.renderProgressText=function(){return r.createElement(un,{data:{question:this.question}})},t.prototype.rendrerPrevButton=function(){return r.createElement(sn,{data:{question:this.question}})},t.prototype.rendrerNextButton=function(){return r.createElement(rn,{data:{question:this.question}})},t.prototype.renderRange=function(){return r.createElement("div",{className:this.question.cssClasses.progress},r.createElement("div",{className:this.question.cssClasses.progressBar,style:{width:this.question.progress},role:"progressbar"}))},t.prototype.renderAddRowButton=function(){return s.Instance.createElement("sv-paneldynamic-add-btn",{data:{question:this.question}})},t.prototype.renderNavigatorV2=function(){if(!this.question.showNavigation)return null;var e=this.question.isRangeShowing&&this.question.isProgressBottomShowing?this.renderRange():null;return r.createElement("div",{className:this.question.cssClasses.footer},r.createElement("hr",{className:this.question.cssClasses.separator}),e,this.question.footerToolbar.visibleActions.length?r.createElement("div",{className:this.question.cssClasses.footerButtonsContainer},r.createElement(L,{model:this.question.footerToolbar})):null)},t.prototype.renderPlaceholder=function(){return this.question.getShowNoEntriesPlaceholder()?r.createElement("div",{className:this.question.cssClasses.noEntriesPlaceholder},r.createElement("span",null,this.renderLocString(this.question.locNoEntriesText)),this.renderAddRowButton()):null},t}(h),pn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ln(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),t.prototype.getSurvey=function(){return this.question?this.question.survey:null},t.prototype.getCss=function(){var e=this.getSurvey();return e?e.getCss():{}},t.prototype.render=function(){var t=e.prototype.render.call(this),n=this.renderButton(),o=this.question.showSeparator(this.index)?r.createElement("hr",{className:this.question.cssClasses.separator}):null;return r.createElement(r.Fragment,null,r.createElement("div",{className:this.question.getPanelWrapperCss(this.panel)},t,n),o)},t.prototype.renderButton=function(){return"right"!==this.question.panelRemoveButtonLocation||!this.question.canRemovePanel||this.question.isRenderModeList&&this.panel.isCollapsed?null:s.Instance.createElement("sv-paneldynamic-remove-btn",{data:{question:this.question,panel:this.panel}})},t}(_e);W.Instance.registerQuestion("paneldynamic",(function(e){return r.createElement(cn,e)}));var hn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dn=function(e){function t(t){return e.call(this,t)||this}return hn(t,e),Object.defineProperty(t.prototype,"isTop",{get:function(){return this.props.isTop},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progress",{get:function(){return this.survey.progressValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progressText",{get:function(){return this.survey.progressText},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e={width:this.progress+"%"};return r.createElement("div",{className:this.survey.getProgressCssClasses(this.props.container)},r.createElement("div",{style:e,className:this.css.progressBar,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-label":"progress"},r.createElement("span",{className:i.SurveyProgressModel.getProgressTextInBarCss(this.css)},this.progressText)),r.createElement("span",{className:i.SurveyProgressModel.getProgressTextUnderBarCss(this.css)},this.progressText))},t}(Pe);s.Instance.registerElement("sv-progress-pages",(function(e){return r.createElement(dn,e)})),s.Instance.registerElement("sv-progress-questions",(function(e){return r.createElement(dn,e)})),s.Instance.registerElement("sv-progress-correctquestions",(function(e){return r.createElement(dn,e)})),s.Instance.registerElement("sv-progress-requiredquestions",(function(e){return r.createElement(dn,e)}));var fn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mn=function(e){function t(t){var n=e.call(this,t)||this;return n.listContainerRef=r.createRef(),n}return fn(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"container",{get:function(){return this.props.container},enumerable:!1,configurable:!0}),t.prototype.onResize=function(e){this.setState({canShowItemTitles:e}),this.setState({canShowHeader:!e})},t.prototype.onUpdateScroller=function(e){this.setState({hasScroller:e})},t.prototype.onUpdateSettings=function(){this.setState({canShowItemTitles:this.model.showItemTitles}),this.setState({canShowFooter:!this.model.showItemTitles})},t.prototype.render=function(){var e=this;return r.createElement("div",{className:this.model.getRootCss(this.props.container),style:{maxWidth:this.model.progressWidth},role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-label":"progress"},this.state.canShowHeader?r.createElement("div",{className:this.css.progressButtonsHeader},r.createElement("div",{className:this.css.progressButtonsPageTitle,title:this.model.headerText},this.model.headerText)):null,r.createElement("div",{className:this.css.progressButtonsContainer},r.createElement("div",{className:this.model.getScrollButtonCss(this.state.hasScroller,!0),role:"button",onClick:function(){return e.clickScrollButton(e.listContainerRef.current,!0)}}),r.createElement("div",{className:this.css.progressButtonsListContainer,ref:this.listContainerRef},r.createElement("ul",{className:this.css.progressButtonsList},this.getListElements())),r.createElement("div",{className:this.model.getScrollButtonCss(this.state.hasScroller,!1),role:"button",onClick:function(){return e.clickScrollButton(e.listContainerRef.current,!1)}})),this.state.canShowFooter?r.createElement("div",{className:this.css.progressButtonsFooter},r.createElement("div",{className:this.css.progressButtonsPageTitle,title:this.model.footerText},this.model.footerText)):null)},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,o=c.renderLocString(e.locNavigationTitle);return r.createElement("li",{key:"listelement"+t,className:this.model.getListElementCss(t),onClick:this.model.isListElementClickable(t)?function(){return n.model.clickListElement(e)}:void 0,"data-page-number":this.model.getItemNumber(e)},r.createElement("div",{className:this.css.progressButtonsConnector}),this.state.canShowItemTitles?r.createElement(r.Fragment,null,r.createElement("div",{className:this.css.progressButtonsPageTitle,title:e.renderedNavigationTitle},o),r.createElement("div",{className:this.css.progressButtonsPageDescription,title:e.navigationDescription},e.navigationDescription)):null,r.createElement("div",{className:this.css.progressButtonsButton},r.createElement("div",{className:this.css.progressButtonsButtonBackground}),r.createElement("div",{className:this.css.progressButtonsButtonContent}),r.createElement("span",null,this.model.getItemNumber(e))))},t.prototype.clickScrollButton=function(e,t){e&&(e.scrollLeft+=70*(t?-1:1))},t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this),setTimeout((function(){t.respManager=new i.ProgressButtonsResponsivityManager(t.model,t.listContainerRef.current,t)}),10)},t.prototype.componentWillUnmount=function(){this.respManager&&this.respManager.dispose(),e.prototype.componentWillUnmount.call(this)},t}(Pe);s.Instance.registerElement("sv-progress-buttons",(function(e){return r.createElement(mn,e)}));var yn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleKeydown=function(e){t.model.onKeyDown(e)},t}return yn(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){var e=this;if(!this.item)return null;var t={paddingInlineStart:this.model.getItemIndent(this.item)},n=this.model.getItemClass(this.item),r=this.item.component||"sv-list-item-content",i=s.Instance.createElement(r,{item:this.item,key:this.item.id,model:this.model}),a=o.a.createElement("div",{style:t,className:this.model.cssClasses.itemBody,title:this.item.locTitle.calculatedText,onMouseOver:function(t){e.model.onItemHover(e.item)},onMouseLeave:function(t){e.model.onItemLeave(e.item)}},i),u=this.item.needSeparator?o.a.createElement("div",{className:this.model.cssClasses.itemSeparator}):null,l={display:this.model.isItemVisible(this.item)?null:"none"};return we(o.a.createElement("li",{className:n,role:"option",style:l,id:this.item.elementId,"aria-selected":this.model.isItemSelected(this.item),onClick:function(t){e.model.onItemClick(e.item),t.stopPropagation()},onPointerDown:function(t){return e.model.onPointerDown(t,e.item)}},u,a),this.item)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.onLastItemRended(this.item)},t}(c);s.Instance.registerElement("sv-list-item",(function(e){return o.a.createElement(gn,e)}));var vn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleKeydown=function(e){n.model.onKeyDown(e)},n.handleMouseMove=function(e){n.model.onMouseMove(e)},n.state={filterString:n.model.filterString||""},n.listContainerRef=o.a.createRef(),n}return vn(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.listContainerRef&&this.listContainerRef.current&&this.model.initListContainerHtmlElement(this.listContainerRef.current)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model&&this.model.initListContainerHtmlElement(void 0)},t.prototype.renderElement=function(){return o.a.createElement("div",{className:this.model.cssClasses.root,ref:this.listContainerRef},this.searchElementContent(),this.emptyContent(),this.renderList())},t.prototype.renderList=function(){if(!this.model.renderElements)return null;var e=this.renderItems(),t={display:this.model.isEmpty?"none":null};return o.a.createElement("ul",{className:this.model.getListClass(),style:t,role:"listbox",id:this.model.elementId,onMouseDown:function(e){e.preventDefault()},onKeyDown:this.handleKeydown,onMouseMove:this.handleMouseMove},e)},t.prototype.renderItems=function(){var e=this;if(!this.model)return null;var t=this.model.renderedActions;return t?t.map((function(t,n){return o.a.createElement(gn,{model:e.model,item:t,key:"item"+n})})):null},t.prototype.searchElementContent=function(){var e=this;if(this.model.showFilter){var t=this.model.showSearchClearButton&&this.model.filterString?o.a.createElement("button",{className:this.model.cssClasses.searchClearButtonIcon,onClick:function(t){e.model.onClickSearchClearButton(t)}},o.a.createElement(E,{iconName:"icon-searchclear",size:"auto"})):null;return o.a.createElement("div",{className:this.model.cssClasses.filter},o.a.createElement("div",{className:this.model.cssClasses.filterIcon},o.a.createElement(E,{iconName:"icon-search",size:"auto"})),o.a.createElement("input",{type:"text",className:this.model.cssClasses.filterInput,"aria-label":this.model.filterStringPlaceholder,placeholder:this.model.filterStringPlaceholder,value:this.state.filterString,onKeyUp:function(t){e.model.goToItems(t)},onChange:function(t){var n=i.settings.environment.root;t.target===n.activeElement&&(e.model.filterString=t.target.value)}}),t)}return null},t.prototype.emptyContent=function(){var e={display:this.model.isEmpty?null:"none"};return o.a.createElement("div",{className:this.model.cssClasses.emptyContainer,style:e},o.a.createElement("div",{className:this.model.cssClasses.emptyText,"aria-label":this.model.emptyMessage},this.model.emptyMessage))},t}(c);s.Instance.registerElement("sv-list",(function(e){return o.a.createElement(bn,e)}));var Cn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),En=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Cn(t,e),t.prototype.render=function(){var e,t=this.props.model;return e=t.isMobile?r.createElement("div",{onClick:t.togglePopup},r.createElement(E,{iconName:t.icon,size:24}),r.createElement(V,{model:t.popupModel})):r.createElement(bn,{model:t.listModel}),r.createElement("div",{className:t.containerCss},e)},t}(Pe);s.Instance.registerElement("sv-navigation-toc",(function(e){return r.createElement(En,e)}));var wn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),On=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnClick=n.handleOnClick.bind(n),n}return wn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.handleOnClick=function(e){this.question.setValueFromClick(e.target.value),this.setState({value:this.question.value})},t.prototype.renderItem=function(e,t){return s.Instance.createElement(this.question.itemComponent,{question:this.question,item:e,index:t,key:"value"+t,handleOnClick:this.handleOnClick,isDisplayMode:this.isDisplayMode})},t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=this.question.minRateDescription?this.renderLocString(this.question.locMinRateDescription):null,o=this.question.maxRateDescription?this.renderLocString(this.question.locMaxRateDescription):null;return r.createElement("div",{className:this.question.ratingRootCss,ref:function(t){return e.setControl(t)}},r.createElement("fieldset",{role:"radiogroup"},r.createElement("legend",{role:"presentation",className:"sv-hidden"}),this.question.hasMinLabel?r.createElement("span",{className:t.minText},n):null,this.question.renderedRateItems.map((function(t,n){return e.renderItem(t,n)})),this.question.hasMaxLabel?r.createElement("span",{className:t.maxText},o):null))},t}(h);W.Instance.registerQuestion("rating",(function(e){return r.createElement(On,e)}));var Pn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qn=function(e){function t(t){return e.call(this,t)||this}return Pn(t,e),t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.renderSelect(e);return r.createElement("div",{className:this.question.cssClasses.rootDropdown},t)},t}($e);W.Instance.registerQuestion("sv-rating-dropdown",(function(e){return r.createElement(qn,e)})),i.RendererFactory.Instance.registerRenderer("rating","dropdown","sv-rating-dropdown");var Sn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xn=function(e){function t(t){return e.call(this,t)||this}return Sn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses;return r.createElement("div",{id:this.question.inputId,className:t.root,ref:function(t){return e.setControl(t)}},this.question.formatedValue)},t}(h);W.Instance.registerQuestion("expression",(function(e){return r.createElement(xn,e)}));var _n=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),In=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnExpanded=n.handleOnExpanded.bind(n),n}return _n(t,e),t.prototype.getStateElements=function(){return[this.popup,this.popup.survey]},t.prototype.handleOnExpanded=function(e){this.popup.changeExpandCollapse()},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&this.popup.isShowing},t.prototype.renderElement=function(){var e=this,t=this.renderWindowHeader(),n=this.renderBody(),o={};return this.popup.renderedWidth&&(o.width=this.popup.renderedWidth,o.maxWidth=this.popup.renderedWidth),r.createElement("div",{className:this.popup.cssRoot,style:o,onScroll:function(){return e.popup.onScroll()}},r.createElement("div",{className:this.popup.cssRootContent},t,n))},t.prototype.renderWindowHeader=function(){var e,t=this.popup,n=(t.cssHeaderRoot,null),o=null,i=null;return t.isCollapsed?(" "+t.cssRootCollapsedMod,n=this.renderTitleCollapsed(t),e=this.renderExpandIcon()):e=this.renderCollapseIcon(),t.allowClose&&(o=this.renderCloseButton(this.popup)),t.allowFullScreen&&(i=this.renderAllowFullScreenButon(this.popup)),r.createElement("div",{className:t.cssHeaderRoot},n,r.createElement("div",{className:t.cssHeaderButtonsContainer},i,r.createElement("div",{className:t.cssHeaderCollapseButton,onClick:this.handleOnExpanded},e),o))},t.prototype.renderTitleCollapsed=function(e){return e.locTitle?r.createElement("div",{className:e.cssHeaderTitleCollapsed},e.locTitle.renderedHtml):null},t.prototype.renderExpandIcon=function(){return r.createElement(E,{iconName:"icon-restore_16x16",size:16})},t.prototype.renderCollapseIcon=function(){return r.createElement(E,{iconName:"icon-minimize_16x16",size:16})},t.prototype.renderCloseButton=function(e){return r.createElement("div",{className:e.cssHeaderCloseButton,onClick:function(){e.hide()}},r.createElement(E,{iconName:"icon-close_16x16",size:16}))},t.prototype.renderAllowFullScreenButon=function(e){var t;return t=e.isFullScreen?r.createElement(E,{iconName:"icon-back-to-panel_16x16",size:16}):r.createElement(E,{iconName:"icon-full-screen_16x16",size:16}),r.createElement("div",{className:e.cssHeaderFullScreenButton,onClick:function(){e.toggleFullScreen()}},t)},t.prototype.renderBody=function(){return r.createElement("div",{className:this.popup.cssBody},this.doRender())},t.prototype.createSurvey=function(t){t||(t={}),e.prototype.createSurvey.call(this,t),this.popup=new i.PopupSurveyModel(null,this.survey),t.closeOnCompleteTimeout&&(this.popup.closeOnCompleteTimeout=t.closeOnCompleteTimeout),this.popup.allowClose=t.allowClose,this.popup.allowFullScreen=t.allowFullScreen,this.popup.isShowing=!0,this.popup.isExpanded||!t.expanded&&!t.isExpanded||this.popup.expand()},t}(Ee),Vn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _n(t,e),t}(In),Tn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nn=function(e){function t(t){return e.call(this,t)||this}return Tn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this.question.cssClasses;return r.createElement("fieldset",{className:this.question.getSelectBaseRootCss()},r.createElement("legend",{className:"sv-hidden"},this.question.locTitle.renderedHtml),this.question.hasColumns?this.getColumns(e):this.getItems(e))},t.prototype.getColumns=function(e){var t=this;return this.question.columns.map((function(n,o){var i=n.map((function(n,r){return t.renderItem("item"+r,n,e)}));return r.createElement("div",{key:"column"+o,className:t.question.getColumnClass(),role:"presentation"},i)}))},t.prototype.getItems=function(e){for(var t=[],n=0;n<this.question.visibleChoices.length;n++){var r=this.question.visibleChoices[n],o="item"+n;t.push(this.renderItem(o,r,e))}return t},Object.defineProperty(t.prototype,"textStyle",{get:function(){return{marginLeft:"3px",display:"inline",position:"static"}},enumerable:!1,configurable:!0}),t.prototype.renderItem=function(e,t,n){var o=r.createElement(An,{key:e,question:this.question,item:t,cssClasses:n}),i=this.question.survey,s=null;return i&&(s=a.wrapItemValue(i,o,this.question,t)),null!=s?s:o},t}(h),An=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n}return Tn(t,e),t.prototype.getStateElement=function(){return this.item},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.reactOnStrChanged()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.item.locImageLink.onChanged=function(){}},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.reactOnStrChanged()},t.prototype.reactOnStrChanged=function(){var e=this;this.item.locImageLink.onChanged=function(){e.setState({locImageLinkchanged:e.state&&e.state.locImageLink?e.state.locImageLink+1:1})}},Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.handleOnChange=function(e){if(!this.question.isReadOnlyAttr){if(this.question.multiSelect)if(e.target.checked)this.question.value=this.question.value.concat(e.target.value);else{var t=this.question.value;t.splice(this.question.value.indexOf(e.target.value),1),this.question.value=t}else this.question.value=e.target.value;this.setState({value:this.question.value})}},t.prototype.renderElement=function(){var e=this,t=this.item,n=this.question,o=this.cssClasses,i=n.isItemSelected(t),s=n.getItemClass(t),a=null;n.showLabel&&(a=r.createElement("span",{className:n.cssClasses.itemText},t.text?c.renderLocString(t.locText):t.value));var u={objectFit:this.question.imageFit},l=null;if(t.locImageLink.renderedHtml&&"image"===this.question.contentMode&&(l=r.createElement("img",{className:o.image,src:t.locImageLink.renderedHtml,width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,alt:t.locText.renderedHtml,style:u,onLoad:function(n){e.question.onContentLoaded(t,n.nativeEvent)},onError:function(e){t.onErrorHandler(t,e.nativeEvent)}})),t.locImageLink.renderedHtml&&"video"===this.question.contentMode&&(l=r.createElement("video",{controls:!0,className:o.image,src:t.locImageLink.renderedHtml,width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,style:u,onLoadedMetadata:function(n){e.question.onContentLoaded(t,n.nativeEvent)},onError:function(e){t.onErrorHandler(t,e.nativeEvent)}})),!t.locImageLink.renderedHtml||t.contentNotLoaded){var p={width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,objectFit:this.question.imageFit};l=r.createElement("div",{className:o.itemNoImage,style:p},o.itemNoImageSvgIcon?r.createElement(E,{className:o.itemNoImageSvgIcon,iconName:this.question.cssClasses.itemNoImageSvgIconId,size:48}):null)}return r.createElement("div",{className:s},r.createElement("label",{className:o.label},r.createElement("input",{className:o.itemControl,id:this.question.getItemId(t),type:this.question.inputType,name:this.question.questionName,checked:i,value:t.value,disabled:!this.question.getItemEnabled(t),readOnly:this.question.isReadOnlyAttr,onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage}),r.createElement("div",{className:this.question.cssClasses.itemDecorator},r.createElement("div",{className:this.question.cssClasses.imageContainer},this.question.cssClasses.checkedItemDecorator?r.createElement("span",{className:this.question.cssClasses.checkedItemDecorator},this.question.cssClasses.checkedItemSvgIconId?r.createElement(E,{size:"auto",className:this.question.cssClasses.checkedItemSvgIcon,iconName:this.question.cssClasses.checkedItemSvgIconId}):null):null,l),a)))},t}(p);W.Instance.registerQuestion("imagepicker",(function(e){return r.createElement(Nn,e)}));var jn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Rn=function(e){function t(t){return e.call(this,t)||this}return jn(t,e),t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this),this.question.locImageLink.onChanged=function(){t.forceUpdate()}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question.locImageLink.onChanged=function(){}},Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.getImageCss(),n={objectFit:this.question.imageFit,width:this.question.renderedStyleWidth,height:this.question.renderedStyleHeight};this.question.imageLink&&!this.question.contentNotLoaded||(n.display="none");var o=null;"image"===this.question.renderedMode&&(o=r.createElement("img",{className:t,src:this.question.locImageLink.renderedHtml,alt:this.question.altText||this.question.title,width:this.question.renderedWidth,height:this.question.renderedHeight,style:n,onLoad:function(t){e.question.onLoadHandler()},onError:function(t){e.question.onErrorHandler()}})),"video"===this.question.renderedMode&&(o=r.createElement("video",{controls:!0,className:t,src:this.question.locImageLink.renderedHtml,width:this.question.renderedWidth,height:this.question.renderedHeight,style:n,onLoadedMetadata:function(t){e.question.onLoadHandler()},onError:function(t){e.question.onErrorHandler()}})),"youtube"===this.question.renderedMode&&(o=r.createElement("iframe",{className:t,src:this.question.locImageLink.renderedHtml,width:this.question.renderedWidth,height:this.question.renderedHeight,style:n}));var i=null;return this.question.imageLink&&!this.question.contentNotLoaded||(i=r.createElement("div",{className:this.question.cssClasses.noImage},r.createElement(E,{iconName:this.question.cssClasses.noImageSvgIconId,size:48}))),r.createElement("div",{className:this.question.cssClasses.root},o,i)},t}(h);W.Instance.registerQuestion("image",(function(e){return r.createElement(Rn,e)}));var Dn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ln=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:n.question.value},n}return Dn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=this.question.showLoadingIndicator?this.renderLoadingIndicator():null,o=this.renderCleanButton();return r.createElement("div",{className:t.root,ref:function(t){return e.setControl(t)},style:{width:this.question.renderedCanvasWidth}},r.createElement("div",{className:t.placeholder,style:{display:this.question.needShowPlaceholder()?"":"none"}},this.renderLocString(this.question.locRenderedPlaceholder)),r.createElement("div",null,this.renderBackgroundImage(),r.createElement("canvas",{tabIndex:-1,className:this.question.cssClasses.canvas,onBlur:this.question.onBlur})),o,n)},t.prototype.renderBackgroundImage=function(){return this.question.backgroundImage?r.createElement("img",{className:this.question.cssClasses.backgroundImage,src:this.question.backgroundImage,style:{width:this.question.renderedCanvasWidth}}):null},t.prototype.renderLoadingIndicator=function(){return r.createElement("div",{className:this.question.cssClasses.loadingIndicator},r.createElement(ft,null))},t.prototype.renderCleanButton=function(){var e=this;if(!this.question.canShowClearButton)return null;var t=this.question.cssClasses;return r.createElement("div",{className:t.controls},r.createElement("button",{type:"button",className:t.clearButton,title:this.question.clearButtonCaption,onClick:function(){return e.question.clearValue(!0)}},this.question.cssClasses.clearButtonIconId?r.createElement(E,{iconName:this.question.cssClasses.clearButtonIconId,size:"auto"}):r.createElement("span",null,"✖")))},t}(h);W.Instance.registerQuestion("signaturepad",(function(e){return r.createElement(Ln,e)}));var kn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mn=function(e){function t(t){return e.call(this,t)||this}return kn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.question},t.prototype.renderElement=function(){var e=this.renderItems();return o.a.createElement("div",{className:this.question.cssClasses.root},e)},t.prototype.renderItems=function(){var e=this;return this.question.visibleChoices.map((function(t,n){return o.a.createElement(Fn,{key:e.question.inputId+"_"+n,item:t,question:e.question,index:n})}))},t}(h),Fn=function(e){function t(t){return e.call(this,t)||this}return kn(t,e),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){this.model=new i.ButtonGroupItemModel(this.question,this.item,this.index);var e=this.renderIcon(),t=this.renderInput(),n=this.renderCaption();return o.a.createElement("label",{role:"radio",className:this.model.css.label,title:this.model.caption.renderedHtml},t,o.a.createElement("div",{className:this.model.css.decorator},e,n))},t.prototype.renderIcon=function(){return this.model.iconName?o.a.createElement(E,{className:this.model.css.icon,iconName:this.model.iconName,size:this.model.iconSize||24}):null},t.prototype.renderInput=function(){var e=this;return o.a.createElement("input",{className:this.model.css.control,id:this.model.id,type:"radio",name:this.model.name,checked:this.model.selected,value:this.model.value,disabled:this.model.readOnly,onChange:function(){e.model.onChange()},"aria-required":this.model.isRequired,"aria-label":this.model.caption.renderedHtml,"aria-invalid":this.model.hasErrors,"aria-errormessage":this.model.describedBy,role:"radio"})},t.prototype.renderCaption=function(){if(!this.model.showCaption)return null;var e=this.renderLocString(this.model.caption);return o.a.createElement("span",{className:this.model.css.caption,title:this.model.caption.renderedHtml},e)},t}(c),Bn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zn=function(e){function t(t){return e.call(this,t)||this}return Bn(t,e),t.prototype.getStateElements=function(){var t=e.prototype.getStateElements.call(this);return this.question.contentQuestion&&t.push(this.question.contentQuestion),t},t.prototype.renderElement=function(){return ne.renderQuestionBody(this.creator,this.question.contentQuestion)},t}(d),Hn=function(e){function t(t){return e.call(this,t)||this}return Bn(t,e),t.prototype.canRender=function(){return!!this.question.contentPanel},t.prototype.renderElement=function(){return r.createElement(_e,{element:this.question.contentPanel,creator:this.creator,survey:this.question.survey})},t}(d);W.Instance.registerQuestion("custom",(function(e){return r.createElement(zn,e)})),W.Instance.registerQuestion("composite",(function(e){return r.createElement(Hn,e)}));var Wn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Un=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wn(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(){if(!this.item)return null;var e=[],t=this.renderLocString(this.item.locTitle,void 0,"locString");if(this.item.iconName){var n=o.a.createElement(E,{key:"icon",className:this.model.cssClasses.itemIcon,iconName:this.item.iconName,size:this.item.iconSize,"aria-label":this.item.title});e.push(n),e.push(o.a.createElement("span",{key:"text"},t))}else e.push(t);if(this.item.markerIconName){n=o.a.createElement(E,{key:"marker",className:this.item.cssClasses.itemMarkerIcon,iconName:this.item.markerIconName,size:this.item.markerIconSize});e.push(n)}return o.a.createElement(o.a.Fragment,null,e)},t}(c);s.Instance.registerElement("sv-list-item-content",(function(e){return o.a.createElement(Un,e)}));var Qn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Qn(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;if(!this.item)return null;var t=s.Instance.createElement("sv-list-item-content",{item:this.item,key:"content"+this.item.id,model:this.model});return o.a.createElement(o.a.Fragment,null,t,o.a.createElement(V,{model:null===(e=this.item)||void 0===e?void 0:e.popupModel}))},t}(c);s.Instance.registerElement("sv-list-item-group",(function(e){return o.a.createElement(Jn,e)}));var Kn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gn=function(e){function t(t){return e.call(this,t)||this}return Kn(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=[];return e.push(o.a.createElement("div",{key:"logo-image",className:this.survey.logoClassNames},o.a.createElement("img",{className:this.survey.css.logoImage,src:this.survey.locLogo.renderedHtml,alt:this.survey.locTitle.renderedHtml,width:this.survey.renderedLogoWidth,height:this.survey.renderedLogoHeight,style:{objectFit:this.survey.logoFit,width:this.survey.renderedStyleLogoWidth,height:this.survey.renderedStyleLogoHeight}}))),o.a.createElement(o.a.Fragment,null,e)},t}(o.a.Component);s.Instance.registerElement("sv-logo-image",(function(e){return o.a.createElement(Gn,e)}));var Yn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnRowRemoveClick=n.handleOnRowRemoveClick.bind(n),n}return Yn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item.data.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.item.data.row},enumerable:!1,configurable:!0}),t.prototype.handleOnRowRemoveClick=function(e){this.question.removeRowUI(this.row)},t.prototype.renderElement=function(){var e=this.renderLocString(this.question.locRemoveRowText);return o.a.createElement("button",{className:this.question.getRemoveRowButtonCss(),type:"button",onClick:this.handleOnRowRemoveClick,disabled:this.question.isInputReadOnly},e,o.a.createElement("span",{className:this.question.cssClasses.iconRemove}))},t}(p);s.Instance.registerElement("sv-matrix-remove-button",(function(e){return o.a.createElement(Zn,e)}));var $n=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnShowHideClick=n.handleOnShowHideClick.bind(n),n}return $n(t,e),t.prototype.getStateElement=function(){return this.props.item},Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item.data.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.item.data.row},enumerable:!1,configurable:!0}),t.prototype.handleOnShowHideClick=function(e){this.row.showHideDetailPanelClick()},t.prototype.renderElement=function(){var e=this.row.isDetailPanelShowing,t=e,n=e?this.row.detailPanelId:void 0;return o.a.createElement("button",{type:"button",onClick:this.handleOnShowHideClick,className:this.question.getDetailPanelButtonCss(this.row),"aria-expanded":t,"aria-controls":n},o.a.createElement(E,{className:this.question.getDetailPanelIconCss(this.row),iconName:this.question.getDetailPanelIconId(this.row),size:"auto"}))},t}(p);s.Instance.registerElement("sv-matrix-detail-button",(function(e){return o.a.createElement(Xn,e)}));var er=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.removePanelUI(t.data.panel)},t}return er(t,e),t.prototype.renderElement=function(){var e=this.renderLocString(this.question.locPanelRemoveText);return o.a.createElement("button",{className:this.question.getPanelRemoveButtonCss(),onClick:this.handleClick,type:"button"},o.a.createElement("span",{className:this.question.cssClasses.buttonRemoveText},e),o.a.createElement("span",{className:this.question.cssClasses.iconRemove}))},t}(en);s.Instance.registerElement("sv-paneldynamic-remove-btn",(function(e){return o.a.createElement(tr,e)}));var nr=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nr(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return this.item.isVisible},t.prototype.renderElement=function(){return o.a.createElement("input",{className:this.item.innerCss,type:"button",disabled:this.item.disabled,onMouseDown:this.item.data&&this.item.data.mouseDown,onClick:this.item.action,title:this.item.getTooltip(),value:this.item.title})},t}(p);s.Instance.registerElement("sv-nav-btn",(function(e){return o.a.createElement(rr,e)}));var or=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ir=function(e){function t(t){var n=e.call(this,t)||this;return n.onChangedHandler=function(e,t){n.isRendering||n.setState({changed:n.state&&n.state.changed?n.state.changed+1:1})},n.rootRef=o.a.createRef(),n}return or(t,e),Object.defineProperty(t.prototype,"locStr",{get:function(){return this.props.locStr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this.props.style},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.reactOnStrChanged()},t.prototype.componentWillUnmount=function(){this.locStr&&this.locStr.onStringChanged.remove(this.onChangedHandler)},t.prototype.componentDidUpdate=function(e,t){e.locStr&&e.locStr.onStringChanged.remove(this.onChangedHandler),this.reactOnStrChanged()},t.prototype.reactOnStrChanged=function(){this.locStr&&this.locStr.onStringChanged.add(this.onChangedHandler)},t.prototype.render=function(){if(!this.locStr)return null;this.isRendering=!0;var e=this.renderString();return this.isRendering=!1,e},t.prototype.renderString=function(){var e=this.locStr.allowLineBreaks?"sv-string-viewer sv-string-viewer--multiline":"sv-string-viewer";if(this.locStr.hasHtml){var t={__html:this.locStr.renderedHtml};return o.a.createElement("span",{ref:this.rootRef,className:e,style:this.style,dangerouslySetInnerHTML:t})}return o.a.createElement("span",{ref:this.rootRef,className:e,style:this.style},this.locStr.renderedHtml)},t}(o.a.Component);s.Instance.registerElement(i.LocalizableString.defaultRenderer,(function(e){return o.a.createElement(ir,e)}));var sr=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ar=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return sr(t,e),t.prototype.render=function(){return o.a.createElement("div",null,o.a.createElement("span",{className:this.props.cssClasses.error.icon||void 0,"aria-hidden":"true"}),o.a.createElement("span",{className:this.props.cssClasses.error.item||void 0},o.a.createElement(ir,{locStr:this.props.error.locText})))},t}(o.a.Component);s.Instance.registerElement("sv-question-error",(function(e){return o.a.createElement(ar,e)}));var ur=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ur(t,e),t.prototype.render=function(){var e;return o.a.createElement("div",{className:"sv-skeleton-element",id:null===(e=this.props.element)||void 0===e?void 0:e.id})},t}(o.a.Component);s.Instance.registerElement("sv-skeleton",(function(e){return o.a.createElement(lr,e)}));var cr=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return cr(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.renderLogoImage=function(){var e=this.model.survey.getElementWrapperComponentName(this.model.survey,"logo-image"),t=this.model.survey.getElementWrapperComponentData(this.model.survey,"logo-image");return s.Instance.createElement(e,{data:t})},t.prototype.render=function(){return o.a.createElement("div",{className:"sv-header--mobile"},this.model.survey.hasLogo?o.a.createElement("div",{className:"sv-header__logo"},this.renderLogoImage()):null,this.model.survey.hasTitle?o.a.createElement("div",{className:"sv-header__title",style:{maxWidth:this.model.textAreaWidth}},o.a.createElement(H,{element:this.model.survey})):null,this.model.survey.renderedHasDescription?o.a.createElement("div",{className:"sv-header__description",style:{maxWidth:this.model.textAreaWidth}},o.a.createElement("div",{className:this.model.survey.css.description},c.renderLocString(this.model.survey.locDescription))):null)},t}(o.a.Component),hr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return cr(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.renderLogoImage=function(){var e=this.model.survey.getElementWrapperComponentName(this.model.survey,"logo-image"),t=this.model.survey.getElementWrapperComponentData(this.model.survey,"logo-image");return s.Instance.createElement(e,{data:t})},t.prototype.render=function(){return o.a.createElement("div",{className:this.model.css,style:this.model.style},o.a.createElement("div",{className:"sv-header__cell-content",style:this.model.contentStyle},this.model.showLogo?o.a.createElement("div",{className:"sv-header__logo"},this.renderLogoImage()):null,this.model.showTitle?o.a.createElement("div",{className:"sv-header__title",style:{maxWidth:this.model.textAreaWidth}},o.a.createElement(H,{element:this.model.survey})):null,this.model.showDescription?o.a.createElement("div",{className:"sv-header__description",style:{maxWidth:this.model.textAreaWidth}},o.a.createElement("div",{className:this.model.survey.css.description},c.renderLocString(this.model.survey.locDescription))):null))},t}(o.a.Component),dr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return cr(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){if(this.model.survey=this.props.survey,"advanced"!==this.props.survey.headerView)return null;var e=null;return e=this.props.survey.isMobile?o.a.createElement(pr,{model:this.model}):o.a.createElement("div",{className:this.model.contentClasses,style:{maxWidth:this.model.maxWidth}},this.model.cells.map((function(e,t){return o.a.createElement(hr,{key:t,model:e})}))),o.a.createElement("div",{className:this.model.headerClasses,style:{height:this.model.renderedHeight}},this.model.backgroundImage?o.a.createElement("div",{style:this.model.backgroundImageStyle,className:this.model.backgroundImageClasses}):null,e)},t}(c);s.Instance.registerElement("sv-header",(function(e){return o.a.createElement(dr,e)}));var fr=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mr=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 fr(t,e),Object.defineProperty(t.prototype,"locStr",{get:function(){return this.props.locStr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this.props.style},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(this.locStr){var e=this;this.locStr.onChanged=function(){e.setState({changed:e.state.changed+1})}}},t.prototype.componentWillUnmount=function(){this.locStr&&(this.locStr.onChanged=function(){})},t.prototype.render=function(){if(!this.locStr)return null;if(this.locStr.hasHtml){var e={__html:this.locStr.renderedHtml};return o.a.createElement("span",{className:"sv-string-editor",contentEditable:"true",suppressContentEditableWarning:!0,style:this.style,dangerouslySetInnerHTML:e,onBlur:this.onInput,onClick:this.onClick})}return o.a.createElement("span",{className:"sv-string-editor",contentEditable:"true",suppressContentEditableWarning:!0,style:this.style,onBlur:this.onInput,onClick:this.onClick},this.locStr.renderedHtml)},t}(o.a.Component);s.Instance.registerElement(i.LocalizableString.editableRenderer,(function(e){return o.a.createElement(mr,e)}));var yr=function(){function e(){}return e.isAvailable=function(){return"undefined"!=typeof window},e.isFileReaderAvailable=function(){return!!e.isAvailable()&&!!window.FileReader},e.getLocation=function(){if(e.isAvailable())return window.location},e.getVisualViewport=function(){return e.isAvailable()?window.visualViewport:null},e.getInnerWidth=function(){if(e.isAvailable())return window.innerWidth},e.getInnerHeight=function(){return e.isAvailable()?window.innerHeight:null},e.getWindow=function(){if(e.isAvailable())return window},e.hasOwn=function(t){if(e.isAvailable())return t in window},e.getSelection=function(){if(e.isAvailable()&&window.getSelection)return window.getSelection()},e.requestAnimationFrame=function(t){if(e.isAvailable())return window.requestAnimationFrame(t)},e.addEventListener=function(t,n){e.isAvailable()&&window.addEventListener(t,n)},e.removeEventListener=function(t,n){e.isAvailable()&&window.removeEventListener(t,n)},e.matchMedia=function(t){return e.isAvailable()&&void 0!==window.matchMedia?window.matchMedia(t):null},e}(),gr=function(){function e(){}return e.isAvailable=function(){return"undefined"!=typeof document},e.getBody=function(){if(e.isAvailable())return document.body},e.getDocumentElement=function(){if(e.isAvailable())return document.documentElement},e.getDocument=function(){if(e.isAvailable())return document},e.getCookie=function(){if(e.isAvailable())return document.cookie},e.setCookie=function(t){e.isAvailable()&&(document.cookie=t)},e.activeElementBlur=function(){if(e.isAvailable()){var t=document.activeElement;t&&t.blur&&t.blur()}},e.createElement=function(t){if(e.isAvailable())return document.createElement(t)},e.getComputedStyle=function(t){return e.isAvailable()?document.defaultView.getComputedStyle(t):new CSSStyleDeclaration},e.addEventListener=function(t,n){e.isAvailable()&&document.addEventListener(t,n)},e.removeEventListener=function(t,n){e.isAvailable()&&document.removeEventListener(t,n)},e}(),vr="undefined"!=typeof globalThis?globalThis.document:(void 0).document,br={designMode:{showEmptyDescriptions:!0,showEmptyTitles:!0},get allowShowEmptyDescriptionInDesignMode(){return this.designMode.showEmptyDescriptions},set allowShowEmptyDescriptionInDesignMode(e){this.designMode.showEmptyDescriptions=e},get allowShowEmptyTitleInDesignMode(){return this.designMode.showEmptyTitles},set allowShowEmptyTitleInDesignMode(e){this.designMode.showEmptyTitles=e},localization:{useLocalTimeZone:!0,storeDuplicatedTranslations:!1,defaultLocaleName:"default"},get useLocalTimeZone(){return this.localization.useLocalTimeZone},set useLocalTimeZone(e){this.localization.useLocalTimeZone=e},get storeDuplicatedTranslations(){return this.localization.storeDuplicatedTranslations},set storeDuplicatedTranslations(e){this.localization.storeDuplicatedTranslations=e},get defaultLocaleName(){return this.localization.defaultLocaleName},set defaultLocaleName(e){this.localization.defaultLocaleName=e},web:{onBeforeRequestChoices:function(e,t){},encodeUrlParams:!0,cacheLoadedChoices:!0,disableQuestionWhileLoadingChoices:!1,surveyServiceUrl:"https://api.surveyjs.io/public/v1/Survey"},get webserviceEncodeParameters(){return this.web.encodeUrlParams},set webserviceEncodeParameters(e){this.web.encodeUrlParams=e},get useCachingForChoicesRestful(){return this.web.cacheLoadedChoices},set useCachingForChoicesRestful(e){this.web.cacheLoadedChoices=e},get useCachingForChoicesRestfull(){return this.web.cacheLoadedChoices},set useCachingForChoicesRestfull(e){this.web.cacheLoadedChoices=e},get disableOnGettingChoicesFromWeb(){return this.web.disableQuestionWhileLoadingChoices},set disableOnGettingChoicesFromWeb(e){this.web.disableQuestionWhileLoadingChoices=e},get surveyServiceUrl(){return this.web.surveyServiceUrl},set surveyServiceUrl(e){this.web.surveyServiceUrl=e},triggers:{changeNavigationButtonsOnComplete:!0,executeCompleteOnValueChanged:!1,executeSkipOnValueChanged:!0},get executeCompleteTriggerOnValueChanged(){return this.triggers.executeCompleteOnValueChanged},set executeCompleteTriggerOnValueChanged(e){this.triggers.executeCompleteOnValueChanged=e},get changeNavigationButtonsOnCompleteTrigger(){return this.triggers.changeNavigationButtonsOnComplete},set changeNavigationButtonsOnCompleteTrigger(e){this.triggers.changeNavigationButtonsOnComplete=e},get executeSkipTriggerOnValueChanged(){return this.triggers.executeSkipOnValueChanged},set executeSkipTriggerOnValueChanged(e){this.triggers.executeSkipOnValueChanged=e},serialization:{itemValueSerializeAsObject:!1,itemValueSerializeDisplayText:!1,localizableStringSerializeAsObject:!1},get itemValueAlwaysSerializeAsObject(){return this.serialization.itemValueSerializeAsObject},set itemValueAlwaysSerializeAsObject(e){this.serialization.itemValueSerializeAsObject=e},get itemValueAlwaysSerializeText(){return this.serialization.itemValueSerializeDisplayText},set itemValueAlwaysSerializeText(e){this.serialization.itemValueSerializeDisplayText=e},get serializeLocalizableStringAsObject(){return this.serialization.localizableStringSerializeAsObject},set serializeLocalizableStringAsObject(e){this.serialization.localizableStringSerializeAsObject=e},lazyRender:{enabled:!1,firstBatchSize:3},get lazyRowsRendering(){return this.lazyRender.enabled},set lazyRowsRendering(e){this.lazyRender.enabled=e},get lazyRowsRenderingStartRow(){return this.lazyRender.firstBatchSize},set lazyRowsRenderingStartRow(e){this.lazyRender.firstBatchSize=e},matrix:{defaultCellType:"dropdown",defaultRowName:"default",totalsSuffix:"-total",maxRowCount:1e3,maxRowCountInCondition:1,renderRemoveAsIcon:!0,columnWidthsByType:{file:{minWidth:"240px"},comment:{minWidth:"200px"}},rateSize:"small"},get matrixDefaultRowName(){return this.matrix.defaultRowName},set matrixDefaultRowName(e){this.matrix.defaultRowName=e},get matrixDefaultCellType(){return this.matrix.defaultCellType},set matrixDefaultCellType(e){this.matrix.defaultCellType=e},get matrixTotalValuePostFix(){return this.matrix.totalsSuffix},set matrixTotalValuePostFix(e){this.matrix.totalsSuffix=e},get matrixMaximumRowCount(){return this.matrix.maxRowCount},set matrixMaximumRowCount(e){this.matrix.maxRowCount=e},get matrixMaxRowCountInCondition(){return this.matrix.maxRowCountInCondition},set matrixMaxRowCountInCondition(e){this.matrix.maxRowCountInCondition=e},get matrixRenderRemoveAsIcon(){return this.matrix.renderRemoveAsIcon},set matrixRenderRemoveAsIcon(e){this.matrix.renderRemoveAsIcon=e},panel:{maxPanelCount:100,maxPanelCountInCondition:1},get panelDynamicMaxPanelCountInCondition(){return this.panel.maxPanelCountInCondition},set panelDynamicMaxPanelCountInCondition(e){this.panel.maxPanelCountInCondition=e},get panelMaximumPanelCount(){return this.panel.maxPanelCount},set panelMaximumPanelCount(e){this.panel.maxPanelCount=e},readOnly:{enableValidation:!1,commentRenderMode:"textarea",textRenderMode:"input"},get readOnlyCommentRenderMode(){return this.readOnly.commentRenderMode},set readOnlyCommentRenderMode(e){this.readOnly.commentRenderMode=e},get readOnlyTextRenderMode(){return this.readOnly.textRenderMode},set readOnlyTextRenderMode(e){this.readOnly.textRenderMode=e},numbering:{includeQuestionsWithHiddenNumber:!1,includeQuestionsWithHiddenTitle:!1},get setQuestionVisibleIndexForHiddenTitle(){return this.numbering.includeQuestionsWithHiddenTitle},set setQuestionVisibleIndexForHiddenTitle(e){this.numbering.includeQuestionsWithHiddenTitle=e},get setQuestionVisibleIndexForHiddenNumber(){return this.numbering.includeQuestionsWithHiddenNumber},set setQuestionVisibleIndexForHiddenNumber(e){this.numbering.includeQuestionsWithHiddenNumber=e},enterKeyAction:"default",comparator:{trimStrings:!0,caseSensitive:!1,normalizeTextCallback:function(e,t){return e}},expressionDisableConversionChar:"#",get commentPrefix(){return br.commentSuffix},set commentPrefix(e){br.commentSuffix=e},commentSuffix:"-Comment",itemValueSeparator:"|",ratingMaximumRateValueCount:20,tagboxCloseOnSelect:!1,dropdownSearchDelay:500,confirmActionFunc:function(e){return confirm(e)},confirmActionAsync:function(e,t,n,r,o){return function(e,t,n,r,o){var i=new ci(void 0),s=br.showDialog({componentName:"sv-string-viewer",data:{locStr:i,locString:i,model:i},onApply:function(){return t(!0),!0},onCancel:function(){return t(!1),!1},title:e,displayMode:"popup",isFocusedContent:!1,cssClass:"sv-popup--confirm-delete"},o),a=s.footerToolbar,u=a.getActionById("apply"),l=a.getActionById("cancel");return l.title=wr.getString("cancel",r),l.innerCss="sv-popup__body-footer-item sv-popup__button sd-btn sd-btn--small",u.title=n||wr.getString("ok",r),u.innerCss="sv-popup__body-footer-item sv-popup__button sv-popup__button--danger sd-btn sd-btn--small sd-btn--danger",function(e){e.width="min-content"}(s),!0}(e,t,n,r,o)},minWidth:"300px",maxWidth:"100%",maxConditionRunCountOnValueChanged:10,notifications:{lifetime:2e3},autoAdvanceDelay:300,showItemsInOrder:"default",noneItemValue:"none",refuseItemValue:"refused",dontKnowItemValue:"dontknow",specialChoicesOrder:{selectAllItem:[-1],noneItem:[1],refuseItem:[2],dontKnowItem:[3],otherItem:[4]},choicesSeparator:", ",supportedValidators:{question:["expression"],comment:["text","regex"],text:["numeric","text","regex","email"],checkbox:["answercount"],imagepicker:["answercount"]},minDate:"",maxDate:"",showModal:void 0,showDialog:void 0,supportCreatorV2:!1,showDefaultItemsInCreatorV2:!0,customIcons:{},rankingDragHandleArea:"entireItem",environment:vr?{root:vr,_rootElement:gr.getBody(),get rootElement(){var e;return null!==(e=this._rootElement)&&void 0!==e?e:gr.getBody()},set rootElement(e){this._rootElement=e},_popupMountContainer:gr.getBody(),get popupMountContainer(){var e;return null!==(e=this._popupMountContainer)&&void 0!==e?e:gr.getBody()},set popupMountContainer(e){this._popupMountContainer=e},svgMountContainer:vr.head,stylesSheetsMountContainer:vr.head}:void 0,showMaxLengthIndicator:!0,animationEnabled:!0,titleTags:{survey:"h3",page:"h4",panel:"h4",question:"h5"},questions:{inputTypes:["color","date","datetime-local","email","month","number","password","range","tel","text","time","url","week"],dataList:["","name","honorific-prefix","given-name","additional-name","family-name","honorific-suffix","nickname","organization-title","username","new-password","current-password","organization","street-address","address-line1","address-line2","address-line3","address-level4","address-level3","address-level2","address-level1","country","country-name","postal-code","cc-name","cc-given-name","cc-additional-name","cc-family-name","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc","cc-type","transaction-currency","transaction-amount","language","bday","bday-day","bday-month","bday-year","sex","url","photo","tel","tel-country-code","tel-national","tel-area-code","tel-local","tel-local-prefix","tel-local-suffix","tel-extension","email","impp"]},legacyProgressBarView:!1,maskSettings:{patternPlaceholderChar:"_",patternEscapeChar:"\\",patternDefinitions:{9:/[0-9]/,a:/[a-zA-Z]/,"#":/[a-zA-Z0-9]/}}},Cr=function(){function e(){}return e.isValueEmpty=function(t){if(Array.isArray(t)&&0===t.length)return!0;if(t&&e.isValueObject(t)&&t.constructor===Object){for(var n in t)if(!e.isValueEmpty(t[n]))return!1;return!0}return!t&&0!==t&&!1!==t},e.isArrayContainsEqual=function(t,n){if(!Array.isArray(t)||!Array.isArray(n))return!1;if(t.length!==n.length)return!1;for(var r=0;r<t.length;r++){for(var o=0;o<n.length&&!e.isTwoValueEquals(t[r],n[o]);o++);if(o===n.length)return!1}return!0},e.isArraysEqual=function(t,n,r,o,i){if(void 0===r&&(r=!1),!Array.isArray(t)||!Array.isArray(n))return!1;if(t.length!==n.length)return!1;if(r){for(var s=[],a=[],u=0;u<t.length;u++)s.push(t[u]),a.push(n[u]);s.sort(),a.sort(),t=s,n=a}for(u=0;u<t.length;u++)if(!e.isTwoValueEquals(t[u],n[u],r,o,i))return!1;return!0},e.compareStrings=function(e,t){var n=br.comparator.normalizeTextCallback;if(e&&(e=n(e,"compare").trim()),t&&(t=n(t,"compare").trim()),!e&&!t)return 0;if(!e)return-1;if(!t)return 1;if(e===t)return 0;for(var r=-1,o=0;o<e.length&&o<t.length;o++){if(this.isCharDigit(e[o])&&this.isCharDigit(t[o])){r=o;break}if(e[o]!==t[o])break}if(r>-1){var i=this.getNumberFromStr(e,r),s=this.getNumberFromStr(t,r);if(!Number.isNaN(i)&&!Number.isNaN(s)&&i!==s)return i>s?1:-1}return e>t?1:-1},e.isTwoValueEquals=function(t,n,r,o,i){if(void 0===r&&(r=!1),t===n)return!0;if(Array.isArray(t)&&0===t.length&&void 0===n)return!0;if(Array.isArray(n)&&0===n.length&&void 0===t)return!0;if(null==t&&""===n)return!0;if(null==n&&""===t)return!0;if(void 0===i&&(i=br.comparator.trimStrings),void 0===o&&(o=br.comparator.caseSensitive),"string"==typeof t&&"string"==typeof n){var s=br.comparator.normalizeTextCallback;return t=s(t,"compare"),n=s(n,"compare"),i&&(t=t.trim(),n=n.trim()),o||(t=t.toLowerCase(),n=n.toLowerCase()),t===n}if(t instanceof Date&&n instanceof Date)return t.getTime()==n.getTime();if(e.isConvertibleToNumber(t)&&e.isConvertibleToNumber(n)&&parseInt(t)===parseInt(n)&&parseFloat(t)===parseFloat(n))return!0;if(!e.isValueEmpty(t)&&e.isValueEmpty(n)||e.isValueEmpty(t)&&!e.isValueEmpty(n))return!1;if((!0===t||!1===t)&&"string"==typeof n)return t.toString()===n.toLocaleLowerCase();if((!0===n||!1===n)&&"string"==typeof t)return n.toString()===t.toLocaleLowerCase();if(!e.isValueObject(t)&&!e.isValueObject(n))return t==n;if(!e.isValueObject(t)||!e.isValueObject(n))return!1;if(t.equals&&n.equals)return t.equals(n);if(Array.isArray(t)&&Array.isArray(n))return e.isArraysEqual(t,n,r,o,i);for(var a in t)if(t.hasOwnProperty(a)){if(!n.hasOwnProperty(a))return!1;if(!this.isTwoValueEquals(t[a],n[a],r,o,i))return!1}for(a in n)if(n.hasOwnProperty(a)&&!t.hasOwnProperty(a))return!1;return!0},e.randomizeArray=function(e){for(var t=e.length-1;t>0;t--){var n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}return e},e.getUnbindValue=function(t){if(Array.isArray(t)){for(var n=[],r=0;r<t.length;r++)n.push(e.getUnbindValue(t[r]));return n}return!t||!e.isValueObject(t)||t instanceof Date?t:JSON.parse(JSON.stringify(t))},e.createCopy=function(e){var t={};if(!e)return t;for(var n in e)t[n]=e[n];return t},e.isConvertibleToNumber=function(e){return null!=e&&!Array.isArray(e)&&!isNaN(e)},e.isValueObject=function(e,t){return e instanceof Object&&(!t||!Array.isArray(e))},e.isNumber=function(e){return!isNaN(this.getNumber(e))},e.getNumber=function(e){if("string"==typeof e&&e&&0==e.indexOf("0x")&&e.length>32)return NaN;e=this.prepareStringToNumber(e);var t=parseFloat(e);return isNaN(t)||!isFinite(e)?NaN:t},e.prepareStringToNumber=function(e){if("string"!=typeof e||!e)return e;var t=e.indexOf(",");return t>-1&&e.indexOf(",",t+1)<0?e.replace(",","."):e},e.getMaxLength=function(e,t){return e<0&&(e=t),e>0?e:null},e.getRemainingCharacterCounterText=function(e,t){return!t||t<=0||!br.showMaxLengthIndicator?"":[e?e.length:"0",t].join("/")},e.getNumberByIndex=function(t,n){if(t<0)return"";var r=1,o="",i=".",s=!0,a="A",u="";if(n){for(var l=(u=n).length-1,c=!1,p=0;p<u.length;p++)if(e.isCharDigit(u[p])){c=!0;break}for(var h=function(){return c&&!e.isCharDigit(u[l])||e.isCharNotLetterAndDigit(u[l])};l>=0&&h();)l--;var d="";for(l<u.length-1&&(d=u.substring(l+1),u=u.substring(0,l+1)),l=u.length-1;l>=0&&!h()&&(l--,c););a=u.substring(l+1),o=u.substring(0,l+1),parseInt(a)?r=parseInt(a):1==a.length&&(s=!1),(d||o)&&(i=d)}if(s){for(var f=(t+r).toString();f.length<a.length;)f="0"+f;return o+f+i}return o+String.fromCharCode(a.charCodeAt(0)+t)+i},e.isCharNotLetterAndDigit=function(t){return t.toUpperCase()==t.toLowerCase()&&!e.isCharDigit(t)},e.isCharDigit=function(e){return e>="0"&&e<="9"},e.getNumberFromStr=function(e,t){if(!this.isCharDigit(e[t]))return NaN;for(var n="";t<e.length&&this.isCharDigit(e[t]);)n+=e[t],t++;return n?this.getNumber(n):NaN},e.countDecimals=function(t){if(e.isNumber(t)&&Math.floor(t)!==t){var n=t.toString().split(".");return n.length>1&&n[1].length||0}return 0},e.correctAfterPlusMinis=function(t,n,r){var o=e.countDecimals(t),i=e.countDecimals(n);if(o>0||i>0){var s=Math.max(o,i);r=parseFloat(r.toFixed(s))}return r},e.sumAnyValues=function(t,n){if(!e.isNumber(t)||!e.isNumber(n)){if(Array.isArray(t)&&Array.isArray(n))return[].concat(t).concat(n);if(Array.isArray(t)||Array.isArray(n)){var r=Array.isArray(t)?t:n,o=r===t?n:t;if("string"==typeof o){var i=r.join(", ");return r===t?i+o:o+i}if("number"==typeof o){for(var s=0,a=0;a<r.length;a++)"number"==typeof r[a]&&(s=e.correctAfterPlusMinis(s,r[a],s+r[a]));return e.correctAfterPlusMinis(s,o,s+o)}}return t+n}return"string"==typeof t||"string"==typeof n?t+n:e.correctAfterPlusMinis(t,n,t+n)},e.correctAfterMultiple=function(t,n,r){var o=e.countDecimals(t)+e.countDecimals(n);return o>0&&(r=parseFloat(r.toFixed(o))),r},e.convertArrayValueToObject=function(t,n,r){void 0===r&&(r=void 0);var o=new Array;if(!t||!Array.isArray(t))return o;for(var i=0;i<t.length;i++){var s=void 0;Array.isArray(r)&&(s=e.findObjByPropValue(r,n,t[i])),s||((s={})[n]=t[i]),o.push(s)}return o},e.findObjByPropValue=function(t,n,r){for(var o=0;o<t.length;o++)if(e.isTwoValueEquals(t[o][n],r))return t[o]},e.convertArrayObjectToValue=function(t,n){var r=new Array;if(!t||!Array.isArray(t))return r;for(var o=0;o<t.length;o++){var i=t[o]?t[o][n]:void 0;e.isValueEmpty(i)||r.push(i)}return r},e.convertDateToString=function(e){var t=function(e){return e<10?"0"+e.toString():e.toString()};return e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())},e.convertDateTimeToString=function(e){var t=function(e){return e<10?"0"+e.toString():e.toString()};return this.convertDateToString(e)+" "+t(e.getHours())+":"+t(e.getMinutes())},e.convertValToQuestionVal=function(t,n){return t instanceof Date?"datetime-local"===n?e.convertDateTimeToString(t):e.convertDateToString(t):t},e.compareVerions=function(e,t){if(!e&&!t)return 0;for(var n=e.split("."),r=t.split("."),o=n.length,i=r.length,s=0;s<o&&s<i;s++){var a=n[s],u=r[s];if(a.length!==u.length)return a.length<u.length?-1:1;if(a!==u)return a<u?-1:1}return o===i?0:o<i?-1:1},e}();String.prototype.format||(String.prototype.format=function(){var e=arguments;return this.replace(/{(\d+)}/g,(function(t,n){return void 0!==e[n]?e[n]:t}))});var Er={pagePrevText:"Previous",pageNextText:"Next",completeText:"Complete",previewText:"Preview",editText:"Edit",startSurveyText:"Start",otherItemText:"Other (describe)",noneItemText:"None",refuseItemText:"Refuse to answer",dontKnowItemText:"Don't know",selectAllItemText:"Select All",progressText:"Page {0} of {1}",indexText:"{0} of {1}",panelDynamicProgressText:"{0} of {1}",panelDynamicTabTextFormat:"Panel {panelIndex}",questionsProgressText:"Answered {0}/{1} questions",emptySurvey:"The survey doesn't contain any visible elements.",completingSurvey:"Thank you for completing the survey",completingSurveyBefore:"You have already completed this survey.",loadingSurvey:"Loading Survey...",placeholder:"Select...",ratingOptionsCaption:"Select...",value:"value",requiredError:"Response required.",requiredErrorInPanel:"Response required: answer at least one question.",requiredInAllRowsError:"Response required: answer questions in all rows.",eachRowUniqueError:"Each row must have a unique value.",numericError:"The value should be numeric.",minError:"The value should not be less than {0}",maxError:"The value should not be greater than {0}",textMinLength:"Please enter at least {0} character(s).",textMaxLength:"Please enter no more than {0} character(s).",textMinMaxLength:"Please enter at least {0} and no more than {1} characters.",minRowCountError:"Please fill in at least {0} row(s).",minSelectError:"Please select at least {0} option(s).",maxSelectError:"Please select no more than {0} option(s).",numericMinMax:"The '{0}' should be at least {1} and at most {2}",numericMin:"The '{0}' should be at least {1}",numericMax:"The '{0}' should be at most {1}",invalidEmail:"Please enter a valid e-mail address.",invalidExpression:"The expression: {0} should return 'true'.",urlRequestError:"The request returned error '{0}'. {1}",urlGetChoicesError:"The request returned empty data or the 'path' property is incorrect",exceedMaxSize:"The file size should not exceed {0}.",noUploadFilesHandler:"Files cannot be uploaded. Please add a handler for the 'onUploadFiles' event.",otherRequiredError:"Response required: enter another value.",uploadingFile:"Your file is uploading. Please wait several seconds and try again.",loadingFile:"Loading...",chooseFile:"Choose file(s)...",noFileChosen:"No file selected",filePlaceholder:"Drag and drop a file here or click the button below to select a file to upload.",confirmDelete:"Are you sure you want to delete this record?",keyDuplicationError:"This value should be unique.",addColumn:"Add Column",addRow:"Add Row",removeRow:"Remove",emptyRowsText:"There are no rows.",addPanel:"Add new",removePanel:"Remove",showDetails:"Show Details",hideDetails:"Hide Details",choices_Item:"item",matrix_column:"Column",matrix_row:"Row",multipletext_itemname:"text",savingData:"The results are being saved on the server...",savingDataError:"An error occurred and we could not save the results.",savingDataSuccess:"The results were saved successfully!",savingExceedSize:"Your response exceeds 64KB. Please reduce the size of your file(s) and try again or contact the survey owner.",saveAgainButton:"Try again",timerMin:"min",timerSec:"sec",timerSpentAll:"You have spent {0} on this page and {1} in total.",timerSpentPage:"You have spent {0} on this page.",timerSpentSurvey:"You have spent {0} in total.",timerLimitAll:"You have spent {0} of {1} on this page and {2} of {3} in total.",timerLimitPage:"You have spent {0} of {1} on this page.",timerLimitSurvey:"You have spent {0} of {1} in total.",clearCaption:"Clear",signaturePlaceHolder:"Sign here",signaturePlaceHolderReadOnly:"No signature",chooseFileCaption:"Select File",takePhotoCaption:"Take Photo",photoPlaceholder:"Click the button below to take a photo using the camera.",fileOrPhotoPlaceholder:"Drag and drop or select a file to upload or take a photo using the camera.",replaceFileCaption:"Replace file",removeFileCaption:"Remove this file",booleanCheckedLabel:"Yes",booleanUncheckedLabel:"No",confirmRemoveFile:"Are you sure that you want to remove this file: {0}?",confirmRemoveAllFiles:"Are you sure that you want to remove all files?",questionTitlePatternText:"Question Title",modalCancelButtonText:"Cancel",modalApplyButtonText:"Apply",filterStringPlaceholder:"Type to search...",emptyMessage:"No data to display",noEntriesText:"No entries yet.\nClick the button below to add a new entry.",noEntriesReadonlyText:"No entries",tabTitlePlaceholder:"New Panel",more:"More",tagboxDoneButtonCaption:"OK",selectToRankEmptyRankedAreaText:"All choices are selected for ranking",selectToRankEmptyUnrankedAreaText:"Drag choices here to rank them",ok:"OK",cancel:"Cancel"},wr={currentLocaleValue:"",defaultLocaleValue:"en",locales:{},localeNames:{},localeDirections:{},supportedLocales:[],get currentLocale(){return this.currentLocaleValue===this.defaultLocaleValue?"":this.currentLocaleValue},set currentLocale(e){"cz"===e&&(e="cs"),this.currentLocaleValue=e},get defaultLocale(){return this.defaultLocaleValue},set defaultLocale(e){"cz"===e&&(e="cs"),this.defaultLocaleValue=e},getLocaleStrings:function(e){return this.locales[e]},getString:function(e,t){var n=this;void 0===t&&(t=null);var r=new Array,o=function(e){var t=n.locales[e];t&&r.push(t)},i=function(e){if(e){o(e);var t=e.indexOf("-");t<1||(e=e.substring(0,t),o(e))}};i(t),i(this.currentLocale),i(this.defaultLocale),"en"!==this.defaultLocale&&o("en");for(var s=0;s<r.length;s++){var a=r[s][e];if(void 0!==a)return a}return this.onGetExternalString(e,t)},getLocales:function(e){void 0===e&&(e=!1);var t=[];t.push("");var n=this.locales;if(this.supportedLocales&&this.supportedLocales.length>0){n={};for(var r=0;r<this.supportedLocales.length;r++)n[this.supportedLocales[r]]=!0}for(var o in n)e&&o==this.defaultLocale||t.push(o);var i=function(e){if(!e)return"";var t=wr.localeNames[e];return t||(t=e),t.toLowerCase()};return t.sort((function(e,t){var n=i(e),r=i(t);return n===r?0:n<r?-1:1})),t},onGetExternalString:function(e,t){}};wr.locales.en=Er,wr.localeNames.en="english";var Or=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pr=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e};function qr(e,t,n){var r=e.getLocalizableString(n);if(!r){var o=void 0;"object"==typeof t.localizable&&t.localizable.defaultStr&&(o=t.localizable.defaultStr),r=e.createLocalizableString(n,e,!0,o),"object"==typeof t.localizable&&"function"==typeof t.localizable.onGetTextCallback&&(r.onGetTextCallback=t.localizable.onGetTextCallback)}}function Sr(e){return void 0===e&&(e={}),function(t,n){var r=function(e,t){if(t&&"object"==typeof t&&t.type===_o.ComputedUpdaterType){Io.startCollectDependencies((function(){return e[n]=t.updater()}),e,n);var r=t.updater(),o=Io.finishCollectDependencies();return t.setDependencies(o),e.dependencies[n]&&e.dependencies[n].dispose(),e.dependencies[n]=t,r}return t};e&&e.localizable?(Object.defineProperty(t,n,{get:function(){return function(e,t,n){qr(e,t,n);var r=e.getLocalizableStringText(n);if(r)return r;if("object"==typeof t.localizable&&t.localizable.defaultStr){var o=e.getLocale?e.getLocale():"";return wr.getString(t.localizable.defaultStr,o)}return""}(this,e,n)},set:function(t){qr(this,e,n);var o=r(this,t);this.setLocalizableStringText(n,o),e&&e.onSet&&e.onSet(o,this)}}),Object.defineProperty(t,"object"==typeof e.localizable&&e.localizable.name?e.localizable.name:"loc"+n.charAt(0).toUpperCase()+n.slice(1),{get:function(){return qr(this,e,n),this.getLocalizableString(n)}})):Object.defineProperty(t,n,{get:function(){var t=null;return e&&("function"==typeof e.getDefaultValue&&(t=e.getDefaultValue(this)),void 0!==e.defaultValue&&(t=e.defaultValue)),this.getPropertyValue(n,t)},set:function(t){var o=r(this,t);this.setPropertyValue(n,o),e&&e.onSet&&e.onSet(o,this)}})}}function xr(e,t,n){e.ensureArray(n,(function(n,r){var o=t?t.onPush:null;o&&o(n,r,e)}),(function(n,r){var o=t?t.onRemove:null;o&&o(n,r,e)}))}var _r=function(){function e(t,n,r){void 0===r&&(r=!1),this.name=n,this.isRequiredValue=!1,this.isUniqueValue=!1,this.isSerializable=!0,this.isLightSerializable=!0,this.isCustom=!1,this.isDynamicChoices=!1,this.isBindable=!1,this.category="",this.categoryIndex=-1,this.visibleIndex=-1,this.maxLength=-1,this.isArray=!1,this.classInfoValue=t,this.isRequiredValue=r,this.idValue=e.Index++}return Object.defineProperty(e.prototype,"id",{get:function(){return this.idValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classInfo",{get:function(){return this.classInfoValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this.typeValue?this.typeValue:"string"},set:function(e){"itemvalues"===e&&(e="itemvalue[]"),"textitems"===e&&(e="textitem[]"),this.typeValue=e,this.typeValue.indexOf("[]")===this.typeValue.length-2&&(this.isArray=!0,this.className=this.typeValue.substring(0,this.typeValue.length-2))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRequired",{get:function(){return this.isRequiredValue},set:function(e){e!==this.isRequired&&(this.isRequiredValue=e,this.classInfo&&this.classInfo.resetAllProperties())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUnique",{get:function(){return this.isUniqueValue},set:function(e){this.isUniqueValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uniquePropertyName",{get:function(){return this.uniquePropertyValue},set:function(e){this.uniquePropertyValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasToUseGetValue",{get:function(){return this.onGetValue||this.serializationProperty},enumerable:!1,configurable:!0}),e.prototype.getDefaultValue=function(t){var n=this.defaultValueFunc?this.defaultValueFunc(t):this.defaultValueValue;return e.getItemValuesDefaultValue&&Br.isDescendantOf(this.className,"itemvalue")&&(n=e.getItemValuesDefaultValue(this.defaultValueValue||[],this.className)),n},Object.defineProperty(e.prototype,"defaultValue",{get:function(){return this.getDefaultValue(void 0)},set:function(e){this.defaultValueValue=e},enumerable:!1,configurable:!0}),e.prototype.isDefaultValue=function(e){return this.isDefaultValueByObj(void 0,e)},e.prototype.isDefaultValueByObj=function(e,t){var n=this.getDefaultValue(e);return Cr.isValueEmpty(n)?this.isLocalizable?null==t:!1===t&&("boolean"==this.type||"switch"==this.type)||""===t||Cr.isValueEmpty(t):Cr.isTwoValueEquals(t,n,!1,!0,!1)},e.prototype.getSerializableValue=function(e){return this.onSerializeValue?this.onSerializeValue(e):this.getValue(e)},e.prototype.getValue=function(e){return this.onGetValue?this.onGetValue(e):this.serializationProperty&&e[this.serializationProperty]?e[this.serializationProperty].getJson():e[this.name]},e.prototype.getPropertyValue=function(e){return this.isLocalizable?e[this.serializationProperty]?e[this.serializationProperty].text:null:this.getValue(e)},Object.defineProperty(e.prototype,"hasToUseSetValue",{get:function(){return this.onSetValue||this.serializationProperty},enumerable:!1,configurable:!0}),e.prototype.settingValue=function(e,t){return!this.onSettingValue||e.isLoadingFromJson?t:this.onSettingValue(e,t)},e.prototype.setValue=function(e,t,n){this.onSetValue?this.onSetValue(e,t,n):this.serializationProperty&&e[this.serializationProperty]?e[this.serializationProperty].setJson(t):(t&&"string"==typeof t&&("number"==this.type&&(t=parseInt(t)),"boolean"!=this.type&&"switch"!=this.type||(t="true"===t.toLowerCase())),e[this.name]=t)},e.prototype.validateValue=function(e){var t=this.choices;return!Array.isArray(t)||0===t.length||t.indexOf(e)>-1},e.prototype.getObjType=function(e){return this.classNamePart?e.replace(this.classNamePart,""):e},Object.defineProperty(e.prototype,"choices",{get:function(){return this.getChoices(null)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasChoices",{get:function(){return!!this.choicesValue||!!this.choicesfunc},enumerable:!1,configurable:!0}),e.prototype.getChoices=function(e,t){return void 0===t&&(t=null),null!=this.choicesValue?this.choicesValue:null!=this.choicesfunc?this.choicesfunc(e,t):null},e.prototype.setChoices=function(e,t){void 0===t&&(t=null),this.choicesValue=e,this.choicesfunc=t},e.prototype.getBaseValue=function(){return this.baseValue?"function"==typeof this.baseValue?this.baseValue():this.baseValue:""},e.prototype.setBaseValue=function(e){this.baseValue=e},Object.defineProperty(e.prototype,"readOnly",{get:function(){return null!=this.readOnlyValue&&this.readOnlyValue},set:function(e){this.readOnlyValue=e},enumerable:!1,configurable:!0}),e.prototype.isEnable=function(e){return!this.readOnly&&(!e||!this.enableIf||this.enableIf(this.getOriginalObj(e)))},e.prototype.isVisible=function(e,t){void 0===t&&(t=null);var n=!this.layout||this.layout==e;return!(!this.visible||!n)&&(!this.visibleIf||!t||this.visibleIf(this.getOriginalObj(t)))},e.prototype.getOriginalObj=function(e){if(e&&e.getOriginalObj){var t=e.getOriginalObj();if(t&&Br.findProperty(t.getType(),this.name))return t}return e},Object.defineProperty(e.prototype,"visible",{get:function(){return null==this.visibleValue||this.visibleValue},set:function(e){this.visibleValue=e},enumerable:!1,configurable:!0}),e.prototype.isAvailableInVersion=function(e){return!(!this.alternativeName&&!this.oldName)||this.isAvailableInVersionCore(e)},e.prototype.getSerializedName=function(e){return this.alternativeName?this.isAvailableInVersionCore(e)?this.name:this.alternativeName||this.oldName:this.name},e.prototype.getSerializedProperty=function(e,t){return!this.oldName||this.isAvailableInVersionCore(t)?this:e&&e.getType?Br.findProperty(e.getType(),this.oldName):null},e.prototype.isAvailableInVersionCore=function(e){return!e||!this.version||Cr.compareVerions(this.version,e)<=0},Object.defineProperty(e.prototype,"isLocalizable",{get:function(){return null!=this.isLocalizableValue&&this.isLocalizableValue},set:function(e){this.isLocalizableValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataList",{get:function(){return Array.isArray(this.dataListValue)?this.dataListValue:[]},set:function(e){this.dataListValue=e},enumerable:!1,configurable:!0}),e.prototype.mergeWith=function(t){for(var n=e.mergableValues,r=0;r<n.length;r++)this.mergeValue(t,n[r])},e.prototype.addDependedProperty=function(e){this.dependedProperties||(this.dependedProperties=[]),this.dependedProperties.indexOf(e)<0&&this.dependedProperties.push(e)},e.prototype.getDependedProperties=function(){return this.dependedProperties?this.dependedProperties:[]},e.prototype.schemaType=function(){if("choicesByUrl"!==this.className)return"string"===this.className?this.className:this.className||this.baseClassName?"array":"switch"==this.type?"boolean":"boolean"==this.type||"number"==this.type?this.type:"string"},e.prototype.schemaRef=function(){if(this.className)return this.className},e.prototype.mergeValue=function(e,t){null==this[t]&&null!=e[t]&&(this[t]=e[t])},e.Index=1,e.mergableValues=["typeValue","choicesValue","baseValue","readOnlyValue","visibleValue","isSerializable","isLightSerializable","isCustom","isBindable","isUnique","uniquePropertyName","isDynamicChoices","isLocalizableValue","className","alternativeName","oldName","layout","version","classNamePart","baseClassName","defaultValue","defaultValueFunc","serializationProperty","onGetValue","onSetValue","onSettingValue","displayName","category","categoryIndex","visibleIndex","nextToProperty","overridingProperty","showMode","dependedProperties","visibleIf","enableIf","onExecuteExpression","onPropertyEditorUpdate","maxLength","maxValue","minValue","dataListValue"],e}(),Ir=function(){function e(){}return e.addProperty=function(t,n){t=t.toLowerCase();var r=e.properties;r[t]||(r[t]=[]),r[t].push(n)},e.removeProperty=function(t,n){t=t.toLowerCase();var r=e.properties;if(r[t])for(var o=r[t],i=0;i<o.length;i++)if(o[i].name==n){r[t].splice(i,1);break}},e.removeAllProperties=function(t){t=t.toLowerCase(),delete e.properties[t]},e.addClass=function(t,n){t=t.toLowerCase(),n&&(n=n.toLowerCase()),e.parentClasses[t]=n},e.getProperties=function(t){t=t.toLowerCase();for(var n=[],r=e.properties;t;){var o=r[t];if(o)for(var i=0;i<o.length;i++)n.push(o[i]);t=e.parentClasses[t]}return n},e.createProperties=function(t){t&&t.getType&&e.createPropertiesCore(t,t.getType())},e.createPropertiesCore=function(t,n){var r=e.properties;r[n]&&e.createPropertiesInObj(t,r[n]);var o=e.parentClasses[n];o&&e.createPropertiesCore(t,o)},e.createPropertiesInObj=function(t,n){for(var r=0;r<n.length;r++)e.createPropertyInObj(t,n[r])},e.createPropertyInObj=function(t,n){if(!(e.checkIsPropertyExists(t,n.name)||n.serializationProperty&&e.checkIsPropertyExists(t,n.serializationProperty))){if(n.isLocalizable&&n.serializationProperty&&t.createCustomLocalizableObj){t.createCustomLocalizableObj(n.name).defaultValue=n.defaultValue;var r={get:function(){return t.getLocalizableString(n.name)}};Object.defineProperty(t,n.serializationProperty,r);var o={get:function(){return t.getLocalizableStringText(n.name)},set:function(e){t.setLocalizableStringText(n.name,e)}};Object.defineProperty(t,n.name,o)}else{var i=n.defaultValue,s=n.isArray||"multiplevalues"===n.type;if("function"==typeof t.createNewArray&&(Br.isDescendantOf(n.className,"itemvalue")?(t.createNewArray(n.name,(function(e){e.locOwner=t,e.ownerPropertyName=n.name})),s=!0):s&&t.createNewArray(n.name),s&&(Array.isArray(i)&&t.setPropertyValue(n.name,i),i=null)),t.getPropertyValue&&t.setPropertyValue){o={get:function(){return n.onGetValue?n.onGetValue(t):t.getPropertyValue(n.name,i)},set:function(e){n.onSetValue?n.onSetValue(t,e,null):t.setPropertyValue(n.name,e)}};Object.defineProperty(t,n.name,o)}}"condition"!==n.type&&"expression"!==n.type||n.onExecuteExpression&&t.addExpressionProperty(n.name,n.onExecuteExpression)}},e.checkIsPropertyExists=function(e,t){return e.hasOwnProperty(t)||e[t]},e.properties={},e.parentClasses={},e}(),Vr=function(){function e(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=null),this.name=e,this.creator=n,this.parentName=r,e=e.toLowerCase(),this.isCustomValue=!n&&"survey"!==e,this.parentName&&(this.parentName=this.parentName.toLowerCase(),Ir.addClass(e,this.parentName),n&&this.makeParentRegularClass()),this.properties=new Array;for(var o=0;o<t.length;o++)this.createProperty(t[o],this.isCustom)}return e.prototype.find=function(e){for(var t=0;t<this.properties.length;t++)if(this.properties[t].name==e)return this.properties[t];return null},e.prototype.findProperty=function(e){return this.fillAllProperties(),this.hashProperties[e]},e.prototype.getAllProperties=function(){return this.fillAllProperties(),this.allProperties},e.prototype.getRequiredProperties=function(){if(this.requiredProperties)return this.requiredProperties;this.requiredProperties=[];for(var e=this.getAllProperties(),t=0;t<e.length;t++)e[t].isRequired&&this.requiredProperties.push(e[t]);return this.requiredProperties},e.prototype.resetAllProperties=function(){this.allProperties=void 0,this.requiredProperties=void 0,this.hashProperties=void 0;for(var e=Br.getChildrenClasses(this.name),t=0;t<e.length;t++)e[t].resetAllProperties()},Object.defineProperty(e.prototype,"isCustom",{get:function(){return this.isCustomValue},enumerable:!1,configurable:!0}),e.prototype.fillAllProperties=function(){var e=this;if(!this.allProperties){this.allProperties=[],this.hashProperties={};var t={};this.properties.forEach((function(e){return t[e.name]=e}));var n=this.parentName?Br.findClass(this.parentName):null;if(n)n.getAllProperties().forEach((function(n){var r=t[n.name];r?(r.mergeWith(n),e.addPropCore(r)):e.addPropCore(n)}));this.properties.forEach((function(t){e.hashProperties[t.name]||e.addPropCore(t)}))}},e.prototype.addPropCore=function(e){this.allProperties.push(e),this.hashProperties[e.name]=e,e.alternativeName&&(this.hashProperties[e.alternativeName]=e)},e.prototype.isOverridedProp=function(e){return!!this.parentName&&!!Br.findProperty(this.parentName,e)},e.prototype.hasRegularChildClass=function(){if(this.isCustom){this.isCustomValue=!1;for(var e=0;e<this.properties.length;e++)this.properties[e].isCustom=!1;Ir.removeAllProperties(this.name),this.makeParentRegularClass()}},e.prototype.makeParentRegularClass=function(){if(this.parentName){var e=Br.findClass(this.parentName);e&&e.hasRegularChildClass()}},e.prototype.createProperty=function(t,n){void 0===n&&(n=!1);var r="string"==typeof t?t:t.name;if(r){var o=null,i=r.indexOf(e.typeSymbol);i>-1&&(o=r.substring(i+1),r=r.substring(0,i));var s=this.getIsPropertyNameRequired(r)||!!t.isRequired;r=this.getPropertyName(r);var a=new _r(this,r,s);if(o&&(a.type=o),"object"==typeof t){if(t.type&&(a.type=t.type),void 0!==t.default&&(a.defaultValue=t.default),void 0!==t.defaultFunc&&(a.defaultValueFunc=t.defaultFunc),Cr.isValueEmpty(t.isSerializable)||(a.isSerializable=t.isSerializable),Cr.isValueEmpty(t.isLightSerializable)||(a.isLightSerializable=t.isLightSerializable),Cr.isValueEmpty(t.maxLength)||(a.maxLength=t.maxLength),void 0!==t.displayName&&(a.displayName=t.displayName),Cr.isValueEmpty(t.category)||(a.category=t.category),Cr.isValueEmpty(t.categoryIndex)||(a.categoryIndex=t.categoryIndex),Cr.isValueEmpty(t.nextToProperty)||(a.nextToProperty=t.nextToProperty),Cr.isValueEmpty(t.overridingProperty)||(a.overridingProperty=t.overridingProperty),Cr.isValueEmpty(t.visibleIndex)||(a.visibleIndex=t.visibleIndex),Cr.isValueEmpty(t.showMode)||(a.showMode=t.showMode),Cr.isValueEmpty(t.maxValue)||(a.maxValue=t.maxValue),Cr.isValueEmpty(t.minValue)||(a.minValue=t.minValue),Cr.isValueEmpty(t.dataList)||(a.dataList=t.dataList),Cr.isValueEmpty(t.isDynamicChoices)||(a.isDynamicChoices=t.isDynamicChoices),Cr.isValueEmpty(t.isBindable)||(a.isBindable=t.isBindable),Cr.isValueEmpty(t.isUnique)||(a.isUnique=t.isUnique),Cr.isValueEmpty(t.uniqueProperty)||(a.uniquePropertyName=t.uniqueProperty),Cr.isValueEmpty(t.isArray)||(a.isArray=t.isArray),!0!==t.visible&&!1!==t.visible||(a.visible=t.visible),t.visibleIf&&(a.visibleIf=t.visibleIf),t.enableIf&&(a.enableIf=t.enableIf),t.onExecuteExpression&&(a.onExecuteExpression=t.onExecuteExpression),t.onPropertyEditorUpdate&&(a.onPropertyEditorUpdate=t.onPropertyEditorUpdate),!0===t.readOnly&&(a.readOnly=!0),t.choices){var u="function"==typeof t.choices?t.choices:null,l="function"!=typeof t.choices?t.choices:null;a.setChoices(l,u)}if(t.baseValue&&a.setBaseValue(t.baseValue),t.onSerializeValue&&(a.onSerializeValue=t.onSerializeValue),t.onGetValue&&(a.onGetValue=t.onGetValue),t.onSetValue&&(a.onSetValue=t.onSetValue),t.onSettingValue&&(a.onSettingValue=t.onSettingValue),t.isLocalizable&&(t.serializationProperty="loc"+a.name),t.serializationProperty)a.serializationProperty=t.serializationProperty,a.serializationProperty&&0==a.serializationProperty.indexOf("loc")&&(a.isLocalizable=!0);t.isLocalizable&&(a.isLocalizable=t.isLocalizable),t.className&&(a.className=t.className),t.baseClassName&&(a.baseClassName=t.baseClassName,a.isArray=!0),!0===a.isArray&&(a.isArray=!0),t.classNamePart&&(a.classNamePart=t.classNamePart),t.alternativeName&&(a.alternativeName=t.alternativeName),t.oldName&&(a.oldName=t.oldName),t.layout&&(a.layout=t.layout),t.version&&(a.version=t.version),t.dependsOn&&this.addDependsOnProperties(a,t.dependsOn)}return this.properties.push(a),n&&!this.isOverridedProp(a.name)&&(a.isCustom=!0,Ir.addProperty(this.name,a)),a}},e.prototype.addDependsOnProperties=function(e,t){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addDependsOnProperty(e,t[n]);else this.addDependsOnProperty(e,t)},e.prototype.addDependsOnProperty=function(e,t){var n=this.find(t);n||(n=Br.findProperty(this.parentName,t)),n&&n.addDependedProperty(e.name)},e.prototype.getIsPropertyNameRequired=function(t){return t.length>0&&t[0]==e.requiredSymbol},e.prototype.getPropertyName=function(e){return this.getIsPropertyNameRequired(e)?e=e.slice(1):e},e.requiredSymbol="!",e.typeSymbol=":",e}(),Tr=function(){function e(){this.classes={},this.alternativeNames={},this.childrenClasses={},this.dynamicPropsCache={}}return e.prototype.getObjPropertyValue=function(e,t){if(this.isObjWrapper(e)&&this.isNeedUseObjWrapper(e,t)){var n=e.getOriginalObj(),r=Br.findProperty(n.getType(),t);if(r)return this.getObjPropertyValueCore(n,r)}var o=Br.findProperty(e.getType(),t);return o?this.getObjPropertyValueCore(e,o):e[t]},e.prototype.setObjPropertyValue=function(e,t,n){if(e[t]!==n)if(e[t]&&e[t].setJson)e[t].setJson(n);else{if(Array.isArray(n)){for(var r=[],o=0;o<n.length;o++)r.push(n[o]);n=r}e[t]=n}},e.prototype.getObjPropertyValueCore=function(e,t){if(!t.isSerializable)return e[t.name];if(t.isLocalizable){if(t.isArray)return e[t.name];if(t.serializationProperty)return e[t.serializationProperty].text}return e.getPropertyValue(t.name)},e.prototype.isObjWrapper=function(e){return!!e.getOriginalObj&&!!e.getOriginalObj()},e.prototype.isNeedUseObjWrapper=function(e,t){if(!e.getDynamicProperties)return!0;var n=e.getDynamicProperties();if(!Array.isArray(n))return!1;for(var r=0;r<n.length;r++)if(n[r].name===t)return!0;return!1},e.prototype.addClass=function(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=null),e=e.toLowerCase();var o=new Vr(e,t,n,r);(this.classes[e]=o,r)&&(r=r.toLowerCase(),this.childrenClasses[r]||(this.childrenClasses[r]=[]),this.childrenClasses[r].push(o));return o},e.prototype.removeClass=function(e){var t=this.findClass(e);if(t&&(delete this.classes[t.name],t.parentName)){var n=this.childrenClasses[t.parentName].indexOf(t);n>-1&&this.childrenClasses[t.parentName].splice(n,1)}},e.prototype.overrideClassCreatore=function(e,t){this.overrideClassCreator(e,t)},e.prototype.overrideClassCreator=function(e,t){e=e.toLowerCase();var n=this.findClass(e);n&&(n.creator=t)},e.prototype.getProperties=function(e){var t=this.findClass(e);return t?t.getAllProperties():[]},e.prototype.getPropertiesByObj=function(e){var t=e&&e.getType?e.getType():void 0;if(!t)return[];for(var n=this.getProperties(t),r=this.getDynamicPropertiesByObj(e),o=r.length-1;o>=0;o--)this.findProperty(t,r[o].name)&&r.splice(o,1);return 0===r.length?n:[].concat(n).concat(r)},e.prototype.addDynamicPropertiesIntoObj=function(e,t,n){var r=this;n.forEach((function(n){r.addDynamicPropertyIntoObj(e,t,n.name,!1),n.serializationProperty&&r.addDynamicPropertyIntoObj(e,t,n.serializationProperty,!0),n.alternativeName&&r.addDynamicPropertyIntoObj(e,t,n.alternativeName,!1)}))},e.prototype.addDynamicPropertyIntoObj=function(e,t,n,r){var o={configurable:!0,get:function(){return t[n]}};r||(o.set=function(e){t[n]=e}),Object.defineProperty(e,n,o)},e.prototype.getDynamicPropertiesByObj=function(e,t){if(void 0===t&&(t=null),!e||!e.getType)return[];if(e.getDynamicProperties)return e.getDynamicProperties();if(!e.getDynamicType&&!t)return[];var n=t||e.getDynamicType();return this.getDynamicPropertiesByTypes(e.getType(),n)},e.prototype.getDynamicPropertiesByTypes=function(e,t,n){if(!t)return[];var r=t+"-"+e;if(this.dynamicPropsCache[r])return this.dynamicPropsCache[r];var o=this.getProperties(t);if(!o||0==o.length)return[];for(var i={},s=this.getProperties(e),a=0;a<s.length;a++)i[s[a].name]=s[a];var u=[];n||(n=[]);for(var l=0;l<o.length;l++){var c=o[l];!i[c.name]&&n.indexOf(c.name)<0&&u.push(c)}return this.dynamicPropsCache[r]=u,u},e.prototype.hasOriginalProperty=function(e,t){return!!this.getOriginalProperty(e,t)},e.prototype.getOriginalProperty=function(e,t){var n=this.findProperty(e.getType(),t);return n||(this.isObjWrapper(e)?this.findProperty(e.getOriginalObj().getType(),t):null)},e.prototype.getProperty=function(e,t){var n=this.findProperty(e,t);if(!n)return n;var r=this.findClass(e);if(n.classInfo===r)return n;var o=new _r(r,n.name,n.isRequired);return o.mergeWith(n),o.isArray=n.isArray,r.properties.push(o),r.resetAllProperties(),o},e.prototype.findProperty=function(e,t){var n=this.findClass(e);return n?n.findProperty(t):null},e.prototype.findProperties=function(e,t){var n=new Array,r=this.findClass(e);if(!r)return n;for(var o=0;o<t.length;o++){var i=r.findProperty(t[o]);i&&n.push(i)}return n},e.prototype.getAllPropertiesByName=function(e){for(var t=new Array,n=this.getAllClasses(),r=0;r<n.length;r++)for(var o=this.findClass(n[r]),i=0;i<o.properties.length;i++)if(o.properties[i].name==e){t.push(o.properties[i]);break}return t},e.prototype.getAllClasses=function(){var e=new Array;for(var t in this.classes)e.push(t);return e},e.prototype.createClass=function(e,t){void 0===t&&(t=void 0),e=e.toLowerCase();var n=this.findClass(e);if(!n)return null;if(n.creator)return n.creator(t);for(var r=n.parentName;r;){if(!(n=this.findClass(r)))return null;if(r=n.parentName,n.creator)return this.createCustomType(e,n.creator,t)}return null},e.prototype.createCustomType=function(e,t,n){void 0===n&&(n=void 0),e=e.toLowerCase();var r=t(n),o=e,i=r.getTemplate?r.getTemplate():r.getType();return r.getType=function(){return o},r.getTemplate=function(){return i},Ir.createProperties(r),r},e.prototype.getChildrenClasses=function(e,t){void 0===t&&(t=!1),e=e.toLowerCase();var n=[];return this.fillChildrenClasses(e,t,n),n},e.prototype.getRequiredProperties=function(e){var t=this.findClass(e);if(!t)return[];for(var n=t.getRequiredProperties(),r=[],o=0;o<n.length;o++)r.push(n[o].name);return r},e.prototype.addProperties=function(e,t){e=e.toLowerCase();for(var n=this.findClass(e),r=0;r<t.length;r++)this.addCustomPropertyCore(n,t[r])},e.prototype.addProperty=function(e,t){return this.addCustomPropertyCore(this.findClass(e),t)},e.prototype.addCustomPropertyCore=function(e,t){if(!e)return null;var n=e.createProperty(t,!0);return n&&(this.clearDynamicPropsCache(e),e.resetAllProperties()),n},e.prototype.removeProperty=function(e,t){var n=this.findClass(e);if(!n)return!1;var r=n.find(t);r&&(this.clearDynamicPropsCache(n),this.removePropertyFromClass(n,r),n.resetAllProperties(),Ir.removeProperty(n.name,t))},e.prototype.clearDynamicPropsCache=function(e){this.dynamicPropsCache={}},e.prototype.removePropertyFromClass=function(e,t){var n=e.properties.indexOf(t);n<0||e.properties.splice(n,1)},e.prototype.fillChildrenClasses=function(e,t,n){var r=this.childrenClasses[e];if(r)for(var o=0;o<r.length;o++)t&&!r[o].creator||n.push(r[o]),this.fillChildrenClasses(r[o].name,t,n)},e.prototype.findClass=function(e){e=e.toLowerCase();var t=this.classes[e];if(!t){var n=this.alternativeNames[e];if(n&&n!=e)return this.findClass(n)}return t},e.prototype.isDescendantOf=function(e,t){if(!e||!t)return!1;e=e.toLowerCase(),t=t.toLowerCase();var n=this.findClass(e);if(!n)return!1;var r=n;do{if(r.name===t)return!0;r=this.classes[r.parentName]}while(r);return!1},e.prototype.addAlterNativeClassName=function(e,t){this.alternativeNames[t.toLowerCase()]=e.toLowerCase()},e.prototype.generateSchema=function(e){void 0===e&&(e=void 0),e||(e="survey");var t=this.findClass(e);if(!t)return null;var n={$schema:"http://json-schema.org/draft-07/schema#",title:"SurveyJS Library json schema",type:"object",properties:{},definitions:{locstring:this.generateLocStrClass()}};return this.generateSchemaProperties(t,n,n.definitions,!0),n},e.prototype.generateLocStrClass=function(){var e={},t=Br.findProperty("survey","locale");if(t){var n=t.getChoices(null);Array.isArray(n)&&(n.indexOf("en")<0&&n.splice(0,0,"en"),n.splice(0,0,"default"),n.forEach((function(t){t&&(e[t]={type:"string"})})))}return{$id:"locstring",type:"object",properties:e}},e.prototype.generateSchemaProperties=function(e,t,n,r){if(e){var o=t.properties,i=[];"question"!==e.name&&"panel"!==e.name||(o.type={type:"string"},i.push("type"));for(var s=0;s<e.properties.length;s++){var a=e.properties[s];e.parentName&&Br.findProperty(e.parentName,a.name)||(o[a.name]=this.generateSchemaProperty(a,n,r),a.isRequired&&i.push(a.name))}i.length>0&&(t.required=i)}},e.prototype.generateSchemaProperty=function(e,t,n){if(e.isLocalizable)return{oneOf:[{type:"string"},{$ref:this.getChemeRefName("locstring",n)}]};var r=e.schemaType(),o=e.schemaRef(),i={};if(r&&(i.type=r),e.hasChoices){var s=e.getChoices(null);Array.isArray(s)&&s.length>0&&(i.enum=this.getChoicesValues(s))}if(o&&("array"===r?"string"===e.className?i.items={type:e.className}:i.items={$ref:this.getChemeRefName(e.className,n)}:i.$ref=this.getChemeRefName(o,n),this.generateChemaClass(e.className,t,!1)),e.baseClassName){var a=this.getChildrenClasses(e.baseClassName,!0);"question"==e.baseClassName&&a.push(this.findClass("panel")),i.items={anyOf:[]};for(var u=0;u<a.length;u++){var l=a[u].name;i.items.anyOf.push({$ref:this.getChemeRefName(l,n)}),this.generateChemaClass(l,t,!1)}}return i},e.prototype.getChemeRefName=function(e,t){return t?"#/definitions/"+e:e},e.prototype.generateChemaClass=function(e,t,n){if(!t[e]){var r=this.findClass(e);if(r){var o=!!r.parentName&&"base"!=r.parentName;o&&this.generateChemaClass(r.parentName,t,n);var i={type:"object",$id:e};t[e]=i;var s={properties:{}};this.generateSchemaProperties(r,s,t,n),o?i.allOf=[{$ref:this.getChemeRefName(r.parentName,n)},{properties:s.properties}]:i.properties=s.properties,Array.isArray(s.required)&&(i.required=s.required)}}},e.prototype.getChoicesValues=function(e){var t=new Array;return e.forEach((function(e){"object"==typeof e&&void 0!==e.value?t.push(e.value):t.push(e)})),t},e}(),Nr=function(){function e(e,t){this.type=e,this.message=t,this.description="",this.at=-1,this.end=-1}return e.prototype.getFullDescription=function(){return this.message+(this.description?"\n"+this.description:"")},e}(),Ar=function(e){function t(t,n){var r=e.call(this,"unknownproperty","Unknown property in class '"+n+"': '"+t+"'.")||this;return r.propertyName=t,r.className=n,r}return Or(t,e),t}(Nr),jr=function(e){function t(t,n,r){var o=e.call(this,n,r)||this;return o.baseClassName=t,o.type=n,o.message=r,o}return Or(t,e),t}(Nr),Rr=function(e){function t(t,n){var r=e.call(this,n,"missingtypeproperty","The property type is missing in the object. Please take a look at property: '"+t+"'.")||this;return r.propertyName=t,r.baseClassName=n,r}return Or(t,e),t}(jr),Dr=function(e){function t(t,n){var r=e.call(this,n,"incorrecttypeproperty","The property type is incorrect in the object. Please take a look at property: '"+t+"'.")||this;return r.propertyName=t,r.baseClassName=n,r}return Or(t,e),t}(jr),Lr=function(e){function t(t,n){var r=e.call(this,"requiredproperty","The property '"+t+"' is required in class '"+n+"'.")||this;return r.propertyName=t,r.className=n,r}return Or(t,e),t}(Nr),kr=function(e){function t(t,n){var r=e.call(this,"arrayproperty","The property '"+t+"' should be an array in '"+n+"'.")||this;return r.propertyName=t,r.className=n,r}return Or(t,e),t}(Nr),Mr=function(e){function t(t,n){var r=e.call(this,"incorrectvalue","The property value: '"+n+"' is incorrect for property '"+t.name+"'.")||this;return r.property=t,r.value=n,r}return Or(t,e),t}(Nr),Fr=function(){function e(){this.errors=new Array,this.lightSerializing=!1}return Object.defineProperty(e,"metaData",{get:function(){return e.metaDataValue},enumerable:!1,configurable:!0}),e.prototype.toJsonObject=function(e,t){return this.toJsonObjectCore(e,null,t)},e.prototype.toObject=function(e,t,n){this.toObjectCore(e,t,n);var r=this.getRequiredError(t,e);r&&this.addNewError(r,e,t)},e.prototype.toObjectCore=function(t,n,r){if(t){var o=null,i=void 0,s=!0;if(n.getType&&(i=n.getType(),o=Br.getProperties(i),s=!!i&&!Br.isDescendantOf(i,"itemvalue")),o){for(var a in n.startLoadingFromJson&&n.startLoadingFromJson(t),o=this.addDynamicProperties(n,t,o),this.options=r,t)if(a!==e.typePropertyName)if(a!==e.positionPropertyName){var u=this.findProperty(o,a);u?this.valueToObj(t[a],n,u,t,r):s&&this.addNewError(new Ar(a.toString(),i),t,n)}else n[a]=t[a];this.options=void 0,n.endLoadingFromJson&&n.endLoadingFromJson()}}},e.prototype.toJsonObjectCore=function(t,n,r){if(!t||!t.getType)return t;if(!t.isSurvey&&"function"==typeof t.getData)return t.getData();var o={};null==n||n.className||(o[e.typePropertyName]=n.getObjType(t.getType()));var i=!0===r;return r&&!0!==r||(r={}),i&&(r.storeDefaults=i),this.propertiesToJson(t,Br.getProperties(t.getType()),o,r),this.propertiesToJson(t,this.getDynamicProperties(t),o,r),o},e.prototype.getDynamicProperties=function(e){return Br.getDynamicPropertiesByObj(e)},e.prototype.addDynamicProperties=function(e,t,n){if(!e.getDynamicPropertyName&&!e.getDynamicProperties)return n;if(e.getDynamicPropertyName){var r=e.getDynamicPropertyName();if(!r)return n;r&&t[r]&&(e[r]=t[r])}var o=this.getDynamicProperties(e);return 0===o.length?n:[].concat(n).concat(o)},e.prototype.propertiesToJson=function(e,t,n,r){for(var o=0;o<t.length;o++)this.valueToJson(e,n,t[o],r)},e.prototype.valueToJson=function(e,t,n,r){r||(r={}),!1===n.isSerializable||!1===n.isLightSerializable&&this.lightSerializing||r.version&&!n.isAvailableInVersion(r.version)||this.valueToJsonCore(e,t,n,r)},e.prototype.valueToJsonCore=function(e,t,n,r){var o=n.getSerializedProperty(e,r.version);if(o&&o!==n)this.valueToJsonCore(e,t,o,r);else{var i=n.getSerializableValue(e);if(r.storeDefaults||!n.isDefaultValueByObj(e,i)){if(this.isValueArray(i)){for(var s=[],a=0;a<i.length;a++)s.push(this.toJsonObjectCore(i[a],n,r));i=s.length>0?s:null}else i=this.toJsonObjectCore(i,n,r);if(null!=i){var u=n.getSerializedName(r.version),l="function"==typeof e.getPropertyValue&&null!==e.getPropertyValue(u,null);(r.storeDefaults&&l||!n.isDefaultValueByObj(e,i))&&(Br.onSerializingProperty&&Br.onSerializingProperty(e,n,i,t)||(t[u]=this.removePosOnValueToJson(n,i)))}}}},e.prototype.valueToObj=function(e,t,n,r,o){if(null!=e)if(this.removePos(n,e),null!=n&&n.hasToUseSetValue)n.setValue(t,e,this);else{if(n.isArray&&!Array.isArray(e)&&e){e=[e];var i=r&&n.alternativeName&&r[n.alternativeName]?n.alternativeName:n.name;this.addNewError(new kr(i,t.getType()),r||e,t)}if(this.isValueArray(e))this.valueToArray(e,t,n.name,n,o);else{var s=this.createNewObj(e,n);s.newObj&&(this.toObjectCore(e,s.newObj,o),e=s.newObj),s.error||(null!=n?(n.setValue(t,e,this),o&&o.validatePropertyValues&&(n.validateValue(e)||this.addNewError(new Mr(n,e),r,t))):t[n.name]=e)}}},e.prototype.removePosOnValueToJson=function(e,t){return e.isCustom&&t?(this.removePosFromObj(t),t):t},e.prototype.removePos=function(e,t){!e||!e.type||e.type.indexOf("value")<0||this.removePosFromObj(t)},e.prototype.removePosFromObj=function(t){if(t&&"function"!=typeof t.getType){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.removePosFromObj(t[n]);if("object"==typeof t)for(var r in t[e.positionPropertyName]&&delete t[e.positionPropertyName],t)this.removePosFromObj(t[r])}},e.prototype.isValueArray=function(e){return e&&Array.isArray(e)},e.prototype.createNewObj=function(e,t){var n={newObj:null,error:null},r=this.getClassNameForNewObj(e,t);return n.newObj=r?Br.createClass(r,e):null,n.error=this.checkNewObjectOnErrors(n.newObj,e,t,r),n},e.prototype.getClassNameForNewObj=function(t,n){var r=null!=n&&n.className?n.className:void 0;if(r||(r=t[e.typePropertyName]),!r)return r;r=r.toLowerCase();var o=n.classNamePart;return o&&r.indexOf(o)<0&&(r+=o),r},e.prototype.checkNewObjectOnErrors=function(e,t,n,r){var o=null;return e?o=this.getRequiredError(e,t):n.baseClassName&&(o=r?new Dr(n.name,n.baseClassName):new Rr(n.name,n.baseClassName)),o&&this.addNewError(o,t,e),o},e.prototype.getRequiredError=function(e,t){if(!e.getType||"function"==typeof e.getData)return null;var n=Br.findClass(e.getType());if(!n)return null;var r=n.getRequiredProperties();if(!Array.isArray(r))return null;for(var o=0;o<r.length;o++){var i=r[o];if(Cr.isValueEmpty(i.defaultValue)&&!t[i.name])return new Lr(i.name,e.getType())}return null},e.prototype.addNewError=function(t,n,r){if(t.jsonObj=n,t.element=r,this.errors.push(t),n){var o=n[e.positionPropertyName];o&&(t.at=o.start,t.end=o.end)}},e.prototype.valueToArray=function(e,t,n,r,o){if(!t[n]||this.isValueArray(t[n])){t[n]&&e.length>0&&t[n].splice(0,t[n].length);var i=t[n]?t[n]:[];this.addValuesIntoArray(e,i,r,o),t[n]||(t[n]=i)}},e.prototype.addValuesIntoArray=function(e,t,n,r){for(var o=0;o<e.length;o++){var i=this.createNewObj(e[o],n);i.newObj?(e[o].name&&(i.newObj.name=e[o].name),e[o].valueName&&(i.newObj.valueName=e[o].valueName.toString()),t.push(i.newObj),this.toObjectCore(e[o],i.newObj,r)):i.error||t.push(e[o])}},e.prototype.findProperty=function(e,t){if(!e)return null;for(var n=0;n<e.length;n++){var r=e[n];if(r.name==t||r.alternativeName==t)return r}return null},e.typePropertyName="type",e.positionPropertyName="pos",e.metaDataValue=new Tr,e}(),Br=Fr.metaData,zr=function(){function e(){this.values=null,this.properties=null}return e.prototype.getFirstName=function(e,t){if(void 0===t&&(t=null),!e)return e;var n="";if(t&&(n=this.getFirstPropertyName(e,t)))return n;for(var r=0;r<e.length;r++){var o=e[r];if("."==o||"["==o)break;n+=o}return n},e.prototype.hasValue=function(e,t){return void 0===t&&(t=null),t||(t=this.values),this.getValueCore(e,t).hasValue},e.prototype.getValue=function(e,t){return void 0===t&&(t=null),t||(t=this.values),this.getValueCore(e,t).value},e.prototype.setValue=function(e,t,n){if(t){var r=this.getNonNestedObject(e,t,!0);r&&(e=r.value,t=r.text,e&&t&&(e[t]=n))}},e.prototype.getValueInfo=function(e){if(e.path)return e.value=this.getValueFromPath(e.path,this.values),e.hasValue=null!==e.value&&!Cr.isValueEmpty(e.value),void(!e.hasValue&&e.path.length>1&&"length"==e.path[e.path.length-1]&&(e.hasValue=!0,e.value=0));var t=this.getValueCore(e.name,this.values);e.value=t.value,e.hasValue=t.hasValue,e.path=t.hasValue?t.path:null,e.sctrictCompare=t.sctrictCompare},e.prototype.isAnyKeyChanged=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];if(r){var o=r.toLowerCase();if(e.hasOwnProperty(r))return!0;if(r!==o&&e.hasOwnProperty(o))return!0;var i=this.getFirstName(r);if(e.hasOwnProperty(i)){if(r===i)return!0;var s=e[i];if(null!=s){if(!s.hasOwnProperty("oldValue")||!s.hasOwnProperty("newValue"))return!0;var a={};a[i]=s.oldValue;var u=this.getValue(r,a);a[i]=s.newValue;var l=this.getValue(r,a);if(!Cr.isTwoValueEquals(u,l,!1,!1,!1))return!0}}}}return!1},e.prototype.getValueFromPath=function(e,t){if(2===e.length&&"@survey"===e[0])return this.getValueFromSurvey(e[1]);for(var n=0;t&&n<e.length;){var r=e[n];if(Cr.isNumber(r)&&Array.isArray(t)&&r>=t.length)return null;t=t[r],n++}return t},e.prototype.getValueCore=function(e,t){var n=this.getQuestionDirectly(e);if(n)return{hasValue:!0,value:n.value,path:[e],sctrictCompare:n.requireStrictCompare};var r=this.getValueFromValues(e,t);if(e&&!r.hasValue){var o=this.getValueFromSurvey(e);void 0!==o&&(r.hasValue=!0,r.value=o,r.path=["@survey",e])}return r},e.prototype.getQuestionDirectly=function(e){if(this.properties&&this.properties.survey)return this.properties.survey.getQuestionByValueName(e)},e.prototype.getValueFromSurvey=function(e){if(this.properties&&this.properties.survey)return this.properties.survey.getBuiltInVariableValue(e.toLocaleLowerCase())},e.prototype.getValueFromValues=function(e,t){var n={hasValue:!1,value:null,path:null},r=t;if(!r&&0!==r&&!1!==r)return n;e&&e.lastIndexOf(".length")>-1&&e.lastIndexOf(".length")===e.length-".length".length&&(n.value=0,n.hasValue=!0);var o=this.getNonNestedObject(r,e,!1);return o?(n.path=o.path,n.value=o.text?this.getObjectValue(o.value,o.text):o.value,n.hasValue=!Cr.isValueEmpty(n.value),n):n},e.prototype.getNonNestedObject=function(e,t,n){for(var r=new Array,o=0,i=this.getNonNestedObjectCore(e,t,n,r);!i&&o<r.length;)o=r.length,i=this.getNonNestedObjectCore(e,t,n,r);return i},e.prototype.getNonNestedObjectCore=function(e,t,n,r){var o=this.getFirstPropertyName(t,e,n,r);o&&r.push(o);for(var i=o?[o]:null;t!=o&&e;){if("["==t[0]){var s=this.getObjInArray(e,t);if(!s)return null;e=s.value,t=s.text,i.push(s.index)}else{if(!o&&t==this.getFirstName(t))return{value:e,text:t,path:i};if(e=this.getObjectValue(e,o),Cr.isValueEmpty(e)&&!n)return null;t=t.substring(o.length)}t&&"."==t[0]&&(t=t.substring(1)),(o=this.getFirstPropertyName(t,e,n,r))&&i.push(o)}return{value:e,text:t,path:i}},e.prototype.getObjInArray=function(e,t){if(!Array.isArray(e))return null;for(var n=1,r="";n<t.length&&"]"!=t[n];)r+=t[n],n++;return t=n<t.length?t.substring(n+1):"",(n=this.getIntValue(r))<0||n>=e.length?null:{value:e[n],text:t,index:n}},e.prototype.getFirstPropertyName=function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=void 0),!e)return e;if(t||(t={}),t.hasOwnProperty(e))return e;var o=e.toLowerCase(),i=o[0],s=i.toUpperCase();for(var a in t)if(!(Array.isArray(r)&&r.indexOf(a)>-1)){var u=a[0];if(u===s||u===i){var l=a.toLowerCase();if(l==o)return a;if(o.length<=l.length)continue;var c=o[l.length];if("."!=c&&"["!=c)continue;if(l==o.substring(0,l.length))return a}}if(n&&"["!==e[0]){var p=e.indexOf(".");return p>-1&&(t[e=e.substring(0,p)]={}),e}return""},e.prototype.getObjectValue=function(e,t){return t?e[t]:null},e.prototype.getIntValue=function(e){return"0"==e||(0|e)>0&&e%1==0?Number(e):-1},e}(),Hr=function(){function e(){}return e.disposedObjectChangedProperty=function(t,n){e.warn('An attempt to set a property "'+t+'" of a disposed object "'+n+'"')},e.inCorrectQuestionValue=function(t,n){var r=JSON.stringify(n,null,3);e.warn("An attempt to assign an incorrect value"+r+' to the following question: "'+t+'"')},e.warn=function(e){console.warn(e)},e.error=function(e){console.error(e)},e}(),Wr=function(){function e(){this.functionHash={},this.isAsyncHash={}}return e.prototype.register=function(e,t,n){void 0===n&&(n=!1),this.functionHash[e]=t,n&&(this.isAsyncHash[e]=!0)},e.prototype.unregister=function(e){delete this.functionHash[e],delete this.isAsyncHash[e]},e.prototype.hasFunction=function(e){return!!this.functionHash[e]},e.prototype.isAsyncFunction=function(e){return!!this.isAsyncHash[e]},e.prototype.clear=function(){this.functionHash={}},e.prototype.getAll=function(){var e=[];for(var t in this.functionHash)e.push(t);return e.sort()},e.prototype.run=function(e,t,n,r){void 0===n&&(n=null);var o=this.functionHash[e];if(!o)return Hr.warn("Unknown function name: "+e),null;var i={func:o};if(n)for(var s in n)i[s]=n[s];return i.func(t,r)},e.Instance=new e,e}();Wr.Instance.register;function Ur(e,t){if(null!=e)if(Array.isArray(e))for(var n=0;n<e.length;n++)Ur(e[n],t);else Cr.isNumber(e)&&(e=Cr.getNumber(e)),t.push(e)}function Qr(e){var t=[];Ur(e,t);for(var n=0,r=0;r<t.length;r++)n=Cr.correctAfterPlusMinis(n,t[r],n+t[r]);return n}function Jr(e,t){var n=[];Ur(e,n);for(var r=void 0,o=0;o<n.length;o++)void 0===r&&(r=n[o]),t?r>n[o]&&(r=n[o]):r<n[o]&&(r=n[o]);return r}function Kr(e,t,n,r,o,i){return!e||Cr.isValueEmpty(e[t])||i&&!i.run(e)?n:r(n,o?function(e){return"string"==typeof e?Cr.isNumber(e)?Cr.getNumber(e):void 0:e}(e[t]):1)}function Gr(e,t,n,r){void 0===r&&(r=!0);var o=function(e,t){if(e.length<2||e.length>3)return null;var n=e[0];if(!n)return null;if(!Array.isArray(n)&&!Array.isArray(Object.keys(n)))return null;var r=e[1];if("string"!=typeof r&&!(r instanceof String))return null;var o=e.length>2?e[2]:void 0;if("string"==typeof o||o instanceof String||(o=void 0),!o){var i=Array.isArray(t)&&t.length>2?t[2]:void 0;i&&i.toString()&&(o=i.toString())}return{data:n,name:r,expression:o}}(e,t);if(o){var i=o.expression?new wo(o.expression):void 0;i&&i.isAsync&&(i=void 0);var s=void 0;if(Array.isArray(o.data))for(var a=0;a<o.data.length;a++)s=Kr(o.data[a],o.name,s,n,r,i);else for(var u in o.data)s=Kr(o.data[u],o.name,s,n,r,i);return s}}function Yr(e,t){var n=Gr(e,t,(function(e,t){return null==e&&(e=0),null==t||null==t?e:Cr.correctAfterPlusMinis(e,t,e+t)}));return void 0!==n?n:0}function Zr(e,t){var n=Gr(e,t,(function(e,t){return null==e&&(e=0),null==t||null==t?e:e+1}),!1);return void 0!==n?n:0}function $r(e,t,n){if("days"===n)return to([e,t]);var r=e?new Date(e):new Date,o=t?new Date(t):new Date;n=n||"years";var i=12*(o.getFullYear()-r.getFullYear())+o.getMonth()-r.getMonth();return o.getDate()<r.getDate()&&(i-=1),"months"===n?i:~~(i/12)}function Xr(e){if(!e)return!1;for(var t=e.questions,n=0;n<t.length;n++)if(!t[n].validate(!1))return!1;return!0}function eo(e){var t=new Date;return br.localization.useLocalTimeZone?t.setHours(0,0,0,0):t.setUTCHours(0,0,0,0),Array.isArray(e)&&1==e.length&&t.setDate(t.getDate()+e[0]),t}function to(e){if(!Array.isArray(e)||2!==e.length)return 0;if(!e[0]||!e[1])return 0;var t=new Date(e[0]),n=new Date(e[1]),r=Math.abs(n-t);return Math.ceil(r/864e5)}function no(e){var t=eo(void 0);return e&&e[0]&&(t=new Date(e[0])),t}function ro(e,t){if(e&&t){for(var n=["row","panel","survey"],r=0;r<n.length;r++){var o=e[n[r]];if(o&&o.getQuestionByName){var i=o.getQuestionByName(t);if(i)return i}}return null}}Wr.Instance.register("sum",Qr),Wr.Instance.register("min",(function(e){return Jr(e,!0)})),Wr.Instance.register("max",(function(e){return Jr(e,!1)})),Wr.Instance.register("count",(function(e){var t=[];return Ur(e,t),t.length})),Wr.Instance.register("avg",(function(e){var t=[];Ur(e,t);var n=Qr(e);return t.length>0?n/t.length:0})),Wr.Instance.register("sumInArray",Yr),Wr.Instance.register("minInArray",(function(e,t){return Gr(e,t,(function(e,t){return null==e?t:null==t||null==t||e<t?e:t}))})),Wr.Instance.register("maxInArray",(function(e,t){return Gr(e,t,(function(e,t){return null==e?t:null==t||null==t||e>t?e:t}))})),Wr.Instance.register("countInArray",Zr),Wr.Instance.register("avgInArray",(function(e,t){var n=Zr(e,t);return 0==n?0:Yr(e,t)/n})),Wr.Instance.register("iif",(function(e){return e||3===e.length?e[0]?e[1]:e[2]:""})),Wr.Instance.register("getDate",(function(e){return!e&&e.length<1?null:e[0]?new Date(e[0]):null})),Wr.Instance.register("age",(function(e){return!Array.isArray(e)||e.length<1||!e[0]?null:$r(e[0],void 0,(e.length>1?e[1]:"")||"years")})),Wr.Instance.register("dateDiff",(function(e){return!Array.isArray(e)||e.length<2||!e[0]||!e[1]?null:$r(e[0],e[1],(e.length>2?e[2]:"")||"days")})),Wr.Instance.register("isContainerReady",(function(e){if(!e&&e.length<1)return!1;if(!e[0]||!this.survey)return!1;var t=e[0],n=this.survey.getPageByName(t);if(n||(n=this.survey.getPanelByName(t)),!n){var r=this.survey.getQuestionByName(t);if(!r||!Array.isArray(r.panels))return!1;if(!(e.length>1)){for(var o=0;o<r.panels.length;o++)if(!Xr(r.panels[o]))return!1;return!0}e[1]<r.panels.length&&(n=r.panels[e[1]])}return Xr(n)})),Wr.Instance.register("isDisplayMode",(function(){return this.survey&&this.survey.isDisplayMode})),Wr.Instance.register("currentDate",(function(){return new Date})),Wr.Instance.register("today",eo),Wr.Instance.register("getYear",(function(e){if(1===e.length&&e[0])return new Date(e[0]).getFullYear()})),Wr.Instance.register("currentYear",(function(){return(new Date).getFullYear()})),Wr.Instance.register("diffDays",to),Wr.Instance.register("year",(function(e){return no(e).getFullYear()})),Wr.Instance.register("month",(function(e){return no(e).getMonth()+1})),Wr.Instance.register("day",(function(e){return no(e).getDate()})),Wr.Instance.register("weekday",(function(e){return no(e).getDay()})),Wr.Instance.register("displayValue",(function(e){var t=ro(this,e[0]);return t?t.displayValue:""})),Wr.Instance.register("propertyValue",(function(e){if(2===e.length&&e[0]&&e[1]){var t=ro(this,e[0]);return t?t[e[1]]:void 0}})),Wr.Instance.register("substring",(function(e){if(e.length<2)return"";var t=e[0];if(!t||"string"!=typeof t)return"";var n=e[1];if(!Cr.isNumber(n))return"";var r=e.length>2?e[2]:void 0;return Cr.isNumber(r)?t.substring(n,r):t.substring(n)}));var oo=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),io=function(){function e(){}return e.prototype.toString=function(e){return void 0===e&&(e=void 0),""},e.prototype.hasFunction=function(){return!1},e.prototype.hasAsyncFunction=function(){return!1},e.prototype.addToAsyncList=function(e){},e.prototype.isEqual=function(e){return!!e&&e.getType()===this.getType()&&this.isContentEqual(e)},e.prototype.areOperatorsEquals=function(e,t){return!e&&!t||!!e&&e.isEqual(t)},e}(),so=function(e){function t(t,n,r,o){void 0===n&&(n=null),void 0===r&&(r=null),void 0===o&&(o=!1);var i=e.call(this)||this;return i.operatorName=t,i.left=n,i.right=r,i.isArithmeticValue=o,i.consumer=o?ho.binaryFunctions.arithmeticOp(t):ho.binaryFunctions[t],null==i.consumer&&ho.throwInvalidOperatorError(t),i}return oo(t,e),Object.defineProperty(t.prototype,"requireStrictCompare",{get:function(){return this.getIsOperandRequireStrict(this.left)||this.getIsOperandRequireStrict(this.right)},enumerable:!1,configurable:!0}),t.prototype.getIsOperandRequireStrict=function(e){return!!e&&e.requireStrictCompare},t.prototype.getType=function(){return"binary"},Object.defineProperty(t.prototype,"isArithmetic",{get:function(){return this.isArithmeticValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isConjunction",{get:function(){return"or"==this.operatorName||"and"==this.operatorName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"conjunction",{get:function(){return this.isConjunction?this.operatorName:""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"operator",{get:function(){return this.operatorName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leftOperand",{get:function(){return this.left},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightOperand",{get:function(){return this.right},enumerable:!1,configurable:!0}),t.prototype.isContentEqual=function(e){var t=e;return t.operator===this.operator&&this.areOperatorsEquals(this.left,t.left)&&this.areOperatorsEquals(this.right,t.right)},t.prototype.evaluateParam=function(e,t){return null==e?null:e.evaluate(t)},t.prototype.evaluate=function(e){return this.consumer.call(this,this.evaluateParam(this.left,e),this.evaluateParam(this.right,e),this.requireStrictCompare)},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return"("+ho.safeToString(this.left,e)+" "+ho.operatorToString(this.operatorName)+" "+ho.safeToString(this.right,e)+")"},t.prototype.setVariables=function(e){null!=this.left&&this.left.setVariables(e),null!=this.right&&this.right.setVariables(e)},t.prototype.hasFunction=function(){return!!this.left&&this.left.hasFunction()||!!this.right&&this.right.hasFunction()},t.prototype.hasAsyncFunction=function(){return!!this.left&&this.left.hasAsyncFunction()||!!this.right&&this.right.hasAsyncFunction()},t.prototype.addToAsyncList=function(e){this.left&&this.left.addToAsyncList(e),this.right&&this.right.addToAsyncList(e)},t}(io),ao=function(e){function t(t,n){var r=e.call(this)||this;return r.expressionValue=t,r.operatorName=n,r.consumer=ho.unaryFunctions[n],null==r.consumer&&ho.throwInvalidOperatorError(n),r}return oo(t,e),Object.defineProperty(t.prototype,"operator",{get:function(){return this.operatorName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"expression",{get:function(){return this.expressionValue},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"unary"},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return ho.operatorToString(this.operatorName)+" "+this.expression.toString(e)},t.prototype.isContentEqual=function(e){var t=e;return t.operator==this.operator&&this.areOperatorsEquals(this.expression,t.expression)},t.prototype.hasFunction=function(){return this.expression.hasFunction()},t.prototype.hasAsyncFunction=function(){return this.expression.hasAsyncFunction()},t.prototype.addToAsyncList=function(e){this.expression.addToAsyncList(e)},t.prototype.evaluate=function(e){var t=this.expression.evaluate(e);return this.consumer.call(this,t)},t.prototype.setVariables=function(e){this.expression.setVariables(e)},t}(io),uo=function(e){function t(t){var n=e.call(this)||this;return n.values=t,n}return oo(t,e),t.prototype.getType=function(){return"array"},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return"["+this.values.map((function(t){return t.toString(e)})).join(", ")+"]"},t.prototype.evaluate=function(e){return this.values.map((function(t){return t.evaluate(e)}))},t.prototype.setVariables=function(e){this.values.forEach((function(t){t.setVariables(e)}))},t.prototype.hasFunction=function(){return this.values.some((function(e){return e.hasFunction()}))},t.prototype.hasAsyncFunction=function(){return this.values.some((function(e){return e.hasAsyncFunction()}))},t.prototype.addToAsyncList=function(e){this.values.forEach((function(t){return t.addToAsyncList(e)}))},t.prototype.isContentEqual=function(e){var t=e;if(t.values.length!==this.values.length)return!1;for(var n=0;n<this.values.length;n++)if(!t.values[n].isEqual(this.values[n]))return!1;return!0},t}(io),lo=function(e){function t(t){var n=e.call(this)||this;return n.value=t,n}return oo(t,e),t.prototype.getType=function(){return"const"},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return this.value.toString()},Object.defineProperty(t.prototype,"correctValue",{get:function(){return this.getCorrectValue(this.value)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"requireStrictCompare",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.evaluate=function(){return this.getCorrectValue(this.value)},t.prototype.setVariables=function(e){},t.prototype.getCorrectValue=function(e){return e&&"string"==typeof e?this.isBooleanValue(e)?"true"===e.toLowerCase():e.length>1&&this.isQuote(e[0])&&this.isQuote(e[e.length-1])?e.substring(1,e.length-1):ho.isNumeric(e)?0==e.indexOf("0x")?parseInt(e):e.length>1&&"0"==e[0]&&(e.length<2||"."!==e[1]&&","!==e[1])?e:parseFloat(e):e:e},t.prototype.isContentEqual=function(e){return e.value==this.value},t.prototype.isQuote=function(e){return"'"==e||'"'==e},t.prototype.isBooleanValue=function(e){return e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())},t}(io),co=function(e){function t(n){var r=e.call(this,n)||this;return r.variableName=n,r.valueInfo={},r.useValueAsItIs=!1,r.variableName&&r.variableName.length>1&&r.variableName[0]===t.DisableConversionChar&&(r.variableName=r.variableName.substring(1),r.useValueAsItIs=!0),r}return oo(t,e),Object.defineProperty(t,"DisableConversionChar",{get:function(){return br.expressionDisableConversionChar},set:function(e){br.expressionDisableConversionChar=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"requireStrictCompare",{get:function(){return!0===this.valueInfo.sctrictCompare},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"variable"},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var n=e(this);if(n)return n}return"{"+(this.useValueAsItIs?t.DisableConversionChar:"")+this.variableName+"}"},Object.defineProperty(t.prototype,"variable",{get:function(){return this.variableName},enumerable:!1,configurable:!0}),t.prototype.evaluate=function(e){return this.valueInfo.name=this.variableName,e.getValueInfo(this.valueInfo),this.valueInfo.hasValue?this.getCorrectValue(this.valueInfo.value):null},t.prototype.setVariables=function(e){e.push(this.variableName)},t.prototype.getCorrectValue=function(t){return this.useValueAsItIs?t:e.prototype.getCorrectValue.call(this,t)},t.prototype.isContentEqual=function(e){return e.variable==this.variable},t}(lo),po=function(e){function t(t,n){var r=e.call(this)||this;return r.originalValue=t,r.parameters=n,r.isReadyValue=!1,Array.isArray(n)&&0===n.length&&(r.parameters=new uo([])),r}return oo(t,e),t.prototype.getType=function(){return"function"},t.prototype.evaluateAsync=function(e){var t=this;this.isReadyValue=!1;var n=new zr;n.values=Cr.createCopy(e.values),n.properties=Cr.createCopy(e.properties),n.properties.returnResult=function(e){t.asynResult=e,t.isReadyValue=!0,t.onAsyncReady()},this.evaluateCore(n)},t.prototype.evaluate=function(e){return this.isReady?this.asynResult:this.evaluateCore(e)},t.prototype.evaluateCore=function(e){return Wr.Instance.run(this.originalValue,this.parameters.evaluate(e),e.properties,this.parameters.values)},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return this.originalValue+"("+this.parameters.toString(e)+")"},t.prototype.setVariables=function(e){this.parameters.setVariables(e)},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.isReadyValue},enumerable:!1,configurable:!0}),t.prototype.hasFunction=function(){return!0},t.prototype.hasAsyncFunction=function(){return Wr.Instance.isAsyncFunction(this.originalValue)},t.prototype.addToAsyncList=function(e){this.hasAsyncFunction()&&e.push(this)},t.prototype.isContentEqual=function(e){var t=e;return t.originalValue==this.originalValue&&this.areOperatorsEquals(t.parameters,this.parameters)},t}(io),ho=function(){function e(){}return e.throwInvalidOperatorError=function(e){throw new Error("Invalid operator: '"+e+"'")},e.safeToString=function(e,t){return null==e?"":e.toString(t)},e.toOperandString=function(t){return!t||e.isNumeric(t)||e.isBooleanValue(t)||(t="'"+t+"'"),t},e.isSpaceString=function(e){return!!e&&!e.replace(" ","")},e.isNumeric=function(t){return(!t||!(t.indexOf("-")>-1||t.indexOf("+")>1||t.indexOf("*")>-1||t.indexOf("^")>-1||t.indexOf("/")>-1||t.indexOf("%")>-1))&&(!e.isSpaceString(t)&&Cr.isNumber(t))},e.isBooleanValue=function(e){return!!e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())},e.countDecimals=function(e){if(Cr.isNumber(e)&&Math.floor(e)!==e){var t=e.toString().split(".");return t.length>1&&t[1].length||0}return 0},e.plusMinus=function(t,n,r){var o=e.countDecimals(t),i=e.countDecimals(n);if(o>0||i>0){var s=Math.max(o,i);r=parseFloat(r.toFixed(s))}return r},e.isTwoValueEquals=function(e,t,n){return void 0===n&&(n=!0),"undefined"===e&&(e=void 0),"undefined"===t&&(t=void 0),Cr.isTwoValueEquals(e,t,n)},e.operatorToString=function(t){var n=e.signs[t];return null==n?t:n},e.convertValForDateCompare=function(e,t){if(t instanceof Date&&"string"==typeof e){var n=new Date(e);return n.setHours(0,0,0),n}return e},e.unaryFunctions={empty:function(e){return Cr.isValueEmpty(e)},notempty:function(t){return!e.unaryFunctions.empty(t)},negate:function(e){return!e}},e.binaryFunctions={arithmeticOp:function(t){var n=function(e,t){return Cr.isValueEmpty(e)?"number"==typeof t?0:"string"==typeof e?e:"string"==typeof t?"":Array.isArray(t)?[]:0:e};return function(r,o){r=n(r,o),o=n(o,r);var i=e.binaryFunctions[t];return null==i?null:i.call(this,r,o)}},and:function(e,t){return e&&t},or:function(e,t){return e||t},plus:function(e,t){return Cr.sumAnyValues(e,t)},minus:function(e,t){return Cr.correctAfterPlusMinis(e,t,e-t)},mul:function(e,t){return Cr.correctAfterMultiple(e,t,e*t)},div:function(e,t){return t?e/t:null},mod:function(e,t){return t?e%t:null},power:function(e,t){return Math.pow(e,t)},greater:function(t,n){return null!=t&&null!=n&&(t=e.convertValForDateCompare(t,n))>(n=e.convertValForDateCompare(n,t))},less:function(t,n){return null!=t&&null!=n&&(t=e.convertValForDateCompare(t,n))<(n=e.convertValForDateCompare(n,t))},greaterorequal:function(t,n){return!!e.binaryFunctions.equal(t,n)||e.binaryFunctions.greater(t,n)},lessorequal:function(t,n){return!!e.binaryFunctions.equal(t,n)||e.binaryFunctions.less(t,n)},equal:function(t,n,r){return t=e.convertValForDateCompare(t,n),n=e.convertValForDateCompare(n,t),e.isTwoValueEquals(t,n,!0!==r)},notequal:function(t,n,r){return!e.binaryFunctions.equal(t,n,r)},contains:function(t,n){return e.binaryFunctions.containsCore(t,n,!0)},notcontains:function(t,n){return!t&&!Cr.isValueEmpty(n)||e.binaryFunctions.containsCore(t,n,!1)},anyof:function(t,n){if(Cr.isValueEmpty(t)&&Cr.isValueEmpty(n))return!0;if(Cr.isValueEmpty(t)||!Array.isArray(t)&&0===t.length)return!1;if(Cr.isValueEmpty(n))return!0;if(!Array.isArray(t))return e.binaryFunctions.contains(n,t);if(!Array.isArray(n))return e.binaryFunctions.contains(t,n);for(var r=0;r<n.length;r++)if(e.binaryFunctions.contains(t,n[r]))return!0;return!1},allof:function(t,n){if(!t&&!Cr.isValueEmpty(n))return!1;if(!Array.isArray(n))return e.binaryFunctions.contains(t,n);for(var r=0;r<n.length;r++)if(!e.binaryFunctions.contains(t,n[r]))return!1;return!0},containsCore:function(t,n,r){if(!t&&0!==t&&!1!==t)return!1;if(t.length||(t=t.toString(),("string"==typeof n||n instanceof String)&&(t=t.toUpperCase(),n=n.toUpperCase())),"string"==typeof t||t instanceof String){if(!n)return!1;n=n.toString();var o=t.indexOf(n)>-1;return r?o:!o}for(var i=Array.isArray(n)?n:[n],s=0;s<i.length;s++){var a=0;for(n=i[s];a<t.length&&!e.isTwoValueEquals(t[a],n);a++);if(a==t.length)return!r}return r}},e.signs={less:"<",lessorequal:"<=",greater:">",greaterorequal:">=",equal:"==",notequal:"!=",plus:"+",minus:"-",mul:"*",div:"/",and:"and",or:"or",power:"^",mod:"%",negate:"!"},e}(),fo=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mo=function(e){function t(n,r,o,i){var s=e.call(this)||this;return s.message=n,s.expected=r,s.found=o,s.location=i,s.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(s,t),s}return fo(t,e),t.buildMessage=function(e,t){function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}function r(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function o(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function i(e){switch(e.type){case"literal":return'"'+r(e.text)+'"';case"class":var t=e.parts.map((function(e){return Array.isArray(e)?o(e[0])+"-"+o(e[1]):o(e)}));return"["+(e.inverted?"^":"")+t+"]";case"any":return"any character";case"end":return"end of input";case"other":return e.description}}return"Expected "+function(e){var t,n,r=e.map(i);if(r.sort(),r.length>0){for(t=1,n=1;t<r.length;t++)r[t-1]!==r[t]&&(r[n]=r[t],n++);r.length=n}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(e)+" but "+(((s=t)?'"'+r(s)+'"':"end of input")+" found.");var s},t}(Error);var yo=function(e,t){t=void 0!==t?t:{};var n,r={},o={Expression:ze},i=ze,s=function(e,t){return ht(e,t,!0)},a=Re("||",!1),u=Re("or",!0),l=Re("&&",!1),c=Re("and",!0),p=function(e,t){return ht(e,t)},h=Re("<=",!1),d=Re("lessorequal",!0),f=Re(">=",!1),m=Re("greaterorequal",!0),y=Re("==",!1),g=Re("equal",!0),v=Re("=",!1),b=Re("!=",!1),C=Re("notequal",!0),E=Re("<",!1),w=Re("less",!0),O=Re(">",!1),P=Re("greater",!0),q=Re("+",!1),S=Re("-",!1),x=Re("*",!1),_=Re("/",!1),I=Re("%",!1),V=Re("^",!1),T=Re("power",!0),N=Re("*=",!1),A=Re("contains",!0),j=Re("contain",!0),R=Re("notcontains",!0),D=Re("notcontain",!0),L=Re("anyof",!0),k=Re("allof",!0),M=Re("(",!1),F=Re(")",!1),B=Re("!",!1),z=Re("negate",!0),H=Re("empty",!0),W=Re("notempty",!0),U=Re("undefined",!1),Q=Re("null",!1),J=Re("{",!1),K=Re("}",!1),G=Re("''",!1),Y=Re('""',!1),Z=Re("'",!1),$=function(e){return"'"+e+"'"},X=Re('"',!1),ee=Re("[",!1),te=Re("]",!1),ne=Re(",",!1),re=Re("true",!0),oe=Re("false",!0),ie=Re("0x",!1),se=/^[\-]/,ae=De(["-"],!1,!1),ue=Re(".",!1),le=Re("0",!1),ce=function(e){return e.join("")},pe=Re("\\'",!1),he=Re('\\"',!1),de=/^[^"']/,fe=De(['"',"'"],!0,!1),me=function(){return je()},ye=/^[^{}]/,ge=De(["{","}"],!0,!1),ve=/^[0-9]/,be=De([["0","9"]],!1,!1),Ce=/^[1-9]/,Ee=De([["1","9"]],!1,!1),we=/^[a-zA-Z_]/,Oe=De([["a","z"],["A","Z"],"_"],!1,!1),Pe=Le("whitespace"),qe=/^[ \t\n\r]/,Se=De([" ","\t","\n","\r"],!1,!1),xe=0,_e=0,Ie=[{line:1,column:1}],Ve=0,Te=[],Ne=0,Ae={};if(void 0!==t.startRule){if(!(t.startRule in o))throw new Error("Can't start parsing from rule \""+t.startRule+'".');i=o[t.startRule]}function je(){return e.substring(_e,xe)}function Re(e,t){return{type:"literal",text:e,ignoreCase:t}}function De(e,t,n){return{type:"class",parts:e,inverted:t,ignoreCase:n}}function Le(e){return{type:"other",description:e}}function ke(t){var n,r=Ie[t];if(r)return r;for(n=t-1;!Ie[n];)n--;for(r={line:(r=Ie[n]).line,column:r.column};n<t;)10===e.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return Ie[t]=r,r}function Me(e,t){var n=ke(e),r=ke(t);return{start:{offset:e,line:n.line,column:n.column},end:{offset:t,line:r.line,column:r.column}}}function Fe(e){xe<Ve||(xe>Ve&&(Ve=xe,Te=[]),Te.push(e))}function Be(e,t,n){return new mo(mo.buildMessage(e,t),e,t,n)}function ze(){var e,t,n,o,i,a,u,l,c=34*xe+0,p=Ae[c];if(p)return xe=p.nextPos,p.result;if(e=xe,pt()!==r)if((t=We())!==r){for(n=[],o=xe,(i=pt())!==r&&(a=He())!==r&&(u=pt())!==r&&(l=We())!==r?o=i=[i,a,u,l]:(xe=o,o=r);o!==r;)n.push(o),o=xe,(i=pt())!==r&&(a=He())!==r&&(u=pt())!==r&&(l=We())!==r?o=i=[i,a,u,l]:(xe=o,o=r);n!==r&&(o=pt())!==r?(_e=e,e=s(t,n)):(xe=e,e=r)}else xe=e,e=r;else xe=e,e=r;return Ae[c]={nextPos:xe,result:e},e}function He(){var t,n,o=34*xe+1,i=Ae[o];return i?(xe=i.nextPos,i.result):(t=xe,"||"===e.substr(xe,2)?(n="||",xe+=2):(n=r,0===Ne&&Fe(a)),n===r&&("or"===e.substr(xe,2).toLowerCase()?(n=e.substr(xe,2),xe+=2):(n=r,0===Ne&&Fe(u))),n!==r&&(_e=t,n="or"),t=n,Ae[o]={nextPos:xe,result:t},t)}function We(){var e,t,n,o,i,a,u,l,c=34*xe+2,p=Ae[c];if(p)return xe=p.nextPos,p.result;if(e=xe,(t=Qe())!==r){for(n=[],o=xe,(i=pt())!==r&&(a=Ue())!==r&&(u=pt())!==r&&(l=Qe())!==r?o=i=[i,a,u,l]:(xe=o,o=r);o!==r;)n.push(o),o=xe,(i=pt())!==r&&(a=Ue())!==r&&(u=pt())!==r&&(l=Qe())!==r?o=i=[i,a,u,l]:(xe=o,o=r);n!==r?(_e=e,e=t=s(t,n)):(xe=e,e=r)}else xe=e,e=r;return Ae[c]={nextPos:xe,result:e},e}function Ue(){var t,n,o=34*xe+3,i=Ae[o];return i?(xe=i.nextPos,i.result):(t=xe,"&&"===e.substr(xe,2)?(n="&&",xe+=2):(n=r,0===Ne&&Fe(l)),n===r&&("and"===e.substr(xe,3).toLowerCase()?(n=e.substr(xe,3),xe+=3):(n=r,0===Ne&&Fe(c))),n!==r&&(_e=t,n="and"),t=n,Ae[o]={nextPos:xe,result:t},t)}function Qe(){var e,t,n,o,i,s,a,u,l=34*xe+4,c=Ae[l];if(c)return xe=c.nextPos,c.result;if(e=xe,(t=Ke())!==r){for(n=[],o=xe,(i=pt())!==r&&(s=Je())!==r&&(a=pt())!==r&&(u=Ke())!==r?o=i=[i,s,a,u]:(xe=o,o=r);o!==r;)n.push(o),o=xe,(i=pt())!==r&&(s=Je())!==r&&(a=pt())!==r&&(u=Ke())!==r?o=i=[i,s,a,u]:(xe=o,o=r);n!==r?(_e=e,e=t=p(t,n)):(xe=e,e=r)}else xe=e,e=r;return Ae[l]={nextPos:xe,result:e},e}function Je(){var t,n,o=34*xe+5,i=Ae[o];return i?(xe=i.nextPos,i.result):(t=xe,"<="===e.substr(xe,2)?(n="<=",xe+=2):(n=r,0===Ne&&Fe(h)),n===r&&("lessorequal"===e.substr(xe,11).toLowerCase()?(n=e.substr(xe,11),xe+=11):(n=r,0===Ne&&Fe(d))),n!==r&&(_e=t,n="lessorequal"),(t=n)===r&&(t=xe,">="===e.substr(xe,2)?(n=">=",xe+=2):(n=r,0===Ne&&Fe(f)),n===r&&("greaterorequal"===e.substr(xe,14).toLowerCase()?(n=e.substr(xe,14),xe+=14):(n=r,0===Ne&&Fe(m))),n!==r&&(_e=t,n="greaterorequal"),(t=n)===r&&(t=xe,"=="===e.substr(xe,2)?(n="==",xe+=2):(n=r,0===Ne&&Fe(y)),n===r&&("equal"===e.substr(xe,5).toLowerCase()?(n=e.substr(xe,5),xe+=5):(n=r,0===Ne&&Fe(g))),n!==r&&(_e=t,n="equal"),(t=n)===r&&(t=xe,61===e.charCodeAt(xe)?(n="=",xe++):(n=r,0===Ne&&Fe(v)),n===r&&("equal"===e.substr(xe,5).toLowerCase()?(n=e.substr(xe,5),xe+=5):(n=r,0===Ne&&Fe(g))),n!==r&&(_e=t,n="equal"),(t=n)===r&&(t=xe,"!="===e.substr(xe,2)?(n="!=",xe+=2):(n=r,0===Ne&&Fe(b)),n===r&&("notequal"===e.substr(xe,8).toLowerCase()?(n=e.substr(xe,8),xe+=8):(n=r,0===Ne&&Fe(C))),n!==r&&(_e=t,n="notequal"),(t=n)===r&&(t=xe,60===e.charCodeAt(xe)?(n="<",xe++):(n=r,0===Ne&&Fe(E)),n===r&&("less"===e.substr(xe,4).toLowerCase()?(n=e.substr(xe,4),xe+=4):(n=r,0===Ne&&Fe(w))),n!==r&&(_e=t,n="less"),(t=n)===r&&(t=xe,62===e.charCodeAt(xe)?(n=">",xe++):(n=r,0===Ne&&Fe(O)),n===r&&("greater"===e.substr(xe,7).toLowerCase()?(n=e.substr(xe,7),xe+=7):(n=r,0===Ne&&Fe(P))),n!==r&&(_e=t,n="greater"),t=n)))))),Ae[o]={nextPos:xe,result:t},t)}function Ke(){var e,t,n,o,i,a,u,l,c=34*xe+6,p=Ae[c];if(p)return xe=p.nextPos,p.result;if(e=xe,(t=Ye())!==r){for(n=[],o=xe,(i=pt())!==r&&(a=Ge())!==r&&(u=pt())!==r&&(l=Ye())!==r?o=i=[i,a,u,l]:(xe=o,o=r);o!==r;)n.push(o),o=xe,(i=pt())!==r&&(a=Ge())!==r&&(u=pt())!==r&&(l=Ye())!==r?o=i=[i,a,u,l]:(xe=o,o=r);n!==r?(_e=e,e=t=s(t,n)):(xe=e,e=r)}else xe=e,e=r;return Ae[c]={nextPos:xe,result:e},e}function Ge(){var t,n,o=34*xe+7,i=Ae[o];return i?(xe=i.nextPos,i.result):(t=xe,43===e.charCodeAt(xe)?(n="+",xe++):(n=r,0===Ne&&Fe(q)),n!==r&&(_e=t,n="plus"),(t=n)===r&&(t=xe,45===e.charCodeAt(xe)?(n="-",xe++):(n=r,0===Ne&&Fe(S)),n!==r&&(_e=t,n="minus"),t=n),Ae[o]={nextPos:xe,result:t},t)}function Ye(){var e,t,n,o,i,a,u,l,c=34*xe+8,p=Ae[c];if(p)return xe=p.nextPos,p.result;if(e=xe,(t=$e())!==r){for(n=[],o=xe,(i=pt())!==r&&(a=Ze())!==r&&(u=pt())!==r&&(l=$e())!==r?o=i=[i,a,u,l]:(xe=o,o=r);o!==r;)n.push(o),o=xe,(i=pt())!==r&&(a=Ze())!==r&&(u=pt())!==r&&(l=$e())!==r?o=i=[i,a,u,l]:(xe=o,o=r);n!==r?(_e=e,e=t=s(t,n)):(xe=e,e=r)}else xe=e,e=r;return Ae[c]={nextPos:xe,result:e},e}function Ze(){var t,n,o=34*xe+9,i=Ae[o];return i?(xe=i.nextPos,i.result):(t=xe,42===e.charCodeAt(xe)?(n="*",xe++):(n=r,0===Ne&&Fe(x)),n!==r&&(_e=t,n="mul"),(t=n)===r&&(t=xe,47===e.charCodeAt(xe)?(n="/",xe++):(n=r,0===Ne&&Fe(_)),n!==r&&(_e=t,n="div"),(t=n)===r&&(t=xe,37===e.charCodeAt(xe)?(n="%",xe++):(n=r,0===Ne&&Fe(I)),n!==r&&(_e=t,n="mod"),t=n)),Ae[o]={nextPos:xe,result:t},t)}function $e(){var e,t,n,o,i,a,u,l,c=34*xe+10,p=Ae[c];if(p)return xe=p.nextPos,p.result;if(e=xe,(t=et())!==r){for(n=[],o=xe,(i=pt())!==r&&(a=Xe())!==r&&(u=pt())!==r&&(l=et())!==r?o=i=[i,a,u,l]:(xe=o,o=r);o!==r;)n.push(o),o=xe,(i=pt())!==r&&(a=Xe())!==r&&(u=pt())!==r&&(l=et())!==r?o=i=[i,a,u,l]:(xe=o,o=r);n!==r?(_e=e,e=t=s(t,n)):(xe=e,e=r)}else xe=e,e=r;return Ae[c]={nextPos:xe,result:e},e}function Xe(){var t,n,o=34*xe+11,i=Ae[o];return i?(xe=i.nextPos,i.result):(t=xe,94===e.charCodeAt(xe)?(n="^",xe++):(n=r,0===Ne&&Fe(V)),n===r&&("power"===e.substr(xe,5).toLowerCase()?(n=e.substr(xe,5),xe+=5):(n=r,0===Ne&&Fe(T))),n!==r&&(_e=t,n="power"),t=n,Ae[o]={nextPos:xe,result:t},t)}function et(){var e,t,n,o,i,s,a,u,l=34*xe+12,c=Ae[l];if(c)return xe=c.nextPos,c.result;if(e=xe,(t=nt())!==r){for(n=[],o=xe,(i=pt())!==r&&(s=tt())!==r&&(a=pt())!==r?((u=nt())===r&&(u=null),u!==r?o=i=[i,s,a,u]:(xe=o,o=r)):(xe=o,o=r);o!==r;)n.push(o),o=xe,(i=pt())!==r&&(s=tt())!==r&&(a=pt())!==r?((u=nt())===r&&(u=null),u!==r?o=i=[i,s,a,u]:(xe=o,o=r)):(xe=o,o=r);n!==r?(_e=e,e=t=p(t,n)):(xe=e,e=r)}else xe=e,e=r;return Ae[l]={nextPos:xe,result:e},e}function tt(){var t,n,o=34*xe+13,i=Ae[o];return i?(xe=i.nextPos,i.result):(t=xe,"*="===e.substr(xe,2)?(n="*=",xe+=2):(n=r,0===Ne&&Fe(N)),n===r&&("contains"===e.substr(xe,8).toLowerCase()?(n=e.substr(xe,8),xe+=8):(n=r,0===Ne&&Fe(A)),n===r&&("contain"===e.substr(xe,7).toLowerCase()?(n=e.substr(xe,7),xe+=7):(n=r,0===Ne&&Fe(j)))),n!==r&&(_e=t,n="contains"),(t=n)===r&&(t=xe,"notcontains"===e.substr(xe,11).toLowerCase()?(n=e.substr(xe,11),xe+=11):(n=r,0===Ne&&Fe(R)),n===r&&("notcontain"===e.substr(xe,10).toLowerCase()?(n=e.substr(xe,10),xe+=10):(n=r,0===Ne&&Fe(D))),n!==r&&(_e=t,n="notcontains"),(t=n)===r&&(t=xe,"anyof"===e.substr(xe,5).toLowerCase()?(n=e.substr(xe,5),xe+=5):(n=r,0===Ne&&Fe(L)),n!==r&&(_e=t,n="anyof"),(t=n)===r&&(t=xe,"allof"===e.substr(xe,5).toLowerCase()?(n=e.substr(xe,5),xe+=5):(n=r,0===Ne&&Fe(k)),n!==r&&(_e=t,n="allof"),t=n))),Ae[o]={nextPos:xe,result:t},t)}function nt(){var t,n,o,i,s=34*xe+14,a=Ae[s];return a?(xe=a.nextPos,a.result):(t=xe,40===e.charCodeAt(xe)?(n="(",xe++):(n=r,0===Ne&&Fe(M)),n!==r&&pt()!==r&&(o=ze())!==r&&pt()!==r?(41===e.charCodeAt(xe)?(i=")",xe++):(i=r,0===Ne&&Fe(F)),i===r&&(i=null),i!==r?(_e=t,t=n=o):(xe=t,t=r)):(xe=t,t=r),t===r&&(t=function(){var t,n,o,i,s,a=34*xe+15,u=Ae[a];if(u)return xe=u.nextPos,u.result;t=xe,(n=ut())!==r?(40===e.charCodeAt(xe)?(o="(",xe++):(o=r,0===Ne&&Fe(M)),o!==r&&(i=ot())!==r?(41===e.charCodeAt(xe)?(s=")",xe++):(s=r,0===Ne&&Fe(F)),s===r&&(s=null),s!==r?(_e=t,n=new po(n,i),t=n):(xe=t,t=r)):(xe=t,t=r)):(xe=t,t=r);return Ae[a]={nextPos:xe,result:t},t}())===r&&(t=function(){var t,n,o,i=34*xe+16,s=Ae[i];if(s)return xe=s.nextPos,s.result;t=xe,33===e.charCodeAt(xe)?(n="!",xe++):(n=r,0===Ne&&Fe(B));n===r&&("negate"===e.substr(xe,6).toLowerCase()?(n=e.substr(xe,6),xe+=6):(n=r,0===Ne&&Fe(z)));n!==r&&pt()!==r&&(o=ze())!==r?(_e=t,n=new ao(o,"negate"),t=n):(xe=t,t=r);t===r&&(t=xe,(n=rt())!==r&&pt()!==r&&(o=function(){var t,n,o=34*xe+17,i=Ae[o];if(i)return xe=i.nextPos,i.result;t=xe,"empty"===e.substr(xe,5).toLowerCase()?(n=e.substr(xe,5),xe+=5):(n=r,0===Ne&&Fe(H));n!==r&&(_e=t,n="empty");(t=n)===r&&(t=xe,"notempty"===e.substr(xe,8).toLowerCase()?(n=e.substr(xe,8),xe+=8):(n=r,0===Ne&&Fe(W)),n!==r&&(_e=t,n="notempty"),t=n);return Ae[o]={nextPos:xe,result:t},t}())!==r?(_e=t,n=function(e,t){return new ao(e,t)}(n,o),t=n):(xe=t,t=r));return Ae[i]={nextPos:xe,result:t},t}())===r&&(t=rt())===r&&(t=function(){var t,n,o,i,s=34*xe+20,a=Ae[s];if(a)return xe=a.nextPos,a.result;t=xe,91===e.charCodeAt(xe)?(n="[",xe++):(n=r,0===Ne&&Fe(ee));n!==r&&(o=ot())!==r?(93===e.charCodeAt(xe)?(i="]",xe++):(i=r,0===Ne&&Fe(te)),i!==r?(_e=t,t=n=o):(xe=t,t=r)):(xe=t,t=r);return Ae[s]={nextPos:xe,result:t},t}()),Ae[s]={nextPos:xe,result:t},t)}function rt(){var t,n,o,i,s=34*xe+18,a=Ae[s];return a?(xe=a.nextPos,a.result):(t=xe,pt()!==r?("undefined"===e.substr(xe,9)?(n="undefined",xe+=9):(n=r,0===Ne&&Fe(U)),n===r&&("null"===e.substr(xe,4)?(n="null",xe+=4):(n=r,0===Ne&&Fe(Q))),n!==r?(_e=t,t=null):(xe=t,t=r)):(xe=t,t=r),t===r&&(t=xe,pt()!==r&&(n=function(){var t,n,o,i,s=34*xe+19,a=Ae[s];if(a)return xe=a.nextPos,a.result;t=xe,(n=function(){var t,n,o=34*xe+22,i=Ae[o];if(i)return xe=i.nextPos,i.result;t=xe,"true"===e.substr(xe,4).toLowerCase()?(n=e.substr(xe,4),xe+=4):(n=r,0===Ne&&Fe(re));n!==r&&(_e=t,n=!0);(t=n)===r&&(t=xe,"false"===e.substr(xe,5).toLowerCase()?(n=e.substr(xe,5),xe+=5):(n=r,0===Ne&&Fe(oe)),n!==r&&(_e=t,n=!1),t=n);return Ae[o]={nextPos:xe,result:t},t}())!==r&&(_e=t,n=n);(t=n)===r&&(t=xe,(n=function(){var t,n,o,i=34*xe+23,s=Ae[i];if(s)return xe=s.nextPos,s.result;t=xe,"0x"===e.substr(xe,2)?(n="0x",xe+=2):(n=r,0===Ne&&Fe(ie));n!==r&&(o=lt())!==r?(_e=t,n=parseInt(je(),16),t=n):(xe=t,t=r);t===r&&(t=xe,se.test(e.charAt(xe))?(n=e.charAt(xe),xe++):(n=r,0===Ne&&Fe(ae)),n===r&&(n=null),n!==r&&(o=function(){var t,n,o,i=34*xe+24,s=Ae[i];if(s)return xe=s.nextPos,s.result;t=xe,(n=lt())!==r?(46===e.charCodeAt(xe)?(o=".",xe++):(o=r,0===Ne&&Fe(ue)),o!==r&&lt()!==r?(_e=t,n=parseFloat(je()),t=n):(xe=t,t=r)):(xe=t,t=r);t===r&&(t=xe,(n=function(){var t,n,o=34*xe+31,i=Ae[o];if(i)return xe=i.nextPos,i.result;t=[],Ce.test(e.charAt(xe))?(n=e.charAt(xe),xe++):(n=r,0===Ne&&Fe(Ee));if(n!==r)for(;n!==r;)t.push(n),Ce.test(e.charAt(xe))?(n=e.charAt(xe),xe++):(n=r,0===Ne&&Fe(Ee));else t=r;return Ae[o]={nextPos:xe,result:t},t}())!==r?((o=lt())===r&&(o=null),o!==r?(_e=t,n=parseInt(je(),10),t=n):(xe=t,t=r)):(xe=t,t=r),t===r&&(t=xe,48===e.charCodeAt(xe)?(n="0",xe++):(n=r,0===Ne&&Fe(le)),n!==r&&(_e=t,n=0),t=n));return Ae[i]={nextPos:xe,result:t},t}())!==r?(_e=t,a=o,t=n=null==n?a:-a):(xe=t,t=r));var a;return Ae[i]={nextPos:xe,result:t},t}())!==r&&(_e=t,n=n),(t=n)===r&&(t=xe,(n=ut())!==r&&(_e=t,n=n),(t=n)===r&&(t=xe,"''"===e.substr(xe,2)?(n="''",xe+=2):(n=r,0===Ne&&Fe(G)),n!==r&&(_e=t,n=""),(t=n)===r&&(t=xe,'""'===e.substr(xe,2)?(n='""',xe+=2):(n=r,0===Ne&&Fe(Y)),n!==r&&(_e=t,n=""),(t=n)===r&&(t=xe,39===e.charCodeAt(xe)?(n="'",xe++):(n=r,0===Ne&&Fe(Z)),n!==r&&(o=it())!==r?(39===e.charCodeAt(xe)?(i="'",xe++):(i=r,0===Ne&&Fe(Z)),i!==r?(_e=t,n=$(o),t=n):(xe=t,t=r)):(xe=t,t=r),t===r&&(t=xe,34===e.charCodeAt(xe)?(n='"',xe++):(n=r,0===Ne&&Fe(X)),n!==r&&(o=it())!==r?(34===e.charCodeAt(xe)?(i='"',xe++):(i=r,0===Ne&&Fe(X)),i!==r?(_e=t,n=$(o),t=n):(xe=t,t=r)):(xe=t,t=r)))))));return Ae[s]={nextPos:xe,result:t},t}())!==r?(_e=t,t=new lo(n)):(xe=t,t=r),t===r&&(t=xe,pt()!==r?(123===e.charCodeAt(xe)?(n="{",xe++):(n=r,0===Ne&&Fe(J)),n!==r&&(o=function(){var e,t,n,o=34*xe+25,i=Ae[o];if(i)return xe=i.nextPos,i.result;if(e=xe,t=[],(n=at())!==r)for(;n!==r;)t.push(n),n=at();else t=r;t!==r&&(_e=e,t=ce(t));return e=t,Ae[o]={nextPos:xe,result:e},e}())!==r?(125===e.charCodeAt(xe)?(i="}",xe++):(i=r,0===Ne&&Fe(K)),i!==r?(_e=t,t=function(e){return new co(e)}(o)):(xe=t,t=r)):(xe=t,t=r)):(xe=t,t=r))),Ae[s]={nextPos:xe,result:t},t)}function ot(){var t,n,o,i,s,a,u,l,c=34*xe+21,p=Ae[c];if(p)return xe=p.nextPos,p.result;if(t=xe,(n=ze())===r&&(n=null),n!==r){for(o=[],i=xe,(s=pt())!==r?(44===e.charCodeAt(xe)?(a=",",xe++):(a=r,0===Ne&&Fe(ne)),a!==r&&(u=pt())!==r&&(l=ze())!==r?i=s=[s,a,u,l]:(xe=i,i=r)):(xe=i,i=r);i!==r;)o.push(i),i=xe,(s=pt())!==r?(44===e.charCodeAt(xe)?(a=",",xe++):(a=r,0===Ne&&Fe(ne)),a!==r&&(u=pt())!==r&&(l=ze())!==r?i=s=[s,a,u,l]:(xe=i,i=r)):(xe=i,i=r);o!==r?(_e=t,t=n=function(e,t){if(null==e)return new uo([]);var n=[e];if(Array.isArray(t))for(var r=function(e){return[].concat.apply([],e)}(t),o=3;o<r.length;o+=4)n.push(r[o]);return new uo(n)}(n,o)):(xe=t,t=r)}else xe=t,t=r;return Ae[c]={nextPos:xe,result:t},t}function it(){var e,t,n,o=34*xe+26,i=Ae[o];if(i)return xe=i.nextPos,i.result;if(e=xe,t=[],(n=st())!==r)for(;n!==r;)t.push(n),n=st();else t=r;return t!==r&&(_e=e,t=ce(t)),e=t,Ae[o]={nextPos:xe,result:e},e}function st(){var t,n,o=34*xe+27,i=Ae[o];return i?(xe=i.nextPos,i.result):(t=xe,"\\'"===e.substr(xe,2)?(n="\\'",xe+=2):(n=r,0===Ne&&Fe(pe)),n!==r&&(_e=t,n="'"),(t=n)===r&&(t=xe,'\\"'===e.substr(xe,2)?(n='\\"',xe+=2):(n=r,0===Ne&&Fe(he)),n!==r&&(_e=t,n='"'),(t=n)===r&&(t=xe,de.test(e.charAt(xe))?(n=e.charAt(xe),xe++):(n=r,0===Ne&&Fe(fe)),n!==r&&(_e=t,n=me()),t=n)),Ae[o]={nextPos:xe,result:t},t)}function at(){var t,n,o=34*xe+28,i=Ae[o];return i?(xe=i.nextPos,i.result):(t=xe,ye.test(e.charAt(xe))?(n=e.charAt(xe),xe++):(n=r,0===Ne&&Fe(ge)),n!==r&&(_e=t,n=me()),t=n,Ae[o]={nextPos:xe,result:t},t)}function ut(){var e,t,n,o,i,s,a=34*xe+29,u=Ae[a];if(u)return xe=u.nextPos,u.result;if(e=xe,ct()!==r){if(t=[],n=xe,(o=lt())!==r){for(i=[],s=ct();s!==r;)i.push(s),s=ct();i!==r?n=o=[o,i]:(xe=n,n=r)}else xe=n,n=r;for(;n!==r;)if(t.push(n),n=xe,(o=lt())!==r){for(i=[],s=ct();s!==r;)i.push(s),s=ct();i!==r?n=o=[o,i]:(xe=n,n=r)}else xe=n,n=r;t!==r?(_e=e,e=me()):(xe=e,e=r)}else xe=e,e=r;return Ae[a]={nextPos:xe,result:e},e}function lt(){var t,n,o=34*xe+30,i=Ae[o];if(i)return xe=i.nextPos,i.result;if(t=[],ve.test(e.charAt(xe))?(n=e.charAt(xe),xe++):(n=r,0===Ne&&Fe(be)),n!==r)for(;n!==r;)t.push(n),ve.test(e.charAt(xe))?(n=e.charAt(xe),xe++):(n=r,0===Ne&&Fe(be));else t=r;return Ae[o]={nextPos:xe,result:t},t}function ct(){var t,n,o=34*xe+32,i=Ae[o];if(i)return xe=i.nextPos,i.result;if(t=[],we.test(e.charAt(xe))?(n=e.charAt(xe),xe++):(n=r,0===Ne&&Fe(Oe)),n!==r)for(;n!==r;)t.push(n),we.test(e.charAt(xe))?(n=e.charAt(xe),xe++):(n=r,0===Ne&&Fe(Oe));else t=r;return Ae[o]={nextPos:xe,result:t},t}function pt(){var t,n,o=34*xe+33,i=Ae[o];if(i)return xe=i.nextPos,i.result;for(Ne++,t=[],qe.test(e.charAt(xe))?(n=e.charAt(xe),xe++):(n=r,0===Ne&&Fe(Se));n!==r;)t.push(n),qe.test(e.charAt(xe))?(n=e.charAt(xe),xe++):(n=r,0===Ne&&Fe(Se));return Ne--,t===r&&(n=r,0===Ne&&Fe(Pe)),Ae[o]={nextPos:xe,result:t},t}function ht(e,t,n){return void 0===n&&(n=!1),t.reduce((function(e,t){return new so(t[1],e,t[3],n)}),e)}if((n=i())!==r&&xe===e.length)return n;throw n!==r&&xe<e.length&&Fe({type:"end"}),Be(Te,Ve<e.length?e.charAt(Ve):null,Ve<e.length?Me(Ve,Ve+1):Me(Ve,Ve))},go=function(e,t){this.at=e,this.code=t},vo=function(){function e(){}return e.prototype.patchExpression=function(e){return e.replace(/=>/g,">=").replace(/=</g,"<=").replace(/<>/g,"!=").replace(/equals/g,"equal ").replace(/notequals/g,"notequal ")},e.prototype.createCondition=function(e){return this.parseExpression(e)},e.prototype.parseExpression=function(t){try{var n=e.parserCache[t];return void 0===n&&((n=yo(this.patchExpression(t))).hasAsyncFunction()||(e.parserCache[t]=n)),n}catch(e){e instanceof mo&&(this.conditionError=new go(e.location.start.offset,e.message))}},Object.defineProperty(e.prototype,"error",{get:function(){return this.conditionError},enumerable:!1,configurable:!0}),e.parserCache={},e}(),bo=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Co=function(){function e(e){this.processValue=new zr,this.parser=new vo,this.isAsyncValue=!1,this.hasFunctionValue=!1,this.setExpression(e)}return Object.defineProperty(e.prototype,"expression",{get:function(){return this.expressionValue},enumerable:!1,configurable:!0}),e.prototype.setExpression=function(e){this.expression!==e&&(this.expressionValue=e,this.operand=this.parser.parseExpression(e),this.hasFunctionValue=!!this.canRun()&&this.operand.hasFunction(),this.isAsyncValue=!!this.hasFunction()&&this.operand.hasAsyncFunction())},e.prototype.getVariables=function(){if(!this.operand)return[];var e=[];return this.operand.setVariables(e),e},e.prototype.hasFunction=function(){return this.hasFunctionValue},Object.defineProperty(e.prototype,"isAsync",{get:function(){return this.isAsyncValue},enumerable:!1,configurable:!0}),e.prototype.canRun=function(){return!!this.operand},e.prototype.run=function(e,t){var n=this;if(void 0===t&&(t=null),!this.operand)return this.expression&&Hr.warn("Invalid expression: "+this.expression),null;if(this.processValue.values=e,this.processValue.properties=t,!this.isAsync)return this.runValues();this.asyncFuncList=[],this.operand.addToAsyncList(this.asyncFuncList);for(var r=0;r<this.asyncFuncList.length;r++)this.asyncFuncList[r].onAsyncReady=function(){n.doAsyncFunctionReady()};for(r=0;r<this.asyncFuncList.length;r++)this.asyncFuncList[r].evaluateAsync(this.processValue);return!1},e.prototype.doAsyncFunctionReady=function(){for(var e=0;e<this.asyncFuncList.length;e++)if(!this.asyncFuncList[e].isReady)return;this.runValues()},e.prototype.runValues=function(){var e=this.operand.evaluate(this.processValue);return this.onComplete&&this.onComplete(e),e},e.createExpressionExecutor=function(t){return new e(t)},e}(),Eo=function(){function e(t){this._id=e.IdCounter++,this.expression=t}return Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"expression",{get:function(){return this.expressionExecutor?this.expressionExecutor.expression:""},set:function(e){var t=this;this.expressionExecutor&&e===this.expression||(this.expressionExecutor=Co.createExpressionExecutor(e),this.expressionExecutor.onComplete=function(e){t.doOnComplete(e)},this.variables=void 0,this.containsFunc=void 0)},enumerable:!1,configurable:!0}),e.prototype.getVariables=function(){return void 0===this.variables&&(this.variables=this.expressionExecutor.getVariables()),this.variables},e.prototype.hasFunction=function(){return void 0===this.containsFunc&&(this.containsFunc=this.expressionExecutor.hasFunction()),this.containsFunc},Object.defineProperty(e.prototype,"isAsync",{get:function(){return this.expressionExecutor.isAsync},enumerable:!1,configurable:!0}),e.prototype.canRun=function(){return this.expressionExecutor.canRun()},e.prototype.runCore=function(e,t){return void 0===t&&(t=null),this.onBeforeAsyncRun&&this.isAsync&&this.onBeforeAsyncRun(this.id),this.expressionExecutor.run(e,t)},e.prototype.doOnComplete=function(e){this.onAfterAsyncRun&&this.isAsync&&this.onAfterAsyncRun(this.id)},e.IdCounter=1,e}(),wo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return bo(t,e),t.prototype.run=function(e,t){return void 0===t&&(t=null),1==this.runCore(e,t)},t.prototype.doOnComplete=function(t){this.onRunComplete&&this.onRunComplete(1==t),e.prototype.doOnComplete.call(this,t)},t}(Eo),Oo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return bo(t,e),t.prototype.run=function(e,t){return void 0===t&&(t=null),this.runCore(e,t)},t.prototype.doOnComplete=function(t){this.onRunComplete&&this.onRunComplete(t),e.prototype.doOnComplete.call(this,t)},t}(Eo),Po=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qo=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},So=function(){function e(e){this.obj=e,this.properties=null,this.values=null}return e.prototype.getType=function(){return"bindings"},e.prototype.getNames=function(){var e=[];this.fillProperties();for(var t=0;t<this.properties.length;t++)this.properties[t].isVisible("",this.obj)&&e.push(this.properties[t].name);return e},e.prototype.getProperties=function(){var e=[];this.fillProperties();for(var t=0;t<this.properties.length;t++)e.push(this.properties[t]);return e},e.prototype.setBinding=function(e,t){this.values||(this.values={});var n=this.getJson();n!==t&&(t?this.values[e]=t:(delete this.values[e],0==Object.keys(this.values).length&&(this.values=null)),this.onChangedJSON(n))},e.prototype.clearBinding=function(e){this.setBinding(e,"")},e.prototype.isEmpty=function(){if(!this.values)return!0;for(var e in this.values)return!1;return!0},e.prototype.getValueNameByPropertyName=function(e){if(this.values)return this.values[e]},e.prototype.getPropertiesByValueName=function(e){if(!this.values)return[];var t=[];for(var n in this.values)this.values[n]==e&&t.push(n);return t},e.prototype.getJson=function(){if(!this.isEmpty()){var e={};for(var t in this.values)e[t]=this.values[t];return e}},e.prototype.setJson=function(e){var t=this.getJson();if(this.values=null,e)for(var n in this.values={},e)this.values[n]=e[n];this.onChangedJSON(t)},e.prototype.fillProperties=function(){if(null===this.properties){this.properties=[];for(var e=Br.getPropertiesByObj(this.obj),t=0;t<e.length;t++)e[t].isBindable&&this.properties.push(e[t])}},e.prototype.onChangedJSON=function(e){this.obj&&this.obj.onBindingChanged(e,this.getJson())},e}(),xo=function(){function e(t,n,r){this.currentDependency=t,this.target=n,this.property=r,this.dependencies=[],this.id=""+ ++e.DependenciesCount}return e.prototype.addDependency=function(e,t){this.target===e&&this.property===t||this.dependencies.some((function(n){return n.obj===e&&n.prop===t}))||(this.dependencies.push({obj:e,prop:t,id:this.id}),e.registerPropertyChangedHandlers([t],this.currentDependency,this.id))},e.prototype.dispose=function(){this.dependencies.forEach((function(e){e.obj.unregisterPropertyChangedHandlers([e.prop],e.id)}))},e.DependenciesCount=0,e}(),_o=function(){function e(t){this._updater=t,this.dependencies=void 0,this.type=e.ComputedUpdaterType}return Object.defineProperty(e.prototype,"updater",{get:function(){return this._updater},enumerable:!1,configurable:!0}),e.prototype.setDependencies=function(e){this.clearDependencies(),this.dependencies=e},e.prototype.getDependencies=function(){return this.dependencies},e.prototype.clearDependencies=function(){this.dependencies&&(this.dependencies.dispose(),this.dependencies=void 0)},e.prototype.dispose=function(){this.clearDependencies()},e.ComputedUpdaterType="__dependency_computed",e}(),Io=function(){function e(){this.dependencies={},this.propertyHash=e.createPropertiesHash(),this.eventList=[],this.isLoadingFromJsonValue=!1,this.loadingOwner=null,this.onPropertyChanged=this.addEvent(),this.onItemValuePropertyChanged=this.addEvent(),this.isCreating=!0,this.animationAllowedLock=0,this.supportOnElementRenderedEvent=!0,this.onElementRenderedEventEnabled=!1,this._onElementRerendered=new To,this.bindingsValue=new So(this),Ir.createProperties(this),this.onBaseCreating(),this.isCreating=!1}return e.finishCollectDependencies=function(){var t=e.currentDependencis;return e.currentDependencis=void 0,t},e.startCollectDependencies=function(t,n,r){if(void 0!==e.currentDependencis)throw new Error("Attempt to collect nested dependencies. Nested dependencies are not supported.");e.currentDependencis=new xo(t,n,r)},e.collectDependency=function(t,n){void 0!==e.currentDependencis&&e.currentDependencis.addDependency(t,n)},Object.defineProperty(e,"commentSuffix",{get:function(){return br.commentSuffix},set:function(e){br.commentSuffix=e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"commentPrefix",{get:function(){return e.commentSuffix},set:function(t){e.commentSuffix=t},enumerable:!1,configurable:!0}),e.prototype.isValueEmpty=function(e,t){return void 0===t&&(t=!0),t&&(e=this.trimValue(e)),Cr.isValueEmpty(e)},e.prototype.equals=function(e){return!!e&&(!this.isDisposed&&!e.isDisposed&&(this.getType()==e.getType()&&this.equalsCore(e)))},e.prototype.equalsCore=function(e){return this.name===e.name&&Cr.isTwoValueEquals(this.toJSON(),e.toJSON(),!1,!0,!1)},e.prototype.trimValue=function(e){return e&&("string"==typeof e||e instanceof String)?e.trim():e},e.prototype.isPropertyEmpty=function(e){return""!==e&&this.isValueEmpty(e)},e.createPropertiesHash=function(){return{}},e.prototype.dispose=function(){for(var e=this,t=0;t<this.eventList.length;t++)this.eventList[t].clear();this.onPropertyValueChangedCallback=void 0,this.isDisposedValue=!0,Object.keys(this.dependencies).forEach((function(t){return e.dependencies[t].dispose()}))},Object.defineProperty(e.prototype,"isDisposed",{get:function(){return!0===this.isDisposedValue},enumerable:!1,configurable:!0}),e.prototype.addEvent=function(){var e=new To;return this.eventList.push(e),e},e.prototype.onBaseCreating=function(){},e.prototype.getType=function(){return"base"},e.prototype.isDescendantOf=function(e){return Br.isDescendantOf(this.getType(),e)},e.prototype.getSurvey=function(e){return void 0===e&&(e=!1),null},Object.defineProperty(e.prototype,"isDesignMode",{get:function(){var e=this.getSurvey();return!!e&&e.isDesignMode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDesignModeV2",{get:function(){return br.supportCreatorV2&&this.isDesignMode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"inSurvey",{get:function(){return!!this.getSurvey(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bindings",{get:function(){return this.bindingsValue},enumerable:!1,configurable:!0}),e.prototype.checkBindings=function(e,t){},e.prototype.updateBindings=function(e,t){var n=this.bindings.getValueNameByPropertyName(e);n&&this.updateBindingValue(n,t)},e.prototype.updateBindingValue=function(e,t){},e.prototype.getTemplate=function(){return this.getType()},Object.defineProperty(e.prototype,"isLoadingFromJson",{get:function(){return this.isLoadingFromJsonValue||this.getIsLoadingFromJson()},enumerable:!1,configurable:!0}),e.prototype.getIsLoadingFromJson=function(){return!(!this.loadingOwner||!this.loadingOwner.isLoadingFromJson)||this.isLoadingFromJsonValue},e.prototype.startLoadingFromJson=function(e){this.isLoadingFromJsonValue=!0,this.jsonObj=e},e.prototype.endLoadingFromJson=function(){this.isLoadingFromJsonValue=!1},e.prototype.toJSON=function(e){return(new Fr).toJsonObject(this,e)},e.prototype.fromJSON=function(e,t){(new Fr).toObject(e,this,t),this.onSurveyLoad()},e.prototype.onSurveyLoad=function(){},e.prototype.clone=function(){var e=Br.createClass(this.getType());return e.fromJSON(this.toJSON()),e},e.prototype.getPropertyByName=function(e){var t=this.getType();return this.classMetaData&&this.classMetaData.name===t||(this.classMetaData=Br.findClass(t)),this.classMetaData?this.classMetaData.findProperty(e):null},e.prototype.isPropertyVisible=function(e){var t=this.getPropertyByName(e);return!!t&&t.isVisible("",this)},e.createProgressInfo=function(){return{questionCount:0,answeredQuestionCount:0,requiredQuestionCount:0,requiredAnsweredQuestionCount:0}},e.prototype.getProgressInfo=function(){return e.createProgressInfo()},e.prototype.localeChanged=function(){},e.prototype.locStrsChanged=function(){if(this.arraysInfo)for(var t in this.arraysInfo){if((r=this.arraysInfo[t])&&r.isItemValues){var n=this.getPropertyValue(t);n&&e.itemValueLocStrChanged&&e.itemValueLocStrChanged(n)}}if(this.localizableStrings)for(var t in this.localizableStrings){var r;(r=this.getLocalizableString(t))&&r.strChanged()}},e.prototype.getPropertyValue=function(e,t){void 0===t&&(t=null);var n=this.getPropertyValueWithoutDefault(e);if(this.isPropertyEmpty(n)){var r=this.localizableStrings?this.localizableStrings[e]:void 0;if(r)return r.text;if(null!=t)return t;var o=this.getDefaultPropertyValue(e);if(void 0!==o)return o}return n},e.prototype.getDefaultPropertyValue=function(e){var t=this.getPropertyByName(e);if(!(!t||t.isCustom&&this.isCreating)){var n=t.defaultValue;if(!this.isPropertyEmpty(n)&&!Array.isArray(n))return n;var r=this.localizableStrings?this.localizableStrings[e]:void 0;return r&&r.localizationName?this.getLocalizationString(r.localizationName):"boolean"!=t.type&&"switch"!=t.type&&(t.isCustom&&t.onGetValue?t.onGetValue(this):void 0)}},e.prototype.hasDefaultPropertyValue=function(e){return void 0!==this.getDefaultPropertyValue(e)},e.prototype.resetPropertyValue=function(e){var t=this.localizableStrings?this.localizableStrings[e]:void 0;t?(this.setLocalizableStringText(e,void 0),t.clear()):this.setPropertyValue(e,void 0)},e.prototype.getPropertyValueWithoutDefault=function(e){return this.getPropertyValueCore(this.propertyHash,e)},e.prototype.getPropertyValueCore=function(t,n){return this.isLoadingFromJson||e.collectDependency(this,n),this.getPropertyValueCoreHandler?this.getPropertyValueCoreHandler(t,n):t[n]},e.prototype.geValueFromHash=function(){return this.propertyHash.value},e.prototype.setPropertyValueCore=function(e,t,n){this.setPropertyValueCoreHandler?this.isDisposedValue?Hr.disposedObjectChangedProperty(t,this.getType()):this.setPropertyValueCoreHandler(e,t,n):e[t]=n},Object.defineProperty(e.prototype,"isEditingSurveyElement",{get:function(){var e=this.getSurvey();return!!e&&e.isEditingSurveyElement},enumerable:!1,configurable:!0}),e.prototype.iteratePropertiesHash=function(e){var t=this,n=[];for(var r in this.propertyHash)"value"===r&&this.isEditingSurveyElement&&Array.isArray(this.value)||n.push(r);n.forEach((function(n){return e(t.propertyHash,n)}))},e.prototype.setPropertyValue=function(e,t){if(!this.isLoadingFromJson){var n=this.getPropertyByName(e);n&&(t=n.settingValue(this,t))}var r=this.getPropertyValue(e);r&&Array.isArray(r)&&this.arraysInfo&&(!t||Array.isArray(t))?this.isTwoValueEquals(r,t)||this.setArrayPropertyDirectly(e,t):(this.setPropertyValueDirectly(e,t),this.isDisposedValue||this.isTwoValueEquals(r,t)||this.propertyValueChanged(e,r,t))},e.prototype.setArrayPropertyDirectly=function(e,t,n){void 0===n&&(n=!0);var r=this.arraysInfo[e];this.setArray(e,this.getPropertyValue(e),t,!!r&&r.isItemValues,r?n&&r.onPush:null)},e.prototype.setPropertyValueDirectly=function(e,t){this.setPropertyValueCore(this.propertyHash,e,t)},e.prototype.clearPropertyValue=function(e){this.setPropertyValueCore(this.propertyHash,e,null),delete this.propertyHash[e]},e.prototype.onPropertyValueChangedCallback=function(e,t,n,r,o){},e.prototype.itemValuePropertyChanged=function(e,t,n,r){this.onItemValuePropertyChanged.fire(this,{obj:e,name:t,oldValue:n,newValue:r,propertyName:e.ownerPropertyName})},e.prototype.onPropertyValueChanged=function(e,t,n){},e.prototype.propertyValueChanged=function(e,t,n,r,o){if(!this.isLoadingFromJson&&(this.updateBindings(e,n),this.onPropertyValueChanged(e,t,n),this.onPropertyChanged.fire(this,{name:e,oldValue:t,newValue:n}),this.doPropertyValueChangedCallback(e,t,n,r,this),this.checkConditionPropertyChanged(e),this.onPropChangeFunctions))for(var i=0;i<this.onPropChangeFunctions.length;i++)this.onPropChangeFunctions[i].name==e&&this.onPropChangeFunctions[i].func(n,r)},e.prototype.onBindingChanged=function(e,t){this.isLoadingFromJson||this.doPropertyValueChangedCallback("bindings",e,t)},Object.defineProperty(e.prototype,"isInternal",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.doPropertyValueChangedCallback=function(e,t,n,r,o){var i=function(i){i&&i.onPropertyValueChangedCallback&&i.onPropertyValueChangedCallback(e,t,n,o,r)};if(this.isInternal)i(this);else{o||(o=this);var s=this.getSurvey();s||(s=this),i(s),s!==this&&i(this)}},e.prototype.addExpressionProperty=function(e,t,n){this.expressionInfo||(this.expressionInfo={}),this.expressionInfo[e]={onExecute:t,canRun:n}},e.prototype.getDataFilteredValues=function(){return{}},e.prototype.getDataFilteredProperties=function(){return{}},e.prototype.runConditionCore=function(e,t){if(this.expressionInfo)for(var n in this.expressionInfo)this.runConditionItemCore(n,e,t)},e.prototype.canRunConditions=function(){return!this.isDesignMode},e.prototype.checkConditionPropertyChanged=function(e){this.expressionInfo&&this.expressionInfo[e]&&this.canRunConditions()&&this.runConditionItemCore(e,this.getDataFilteredValues(),this.getDataFilteredProperties())},e.prototype.runConditionItemCore=function(e,t,n){var r=this,o=this.expressionInfo[e],i=this.getPropertyValue(e);i&&(o.canRun&&!o.canRun(this)||(o.runner||(o.runner=this.createExpressionRunner(i),o.runner.onRunComplete=function(e){o.onExecute(r,e)}),o.runner.expression=i,o.runner.run(t,n)))},e.prototype.doBeforeAsynRun=function(e){this.asynExpressionHash||(this.asynExpressionHash=[]);var t=!this.isAsyncExpressionRunning;this.asynExpressionHash[e]=!0,t&&this.onAsyncRunningChanged()},e.prototype.doAfterAsynRun=function(e){this.asynExpressionHash&&(delete this.asynExpressionHash[e],this.isAsyncExpressionRunning||this.onAsyncRunningChanged())},e.prototype.onAsyncRunningChanged=function(){},Object.defineProperty(e.prototype,"isAsyncExpressionRunning",{get:function(){return!!this.asynExpressionHash&&Object.keys(this.asynExpressionHash).length>0},enumerable:!1,configurable:!0}),e.prototype.createExpressionRunner=function(e){var t=this,n=new Oo(e);return n.onBeforeAsyncRun=function(e){t.doBeforeAsynRun(e)},n.onAfterAsyncRun=function(e){t.doAfterAsynRun(e)},n},e.prototype.registerPropertyChangedHandlers=function(e,t,n){void 0===n&&(n=null);for(var r=0;r<e.length;r++)this.registerFunctionOnPropertyValueChanged(e[r],t,n)},e.prototype.unregisterPropertyChangedHandlers=function(e,t){void 0===t&&(t=null);for(var n=0;n<e.length;n++)this.unRegisterFunctionOnPropertyValueChanged(e[n],t)},e.prototype.registerFunctionOnPropertyValueChanged=function(e,t,n){if(void 0===n&&(n=null),this.onPropChangeFunctions||(this.onPropChangeFunctions=[]),n)for(var r=0;r<this.onPropChangeFunctions.length;r++){var o=this.onPropChangeFunctions[r];if(o.name==e&&o.key==n)return void(o.func=t)}this.onPropChangeFunctions.push({name:e,func:t,key:n})},e.prototype.registerFunctionOnPropertiesValueChanged=function(e,t,n){void 0===n&&(n=null),this.registerPropertyChangedHandlers(e,t,n)},e.prototype.unRegisterFunctionOnPropertyValueChanged=function(e,t){if(void 0===t&&(t=null),this.onPropChangeFunctions)for(var n=0;n<this.onPropChangeFunctions.length;n++){var r=this.onPropChangeFunctions[n];if(r.name==e&&r.key==t)return void this.onPropChangeFunctions.splice(n,1)}},e.prototype.unRegisterFunctionOnPropertiesValueChanged=function(e,t){void 0===t&&(t=null),this.unregisterPropertyChangedHandlers(e,t)},e.prototype.createCustomLocalizableObj=function(e){var t=this.getLocalizableString(e);return t||this.createLocalizableString(e,this,!1,!0)},e.prototype.getLocale=function(){var e=this.getSurvey();return e?e.getLocale():""},e.prototype.getLocalizationString=function(e){return wr.getString(e,this.getLocale())},e.prototype.getLocalizationFormatString=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.getLocalizationString(e);return r&&r.format?r.format.apply(r,t):""},e.prototype.createLocalizableString=function(e,t,n,r){var o=this;void 0===n&&(n=!1),void 0===r&&(r=!1);var i=new ci(t,n,e);r&&(i.localizationName=!0===r?e:r),i.onStrChanged=function(t,n){o.propertyValueChanged(e,t,n)},this.localizableStrings||(this.localizableStrings={}),this.localizableStrings[e]=i;var s=this.getPropertyByName(e);return i.disableLocalization=s&&!1===s.isLocalizable,i},e.prototype.getLocalizableString=function(e){return this.localizableStrings?this.localizableStrings[e]:null},e.prototype.getLocalizableStringText=function(t,n){void 0===n&&(n=""),e.collectDependency(this,t);var r=this.getLocalizableString(t);if(!r)return"";var o=r.text;return o||n},e.prototype.setLocalizableStringText=function(e,t){var n=this.getLocalizableString(e);n&&(n.text!=t&&(n.text=t))},e.prototype.addUsedLocales=function(e){if(this.localizableStrings)for(var t in this.localizableStrings){(o=this.getLocalizableString(t))&&this.AddLocStringToUsedLocales(o,e)}if(this.arraysInfo)for(var t in this.arraysInfo){var n=this.getPropertyValue(t);if(n&&n.length)for(var r=0;r<n.length;r++){var o;(o=n[r])&&o.addUsedLocales&&o.addUsedLocales(e)}}},e.prototype.searchText=function(e,t){var n=[];this.getSearchableLocalizedStrings(n);for(var r=0;r<n.length;r++)n[r].setFindText(e)&&t.push({element:this,str:n[r]})},e.prototype.getSearchableLocalizedStrings=function(e){if(this.localizableStrings){var t=[];this.getSearchableLocKeys(t);for(var n=0;n<t.length;n++){var r=this.getLocalizableString(t[n]);r&&e.push(r)}}if(this.arraysInfo){var o=[];this.getSearchableItemValueKeys(o);for(n=0;n<o.length;n++){var i=this.getPropertyValue(o[n]);if(i)for(var s=0;s<i.length;s++)e.push(i[s].locText)}}},e.prototype.getSearchableLocKeys=function(e){},e.prototype.getSearchableItemValueKeys=function(e){},e.prototype.AddLocStringToUsedLocales=function(e,t){for(var n=e.getLocales(),r=0;r<n.length;r++)t.indexOf(n[r])<0&&t.push(n[r])},e.prototype.createItemValues=function(e){var t=this,n=this.createNewArray(e,(function(n){if(n.locOwner=t,n.ownerPropertyName=e,"function"==typeof n.getSurvey){var r=n.getSurvey();r&&"function"==typeof r.makeReactive&&r.makeReactive(n)}}));return this.arraysInfo[e].isItemValues=!0,n},e.prototype.notifyArrayChanged=function(e,t){e.onArrayChanged&&e.onArrayChanged(t)},e.prototype.createNewArrayCore=function(e){var t=null;return this.createArrayCoreHandler&&(t=this.createArrayCoreHandler(this.propertyHash,e)),t||(t=new Array,this.setPropertyValueCore(this.propertyHash,e,t)),t},e.prototype.ensureArray=function(e,t,n){if(void 0===t&&(t=null),void 0===n&&(n=null),!this.arraysInfo||!this.arraysInfo[e])return this.createNewArray(e,t,n)},e.prototype.createNewArray=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null);var r=this.createNewArrayCore(e);this.arraysInfo||(this.arraysInfo={}),this.arraysInfo[e]={onPush:t,isItemValues:!1};var o=this;return r.push=function(n){var i=Object.getPrototypeOf(r).push.call(r,n);if(!o.isDisposedValue){t&&t(n,r.length-1);var s=new Vo(r.length-1,0,[n],[]);o.propertyValueChanged(e,r,r,s),o.notifyArrayChanged(r,s)}return i},r.shift=function(){var t=Object.getPrototypeOf(r).shift.call(r);if(!o.isDisposedValue&&t){n&&n(t);var i=new Vo(r.length-1,1,[],[]);o.propertyValueChanged(e,r,r,i),o.notifyArrayChanged(r,i)}return t},r.unshift=function(n){var i=Object.getPrototypeOf(r).unshift.call(r,n);if(!o.isDisposedValue){t&&t(n,r.length-1);var s=new Vo(0,0,[n],[]);o.propertyValueChanged(e,r,r,s),o.notifyArrayChanged(r,s)}return i},r.pop=function(){var t=Object.getPrototypeOf(r).pop.call(r);if(!o.isDisposedValue){n&&n(t);var i=new Vo(r.length-1,1,[],[]);o.propertyValueChanged(e,r,r,i),o.notifyArrayChanged(r,i)}return t},r.splice=function(i,s){for(var a,u=[],l=2;l<arguments.length;l++)u[l-2]=arguments[l];i||(i=0),s||(s=0);var c=(a=Object.getPrototypeOf(r).splice).call.apply(a,qo([r,i,s],u));if(u||(u=[]),!o.isDisposedValue){if(n&&c)for(var p=0;p<c.length;p++)n(c[p]);if(t)for(p=0;p<u.length;p++)t(u[p],i+p);var h=new Vo(i,s,u,c);o.propertyValueChanged(e,r,r,h),o.notifyArrayChanged(r,h)}return c},r},e.prototype.getItemValueType=function(){},e.prototype.setArray=function(t,n,r,o,i){var s=[].concat(n);if(Object.getPrototypeOf(n).splice.call(n,0,n.length),r)for(var a=0;a<r.length;a++){var u=r[a];o&&e.createItemValue&&(u=e.createItemValue(u,this.getItemValueType())),Object.getPrototypeOf(n).push.call(n,u),i&&i(n[a])}var l=new Vo(0,s.length,n,s);this.propertyValueChanged(t,s,n,l),this.notifyArrayChanged(n,l)},e.prototype.isTwoValueEquals=function(e,t,n,r){return void 0===n&&(n=!1),void 0===r&&(r=!1),Cr.isTwoValueEquals(e,t,!1,!n,r)},e.copyObject=function(e,t){for(var n in t){var r=t[n];"object"==typeof r&&(r={},this.copyObject(r,t[n])),e[n]=r}},e.prototype.copyCssClasses=function(t,n){n&&("string"==typeof n||n instanceof String?t.root=n:e.copyObject(t,n))},e.prototype.getValueInLowCase=function(e){return e&&"string"==typeof e?e.toLowerCase():e},e.prototype.getElementsInDesign=function(e){return void 0===e&&(e=!1),[]},Object.defineProperty(e.prototype,"animationAllowed",{get:function(){return this.getIsAnimationAllowed()},enumerable:!1,configurable:!0}),e.prototype.getIsAnimationAllowed=function(){return br.animationEnabled&&this.animationAllowedLock>=0&&!this.isLoadingFromJson&&!this.isDisposed&&(!!this.onElementRerendered||!this.supportOnElementRenderedEvent)},e.prototype.blockAnimations=function(){this.animationAllowedLock--},e.prototype.releaseAnimations=function(){this.animationAllowedLock++},e.prototype.enableOnElementRenderedEvent=function(){this.onElementRenderedEventEnabled=!0},e.prototype.disableOnElementRenderedEvent=function(){this.onElementRenderedEventEnabled=!1},Object.defineProperty(e.prototype,"onElementRerendered",{get:function(){return this.supportOnElementRenderedEvent&&this.onElementRenderedEventEnabled?this._onElementRerendered:void 0},enumerable:!1,configurable:!0}),e.prototype.afterRerender=function(){var e;null===(e=this.onElementRerendered)||void 0===e||e.fire(this,void 0)},e.currentDependencis=void 0,e}(),Vo=function(e,t,n,r){this.index=e,this.deleteCount=t,this.itemsToAdd=n,this.deletedItems=r},To=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Po(t,e),t}(function(){function e(){}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0===this.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this.callbacks?this.callbacks.length:0},enumerable:!1,configurable:!0}),e.prototype.fireByCreatingOptions=function(e,t){if(this.callbacks)for(var n=0;n<this.callbacks.length;n++)if(this.callbacks[n](e,t()),!this.callbacks)return},e.prototype.fire=function(e,t){if(this.callbacks)for(var n=[].concat(this.callbacks),r=0;r<n.length;r++)if(n[r](e,t),!this.callbacks)return},e.prototype.clear=function(){this.callbacks=void 0},e.prototype.add=function(e){this.hasFunc(e)||(this.callbacks||(this.callbacks=new Array),this.callbacks.push(e),this.fireCallbackChanged())},e.prototype.remove=function(e){if(this.hasFunc(e)){var t=this.callbacks.indexOf(e,0);this.callbacks.splice(t,1),this.fireCallbackChanged()}},e.prototype.hasFunc=function(e){return null!=this.callbacks&&this.callbacks.indexOf(e,0)>-1},e.prototype.fireCallbackChanged=function(){this.onCallbacksChanged&&this.onCallbacksChanged()},e}()),No=function(){function e(){this.classes=[]}return e.prototype.isEmpty=function(){return""===this.toString()},e.prototype.append=function(e,t){return void 0===t&&(t=!0),e&&t&&("string"==typeof e&&(e=e.trim()),this.classes.push(e)),this},e.prototype.toString=function(){return this.classes.join(" ")},e}(),Ao=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jo=function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s},Ro={root:"sv-action-bar",defaultSizeMode:"sv-action-bar--default-size-mode",smallSizeMode:"sv-action-bar--small-size-mode",item:"sv-action-bar-item",itemWithTitle:"",itemAsIcon:"sv-action-bar-item--icon",itemActive:"sv-action-bar-item--active",itemPressed:"sv-action-bar-item--pressed",itemIcon:"sv-action-bar-item__icon",itemTitle:"sv-action-bar-item__title",itemTitleWithIcon:"sv-action-bar-item__title--with-icon"},Do=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.sizeMode="default",t}var n;return Ao(t,e),t.prototype.getMarkdownHtml=function(e,t){return this.locOwner?this.locOwner.getMarkdownHtml(e,t):void 0},t.prototype.getRenderer=function(e){return this.locOwner?this.locOwner.getRenderer(e):null},t.prototype.getRendererContext=function(e){return this.locOwner?this.locOwner.getRendererContext(e):e},t.prototype.getProcessedText=function(e){return this.locOwner?this.locOwner.getProcessedText(e):e},t.prototype.getLocale=function(){return this.locOwner?this.locOwner.getLocale():""},t.prototype.getRenderedActions=function(){return this.actions},t.prototype.locStrsChanged=function(){e.prototype.locStrsChanged.call(this),this.actions.forEach((function(e){e.locTitle&&e.locTitle.strChanged(),e.locStrsChanged()}))},t.prototype.raiseUpdate=function(e){this.isEmpty=!this.actions.some((function(e){return e.visible})),this.updateCallback&&this.updateCallback(e)},t.prototype.onSet=function(){var e=this;this.actions.forEach((function(t){e.setActionCssClasses(t)})),this.raiseUpdate(!0)},t.prototype.onPush=function(e){this.setActionCssClasses(e),e.owner=this,this.raiseUpdate(!0)},t.prototype.onRemove=function(e){e.owner=null,this.raiseUpdate(!0)},t.prototype.setActionCssClasses=function(e){e.cssClasses=this.cssClasses},Object.defineProperty(t.prototype,"hasActions",{get:function(){return(this.actions||[]).length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedActions",{get:function(){return this.getRenderedActions()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visibleActions",{get:function(){return this.actions.filter((function(e){return!1!==e.visible}))},enumerable:!1,configurable:!0}),t.prototype.getRootCss=function(){var e="small"===this.sizeMode?this.cssClasses.smallSizeMode:this.cssClasses.defaultSizeMode;return(new No).append(this.cssClasses.root+(e?" "+e:"")+(this.containerCss?" "+this.containerCss:"")).append(this.cssClasses.root+"--empty",this.isEmpty).toString()},t.prototype.getDefaultCssClasses=function(){return Ro},Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.cssClassesValue||(this.cssClassesValue=this.getDefaultCssClasses()),this.cssClassesValue},set:function(e){var t=this;this.cssClassesValue={},this.copyCssClasses(this.cssClassesValue,this.getDefaultCssClasses()),function e(t,n){if(!n||!t)return;if("object"!=typeof n)return;for(var r in t){var o=t[r];!Array.isArray(o)&&o&&"object"==typeof o?(n[r]&&"object"==typeof n[r]||(n[r]={}),e(o,n[r])):n[r]=o}}(e,this.cssClasses),this.actions.forEach((function(e){t.setActionCssClasses(e)}))},enumerable:!1,configurable:!0}),t.prototype.createAction=function(e){return e instanceof Yo?e:new Zo(e)},t.prototype.addAction=function(e,t){void 0===t&&(t=!0);var n=this.createAction(e);return this.actions.push(n),this.sortItems(),n},t.prototype.sortItems=function(){this.actions=[].concat(this.actions.filter((function(e){return void 0===e.visibleIndex||e.visibleIndex>=0}))).sort((function(e,t){return e.visibleIndex-t.visibleIndex}))},t.prototype.setItems=function(e,t){var n=this;void 0===t&&(t=!0),this.actions=e.map((function(e){return n.createAction(e)})),t&&this.sortItems()},t.prototype.popupAfterShowCallback=function(e){},t.prototype.mouseOverHandler=function(e){var t=this;e.isHovered=!0,this.actions.forEach((function(n){n===e&&e.popupModel&&(e.showPopupDelayed(t.subItemsShowDelay),t.popupAfterShowCallback(e))}))},t.prototype.initResponsivityManager=function(e,t){},t.prototype.resetResponsivityManager=function(){},t.prototype.getActionById=function(e){for(var t=0;t<this.actions.length;t++)if(this.actions[t].id===e)return this.actions[t];return null},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.actions.forEach((function(e){return e.dispose()})),this.actions.length=0},jo([(n={onSet:function(e,t){t.onSet()},onPush:function(e,t,n){n.onPush(e)},onRemove:function(e,t,n){n.onRemove(e)}},function(e,t){Object.defineProperty(e,t,{get:function(){return xr(this,n,t),this.getPropertyValue(t)},set:function(e){xr(this,n,t);var r=this.getPropertyValue(t);e!==r&&(r?r.splice.apply(r,Pr([0,r.length],e||[])):this.setPropertyValue(t,e),n&&n.onSet&&n.onSet(e,this))}})})],t.prototype,"actions",void 0),jo([Sr({})],t.prototype,"containerCss",void 0),jo([Sr({defaultValue:!1})],t.prototype,"isEmpty",void 0),jo([Sr({defaultValue:300})],t.prototype,"subItemsShowDelay",void 0),jo([Sr({defaultValue:300})],t.prototype,"subItemsHideDelay",void 0),t}(Io),Lo=function(){function e(){}return e.focusElement=function(e){e&&e.focus()},e.visibility=function(e){var t=gr.getComputedStyle(e);return"none"!==t.display&&"hidden"!==t.visibility&&(!e.parentElement||this.visibility(e.parentElement))},e.getNextElementPreorder=function(e){var t=e.nextElementSibling?e.nextElementSibling:e.parentElement.firstElementChild;return this.visibility(t)?t:this.getNextElementPreorder(t)},e.getNextElementPostorder=function(e){var t=e.previousElementSibling?e.previousElementSibling:e.parentElement.lastElementChild;return this.visibility(t)?t:this.getNextElementPostorder(t)},e.hasHorizontalScroller=function(e){return!!e&&e.scrollWidth>e.offsetWidth},e.hasVerticalScroller=function(e){return!!e&&e.scrollHeight>e.offsetHeight},e}(),ko=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mo=function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s},Fo={root:"sv-list__container",item:"sv-list__item",searchClearButtonIcon:"sv-list__filter-clear-button",loadingIndicator:"sv-list__loading-indicator",itemSelected:"sv-list__item--selected",itemGroup:"sv-list__item--group",itemWithIcon:"sv-list__item--with-icon",itemDisabled:"sv-list__item--disabled",itemFocused:"sv-list__item--focused",itemHovered:"sv-list__item--hovered",itemTextWrap:"sv-list__item-text--wrap",itemIcon:"sv-list__item-icon",itemMarkerIcon:"sv-list-item__marker-icon",itemSeparator:"sv-list__item-separator",itemBody:"sv-list__item-body",itemsContainer:"sv-list",itemsContainerFiltering:"sv-list--filtering",filter:"sv-list__filter",filterIcon:"sv-list__filter-icon",filterInput:"sv-list__input",emptyContainer:"sv-list__empty-container",emptyText:"sv-list__empty-text"},Bo=function(e){function t(n,r,o,i,s){var a=e.call(this)||this;if(a.onSelectionChanged=r,a.allowSelection=o,a.elementId=s,a.onItemClick=function(e){if(!a.isItemDisabled(e)){a.isExpanded=!1,a.allowSelection&&(a.selectedItem=e),a.onSelectionChanged&&a.onSelectionChanged(e);var t=e.action;t&&t(e)}},a.onItemHover=function(e){a.mouseOverHandler(e)},a.isItemDisabled=function(e){return void 0!==e.enabled&&!e.enabled},a.isItemSelected=function(e){return a.areSameItems(a.selectedItem,e)},a.isItemFocused=function(e){return a.areSameItems(a.focusedItem,e)},a.getListClass=function(){return(new No).append(a.cssClasses.itemsContainer).append(a.cssClasses.itemsContainerFiltering,!!a.filterString&&a.visibleActions.length!==a.visibleItems.length).toString()},a.getItemClass=function(e){return(new No).append(a.cssClasses.item).append(a.cssClasses.itemWithIcon,!!e.iconName).append(a.cssClasses.itemDisabled,a.isItemDisabled(e)).append(a.cssClasses.itemFocused,a.isItemFocused(e)).append(a.cssClasses.itemSelected,a.isItemSelected(e)).append(a.cssClasses.itemGroup,e.hasSubItems).append(a.cssClasses.itemHovered,e.isHovered).append(a.cssClasses.itemTextWrap,a.textWrapEnabled).append(e.css).toString()},a.getItemIndent=function(e){return((e.level||0)+1)*t.INDENT+"px"},-1!==Object.keys(n).indexOf("items")){var u=n;Object.keys(u).forEach((function(e){switch(e){case"items":a.setItems(u.items);break;case"onFilterStringChangedCallback":a.setOnFilterStringChangedCallback(u.onFilterStringChangedCallback);break;case"onTextSearchCallback":a.setOnTextSearchCallback(u.onTextSearchCallback);break;default:a[e]=u[e]}}))}else a.setItems(n),a.selectedItem=i;return a}return ko(t,e),t.prototype.hasText=function(e,t){if(!t)return!0;var n=e.title||"";if(this.onTextSearchCallback)return this.onTextSearchCallback(e,t);var r=n.toLocaleLowerCase();return(r=br.comparator.normalizeTextCallback(r,"filter")).indexOf(t.toLocaleLowerCase())>-1},t.prototype.isItemVisible=function(e){return e.visible&&(!this.shouldProcessFilter||this.hasText(e,this.filterString))},t.prototype.getRenderedActions=function(){var t=e.prototype.getRenderedActions.call(this);if(this.filterString){var n=[];return t.forEach((function(e){n.push(e),e.items&&e.items.forEach((function(t){var r=new Zo(t);r.iconName||(r.iconName=e.iconName),n.push(r)}))})),n}return t},Object.defineProperty(t.prototype,"visibleItems",{get:function(){var e=this;return this.visibleActions.filter((function(t){return e.isItemVisible(t)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shouldProcessFilter",{get:function(){return!this.onFilterStringChangedCallback},enumerable:!1,configurable:!0}),t.prototype.onFilterStringChanged=function(e){var t=this;this.onFilterStringChangedCallback&&this.onFilterStringChangedCallback(e),this.isEmpty=0===this.renderedActions.filter((function(e){return t.isItemVisible(e)})).length},t.prototype.scrollToItem=function(e,t){var n=this;void 0===t&&(t=0),setTimeout((function(){if(n.listContainerHtmlElement){var r=n.listContainerHtmlElement.querySelector("."+e);r&&setTimeout((function(){r.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}),t)}}),t)},t.prototype.setOnFilterStringChangedCallback=function(e){this.onFilterStringChangedCallback=e},t.prototype.setOnTextSearchCallback=function(e){this.onTextSearchCallback=e},t.prototype.setItems=function(t,n){var r=this;void 0===n&&(n=!0),e.prototype.setItems.call(this,t,n),this.elementId&&this.renderedActions.forEach((function(e){e.elementId=r.elementId+e.id})),!this.isAllDataLoaded&&this.actions.length&&this.actions.push(this.loadingIndicator)},t.prototype.onSet=function(){this.showFilter=this.searchEnabled&&(this.forceShowFilter||(this.actions||[]).length>t.MINELEMENTCOUNT),e.prototype.onSet.call(this)},t.prototype.getDefaultCssClasses=function(){return Fo},t.prototype.popupAfterShowCallback=function(e){this.addScrollEventListener((function(){e.hidePopup()}))},t.prototype.onItemLeave=function(e){e.hidePopupDelayed(this.subItemsHideDelay)},t.prototype.areSameItems=function(e,t){return this.areSameItemsCallback?this.areSameItemsCallback(e,t):!!e&&!!t&&e.id==t.id},Object.defineProperty(t.prototype,"filterStringPlaceholder",{get:function(){return this.getLocalizationString("filterStringPlaceholder")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"emptyMessage",{get:function(){return this.isAllDataLoaded?this.getLocalizationString("emptyMessage"):this.loadingText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scrollableContainer",{get:function(){return this.listContainerHtmlElement.querySelector("."+this.getDefaultCssClasses().itemsContainer)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"loadingText",{get:function(){return this.getLocalizationString("loadingFile")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"loadingIndicator",{get:function(){return this.loadingIndicatorValue||(this.loadingIndicatorValue=new Zo({id:"loadingIndicator",title:this.loadingText,action:function(){},css:this.cssClasses.loadingIndicator})),this.loadingIndicatorValue},enumerable:!1,configurable:!0}),t.prototype.goToItems=function(e){if("ArrowDown"===e.key||40===e.keyCode){var t=e.target.parentElement.parentElement.querySelector("ul"),n=function(e){for(var t,n=0;n<e.children.length;n++)t||"none"===getComputedStyle(e.children[n]).display||(t=e.children[n]);return t}(t);t&&n&&(Lo.focusElement(n),e.preventDefault())}},t.prototype.onMouseMove=function(e){this.resetFocusedItem()},t.prototype.onKeyDown=function(e){var t=e.target;"ArrowDown"===e.key||40===e.keyCode?(Lo.focusElement(Lo.getNextElementPreorder(t)),e.preventDefault()):"ArrowUp"!==e.key&&38!==e.keyCode||(Lo.focusElement(Lo.getNextElementPostorder(t)),e.preventDefault())},t.prototype.onPointerDown=function(e,t){},t.prototype.refresh=function(){this.filterString="",this.resetFocusedItem()},t.prototype.onClickSearchClearButton=function(e){e.currentTarget.parentElement.querySelector("input").focus(),this.refresh()},t.prototype.resetFocusedItem=function(){this.focusedItem=void 0},t.prototype.focusFirstVisibleItem=function(){this.focusedItem=this.visibleItems[0]},t.prototype.focusLastVisibleItem=function(){this.focusedItem=this.visibleItems[this.visibleItems.length-1]},t.prototype.initFocusedItem=function(){var e=this;this.focusedItem=this.visibleItems.filter((function(t){return t.visible&&e.isItemSelected(t)}))[0],this.focusedItem||this.focusFirstVisibleItem()},t.prototype.focusNextVisibleItem=function(){if(this.focusedItem){var e=this.visibleItems,t=e.indexOf(this.focusedItem),n=e[t+1];n?this.focusedItem=n:this.focusFirstVisibleItem()}else this.initFocusedItem()},t.prototype.focusPrevVisibleItem=function(){if(this.focusedItem){var e=this.visibleItems,t=e.indexOf(this.focusedItem),n=e[t-1];n?this.focusedItem=n:this.focusLastVisibleItem()}else this.initFocusedItem()},t.prototype.selectFocusedItem=function(){this.focusedItem&&this.onItemClick(this.focusedItem)},t.prototype.initListContainerHtmlElement=function(e){this.listContainerHtmlElement=e},t.prototype.onLastItemRended=function(e){this.isAllDataLoaded||e===this.actions[this.actions.length-1]&&this.listContainerHtmlElement&&(this.hasVerticalScroller=Lo.hasVerticalScroller(this.scrollableContainer))},t.prototype.scrollToFocusedItem=function(){this.scrollToItem(this.getDefaultCssClasses().itemFocused)},t.prototype.scrollToSelectedItem=function(){this.scrollToItem(this.getDefaultCssClasses().itemSelected,110)},t.prototype.addScrollEventListener=function(e){e&&(this.removeScrollEventListener(),this.scrollHandler=e),this.scrollHandler&&this.scrollableContainer.addEventListener("scroll",this.scrollHandler)},t.prototype.removeScrollEventListener=function(){this.scrollHandler&&this.scrollableContainer.removeEventListener("scroll",this.scrollHandler)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.loadingIndicatorValue&&this.loadingIndicatorValue.dispose(),this.listContainerHtmlElement=void 0},t.INDENT=16,t.MINELEMENTCOUNT=10,Mo([Sr({defaultValue:!0,onSet:function(e,t){t.onSet()}})],t.prototype,"searchEnabled",void 0),Mo([Sr({defaultValue:!1})],t.prototype,"showFilter",void 0),Mo([Sr({defaultValue:!1})],t.prototype,"forceShowFilter",void 0),Mo([Sr({defaultValue:!1})],t.prototype,"isExpanded",void 0),Mo([Sr({})],t.prototype,"selectedItem",void 0),Mo([Sr()],t.prototype,"focusedItem",void 0),Mo([Sr({onSet:function(e,t){t.onFilterStringChanged(t.filterString)}})],t.prototype,"filterString",void 0),Mo([Sr({defaultValue:!1})],t.prototype,"hasVerticalScroller",void 0),Mo([Sr({defaultValue:!0})],t.prototype,"isAllDataLoaded",void 0),Mo([Sr({defaultValue:!1})],t.prototype,"showSearchClearButton",void 0),Mo([Sr({defaultValue:!0})],t.prototype,"renderElements",void 0),Mo([Sr({defaultValue:!1})],t.prototype,"textWrapEnabled",void 0),t}(Do),zo=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ho=function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s},Wo=function(e){function t(t,n,r,o){var i=e.call(this)||this;if(i.focusFirstInputSelector="",i.onCancel=function(){},i.onApply=function(){return!0},i.onHide=function(){},i.onShow=function(){},i.onDispose=function(){},i.onVisibilityChanged=i.addEvent(),i.onFooterActionsCreated=i.addEvent(),i.onRecalculatePosition=i.addEvent(),i.contentComponentName=t,i.contentComponentData=n,r&&"string"==typeof r)i.verticalPosition=r,i.horizontalPosition=o;else if(r){var s=r;for(var a in s)i[a]=s[a]}return i}return zo(t,e),t.prototype.refreshInnerModel=function(){var e=this.contentComponentData.model;e&&e.refresh&&e.refresh()},Object.defineProperty(t.prototype,"isVisible",{get:function(){return this.getPropertyValue("isVisible",!1)},set:function(e){this.isVisible!==e&&(this.setPropertyValue("isVisible",e),this.onVisibilityChanged.fire(this,{model:this,isVisible:e}))},enumerable:!1,configurable:!0}),t.prototype.toggleVisibility=function(){this.isVisible=!this.isVisible},t.prototype.show=function(){this.isVisible||(this.isVisible=!0)},t.prototype.hide=function(){this.isVisible&&(this.isVisible=!1)},t.prototype.recalculatePosition=function(e){this.onRecalculatePosition.fire(this,{isResetHeight:e})},t.prototype.updateFooterActions=function(e){var t={actions:e};return this.onFooterActionsCreated.fire(this,t),t.actions},t.prototype.onHiding=function(){this.refreshInnerModel(),this.onHide()},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.onDispose()},Ho([Sr()],t.prototype,"contentComponentName",void 0),Ho([Sr()],t.prototype,"contentComponentData",void 0),Ho([Sr({defaultValue:"bottom"})],t.prototype,"verticalPosition",void 0),Ho([Sr({defaultValue:"left"})],t.prototype,"horizontalPosition",void 0),Ho([Sr({defaultValue:!0})],t.prototype,"showPointer",void 0),Ho([Sr({defaultValue:!1})],t.prototype,"isModal",void 0),Ho([Sr({defaultValue:!0})],t.prototype,"canShrink",void 0),Ho([Sr({defaultValue:!0})],t.prototype,"isFocusedContent",void 0),Ho([Sr({defaultValue:!0})],t.prototype,"isFocusedContainer",void 0),Ho([Sr({defaultValue:""})],t.prototype,"cssClass",void 0),Ho([Sr({defaultValue:""})],t.prototype,"title",void 0),Ho([Sr({defaultValue:"auto"})],t.prototype,"overlayDisplayMode",void 0),Ho([Sr({defaultValue:"popup"})],t.prototype,"displayMode",void 0),Ho([Sr({defaultValue:"flex"})],t.prototype,"positionMode",void 0),t}(Io);var Uo=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qo=function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s},Jo=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e};function Ko(e,t,n){var r,o=t.onSelectionChanged;t.onSelectionChanged=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];a.hasTitle&&(a.title=e.title),o&&o(e,t)};var i=Go(t,n),s=Object.assign({},e,{component:"sv-action-bar-item-dropdown",popupModel:i,action:function(t,n){e.action&&e.action(),i.isFocusedContent=i.isFocusedContent||!n,i.show()}}),a=new Zo(s);return a.data=null===(r=i.contentComponentData)||void 0===r?void 0:r.model,a}function Go(e,t){var n=new Bo(e);n.onSelectionChanged=function(t){e.onSelectionChanged&&e.onSelectionChanged(t),o.hide()};var r=t||{};r.onDispose=function(){n.dispose()};var o=new Wo("sv-list",{model:n},r);return o.isFocusedContent=n.showFilter,o.onShow=function(){r.onShow&&r.onShow(),n.scrollToSelectedItem()},o}var Yo=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.rendredIdValue=t.getNextRendredId(),n.markerIconSize=16,n}return Uo(t,e),t.getNextRendredId=function(){return t.renderedId++},Object.defineProperty(t.prototype,"renderedId",{get:function(){return this.rendredIdValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"owner",{get:function(){return this.ownerValue},set:function(e){e!==this.owner&&(this.ownerValue=e,this.locStrsChanged())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visible",{get:function(){return this.getVisible()},set:function(e){this.setVisible(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{get:function(){return this.getEnabled()},set:function(e){this.setEnabled(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"component",{get:function(){return this.getComponent()},set:function(e){this.setComponent(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locTitle",{get:function(){return this.getLocTitle()},set:function(e){this.setLocTitle(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this.getTitle()},set:function(e){this.setTitle(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.cssClassesValue||Ro},set:function(e){this.cssClassesValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this.visible&&"popup"!==this.mode&&"removed"!==this.mode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return void 0!==this.enabled&&!this.enabled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canShrink",{get:function(){return!!this.iconName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTitle",{get:function(){return("small"!=this.mode&&(this.showTitle||void 0===this.showTitle)||!this.iconName)&&!!this.title},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasSubItems",{get:function(){return!!this.items&&this.items.length>0},enumerable:!1,configurable:!0}),t.prototype.getActionBarItemTitleCss=function(){return(new No).append(this.cssClasses.itemTitle).append(this.cssClasses.itemTitleWithIcon,!!this.iconName).toString()},t.prototype.getActionBarItemCss=function(){return(new No).append(this.cssClasses.item).append(this.cssClasses.itemWithTitle,this.hasTitle).append(this.cssClasses.itemAsIcon,!this.hasTitle).append(this.cssClasses.itemActive,!!this.active).append(this.cssClasses.itemPressed,!!this.pressed).append(this.innerCss).toString()},t.prototype.getActionRootCss=function(){return(new No).append("sv-action").append(this.css).append("sv-action--space",this.needSpace).append("sv-action--hidden",!this.isVisible).toString()},t.prototype.getTooltip=function(){return this.tooltip||this.title},t.prototype.getIsTrusted=function(e){return e.originalEvent?e.originalEvent.isTrusted:e.isTrusted},t.prototype.showPopup=function(){this.popupModel&&this.popupModel.show()},t.prototype.hidePopup=function(){this.popupModel&&this.popupModel.hide()},t.prototype.clearPopupTimeouts=function(){this.showPopupTimeout&&clearTimeout(this.showPopupTimeout),this.hidePopupTimeout&&clearTimeout(this.hidePopupTimeout)},t.prototype.showPopupDelayed=function(e){var t=this;this.clearPopupTimeouts(),this.showPopupTimeout=setTimeout((function(){t.clearPopupTimeouts(),t.showPopup()}),e)},t.prototype.hidePopupDelayed=function(e){var t,n=this;(null===(t=this.popupModel)||void 0===t?void 0:t.isVisible)?(this.clearPopupTimeouts(),this.hidePopupTimeout=setTimeout((function(){n.clearPopupTimeouts(),n.hidePopup(),n.isHovered=!1}),e)):(this.clearPopupTimeouts(),this.isHovered=!1)},t.renderedId=1,Qo([Sr()],t.prototype,"tooltip",void 0),Qo([Sr()],t.prototype,"showTitle",void 0),Qo([Sr()],t.prototype,"innerCss",void 0),Qo([Sr()],t.prototype,"active",void 0),Qo([Sr()],t.prototype,"pressed",void 0),Qo([Sr()],t.prototype,"data",void 0),Qo([Sr()],t.prototype,"popupModel",void 0),Qo([Sr()],t.prototype,"needSeparator",void 0),Qo([Sr()],t.prototype,"template",void 0),Qo([Sr({defaultValue:"large"})],t.prototype,"mode",void 0),Qo([Sr()],t.prototype,"visibleIndex",void 0),Qo([Sr()],t.prototype,"disableTabStop",void 0),Qo([Sr()],t.prototype,"disableShrink",void 0),Qo([Sr()],t.prototype,"disableHide",void 0),Qo([Sr({defaultValue:!1})],t.prototype,"needSpace",void 0),Qo([Sr()],t.prototype,"ariaChecked",void 0),Qo([Sr()],t.prototype,"ariaExpanded",void 0),Qo([Sr({defaultValue:"button"})],t.prototype,"ariaRole",void 0),Qo([Sr()],t.prototype,"iconName",void 0),Qo([Sr({defaultValue:24})],t.prototype,"iconSize",void 0),Qo([Sr()],t.prototype,"markerIconName",void 0),Qo([Sr()],t.prototype,"markerIconSize",void 0),Qo([Sr()],t.prototype,"css",void 0),Qo([Sr({defaultValue:!1})],t.prototype,"isPressed",void 0),Qo([Sr({defaultValue:!1})],t.prototype,"isHovered",void 0),t}(Io),Zo=function(e){function t(t){var n=e.call(this)||this;if(n.innerItem=t,n.locTitleChanged=function(){var e=n.locTitle.renderedHtml;n.setPropertyValue("_title",e||void 0)},n.locTitle=t?t.locTitle:null,t)for(var r in t)"locTitle"===r||"title"===r&&n.locTitle&&n.title||(n[r]=t[r]);return n.locTitleName&&n.locTitleChanged(),n.registerFunctionOnPropertyValueChanged("_title",(function(){n.raiseUpdate(!0)})),n.locStrChangedInPopupModel(),n}return Uo(t,e),t.prototype.raiseUpdate=function(e){void 0===e&&(e=!1),this.updateCallback&&this.updateCallback(e)},t.prototype.createLocTitle=function(){return this.createLocalizableString("title",this,!0)},t.prototype.setSubItems=function(e){this.markerIconName="icon-next_16x16",this.component="sv-list-item-group",this.items=Jo([],e.items);var t=Object.assign({},e);t.searchEnabled=!1;var n=Go(t,{horizontalPosition:"right",showPointer:!1,canShrink:!1});n.cssClass="sv-popup-inner",this.popupModel=n},t.prototype.getLocTitle=function(){return this.locTitleValue},t.prototype.setLocTitle=function(e){e||this.locTitleValue||(e=this.createLocTitle()),this.locTitleValue&&this.locTitleValue.onStringChanged.remove(this.locTitleChanged),this.locTitleValue=e,this.locTitleValue.onStringChanged.add(this.locTitleChanged),this.locTitleChanged()},t.prototype.getTitle=function(){return this._title},t.prototype.setTitle=function(e){this._title=e},Object.defineProperty(t.prototype,"locTitleName",{get:function(){return this.locTitle.localizationName},set:function(e){this.locTitle.localizationName=e},enumerable:!1,configurable:!0}),t.prototype.locStrsChanged=function(){e.prototype.locStrsChanged.call(this),this.locTooltipChanged(),this.locStrChangedInPopupModel()},t.prototype.doAction=function(e){var t=e.originalEvent?e.originalEvent:e;return this.action(this,t.isTrusted),t.preventDefault(),t.stopPropagation(),!0},t.prototype.doMouseDown=function(){this.isMouseDown=!0},t.prototype.doFocus=function(e){if(this.onFocus){var t=e.originalEvent?e.originalEvent:e;this.onFocus(this.isMouseDown,t)}this.isMouseDown=!1},t.prototype.locStrChangedInPopupModel=function(){if(this.popupModel&&this.popupModel.contentComponentData&&this.popupModel.contentComponentData.model){var e=this.popupModel.contentComponentData.model;if(Array.isArray(e.actions))e.actions.forEach((function(e){e.locStrsChanged&&e.locStrsChanged()}))}},t.prototype.locTooltipChanged=function(){this.locTooltipName&&(this.tooltip=wr.getString(this.locTooltipName,this.locTitle.locale))},t.prototype.getLocale=function(){return this.owner?this.owner.getLocale():""},t.prototype.getMarkdownHtml=function(e,t){return this.owner?this.owner.getMarkdownHtml(e,t):void 0},t.prototype.getProcessedText=function(e){return this.owner?this.owner.getProcessedText(e):e},t.prototype.getRenderer=function(e){return this.owner?this.owner.getRenderer(e):null},t.prototype.getRendererContext=function(e){return this.owner?this.owner.getRendererContext(e):e},t.prototype.setVisible=function(e){this._visible=e},t.prototype.getVisible=function(){return this._visible},t.prototype.setEnabled=function(e){this._enabled=e},t.prototype.getEnabled=function(){return this.enabledIf?this.enabledIf():this._enabled},t.prototype.setComponent=function(e){this._component=e},t.prototype.getComponent=function(){return this._component},t.prototype.dispose=function(){this.updateCallback=void 0,this.action=void 0,e.prototype.dispose.call(this),this.popupModel&&this.popupModel.dispose(),this.locTitleValue&&(this.locTitleValue.onStringChanged.remove(this.locTitleChanged),this.locTitleChanged=void 0)},Qo([Sr()],t.prototype,"id",void 0),Qo([Sr({defaultValue:!0,onSet:function(e,t){t.raiseUpdate()}})],t.prototype,"_visible",void 0),Qo([Sr({onSet:function(e,t){t.locTooltipChanged()}})],t.prototype,"locTooltipName",void 0),Qo([Sr()],t.prototype,"_enabled",void 0),Qo([Sr()],t.prototype,"action",void 0),Qo([Sr()],t.prototype,"onFocus",void 0),Qo([Sr()],t.prototype,"_component",void 0),Qo([Sr()],t.prototype,"items",void 0),Qo([Sr({onSet:function(e,t){t.locTitleValue.text!==e&&(t.locTitleValue.text=e)}})],t.prototype,"_title",void 0),t}(Yo),$o=(function(){function e(e){this.item=e,this.funcKey="sv-dropdown-action",this.setupPopupCallbacks()}e.prototype.setupPopupCallbacks=function(){var e=this,t=this.popupModel=this.item.popupModel;t&&t.registerPropertyChangedHandlers(["isVisible"],(function(){t.isVisible?e.item.pressed=!0:e.item.pressed=!1}),this.funcKey)},e.prototype.removePopupCallbacks=function(){this.popupModel&&this.popupModel.unregisterPropertyChangedHandlers(["isVisible"],this.funcKey)},e.prototype.dispose=function(){this.removePopupCallbacks()}}(),function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Xo=function(e){function t(){var n=e.call(this)||this;return n.minVisibleItemsCount=0,n.isResponsivenessDisabled=!1,n.dotsItem=Ko({id:"dotsItem-id"+t.ContainerID++,css:"sv-dots",innerCss:"sv-dots__item",iconName:"icon-more",visible:!1,tooltip:wr.getString("more")},{items:[],allowSelection:!1}),n}return $o(t,e),t.prototype.hideItemsGreaterN=function(e){var t=this.getActionsToHide();e=Math.max(e,this.minVisibleItemsCount-(this.visibleActions.length-t.length));var n=[];t.forEach((function(t){e<=0&&(t.removePriority?t.mode="removed":(t.mode="popup",n.push(t.innerItem))),e--})),this.hiddenItemsListModel.setItems(n)},t.prototype.getActionsToHide=function(){return this.visibleActions.filter((function(e){return!e.disableHide})).sort((function(e,t){return e.removePriority||0-t.removePriority||0}))},t.prototype.getVisibleItemsCount=function(e){this.visibleActions.filter((function(e){return e.disableHide})).forEach((function(t){return e-=t.minDimension}));for(var t=this.getActionsToHide().map((function(e){return e.minDimension})),n=0,r=0;r<t.length;r++)if((n+=t[r])>e)return r;return r},t.prototype.updateItemMode=function(e,t){for(var n=this.visibleActions,r=n.length-1;r>=0;r--)t>e&&!n[r].disableShrink?(t-=n[r].maxDimension-n[r].minDimension,n[r].mode="small"):n[r].mode="large";if(t>e){var o=this.visibleActions.filter((function(e){return e.removePriority}));o.sort((function(e,t){return e.removePriority-t.removePriority}));for(r=0;r<o.length;r++)t>e&&(t-=n[r].disableShrink?o[r].maxDimension:o[r].minDimension,o[r].mode="removed")}},Object.defineProperty(t.prototype,"hiddenItemsListModel",{get:function(){return this.dotsItem.data},enumerable:!1,configurable:!0}),t.prototype.onSet=function(){var t=this;this.actions.forEach((function(e){return e.updateCallback=function(e){return t.raiseUpdate(e)}})),e.prototype.onSet.call(this)},t.prototype.onPush=function(t){var n=this;t.updateCallback=function(e){return n.raiseUpdate(e)},e.prototype.onPush.call(this,t)},t.prototype.getRenderedActions=function(){return 1===this.actions.length&&this.actions[0].iconName?this.actions:this.actions.concat([this.dotsItem])},t.prototype.raiseUpdate=function(t){this.isResponsivenessDisabled||e.prototype.raiseUpdate.call(this,t)},t.prototype.fit=function(e,t){if(!(e<=0)){this.dotsItem.visible=!1;var n=0,r=0;this.visibleActions.forEach((function(e){n+=e.minDimension,r+=e.maxDimension})),e>=r?this.setActionsMode("large"):e<n?(this.setActionsMode("small"),this.hideItemsGreaterN(this.getVisibleItemsCount(e-t)),this.dotsItem.visible=!!this.hiddenItemsListModel.actions.length):this.updateItemMode(e,r)}},t.prototype.initResponsivityManager=function(e,t){this.responsivityManager=new di(e,this,":scope > .sv-action:not(.sv-dots) > .sv-action__content",null,t)},t.prototype.resetResponsivityManager=function(){this.responsivityManager&&(this.responsivityManager.dispose(),this.responsivityManager=void 0)},t.prototype.setActionsMode=function(e){this.actions.forEach((function(t){"small"==e&&t.disableShrink||(t.mode=e)}))},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.dotsItem.data.dispose(),this.dotsItem.dispose(),this.resetResponsivityManager()},t.ContainerID=1,t}(Do);(function(){function e(e,t){var n=this;void 0===t&&(t=!1),this.func=e,this.isMultiple=t,this._isCompleted=!1,this.execute=function(){n._isCompleted||(n.func(),n._isCompleted=!n.isMultiple)}}e.prototype.discard=function(){this._isCompleted=!0},Object.defineProperty(e.prototype,"isCompleted",{get:function(){return this._isCompleted},enumerable:!1,configurable:!0})})(),function(){function e(t){void 0===t&&(t=100),this.interval=t,setTimeout(e.Instance().tick,t)}e.Instance=function(){return e.instance||(e.instance=new e),e.instance},e.prototype.tick=function(){try{for(var t=[],n=0;n<e.tasks.length;n++){var r=e.tasks[n];r.execute(),r.isCompleted?"function"==typeof r.dispose&&r.dispose():t.push(r)}e.tasks=t}finally{setTimeout(e.Instance().tick,this.interval)}},e.schedule=function(t){e.tasks.push(t)},e.instance=void 0,e.tasks=[]}();var ei,ti=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ni=function(){function e(){this.cancelQueue=[]}return e.prototype.getMsFromRule=function(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))},e.prototype.reflow=function(e){return e.offsetHeight},e.prototype.getAnimationsCount=function(e){var t="";return getComputedStyle&&(t=getComputedStyle(e).animationName),t&&"none"!=t?t.split(", ").length:0},e.prototype.getAnimationDuration=function(e){for(var t=getComputedStyle(e),n=t.animationDelay.split(", "),r=t.animationDuration.split(", "),o=0,i=0;i<Math.max(r.length,n.length);i++)o=Math.max(o,this.getMsFromRule(r[i%r.length])+this.getMsFromRule(n[i%n.length]));return o},e.prototype.addCancelCallback=function(e){this.cancelQueue.push(e)},e.prototype.removeCancelCallback=function(e){this.cancelQueue.indexOf(e)>=0&&this.cancelQueue.splice(this.cancelQueue.indexOf(e),1)},e.prototype.onAnimationEnd=function(e,t,n){var r,o=this,i=this.getAnimationsCount(e),s=function(i){void 0===i&&(i=!0),o.afterAnimationRun(e,n),t(i),clearTimeout(r),o.removeCancelCallback(s),e.removeEventListener("animationend",a)},a=function(e){e.target==e.currentTarget&&--i<=0&&s(!1)};i>0?(e.addEventListener("animationend",a),this.addCancelCallback(s),r=setTimeout((function(){s(!1)}),this.getAnimationDuration(e)+10)):(this.afterAnimationRun(e,n),t(!0))},e.prototype.afterAnimationRun=function(e,t){e&&t&&t.onAfterRunAnimation&&t.onAfterRunAnimation(e)},e.prototype.beforeAnimationRun=function(e,t){e&&t&&t.onBeforeRunAnimation&&t.onBeforeRunAnimation(e)},e.prototype.getCssClasses=function(e){return e.cssClass.replace(/\s+$/,"").split(/\s+/)},e.prototype.runAnimation=function(e,t,n){e&&(null==t?void 0:t.cssClass)?(this.reflow(e),this.getCssClasses(t).forEach((function(t){e.classList.add(t)})),this.onAnimationEnd(e,n,t)):n(!0)},e.prototype.clearHtmlElement=function(e,t){e&&t.cssClass&&this.getCssClasses(t).forEach((function(t){e.classList.remove(t)}))},e.prototype.onNextRender=function(e,t){var n=this;if(void 0===t&&(t=!1),!t&&yr.isAvailable()){var r=function(){e(!0),cancelAnimationFrame(o)},o=yr.requestAnimationFrame((function(){o=yr.requestAnimationFrame((function(){e(!1),n.removeCancelCallback(r)}))}));this.addCancelCallback(r)}else e(!0)},e.prototype.cancel=function(){[].concat(this.cancelQueue).forEach((function(e){return e()})),this.cancelQueue=[]},e}(),ri=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ti(t,e),t.prototype.onEnter=function(e){var t=this,n=e.getAnimatedElement(),r=e.getEnterOptions?e.getEnterOptions():{};this.beforeAnimationRun(n,r),this.runAnimation(n,r,(function(){t.clearHtmlElement(n,r)}))},t.prototype.onLeave=function(e,t){var n=this,r=e.getAnimatedElement(),o=e.getLeaveOptions?e.getLeaveOptions():{};this.beforeAnimationRun(r,o),this.runAnimation(r,o,(function(e){t(),n.onNextRender((function(){n.clearHtmlElement(r,o)}),e)}))},t}(ni),oi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ti(t,e),t.prototype.runGroupAnimation=function(e,t,n,r,o){var i=this,s={isAddingRunning:t.length>0,isDeletingRunning:n.length>0,isReorderingRunning:r.length>0},a=t.map((function(t){return e.getAnimatedElement(t)})),u=t.map((function(t){return e.getEnterOptions?e.getEnterOptions(t,s):{}})),l=n.map((function(t){return e.getAnimatedElement(t)})),c=n.map((function(t){return e.getLeaveOptions?e.getLeaveOptions(t,s):{}})),p=r.map((function(t){return e.getAnimatedElement(t.item)})),h=r.map((function(t){return e.getReorderOptions?e.getReorderOptions(t.item,t.movedForward,s):{}}));t.forEach((function(e,t){i.beforeAnimationRun(a[t],u[t])})),n.forEach((function(e,t){i.beforeAnimationRun(l[t],c[t])})),r.forEach((function(e,t){i.beforeAnimationRun(p[t],h[t])}));var d=t.length+n.length+p.length,f=function(e){--d<=0&&(o&&o(),i.onNextRender((function(){t.forEach((function(e,t){i.clearHtmlElement(a[t],u[t])})),n.forEach((function(e,t){i.clearHtmlElement(l[t],c[t])})),r.forEach((function(e,t){i.clearHtmlElement(p[t],h[t])}))}),e))};t.forEach((function(e,t){i.runAnimation(a[t],u[t],f)})),n.forEach((function(e,t){i.runAnimation(l[t],c[t],f)})),r.forEach((function(e,t){i.runAnimation(p[t],h[t],f)}))},t}(ni),ii=function(){function e(e,t,n){var r=this;this.animationOptions=e,this.update=t,this.getCurrentValue=n,this._debouncedSync=function(e){var t,n=this,r=!1,o=!1;return{run:function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];o=!1,t=i,r||(r=!0,queueMicrotask((function(){o||e.apply(n,t),o=!1,r=!1})))},cancel:function(){o=!0}}}((function(e){r.animation.cancel();try{r._sync(e)}catch(t){r.update(e)}}))}return e.prototype.onNextRender=function(e,t){var n=this,r=this.animationOptions.getRerenderEvent();if(r){var o=function(){r.remove(i),n.cancelCallback=void 0},i=function(){e(),o()};this.cancelCallback=function(){t&&t(),o()},r.add(i)}else{if(!yr.isAvailable())throw new Error("Can't get next render");var s=yr.requestAnimationFrame((function(){e(),n.cancelCallback=void 0}));this.cancelCallback=function(){t&&t(),cancelAnimationFrame(s),n.cancelCallback=void 0}}},e.prototype.sync=function(e){this.animationOptions.isAnimationEnabled()?this._debouncedSync.run(e):(this.cancel(),this.update(e))},e.prototype.cancel=function(){this._debouncedSync.cancel(),this.cancelCallback&&this.cancelCallback(),this.animation.cancel()},e}(),si=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.animation=new ri,t}return ti(t,e),t.prototype._sync=function(e){var t=this;e!==this.getCurrentValue()?e?(this.onNextRender((function(){t.animation.onEnter(t.animationOptions)})),this.update(e)):this.animation.onLeave(this.animationOptions,(function(){t.update(e)})):this.update(e)},t}(ii),ai=(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.animation=new oi,t}ti(t,e),t.prototype._sync=function(e){var t,n,r=this,o=this.getCurrentValue(),i=null===(t=this.animationOptions.allowSyncRemovalAddition)||void 0===t||t,s=function(e,t,n){var r=new Map,o=new Map,i=new Map,s=new Map;e.forEach((function(e){var t=n(e);if(r.has(t))throw new Error("keys must be unique");r.set(n(e),e)})),t.forEach((function(e){var t=n(e);if(o.has(t))throw new Error("keys must be unique");o.set(t,e)}));var a=[],u=[];o.forEach((function(e,t){r.has(t)?i.set(t,i.size):a.push(e)})),r.forEach((function(e,t){o.has(t)?s.set(t,s.size):u.push(e)}));var l=[];i.forEach((function(e,t){var n=s.get(t),r=o.get(t);n!==e&&l.push({item:r,movedForward:n<e})}));var c=new Array(e.length),p=0,h=Array.from(i.keys());e.forEach((function(e,t){i.has(n(e))?(c[t]=o.get(h[p]),p++):c[t]=e}));var d=new Map,f=[];c.forEach((function(e){var t=n(e);o.has(t)?f.length>0&&(d.set(t,f),f=[]):f.push(e)}));var m=new Array;return o.forEach((function(e,t){d.has(t)&&d.get(t).forEach((function(e){m.push(e)})),m.push(e)})),f.forEach((function(e){m.push(e)})),{reorderedItems:l,deletedItems:u,addedItems:a,mergedItems:m}}(o,e,null!==(n=this.animationOptions.getKey)&&void 0!==n?n:function(e){return e}),a=s.addedItems,u=s.deletedItems,l=s.reorderedItems,c=s.mergedItems;!i&&(l.length>0||a.length>0)&&(u=[],c=e);var p=function(){r.animation.runGroupAnimation(r.animationOptions,a,u,l,(function(){u.length>0&&r.update(e)}))};[a,u,l].some((function(e){return e.length>0}))?u.length<=0||l.length>0||a.length>0?(this.onNextRender(p,(function(){r.update(e)})),this.update(c)):p():this.update(e)}}(ii),function(e){function t(t,n,r,o){var i=e.call(this,t,n,r)||this;return i.mergeValues=o,i.animation=new oi,i}ti(t,e),t.prototype._sync=function(e){var t=this,n=[].concat(this.getCurrentValue());if(n[0]!==e[0]){var r=this.mergeValues?this.mergeValues(e,n):[].concat(n,e);this.onNextRender((function(){t.animation.runGroupAnimation(t.animationOptions,e,n,[],(function(){t.update(e)}))}),(function(){return t.update(e)})),this.update(r,!0)}else this.update(e)}}(ii),function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),ui=function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s},li=function(e){function t(){var t=e.call(this)||this;return t.createLocTitleProperty(),t}return ai(t,e),t.prototype.createLocTitleProperty=function(){return this.createLocalizableString("title",this,!0)},Object.defineProperty(t.prototype,"isPage",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPanel",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isQuestion",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSurvey",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this.getLocalizableStringText("title",this.getDefaultTitleValue())},set:function(e){this.setLocalizableStringText("title",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locTitle",{get:function(){return this.getLocalizableString("title")},enumerable:!1,configurable:!0}),t.prototype.getDefaultTitleValue=function(){},t.prototype.updateDescriptionVisibility=function(e){var t=!1;if(this.isDesignMode){var n=Br.findProperty(this.getType(),"description");t=!!(null==n?void 0:n.placeholder)}this.hasDescription=!!e||t&&this.isDesignMode},Object.defineProperty(t.prototype,"locDescription",{get:function(){return this.getLocalizableString("description")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleTagName",{get:function(){var e=this.getDefaultTitleTagName(),t=this.getSurvey();return t?t.getElementTitleTagName(this,e):e},enumerable:!1,configurable:!0}),t.prototype.getDefaultTitleTagName=function(){return br.titleTags[this.getType()]},Object.defineProperty(t.prototype,"hasTitle",{get:function(){return this.title.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTitleActions",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTitleEvents",{get:function(){return this.hasTitleActions},enumerable:!1,configurable:!0}),t.prototype.getTitleToolbar=function(){return null},t.prototype.getTitleOwner=function(){},Object.defineProperty(t.prototype,"isTitleOwner",{get:function(){return!!this.getTitleOwner()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isTitleRenderedAsString",{get:function(){return this.getIsTitleRenderedAsString()},enumerable:!1,configurable:!0}),t.prototype.toggleState=function(){},Object.defineProperty(t.prototype,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssTitle",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ariaTitleId",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ariaDescriptionId",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleTabIndex",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleAriaExpanded",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleAriaRole",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ariaLabel",{get:function(){return this.locTitle.renderedHtml},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleAriaLabel",{get:function(){return this.ariaLabel},enumerable:!1,configurable:!0}),t.prototype.getIsTitleRenderedAsString=function(){return!this.isTitleOwner},ui([Sr()],t.prototype,"hasDescription",void 0),ui([Sr({localizable:!0,onSet:function(e,t){t.updateDescriptionVisibility(e)}})],t.prototype,"description",void 0),t}(Io);!function(e){e[e.InsideEmptyPanel=1]="InsideEmptyPanel",e[e.MultilineRight=2]="MultilineRight",e[e.MultilineLeft=3]="MultilineLeft",e[e.Top=4]="Top",e[e.Right=5]="Right",e[e.Bottom=6]="Bottom",e[e.Left=7]="Left"}(ei||(ei={}));!function(e){function t(n){var r=e.call(this)||this;return r.selectedElementInDesignValue=r,r.disableDesignActions=t.CreateDisabledDesignElements,r.parentQuestionValue=null,r.isContentElement=!1,r.isEditableTemplateElement=!1,r.isInteractiveDesignElement=!0,r.isSingleInRow=!0,r._renderedIsExpanded=!0,r._isAnimatingCollapseExpand=!1,r.animationCollapsed=new si(r.getExpandCollapseAnimationOptions(),(function(e){r._renderedIsExpanded=e,r.animationAllowed&&(e?r.isAnimatingCollapseExpand=!0:r.updateElementCss(!1))}),(function(){return r.renderedIsExpanded})),r.name=n,r.createNewArray("errors"),r.createNewArray("titleActions"),r.registerPropertyChangedHandlers(["isReadOnly"],(function(){r.onReadOnlyChanged()})),r.registerPropertyChangedHandlers(["errors"],(function(){r.updateVisibleErrors()})),r.registerPropertyChangedHandlers(["isSingleInRow"],(function(){r.updateElementCss(!1)})),r}ai(t,e),t.getProgressInfoByElements=function(e,t){for(var n=Io.createProgressInfo(),r=0;r<e.length;r++)if(e[r].isVisible){var o=e[r].getProgressInfo();n.questionCount+=o.questionCount,n.answeredQuestionCount+=o.answeredQuestionCount,n.requiredQuestionCount+=o.requiredQuestionCount,n.requiredAnsweredQuestionCount+=o.requiredAnsweredQuestionCount}return t&&n.questionCount>0&&(0==n.requiredQuestionCount&&(n.requiredQuestionCount=1),n.answeredQuestionCount>0&&(n.requiredAnsweredQuestionCount=1)),n},t.ScrollElementToTop=function(e,n,r){var o=br.environment.root;if(!e||void 0===o)return!1;var i=o.getElementById(e);return t.ScrollElementToViewCore(i,!1,n,r)},t.ScrollElementToViewCore=function(e,t,n,r){if(!e||!e.scrollIntoView)return!1;var o=n?-1:e.getBoundingClientRect().top,i=o<0,s=-1;if(!i&&t&&(i=(s=e.getBoundingClientRect().left)<0),!i&&yr.isAvailable()){var a=yr.getInnerHeight();if(!(i=a>0&&a<o)&&t){var u=yr.getInnerWidth();i=u>0&&u<s}}return i&&e.scrollIntoView(r),i},t.GetFirstNonTextElement=function(e,t){if(void 0===t&&(t=!1),!e||!e.length||0==e.length)return null;if(t){var n=e[0];"#text"===n.nodeName&&(n.data=""),"#text"===(n=e[e.length-1]).nodeName&&(n.data="")}for(var r=0;r<e.length;r++)if("#text"!=e[r].nodeName&&"#comment"!=e[r].nodeName)return e[r];return null},t.FocusElement=function(e){if(!e||!gr.isAvailable())return!1;var n=t.focusElementCore(e);return n||setTimeout((function(){t.focusElementCore(e)}),10),n},t.focusElementCore=function(e){var n=br.environment.root;if(!n)return!1;var r=n.getElementById(e);return!(!r||r.disabled||"none"===r.style.display||null===r.offsetParent)&&(t.ScrollElementToViewCore(r,!0,!1),r.focus(),!0)},t.prototype.onPropertyValueChanged=function(t,n,r){e.prototype.onPropertyValueChanged.call(this,t,n,r),"state"===t&&(this.updateElementCss(!1),this.notifyStateChanged(n),this.stateChangedCallback&&this.stateChangedCallback())},t.prototype.getSkeletonComponentNameCore=function(){return this.survey?this.survey.getSkeletonComponentName(this):""},Object.defineProperty(t.prototype,"parentQuestion",{get:function(){return this.parentQuestionValue},enumerable:!1,configurable:!0}),t.prototype.setParentQuestion=function(e){this.parentQuestionValue=e,this.onParentQuestionChanged()},t.prototype.onParentQuestionChanged=function(){},Object.defineProperty(t.prototype,"skeletonComponentName",{get:function(){return this.getSkeletonComponentNameCore()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this.getPropertyValue("state")},set:function(e){this.setPropertyValue("state",e),this.renderedIsExpanded=!("collapsed"===this.state&&!this.isDesignMode)},enumerable:!1,configurable:!0}),t.prototype.notifyStateChanged=function(e){this.survey&&this.survey.elementContentVisibilityChanged(this)},Object.defineProperty(t.prototype,"isCollapsed",{get:function(){return"collapsed"===this.state&&!this.isDesignMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isExpanded",{get:function(){return"expanded"===this.state},enumerable:!1,configurable:!0}),t.prototype.collapse=function(){this.isDesignMode||(this.state="collapsed")},t.prototype.expand=function(){this.state="expanded"},t.prototype.toggleState=function(){return this.isCollapsed?(this.expand(),!0):!this.isExpanded||(this.collapse(),!1)},Object.defineProperty(t.prototype,"hasStateButton",{get:function(){return this.isExpanded||this.isCollapsed},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shortcutText",{get:function(){return this.title||this.name},enumerable:!1,configurable:!0}),t.prototype.getTitleToolbar=function(){return this.titleToolbarValue||(this.titleToolbarValue=this.createActionContainer(!0),this.titleToolbarValue.containerCss=(this.isPanel?this.cssClasses.panel.titleBar:this.cssClasses.titleBar)||"sv-action-title-bar",this.titleToolbarValue.setItems(this.getTitleActions())),this.titleToolbarValue},t.prototype.createActionContainer=function(e){var t=e?new Xo:new Do;return this.survey&&this.survey.getCss().actionBar&&(t.cssClasses=this.survey.getCss().actionBar),t},Object.defineProperty(t.prototype,"titleActions",{get:function(){return this.getPropertyValue("titleActions")},enumerable:!1,configurable:!0}),t.prototype.getTitleActions=function(){return this.isTitleActionRequested||(this.updateTitleActions(),this.isTitleActionRequested=!0),this.titleActions},t.prototype.getDefaultTitleActions=function(){return[]},t.prototype.updateTitleActions=function(){var e=this.getDefaultTitleActions();this.survey&&(e=this.survey.getUpdatedElementTitleActions(this,e)),this.setPropertyValue("titleActions",e)},Object.defineProperty(t.prototype,"hasTitleActions",{get:function(){return this.getTitleActions().length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTitleEvents",{get:function(){return void 0!==this.state&&"default"!==this.state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleTabIndex",{get:function(){return this.isPage||"default"===this.state?void 0:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleAriaExpanded",{get:function(){if(!this.isPage&&"default"!==this.state)return"expanded"===this.state?"true":"false"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleAriaRole",{get:function(){if(!this.isPage&&"default"!==this.state)return"button"},enumerable:!1,configurable:!0}),t.prototype.setSurveyImpl=function(e,t){this.surveyImplValue=e,this.surveyImplValue?(this.surveyDataValue=this.surveyImplValue.getSurveyData(),this.setSurveyCore(this.surveyImplValue.getSurvey()),this.textProcessorValue=this.surveyImplValue.getTextProcessor(),this.onSetData()):(this.setSurveyCore(null),this.surveyDataValue=null),this.survey&&(this.updateDescriptionVisibility(this.description),this.clearCssClasses())},t.prototype.canRunConditions=function(){return e.prototype.canRunConditions.call(this)&&!!this.data},t.prototype.getDataFilteredValues=function(){return this.data?this.data.getFilteredValues():{}},t.prototype.getDataFilteredProperties=function(){var e=this.data?this.data.getFilteredProperties():{};return e.question=this,e},Object.defineProperty(t.prototype,"surveyImpl",{get:function(){return this.surveyImplValue},enumerable:!1,configurable:!0}),t.prototype.__setData=function(e){br.supportCreatorV2&&(this.surveyDataValue=e)},Object.defineProperty(t.prototype,"data",{get:function(){return this.surveyDataValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.getSurvey()},enumerable:!1,configurable:!0}),t.prototype.getSurvey=function(e){return void 0===e&&(e=!1),this.surveyValue||this.surveyImplValue&&this.setSurveyCore(this.surveyImplValue.getSurvey()),this.surveyValue},t.prototype.setSurveyCore=function(e){this.surveyValue=e,this.surveyChangedCallback&&this.surveyChangedCallback()},Object.defineProperty(t.prototype,"isInternal",{get:function(){return this.isContentElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"areInvisibleElementsShowing",{get:function(){return!!this.survey&&this.survey.areInvisibleElementsShowing&&!this.isContentElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isReadOnly",{get:function(){return this.readOnly},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"readOnly",{get:function(){return this.getPropertyValue("readOnly")},set:function(e){this.readOnly!=e&&(this.setPropertyValue("readOnly",e),this.isLoadingFromJson||this.setPropertyValue("isReadOnly",this.isReadOnly))},enumerable:!1,configurable:!0}),t.prototype.onReadOnlyChanged=function(){this.readOnlyChangedCallback&&this.readOnlyChangedCallback()},Object.defineProperty(t.prototype,"css",{get:function(){return this.survey?this.survey.getCss():{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssClassesValue",{get:function(){return this.getPropertyValueWithoutDefault("cssClassesValue")},set:function(e){this.setPropertyValue("cssClassesValue",e)},enumerable:!1,configurable:!0}),t.prototype.ensureCssClassesValue=function(){this.cssClassesValue||(this.cssClassesValue=this.calcCssClasses(this.css),this.updateElementCssCore(this.cssClassesValue))},Object.defineProperty(t.prototype,"cssClasses",{get:function(){this.cssClassesValue;return this.survey?(this.ensureCssClassesValue(),this.cssClassesValue):this.calcCssClasses(this.css)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssTitleNumber",{get:function(){var e=this.cssClasses;return e.number?e.number:e.panel?e.panel.number:void 0},enumerable:!1,configurable:!0}),t.prototype.calcCssClasses=function(e){},t.prototype.updateElementCssCore=function(e){},Object.defineProperty(t.prototype,"cssError",{get:function(){return""},enumerable:!1,configurable:!0}),t.prototype.updateElementCss=function(e){this.clearCssClasses()},t.prototype.clearCssClasses=function(){this.cssClassesValue=void 0},t.prototype.getIsLoadingFromJson=function(){return!!e.prototype.getIsLoadingFromJson.call(this)||!!this.surveyValue&&this.surveyValue.isLoadingFromJson},Object.defineProperty(t.prototype,"name",{get:function(){return this.getPropertyValue("name","")},set:function(e){var t=this.name;this.setPropertyValue("name",this.getValidName(e)),!this.isLoadingFromJson&&t&&this.onNameChanged(t)},enumerable:!1,configurable:!0}),t.prototype.getValidName=function(e){return e},t.prototype.onNameChanged=function(e){},t.prototype.updateBindingValue=function(e,t){this.data&&!this.isTwoValueEquals(t,this.data.getValue(e))&&this.data.setValue(e,t,!1)},Object.defineProperty(t.prototype,"errors",{get:function(){return this.getPropertyValue("errors")},set:function(e){this.setPropertyValue("errors",e)},enumerable:!1,configurable:!0}),t.prototype.updateVisibleErrors=function(){for(var e=0,t=0;t<this.errors.length;t++)this.errors[t].visible&&e++;this.hasVisibleErrors=e>0},Object.defineProperty(t.prototype,"containsErrors",{get:function(){return this.getPropertyValue("containsErrors",!1)},enumerable:!1,configurable:!0}),t.prototype.updateContainsErrors=function(){this.setPropertyValue("containsErrors",this.getContainsErrors())},t.prototype.getContainsErrors=function(){return this.errors.length>0},Object.defineProperty(t.prototype,"selectedElementInDesign",{get:function(){return this.selectedElementInDesignValue},set:function(e){this.selectedElementInDesignValue=e},enumerable:!1,configurable:!0}),t.prototype.updateCustomWidgets=function(){},t.prototype.onSurveyLoad=function(){},Object.defineProperty(t.prototype,"wasRendered",{get:function(){return!!this.wasRenderedValue},enumerable:!1,configurable:!0}),t.prototype.onFirstRendering=function(){this.wasRenderedValue=!0,this.ensureCssClassesValue()},t.prototype.endLoadingFromJson=function(){e.prototype.endLoadingFromJson.call(this),this.survey||this.onSurveyLoad(),this.updateDescriptionVisibility(this.description)},t.prototype.setVisibleIndex=function(e){return 0},t.prototype.delete=function(e){},t.prototype.getLocale=function(){return this.survey?this.survey.getLocale():this.locOwner?this.locOwner.getLocale():""},t.prototype.getMarkdownHtml=function(e,t){return this.survey?this.survey.getSurveyMarkdownHtml(this,e,t):this.locOwner?this.locOwner.getMarkdownHtml(e,t):void 0},t.prototype.getRenderer=function(e){return this.survey&&"function"==typeof this.survey.getRendererForString?this.survey.getRendererForString(this,e):this.locOwner&&"function"==typeof this.locOwner.getRenderer?this.locOwner.getRenderer(e):null},t.prototype.getRendererContext=function(e){return this.survey&&"function"==typeof this.survey.getRendererContextForString?this.survey.getRendererContextForString(this,e):this.locOwner&&"function"==typeof this.locOwner.getRendererContext?this.locOwner.getRendererContext(e):e},t.prototype.getProcessedText=function(e){return this.isLoadingFromJson?e:this.textProcessor?this.textProcessor.processText(e,this.getUseDisplayValuesInDynamicTexts()):this.locOwner?this.locOwner.getProcessedText(e):e},t.prototype.getUseDisplayValuesInDynamicTexts=function(){return!0},t.prototype.removeSelfFromList=function(e){if(e&&Array.isArray(e)){var t=e.indexOf(this);t>-1&&e.splice(t,1)}},Object.defineProperty(t.prototype,"textProcessor",{get:function(){return this.textProcessorValue},enumerable:!1,configurable:!0}),t.prototype.getProcessedHtml=function(e){return e&&this.textProcessor?this.textProcessor.processText(e,!0):e},t.prototype.onSetData=function(){},Object.defineProperty(t.prototype,"parent",{get:function(){return this.getPropertyValue("parent",null)},set:function(e){this.setPropertyValue("parent",e)},enumerable:!1,configurable:!0}),t.prototype.getPage=function(e){for(;e&&e.parent;)e=e.parent;return e&&"page"==e.getType()?e:null},t.prototype.moveToBase=function(e,t,n){if(void 0===n&&(n=null),!t)return!1;e.removeElement(this);var r=-1;return Cr.isNumber(n)&&(r=parseInt(n)),-1==r&&n&&n.getType&&(r=t.indexOf(n)),t.addElement(this,r),!0},t.prototype.setPage=function(e,t){var n=this.getPage(e);"string"==typeof t&&this.getSurvey().pages.forEach((function(e){t===e.name&&(t=e)}));n!==t&&(e&&e.removeElement(this),t&&t.addElement(this,-1))},t.prototype.getSearchableLocKeys=function(e){e.push("title"),e.push("description")},Object.defineProperty(t.prototype,"isDefaultV2Theme",{get:function(){return this.survey&&"sd-root-modern"==this.survey.getCss().root},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasParent",{get:function(){return this.parent&&!this.parent.isPage&&!this.parent.originalPage||void 0===this.parent},enumerable:!1,configurable:!0}),t.prototype.shouldAddRunnerStyles=function(){return!this.isDesignMode&&this.isDefaultV2Theme},Object.defineProperty(t.prototype,"isCompact",{get:function(){return this.survey&&this.survey.isCompact},enumerable:!1,configurable:!0}),t.prototype.canHaveFrameStyles=function(){return void 0!==this.parent&&(!this.hasParent||this.parent&&this.parent.showPanelAsPage)},t.prototype.getHasFrameV2=function(){return this.shouldAddRunnerStyles()&&this.canHaveFrameStyles()},t.prototype.getIsNested=function(){return this.shouldAddRunnerStyles()&&!this.canHaveFrameStyles()},t.prototype.getCssRoot=function(e){var t=!!this.isCollapsed||!!this.isExpanded;return(new No).append(e.withFrame,this.getHasFrameV2()&&!this.isCompact).append(e.compact,this.isCompact&&this.getHasFrameV2()).append(e.collapsed,!!this.isCollapsed).append(e.expandableAnimating,t&&this.isAnimatingCollapseExpand).append(e.expanded,!!this.isExpanded&&this.renderedIsExpanded).append(e.expandable,t).append(e.nested,this.getIsNested()).toString()},Object.defineProperty(t.prototype,"width",{get:function(){return this.getPropertyValue("width","")},set:function(e){this.setPropertyValue("width",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minWidth",{get:function(){return this.getPropertyValue("minWidth")},set:function(e){this.setPropertyValue("minWidth",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxWidth",{get:function(){return this.getPropertyValue("maxWidth")},set:function(e){this.setPropertyValue("maxWidth",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderWidth",{get:function(){return this.getPropertyValue("renderWidth","")},set:function(e){this.setPropertyValue("renderWidth",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"indent",{get:function(){return this.getPropertyValue("indent")},set:function(e){this.setPropertyValue("indent",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightIndent",{get:function(){return this.getPropertyValue("rightIndent",0)},set:function(e){this.setPropertyValue("rightIndent",e)},enumerable:!1,configurable:!0}),t.prototype.getRootStyle=function(){var e={};return this.paddingLeft&&(e["--sv-element-add-padding-left"]=this.paddingLeft),this.paddingRight&&(e["--sv-element-add-padding-right"]=this.paddingRight),e},Object.defineProperty(t.prototype,"paddingLeft",{get:function(){return this.getPropertyValue("paddingLeft","")},set:function(e){this.setPropertyValue("paddingLeft",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paddingRight",{get:function(){return this.getPropertyValue("paddingRight","")},set:function(e){this.setPropertyValue("paddingRight",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rootStyle",{get:function(){var e={},t=this.minWidth;return"auto"!=t&&(t="min(100%, "+this.minWidth+")"),this.allowRootStyle&&this.renderWidth&&(e.flexGrow=1,e.flexShrink=1,e.flexBasis=this.renderWidth,e.minWidth=t,e.maxWidth=this.maxWidth),e},enumerable:!1,configurable:!0}),t.prototype.isContainsSelection=function(e){var t=void 0,n=gr.getDocument();if(gr.isAvailable()&&n&&n.selection)t=n.selection.createRange().parentElement();else{var r=yr.getSelection();if(r&&r.rangeCount>0){var o=r.getRangeAt(0);o.startOffset!==o.endOffset&&(t=o.startContainer.parentNode)}}return t==e},Object.defineProperty(t.prototype,"clickTitleFunction",{get:function(){var e=this;if(this.needClickTitleFunction())return function(t){if(!t||!e.isContainsSelection(t.target))return e.processTitleClick()}},enumerable:!1,configurable:!0}),t.prototype.needClickTitleFunction=function(){return"default"!==this.state},t.prototype.processTitleClick=function(){"default"!==this.state&&this.toggleState()},Object.defineProperty(t.prototype,"hasAdditionalTitleToolbar",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"additionalTitleToolbar",{get:function(){return this.getAdditionalTitleToolbar()},enumerable:!1,configurable:!0}),t.prototype.getAdditionalTitleToolbar=function(){return null},t.prototype.getCssTitle=function(e){var t="default"!==this.state;return(new No).append(e.title).append(e.titleNumInline,(this.no||"").length>4||t).append(e.titleExpandable,t).append(e.titleExpanded,this.isExpanded).append(e.titleCollapsed,this.isCollapsed).append(e.titleDisabled,this.isDisabledStyle).append(e.titleReadOnly,this.isReadOnly).append(e.titleOnError,this.containsErrors).toString()},Object.defineProperty(t.prototype,"isDisabledStyle",{get:function(){return this.getIsDisableAndReadOnlyStyles(!1)[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isReadOnlyStyle",{get:function(){return this.getIsDisableAndReadOnlyStyles(!1)[0]},enumerable:!1,configurable:!0}),t.prototype.getIsDisableAndReadOnlyStyles=function(e){var t=this.isPreviewStyle,n=e||this.isReadOnly;return[n&&!t,!this.isDefaultV2Theme&&(n||t)]},Object.defineProperty(t.prototype,"isPreviewStyle",{get:function(){return!!this.survey&&"preview"===this.survey.state},enumerable:!1,configurable:!0}),t.prototype.localeChanged=function(){e.prototype.localeChanged.call(this),this.updateDescriptionVisibility(this.description),this.errors.length>0&&this.errors.forEach((function(e){e.updateText()}))},t.prototype.setWrapperElement=function(e){this.wrapperElement=e},t.prototype.getWrapperElement=function(){return this.wrapperElement},Object.defineProperty(t.prototype,"isAnimatingCollapseExpand",{get:function(){return this._isAnimatingCollapseExpand||this._renderedIsExpanded!=this.isExpanded},set:function(e){e!==this._isAnimatingCollapseExpand&&(this._isAnimatingCollapseExpand=e,this.updateElementCss(!1))},enumerable:!1,configurable:!0}),t.prototype.onElementExpanded=function(e){},t.prototype.getExpandCollapseAnimationOptions=function(){var e=this,t=function(t){e.isAnimatingCollapseExpand=!0,t.style.setProperty("--animation-height",t.offsetHeight+"px")},n=function(t){e.isAnimatingCollapseExpand=!1};return{getRerenderEvent:function(){return e.onElementRerendered},getEnterOptions:function(){return{cssClass:(e.isPanel?e.cssClasses.panel:e.cssClasses).contentFadeIn,onBeforeRunAnimation:t,onAfterRunAnimation:function(t){n(),e.onElementExpanded(!0)}}},getLeaveOptions:function(){return{cssClass:(e.isPanel?e.cssClasses.panel:e.cssClasses).contentFadeOut,onBeforeRunAnimation:t,onAfterRunAnimation:n}},getAnimatedElement:function(){var t,n=e.isPanel?e.cssClasses.panel:e.cssClasses;if(n.content){var r=function(e){if(!e)return e;return e.replace(/\s*?([\w-]+)\s*?/g,".$1")}(n.content);if(r)return null===(t=e.getWrapperElement())||void 0===t?void 0:t.querySelector(":scope "+r)}},isAnimationEnabled:function(){return e.isExpandCollapseAnimationEnabled}}},Object.defineProperty(t.prototype,"isExpandCollapseAnimationEnabled",{get:function(){return this.animationAllowed&&!this.isDesignMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedIsExpanded",{get:function(){return!!this._renderedIsExpanded},set:function(e){var t=this._renderedIsExpanded;this.animationCollapsed.sync(e),this.isExpandCollapseAnimationEnabled||t||!this.renderedIsExpanded||this.onElementExpanded(!1)},enumerable:!1,configurable:!0}),t.prototype.getIsAnimationAllowed=function(){return e.prototype.getIsAnimationAllowed.call(this)&&!!this.survey&&!this.survey.isEndLoadingFromJson},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.titleToolbarValue&&this.titleToolbarValue.dispose()},t.CreateDisabledDesignElements=!1,ui([Sr({defaultValue:null})],t.prototype,"dragTypeOverMe",void 0),ui([Sr({defaultValue:!1})],t.prototype,"isDragMe",void 0),ui([Sr({defaultValue:!1})],t.prototype,"hasVisibleErrors",void 0),ui([Sr({defaultValue:!0})],t.prototype,"isSingleInRow",void 0),ui([Sr({defaultValue:!0})],t.prototype,"allowRootStyle",void 0),ui([Sr()],t.prototype,"_renderedIsExpanded",void 0)}(li);var ci=function(){function e(e,t,n){var r;void 0===t&&(t=!1),this.owner=e,this.useMarkdown=t,this.name=n,this.values={},this.htmlValues={},this._allowLineBreaks=!1,this.onStringChanged=new To,e instanceof li&&(this._allowLineBreaks="text"==(null===(r=Br.findProperty(e.getType(),n))||void 0===r?void 0:r.type)),this.onCreating()}return Object.defineProperty(e,"defaultLocale",{get:function(){return br.localization.defaultLocaleName},set:function(e){br.localization.defaultLocaleName=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localizationName",{get:function(){return this._localizationName},set:function(e){this._localizationName!=e&&(this._localizationName=e,this.strChanged())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allowLineBreaks",{get:function(){return this._allowLineBreaks},enumerable:!1,configurable:!0}),e.prototype.getIsMultiple=function(){return!1},Object.defineProperty(e.prototype,"locale",{get:function(){if(this.owner&&this.owner.getLocale){var e=this.owner.getLocale();if(e||!this.sharedData)return e}return this.sharedData?this.sharedData.locale:""},enumerable:!1,configurable:!0}),e.prototype.strChanged=function(){this.searchableText=void 0,void 0!==this.renderedText&&(this.calculatedTextValue=this.calcText(),this.renderedText!==this.calculatedTextValue&&(this.renderedText=void 0,this.calculatedTextValue=void 0),this.htmlValues={},this.onChanged(),this.onStringChanged.fire(this,{}))},Object.defineProperty(e.prototype,"text",{get:function(){return this.pureText},set:function(e){this.setLocaleText(this.locale,e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"calculatedText",{get:function(){return this.renderedText=void 0!==this.calculatedTextValue?this.calculatedTextValue:this.calcText(),this.calculatedTextValue=void 0,this.renderedText},enumerable:!1,configurable:!0}),e.prototype.calcText=function(){var e=this.pureText;return e&&this.owner&&this.owner.getProcessedText&&e.indexOf("{")>-1&&(e=this.owner.getProcessedText(e)),this.onGetTextCallback&&(e=this.onGetTextCallback(e)),e},Object.defineProperty(e.prototype,"pureText",{get:function(){var e=this.locale;e||(e=this.defaultLoc);var t=this.getValue(e);if(this.isValueEmpty(t)&&e===this.defaultLoc&&(t=this.getValue(wr.defaultLocale)),this.isValueEmpty(t)){var n=this.getRootDialect(e);n&&(t=this.getValue(n))}return this.isValueEmpty(t)&&e!==this.defaultLoc&&(t=this.getValue(this.defaultLoc)),this.isValueEmpty(t)&&this.getLocalizationName()&&(t=this.getLocalizationStr(),this.onGetLocalizationTextCallback&&(t=this.onGetLocalizationTextCallback(t))),t||(t=this.defaultValue||""),t},enumerable:!1,configurable:!0}),e.prototype.getRootDialect=function(e){if(!e)return e;var t=e.indexOf("-");return t>-1?e.substring(0,t):""},e.prototype.getLocalizationName=function(){return this.sharedData?this.sharedData.localizationName:this.localizationName},e.prototype.getLocalizationStr=function(){var e=this.getLocalizationName();return e?wr.getString(e,this.locale):""},Object.defineProperty(e.prototype,"hasHtml",{get:function(){return this.hasHtmlValue()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"html",{get:function(){return this.hasHtml?this.getHtmlValue():""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0==this.getValuesKeys().length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textOrHtml",{get:function(){return this.hasHtml?this.getHtmlValue():this.calculatedText},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderedHtml",{get:function(){return this.textOrHtml},enumerable:!1,configurable:!0}),e.prototype.getLocaleText=function(e){var t=this.getLocaleTextCore(e);return t||""},e.prototype.getLocaleTextCore=function(e){return e||(e=this.defaultLoc),this.getValue(e)},e.prototype.isLocaleTextEqualsWithDefault=function(e,t){var n=this.getLocaleTextCore(e);return n===t||this.isValueEmpty(n)&&this.isValueEmpty(t)},e.prototype.clear=function(){this.setJson(void 0)},e.prototype.clearLocale=function(e){this.setLocaleText(e,void 0)},e.prototype.setLocaleText=function(e,t){if(e=this.getValueLoc(e),this.storeDefaultText||!this.isLocaleTextEqualsWithDefault(e,t)){if(br.localization.storeDuplicatedTranslations||this.isValueEmpty(t)||!e||e==this.defaultLoc||this.getValue(e)||t!=this.getLocaleText(this.defaultLoc)){var n=this.curLocale;e||(e=this.defaultLoc);var r=this.onStrChanged&&e===n?this.pureText:void 0;delete this.htmlValues[e],this.isValueEmpty(t)?this.deleteValue(e):"string"==typeof t&&(this.canRemoveLocValue(e,t)?this.setLocaleText(e,null):(this.setValue(e,t),e==this.defaultLoc&&this.deleteValuesEqualsToDefault(t))),this.fireStrChanged(e,r)}}else{if(!this.isValueEmpty(t)||e&&e!==this.defaultLoc)return;var o=wr.defaultLocale,i=this.getValue(o);o&&!this.isValueEmpty(i)&&(this.setValue(o,t),this.fireStrChanged(o,i))}},e.prototype.isValueEmpty=function(e){return null==e||!this.localizationName&&""===e},Object.defineProperty(e.prototype,"curLocale",{get:function(){return this.locale?this.locale:this.defaultLoc},enumerable:!1,configurable:!0}),e.prototype.canRemoveLocValue=function(e,t){if(br.localization.storeDuplicatedTranslations)return!1;if(e===this.defaultLoc)return!1;var n=this.getRootDialect(e);if(n){var r=this.getLocaleText(n);return r?r==t:this.canRemoveLocValue(n,t)}return t==this.getLocaleText(this.defaultLoc)},e.prototype.fireStrChanged=function(e,t){if(this.strChanged(),this.onStrChanged){var n=this.pureText;e===this.curLocale&&t===n||this.onStrChanged(t,n)}},e.prototype.hasNonDefaultText=function(){var e=this.getValuesKeys();return 0!=e.length&&(e.length>1||e[0]!=this.defaultLoc)},e.prototype.getLocales=function(){var e=this.getValuesKeys();return 0==e.length?[]:e},e.prototype.getJson=function(){if(this.sharedData)return this.sharedData.getJson();var e=this.getValuesKeys();if(0==e.length)return null;if(1==e.length&&e[0]==br.localization.defaultLocaleName&&!br.serialization.localizableStringSerializeAsObject)return this.values[e[0]];var t={};for(var n in this.values)t[n]=this.values[n];return t},e.prototype.setJson=function(e){if(this.sharedData)this.sharedData.setJson(e);else if(this.values={},this.htmlValues={},null!=e){if("string"==typeof e)this.setLocaleText(null,e);else for(var t in e)this.setLocaleText(t,e[t]);this.strChanged()}},Object.defineProperty(e.prototype,"renderAs",{get:function(){return this.owner&&"function"==typeof this.owner.getRenderer&&this.owner.getRenderer(this.name)||e.defaultRenderer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderAsData",{get:function(){return this.owner&&"function"==typeof this.owner.getRendererContext&&this.owner.getRendererContext(this)||this},enumerable:!1,configurable:!0}),e.prototype.equals=function(e){return this.sharedData?this.sharedData.equals(e):!(!e||!e.values)&&Cr.isTwoValueEquals(this.values,e.values,!1,!0,!1)},e.prototype.setFindText=function(e){if(this.searchText!=e){if(this.searchText=e,!this.searchableText){var t=this.textOrHtml;this.searchableText=t?t.toLowerCase():""}var n=this.searchableText,r=n&&e?n.indexOf(e):void 0;return r<0&&(r=void 0),null==r&&this.searchIndex==r||(this.searchIndex=r,this.onSearchChanged&&this.onSearchChanged()),null!=this.searchIndex}},e.prototype.onChanged=function(){},e.prototype.onCreating=function(){},e.prototype.hasHtmlValue=function(){if(!this.owner||!this.useMarkdown)return!1;var e=this.locale;if(e||(e=this.defaultLoc),void 0!==this.htmlValues[e])return!!this.htmlValues[e];var t=this.calculatedText;if(!t)return this.setHtmlValue(e,""),!1;if(this.getLocalizationName()&&t===this.getLocalizationStr())return this.setHtmlValue(e,""),!1;var n=this.owner.getMarkdownHtml(t,this.name);return this.setHtmlValue(e,n),!!n},e.prototype.setHtmlValue=function(e,t){this.htmlValues[e]=t},e.prototype.getHtmlValue=function(){var e=this.locale;return e||(e=this.defaultLoc),this.htmlValues[e]},e.prototype.deleteValuesEqualsToDefault=function(e){if(!br.localization.storeDuplicatedTranslations)for(var t=this.getValuesKeys(),n=0;n<t.length;n++)t[n]!=this.defaultLoc&&this.getValue(t[n])==e&&this.deleteValue(t[n])},e.prototype.getValue=function(e){return this.sharedData?this.sharedData.getValue(e):this.values[this.getValueLoc(e)]},e.prototype.setValue=function(e,t){this.sharedData?this.sharedData.setValue(e,t):this.values[this.getValueLoc(e)]=t},e.prototype.deleteValue=function(e){this.sharedData?this.sharedData.deleteValue(e):delete this.values[this.getValueLoc(e)]},e.prototype.getValueLoc=function(e){return this.disableLocalization?br.localization.defaultLocaleName:e},e.prototype.getValuesKeys=function(){return this.sharedData?this.sharedData.getValuesKeys():Object.keys(this.values)},Object.defineProperty(e.prototype,"defaultLoc",{get:function(){return br.localization.defaultLocaleName},enumerable:!1,configurable:!0}),e.SerializeAsObject=!1,e.defaultRenderer="sv-string-viewer",e.editableRenderer="sv-string-editor",e}();!function(){function e(e){this.owner=e,this.values={}}e.prototype.getIsMultiple=function(){return!0},Object.defineProperty(e.prototype,"locale",{get:function(){return this.owner&&this.owner.getLocale?this.owner.getLocale():""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue("")},set:function(e){this.setValue("",e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return Array.isArray(this.value)?this.value.join("\n"):""},set:function(e){this.value=e?e.split("\n"):[]},enumerable:!1,configurable:!0}),e.prototype.getLocaleText=function(e){var t=this.getValueCore(e,!e||e===this.locale);return t&&Array.isArray(t)&&0!=t.length?t.join("\n"):""},e.prototype.setLocaleText=function(e,t){var n=t?t.split("\n"):null;this.setValue(e,n)},e.prototype.getValue=function(e){return this.getValueCore(e)},e.prototype.getValueCore=function(e,t){if(void 0===t&&(t=!0),e=this.getLocale(e),this.values[e])return this.values[e];if(t){var n=br.localization.defaultLocaleName;if(e!==n&&this.values[n])return this.values[n]}return[]},e.prototype.setValue=function(e,t){e=this.getLocale(e);var n=Cr.createCopy(this.values);t&&0!=t.length?this.values[e]=t:delete this.values[e],this.onValueChanged&&this.onValueChanged(n,this.values)},e.prototype.hasValue=function(e){return void 0===e&&(e=""),!this.isEmpty&&this.getValue(e).length>0},Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0==this.getValuesKeys().length},enumerable:!1,configurable:!0}),e.prototype.getLocale=function(e){return e||((e=this.locale)||br.localization.defaultLocaleName)},e.prototype.getLocales=function(){var e=this.getValuesKeys();return 0==e.length?[]:e},e.prototype.getJson=function(){var e=this.getValuesKeys();return 0==e.length?null:1!=e.length||e[0]!=br.localization.defaultLocaleName||br.serialization.localizableStringSerializeAsObject?Cr.createCopy(this.values):this.values[e[0]]},e.prototype.setJson=function(e){if(this.values={},e)if(Array.isArray(e))this.setValue(null,e);else for(var t in e)this.setValue(t,e[t])},e.prototype.getValuesKeys=function(){return Object.keys(this.values)}}();function pi(e){return"function"!=typeof e?e:e()}!function(){function e(){this._result=""}e.prototype.log=function(e){this._result+="->"+e},Object.defineProperty(e.prototype,"result",{get:function(){return this._result},enumerable:!1,configurable:!0})}();var hi=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),di=function(){function e(e,t,n,r,o){var i=this;void 0===r&&(r=null),this.container=e,this.model=t,this.itemsSelector=n,this.dotsItemSize=r,this.delayedUpdateFunction=o,this.resizeObserver=void 0,this.isInitialized=!1,this.minDimensionConst=56,this.separatorSize=17,this.separatorAddConst=1,this.paddingSizeConst=8,this.dotsSizeConst=48,this.recalcMinDimensionConst=!0,this.getComputedStyle=function(e){return gr.getComputedStyle(e)},this.model.updateCallback=function(e){e&&(i.isInitialized=!1),setTimeout((function(){i.process()}),1)},"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((function(e){yr.requestAnimationFrame((function(){i.process()}))})),this.resizeObserver.observe(this.container.parentElement))}return e.prototype.getDimensions=function(e){return{scroll:e.scrollWidth,offset:e.offsetWidth}},e.prototype.getAvailableSpace=function(){var e=this.getComputedStyle(this.container),t=this.container.offsetWidth;return"border-box"===e.boxSizing&&(t-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)),t},e.prototype.calcItemSize=function(e){return e.offsetWidth},e.prototype.calcMinDimension=function(e){var t=this.minDimensionConst;return e.iconSize&&this.recalcMinDimensionConst&&(t=2*e.iconSize+this.paddingSizeConst),e.canShrink?t+(e.needSeparator?this.separatorSize:0):e.maxDimension},e.prototype.getRenderedVisibleActionsCount=function(){var e=this,t=0;return this.container.querySelectorAll(this.itemsSelector).forEach((function(n){e.calcItemSize(n)>0&&t++})),t},e.prototype.calcItemsSizes=function(){var e=this,t=this.model.actions;(this.container.querySelectorAll(this.itemsSelector)||[]).forEach((function(n,r){var o=t[r];e.calcActionDimensions(o,n)}))},e.prototype.calcActionDimensions=function(e,t){e.maxDimension=this.calcItemSize(t),e.minDimension=this.calcMinDimension(e)},Object.defineProperty(e.prototype,"isContainerVisible",{get:function(){return!!((e=this.container).offsetWidth||e.offsetHeight||e.getClientRects().length);var e},enumerable:!1,configurable:!0}),e.prototype.process=function(){var e=this;if(this.isContainerVisible&&!this.model.isResponsivenessDisabled){this.isInitialized||this.model.setActionsMode("large");var t=function(){var t,n=e.dotsItemSize;if(!e.dotsItemSize){var r=null===(t=e.container)||void 0===t?void 0:t.querySelector(".sv-dots");n=r&&e.calcItemSize(r)||e.dotsSizeConst}e.model.fit(e.getAvailableSpace(),n)};if(this.isInitialized)t();else{var n=function(){e.calcItemsSizes(),e.isInitialized=!0,t()};this.getRenderedVisibleActionsCount()<this.model.visibleActions.length?this.delayedUpdateFunction?this.delayedUpdateFunction(n):queueMicrotask?queueMicrotask(n):n():n()}}},e.prototype.dispose=function(){this.model.updateCallback=void 0,this.resizeObserver&&this.resizeObserver.disconnect()},e}(),fi=function(e){function t(t,n,r,o,i,s){void 0===i&&(i=40);var a=e.call(this,t,n,r,o,s)||this;return a.minDimensionConst=i,a.recalcMinDimensionConst=!1,a}return hi(t,e),t.prototype.getDimensions=function(){return{scroll:this.container.scrollHeight,offset:this.container.offsetHeight}},t.prototype.getAvailableSpace=function(){var e=this.getComputedStyle(this.container),t=this.container.offsetHeight;return"border-box"===e.boxSizing&&(t-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)),t},t.prototype.calcItemSize=function(e){return e.offsetHeight},t.prototype.calcActionDimensions=function(e,t){e.maxDimension=this.calcItemSize(t),e.minDimension=this.calcItemSize(t)},t}(di);Object(i.checkLibraryVersion)("1.11.6","survey-react-ui")}])}));