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iD,OAAOziD,GAAMuE,IAAKk+C,OAAOl+C,OAK9E,OAAO,M,eClBForK,EAA6B,WAAsB,OAC5D5tI,EAAA,eACAA,EAAA,gBACAA,EAAA,gBACAA,EAAA,UACAA,EAAA,eACAA,EAAA,sBACAA,EAAA,sBACAA,EAAA,mBAGG,SAAS6tI,EACZvtI,EACAqZ,GAEA,OAAIi0H,IAA6Bz1I,SAASmI,EAAS7qC,OAChB,QAC3B6qC,EAAS7qC,KACTkkD,GAMG,GAFI,CAAC8uC,EAAenoD,IAAW,EAAAwY,EAAA,GAAWxY,IAI9C,GAGJ,SAASwtI,EACZxtI,EACAqZ,GAEO,IAAA1pB,EAAYqQ,EAAS8F,UAAU3mC,QAAO,SAAC1H,GAAM,OAAAA,EAAEtC,OAAS+wC,EAAA,cAAsB,GAE/Em1C,GAAyB,QAC3Br7C,EAAS7qC,KACTkkD,GAGJ,IAAK1pB,GAAY0rD,EACb,MAAO,GAEH,IAAAlmF,EAASw6B,EAAQ,KACzB,OAAQqQ,EAAS7qC,MACb,KAAKuqC,EAAA,eACL,KAAKA,EAAA,gBACD,MAAO,CACHitI,EAAYh9I,GACZi9I,EAAgBj9I,GAChBk9I,EAAqBl9I,GACrBq9I,EAAqBr9I,IAE7B,KAAK+P,EAAA,gBACL,KAAKA,EAAA,eACL,KAAKA,EAAA,sBACL,KAAKA,EAAA,sBACD,MAAO,CAACitI,EAAYh9I,IACxB,KAAK+P,EAAA,UACD,OAAIvqC,IAAS+wC,EAAA,WACF,CAACymI,EAAYh9I,IAEjB,GACX,KAAK+P,EAAA,iBACD,MAAO,CACHitI,EAAYh9I,GACZw9I,EAAYx9I,GACZy9I,EAAiBptI,EAAUrQ,GAC3BiL,EAAOoF,EAAUrQ,GACjBuvB,EAASlf,EAAUrQ,GACnBuuB,EAASle,EAAUrQ,IAE3B,QACI,MAAO,M","sources":["webpack://@voxco/survey-engine-js/./lib/mobiscroll/js/mobiscroll.javascript.min.js","webpack://@voxco/survey-engine-js/./src/grammar/expressions.ne","webpack://@voxco/survey-engine-js/./lib/mobiscroll/css/mobiscroll.javascript.min.css","webpack://@voxco/survey-engine-js/./src/assets/main.less","webpack://@voxco/survey-engine-js/./src/i18n/en.yml","webpack://@voxco/survey-engine-js/./src/i18n/fr.yml","webpack://@voxco/survey-engine-js/./lib/mobiscroll/css/mobiscroll.javascript.min.css?e959","webpack://@voxco/survey-engine-js/./src/polyfills.ts","webpack://@voxco/survey-engine-js/./src/containers/App.tsx","webpack://@voxco/survey-engine-js/./src/i18n/index.ts","webpack://@voxco/survey-engine-js/./src/utils/getUrlParameters.ts","webpack://@voxco/survey-engine-js/./src/app.tsx","webpack://@voxco/survey-engine-js/./src/components/SurveyEngine.styles.ts","webpack://@voxco/survey-engine-js/./src/components/SurveyEngine.tsx","webpack://@voxco/survey-engine-js/./src/components/debug/shared/LoadingEllipsis.styles.ts","webpack://@voxco/survey-engine-js/./src/components/debug/shared/LoadingEllipsis.tsx","webpack://@voxco/survey-engine-js/./src/simulator/simulatePages.ts","webpack://@voxco/survey-engine-js/./src/hooks/useSimulatedPages.ts","webpack://@voxco/survey-engine-js/./src/hooks/useScrollToActive.ts","webpack://@voxco/survey-engine-js/./src/components/debug/panels/FlowPanel.styles.ts","webpack://@voxco/survey-engine-js/./src/components/debug/shared/QuestionTypeIcon.tsx","webpack://@voxco/survey-engine-js/./src/components/debug/shared/ActionTypeAction.tsx","webpack://@voxco/survey-engine-js/./src/components/debug/panels/FlowQuestion.tsx","webpack://@voxco/survey-engine-js/./src/components/debug/panels/FlowPage.tsx","webpack://@voxco/survey-engine-js/./src/components/debug/panels/WidgetPanel.styles.ts","webpack://@voxco/survey-engine-js/./src/components/debug/panels/WidgetPanel.tsx","webpack://@voxco/survey-engine-js/./src/components/debug/panels/FlowPanel.tsx","webpack://@voxco/survey-engine-js/./src/components/debug/panels/VariablesPanel.styles.ts","webpack://@voxco/survey-engine-js/./src/components/debug/panels/VariablesPanel.tsx","webpack://@voxco/survey-engine-js/./src/components/debug/panels/GoToQuestionPanel.styles.ts","webpack://@voxco/survey-engine-js/./src/components/debug/panels/GoToQuestionPanel.tsx","webpack://@voxco/survey-engine-js/./src/components/debug/panels/SettingsPanel.styles.ts","webpack://@voxco/survey-engine-js/./src/components/debug/shared/Button.styles.ts","webpack://@voxco/survey-engine-js/./src/components/debug/shared/Button.tsx","webpack://@voxco/survey-engine-js/./src/components/debug/shared/ToggleButton.tsx","webpack://@voxco/survey-engine-js/./src/components/debug/shared/Radio.styles.ts","webpack://@voxco/survey-engine-js/./src/components/debug/shared/Radio.tsx","webpack://@voxco/survey-engine-js/./src/components/debug/shared/DockLeftIcon.tsx","webpack://@voxco/survey-engine-js/./src/components/debug/shared/DockRightIcon.tsx","webpack://@voxco/survey-engine-js/./src/components/debug/shared/FloatingIcon.tsx","webpack://@voxco/survey-engine-js/./src/components/debug/panels/SettingsPanel.tsx","webpack://@voxco/survey-engine-js/./src/components/debug/DockedDebugPanel.styles.ts","webpack://@voxco/survey-engine-js/./src/components/debug/DockedDebugPanel.tsx","webpack://@voxco/survey-engine-js/./src/components/debug/FloatingDebugPanel.styles.ts","webpack://@voxco/survey-engine-js/./src/components/debug/FloatingDebugPanel.tsx","webpack://@voxco/survey-engine-js/./src/hooks/useWindowDimensions.ts","webpack://@voxco/survey-engine-js/./src/components/debug/panels/AccessibilityPanel.styles.ts","webpack://@voxco/survey-engine-js/./src/components/debug/panels/AccessibilityPanel.tsx","webpack://@voxco/survey-engine-js/./src/components/debug/DebugPanel.tsx","webpack://@voxco/survey-engine-js/./src/hooks/useLocalStorage.ts","webpack://@voxco/survey-engine-js/./src/components/shared/Collapsible.tsx","webpack://@voxco/survey-engine-js/./src/components/shared/ErrorLog.tsx","webpack://@voxco/survey-engine-js/./src/components/shared/ErrorRenderer.tsx","webpack://@voxco/survey-engine-js/./src/components/shared/FontAwesome.ts","webpack://@voxco/survey-engine-js/./src/assets/images/iphone-x.png","webpack://@voxco/survey-engine-js/./src/components/shared/MobilePreview.styles.ts","webpack://@voxco/survey-engine-js/./src/components/shared/MobilePreview.tsx","webpack://@voxco/survey-engine-js/./src/consts.ts","webpack://@voxco/survey-engine-js/./src/containers/ErrorLogContainer.tsx","webpack://@voxco/survey-engine-js/./src/models/enums/NavigationType.ts","webpack://@voxco/survey-engine-js/./src/models/enums/QuitButtonAction.ts","webpack://@voxco/survey-engine-js/./src/signals/index.ts","webpack://@voxco/survey-engine-js/./src/models/builders/ValidationBuilder.ts","webpack://@voxco/survey-engine-js/./src/components/shared/SignalListener.ts","webpack://@voxco/survey-engine-js/./src/elimination/Elimination.ts","webpack://@voxco/survey-engine-js/./src/redux/thunks/validation.ts","webpack://@voxco/survey-engine-js/./src/components/controls/BaseControl.tsx","webpack://@voxco/survey-engine-js/./src/components/select/Select.styles.ts","webpack://@voxco/survey-engine-js/./src/containers/shared/RecalledText.tsx","webpack://@voxco/survey-engine-js/./src/components/shared/InputWrapper.styles.ts","webpack://@voxco/survey-engine-js/./src/components/shared/InputWrapper.tsx","webpack://@voxco/survey-engine-js/./src/components/select/AutoComplete.tsx","webpack://@voxco/survey-engine-js/./src/components/controls/AutoCompleteControl.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/BaseRenderer.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/ChoiceListRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/ChoiceListItemRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/containers/controls/ChoiceContainer.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/OpenEndRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/shared/InputBox.styles.ts","webpack://@voxco/survey-engine-js/./src/components/shared/InputBox.tsx","webpack://@voxco/survey-engine-js/./src/utils/WCAGHelper.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/OpenEndRenderer.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/ChoiceOpenEndRenderer.tsx","webpack://@voxco/survey-engine-js/./src/hooks/useQuestion.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/ChoiceLabelRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/ChoiceLabelRenderer.tsx","webpack://@voxco/survey-engine-js/./src/components/shared/ButtonChoice.styles.ts","webpack://@voxco/survey-engine-js/./src/components/shared/RadioIcon.styles.ts","webpack://@voxco/survey-engine-js/./src/components/shared/RadioIcon.tsx","webpack://@voxco/survey-engine-js/./src/components/shared/CheckBoxIcon.styles.ts","webpack://@voxco/survey-engine-js/./src/components/shared/CheckBoxIcon.tsx","webpack://@voxco/survey-engine-js/./src/components/shared/ButtonChoice.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/ChoiceListItemRenderer.tsx","webpack://@voxco/survey-engine-js/./src/models/enums/LabelPosition.ts","webpack://@voxco/survey-engine-js/./src/components/choices/BaseChoice.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/CheckBoxRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/CheckBoxRenderer.tsx","webpack://@voxco/survey-engine-js/./src/components/choices/CheckBox.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/RadioRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/RadioRenderer.tsx","webpack://@voxco/survey-engine-js/./src/components/choices/Radio.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/ImageChoiceRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/ImageChoiceRenderer.tsx","webpack://@voxco/survey-engine-js/./src/components/choices/ImageSelect.tsx","webpack://@voxco/survey-engine-js/./src/components/shared/Button.styles.ts","webpack://@voxco/survey-engine-js/./src/components/shared/Button.tsx","webpack://@voxco/survey-engine-js/./src/hooks/useDimensionContext.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/ChoiceListRenderer.tsx","webpack://@voxco/survey-engine-js/./src/models/enums/CaseMode.ts","webpack://@voxco/survey-engine-js/./src/components/controls/ChoiceListControl.tsx","webpack://@voxco/survey-engine-js/./src/containers/controls/ControlContainer.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/TextAnswerRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/TextAnswerRenderer.tsx","webpack://@voxco/survey-engine-js/./src/components/select/Select.tsx","webpack://@voxco/survey-engine-js/./src/components/controls/TextBoxControl.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/DrillDownRenderer.styles.tsx","webpack://@voxco/survey-engine-js/./src/hooks/useMentions.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/DrillDownRenderer.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/GridCellRenderer.tsx","webpack://@voxco/survey-engine-js/./src/components/controls/DrillDownControl.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/GridCellRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/models/enums/CursorPosition.ts","webpack://@voxco/survey-engine-js/./src/components/controls/DropDownControl.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/SliderRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/SliderRenderer.tsx","webpack://@voxco/survey-engine-js/./src/components/controls/SliderControl.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/StarRatingRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/StarRatingRenderer.tsx","webpack://@voxco/survey-engine-js/./src/components/controls/StarRatingControl.tsx","webpack://@voxco/survey-engine-js/./src/models/factories/gridControlFactory.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/GridRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/GridRenderer.tsx","webpack://@voxco/survey-engine-js/./src/components/controls/GridControl.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/ImageAreaSelectionRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/ImageAreaSelectionRenderer.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/ImageAreaRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/ImageAreaRenderer.tsx","webpack://@voxco/survey-engine-js/./src/components/controls/ImageAreaControl.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/FileUploadRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/FileUploadRenderer.tsx","webpack://@voxco/survey-engine-js/./src/utils/AxiosCancellationTokenSource.ts","webpack://@voxco/survey-engine-js/./src/redux/thunks/file.ts","webpack://@voxco/survey-engine-js/./src/components/controls/FileUploadControl.tsx","webpack://@voxco/survey-engine-js/./src/components/controls/DateTimeControl.tsx","webpack://@voxco/survey-engine-js/./src/components/controls/CardSortControl.styles.ts","webpack://@voxco/survey-engine-js/./src/hooks/useElementDimensions.ts","webpack://@voxco/survey-engine-js/./src/hooks/usePrevious.ts","webpack://@voxco/survey-engine-js/./src/hooks/useQuestionnaire.ts","webpack://@voxco/survey-engine-js/./src/hooks/useValidation.ts","webpack://@voxco/survey-engine-js/./src/components/controls/CardSortControl.tsx","webpack://@voxco/survey-engine-js/./src/components/shared/ScrollableContainer.tsx","webpack://@voxco/survey-engine-js/./src/components/controls/NullControl.tsx","webpack://@voxco/survey-engine-js/./src/components/shared/ScrollableContainer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/table/PaginatedTable.styles.ts","webpack://@voxco/survey-engine-js/./src/components/table/TableFooter.styles.ts","webpack://@voxco/survey-engine-js/./src/components/shared/ButtonGroup.styles.ts","webpack://@voxco/survey-engine-js/./src/components/shared/ButtonGroup.tsx","webpack://@voxco/survey-engine-js/./src/components/table/TablePagination.styles.ts","webpack://@voxco/survey-engine-js/./src/components/table/TablePagination.tsx","webpack://@voxco/survey-engine-js/./src/components/select/TinySelect.styles.ts","webpack://@voxco/survey-engine-js/./src/components/select/TinySelect.tsx","webpack://@voxco/survey-engine-js/./src/components/table/TableFooter.tsx","webpack://@voxco/survey-engine-js/./src/components/shared/ModalDialog.style.tsx","webpack://@voxco/survey-engine-js/./src/components/shared/ModalDialog.tsx","webpack://@voxco/survey-engine-js/./src/components/table/PaginatedTable.tsx","webpack://@voxco/survey-engine-js/./src/components/controls/LookupTableControl.tsx","webpack://@voxco/survey-engine-js/./src/redux/thunks/lookuptable.ts","webpack://@voxco/survey-engine-js/./src/components/shared/ExecutableHtml.tsx","webpack://@voxco/survey-engine-js/./src/components/controls/CustomHtmlControl.tsx","webpack://@voxco/survey-engine-js/./src/components/controls/UndefinedControl.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/NumericRankingRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/NumericRankingRenderer.tsx","webpack://@voxco/survey-engine-js/./src/models/enums/TimerLocation.ts","webpack://@voxco/survey-engine-js/./src/models/enums/TimerType.ts","webpack://@voxco/survey-engine-js/./src/models/enums/TimerAction.ts","webpack://@voxco/survey-engine-js/./src/components/controls/NumericRankingControl.tsx","webpack://@voxco/survey-engine-js/./src/components/controls/RunningTotalControl.tsx","webpack://@voxco/survey-engine-js/./src/components/controls/TimerControl.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/NetPromoterItemRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/NetPromoterItemRenderer.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/NetPromoterRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/shared/ValidationError.styles.ts","webpack://@voxco/survey-engine-js/./src/components/shared/ValidationError.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/QuestionRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/debug/DebugInfo.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/QuestionRenderer.tsx","webpack://@voxco/survey-engine-js/./src/models/enums/NpsFeedbackQuestionSettings.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/NetPromoterRenderer.tsx","webpack://@voxco/survey-engine-js/./src/models/enums/VariableDataType.ts","webpack://@voxco/survey-engine-js/./src/components/controls/NetPromoterControl.tsx","webpack://@voxco/survey-engine-js/./src/components/controls/SignatureControl.styles.ts","webpack://@voxco/survey-engine-js/./src/components/controls/SignatureControl.tsx","webpack://@voxco/survey-engine-js/./src/components/controls/DragDropControl.styles.ts","webpack://@voxco/survey-engine-js/./src/components/controls/DragDropControl.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/TextHighlighterRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/ChoiceListItemTextHighlighterRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/shared/ButtonChoiceTextHighlighter.styles.ts","webpack://@voxco/survey-engine-js/./src/components/shared/ButtonChoiceTextHighlighter.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/ChoiceListItemTextHighlighterRenderer.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/ChoiceListTextHighlighterRenderer.tsx","webpack://@voxco/survey-engine-js/./src/models/VariableToChoiceModel.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/TextHighlighterRenderer.tsx","webpack://@voxco/survey-engine-js/./src/components/controls/TextHighlighterControl.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/HeatMapRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/HeatMapRenderer.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/HeatMapSelectionRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/HeatMapSelectionRenderer.tsx","webpack://@voxco/survey-engine-js/./src/components/controls/HeatMapControl.tsx","webpack://@voxco/survey-engine-js/./src/components/controls/CarrouselControl.styles.ts","webpack://@voxco/survey-engine-js/./src/assets/images/lottie.gif","webpack://@voxco/survey-engine-js/./src/components/controls/CarrouselControl.tsx","webpack://@voxco/survey-engine-js/./src/components/page/Question.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/InputFocusRenderer.tsx","webpack://@voxco/survey-engine-js/./src/containers/page/QuestionListContainer.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/NavigationBarRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/NavigationBarRenderer.tsx","webpack://@voxco/survey-engine-js/./src/hooks/useBlock.ts","webpack://@voxco/survey-engine-js/./src/components/page/Navigation.tsx","webpack://@voxco/survey-engine-js/./src/containers/page/NavigationContainer.tsx","webpack://@voxco/survey-engine-js/./src/components/page/Progress.styles.ts","webpack://@voxco/survey-engine-js/./src/components/page/Progress.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/ValidationSummaryRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/ValidationSummaryRenderer.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/PageRenderer.styles.ts","webpack://@voxco/survey-engine-js/./src/components/page/TopNavigation.styles.ts","webpack://@voxco/survey-engine-js/./src/utils/lang.ts","webpack://@voxco/survey-engine-js/./src/components/page/TopNavigation.tsx","webpack://@voxco/survey-engine-js/./src/components/renderers/v2/PageRenderer.tsx","webpack://@voxco/survey-engine-js/./src/redux/thunks/exitSurvey.ts","webpack://@voxco/survey-engine-js/./src/components/page/Page.tsx","webpack://@voxco/survey-engine-js/./src/containers/page/PageContainer.tsx","webpack://@voxco/survey-engine-js/./src/expressions/EvaluationResult.ts","webpack://@voxco/survey-engine-js/./src/expressions/parser.ts","webpack://@voxco/survey-engine-js/./src/grammar/utils/consts.ts","webpack://@voxco/survey-engine-js/./src/grammar/utils/functions.ts","webpack://@voxco/survey-engine-js/./src/grammar/utils/lexer.ts","webpack://@voxco/survey-engine-js/./src/grammar/utils/symbols.ts","webpack://@voxco/survey-engine-js/./src/hooks/useLanguage.ts","webpack://@voxco/survey-engine-js/./src/redux/thunks/recall.ts","webpack://@voxco/survey-engine-js/./src/hooks/useRecall.ts","webpack://@voxco/survey-engine-js/./src/hooks/useReservedBounds.tsx","webpack://@voxco/survey-engine-js/./src/hooks/useTranslatable.ts","webpack://@voxco/survey-engine-js/./src/models/DynamicCssModel.ts","webpack://@voxco/survey-engine-js/./src/models/SystemVariableModel.ts","webpack://@voxco/survey-engine-js/./src/models/builders/MentionBuilder.ts","webpack://@voxco/survey-engine-js/./src/models/enums/AxisType.ts","webpack://@voxco/survey-engine-js/./src/models/enums/ChoiceListDisplayType.ts","webpack://@voxco/survey-engine-js/./src/models/enums/ColumnType.ts","webpack://@voxco/survey-engine-js/./src/models/enums/DispositionCode.ts","webpack://@voxco/survey-engine-js/./src/models/enums/LogicType.ts","webpack://@voxco/survey-engine-js/./src/models/enums/PropertyType.ts","webpack://@voxco/survey-engine-js/./src/models/enums/QuestionActionType.ts","webpack://@voxco/survey-engine-js/./src/models/enums/QuestionType.ts","webpack://@voxco/survey-engine-js/./src/models/enums/QuotaStatus.ts","webpack://@voxco/survey-engine-js/./src/models/enums/RandomizationPattern.ts","webpack://@voxco/survey-engine-js/./src/models/enums/RowType.ts","webpack://@voxco/survey-engine-js/./src/models/enums/ShortcutExitToType.ts","webpack://@voxco/survey-engine-js/./src/models/enums/SoftPromptChoiceType.ts","webpack://@voxco/survey-engine-js/./src/models/enums/SurveyMode.ts","webpack://@voxco/survey-engine-js/./src/models/enums/SurveyQuestionnaireModality.ts","webpack://@voxco/survey-engine-js/./src/models/enums/TerminationAction.ts","webpack://@voxco/survey-engine-js/./src/models/enums/VariableType.ts","webpack://@voxco/survey-engine-js/./src/models/factories/elementFactory.ts","webpack://@voxco/survey-engine-js/./src/models/factories/logicFactory.ts","webpack://@voxco/survey-engine-js/./src/models/enums/OperatorType.ts","webpack://@voxco/survey-engine-js/./src/models/factories/lookupTableFilterFactory.ts","webpack://@voxco/survey-engine-js/./src/models/factories/questionFactory.ts","webpack://@voxco/survey-engine-js/./src/models/factories/questionnaireFactory.ts","webpack://@voxco/survey-engine-js/./src/models/factories/randomizationFactory.ts","webpack://@voxco/survey-engine-js/./src/models/factories/respondentFactory.ts","webpack://@voxco/survey-engine-js/./src/models/utilities/actionUtilities.ts","webpack://@voxco/survey-engine-js/./src/models/utilities/blockUtilities.ts","webpack://@voxco/survey-engine-js/./src/models/utilities/choiceUtilities.ts","webpack://@voxco/survey-engine-js/./src/models/utilities/gridUtilities.ts","webpack://@voxco/survey-engine-js/./src/models/utilities/propertyUtilities.ts","webpack://@voxco/survey-engine-js/./src/models/utilities/questionUtilities.ts","webpack://@voxco/survey-engine-js/./src/models/enums/AutoAdvanceMode.ts","webpack://@voxco/survey-engine-js/./src/models/utilities/questionnaireUtilities.ts","webpack://@voxco/survey-engine-js/./src/models/utilities/respondentUtilities.ts","webpack://@voxco/survey-engine-js/./src/models/utilities/settingUtilities.ts","webpack://@voxco/survey-engine-js/./src/models/utilities/translationUtilities.ts","webpack://@voxco/survey-engine-js/./src/models/utilities/validationUtilities.ts","webpack://@voxco/survey-engine-js/./src/models/utilities/variableUtilities.ts","webpack://@voxco/survey-engine-js/./src/piping/RecallType.ts","webpack://@voxco/survey-engine-js/./src/piping/RecalledValue.ts","webpack://@voxco/survey-engine-js/./src/piping/ChoiceRecalledValue.ts","webpack://@voxco/survey-engine-js/./src/piping/AnswerRecalledValue.ts","webpack://@voxco/survey-engine-js/./src/piping/SystemRecalledValue.ts","webpack://@voxco/survey-engine-js/./src/piping/DateRecalledValue.ts","webpack://@voxco/survey-engine-js/./src/piping/TimeRecalledValue.ts","webpack://@voxco/survey-engine-js/./src/piping/TimeSpanRecalledValue.ts","webpack://@voxco/survey-engine-js/./src/piping/DateTimeRecalledValue.ts","webpack://@voxco/survey-engine-js/./src/piping/DayRecalledValue.ts","webpack://@voxco/survey-engine-js/./src/piping/index.ts","webpack://@voxco/survey-engine-js/./src/public/index.ts","webpack://@voxco/survey-engine-js/./src/randomization/Randomization.ts","webpack://@voxco/survey-engine-js/./src/randomization/Randomizer.ts","webpack://@voxco/survey-engine-js/./src/redux/actions/index.ts","webpack://@voxco/survey-engine-js/./src/models/factories/quotaFactory.ts","webpack://@voxco/survey-engine-js/./src/models/enums/QuotaMetOrCloseAction.ts","webpack://@voxco/survey-engine-js/./src/utils/Raygun.ts","webpack://@voxco/survey-engine-js/./src/redux/middleware/apiConnector.ts","webpack://@voxco/survey-engine-js/./src/models/factories/dispositionCodeFactory.ts","webpack://@voxco/survey-engine-js/./src/models/enums/ValueType.ts","webpack://@voxco/survey-engine-js/./src/redux/middleware/flowController.ts","webpack://@voxco/survey-engine-js/./src/logic/questionLogic.ts","webpack://@voxco/survey-engine-js/./src/models/enums/RecallMode.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/connectionReducer.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/interview/variablesSliceReducer.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/carrouselReducer.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/interview/navigationReducer.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/interview/interviewReducer.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/interview/questionnaireSliceReducer.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/interview/respondentSliceReducer.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/interview/deviceSliceReducer.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/interview/validationSliceReducer.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/interview/languageSliceReducer.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/interview/themeSliceReducer.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/applicationReducer.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/errorsReducer.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/lookupTableReducer.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/recallModeReducer.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/mobilePreviewReducer.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/filesReducer.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/defaultFocusStatusReducer.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/index.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/interview/navigationUtilities.ts","webpack://@voxco/survey-engine-js/./src/models/utilities/pageUtilities.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/interview/quotasReducer.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/interview/variablesUtilities.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/questionFieldStatusReducer.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/utilities.ts","webpack://@voxco/survey-engine-js/./src/redux/reducers/recallReducer.ts","webpack://@voxco/survey-engine-js/./src/redux/selectors/interview/navigation.ts","webpack://@voxco/survey-engine-js/./src/redux/selectors/mentions.ts","webpack://@voxco/survey-engine-js/./src/redux/middleware/debugLogger.ts","webpack://@voxco/survey-engine-js/./src/redux/store.ts","webpack://@voxco/survey-engine-js/./src/redux/middleware/publicConnector.ts","webpack://@voxco/survey-engine-js/./src/redux/middleware/flowLogger.ts","webpack://@voxco/survey-engine-js/./src/redux/thunks/evaluator.ts","webpack://@voxco/survey-engine-js/./src/redux/thunks/index.ts","webpack://@voxco/survey-engine-js/./src/theme/DefaultTheme.ts","webpack://@voxco/survey-engine-js/./src/theme/Mixins.ts","webpack://@voxco/survey-engine-js/./src/utils/Number.ts","webpack://@voxco/survey-engine-js/./src/utils/dynamic-css/grid/tableRow.ts","webpack://@voxco/survey-engine-js/./src/utils/dynamic-css/grid/tableHeader.ts","webpack://@voxco/survey-engine-js/./src/utils/dynamic-css/grid/gridCore.ts","webpack://@voxco/survey-engine-js/./src/utils/dynamic-css/coreDynamicCss.ts","webpack://@voxco/survey-engine-js/./src/utils/index.tsx","webpack://@voxco/survey-engine-js/./src/utils/lodash.ts","webpack://@voxco/survey-engine-js/./src/utils/logging.ts","webpack://@voxco/survey-engine-js/./src/utils/tz.ts","webpack://@voxco/survey-engine-js/./src/utils/time.ts","webpack://@voxco/survey-engine-js/./src/utils/voxcoAgentHelper.ts","webpack://@voxco/survey-engine-js/./src/validation/rules/softPrompt.ts","webpack://@voxco/survey-engine-js/./src/validation/rules/answerRequired.ts","webpack://@voxco/survey-engine-js/./src/validation/rules/maxMentions.ts","webpack://@voxco/survey-engine-js/./src/validation/rules/openEndRequired.ts","webpack://@voxco/survey-engine-js/./src/validation/rules/openEndMinimumLength.ts","webpack://@voxco/survey-engine-js/./src/validation/rules/openEndMaximumLength.ts","webpack://@voxco/survey-engine-js/./src/validation/rules/validNumber.ts","webpack://@voxco/survey-engine-js/./src/validation/rules/numberOfDecimals.ts","webpack://@voxco/survey-engine-js/./src/validation/rules/minValue.ts","webpack://@voxco/survey-engine-js/./src/validation/rules/maxValue.ts","webpack://@voxco/survey-engine-js/./src/validation/rules/bounds.ts","webpack://@voxco/survey-engine-js/./src/validation/validators.ts"],"sourcesContent":["/* eslint-disable */\r\n!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=e||self).mobiscroll=t()}(this,function(){\"use strict\";var e,t,a,n,y=y||{},s={},ie={},i=[],r=\"undefined\"!=typeof window,g=r&&window.matchMedia&&window.matchMedia(\"(prefers-color-scheme:dark)\").matches,o=r?navigator.userAgent:\"\",l=r?navigator.platform:\"\",c=r?navigator.maxTouchPoints:0,d=/Safari/.test(o),u=o.match(/Android|iPhone|iPad|iPod|Windows Phone|Windows|MSIE/i),me=r&&window.requestAnimationFrame||function(e){return setTimeout(e,20)},he=r&&window.cancelAnimationFrame||function(e){clearTimeout(e)};function m(e){var t;for(t in e)if(void 0!==x[e[t]])return!0;return!1}function Te(e,t){if(\"touchstart\"==e.type)t.__mbscTouched=1;else if(t.__mbscTouched)return delete t.__mbscTouched,!1;return!0}function xe(e,t){for(var a,n,s=[\"t\",\"webkitT\",\"MozT\",\"OT\",\"msT\"],i=getComputedStyle(e[0]),r=0;!a&&r\")){var l=\"div\";for(0===i.indexOf(\":~]/)?(a instanceof O&&(a=a[0]),(a||document).querySelectorAll(t)):[document.getElementById(t.split(\"#\")[1])],o=0;os||Math.abs(Se(e,\"Y\")-o)>s)&&(c=!0)}function T(e){l&&(i&&new Date-d<100||!c?function(e,t){if(!t.mbscClick){var a=(e.originalEvent||e).changedTouches[0],n=document.createEvent(\"MouseEvents\");n.initMouseEvent(\"click\",!0,!0,window,1,a.screenX,a.screenY,a.clientX,a.clientY,!1,!1,!1,!1,0,null),n.isMbscTap=!0,n.isIonicTap=!0,V=!0,t.mbscChange=!0,t.mbscClick=!0,t.dispatchEvent(n),V=!1,ot(),setTimeout(function(){delete t.mbscClick})}}(e,e.target):ot(),l=!1)}function x(e){n&&e.preventDefault(),t.call(this,e,a)}function f(){l=!1}s=s||9,u.each(function(e,t){a.settings.tap&&(it(t,\"touchstart\",m,{passive:!0}),it(t,\"touchcancel\",f),it(t,\"touchmove\",h,{passive:!0}),it(t,\"touchend\",T)),it(t,\"click\",x),t.__mbscOff=function(){fe(t,\"touchstart\",m,{passive:!0}),fe(t,\"touchcancel\",f),fe(t,\"touchmove\",h,{passive:!0}),fe(t,\"touchend\",T),fe(t,\"click\",x),delete t.__mbscOff}})}function ne(e){e&&e[0]&&e[0].__mbscOff&&e[0].__mbscOff()}function I(e){if(z&&!V&&!e.isMbscTap&&(\"TEXTAREA\"!=e.target.nodeName||\"mousedown\"!=e.type))return e.stopPropagation(),e.preventDefault(),!1}function lt(e){return e[0].innerWidth||e.innerWidth()}r&&([\"mouseover\",\"mousedown\",\"mouseup\",\"click\"].forEach(function(e){document.addEventListener(e,I,!0)}),\"android\"==e&&a<5&&document.addEventListener(\"change\",function(e){z&&\"checkbox\"==e.target.type&&!e.target.mbscChange&&(e.stopPropagation(),e.preventDefault()),delete e.target.mbscChange},!0)),y.uid=\"03c2a902\";var J,ct=y.$,W=+new Date,R={},$={},B={},K={xsmall:0,small:576,medium:768,large:992,xlarge:1200},dt=ct.extend;dt(s,{getCoord:Se,preventClick:ot,vibrate:function(e){\"vibrate\"in navigator&&navigator.vibrate(e||50)}}),J=dt(y,{$:ct,version:\"4.10.9\",autoTheme:\"mobiscroll\",themes:{form:{},page:{},frame:{},scroller:{},listview:{},navigation:{},progress:{},card:{}},platform:{name:e,majorVersion:a,minorVersion:n},i18n:{},instances:R,classes:$,util:s,settings:{},setDefaults:function(e){dt(this.settings,e)},customTheme:function(e,t){var a,n=y.themes,s=[\"frame\",\"scroller\",\"listview\",\"navigation\",\"form\",\"page\",\"progress\",\"card\"];for(a=0;a=(t.breakpoint||K[e])&&(n=t)})),n}v.settings={},v.element=o,v._init=rt,v._destroy=rt,v._processSettings=rt,v._checkResp=function(e){if(v&&v._responsive){var t=b(e);if(m!==t)return m=t,v.init({}),!0}},v._getRespCont=function(){return ct(\"body\"==h.context?window:h.context)},v.init=function(e,t){var a,n,s,i,r;for(a in e&&v.getVal&&(n=v.getVal()),v.settings)delete v.settings[a];h=v.settings,dt(l,e),v._hasDef&&(p=J.settings),dt(h,v._defaults,p,l),c=v._getRespCont(),v._responsive&&(m=m||b(),dt(h,m)),v._hasTheme&&(i=(s=h).theme,r=s.themeVariant,\"auto\"!=i&&i||(i=J.autoTheme),\"default\"==i&&(i=\"mobiscroll\"),(\"dark\"===r||g&&\"auto\"===r)&&J.themes.form[i+\"-dark\"]?i+=\"-dark\":\"light\"===r&&/.+-dark$/.test(i)&&(i=i.replace(/-dark$/,\"\")),x=i,l.theme=x,T=J.themes[v._class]?J.themes[v._class][x]:{}),v._hasLang&&(d=J.i18n[h.lang]),dt(h,T,d,p,l,m),v._processSettings(m||{}),v._presets&&(u=v._presets[h.preset])&&(u=u.call(o,v,l,m),dt(h,u,l,m)),v._init(e),e&&v.setVal&&v.setVal(void 0===t?n:t,!0),f(\"onInit\")},v.destroy=function(){v&&(v._destroy(),f(\"onDestroy\"),delete R[o.id],v=null)},v.tap=function(e,t,a,n,s){Y(v,e,t,a,n,s)},v.trigger=function(e,t){var a,n,s,i=[p,T,u,l];for(n=0;n<4;n++)(s=i[n])&&s[e]&&(a=s[e].call(o,t||{},v));return a},v.option=function(e,t,a){var n={},s=[\"data\",\"invalid\",\"valid\",\"readonly\"];/calendar|eventcalendar|range/.test(h.preset)&&s.push(\"marked\",\"labels\",\"colors\"),\"object\"==typeof e?n=e:n[e]=t,s.forEach(function(e){l[e]=h[e]}),v.init(n,a)},v.getInst=function(){return v},l=l||{},f=v.trigger,v.__ready||(ct(o).addClass(\"mbsc-comp\"),o.id?R[o.id]&&R[o.id].destroy():o.id=\"mobiscroll\"+ ++W,(R[o.id]=v).__ready=!0)}function ut(e,t,a,n,s,i,r){var o=new Date(e,t,a,n||0,s||0,i||0,r||0);return 23==o.getHours()&&0===(n||0)&&o.setHours(o.getHours()+2),o}function oe(a,e,t){if(!e)return null;function s(e){for(var t=0;r+1
',De=0;function ke(e){e.preventDefault()}function X(a,n,e){var D,d,u,k,w,_,N,C,E,A,s,H,F,P,O,L,m,V,z,Y,I,h,j,J,W,t,T,R,$,B,K,G,U,Z=this,q=ct(a),i=[],r=new Date;function X(e){R.stopProp&&e.stopPropagation();var t=function(e,t,a){for(;t;){if(S(t,a))return t;t=t!==e?t.parentNode:null}return null}(this,e.target,\".mbsc-fr-btn-e\");t&&(s&&s.removeClass(\"mbsc-active\"),(s=ct(t)).hasClass(\"mbsc-disabled\")||s.hasClass(\"mbsc-fr-btn-nhl\")||s.addClass(\"mbsc-active\"),\"mousedown\"===e.type&&ct(document).on(\"mouseup\",Q))}function Q(e){s&&(s.removeClass(\"mbsc-active\"),s=null),\"mouseup\"===e.type&&ct(document).off(\"mouseup\",Q)}function x(e){$&&V.contains(e.target)&&e.preventDefault()}function f(e){y.activeInstance==Z&&(13!=e.keyCode||ct(e.target).is('textarea,button,input[type=\"button\"],input[type=\"submit\"]')&&!e.shiftKey?27==e.keyCode&&Z.cancel():Z.select())}function ee(e){e||Ee||!Z._activeElm||(r=new Date,Z._activeElm.focus())}function o(e){var t=_e,a=R.focusOnClose;Z._markupRemove(),k.remove(),O&&(H.mbscModals--,R.scrollLock&&H.mbscLock--,H.mbscLock||u.removeClass(\"mbsc-fr-lock\"),h&&(H.mbscIOSLock--,H.mbscIOSLock||(u.removeClass(\"mbsc-fr-lock-ios\"),D.css({top:\"\",left:\"\"}),C.scrollLeft(H.mbscScrollLeft),C.scrollTop(H.mbscScrollTop))),H.mbscModals||u.removeClass(\"mbsc-fr-lock-ctx\"),H.mbscModals&&!T||e||(t=t||q,setTimeout(function(){void 0===a||!0===a?(Ne=!0,t[0].focus()):a&&ct(a)[0].focus()},200))),T=void 0,L=!1,K(\"onHide\")}function te(){clearTimeout(t),t=setTimeout(function(){Z.position(!0)&&(W.style.visibility=\"hidden\",W.offsetHeight,W.style.visibility=\"\")},200)}function p(e){y.activeInstance==Z&&e.target.nodeType&&!J.contains(e.target)&&100=t.length)break;s=t[n++]}else{if((n=t.next()).done)break;s=n.value}s.target.__mbscResize()}}),De++,c.__mbscResize=d,se.observe(c)):((T=document.createElement(\"div\")).innerHTML=we,T.dir=\"ltr\",p=T.childNodes[1],m=T.childNodes[0],h=m.childNodes[0],c.appendChild(T),m.addEventListener(\"scroll\",S),p.addEventListener(\"scroll\",S),u?u.runOutsideAngular(function(){me(y)}):me(y)),j={detach:function(){se?(De--,se.unobserve(c),De||(se=null)):(c.removeChild(T),v=!0)}}),O&&(k.removeClass(\"mbsc-fr-pos\"),F&&!e?k.addClass(\"mbsc-anim-in mbsc-anim-trans mbsc-anim-trans-\"+F).on(ae,function e(){k.off(ae,e).removeClass(\"mbsc-anim-in mbsc-anim-trans mbsc-anim-trans-\"+F).find(\".mbsc-fr-popup\").removeClass(\"mbsc-anim-\"+F),ee(t)}).find(\".mbsc-fr-popup\").addClass(\"mbsc-anim-\"+F):ee(t)),K(\"onShow\",{target:V,valueText:Z._tempValue})}function g(){h.style.width=\"100000px\",h.style.height=\"100000px\",m.scrollLeft=1e5,m.scrollTop=1e5,p.scrollLeft=1e5,p.scrollTop=1e5}function y(){var e=new Date;x=0,v||(200'+(O?'
'+(R.showOverlay?'
':\"\")+'
':\"\")+'
'+(\"bubble\"===R.display?'
':\"\")+(O?'
':\"\")+'
'+(R.headerText?'
'+(ge(R.headerText)?R.headerText:\"\")+\"
\":\"\")+'
',n+=Z._generateContent(),n+=\"
\",a){var r,o,l,c=A.length;for(n+='
',o=0;o
'+(r.text||\"\")+\"
\";n+=\"
\"}k=ct(n+=\"
\"+(O?\"\":\"\")),_=ct(\".mbsc-fr-persp\",k),w=ct(\".mbsc-fr-scroll\",k),E=ct(\".mbsc-fr-w\",k),N=ct(\".mbsc-fr-popup\",k),d=ct(\".mbsc-fr-hdr\",k),V=k[0],J=w[0],W=N[0],Z._activeElm=ct(\".mbsc-fr-focus\",k)[0],Z._markup=k,Z._isVisible=!0,Z.markup=V,Z._markupReady(k),K(\"onMarkupReady\",{target:V}),O&&(ct(window).on(\"keydown\",f),R.scrollLock&&(it(document,\"touchmove\",x,{passive:!1}),it(document,\"mousewheel\",x,{passive:!1}),it(document,\"wheel\",x,{passive:!1})),R.focusTrap&&C.on(\"focusin\",p)),O?setTimeout(function(){v(e,t)},h?100:0):v(e,t)}},Z.hide=function(t,e,a,n){if(!Z._isVisible||!a&&!Z._isValid&&\"set\"==e||!a&&!1===K(\"onBeforeClose\",{valueText:Z._tempValue,button:e}))return!1;Z._isVisible=!1,j&&(j.detach(),j=null),O&&(ct(document.activeElement).is(\"input,textarea\")&&W.contains(document.activeElement)&&document.activeElement.blur(),y.activeInstance==Z&&(y.activeInstance=T),ct(window).off(\"keydown\",f),C.off(\"focusin\",p),fe(document,\"touchmove\",x,{passive:!1}),fe(document,\"mousewheel\",x,{passive:!1}),fe(document,\"wheel\",x,{passive:!1})),k&&(O&&L&&F&&!t?k.addClass(\"mbsc-anim-out mbsc-anim-trans mbsc-anim-trans-\"+F).on(ae,function e(){k.off(ae,e),o(t)}).find(\".mbsc-fr-popup\").addClass(\"mbsc-anim-\"+F):o(t),Z._detachEvents(k)),n&&n(),q.trigger(\"blur\"),K(\"onClose\",{valueText:Z._value})},Z.isVisible=function(){return Z._isVisible},Z.setVal=rt,Z.getVal=rt,Z._generateContent=rt,Z._attachEvents=rt,Z._detachEvents=rt,Z._readValue=rt,Z._clearValue=rt,Z._fillValue=rt,Z._markupReady=rt,Z._markupInserted=rt,Z._markupRemove=rt,Z._position=rt,Z.__processSettings=rt,Z.__init=rt,Z.__destroy=rt,Z._destroy=function(){Z.hide(!0,!1,!0),q.off(\".mbsc\"),ne(q),ct.each(i,function(e,t){t.el.off(\".mbsc\").prop(\"readonly\",t.readOnly),ne(t.el),t.lbl&&(t.lbl.off(\".mbsc\"),ne(t.lbl))}),Z.__destroy()},Z._updateHeader=function(){var e=R.headerText,t=e?\"function\"==typeof e?e.call(a,Z._tempValue):e.replace(/\\{value\\}/i,Z._tempValue):\"\";d.html(t||\" \")},Z._getRespCont=function(){return P=\"body\"!=R.context,C=ct(P?R.context:window),\"inline\"==R.display?q.is(\"div\")?q:q.parent():C},Z._processSettings=function(e){var t,a;for(Z.__processSettings(e),(m=!R.touchUi)&&(R.display=e.display||n.display||\"bubble\",R.buttons=e.buttons||n.buttons||[],R.showOverlay=e.showOverlay||n.showOverlay||!1),R.buttons=R.buttons||(\"inline\"!==R.display?[\"cancel\",\"set\"]:[]),R.headerText=void 0===R.headerText?\"inline\"!==R.display&&\"{value}\":R.headerText,A=R.buttons||[],O=\"inline\"!==R.display,D=ct(R.context),u=P?D:ct(\"body,html\"),H=D[0],Z.live=!0,a=0;aq.thresholdY||Math.abs(o)>q.thresholdX)&&(clearTimeout(r),n.removeClass(\"mbsc-active\"),p=!1),(G.scrolled||!w&&Math.abs(d)>R)&&(A||$(\"onGestureStart\",f),G.scrolled=A=!0,k||(k=!0,D=me(te))),B||q.scrollLock?e.preventDefault():G.scrolled?e.preventDefault():7=L[t].breakpoint){Z=2,n=L[U=t].snap2;break}}else if(0<=e)for(t=0;t=e.min&&t<=e.max)return e._array?e.circular?ct(a).get(t%e._length):a[t]:ct.isFunction(a)?a(t,N):\"\"}function A(e){return ct.isPlainObject(e)?void 0!==e.value?e.value:e.display:e}function H(e,t){return A(E(e,t))}function F(e,t,a){var n=D[e];Y(n,e,n._index+t,S.delay+100,1==t?1:2,!1,!1,\"keydown\"==a.type)}function P(e){return ct.isArray(S.readonly)?S.readonly[e]:S.readonly}function O(e,t,a){var n=dt(D[t]||{},e),s=n._index-n._batch;return n.data=n.data||[],n.key=void 0!==n.key?n.key:t,n.label=void 0!==n.label?n.label:t,n._map={},n._array=ct.isArray(n.data),n._array&&(n._length=n.data.length,ct.each(n.data,function(e,t){n._map[A(t)]=e})),n.circular=void 0===S.circular?void 0===n.circular?n._array&&n._length>S.rows:n.circular:ct.isArray(S.circular)?S.circular[t]:S.circular,n.min=n._array?n.circular?-1/0:0:void 0===n.min?-1/0:n.min,n.max=n._array?n.circular?1/0:n._length-1:void 0===n.max?1/0:n.max,n._nr=t,n._index=C(n,g[t]),n._disabled={},n._batch=0,n._current=n._index,n._first=n._index-k,n._last=n._index+k,n._offset=n._first,a?(n._offset-=n._margin/y+(n._index-s),n._margin+=(n._index-s)*y):n._margin=0,n._refresh=function(e){dt(n._scroller.settings,{minScroll:c(n),maxScroll:T(n)}),n._scroller.refresh(e)},r[n.key]=n}function L(e,t,a,n,s){var i,r,o,l,c,d,u,m,h,T,x=\"\",f=N._tempSelected[t],p=e._disabled||{};for(i=a;i<=n;i++)o=E(e,i),h=o,c=void 0===(T=ct.isPlainObject(h)?h.display:h)?\"\":T,l=A(o),r=o&&void 0!==o.cssClass?o.cssClass:\"\",d=o&&void 0!==o.label?o.label:\"\",u=o&&o.invalid,m=void 0!==l&&l==g[t]&&!e.multiple,x+='
'+(1':\"\")+c+(1\":\"\")+\"
\";return x}function V(e,t,a,n){var s,i=D[e],r=n||i._disabled,o=C(i,t),l=H(i,o),c=l,d=l,u=0,m=0;if(!0===r[l]){for(s=0;o-u>=i.min&&r[c]&&s<100;)s++,c=H(i,o-++u);for(s=0;o+m2*k+1&&(d=l+(2*k+1)*(0',c=0;return ct.each(S.wheels,function(e,t){r+='
'+l+'
\",ct.each(t,function(e,t){N._tempSelected[c]=dt({},N._selected[c]);var a=O(t,c),n=!h||S.rows%2?u/2:0;D[c]=a,i+=S.maxWidth?S.maxWidth[c]||S.maxWidth:S.width?S.width[c]||S.width:0,s=void 0!==a.label?a.label:e,r+='
'+(h?'
':\"\")+'
'+l+'
'+(d?'
':\"\")+'
'+s+'
',r+=L(a,c,a._first,a._last)+\"
\",f&&(r+='
',r+=L(a,c,a._first+k-m+1,a._last-k+m,!0),r+=\"
\"),r+=\"
\",c++}),r+=\"
\"}),i&&(S.maxPopupWidth=i),r},N._attachEvents=function(e){s=bt(ct(\".mbsc-sc-btn\",e),F,S.delay,P,!0),ct(\".mbsc-sc-whl\",e).on(\"keydown\",n).on(\"keyup\",i)},N._detachEvents=function(){s&&s.stop();for(var e=0;e'+P.monthNames[s]+\"\"):o.replace(/M/,''+P.monthNamesShort[s]+\"\")});d.push({cssClass:\"mbsc-dt-whl-m\",label:P.monthText,data:r})}else if(/d/i.test(a)&&void 0===D.d){for(D.d=l,r=[],l++,s=1;s<32;s++)r.push({value:s,display:(/dd/i.test(E)?re(s):s)+(P.daySuffix||\"\")});d.push({cssClass:\"mbsc-dt-whl-d\",label:P.dayText,data:r})}c.push(d)}if(/time/i.test(k)){for(t=C.split(/\\|/.test(C)?\"|\":\"\"),n=0;n'+P.dayNames[n]+\"\"):a.replace(/D/,''+P.dayNamesShort[n]+\"\")});v._tempWheelArray[D.d]=d[D.d],v.changeWheel(m)}return{disabled:u,valid:d}}}}var ze={separator:\" \",dateFormat:\"mm/dd/yy\",dateDisplay:\"MMddyy\",timeFormat:\"h:ii A\",dayText:\"Day\",monthText:\"Month\",yearText:\"Year\",hourText:\"Hours\",minuteText:\"Minutes\",ampmText:\" \",secText:\"Seconds\",nowText:\"Now\",todayText:\"Today\"},Ye=0;s.getJson=function(e,t,a){var n,s,i,r,o,l,c;\"jsonp\"==a?(r=e,o=t,l=document.createElement(\"script\"),c=\"mbscjsonp\"+ ++Ye,window[c]=function(e){l.parentNode.removeChild(l),delete window[c],e&&o(e)},l.src=r+(0<=r.indexOf(\"?\")?\"&\":\"?\")+\"callback=\"+c,document.body.appendChild(l)):(n=e,s=t,(i=new XMLHttpRequest).open(\"GET\",n,!0),i.onload=function(){200<=this.status&&this.status<400&&s(JSON.parse(this.response))},i.onerror=function(){},i.send())};function Ie(N){var x,f,p,s,i,v,c,r,l,e,C,b,g,o,y,S,a,E,d,M,w,A,D,k,H,_,F,u,P,O,L,V,m,h,z,T,Y,I,j,J,W,R,$,B,K,G,U,Z,q,X,Q,ee,te,ae,ne,se,ie,re,oe,le,ce,de,ue,me,he,Te,xe,fe,pe,ve,be,ge,ye,Se,t,n,Me,we=1,De=this;function ke(e){e.hasClass(\"mbsc-cal-h\")||e.addClass(\"mbsc-cal-h\")}function _e(e){var t;e.hasClass(\"mbsc-cal-h\")?(t=e).hasClass(\"mbsc-cal-h\")&&t.removeClass(\"mbsc-cal-h\"):ke(e)}function Ne(e,t,a){e[t]=e[t]||[],e[t].push(a)}function Ce(e,o,l){var c,d,u,m,h,T,x,f=de.getDate,p=de.getYear,v=de.getMonth,b=de.getDay,g=de.getMaxDayOfMonth,y=p(o),S=v(o),M={};return e&&ct.each(e,function(e,t){if(c=t.d||t.start||t,d=c+\"\",t.start&&t.end)for(x=ht(xt(t.start,k,de)),T=ht(xt(t.end,k,de));x<=T;)Ne(M,x,t),x=f(p(x),v(x),b(x)+1);else if(vt.test(d))for(x=Ze(o,!1,+d.replace(\"w\",\"\"));x<=l;)Ne(M,x,t),x=f(p(x),v(x),b(x)+7);else if(pt.test(d)){var a=!!(d=d.split(\"/\"))[1],n=a?1:0,s=a?0:1,i=a?d[0]-1:S,r=a?+d[1]:+d[0];for(h=g(y,i),x=f(y,i,Math.min(r,h));x<=l;)u=p(x),m=v(x),b(x)===r&&Ne(M,x,t),h=g(u+n,m+s),x=f(u+n,m+s,Math.min(r,h))}else Ne(M,ht(xt(c,k,de)),t)}),M}function Ee(e){var t,a,n,s,i=!!W[e]&&W[e],r=!!R[e]&&R[e],o=r&&r[0].background?r[0].background:i&&i[0].background,l=\"\";if(r)for(t=0;t\";n+=\"\"}return s={marked:i,background:o,cssClass:l,markup:w[e]?w[e].join(\"\"):u?n:\"\"},dt(s,N._getDayProps(e,s))}function Ae(e){return' style=\"'+(j?\"transform: translateY(\"+100*e+\"%)\":\"left:\"+100*e*ce+\"%\")+'\"'}function He(e){return qe(e,re-1)>$&&(e=qe($,1-re)),e\"+r+\"\").text()+'\"'+(s?' style=\"background:'+s+(a&&i?\";color:\"+i:\"\")+';\"':\"\")+\">\"+(a?r:\"\")+\"\"}function Pe(e){var t=Ze(qe(e,-oe-ie),!1),a=Ze(qe(e,-oe+re+ie-1),!1);a=de.getDate(de.getYear(a),de.getMonth(a),de.getDay(a)+7*C),N._onGenMonth(t,a),V=Ce(de.invalid,t,a),Te=Ce(de.valid,t,a),W=Ce(de.labels||de.events||de.marked,t,a),R=Ce(de.colors,t,a),J=N._labels||W||R,(F=de.labels||N._labels)&&function(){w={};for(var v={},b=t,e=function(){b.getDay()==H&&(v={});for(var e=K,t=(J[b]||[]).slice(0).sort(de.eventOrder),a=t.length,n=[],s=void 0,i=void 0,r=0,o=0,l=0,c=void 0;r'+u+\"\"),s&&(v[r]=null,s._days.forEach(function(e){w[e][r]='
'+de.moreEventsText.replace(/{count}/,1)+\"
\"})),o++,r++}else if(s)i==l&&l++,ft(b,xt(s.end))&&(v[r]=null),n.push(Fe(s,i)),r++,o++,s._days.push(b);else if(l'+Fe(m,l,!0)+\"\"+Fe(m,l):Fe(m,l,!0)),r++,o++),l++}else n.push('
'),r++;w[b]=n,b=de.getDate(de.getYear(b),de.getMonth(b),de.getDay(b)+1)};b
';for(a=0;a<12;a++)a&&a%3==0&&(s+='
'),s+='
'+n+Se+\"
\",n++;return s+=\"
\"}function Ye(e,t){var a,n,s,i,r,o,l,c,d,u,m,h,T,x,f,p,v,b,g=1,y=de.getYear(e),S=de.getMonth(e),M=de.getDay(e),w=null!==de.defaultValue||N._hasValue?N.getDate(!0):null,D=de.getDate(y,S,M).getDay(),k=0
';for(v=0;v<7*C;v++)p=v+H-k,i=(n=de.getDate(y,S,p-D+M)).getFullYear(),r=n.getMonth(),o=n.getDate(),l=de.getMonth(n),c=de.getDay(n),f=de.getMaxDayOfMonth(i,r),d=i+\"-\"+(r+1)+\"-\"+o,a=\"none\"!==(u=dt({valid:!((b=n)
'),pe&&v%7==0&&(\"month\"==pe&&x&&1'+g+\"
\",g++),_+='
\"+c+\"
\"+(u.markup?'
'+u.markup+\"
\":\"\")+\"
\";return _+=\"
\"}function Ie(e,t,a){var n,s=de.getYear(e),i=de.getMonth(e),r=D?D.pos:0,o=\"\";if(A={},C)for(t||(he(\"onMonthLoading\",{year:s,month:i}),he(\"onPageLoading\",{firstDay:e})),Pe(e),n=0;n=qe(M,re-oe))&&(s=T?de.getMonth(i)-de.getMonth(M)+12*(de.getYear(i)-de.getYear(M)):Math.floor(mt(M,i)/(7*C)))&&(D.queue=[],D.focus=n&&a,Qe(D,s,a)),s&&a||je(e,n),t||(r=e,o=D&&D.$scroller,de.highlight&&D&&(ct(\".mbsc-selected\",o).removeClass(E).removeAttr(\"aria-selected\"),null===de.defaultValue&&!N._hasValue||ct('.mbsc-cal-day[data-full=\"'+Tt(r)+'\"]',o).addClass(E).attr(\"aria-selected\",\"true\"))),T||s||Re(M,!0),l=e,ne=!0),N._onSetDate(e,s),N._isSetDate=!1))}function Re(e,t){var a,n,s,i,r=de.getYear(e),o=de.getMonth(e),l=r+Se;if(O){if(Je(o,ae.$scroller),Je(r,ye.$scroller),Qe(ye,Math.floor(r/12)-Math.floor(de.getYear(ye.first)/12),!0),ct(\".mbsc-cal-cell\",ae.$scroller).removeClass(\"mbsc-disabled\"),r===Q)for(a=0;a$),$e(ct(\".mbsc-cal-prev-y\",f),de.getDate(r-1,o+1,1)<=Z),$e(ct(\".mbsc-cal-next-y\",f),de.getDate(r+1,o,1)>$)),c.attr(\"aria-label\",r).html(l),a=0;ad;s.callback&&(s.load(),s.callback(!0));s.first=x(h,i);s.pos+=f*ce;s.changing=!0;s.load=function(){if(v){for(o=0;oe.max;)s--;for(;n&&e.getFirst(i,1-n-e.offset)<=e.min;)n--}a=Math.round(b/e.pages),z&&a&&e.size!=a&&e.$scroller[j?\"height\":\"width\"](a),dt(e.scroller.settings,{snap:a,minScroll:(-e.pos*ce-s)*a,maxScroll:(-e.pos*ce+n)*a}),e.size=a,e.scroller.refresh()}}function at(e){N._onRefresh(e),N._isVisible&&_&&C&&(D&&D.changing?se=e:(Ie(M,e,!0),je(l)))}function nt(e){fe=\"touchstart\"===e.type}return y={},S=[],w={},he=N.trigger,Me=dt({},N.settings),t=(de=dt(N.settings,St,Me)).controls.join(\",\"),H=de.firstDay,I=de.rtl,ie=de.pageBuffer,pe=de.weekCounter,C=de.weeks,T=6==C,j=\"vertical\"==de.calendarScroll,o=N._getRespCont(),ve=\"full\"==de.weekDays?\"\":\"min\"==de.weekDays?\"Min\":\"Short\",n=de.layout||(\"inline\"==de.display||/top|bottom/.test(de.display)&&de.touchUi?\"liquid\":\"\"),g=(z=\"liquid\"==n)?null:de.calendarWidth,ce=I&&!j?-1:1,a=\"mbsc-disabled \"+(de.disabledClass||\"\"),d=\"mbsc-selected \"+(de.selectedTabClass||\"\"),E=\"mbsc-selected \"+(de.selectedClass||\"\"),K=Math.max(1,Math.floor(((de.calendarHeight||0)/C-45)/18)),t.match(/calendar/)&&(y.calendar=1,_=!0),t.match(/date/)&&!_&&(y.date=1),t.match(/time/)&&(y.time=1),de.controls.forEach(function(e){y[e]&&S.push(e)}),O=de.quickNav&&_&&T,be=de.yearChange&&T,z&&_&&\"center\"==de.display&&(N._isFullScreen=!0),de.layout=n,de.preset=(y.date||_?\"date\":\"\")+(y.time?\"time\":\"\"),e=yt.call(this,N),te=be?de.monthNamesShort:de.monthNames,Se=de.yearSuffix||\"\",ee=(de.dateWheels||de.dateFormat).search(/m/i),ge=(de.dateWheels||de.dateFormat).search(/y/i),k=N._format,de.min&&(Z=ht(xt(de.min,k,de)),Q=de.getYear(Z),X=de.getMonth(Z),q=de.getDate(12*Math.floor(Q/12),0,1)),de.max&&($=ht(xt(de.max,k,de)),U=de.getYear($),G=de.getMonth($),B=de.getDate(12*Math.floor(U/12),0,1)),N._minDate=Z,N._maxDate=$,N.refresh=function(){at(!1)},N.redraw=function(){at(!0)},N.navigate=function(e,t){We(xt(e,k,de),!0,t)},N.changeTab=function(e){N._isVisible&&y[e]&&xe!=e&&(xe=e,ct(\".mbsc-cal-tab\",f).removeClass(d).removeAttr(\"aria-selected\"),ct('.mbsc-cal-tab[data-control=\"'+e+'\"]',f).addClass(d).attr(\"aria-selected\",\"true\"),P&&(v.addClass(\"mbsc-cal-h\"),y[xe].removeClass(\"mbsc-cal-h\")),\"calendar\"==xe&&We(N.getDate(!0),!1,!0),N._showDayPicker(),N.trigger(\"onTabChange\",{tab:xe}))},N._checkSize=!0,N._onGenMonth=rt,N._onSetDate=rt,N._onRefresh=rt,N._getDayProps=rt,N._prepareObj=Ce,N._showDayPicker=function(){O&&(ke(r),ke(s))},N._selectDay=N.__selectDay=function(e,t,a){var n=N.live;ne=de.outerMonthChange,h=!0,N.setDate(a,n,1e3,!n,!0),n&&he(\"onSet\",{valueText:N._value})},N._checkBtn=$e,dt(e,{labels:null,compClass:\"mbsc-calendar mbsc-dt mbsc-sc\",eventOrder:function(e,t){var a=e.start?xt(e.start):null,n=t.start?xt(t.start):null,s=(e.end&&xt(e.end),t.end&&xt(t.end),vt.test(e.d)||pt.test(e.d)),i=vt.test(t.d)||pt.test(t.d),r=e.d?s?e.d:xt(e.d):a,o=t.d?i?t.d:xt(t.d):n,l=r.getTime?e.allDay?1:r.getTime():0,c=o.getTime?t.allDay?1:o.getTime():0;return l==c?e.text>t.text?1:-1:l-c},onMarkupReady:function(e){var a,n,t=0;f=ct(e.target),i=ct(\".mbsc-fr-c\",f),l=N.getDate(!0),b=0,_&&(u=!(!de.marked&&!de.data||de.labels||de.multiLabel||de.showEventCount),ne=!0,xe=\"calendar\",re=\"auto\"==de.months?Math.max(1,Math.min(3,Math.floor((g||lt(o))/280))):+de.months,le=re+2*ie,j=j&&re<2,me=void(oe=0)===de.showOuterDays?re<2&&!j||!T:de.showOuterDays,M=Ze(He(l),T),i.append(function(){var e,t,a,n,s,i,r=\"\",o=I?de.btnCalNextClass:de.btnCalPrevClass,l=I?de.btnCalPrevClass:de.btnCalNextClass;for(s='
',t=0;t<(C?re:1);t++)s+='
';if(s+='
',be&&(r='
'),C&&(i=Ie(M)),e='
'+(ge\",C){for(e+='
',a=0;a',t=0;t<7;t++)e+='
'+de[\"dayNames\"+ve][n]+\"
\";e+=\"
\"}e+='
'+i+\"
\"}if(e+=\"
\",O){for(e+='
',t=0;t<3;t++){for(e+='
',a=0;a<12;a++)a&&a%3==0&&(e+='
'),e+='
'+(1==t?de.monthNamesShort[a]:\" \")+\"
\";e+=\"
\"}for(e+=\"
\",e+='
',t=-1;t<2;t++)e+=ze(Xe(M,t),t);e+=\"
\"}return e+=\"
\"}()),p=ct(\".mbsc-cal-month\",f),c=ct(\".mbsc-cal-year\",f),x=ct(\".mbsc-cal-day-scroll-c\",f)),O&&(r=ct(\".mbsc-cal-year-picker\",f),s=ct(\".mbsc-cal-month-picker\",f)),v=ct(\".mbsc-w-p\",f),1
',S.forEach(function(e,t){n=de[(\"calendar\"==e?\"date\":e)+\"Text\"],a+='
'+n+\"\":' tabindex=\"0\">'+n)+\"
\"}),a+=\"
\")),[\"date\",\"time\",\"calendar\"].forEach(function(e){y[e]?(y[e]=v.eq(t),t++):\"date\"==e&&!y.date&&_&&(v.eq(t).remove(),t++)}),S.forEach(function(e){i.append(y[e])}),!_&&y.date&&y.date.css(\"position\",\"relative\"),N._scrollers=[],function(){if(_&&C){var e=ct(\".mbsc-cal-scroll-c\",f);D=et(e[0],Z,$,ie,oe,re,le,M,Ke,Oe,Le,Ye,qe),O&&(ae=et(e[1],null,null,1,0,1,3,M,Ge),ye=et(e[2],q,B,1,0,1,3,M,Ue,rt,rt,ze,Xe),N.tap(p,function(){_e(s),ke(r)}),N.tap(c,function(){_e(r),ke(s)})),bt(ct(\".mbsc-cal-btn\",f),function(e,t,a,n){Qe(D,t,!0,n)}),Le(M),null===de.defaultValue&&!N._hasValue||N._multiple||(N._activeElm=D.$active[0]),it(x[0],\"touchstart\",nt,{passive:!0}),it(x[0],\"mousedown\",nt),x.on(\"keydown\",function(e){var t,a=de.getYear(l),n=de.getMonth(l),s=de.getDay(l);switch(e.keyCode){case 32:Ke(D.$active,e);break;case 37:t=de.getDate(a,n,s-1*ce);break;case 39:t=de.getDate(a,n,s+1*ce);break;case 38:t=de.getDate(a,n,s-7);break;case 40:t=de.getDate(a,n,s+7);break;case 36:t=de.getDate(a,n,1);break;case 35:t=de.getDate(a,n+1,0);break;case 33:t=e.altKey?de.getDate(a-1,n,s):T?de.getDate(a,n-1,s):de.getDate(a,n,s-7*C);break;case 34:t=e.altKey?de.getDate(a+1,n,s):T?de.getDate(a,n+1,s):de.getDate(a,n,s+7*C)}t&&(e.preventDefault(),We(t,!0,!1,!0))})}N.tap(ct(\".mbsc-cal-tab\",f),function(){N.changeTab(ct(this).attr(\"data-control\"))})}()},onShow:function(){_&&C&&Re(M)},onHide:function(){clearTimeout(L),N._scrollers.forEach(function(e){e.destroy()}),xe=ye=ae=D=A=null},onValidated:function(e){var t,a,n=e.index,s=N._order;a=N.getDate(!0),ue=a,h?t=\"calendar\":void 0!==n&&(t=s.dd==n||s.d==n||s.m==n||s.y==n?\"date\":\"time\"),he(\"onSetDate\",{date:a,control:t}),\"time\"!==t&&We(a,!1,!!e.time,h&&!N._multiple),h=!1},onPosition:function(e){var t,a,n,s,i,r,o,l=e.oldHeight,c=e.windowHeight;if(P=(e.hasTabs||!0===de.tabs||!1!==de.tabs&&z)&&1=de.breakPointMd?ct(e.target).addClass(\"mbsc-fr-md\"):ct(e.target).removeClass(\"mbsc-fr-md\")),P?(f.addClass(\"mbsc-cal-tabbed\"),xe=ct(\".mbsc-cal-tab.mbsc-selected\",f).attr(\"data-control\"),v.addClass(\"mbsc-cal-h\"),y[xe].removeClass(\"mbsc-cal-h\")):(f.removeClass(\"mbsc-cal-tabbed\"),v.removeClass(\"mbsc-cal-h\")),N._isFullScreen&&(x.height(\"\"),o=c-(i=e.popup.offsetHeight)+x[0].offsetHeight,i<=c&&x.height(o)),F&&C&&c!=l){var d=o||x[0].offsetHeight,u=x.find(\".mbsc-cal-txt,.mbsc-cal-txt-ph\")[0],m=u.offsetTop,h=u.offsetHeight,T=Math.max(1,Math.floor((d/C-m)/(h+2)));K!=T&&(K=T,N.redraw())}if(_&&C){if(s=(r=z||j||P?x[0][j?\"offsetHeight\":\"offsetWidth\"]:g||280*re)!=b,b=r,z&&s&&be)for(te=de.maxMonthWidth>p[0].offsetWidth?de.monthNamesShort:de.monthNames,a=de.getYear(M),n=de.getMonth(M),t=0;t=Be[n];++n)l-=Be[n];return[d,n+1,l+1]}function Ge(e){return e<-1e-7?Math.ceil(e-1e-7):Math.floor(e+1e-7)}function Ue(e,t,a){e=parseInt(e),t=parseInt(t),a=parseInt(a);var n,s,i,r,o=new Array(0,0,0);return n=1582Be[n-1]+(12==n&&(a-979)%33%4==0)));)i--;return i}},y.i18n.fa={setText:\"تاييد\",cancelText:\"انصراف\",clearText:\"واضح \",selectedText:\"{count} منتخب\",calendarSystem:\"jalali\",dateFormat:\"yy/mm/dd\",dayNames:[\"يکشنبه\",\"دوشنبه\",\"سه‌شنبه\",\"چهارشنبه\",\"پنج‌شنبه\",\"جمعه\",\"شنبه\"],dayNamesShort:[\"ی\",\"د\",\"س\",\"چ\",\"پ\",\"ج\",\"ش\"],dayNamesMin:[\"ی\",\"د\",\"س\",\"چ\",\"پ\",\"ج\",\"ش\"],dayText:\"روز\",hourText:\"ساعت\",minuteText:\"دقيقه\",monthNames:[\"فروردين\",\"ارديبهشت\",\"خرداد\",\"تير\",\"مرداد\",\"شهريور\",\"مهر\",\"آبان\",\"آذر\",\"دی\",\"بهمن\",\"اسفند\"],monthNamesShort:[\"فروردين\",\"ارديبهشت\",\"خرداد\",\"تير\",\"مرداد\",\"شهريور\",\"مهر\",\"آبان\",\"آذر\",\"دی\",\"بهمن\",\"اسفند\"],monthText:\"ماه\",secText:\"ثانيه\",timeFormat:\"HH:ii\",timeWheels:\"iiHH\",yearText:\"سال\",nowText:\"اکنون\",amText:\"ب\",pmText:\"ص\",todayText:\"امروز\",firstDay:6,rtl:!0,dateText:\"تاریخ \",timeText:\"زمان \",closeText:\"نزدیک\",allDayText:\"تمام روز\",noEventsText:\"هیچ رویداد\",eventText:\"رویداد\",eventsText:\"رویدادها\",moreEventsText:\"{count} مورد دیگر\",fromText:\"شروع \",toText:\"پایان\",wholeText:\"تمام\",fractionText:\"کسر\",unitText:\"واحد\",labels:[\"سال\",\"ماه\",\"روز\",\"ساعت\",\"دقیقه\",\"ثانیه\",\"\"],labelsShort:[\"سال\",\"ماه\",\"روز\",\"ساعت\",\"دقیقه\",\"ثانیه\",\"\"],startText:\"شروع\",stopText:\"پايان\",resetText:\"تنظیم مجدد\",lapText:\"Lap\",hideText:\"پنهان کردن\",backText:\"پشت\",undoText:\"واچیدن\"},y.i18n[\"ru-RU\"]=y.i18n.ru={setText:\"Установить\",cancelText:\"Отмена\",clearText:\"Очистить\",selectedText:\"{count} Выбрать\",dateFormat:\"dd.mm.yy\",dayNames:[\"воскресенье\",\"понедельник\",\"вторник\",\"среда\",\"четверг\",\"пятница\",\"суббота\"],dayNamesShort:[\"вс\",\"пн\",\"вт\",\"ср\",\"чт\",\"пт\",\"сб\"],dayNamesMin:[\"в\",\"п\",\"в\",\"с\",\"ч\",\"п\",\"с\"],dayText:\"День\",delimiter:\".\",hourText:\"Час\",minuteText:\"Минут\",monthNames:[\"Январь\",\"Февраль\",\"Март\",\"Апрель\",\"Май\",\"Июнь\",\"Июль\",\"Август\",\"Сентябрь\",\"Октябрь\",\"Ноябрь\",\"Декабрь\"],monthNamesShort:[\"Янв\",\"Фев\",\"Мар\",\"Апр\",\"Май\",\"Июн\",\"Июл\",\"Авг\",\"Сен\",\"Окт\",\"Ноя\",\"Дек\"],monthText:\"Месяц\",secText:\"Секунд\",timeFormat:\"HH:ii\",yearText:\"Год\",nowText:\"Сейчас\",amText:\"am\",pmText:\"pm\",todayText:\"Cегодня\",firstDay:1,dateText:\"Дата\",timeText:\"Время\",closeText:\"Закрыть\",allDayText:\"Весь день\",noEventsText:\"Нет событий\",eventText:\"Мероприятия\",eventsText:\"Мероприятия\",moreEventsText:\"Ещё {count}\",fromText:\"Начало\",toText:\"Конец\",wholeText:\"Целое\",fractionText:\"Дробное\",unitText:\"Единица\",labels:[\"Лет\",\"Месяцев\",\"Дней\",\"Часов\",\"Минут\",\"Секунд\",\"\"],labelsShort:[\"Лет\",\"Мес\",\"Дн\",\"Час\",\"Мин\",\"Сек\",\"\"],startText:\"Старт\",stopText:\"Стоп\",resetText:\"Сбросить\",lapText:\"Круг\",hideText:\"Скрыть\",backText:\"назад\",undoText:\"ОтменитЬ\",offText:\"O\",onText:\"I\",decimalSeparator:\",\",thousandsSeparator:\" \"},y.i18n.lt={setText:\"OK\",cancelText:\"Atšaukti\",clearText:\"Išvalyti\",selectedText:\"Pasirinktas {count}\",selectedPluralText:\"Pasirinkti {count}\",dateFormat:\"yy-mm-dd\",dayNames:[\"Sekmadienis\",\"Pirmadienis\",\"Antradienis\",\"Trečiadienis\",\"Ketvirtadienis\",\"Penktadienis\",\"Šeštadienis\"],dayNamesShort:[\"S\",\"Pr\",\"A\",\"T\",\"K\",\"Pn\",\"Š\"],dayNamesMin:[\"S\",\"Pr\",\"A\",\"T\",\"K\",\"Pn\",\"Š\"],dayText:\"Diena\",hourText:\"Valanda\",minuteText:\"Minutes\",monthNames:[\"Sausis\",\"Vasaris\",\"Kovas\",\"Balandis\",\"Gegužė\",\"Birželis\",\"Liepa\",\"Rugpjūtis\",\"Rugsėjis\",\"Spalis\",\"Lapkritis\",\"Gruodis\"],monthNamesShort:[\"Sau\",\"Vas\",\"Kov\",\"Bal\",\"Geg\",\"Bir\",\"Lie\",\"Rugp\",\"Rugs\",\"Spa\",\"Lap\",\"Gruo\"],monthText:\"Mėnuo\",secText:\"Sekundes\",amText:\"am\",pmText:\"pm\",timeFormat:\"HH:ii\",yearText:\"Metai\",nowText:\"Dabar\",todayText:\"Šiandien\",firstDay:1,dateText:\"Data\",timeText:\"Laikas\",closeText:\"Uždaryti\",allDayText:\"Visą dieną\",noEventsText:\"Nėra įvykių\",eventText:\"Įvykių\",eventsText:\"Įvykiai\",moreEventsText:\"Dar {count}\",fromText:\"Nuo\",toText:\"Iki\",wholeText:\"Visas\",fractionText:\"Frakcija\",unitText:\"Vienetas\",labels:[\"Metai\",\"Mėnesiai\",\"Dienos\",\"Valandos\",\"Minutes\",\"Sekundes\",\"\"],labelsShort:[\"m\",\"mėn.\",\"d\",\"h\",\"min\",\"s\",\"\"],startText:\"Pradėti\",stopText:\"Sustabdyti\",resetText:\"Išnaujo\",lapText:\"Ratas\",hideText:\"Slėpti\",backText:\"Atgal\",undoText:\"Anuliuoti\",offText:\"Išj.\",onText:\"Įj.\",decimalSeparator:\",\",thousandsSeparator:\" \"},y.i18n.ca={setText:\"Acceptar\",cancelText:\"Cancel·lar\",clearText:\"Esborrar\",selectedText:\"{count} seleccionat\",selectedPluralText:\"{count} seleccionats\",dateFormat:\"dd/mm/yy\",dayNames:[\"Diumenge\",\"Dilluns\",\"Dimarts\",\"Dimecres\",\"Dijous\",\"Divendres\",\"Dissabte\"],dayNamesShort:[\"Dg\",\"Dl\",\"Dt\",\"Dc\",\"Dj\",\"Dv\",\"Ds\"],dayNamesMin:[\"Dg\",\"Dl\",\"Dt\",\"Dc\",\"Dj\",\"Dv\",\"Ds\"],dayText:\"Dia\",hourText:\"Hores\",minuteText:\"Minuts\",monthNames:[\"Gener\",\"Febrer\",\"Març\",\"Abril\",\"Maig\",\"Juny\",\"Juliol\",\"Agost\",\"Setembre\",\"Octubre\",\"Novembre\",\"Desembre\"],monthNamesShort:[\"Gen\",\"Feb\",\"Mar\",\"Abr\",\"Mai\",\"Jun\",\"Jul\",\"Ago\",\"Set\",\"Oct\",\"Nov\",\"Des\"],monthText:\"Mes\",secText:\"Segons\",timeFormat:\"HH:ii\",yearText:\"Any\",nowText:\"Ara\",pmText:\"pm\",amText:\"am\",todayText:\"Avui\",firstDay:1,dateText:\"Data\",timeText:\"Temps\",closeText:\"Tancar\",allDayText:\"Tot el dia\",noEventsText:\"Cap esdeveniment\",eventText:\"Esdeveniments\",eventsText:\"Esdeveniments\",moreEventsText:\"{count} més\",fromText:\"Iniciar\",toText:\"Final\",wholeText:\"Sencer\",fractionText:\"Fracció\",unitText:\"Unitat\",labels:[\"Anys\",\"Mesos\",\"Dies\",\"Hores\",\"Minuts\",\"Segons\",\"\"],labelsShort:[\"Anys\",\"Mesos\",\"Dies\",\"Hrs\",\"Mins\",\"Secs\",\"\"],startText:\"Iniciar\",stopText:\"Aturar\",resetText:\"Reiniciar\",lapText:\"Volta\",hideText:\"Amagar\",backText:\"Enrere\",undoText:\"Desfés\",offText:\"No\",onText:\"Si\"},y.i18n.da={setText:\"Sæt\",cancelText:\"Annuller\",clearText:\"Ryd\",selectedText:\"{count} valgt\",selectedPluralText:\"{count} valgt\",dateFormat:\"dd/mm/yy\",dayNames:[\"Søndag\",\"Mandag\",\"Tirsdag\",\"Onsdag\",\"Torsdag\",\"Fredag\",\"Lørdag\"],dayNamesShort:[\"Søn\",\"Man\",\"Tir\",\"Ons\",\"Tor\",\"Fre\",\"Lør\"],dayNamesMin:[\"S\",\"M\",\"T\",\"O\",\"T\",\"F\",\"L\"],dayText:\"Dag\",hourText:\"Timer\",minuteText:\"Minutter\",monthNames:[\"Januar\",\"Februar\",\"Marts\",\"April\",\"Maj\",\"Juni\",\"Juli\",\"August\",\"September\",\"Oktober\",\"November\",\"December\"],monthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"Maj\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Okt\",\"Nov\",\"Dec\"],monthText:\"Måned\",secText:\"Sekunder\",amText:\"am\",pmText:\"pm\",timeFormat:\"HH.ii\",yearText:\"År\",nowText:\"Nu\",todayText:\"I dag\",firstDay:1,dateText:\"Dato\",timeText:\"Tid\",closeText:\"Luk\",allDayText:\"Hele dagen\",noEventsText:\"Ingen begivenheder\",eventText:\"Begivenheder\",eventsText:\"Begivenheder\",moreEventsText:\"{count} mere\",fromText:\"Start\",toText:\"Slut\",wholeText:\"Hele\",fractionText:\"Dele\",unitText:\"Enhed\",labels:[\"År\",\"Måneder\",\"Dage\",\"Timer\",\"Minutter\",\"Sekunder\",\"\"],labelsShort:[\"År\",\"Mdr\",\"Dg\",\"Timer\",\"Min\",\"Sek\",\"\"],startText:\"Start\",stopText:\"Stop\",resetText:\"Nulstil\",lapText:\"Omgang\",hideText:\"Skjul\",offText:\"Fra\",onText:\"Til\",backText:\"Tilbage\",undoText:\"Fortryd\"},y.i18n.he={rtl:!0,setText:\"שמירה\",cancelText:\"ביטול\",clearText:\"נקה\",selectedText:\"{count} נבחר\",selectedPluralText:\"{count} נבחרו\",dateFormat:\"dd/mm/yy\",dayNames:[\"ראשון\",\"שני\",\"שלישי\",\"רביעי\",\"חמישי\",\"שישי\",\"שבת\"],dayNamesShort:[\"א'\",\"ב'\",\"ג'\",\"ד'\",\"ה'\",\"ו'\",\"ש'\"],dayNamesMin:[\"א\",\"ב\",\"ג\",\"ד\",\"ה\",\"ו\",\"ש\"],dayText:\"יום\",hourText:\"שעות\",minuteText:\"דקות\",monthNames:[\"ינואר\",\"פברואר\",\"מרץ\",\"אפריל\",\"מאי\",\"יוני\",\"יולי\",\"אוגוסט\",\"ספטמבר\",\"אוקטובר\",\"נובמבר\",\"דצמבר\"],monthNamesShort:[\"ינו\",\"פבר\",\"מרץ\",\"אפר\",\"מאי\",\"יונ\",\"יול\",\"אוג\",\"ספט\",\"אוק\",\"נוב\",\"דצמ\"],monthText:\"חודש\",secText:\"שניות\",amText:\"am\",pmText:\"pm\",timeFormat:\"HH:ii\",timeWheels:\"iiHH\",yearText:\"שנה\",nowText:\"עכשיו\",firstDay:0,dateText:\"תאריך\",timeText:\"זמן\",closeText:\"סגירה\",todayText:\"היום\",allDayText:\"כל היום\",noEventsText:\"אין אירועים\",eventText:\"מִקרֶה\",eventsText:\"מִקרֶה\",moreEventsText:\"אירוע אחד נוסף\",moreEventsPluralText:\"{count} אירועים נוספים\",fromText:\"התחלה\",toText:\"סיום\",wholeText:\"כֹּל\",fractionText:\"שבריר\",unitText:\"יחידה\",labels:[\"שנים\",\"חודשים\",\"ימים\",\"שעות\",\"דקות\",\"שניים\",\"\"],labelsShort:[\"שנים\",\"חודשים\",\"ימים\",\"שעות\",\"דקות\",\"שניים\",\"\"],startText:\"התחל\",stopText:\"עצור\",resetText:\"אתחול\",lapText:\"הקפה\",hideText:\"הסתר\",offText:\"כיבוי\",onText:\"הפעלה\",backText:\"חזור\",undoText:\"ביטול פעולה\"},ie.hijri={getYear:function(e){return Ue(e.getFullYear(),e.getMonth()+1,e.getDate())[0]},getMonth:function(e){return--Ue(e.getFullYear(),e.getMonth()+1,e.getDate())[1]},getDay:function(e){return Ue(e.getFullYear(),e.getMonth()+1,e.getDate())[2]},getDate:function(e,t,a,n,s,i,r){t<0&&(e+=Math.floor(t/12),t=t%12?12+t%12:0),11 s => as.bool(s, a) || as.bool(s, b)},\n {\"name\": \"adv_boolean$subexpression$2\", \"symbols\": [\"__\", \"and\", \"__\"]},\n {\"name\": \"adv_boolean\", \"symbols\": [\"adv_boolean\", \"adv_boolean$subexpression$2\", \"adv_boolean_not\"], \"postprocess\": ([a, and, b]) => s => as.bool(s, a) && as.bool(s, b)},\n {\"name\": \"adv_boolean\", \"symbols\": [\"adv_boolean_not\"], \"postprocess\": id},\n {\"name\": \"adv_boolean_not\", \"symbols\": [\"not\", \"__\", \"adv_comparison\"], \"postprocess\": ([not, , v]) => s => !as.bool(s, v)},\n {\"name\": \"adv_boolean_not\", \"symbols\": [\"not\", \"_bo_\", \"adv_boolean\", \"_bc_\"], \"postprocess\": ([not, , v]) => s => !as.bool(s, v)},\n {\"name\": \"adv_boolean_not\", \"symbols\": [\"adv_comparison\"], \"postprocess\": id},\n {\"name\": \"basic_boolean$subexpression$1\", \"symbols\": [\"__\", \"or\", \"__\"]},\n {\"name\": \"basic_boolean\", \"symbols\": [\"basic_boolean\", \"basic_boolean$subexpression$1\", \"basic_comparison\"], \"postprocess\": ([a, or, b]) => s => as.bool(s, a) || as.bool(s, b)},\n {\"name\": \"basic_boolean$subexpression$2\", \"symbols\": [\"__\", \"and\", \"__\"]},\n {\"name\": \"basic_boolean\", \"symbols\": [\"basic_boolean\", \"basic_boolean$subexpression$2\", \"basic_comparison\"], \"postprocess\": ([a, and, b]) => s => as.bool(s, a) && as.bool(s, b)},\n {\"name\": \"basic_boolean\", \"symbols\": [\"basic_comparison\"], \"postprocess\": id},\n {\"name\": \"adv_comparison\", \"symbols\": [\"discrete_comparison\"], \"postprocess\": id},\n {\"name\": \"adv_comparison\", \"symbols\": [\"algebraic_comparison\"], \"postprocess\": id},\n {\"name\": \"adv_comparison\", \"symbols\": [\"addition\"], \"postprocess\": id},\n {\"name\": \"discrete_comparison$subexpression$1\", \"symbols\": [\"_\", \"eq\", \"_\"]},\n {\"name\": \"discrete_comparison\", \"symbols\": [\"variable\", \"discrete_comparison$subexpression$1\", \"choice_list\"], \"postprocess\": ([a, eq, b]) => s => fn.eq(s, a, b)},\n {\"name\": \"discrete_comparison$subexpression$2\", \"symbols\": [\"_\", \"eq\", \"_\"]},\n {\"name\": \"discrete_comparison\", \"symbols\": [\"variable_selector\", \"discrete_comparison$subexpression$2\", \"choice_list\"], \"postprocess\": ([a, eq, b]) => s => fn.eq(s, a, b)},\n {\"name\": \"discrete_comparison$subexpression$3\", \"symbols\": [\"_\", \"not_eq\", \"_\"]},\n {\"name\": \"discrete_comparison\", \"symbols\": [\"variable_selector\", \"discrete_comparison$subexpression$3\", \"choice_list\"], \"postprocess\": ([a, neq, b]) => s => !fn.eq(s, a, b)},\n {\"name\": \"algebraic_comparison$subexpression$1\", \"symbols\": [\"_\", \"eq_algebraic\", \"_\"]},\n {\"name\": \"algebraic_comparison\", \"symbols\": [\"adv_comparison\", \"algebraic_comparison$subexpression$1\", \"addition\"], \"postprocess\": ([a, eq, b]) => s => fn.eq_algebraic(s, a, b)},\n {\"name\": \"algebraic_comparison$subexpression$2\", \"symbols\": [\"_\", \"not_eq\", \"_\"]},\n {\"name\": \"algebraic_comparison\", \"symbols\": [\"adv_comparison\", \"algebraic_comparison$subexpression$2\", \"addition\"], \"postprocess\": ([a, neq, b]) => s => !fn.eq_algebraic(s, a, b)},\n {\"name\": \"algebraic_comparison$subexpression$3\", \"symbols\": [\"_\", \"gte\", \"_\"]},\n {\"name\": \"algebraic_comparison\", \"symbols\": [\"adv_comparison\", \"algebraic_comparison$subexpression$3\", \"addition\"], \"postprocess\": ([a, gte, b]) => s => fn.gt(s, a, b) || fn.eq_algebraic(s, a, b)},\n {\"name\": \"algebraic_comparison$subexpression$4\", \"symbols\": [\"_\", \"gt\", \"_\"]},\n {\"name\": \"algebraic_comparison\", \"symbols\": [\"adv_comparison\", \"algebraic_comparison$subexpression$4\", \"addition\"], \"postprocess\": ([a, gt, b]) => s => fn.gt(s, a, b)},\n {\"name\": \"algebraic_comparison$subexpression$5\", \"symbols\": [\"_\", \"lte\", \"_\"]},\n {\"name\": \"algebraic_comparison\", \"symbols\": [\"adv_comparison\", \"algebraic_comparison$subexpression$5\", \"addition\"], \"postprocess\": ([a, lte, b]) => s => fn.lt(s, a, b) || fn.eq_algebraic(s, a, b)},\n {\"name\": \"algebraic_comparison$subexpression$6\", \"symbols\": [\"_\", \"lt\", \"_\"]},\n {\"name\": \"algebraic_comparison\", \"symbols\": [\"adv_comparison\", \"algebraic_comparison$subexpression$6\", \"addition\"], \"postprocess\": ([a, lt, b]) => s => fn.lt(s, a, b)},\n {\"name\": \"basic_comparison$subexpression$1\", \"symbols\": [\"_\", \"eq\", \"_\"]},\n {\"name\": \"basic_comparison\", \"symbols\": [\"variable\", \"basic_comparison$subexpression$1\", \"value\"], \"postprocess\": ([a, eq, b]) => s => fn.eq(s, a, b)},\n {\"name\": \"basic_comparison$subexpression$2\", \"symbols\": [\"_\", \"not_eq\", \"_\"]},\n {\"name\": \"basic_comparison\", \"symbols\": [\"variable\", \"basic_comparison$subexpression$2\", \"value\"], \"postprocess\": ([a, neq, b]) => s => !fn.eq(s, a, b)},\n {\"name\": \"basic_comparison$subexpression$3\", \"symbols\": [\"_\", \"gte\", \"_\"]},\n {\"name\": \"basic_comparison\", \"symbols\": [\"variable\", \"basic_comparison$subexpression$3\", \"numeric_value\"], \"postprocess\": ([a, gte, b]) => s => fn.compare(s, a, b).some(c => c >= 0)},\n {\"name\": \"basic_comparison$subexpression$4\", \"symbols\": [\"_\", \"gt\", \"_\"]},\n {\"name\": \"basic_comparison\", \"symbols\": [\"variable\", \"basic_comparison$subexpression$4\", \"numeric_value\"], \"postprocess\": ([a, gt, b]) => s => fn.compare(s, a, b).some(c => c > 0)},\n {\"name\": \"basic_comparison$subexpression$5\", \"symbols\": [\"_\", \"lte\", \"_\"]},\n {\"name\": \"basic_comparison\", \"symbols\": [\"variable\", \"basic_comparison$subexpression$5\", \"numeric_value\"], \"postprocess\": ([a, lte, b]) => s => fn.compare(s, a, b).some(c => c <= 0)},\n {\"name\": \"basic_comparison$subexpression$6\", \"symbols\": [\"_\", \"lt\", \"_\"]},\n {\"name\": \"basic_comparison\", \"symbols\": [\"variable\", \"basic_comparison$subexpression$6\", \"numeric_value\"], \"postprocess\": ([a, lt, b]) => s => fn.compare(s, a, b).some(c => c < 0)},\n {\"name\": \"basic_comparison$subexpression$7\", \"symbols\": [\"__\", \"contains\", \"__\"]},\n {\"name\": \"basic_comparison\", \"symbols\": [\"variable\", \"basic_comparison$subexpression$7\", \"value\"], \"postprocess\": ([a, contains, b]) => s => fn.strfind(s, a, b)},\n {\"name\": \"basic_comparison$subexpression$8\", \"symbols\": [\"__\", \"does_not_contain\", \"__\"]},\n {\"name\": \"basic_comparison\", \"symbols\": [\"variable\", \"basic_comparison$subexpression$8\", \"value\"], \"postprocess\": ([a, dncontain, b]) => s => !fn.strfind(s, a, b)},\n {\"name\": \"basic_comparison$subexpression$9\", \"symbols\": [\"__\", \"is_empty\"]},\n {\"name\": \"basic_comparison\", \"symbols\": [\"variable\", \"basic_comparison$subexpression$9\"], \"postprocess\": ([v]) => s => fn.empty(s, v)},\n {\"name\": \"basic_comparison$subexpression$10\", \"symbols\": [\"__\", \"is_not_empty\"]},\n {\"name\": \"basic_comparison\", \"symbols\": [\"variable\", \"basic_comparison$subexpression$10\"], \"postprocess\": ([v]) => s => !fn.empty(s, v)},\n {\"name\": \"basic_comparison\", \"symbols\": [\"basic_group\"], \"postprocess\": id},\n {\"name\": \"addition$subexpression$1\", \"symbols\": [\"_\", \"add\", \"_\"]},\n {\"name\": \"addition\", \"symbols\": [\"addition\", \"addition$subexpression$1\", \"multiplication\"], \"postprocess\": ([a, plus, b]) => s => fn.add(s, a, b)},\n {\"name\": \"addition$subexpression$2\", \"symbols\": [\"_\", \"sub\", \"_\"]},\n {\"name\": \"addition\", \"symbols\": [\"addition\", \"addition$subexpression$2\", \"multiplication\"], \"postprocess\": ([a, minus, b]) => s => fn.sub(s, a, b)},\n {\"name\": \"addition\", \"symbols\": [\"multiplication\"], \"postprocess\": id},\n {\"name\": \"multiplication$subexpression$1\", \"symbols\": [\"_\", \"mul\", \"_\"]},\n {\"name\": \"multiplication\", \"symbols\": [\"multiplication\", \"multiplication$subexpression$1\", \"exponentiation\"], \"postprocess\": ([a, mul, b]) => s => fn.mul(s, a, b)},\n {\"name\": \"multiplication$subexpression$2\", \"symbols\": [\"_\", \"div\", \"_\"]},\n {\"name\": \"multiplication\", \"symbols\": [\"multiplication\", \"multiplication$subexpression$2\", \"exponentiation\"], \"postprocess\": ([a, div, b]) => s => fn.div(s, a, b)},\n {\"name\": \"multiplication\", \"symbols\": [\"exponentiation\"], \"postprocess\": id},\n {\"name\": \"exponentiation$subexpression$1\", \"symbols\": [\"_\", \"exp\", \"_\"]},\n {\"name\": \"exponentiation\", \"symbols\": [\"adv_group\", \"exponentiation$subexpression$1\", \"exponentiation\"], \"postprocess\": ([a, exp, b]) => s => fn.pow(s, a, b)},\n {\"name\": \"exponentiation\", \"symbols\": [\"adv_group\"], \"postprocess\": id},\n {\"name\": \"adv_group\", \"symbols\": [\"_bo_\", \"adv_boolean\", \"_bc_\"], \"postprocess\": nth(1)},\n {\"name\": \"adv_group\", \"symbols\": [\"function\"], \"postprocess\": id},\n {\"name\": \"adv_group\", \"symbols\": [\"numeric_value\"], \"postprocess\": id},\n {\"name\": \"basic_group\", \"symbols\": [\"_bo_\", \"basic_boolean\", \"_bc_\"], \"postprocess\": nth(1)},\n {\"name\": \"basic_group\", \"symbols\": [\"numeric_value\"], \"postprocess\": id},\n {\"name\": \"function\", \"symbols\": [\"fn_min\", \"_bo_\", \"args_nval\", \"_bc_\"], \"postprocess\": ([min, , vn]) => s => fn.min(s, ...vn(s))},\n {\"name\": \"function\", \"symbols\": [\"fn_max\", \"_bo_\", \"args_nval\", \"_bc_\"], \"postprocess\": ([max, , vn]) => s => fn.max(s, ...vn(s))},\n {\"name\": \"function\", \"symbols\": [\"fn_sum\", \"_bo_\", \"args_nval\", \"_bc_\"], \"postprocess\": ([sum, , vn]) => s => fn.sum(s, vn)},\n {\"name\": \"function\", \"symbols\": [\"fn_smr\", \"_bo_\", \"arg_val\", \"_ls_\", \"args_nval\", \"_bc_\"], \"postprocess\": ([smr, ,v, ,vn]) => s => fn.smr(s, v, vn)},\n {\"name\": \"function\", \"symbols\": [\"fn_sm2\", \"_bo_\", \"args_nval\", \"_bc_\"], \"postprocess\": ([sm2, , vn]) => s => fn.sm2(s, vn)},\n {\"name\": \"function\", \"symbols\": [\"fn_ind\", \"_bo_\", \"args_nval\", \"_bc_\"], \"postprocess\": ([ind, , vn]) => s => fn.ind(s, vn)},\n {\"name\": \"function\", \"symbols\": [\"fn_prj\", \"_bo_\", \"args_nval\", \"_bc_\"], \"postprocess\": ([prj, , vn]) => s => fn.prj(s, vn)},\n {\"name\": \"function\", \"symbols\": [\"fn_if\", \"_bo_\", \"args_nval\", \"_bc_\"], \"postprocess\": ([_if, , vn]) => s => fn.bool(s, ...vn(s))},\n {\"name\": \"function\", \"symbols\": [\"fn_v01\", \"_bo_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([v01, , v]) => s => fn.bool(s, v, 1, 0)},\n {\"name\": \"function\", \"symbols\": [\"fn_nbr\", \"_bo_\", \"args_nvar\", \"_bc_\"], \"postprocess\": ([nbr, , vn]) => s => fn.nbr(s, ...vn(s))},\n {\"name\": \"function\", \"symbols\": [\"fn_sgn\", \"_bo_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([sgn, , v]) => s => fn.sgn(s, v)},\n {\"name\": \"function\", \"symbols\": [\"fn_cmp\", \"_bo_\", \"args_nval\", \"_bc_\"], \"postprocess\": ([cmp, , vn]) => s => fn.cmp(s, ...vn(s))},\n {\"name\": \"function\", \"symbols\": [\"fn_cmr\", \"_bo_\", \"args_nvar\", \"_bc_\"], \"postprocess\": ([cmr, , vn]) => s => fn.cmr(s, ...vn(s))},\n {\"name\": \"function\", \"symbols\": [\"fn_meq\", \"_bo_\", \"arg_var\", \"_ls_\", \"arg_val\", \"_ls_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([meq, , a, , b, , c]) => s => fn.meq(s, a, b, c)},\n {\"name\": \"function\", \"symbols\": [\"fn_mnb\", \"_bo_\", \"arg_var\", \"_ls_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([mnb, , a, , b]) => s => fn.mnb(s, a, b)},\n {\"name\": \"function\", \"symbols\": [\"fn_rng\", \"_bo_\", \"args_nval\", \"_bc_\"], \"postprocess\": ([rng, , vn]) => s => fn.rng(s, ...vn(s))},\n {\"name\": \"function\", \"symbols\": [\"fn_rnk\", \"_bo_\", \"args_nval\", \"_bc_\"], \"postprocess\": ([rnk, , vn]) => s => fn.rnk(s, ...vn(s))},\n {\"name\": \"function\", \"symbols\": [\"fn_sqr\", \"_bo_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([sqr, , v]) => s => fn.sqr(s, v)},\n {\"name\": \"function\", \"symbols\": [\"fn_ln\", \"_bo_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([ln, , v]) => s => fn.ln(s, v)},\n {\"name\": \"function\", \"symbols\": [\"fn_log\", \"_bo_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([log, , v]) => s => fn.log(s, v)},\n {\"name\": \"function\", \"symbols\": [\"fn_abs\", \"_bo_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([abs, , v]) => s => fn.abs(s, v)},\n {\"name\": \"function\", \"symbols\": [\"fn_trc\", \"_bo_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([trc, , v]) => s => fn.trc(s, v)},\n {\"name\": \"function\", \"symbols\": [\"fn_ran\", \"_bo_\", \"arg_val\", \"_ls_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([ran, , a, , b]) => s => fn.ran(s, a, b)},\n {\"name\": \"function\", \"symbols\": [\"fn_mod\", \"_bo_\", \"arg_val\", \"_ls_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([mod, , a, , b]) => s => fn.mod(s, a, b)},\n {\"name\": \"function\", \"symbols\": [\"fn_exp\", \"_bo_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([exp, , v]) => s => fn.exp(s, v)},\n {\"name\": \"function\", \"symbols\": [\"fn_jul\", \"_bo_\", \"args_nval\", \"_bc_\"], \"postprocess\": ([jul, , vn]) => s => fn.jul(s, ...vn(s))},\n {\"name\": \"function\", \"symbols\": [\"fn_yea\", \"_bo_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([yea, , v]) => s => fn.yea(s, v)},\n {\"name\": \"function\", \"symbols\": [\"fn_mon\", \"_bo_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([mon, , v]) => s => fn.mon(s, v)},\n {\"name\": \"function\", \"symbols\": [\"fn_day\", \"_bo_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([day, , v]) => s => fn.day(s, v)},\n {\"name\": \"function\", \"symbols\": [\"fn_wkd\", \"_bo_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([wkd, , v]) => s => fn.wkd(s, v)},\n {\"name\": \"function\", \"symbols\": [\"fn_nbc\", \"_bo_\", \"arg_var\", \"_bc_\"], \"postprocess\": ([nbc, , v]) => s => fn.nbc(s, v)},\n {\"name\": \"function\", \"symbols\": [\"fn_qta\", \"_bo_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([qta, , v]) => s => fn.qta(s, v)},\n {\"name\": \"function\", \"symbols\": [\"fn_qtf\", \"_bo_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([qtf, , v]) => s => fn.qtf(s, v)},\n {\"name\": \"function\", \"symbols\": [\"fn_qtc\", \"_bo_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([qtc, , v]) => s => fn.qtc(s, v)},\n {\"name\": \"function\", \"symbols\": [\"fn_qtisavail\", \"_bo_\", \"args_nval\", \"_bc_\"], \"postprocess\": ([max, , vals]) => s => fn.qtisavail(s, ...vals(s))},\n {\"name\": \"function\", \"symbols\": [\"fn_qtareavail\", \"_bo_\", \"args_nval\", \"_bc_\"], \"postprocess\": ([max, , vals]) => s => fn.qtareavail(s, ...vals(s))},\n {\"name\": \"function\", \"symbols\": [\"fn_getavailqt\", \"_bo_\", \"args_nval\", \"_bc_\"], \"postprocess\": ([max, , vals]) => s => fn.getavailqt(s, ...vals(s))},\n {\"name\": \"function\", \"symbols\": [\"fn_selrandqt\", \"_bo_\", \"args_nval\", \"_bc_\"], \"postprocess\": ([max, , vals]) => s => fn.selrandqt(s, ...vals(s))},\n {\"name\": \"function\", \"symbols\": [\"fn_qtisavailresp\", \"_bo_\", \"args_nval\", \"_bc_\"], \"postprocess\": ([max, , vals]) => s => fn.qtisavailresp(s, ...vals(s))},\n {\"name\": \"function\", \"symbols\": [\"fn_qtareavailresp\", \"_bo_\", \"args_nval\", \"_bc_\"], \"postprocess\": ([max, , vals]) => s => fn.qtareavailresp(s, ...vals(s))},\n {\"name\": \"function\", \"symbols\": [\"fn_getavailqtresp\", \"_bo_\", \"args_nval\", \"_bc_\"], \"postprocess\": ([max, , vals]) => s => fn.getavailqtresp(s, ...vals(s))},\n {\"name\": \"function\", \"symbols\": [\"fn_selrandqtresp\", \"_bo_\", \"args_nval\", \"_bc_\"], \"postprocess\": ([max, , vals]) => s => fn.selrandqtresp(s, ...vals(s))},\n {\"name\": \"function\", \"symbols\": [\"fn_rnb\", \"_bo_\", \"arg_val\", \"_ls_\", \"args_nvar\", \"_bc_\"], \"postprocess\": ([rnb, , loop, , vn]) => s => fn.rnb(s, loop, ...vn(s))},\n {\"name\": \"function\", \"symbols\": [\"fn_rxy\", \"_bo_\", \"arg_val\", \"_ls_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([rxy, , a, , b]) => s => fn.rxy(s, a, b)},\n {\"name\": \"function\", \"symbols\": [\"fn_fsr\", \"_bo_\", \"arg_var\", \"_ls_\", \"arg_var\", \"_bc_\"], \"postprocess\": ([fsr, , src, , dst]) => s => fn.fsr(s, src, dst)},\n {\"name\": \"function\", \"symbols\": [\"fn_nbl\", \"_bo_\", \"arg_var\", \"_bc_\"], \"postprocess\": ([nbl, , v]) => s => fn.nbl(s, v)},\n {\"name\": \"function\", \"symbols\": [\"fn_csm\", \"_bo_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([csm, , v]) => s => fn.loop(s, v).map(v => as.number(s, v)).reduce((a, b) => a + b)},\n {\"name\": \"function\", \"symbols\": [\"fn_cmx\", \"_bo_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([cmx, , v]) => s => fn.loop(s, v).map(v => as.number(s, v)).reduce((a, b) => Math.max(a, b))},\n {\"name\": \"function\", \"symbols\": [\"fn_cmn\", \"_bo_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([cmn, , v]) => s => fn.loop(s, v).map(v => as.number(s, v)).reduce((a, b) => Math.min(a, b))},\n {\"name\": \"function\", \"symbols\": [\"fn_cor\", \"_bo_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([cor, , v]) => s => fn.loop(s, v).map(v => as.bool(s, v)).some(a => a) ? 1 : 0},\n {\"name\": \"function\", \"symbols\": [\"fn_can\", \"_bo_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([can, , v]) => s => fn.loop(s, v).reduce((a, b) => a === b ? a : null) ? 1 : 0},\n {\"name\": \"function\", \"symbols\": [\"fn_cin\", \"_bo_\", \"arg_val\", \"_bc_\"], \"postprocess\": ([cin, , v]) => s => fn.loop(s, v).findIndex(v => as.bool(s, v)) + 1},\n {\"name\": \"function\", \"symbols\": [\"fn_mov\", \"_bo_\", \"arg_val\", \"_ls_\", \"args_nvar\", \"_bc_\"], \"postprocess\": ([mov, , v1, , vn]) => s => fn.mov(s, v1, ...vn(s))},\n {\"name\": \"function\", \"symbols\": [\"fn_mst\", \"_bo_\", \"arg_val\", \"_ls_\", \"args_nvar\", \"_bc_\"], \"postprocess\": ([mst, , v1, , vn]) => s => fn.mst(s, v1, ...vn(s))},\n {\"name\": \"function\", \"symbols\": [\"fn_mvc\", \"_bo_\", \"arg_val\", \"_ls_\", \"args_nvar\", \"_bc_\"], \"postprocess\": ([mvc, , v1, , vn]) => s => fn.mov(s, v1, ...vn(s))},\n {\"name\": \"args_nval\", \"symbols\": [\"args_nval\", \"_ls_\", \"args_nval_term\"], \"postprocess\": ([a, , b]) => s => [...a(s), ...b(s)]},\n {\"name\": \"args_nval\", \"symbols\": [\"args_nval_term\"], \"postprocess\": id},\n {\"name\": \"args_nval_term\", \"symbols\": [\"variable_list\"], \"postprocess\": ([vn]) => s => vn(s).map(v => as.number(s, v))},\n {\"name\": \"args_nval_term\", \"symbols\": [\"arg_val\"], \"postprocess\": ([v]) => s => [as.number(s, v)]},\n {\"name\": \"args_nvar\", \"symbols\": [\"args_nvar\", \"_ls_\", \"args_nvar_term\"], \"postprocess\": ([a, , b]) => s => [...a(s), ...b(s)]},\n {\"name\": \"args_nvar\", \"symbols\": [\"args_nvar_term\"], \"postprocess\": id},\n {\"name\": \"args_nvar_term\", \"symbols\": [\"variable_list\"], \"postprocess\": ([vn]) => s => vn(s)},\n {\"name\": \"args_nvar_term\", \"symbols\": [\"arg_var\"], \"postprocess\": ([v]) => s => [v(s)]},\n {\"name\": \"arg_val\", \"symbols\": [\"adv_boolean\"], \"postprocess\": id},\n {\"name\": \"arg_var\", \"symbols\": [\"identifier\"], \"postprocess\": ([id]) => s => as.variable(s, id)},\n {\"name\": \"numeric_value\", \"symbols\": [\"float\"], \"postprocess\": id},\n {\"name\": \"numeric_value\", \"symbols\": [\"variable\"], \"postprocess\": ([v]) => s => as.number(s, v)},\n {\"name\": \"variable_selector\", \"symbols\": [\"range_operator\", \"_\", \"variable_list\"], \"postprocess\": ([range, , vn]) => s => as.variableSelect(s, range, vn)},\n {\"name\": \"variable_list$subexpression$1\", \"symbols\": [{\"literal\":\"[\"}, \"_\"]},\n {\"name\": \"variable_list$ebnf$1\", \"symbols\": [\"list_skip\"], \"postprocess\": id},\n {\"name\": \"variable_list$ebnf$1\", \"symbols\": [], \"postprocess\": function(d) {return null;}},\n {\"name\": \"variable_list$ebnf$2\", \"symbols\": []},\n {\"name\": \"variable_list$ebnf$2$subexpression$1\", \"symbols\": [\"_ls_\", \"variable_list_item\"], \"postprocess\": nth(1)},\n {\"name\": \"variable_list$ebnf$2\", \"symbols\": [\"variable_list$ebnf$2\", \"variable_list$ebnf$2$subexpression$1\"], \"postprocess\": function arrpush(d) {return d[0].concat([d[1]]);}},\n {\"name\": \"variable_list$subexpression$2\", \"symbols\": [\"_\", {\"literal\":\"]\"}]},\n {\"name\": \"variable_list\", \"symbols\": [\"variable_list$subexpression$1\", \"variable_list$ebnf$1\", \"_\", \"variable_list_item\", \"variable_list$ebnf$2\", \"variable_list$subexpression$2\"], \"postprocess\": ([, skip, , v1, vn]) => s => as.variableList(s, skip, [v1, ...vn])},\n {\"name\": \"list_skip\", \"symbols\": [{\"literal\":\"@\"}, \"uint\"], \"postprocess\": nth(1)},\n {\"name\": \"variable_list_item\", \"symbols\": [\"variable\"], \"postprocess\": id},\n {\"name\": \"variable_list_item\", \"symbols\": [\"variable_range\"], \"postprocess\": id},\n {\"name\": \"variable_range\", \"symbols\": [\"variable\", \"_\", \"sub\", \"_\", \"variable\"], \"postprocess\": ([a, , to, , b]) => s => as.variableRange(s, a, b)},\n {\"name\": \"range_operator\", \"symbols\": [\"and\"], \"postprocess\": () => \"and\"},\n {\"name\": \"range_operator\", \"symbols\": [\"or\"], \"postprocess\": () => \"or\"},\n {\"name\": \"variable\", \"symbols\": [\"identifier\"], \"postprocess\": ([id]) => s => as.variable(s, id)},\n {\"name\": \"variable$subexpression$1\", \"symbols\": [{\"literal\":\"[\"}, \"_\"]},\n {\"name\": \"variable$subexpression$2\", \"symbols\": [\"_\", {\"literal\":\"]\"}]},\n {\"name\": \"variable\", \"symbols\": [\"variable$subexpression$1\", \"identifier\", \"variable$subexpression$2\"], \"postprocess\": ([, id]) => s => as.variable(s, id)},\n {\"name\": \"choice_list$ebnf$1\", \"symbols\": []},\n {\"name\": \"choice_list$ebnf$1$subexpression$1\", \"symbols\": [\"_ls_\", \"choice_list_item\"], \"postprocess\": nth(1)},\n {\"name\": \"choice_list$ebnf$1\", \"symbols\": [\"choice_list$ebnf$1\", \"choice_list$ebnf$1$subexpression$1\"], \"postprocess\": function arrpush(d) {return d[0].concat([d[1]]);}},\n {\"name\": \"choice_list\", \"symbols\": [\"choice_list_item\", \"choice_list$ebnf$1\"], \"postprocess\": cat},\n {\"name\": \"choice_list_item\", \"symbols\": [\"choice_range\"], \"postprocess\": id},\n {\"name\": \"choice_list_item\", \"symbols\": [\"choice_index\"], \"postprocess\": id},\n {\"name\": \"choice_list_item\", \"symbols\": [\"value\"], \"postprocess\": id},\n {\"name\": \"choice_range\", \"symbols\": [\"choice\", \"sub\", \"choice\"], \"postprocess\": ([a, to, b]) => s => as.choiceRange(s, a, b)},\n {\"name\": \"choice\", \"symbols\": [\"value\"], \"postprocess\": ([v]) => s => as.choice(s, v)},\n {\"name\": \"choice\", \"symbols\": [\"choice_index\"], \"postprocess\": id},\n {\"name\": \"choice_index\", \"symbols\": [{\"literal\":\"#\"}, \"uint\"], \"postprocess\": ([, int]) => s => as.choice(s, int)},\n {\"name\": \"_ls_\", \"symbols\": [\"__\"], \"postprocess\": nul},\n {\"name\": \"_ls_\", \"symbols\": [\"_\", {\"literal\":\",\"}, \"_\"], \"postprocess\": nul},\n {\"name\": \"_bo_\", \"symbols\": [{\"literal\":\"(\"}, \"_\"], \"postprocess\": nul},\n {\"name\": \"_bc_\", \"symbols\": [\"_\", {\"literal\":\")\"}], \"postprocess\": nul},\n {\"name\": \"value\", \"symbols\": [\"float\"], \"postprocess\": id},\n {\"name\": \"value\", \"symbols\": [\"bool\"], \"postprocess\": id},\n {\"name\": \"value\", \"symbols\": [\"word\"], \"postprocess\": id},\n {\"name\": \"value\", \"symbols\": [\"identifier\"], \"postprocess\": id},\n {\"name\": \"float$ebnf$1\", \"symbols\": [\"sub\"], \"postprocess\": id},\n {\"name\": \"float$ebnf$1\", \"symbols\": [], \"postprocess\": function(d) {return null;}},\n {\"name\": \"float\", \"symbols\": [\"float$ebnf$1\", (lexer.has(\"float\") ? {type: \"float\"} : float)], \"postprocess\": ([sub, float]) => (sub ? -1 : 1) * parseFloat(float.value)},\n {\"name\": \"float\", \"symbols\": [\"int\"], \"postprocess\": id},\n {\"name\": \"int$ebnf$1\", \"symbols\": [\"sub\"], \"postprocess\": id},\n {\"name\": \"int$ebnf$1\", \"symbols\": [], \"postprocess\": function(d) {return null;}},\n {\"name\": \"int\", \"symbols\": [\"int$ebnf$1\", \"uint\"], \"postprocess\": ([sub, int]) => (sub ? -1 : 1) * int},\n {\"name\": \"uint\", \"symbols\": [(lexer.has(\"uint\") ? {type: \"uint\"} : uint)], \"postprocess\": ([int]) => parseInt(int.value)},\n {\"name\": \"bool\", \"symbols\": [\"true\"], \"postprocess\": id},\n {\"name\": \"bool\", \"symbols\": [\"false\"], \"postprocess\": id},\n {\"name\": \"word\", \"symbols\": [(lexer.has(\"word\") ? {type: \"word\"} : word)], \"postprocess\": val},\n {\"name\": \"add\", \"symbols\": [(lexer.has(\"add\") ? {type: \"add\"} : add)], \"postprocess\": nul},\n {\"name\": \"sub\", \"symbols\": [(lexer.has(\"sub\") ? {type: \"sub\"} : sub)], \"postprocess\": () => true},\n {\"name\": \"div\", \"symbols\": [(lexer.has(\"div\") ? {type: \"div\"} : div)], \"postprocess\": nul},\n {\"name\": \"exp\", \"symbols\": [\"mul\", \"mul\"], \"postprocess\": nul},\n {\"name\": \"mul\", \"symbols\": [(lexer.has(\"mul\") ? {type: \"mul\"} : mul)], \"postprocess\": nul},\n {\"name\": \"eq\", \"symbols\": [(lexer.has(\"eq\") ? {type: \"eq\"} : eq)], \"postprocess\": nul},\n {\"name\": \"not_eq\", \"symbols\": [(lexer.has(\"not_eq\") ? {type: \"not_eq\"} : not_eq)], \"postprocess\": nul},\n {\"name\": \"eq_algebraic\", \"symbols\": [(lexer.has(\"eq_algebraic\") ? {type: \"eq_algebraic\"} : eq_algebraic)], \"postprocess\": nul},\n {\"name\": \"lt\", \"symbols\": [(lexer.has(\"lt\") ? {type: \"lt\"} : lt)], \"postprocess\": nul},\n {\"name\": \"gt\", \"symbols\": [(lexer.has(\"gt\") ? {type: \"gt\"} : gt)], \"postprocess\": nul},\n {\"name\": \"lte\", \"symbols\": [(lexer.has(\"lte\") ? {type: \"lte\"} : lte)], \"postprocess\": nul},\n {\"name\": \"gte\", \"symbols\": [(lexer.has(\"gte\") ? {type: \"gte\"} : gte)], \"postprocess\": nul},\n {\"name\": \"and\", \"symbols\": [(lexer.has(\"and\") ? {type: \"and\"} : and)], \"postprocess\": nul},\n {\"name\": \"and\", \"symbols\": [(lexer.has(\"et\") ? {type: \"et\"} : et)], \"postprocess\": nul},\n {\"name\": \"and\", \"symbols\": [{\"literal\":\"&\"}], \"postprocess\": nul},\n {\"name\": \"or\", \"symbols\": [(lexer.has(\"or\") ? {type: \"or\"} : or)], \"postprocess\": nul},\n {\"name\": \"or\", \"symbols\": [(lexer.has(\"ou\") ? {type: \"ou\"} : ou)], \"postprocess\": nul},\n {\"name\": \"or\", \"symbols\": [{\"literal\":\"|\"}], \"postprocess\": nul},\n {\"name\": \"is_empty\", \"symbols\": [(lexer.has(\"is_empty\") ? {type: \"is_empty\"} : is_empty)], \"postprocess\": nul},\n {\"name\": \"is_not_empty\", \"symbols\": [(lexer.has(\"is_not_empty\") ? {type: \"is_not_empty\"} : is_not_empty)], \"postprocess\": nul},\n {\"name\": \"contains\", \"symbols\": [(lexer.has(\"contains\") ? {type: \"contains\"} : contains)], \"postprocess\": nul},\n {\"name\": \"does_not_contain\", \"symbols\": [(lexer.has(\"does_not_contain\") ? {type: \"does_not_contain\"} : does_not_contain)], \"postprocess\": nul},\n {\"name\": \"not\", \"symbols\": [(lexer.has(\"not\") ? {type: \"not\"} : not)], \"postprocess\": nul},\n {\"name\": \"not\", \"symbols\": [(lexer.has(\"non\") ? {type: \"non\"} : non)], \"postprocess\": nul},\n {\"name\": \"not\", \"symbols\": [{\"literal\":\"^\"}], \"postprocess\": nul},\n {\"name\": \"true\", \"symbols\": [(lexer.has(\"true\") ? {type: \"true\"} : true)], \"postprocess\": () => true},\n {\"name\": \"false\", \"symbols\": [(lexer.has(\"false\") ? {type: \"false\"} : false)], \"postprocess\": () => false},\n {\"name\": \"fn_min\", \"symbols\": [(lexer.has(\"fn_min\") ? {type: \"fn_min\"} : fn_min), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_max\", \"symbols\": [(lexer.has(\"fn_max\") ? {type: \"fn_max\"} : fn_max), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_sum\", \"symbols\": [(lexer.has(\"fn_som\") ? {type: \"fn_som\"} : fn_som), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_sum\", \"symbols\": [(lexer.has(\"fn_sum\") ? {type: \"fn_sum\"} : fn_sum), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_smr\", \"symbols\": [(lexer.has(\"fn_smr\") ? {type: \"fn_smr\"} : fn_smr), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_sm2\", \"symbols\": [(lexer.has(\"fn_sm2\") ? {type: \"fn_sm2\"} : fn_sm2), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_ind\", \"symbols\": [(lexer.has(\"fn_ind\") ? {type: \"fn_ind\"} : fn_ind), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_prj\", \"symbols\": [(lexer.has(\"fn_prj\") ? {type: \"fn_prj\"} : fn_prj), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_if\", \"symbols\": [(lexer.has(\"fn_if\") ? {type: \"fn_if\"} : fn_if), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_if\", \"symbols\": [(lexer.has(\"fn_si\") ? {type: \"fn_si\"} : fn_si), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_v01\", \"symbols\": [(lexer.has(\"fn_v01\") ? {type: \"fn_v01\"} : fn_v01), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_nbr\", \"symbols\": [(lexer.has(\"fn_nbr\") ? {type: \"fn_nbr\"} : fn_nbr), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_sgn\", \"symbols\": [(lexer.has(\"fn_sgn\") ? {type: \"fn_sgn\"} : fn_sgn), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_cmp\", \"symbols\": [(lexer.has(\"fn_cmp\") ? {type: \"fn_cmp\"} : fn_cmp), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_cmr\", \"symbols\": [(lexer.has(\"fn_cmr\") ? {type: \"fn_cmr\"} : fn_cmr), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_meq\", \"symbols\": [(lexer.has(\"fn_meq\") ? {type: \"fn_meq\"} : fn_meq), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_mnb\", \"symbols\": [(lexer.has(\"fn_mnb\") ? {type: \"fn_mnb\"} : fn_mnb), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_rng\", \"symbols\": [(lexer.has(\"fn_rng\") ? {type: \"fn_rng\"} : fn_rng), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_rnk\", \"symbols\": [(lexer.has(\"fn_rnk\") ? {type: \"fn_rnk\"} : fn_rnk), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_sqr\", \"symbols\": [(lexer.has(\"fn_sqr\") ? {type: \"fn_sqr\"} : fn_sqr), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_ln\", \"symbols\": [(lexer.has(\"fn_ln\") ? {type: \"fn_ln\"} : fn_ln), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_log\", \"symbols\": [(lexer.has(\"fn_log\") ? {type: \"fn_log\"} : fn_log), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_abs\", \"symbols\": [(lexer.has(\"fn_abs\") ? {type: \"fn_abs\"} : fn_abs), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_trc\", \"symbols\": [(lexer.has(\"fn_trc\") ? {type: \"fn_trc\"} : fn_trc), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_ran\", \"symbols\": [(lexer.has(\"fn_ran\") ? {type: \"fn_ran\"} : fn_ran), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_mod\", \"symbols\": [(lexer.has(\"fn_mod\") ? {type: \"fn_mod\"} : fn_mod), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_exp\", \"symbols\": [(lexer.has(\"fn_exp\") ? {type: \"fn_exp\"} : fn_exp), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_jul\", \"symbols\": [(lexer.has(\"fn_jul\") ? {type: \"fn_jul\"} : fn_jul), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_yea\", \"symbols\": [(lexer.has(\"fn_yea\") ? {type: \"fn_yea\"} : fn_yea), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_mon\", \"symbols\": [(lexer.has(\"fn_mon\") ? {type: \"fn_mon\"} : fn_mon), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_day\", \"symbols\": [(lexer.has(\"fn_day\") ? {type: \"fn_day\"} : fn_day), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_wkd\", \"symbols\": [(lexer.has(\"fn_wkd\") ? {type: \"fn_wkd\"} : fn_wkd), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_qta\", \"symbols\": [(lexer.has(\"fn_qta\") ? {type: \"fn_qta\"} : fn_qta), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_qtf\", \"symbols\": [(lexer.has(\"fn_qtf\") ? {type: \"fn_qtf\"} : fn_qtf), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_qtc\", \"symbols\": [(lexer.has(\"fn_qtc\") ? {type: \"fn_qtc\"} : fn_qtc), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_str\", \"symbols\": [(lexer.has(\"fn_str\") ? {type: \"fn_str\"} : fn_str), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_nbc\", \"symbols\": [(lexer.has(\"fn_nbc\") ? {type: \"fn_nbc\"} : fn_nbc), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_rnb\", \"symbols\": [(lexer.has(\"fn_rnb\") ? {type: \"fn_rnb\"} : fn_rnb), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_rxy\", \"symbols\": [(lexer.has(\"fn_rxy\") ? {type: \"fn_rxy\"} : fn_rxy), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_nbl\", \"symbols\": [(lexer.has(\"fn_nbl\") ? {type: \"fn_nbl\"} : fn_nbl), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_csm\", \"symbols\": [(lexer.has(\"fn_csm\") ? {type: \"fn_csm\"} : fn_csm), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_cmx\", \"symbols\": [(lexer.has(\"fn_cmx\") ? {type: \"fn_cmx\"} : fn_cmx), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_cmn\", \"symbols\": [(lexer.has(\"fn_cmn\") ? {type: \"fn_cmn\"} : fn_cmn), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_cor\", \"symbols\": [(lexer.has(\"fn_cor\") ? {type: \"fn_cor\"} : fn_cor), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_can\", \"symbols\": [(lexer.has(\"fn_can\") ? {type: \"fn_can\"} : fn_can), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_cin\", \"symbols\": [(lexer.has(\"fn_cin\") ? {type: \"fn_cin\"} : fn_cin), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_mov\", \"symbols\": [(lexer.has(\"fn_mov\") ? {type: \"fn_mov\"} : fn_mov), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_mst\", \"symbols\": [(lexer.has(\"fn_mst\") ? {type: \"fn_mst\"} : fn_mst), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_mvc\", \"symbols\": [(lexer.has(\"fn_mvc\") ? {type: \"fn_mvc\"} : fn_mvc), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_fsr\", \"symbols\": [(lexer.has(\"fn_fsr\") ? {type: \"fn_fsr\"} : fn_fsr), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_qtisavail\", \"symbols\": [(lexer.has(\"fn_qtisavail\") ? {type: \"fn_qtisavail\"} : fn_qtisavail), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_qtareavail\", \"symbols\": [(lexer.has(\"fn_qtareavail\") ? {type: \"fn_qtareavail\"} : fn_qtareavail), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_getavailqt\", \"symbols\": [(lexer.has(\"fn_getavailqt\") ? {type: \"fn_getavailqt\"} : fn_getavailqt), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_selrandqt\", \"symbols\": [(lexer.has(\"fn_selrandqt\") ? {type: \"fn_selrandqt\"} : fn_selrandqt), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_qtisavailresp\", \"symbols\": [(lexer.has(\"fn_qtisavailresp\") ? {type: \"fn_qtisavailresp\"} : fn_qtisavailresp), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_qtareavailresp\", \"symbols\": [(lexer.has(\"fn_qtareavailresp\") ? {type: \"fn_qtareavailresp\"} : fn_qtareavailresp), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_getavailqtresp\", \"symbols\": [(lexer.has(\"fn_getavailqtresp\") ? {type: \"fn_getavailqtresp\"} : fn_getavailqtresp), \"_\"], \"postprocess\": nul},\n {\"name\": \"fn_selrandqtresp\", \"symbols\": [(lexer.has(\"fn_selrandqtresp\") ? {type: \"fn_selrandqtresp\"} : fn_selrandqtresp), \"_\"], \"postprocess\": nul},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"identifier\") ? {type: \"identifier\"} : identifier)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_min\") ? {type: \"fn_min\"} : fn_min)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_max\") ? {type: \"fn_max\"} : fn_max)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_sum\") ? {type: \"fn_sum\"} : fn_sum)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_smr\") ? {type: \"fn_smr\"} : fn_smr)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_sm2\") ? {type: \"fn_sm2\"} : fn_sm2)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_ind\") ? {type: \"fn_ind\"} : fn_ind)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_prj\") ? {type: \"fn_prj\"} : fn_prj)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_if\") ? {type: \"fn_if\"} : fn_if)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_v01\") ? {type: \"fn_v01\"} : fn_v01)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_nbr\") ? {type: \"fn_nbr\"} : fn_nbr)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_sgn\") ? {type: \"fn_sgn\"} : fn_sgn)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_cmp\") ? {type: \"fn_cmp\"} : fn_cmp)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_cmr\") ? {type: \"fn_cmr\"} : fn_cmr)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_meq\") ? {type: \"fn_meq\"} : fn_meq)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_mnb\") ? {type: \"fn_mnb\"} : fn_mnb)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_rng\") ? {type: \"fn_rng\"} : fn_rng)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_rnk\") ? {type: \"fn_rnk\"} : fn_rnk)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_sqr\") ? {type: \"fn_sqr\"} : fn_sqr)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_ln\") ? {type: \"fn_ln\"} : fn_ln)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_log\") ? {type: \"fn_log\"} : fn_log)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_abs\") ? {type: \"fn_abs\"} : fn_abs)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_trc\") ? {type: \"fn_trc\"} : fn_trc)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_ran\") ? {type: \"fn_ran\"} : fn_ran)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_mod\") ? {type: \"fn_mod\"} : fn_mod)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_exp\") ? {type: \"fn_exp\"} : fn_exp)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_jul\") ? {type: \"fn_jul\"} : fn_jul)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_yea\") ? {type: \"fn_yea\"} : fn_yea)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_mon\") ? {type: \"fn_mon\"} : fn_mon)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_day\") ? {type: \"fn_day\"} : fn_day)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_wkd\") ? {type: \"fn_wkd\"} : fn_wkd)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_qta\") ? {type: \"fn_qta\"} : fn_qta)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_qtf\") ? {type: \"fn_qtf\"} : fn_qtf)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_qtc\") ? {type: \"fn_qtc\"} : fn_qtc)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_str\") ? {type: \"fn_str\"} : fn_str)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_nbc\") ? {type: \"fn_nbc\"} : fn_nbc)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_rnb\") ? {type: \"fn_rnb\"} : fn_rnb)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_rxy\") ? {type: \"fn_rxy\"} : fn_rxy)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_nbl\") ? {type: \"fn_nbl\"} : fn_nbl)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_csm\") ? {type: \"fn_csm\"} : fn_csm)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_cmx\") ? {type: \"fn_cmx\"} : fn_cmx)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_cmn\") ? {type: \"fn_cmn\"} : fn_cmn)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_cor\") ? {type: \"fn_cor\"} : fn_cor)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_can\") ? {type: \"fn_can\"} : fn_can)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_cin\") ? {type: \"fn_cin\"} : fn_cin)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_mov\") ? {type: \"fn_mov\"} : fn_mov)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_mst\") ? {type: \"fn_mst\"} : fn_mst)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_mvc\") ? {type: \"fn_mvc\"} : fn_mvc)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"not\") ? {type: \"not\"} : not)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_si\") ? {type: \"fn_si\"} : fn_si)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_qtisavail\") ? {type: \"fn_qtisavail\"} : fn_qtisavail)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_qtareavail\") ? {type: \"fn_qtareavail\"} : fn_qtareavail)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_getavailqt\") ? {type: \"fn_getavailqt\"} : fn_getavailqt)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_selrandqt\") ? {type: \"fn_selrandqt\"} : fn_selrandqt)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_qtisavailresp\") ? {type: \"fn_qtisavailresp\"} : fn_qtisavailresp)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_qtareavailresp\") ? {type: \"fn_qtareavailresp\"} : fn_qtareavailresp)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_getavailqtresp\") ? {type: \"fn_getavailqtresp\"} : fn_getavailqtresp)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"fn_selrandqtresp\") ? {type: \"fn_selrandqtresp\"} : fn_selrandqtresp)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"et\") ? {type: \"et\"} : et)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"ou\") ? {type: \"ou\"} : ou)], \"postprocess\": val},\n {\"name\": \"identifier\", \"symbols\": [(lexer.has(\"non\") ? {type: \"non\"} : non)], \"postprocess\": val},\n {\"name\": \"_$ebnf$1\", \"symbols\": []},\n {\"name\": \"_$ebnf$1\", \"symbols\": [\"_$ebnf$1\", (lexer.has(\"ws\") ? {type: \"ws\"} : ws)], \"postprocess\": function arrpush(d) {return d[0].concat([d[1]]);}},\n {\"name\": \"_\", \"symbols\": [\"_$ebnf$1\"], \"postprocess\": nul},\n {\"name\": \"__$ebnf$1\", \"symbols\": [(lexer.has(\"ws\") ? {type: \"ws\"} : ws)]},\n {\"name\": \"__$ebnf$1\", \"symbols\": [\"__$ebnf$1\", (lexer.has(\"ws\") ? {type: \"ws\"} : ws)], \"postprocess\": function arrpush(d) {return d[0].concat([d[1]]);}},\n {\"name\": \"__\", \"symbols\": [\"__$ebnf$1\"], \"postprocess\": nul}\n]\n , ParserStart: \"adv_expression\"\n}\nif (typeof module !== 'undefined'&& typeof module.exports !== 'undefined') {\n module.exports = grammar;\n} else {\n window.grammar = grammar;\n}\n})();\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nimport ___CSS_LOADER_GET_URL_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/getUrl.js\";\nvar ___CSS_LOADER_URL_IMPORT_0___ = new URL(\"icons_mobiscroll.woff?gniomg\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_1___ = new URL(\"icons_mobiscroll.woff\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_2___ = new URL(\"icons_mobiscroll.ttf?gniomg\", import.meta.url);\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);\nvar ___CSS_LOADER_URL_REPLACEMENT_1___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___);\nvar ___CSS_LOADER_URL_REPLACEMENT_2___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_2___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".mbsc-cloak{visibility:hidden !important}.mbsc-empty{text-align:center;margin:3em;color:inherit}.mbsc-empty h3{margin:.666666em 0;padding:0;color:inherit;font-size:1.5em;font-weight:normal;font-family:inherit}.mbsc-empty p{margin:1em 0;padding:0;font-size:1em;line-height:1.5}.mbsc-anim-trans .mbsc-fr-scroll{overflow:hidden}.mbsc-anim-trans-flip .mbsc-fr-persp,.mbsc-anim-trans-swing .mbsc-fr-persp{-webkit-perspective:1000px;perspective:1000px}.mbsc-anim-trans .mbsc-fr-popup,.mbsc-anim-trans .mbsc-fr-overlay{-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.mbsc-anim-in .mbsc-fr-popup,.mbsc-anim-in .mbsc-fr-overlay{-webkit-animation-timing-function:ease-out;-webkit-animation-duration:225ms;animation-timing-function:ease-out;animation-duration:225ms}.mbsc-anim-out .mbsc-fr-popup,.mbsc-anim-out .mbsc-fr-overlay{-webkit-animation-timing-function:ease-in;-webkit-animation-duration:195ms;animation-timing-function:ease-in;animation-duration:195ms}.mbsc-anim-in .mbsc-fr-overlay{-webkit-animation-name:mbsc-anim-f-in;animation-name:mbsc-anim-f-in}.mbsc-anim-out .mbsc-fr-overlay{-webkit-animation-name:mbsc-anim-f-out;animation-name:mbsc-anim-f-out}.mbsc-anim-flip,.mbsc-anim-swing,.mbsc-anim-slidehorizontal,.mbsc-anim-slidevertical,.mbsc-anim-slidedown,.mbsc-anim-slideup,.mbsc-anim-fade{-webkit-backface-visibility:hidden;-webkit-transform:translateX(0);backface-visibility:hidden;transform:translateX(0)}.mbsc-anim-swing,.mbsc-anim-slidehorizontal,.mbsc-anim-slidevertical,.mbsc-anim-slidedown,.mbsc-anim-slideup,.mbsc-anim-fade{-webkit-transform-origin:0 0;transform-origin:0 0}.mbsc-anim-flip,.mbsc-anim-pop{-webkit-transform-origin:50% 50%;transform-origin:50% 50%}.mbsc-anim-in .mbsc-anim-pop{opacity:1;-webkit-animation-name:mbsc-anim-p-in;-webkit-animation-duration:100ms;-webkit-transform:scale(1);animation-name:mbsc-anim-p-in;animation-duration:100ms;transform:scale(1)}.mbsc-anim-out .mbsc-anim-pop{opacity:0;-webkit-animation-name:mbsc-anim-p-out;-webkit-animation-duration:150ms;animation-name:mbsc-anim-p-out;animation-duration:150ms}.mbsc-anim-trans-pop .mbsc-fr-overlay{-webkit-animation-duration:150ms;animation-duration:150ms}.mbsc-anim-in .mbsc-anim-flip{opacity:1;-webkit-animation-name:mbsc-anim-fl-in;-webkit-transform:scale(1);animation-name:mbsc-anim-fl-in;transform:scale(1)}.mbsc-anim-out .mbsc-anim-flip{opacity:0;-webkit-animation-name:mbsc-anim-fl-out;animation-name:mbsc-anim-fl-out}.mbsc-anim-in .mbsc-anim-swing{opacity:1;-webkit-animation-name:mbsc-anim-sw-in;-webkit-transform:scale(1);transform:scale(1);animation-name:mbsc-anim-sw-in}.mbsc-anim-out .mbsc-anim-swing{opacity:0;-webkit-animation-name:mbsc-anim-sw-out;animation-name:mbsc-anim-sw-out}.mbsc-anim-in .mbsc-anim-slidehorizontal{opacity:1;-webkit-animation-name:mbsc-anim-sh-in;-webkit-transform:scale(1);transform:scale(1);animation-name:mbsc-anim-sh-in}.mbsc-anim-out .mbsc-anim-slidehorizontal{opacity:0;-webkit-animation-name:mbsc-anim-sh-out;animation-name:mbsc-anim-sh-out}.mbsc-anim-in .mbsc-anim-slidevertical{opacity:1;-webkit-animation-name:mbsc-anim-sv-in;-webkit-transform:scale(1);animation-name:mbsc-anim-sv-in;transform:scale(1)}.mbsc-anim-out .mbsc-anim-slidevertical{opacity:0;-webkit-animation-name:mbsc-anim-sv-out;animation-name:mbsc-anim-sv-out}.mbsc-anim-in .mbsc-anim-slidedown{-webkit-animation-name:mbsc-anim-sd-in;-webkit-transform:scale(1);animation-name:mbsc-anim-sd-in;transform:scale(1)}.mbsc-anim-out .mbsc-anim-slidedown{-webkit-animation-name:mbsc-anim-sd-out;-webkit-transform:translateY(-100%);animation-name:mbsc-anim-sd-out}.mbsc-anim-in .mbsc-anim-slideup{-webkit-animation-name:mbsc-anim-su-in;-webkit-transform:scale(1);transform:scale(1);animation-name:mbsc-anim-su-in}.mbsc-anim-out .mbsc-anim-slideup{-webkit-animation-name:mbsc-anim-su-out;-webkit-transform:translateY(100%);animation-name:mbsc-anim-su-out}.mbsc-anim-in .mbsc-anim-fade{opacity:1;-webkit-animation-name:mbsc-anim-f-in;animation-name:mbsc-anim-f-in}.mbsc-anim-out .mbsc-anim-fade{opacity:0;-webkit-animation-name:mbsc-anim-f-out;animation-name:mbsc-anim-f-out}.mbsc-fr-pointer.mbsc-anim-in .mbsc-anim-slidedown{-webkit-animation-name:mbsc-anim-sd-in, mbsc-anim-f-in;animation-name:mbsc-anim-sd-in, mbsc-anim-f-in}.mbsc-fr-pointer.mbsc-anim-out .mbsc-anim-slidedown{-webkit-animation-name:mbsc-anim-sd-out, mbsc-anim-f-out;animation-name:mbsc-anim-sd-out, mbsc-anim-f-out}.mbsc-fr-pointer.mbsc-anim-in .mbsc-anim-slideup{-webkit-animation-name:mbsc-anim-su-in, mbsc-anim-f-in;animation-name:mbsc-anim-su-in, mbsc-anim-f-in}.mbsc-fr-pointer.mbsc-anim-out .mbsc-anim-slideup{-webkit-animation-name:mbsc-anim-su-out, mbsc-anim-f-out;animation-name:mbsc-anim-su-out, mbsc-anim-f-out}@keyframes mbsc-anim-f-in{from{opacity:0}to{opacity:1}}@-webkit-keyframes mbsc-anim-f-in{from{opacity:0}to{opacity:1}}@keyframes mbsc-anim-f-out{from{visibility:visible;opacity:1}to{opacity:0}}@-webkit-keyframes mbsc-anim-f-out{from{visibility:visible;opacity:1}to{opacity:0}}@keyframes mbsc-anim-p-in{from{opacity:0;transform:scale(0.8)}to{opacity:1;transform:scale(1)}}@-webkit-keyframes mbsc-anim-p-in{from{opacity:0;-webkit-transform:scale(0.8)}to{opacity:1;-webkit-transform:scale(1)}}@keyframes mbsc-anim-p-out{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0.8)}}@-webkit-keyframes mbsc-anim-p-out{from{opacity:1;-webkit-transform:scale(1)}to{opacity:0;-webkit-transform:scale(0.8)}}@keyframes mbsc-anim-fl-in{from{opacity:0;transform:rotateY(90deg)}to{opacity:1;transform:rotateY(0)}}@-webkit-keyframes mbsc-anim-fl-in{from{opacity:0;-webkit-transform:rotateY(90deg)}to{opacity:1;-webkit-transform:rotateY(0)}}@keyframes mbsc-anim-fl-out{from{opacity:1;transform:rotateY(0deg)}to{opacity:0;transform:rotateY(-90deg)}}@-webkit-keyframes mbsc-anim-fl-out{from{opacity:1;-webkit-transform:rotateY(0deg)}to{opacity:0;-webkit-transform:rotateY(-90deg)}}@keyframes mbsc-anim-sw-in{from{opacity:0;transform:rotateY(-90deg)}to{opacity:1;transform:rotateY(0deg)}}@-webkit-keyframes mbsc-anim-sw-in{from{opacity:0;-webkit-transform:rotateY(-90deg)}to{opacity:1;-webkit-transform:rotateY(0deg)}}@keyframes mbsc-anim-sw-out{from{opacity:1;transform:rotateY(0deg)}to{opacity:0;transform:rotateY(-90deg)}}@-webkit-keyframes mbsc-anim-sw-out{from{opacity:1;-webkit-transform:rotateY(0deg)}to{opacity:0;-webkit-transform:rotateY(-90deg)}}@keyframes mbsc-anim-sh-in{from{opacity:0;transform:translateX(-100%)}to{opacity:1;transform:translateX(0)}}@-webkit-keyframes mbsc-anim-sh-in{from{opacity:0;-webkit-transform:translateX(-100%)}to{opacity:1;-webkit-transform:translateX(0)}}@keyframes mbsc-anim-sh-out{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(100%)}}@-webkit-keyframes mbsc-anim-sh-out{from{opacity:1;-webkit-transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(100%)}}@keyframes mbsc-anim-sv-in{from{opacity:0;transform:translateY(-100%)}to{opacity:1;transform:translateY(0)}}@-webkit-keyframes mbsc-anim-sv-in{from{opacity:0;-webkit-transform:translateY(-100%)}to{opacity:1;-webkit-transform:translateY(0)}}@keyframes mbsc-anim-sv-out{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(100%)}}@-webkit-keyframes mbsc-anim-sv-out{from{opacity:1;-webkit-transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(100%)}}@keyframes mbsc-anim-sd-in{from{transform:translateY(-100%)}to{transform:translateY(0)}}@-webkit-keyframes mbsc-anim-sd-in{from{opacity:1;-webkit-transform:translateY(-100%)}to{opacity:1;-webkit-transform:translateY(0)}}@keyframes mbsc-anim-sd-out{from{transform:translateY(0)}to{transform:translateY(-100%)}}@-webkit-keyframes mbsc-anim-sd-out{from{opacity:1;-webkit-transform:translateY(0)}to{opacity:1;-webkit-transform:translateY(-100%)}}@keyframes mbsc-anim-su-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@-webkit-keyframes mbsc-anim-su-in{from{opacity:1;-webkit-transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0)}}@keyframes mbsc-anim-su-out{from{transform:translateY(0)}to{transform:translateY(100%)}}@-webkit-keyframes mbsc-anim-su-out{from{opacity:1;-webkit-transform:translateY(0)}to{opacity:1;-webkit-transform:translateY(100%)}}@font-face{font-family:'icons_mobiscroll';src:url(\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \") format(\\\"woff\\\"),url(\" + ___CSS_LOADER_URL_REPLACEMENT_1___ + \") format(\\\"woff\\\"),url(\" + ___CSS_LOADER_URL_REPLACEMENT_2___ + \") format(\\\"truetype\\\");font-weight:normal;font-style:normal}.mbsc-ic:before{font-family:'icons_mobiscroll';speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.mbsc-ic-aid::before{content:\\\"\\\\ea01\\\"}.mbsc-ic-airplane::before{content:\\\"\\\\ea02\\\"}.mbsc-ic-alarm2::before{content:\\\"\\\\ea03\\\"}.mbsc-ic-arrow-down5::before{content:\\\"\\\\ea04\\\"}.mbsc-ic-arrow-left5::before{content:\\\"\\\\ea05\\\"}.mbsc-ic-arrow-left6::before{content:\\\"\\\\ea06\\\"}.mbsc-ic-arrow-right5::before{content:\\\"\\\\ea07\\\"}.mbsc-ic-arrow-right6::before{content:\\\"\\\\ea08\\\"}.mbsc-ic-arrow-up5::before{content:\\\"\\\\ea09\\\"}.mbsc-ic-attachment::before{content:\\\"\\\\ea0a\\\"}.mbsc-ic-bars::before{content:\\\"\\\\ea0b\\\"}.mbsc-ic-book::before{content:\\\"\\\\ea0c\\\"}.mbsc-ic-bubble::before{content:\\\"\\\\ea0d\\\"}.mbsc-ic-bubbles::before{content:\\\"\\\\ea0e\\\"}.mbsc-ic-bullhorn::before{content:\\\"\\\\ea0f\\\"}.mbsc-ic-calendar::before{content:\\\"\\\\ea10\\\"}.mbsc-ic-camera::before{content:\\\"\\\\ea11\\\"}.mbsc-ic-cart::before{content:\\\"\\\\ea12\\\"}.mbsc-ic-checkmark::before{content:\\\"\\\\ea13\\\"}.mbsc-ic-clock::before{content:\\\"\\\\ea14\\\"}.mbsc-ic-close::before{content:\\\"\\\\ea15\\\"}.mbsc-ic-cloud-download::before{content:\\\"\\\\ea16\\\"}.mbsc-ic-cloud-upload::before{content:\\\"\\\\ea17\\\"}.mbsc-ic-cogs::before{content:\\\"\\\\ea18\\\"}.mbsc-ic-connection::before{content:\\\"\\\\ea19\\\"}.mbsc-ic-copy2::before{content:\\\"\\\\ea1a\\\"}.mbsc-ic-copy3::before{content:\\\"\\\\ea1b\\\"}.mbsc-ic-credit::before{content:\\\"\\\\ea1c\\\"}.mbsc-ic-disk::before{content:\\\"\\\\ea1d\\\"}.mbsc-ic-download::before{content:\\\"\\\\ea1e\\\"}.mbsc-ic-drawer::before{content:\\\"\\\\ea1f\\\"}.mbsc-ic-droplet::before{content:\\\"\\\\ea20\\\"}.mbsc-ic-earth::before{content:\\\"\\\\ea21\\\"}.mbsc-ic-eye-blocked::before{content:\\\"\\\\ea22\\\"}.mbsc-ic-eye::before{content:\\\"\\\\ea23\\\"}.mbsc-ic-fa-globe::before{content:\\\"\\\\ea24\\\"}.mbsc-ic-fa-leaf::before{content:\\\"\\\\ea25\\\"}.mbsc-ic-fa-mail-reply::before{content:\\\"\\\\ea26\\\"}.mbsc-ic-fa-retweet::before{content:\\\"\\\\ea27\\\"}.mbsc-ic-fa-rotate-left::before{content:\\\"\\\\ea28\\\"}.mbsc-ic-file4::before{content:\\\"\\\\ea29\\\"}.mbsc-ic-film::before{content:\\\"\\\\ea2a\\\"}.mbsc-ic-flag::before{content:\\\"\\\\ea2b\\\"}.mbsc-ic-folder::before{content:\\\"\\\\ea2c\\\"}.mbsc-ic-forward::before{content:\\\"\\\\ea2d\\\"}.mbsc-ic-foundation-mail::before{content:\\\"\\\\ea2e\\\"}.mbsc-ic-foundation-minus-circle::before{content:\\\"\\\\ea2f\\\"}.mbsc-ic-globe::before{content:\\\"\\\\ea30\\\"}.mbsc-ic-heart::before{content:\\\"\\\\ea31\\\"}.mbsc-ic-history::before{content:\\\"\\\\ea32\\\"}.mbsc-ic-home::before{content:\\\"\\\\ea33\\\"}.mbsc-ic-image2::before{content:\\\"\\\\ea34\\\"}.mbsc-ic-ion-android-system-windows::before{content:\\\"\\\\ea35\\\"}.mbsc-ic-ion-bluetooth::before{content:\\\"\\\\ea36\\\"}.mbsc-ic-ion-navigate::before{content:\\\"\\\\ea37\\\"}.mbsc-ic-key2::before{content:\\\"\\\\ea38\\\"}.mbsc-ic-library::before{content:\\\"\\\\ea39\\\"}.mbsc-ic-line-settings::before{content:\\\"\\\\ea3a\\\"}.mbsc-ic-link::before{content:\\\"\\\\ea3b\\\"}.mbsc-ic-location::before{content:\\\"\\\\ea3c\\\"}.mbsc-ic-lock2::before{content:\\\"\\\\ea3d\\\"}.mbsc-ic-loop2::before{content:\\\"\\\\ea3e\\\"}.mbsc-ic-map::before{content:\\\"\\\\ea3f\\\"}.mbsc-ic-material-arrow-back::before{content:\\\"\\\\ea40\\\"}.mbsc-ic-material-brightness-medium::before{content:\\\"\\\\ea41\\\"}.mbsc-ic-material-check::before{content:\\\"\\\\ea42\\\"}.mbsc-ic-material-crop::before{content:\\\"\\\\ea43\\\"}.mbsc-ic-material-equalizer::before{content:\\\"\\\\ea44\\\"}.mbsc-ic-material-filter::before{content:\\\"\\\\ea45\\\"}.mbsc-ic-material-iso::before{content:\\\"\\\\ea46\\\"}.mbsc-ic-material-palette::before{content:\\\"\\\\ea47\\\"}.mbsc-ic-material-pause::before{content:\\\"\\\\ea48\\\"}.mbsc-ic-material-people::before{content:\\\"\\\\ea49\\\"}.mbsc-ic-material-photo-size-select-large::before{content:\\\"\\\\ea4a\\\"}.mbsc-ic-material-play-arrow::before{content:\\\"\\\\ea4b\\\"}.mbsc-ic-material-repeat::before{content:\\\"\\\\ea4c\\\"}.mbsc-ic-material-rotate-right::before{content:\\\"\\\\ea4d\\\"}.mbsc-ic-material-shuffle::before{content:\\\"\\\\ea4e\\\"}.mbsc-ic-material-skip-next::before{content:\\\"\\\\ea4f\\\"}.mbsc-ic-material-skip-previous::before{content:\\\"\\\\ea50\\\"}.mbsc-ic-material-stop::before{content:\\\"\\\\ea51\\\"}.mbsc-ic-material-texture::before{content:\\\"\\\\ea52\\\"}.mbsc-ic-material-wb-auto::before{content:\\\"\\\\ea53\\\"}.mbsc-ic-meteo-cloud2::before{content:\\\"\\\\ea54\\\"}.mbsc-ic-meteo-cloud3::before{content:\\\"\\\\ea55\\\"}.mbsc-ic-meteo-cloudy::before{content:\\\"\\\\ea56\\\"}.mbsc-ic-meteo-sun::before{content:\\\"\\\\ea57\\\"}.mbsc-ic-minus::before{content:\\\"\\\\ea58\\\"}.mbsc-ic-mobile::before{content:\\\"\\\\ea59\\\"}.mbsc-ic-music::before{content:\\\"\\\\ea5a\\\"}.mbsc-ic-neutral::before{content:\\\"\\\\ea5b\\\"}.mbsc-ic-newspaper::before{content:\\\"\\\\ea5c\\\"}.mbsc-ic-office::before{content:\\\"\\\\ea5d\\\"}.mbsc-ic-pencil::before{content:\\\"\\\\ea5e\\\"}.mbsc-ic-phone::before{content:\\\"\\\\ea5f\\\"}.mbsc-ic-play::before{content:\\\"\\\\ea60\\\"}.mbsc-ic-plus::before{content:\\\"\\\\ea61\\\"}.mbsc-ic-redo2::before{content:\\\"\\\\ea62\\\"}.mbsc-ic-remove::before{content:\\\"\\\\ea63\\\"}.mbsc-ic-reply::before{content:\\\"\\\\ea64\\\"}.mbsc-ic-sad::before{content:\\\"\\\\ea65\\\"}.mbsc-ic-sad2::before{content:\\\"\\\\ea66\\\"}.mbsc-ic-share::before{content:\\\"\\\\ea67\\\"}.mbsc-ic-smiley::before{content:\\\"\\\\ea68\\\"}.mbsc-ic-smiley2::before{content:\\\"\\\\ea69\\\"}.mbsc-ic-stack::before{content:\\\"\\\\ea6a\\\"}.mbsc-ic-star3::before{content:\\\"\\\\ea6b\\\"}.mbsc-ic-stopwatch::before{content:\\\"\\\\ea6c\\\"}.mbsc-ic-support::before{content:\\\"\\\\ea6d\\\"}.mbsc-ic-tag::before{content:\\\"\\\\ea6e\\\"}.mbsc-ic-thumbs-up::before{content:\\\"\\\\ea6f\\\"}.mbsc-ic-thumbs-up2::before{content:\\\"\\\\ea70\\\"}.mbsc-ic-undo2::before{content:\\\"\\\\ea71\\\"}.mbsc-ic-unlocked::before{content:\\\"\\\\ea72\\\"}.mbsc-ic-upload::before{content:\\\"\\\\ea73\\\"}.mbsc-ic-user4::before{content:\\\"\\\\ea74\\\"}.mbsc-ic-volume-high::before{content:\\\"\\\\ea75\\\"}.mbsc-ic-volume-medium::before{content:\\\"\\\\ea76\\\"}.mbsc-ic-volume-mute2::before{content:\\\"\\\\ea77\\\"}.mbsc-fr-w,.mbsc-fr-overlay{-webkit-transform:translateZ(0)}.mbsc-fr{pointer-events:none;z-index:99998;font-weight:normal;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-text-size-adjust:100%}.mbsc-fr-focus{outline:0}.mbsc-fr-lock-ctx{position:relative}.mbsc-fr-lock.mbsc-fr-lock-ios{overflow:hidden;position:absolute;top:0;bottom:0;left:0;right:0;height:auto}.mbsc-fr-pos{visibility:hidden}.mbsc-fr-scroll{position:relative;z-index:2;width:100%;height:100%;-ms-touch-action:pan-y;touch-action:pan-y;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}.mbsc-fr-popup{max-width:98%;position:absolute;z-index:2;top:0;left:0;font-size:12px;text-shadow:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-touch-action:pan-y;touch-action:pan-y}.mbsc-rtl{direction:rtl}.mbsc-fr-popup,.mbsc-fr-btn-cont,.mbsc-fr-arr{box-sizing:border-box}.mbsc-fr .mbsc-fr-w{box-sizing:content-box}.mbsc-fr-w{min-width:256px;max-width:100%;overflow:hidden;text-align:center;font-family:arial, verdana, sans-serif}.mbsc-fr,.mbsc-fr-persp,.mbsc-fr-overlay{position:fixed;top:0;bottom:0;left:0;right:0}.mbsc-fr-lock .mbsc-fr-persp{-ms-touch-action:none;touch-action:none}.mbsc-fr-lock-ctx>.mbsc-fr,.mbsc-fr-lock-ctx .mbsc-fr-persp,.mbsc-fr-lock-ctx .mbsc-fr-overlay{position:absolute}.mbsc-fr-persp{pointer-events:auto;overflow:hidden}.mbsc-fr-overlay{z-index:1;background:rgba(0,0,0,0.7)}.mbsc-fr-liq .mbsc-fr-popup{max-width:100%}.mbsc-fr-top .mbsc-fr-popup,.mbsc-fr-bottom .mbsc-fr-popup{width:100%;max-width:100%}.mbsc-fr-top .mbsc-fr-w,.mbsc-fr-bottom .mbsc-fr-w{padding-left:constant(safe-area-inset-left);padding-left:env(safe-area-inset-left);padding-right:constant(safe-area-inset-right);padding-right:env(safe-area-inset-right)}.mbsc-fr-bottom .mbsc-fr-w{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.mbsc-fr-top .mbsc-fr-popup{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.mbsc-fr-inline{position:relative;pointer-events:auto;z-index:0}.mbsc-fr-inline .mbsc-fr-popup{position:static;max-width:100%}.mbsc-fr-bubble,.mbsc-fr-bubble .mbsc-fr-persp{position:absolute}.mbsc-fr-bubble .mbsc-fr-arr-w{position:absolute;z-index:1;left:0;width:100%;overflow:hidden}.mbsc-fr-bubble-top .mbsc-fr-arr-w{top:100%}.mbsc-fr-bubble-bottom .mbsc-fr-arr-w{bottom:100%}.mbsc-fr-bubble .mbsc-fr-arr-i{margin:0 1.75em;position:relative;direction:ltr}.mbsc-fr-bubble .mbsc-fr-arr{display:block}.mbsc-fr-arr{display:none;position:relative;left:0;width:2em;height:2em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);margin-left:-1em}.mbsc-fr-bubble-bottom .mbsc-fr-arr{top:1.333334em}.mbsc-fr-bubble-top .mbsc-fr-arr{top:-1.333334em}.mbsc-fr-hdn{width:0;height:0;margin:0;padding:0;border:0;overflow:hidden}.mbsc-fr-hdr{overflow:hidden;text-overflow:ellipsis;text-align:center}.mbsc-fr-btn{overflow:hidden;display:block;text-decoration:none;white-space:nowrap;text-overflow:ellipsis;vertical-align:top}.mbsc-fr-btn-e{cursor:pointer}.mbsc-fr-btn.mbsc-disabled{cursor:not-allowed}.mbsc-fr-btn-cont{display:table;width:100%;text-align:center;white-space:normal}.mbsc-fr-btn-cont .mbsc-disabled{opacity:.3}.mbsc-fr-btn-w{vertical-align:top;display:table-cell;position:relative;z-index:5}.mbsc-fr-btn-w .mbsc-fr-btn:before{padding:.375em}.mbsc-fr-pointer.mbsc-fr .mbsc-fr-w .mbsc-fr-inline .mbsc-fr-w{box-shadow:none;border-radius:0}.mbsc-fr-pointer .mbsc-ltr .mbsc-fr-w,.mbsc-fr-pointer .mbsc-ltr .mbsc-sc-whl .mbsc-sel-gr{text-align:left}.mbsc-fr-pointer .mbsc-rtl .mbsc-fr-w,.mbsc-fr-pointer .mbsc-rtl .mbsc-sc-whl .mbsc-sel-gr{text-align:right}.mbsc-fr-pointer.mbsc-fr-top .mbsc-fr-w,.mbsc-fr-pointer.mbsc-fr-bottom .mbsc-fr-w{pointer-events:auto;display:inline-block;margin-top:3em;margin-bottom:3em;max-width:98%}.mbsc-fr-pointer.mbsc-fr-top .mbsc-fr-popup,.mbsc-fr-pointer.mbsc-fr-bottom .mbsc-fr-popup{text-align:center;pointer-events:none}.mbsc-fr-pointer.mbsc-fr-bubble .mbsc-fr-arr-w{display:none}.mbsc-fr-pointer .mbsc-sel-empty{text-align:center}.mbsc-mobiscroll .mbsc-fr-w{min-width:16em;font-size:16px}.mbsc-mobiscroll .mbsc-fr-hdr{padding:0 .6666em;padding-top:.6666em;font-size:.75em;text-transform:uppercase;min-height:2em;line-height:2em}.mbsc-mobiscroll .mbsc-fr-btn-cont{display:block;overflow:hidden;text-align:right;padding:0 .5em .5em .5em}.mbsc-mobiscroll .mbsc-ltr .mbsc-fr-btn-cont{text-align:right}.mbsc-mobiscroll .mbsc-rtl .mbsc-fr-btn-cont{text-align:left}.mbsc-mobiscroll .mbsc-fr-btn-w{display:inline-block}.mbsc-mobiscroll .mbsc-fr-btn{height:2.5em;line-height:2.5em;padding:0 1em;text-transform:uppercase}.mbsc-mobiscroll.mbsc-fr-center .mbsc-fr-w,.mbsc-mobiscroll.mbsc-fr-bubble .mbsc-fr-w{border-radius:.25em}.mbsc-mobiscroll.mbsc-fr-no-overlay .mbsc-fr-arr{box-shadow:0 0 1em rgba(0,0,0,0.2)}.mbsc-mobiscroll.mbsc-fr-no-overlay .mbsc-fr-w{box-shadow:0 0.125em 1em rgba(0,0,0,0.3)}.mbsc-mobiscroll.mbsc-fr-no-overlay.mbsc-fr-bubble .mbsc-fr-w{border-radius:.25em}.mbsc-mobiscroll .mbsc-fr-overlay{background:rgba(0,0,0,0.7)}.mbsc-mobiscroll .mbsc-fr-w{background:#f7f7f7;color:#454545}.mbsc-mobiscroll .mbsc-fr-hdr,.mbsc-mobiscroll .mbsc-fr-btn{color:#4eccc4}.mbsc-mobiscroll .mbsc-fr-btn.mbsc-active,.mbsc-mobiscroll.mbsc-no-touch .mbsc-fr-btn-e:not(.mbsc-disabled):hover{background:rgba(78,204,196,0.3)}.mbsc-mobiscroll .mbsc-fr-arr{background:#f7f7f7}.mbsc-sc-whl-o,.mbsc-sc-btn{-webkit-transform:translateZ(0)}.mbsc-sc .mbsc-sc-whl-c,.mbsc-sc .mbsc-sc-whl-l,.mbsc-sc .mbsc-sc-whl{box-sizing:content-box}.mbsc-sc-whl-gr-c,.mbsc-sc-itm{box-sizing:border-box}.mbsc-sc-whl-gr-c{position:relative;max-width:100%;vertical-align:middle;display:inline-block;overflow:hidden}.mbsc-fr-bottom .mbsc-sc-whl-gr-c:first-child:last-child,.mbsc-fr-top .mbsc-sc-whl-gr-c:first-child:last-child,.mbsc-fr-inline .mbsc-sc-whl-gr-c:first-child:last-child,.mbsc-fr-liq .mbsc-sc-whl-gr-c{display:block}.mbsc-sc-whl-gr{margin:0 auto;position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.mbsc-sc-whl-w{max-width:100%;position:relative;-ms-touch-action:none;touch-action:none}.mbsc-fr-pointer .mbsc-sc-whl-w,.mbsc-fr-liq .mbsc-sc-whl-w{-webkit-box-flex:1;-webkit-flex:1 auto;-ms-flex:1 auto;flex:1 auto}.mbsc-sc-whl-o{position:absolute;z-index:2;top:0;right:0;bottom:0;left:0;pointer-events:none;display:none}.mbsc-sc-whl-l{display:none;position:absolute;top:50%;left:0;right:0;pointer-events:none}.mbsc-sc-whl-w .mbsc-sc-whl-l{display:block}.mbsc-sc-whl{overflow:hidden;border-top:1px solid transparent;border-bottom:1px solid transparent;margin:-1px 0}.mbsc-sc-whl-c{position:relative;z-index:1;top:50%;border-top:1px solid transparent;border-bottom:1px solid transparent}.mbsc-sc-whl-sc{position:relative}.mbsc-sc-itm{position:relative;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mbsc-sc-itm-inv,.mbsc-sc-itm-inv-h{opacity:.3}.mbsc-sc-lbl{position:absolute;left:0;right:0;bottom:100%;display:none}.mbsc-sc-lbl-v .mbsc-sc-lbl{display:block}.mbsc-sc-btn{position:absolute;z-index:2;left:0;right:0;cursor:pointer;opacity:1;text-align:center;transition:opacity .2s linear}.mbsc-sc-btn:before{position:absolute;top:0;right:0;left:0}.mbsc-sc-whl-a .mbsc-sc-btn{opacity:0}.mbsc-sc-btn-plus{bottom:0}.mbsc-sc-btn-minus{top:0}.mbsc-sc-whl-gr-3d{-webkit-perspective:1200px;perspective:1200px}.mbsc-sc-whl-gr-3d .mbsc-sc-whl{overflow:visible}.mbsc-sc-whl-gr-3d .mbsc-sc-whl-c{overflow:hidden}.mbsc-sc-whl-gr-3d .mbsc-sc-whl-w,.mbsc-sc-whl-gr-3d .mbsc-sc-whl{transform-style:preserve-3d}.mbsc-sc-whl-3d{position:absolute;top:50%;left:0;right:0;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.mbsc-sc-itm-3d{position:absolute;width:100%;top:0;left:0;cursor:pointer;-webkit-backface-visibility:hidden;backface-visibility:hidden}.mbsc-sc-itm-del{display:none}.mbsc-sc-itm-ml{width:100%;height:auto;display:inline-block;vertical-align:middle;white-space:normal}.mbsc-sc-whl-multi .mbsc-sc-itm-sel:before{position:absolute;top:0;left:0;width:1em;text-align:center}.mbsc-fr-pointer .mbsc-fr-w .mbsc-sc-whl-gr-c,.mbsc-fr-pointer .mbsc-fr-w .mbsc-sc-whl-gr{padding:0}.mbsc-fr-pointer .mbsc-sc-whl-gr-c:first-child:last-child{display:block}.mbsc-sc-bar-c{position:absolute;z-index:4;top:0;bottom:0;right:0;width:10px;opacity:0;background:rgba(0,0,0,0.05);transform:translateZ(0);transition:opacity .2s}.mbsc-sc-bar{position:absolute;right:0;top:0;width:10px;height:100%}.mbsc-sc-bar:after{content:'';position:absolute;top:2px;right:2px;bottom:2px;left:2px;background:rgba(0,0,0,0.5);border-radius:3px}.mbsc-sc-whl-w:hover .mbsc-sc-bar-c,.mbsc-sc-whl-anim .mbsc-sc-bar-c{opacity:1}.mbsc-mobiscroll .mbsc-sc-whl-gr{padding:.5em .25em}.mbsc-mobiscroll .mbsc-sc-whl-w{margin:0 .25em}.mbsc-mobiscroll .mbsc-sc-lbl-v .mbsc-sc-whl-w{margin-top:1.875em}.mbsc-mobiscroll .mbsc-sc-lbl{font-size:.75em;line-height:2.5em;text-transform:uppercase}.mbsc-mobiscroll .mbsc-sc-cp .mbsc-sc-whl-w{padding:2em 0}.mbsc-mobiscroll .mbsc-sc-btn{height:2em;line-height:2em}.mbsc-mobiscroll .mbsc-sc-btn:before{font-size:1.5em}.mbsc-mobiscroll .mbsc-sc-itm{padding:0 .25em;font-size:1.375em}.mbsc-mobiscroll.mbsc-no-touch .mbsc-sc-itm.mbsc-btn-e:hover,.mbsc-mobiscroll .mbsc-sc-itm:focus{outline:0}.mbsc-mobiscroll .mbsc-sc-whl-multi .mbsc-sc-itm{padding:0 1.818181em}.mbsc-mobiscroll .mbsc-sc-whl-multi .mbsc-sc-itm-sel:before{font-size:1.818181em}.mbsc-mobiscroll.mbsc-fr-pointer .mbsc-sc-lbl{padding-left:1.666667em;padding-right:1.666667em}.mbsc-mobiscroll.mbsc-fr-pointer .mbsc-sc-whl-w{margin-left:0;margin-right:0}.mbsc-mobiscroll.mbsc-fr-pointer .mbsc-sc-itm{font-size:1em;padding:0 1.25em}.mbsc-mobiscroll.mbsc-fr-pointer .mbsc-sc-whl-multi .mbsc-sc-itm{padding:0 2.5em}.mbsc-mobiscroll.mbsc-fr-pointer .mbsc-sc-whl-multi .mbsc-sc-itm-sel:before{font-size:2em}.mbsc-mobiscroll.mbsc-fr-pointer .mbsc-ltr .mbsc-sc-whl-multi .mbsc-sc-itm-sel:before{left:.125em}.mbsc-mobiscroll.mbsc-fr-pointer .mbsc-rtl .mbsc-sc-whl-multi .mbsc-sc-itm-sel:before{right:.125em}.mbsc-mobiscroll .mbsc-sc-lbl{color:#4eccc4}.mbsc-mobiscroll .mbsc-sc-whl-l{border-top:1px solid #4eccc4;border-bottom:1px solid #4eccc4}.mbsc-mobiscroll .mbsc-sc-btn{color:#4eccc4;background:#f7f7f7}.mbsc-mobiscroll.mbsc-no-touch .mbsc-sc-itm.mbsc-btn-e:hover,.mbsc-mobiscroll .mbsc-sc-itm:focus{background:rgba(69,69,69,0.1)}.mbsc-mobiscroll.mbsc-no-touch .mbsc-sc-btn:hover:before,.mbsc-mobiscroll.mbsc-sc .mbsc-sc-whl .mbsc-sc-itm.mbsc-active,.mbsc-mobiscroll .mbsc-sc-btn.mbsc-active:before{background:rgba(78,204,196,0.3)}.mbsc-mobiscroll .mbsc-sc-whl-multi .mbsc-sc-itm-sel:before{color:#4eccc4}.mbsc-cal-slide,.mbsc-cal-day,.mbsc-cal-day-i{box-sizing:border-box}.mbsc-cal .mbsc-cal-day-date{text-align:center;box-sizing:content-box}.mbsc-cal-hdr,.mbsc-cal-btn-w,.mbsc-cal-days-c,.mbsc-cal-days,.mbsc-cal-tabbed .mbsc-fr-c .mbsc-sc-whl-gr-c{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.mbsc-cal-btn-w,.mbsc-cal-month,.mbsc-cal-year,.mbsc-cal-days,.mbsc-cal-days>div{-webkit-box-flex:1;-webkit-flex:1 auto;-ms-flex:1 auto;flex:1 auto}.mbsc-cal-c{position:relative;display:inline-block;vertical-align:middle;text-align:center}.mbsc-cal-btn-w{width:50%}.mbsc-cal-month,.mbsc-cal-year{width:1%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.mbsc-cal-btn.mbsc-disabled{opacity:.3;cursor:not-allowed}.mbsc-cal-days{line-height:1.875em;text-align:center}.mbsc-cal-days>div{width:14.285715%}.mbsc-cal-body{position:relative}.mbsc-cal-scroll-c{overflow:hidden;height:100%}.mbsc-cal-scroll{width:100%;height:100%}.mbsc-cal-slide{position:absolute;z-index:0;top:0;left:0;width:100%;height:100%}.mbsc-cal-slide:first-child{position:relative}.mbsc-cal-table{display:table;width:100%;height:100%;table-layout:fixed;-webkit-transform:translateZ(0)}.mbsc-cal-row{display:table-row}.mbsc-cal-cell{display:table-cell;vertical-align:middle}.mbsc-cal-cell:focus{outline:0}.mbsc-cal-picker{position:absolute;top:0;right:0;bottom:0;left:0;padding:.9375em 0;transition:all .2s ease-in-out;will-change:opacity}.mbsc-cal-picker .mbsc-cal-cell{width:33.333333%;height:25%;cursor:pointer}.mbsc-cal-h{visibility:hidden;opacity:0}.mbsc-cal-day{max-width:14.285715%;height:16.666667%;position:relative;text-align:center;cursor:pointer}.mbsc-cal-day-i{position:relative;height:100%}.mbsc-cal-day-markup{overflow:hidden}.mbsc-cal-day-diff .mbsc-cal-day-date{opacity:.5}.mbsc-cal-week-view .mbsc-cal-day-date,.mbsc-cal-day-diff.mbsc-selected .mbsc-cal-day-date{opacity:1}.mbsc-cal-cell.mbsc-disabled{cursor:not-allowed}.mbsc-cal-cell.mbsc-disabled .mbsc-cal-cell-txt{opacity:.2}.mbsc-cal-hide-diff .mbsc-cal-day-diff{cursor:default}.mbsc-cal-hide-diff .mbsc-cal-day-diff .mbsc-cal-day-i{visibility:hidden}.mbsc-ltr .mbsc-cal-weeks .mbsc-cal-days{margin-left:1.625em}.mbsc-rtl .mbsc-cal-weeks .mbsc-cal-days{margin-right:1.625em}.mbsc-cal-week-nr{width:1.625em;text-align:center}.mbsc-cal-multi .mbsc-cal-hdr{display:block}.mbsc-cal-multi .mbsc-cal-btn-w{width:auto}.mbsc-cal-multi .mbsc-cal-days,.mbsc-cal-multi .mbsc-cal-slide{padding:0 .5em}.mbsc-fr-liq .mbsc-cal-c{display:block}.mbsc-calendar.mbsc-fr-liq.mbsc-fr-center .mbsc-fr-overlay{display:none}.mbsc-calendar.mbsc-fr-liq.mbsc-fr-center .mbsc-fr-w{border-radius:0;padding-left:constant(safe-area-inset-left);padding-left:env(safe-area-inset-left);padding-right:constant(safe-area-inset-right);padding-right:env(safe-area-inset-right);padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.mbsc-cal-tabs-c{display:none}.mbsc-cal-tabs{display:table;width:100%;margin:0;padding:0;list-style:none}.mbsc-cal-tab{position:relative;width:33.33%;display:table-cell;overflow:hidden;cursor:pointer;text-align:center}.mbsc-cal-tabbed .mbsc-fr-c{position:relative}.mbsc-cal-tabbed .mbsc-w-p{transition:opacity .2s ease-in-out}.mbsc-cal-tabbed .mbsc-sc-whl-gr-c{position:absolute;z-index:1;top:0;left:0;right:0;max-width:none;height:100%;-webkit-box-align:center;-webkit-align-items:center;-ms-box-align:center;align-items:center}.mbsc-cal-tabbed .mbsc-cal-c,.mbsc-cal-tabbed .mbsc-cal-tabs-c{display:block}.mbsc-cal-tabbed .mbsc-fr-pos .mbsc-sc-whl-gr-c{width:auto}.mbsc-cal-has-marks .mbsc-cal-day{padding-bottom:.25em}.mbsc-cal-marks{position:absolute;left:0;right:0;height:.375em;margin-top:-.125em;overflow:hidden;white-space:nowrap}.mbsc-cal-mark{display:inline-block;vertical-align:top;width:.25em;height:.25em;margin:.0625em;border-radius:.25em}.mbsc-cal-txt-w{position:absolute;z-index:2;pointer-events:none}.mbsc-ltr .mbsc-cal-txt{text-align:left}.mbsc-rtl .mbsc-cal-txt{text-align:right}.mbsc-cal-txt,.mbsc-cal-txt-ph,.mbsc-cal-txt-more{position:relative;height:1.6em;line-height:1.6em;overflow:hidden;padding:0 .3em;font-size:.625em;white-space:nowrap;text-overflow:ellipsis;margin:0 .1em .2em .1em}.mbsc-cal-day .mbsc-cal-txt.mbsc-cal-txt-only{color:inherit;text-align:center}.mbsc-no-touch .mbsc-cal-txt:before{content:'';position:absolute;z-index:1;top:0;right:0;bottom:0;left:0;transition:background-color .2s}.mbsc-no-touch .mbsc-cal-txt-only:before{display:none}.mbsc-no-touch .mbsc-cal-txt.mbsc-hover:before{background-color:rgba(0,0,0,0.2)}.mbsc-no-touch .mbsc-cal-txt-more:hover{background-color:rgba(0,0,0,0.1)}.mbsc-cal-txt-more{text-align:left;transition:background-color .2s}.mbsc-cal .mbsc-cal-btn{position:relative;z-index:1}.mbsc-mobiscroll .mbsc-cal-c{padding:.5em}.mbsc-mobiscroll .mbsc-cal-btn-w{font-size:1.125em;line-height:2.222223em}.mbsc-mobiscroll .mbsc-cal .mbsc-cal-btn{width:2.666667em;height:2.666667em;line-height:2.666667em;padding:0;border-radius:2em;margin:-.222222em}.mbsc-mobiscroll .mbsc-cal-picker{border-top:1px solid transparent}.mbsc-mobiscroll .mbsc-cal-picker .mbsc-cal-cell-i{display:inline-block;height:2em;padding:0 1em;line-height:2em;border-radius:2em;white-space:nowrap}.mbsc-mobiscroll .mbsc-cal-days>div{font-size:.6875em}.mbsc-mobiscroll .mbsc-cal-day-date{display:inline-block;width:2.153847em;height:2.153847em;margin:.307692em 0;line-height:2.153847em;font-size:.8125em;border:2px solid transparent;border-radius:2em}.mbsc-mobiscroll .mbsc-cal-week-nr{width:2.363637em;font-size:.6875em}.mbsc-mobiscroll .mbsc-cal-tabs-c{line-height:1.875em;padding:.5em .5em 0 .5em;text-transform:uppercase}.mbsc-mobiscroll .mbsc-cal-tab{font-size:.7em;padding:0 1.2em}.mbsc-mobiscroll .mbsc-cal-picker{background:#f7f7f7}.mbsc-mobiscroll .mbsc-cal-days>div{border-bottom:1px solid #4eccc4;color:#4eccc4}.mbsc-mobiscroll .mbsc-cal-today{color:#4eccc4}.mbsc-mobiscroll.mbsc-no-touch:not(.mbsc-ev-cal) .mbsc-cal-cell:not(.mbsc-disabled):hover .mbsc-cal-cell-txt,.mbsc-mobiscroll.mbsc-no-touch .mbsc-cal-day:not(.mbsc-disabled) .mbsc-cal-day-date:hover,.mbsc-mobiscroll .mbsc-cal-cell:focus .mbsc-cal-cell-txt{background:rgba(78,204,196,0.3)}.mbsc-mobiscroll .mbsc-cal-c .mbsc-cal .mbsc-cal-body .mbsc-cal-row .mbsc-selected .mbsc-cal-cell-txt{background:#4eccc4;color:#f7f7f7}.mbsc-mobiscroll .mbsc-cal-day-colored.mbsc-selected .mbsc-cal-day-date{border-color:#4eccc4}.mbsc-mobiscroll .mbsc-cal-week-nr{color:#4eccc4}.mbsc-mobiscroll .mbsc-cal-tab{border:1px solid #4eccc4;color:#454545}.mbsc-mobiscroll .mbsc-fr-w .mbsc-cal-tabs-c .mbsc-cal-tabs .mbsc-cal-tab.mbsc-selected{background:#4eccc4;color:#f7f7f7}.mbsc-mobiscroll .mbsc-cal-mark{background:#454545}.mbsc-mobiscroll .mbsc-cal-txt{color:#f7f7f7;background:#454545}.mbsc-mobiscroll .mbsc-cal-icons{color:#454545}.mbsc-mobiscroll-dark .mbsc-fr-overlay{background:rgba(0,0,0,0.7)}.mbsc-mobiscroll-dark .mbsc-fr-w{background:#263238;color:#f7f7f7}.mbsc-mobiscroll-dark .mbsc-fr-hdr,.mbsc-mobiscroll-dark .mbsc-fr-btn{color:#4fccc4}.mbsc-mobiscroll-dark .mbsc-fr-btn.mbsc-active,.mbsc-mobiscroll-dark.mbsc-no-touch .mbsc-fr-btn-e:not(.mbsc-disabled):hover{background:rgba(79,204,196,0.3)}.mbsc-mobiscroll-dark .mbsc-fr-arr{background:#263238}.mbsc-mobiscroll-dark .mbsc-sc-lbl{color:#4fccc4}.mbsc-mobiscroll-dark .mbsc-sc-whl-l{border-top:1px solid #4fccc4;border-bottom:1px solid #4fccc4}.mbsc-mobiscroll-dark .mbsc-sc-btn{color:#4fccc4;background:#263238}.mbsc-mobiscroll-dark.mbsc-no-touch .mbsc-sc-itm.mbsc-btn-e:hover,.mbsc-mobiscroll-dark .mbsc-sc-itm:focus{background:rgba(247,247,247,0.1)}.mbsc-mobiscroll-dark.mbsc-no-touch .mbsc-sc-btn:hover:before,.mbsc-mobiscroll-dark.mbsc-sc .mbsc-sc-whl .mbsc-sc-itm.mbsc-active,.mbsc-mobiscroll-dark .mbsc-sc-btn.mbsc-active:before{background:rgba(79,204,196,0.3)}.mbsc-mobiscroll-dark .mbsc-sc-whl-multi .mbsc-sc-itm-sel:before{color:#4fccc4}.mbsc-mobiscroll-dark .mbsc-cal-picker{background:#263238}.mbsc-mobiscroll-dark .mbsc-cal-days>div{border-bottom:1px solid #4fccc4;color:#4fccc4}.mbsc-mobiscroll-dark .mbsc-cal-today{color:#4fccc4}.mbsc-mobiscroll-dark.mbsc-no-touch:not(.mbsc-ev-cal) .mbsc-cal-cell:not(.mbsc-disabled):hover .mbsc-cal-cell-txt,.mbsc-mobiscroll-dark.mbsc-no-touch .mbsc-cal-day:not(.mbsc-disabled) .mbsc-cal-day-date:hover,.mbsc-mobiscroll-dark .mbsc-cal-cell:focus .mbsc-cal-cell-txt{background:rgba(79,204,196,0.3)}.mbsc-mobiscroll-dark .mbsc-cal-c .mbsc-cal .mbsc-cal-body .mbsc-cal-row .mbsc-selected .mbsc-cal-cell-txt{background:#4fccc4;color:#263238}.mbsc-mobiscroll-dark .mbsc-cal-day-colored.mbsc-selected .mbsc-cal-day-date{border-color:#4fccc4}.mbsc-mobiscroll-dark .mbsc-cal-week-nr{color:#4fccc4}.mbsc-mobiscroll-dark .mbsc-cal-tab{border:1px solid #4fccc4;color:#f7f7f7}.mbsc-mobiscroll-dark .mbsc-fr-w .mbsc-cal-tabs-c .mbsc-cal-tabs .mbsc-cal-tab.mbsc-selected{background:#4fccc4;color:#263238}.mbsc-mobiscroll-dark .mbsc-cal-mark{background:#f7f7f7}.mbsc-mobiscroll-dark .mbsc-cal-txt{color:#263238;background:#f7f7f7}.mbsc-mobiscroll-dark .mbsc-cal-icons{color:#f7f7f7}.mbsc-voxco .mbsc-fr-overlay{background:rgba(0,0,0,0.7)}.mbsc-voxco .mbsc-fr-w{background:#F7F7F7;color:#454545}.mbsc-voxco .mbsc-fr-hdr,.mbsc-voxco .mbsc-fr-btn{color:#0D77BD}.mbsc-voxco .mbsc-fr-btn.mbsc-active,.mbsc-voxco.mbsc-no-touch .mbsc-fr-btn-e:not(.mbsc-disabled):hover{background:rgba(13,119,189,0.3)}.mbsc-voxco .mbsc-fr-arr{background:#F7F7F7}.mbsc-voxco .mbsc-sc-lbl{color:#0D77BD}.mbsc-voxco .mbsc-sc-whl-l{border-top:1px solid #0D77BD;border-bottom:1px solid #0D77BD}.mbsc-voxco .mbsc-sc-btn{color:#0D77BD;background:#F7F7F7}.mbsc-voxco.mbsc-no-touch .mbsc-sc-itm.mbsc-btn-e:hover,.mbsc-voxco .mbsc-sc-itm:focus{background:rgba(69,69,69,0.1)}.mbsc-voxco.mbsc-no-touch .mbsc-sc-btn:hover:before,.mbsc-voxco.mbsc-sc .mbsc-sc-whl .mbsc-sc-itm.mbsc-active,.mbsc-voxco .mbsc-sc-btn.mbsc-active:before{background:rgba(13,119,189,0.3)}.mbsc-voxco .mbsc-sc-whl-multi .mbsc-sc-itm-sel:before{color:#0D77BD}.mbsc-voxco .mbsc-cal-picker{background:#F7F7F7}.mbsc-voxco .mbsc-cal-days>div{border-bottom:1px solid #0D77BD;color:#0D77BD}.mbsc-voxco .mbsc-cal-today{color:#0D77BD}.mbsc-voxco.mbsc-no-touch:not(.mbsc-ev-cal) .mbsc-cal-cell:not(.mbsc-disabled):hover .mbsc-cal-cell-txt,.mbsc-voxco.mbsc-no-touch .mbsc-cal-day:not(.mbsc-disabled) .mbsc-cal-day-date:hover,.mbsc-voxco .mbsc-cal-cell:focus .mbsc-cal-cell-txt{background:rgba(13,119,189,0.3)}.mbsc-voxco .mbsc-cal-c .mbsc-cal .mbsc-cal-body .mbsc-cal-row .mbsc-selected .mbsc-cal-cell-txt{background:#0D77BD;color:#F7F7F7}.mbsc-voxco .mbsc-cal-day-colored.mbsc-selected .mbsc-cal-day-date{border-color:#0D77BD}.mbsc-voxco .mbsc-cal-week-nr{color:#0D77BD}.mbsc-voxco .mbsc-cal-tab{border:1px solid #0D77BD;color:#454545}.mbsc-voxco .mbsc-fr-w .mbsc-cal-tabs-c .mbsc-cal-tabs .mbsc-cal-tab.mbsc-selected{background:#0D77BD;color:#F7F7F7}.mbsc-voxco .mbsc-cal-mark{background:#454545}.mbsc-voxco .mbsc-cal-txt{color:#F7F7F7;background:#454545}.mbsc-voxco .mbsc-cal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AA4B,CAAC,+BAA+B,CAAC,mCAAmC,aAAa,CAAC,kBAAkB,CAAC,2GAA2G,gCAAgC,CAAC,wLAAwL,+BAA+B,CAAC,iEAAiE,aAAa,CAAC,uCAAuC,kBAAkB,CAAC,yCAAyC,+BAA+B,CAAC,aAAa,CAAC,sCAAsC,aAAa,CAAC,+QAA+Q,+BAA+B,CAAC,2GAA2G,kBAAkB,CAAC,aAAa,CAAC,6EAA6E,oBAAoB,CAAC,wCAAwC,aAAa,CAAC,oCAAoC,wBAAwB,CAAC,aAAa,CAAC,6FAA6F,kBAAkB,CAAC,aAAa,CAAC,qCAAqC,kBAAkB,CAAC,oCAAoC,aAAa,CAAC,kBAAkB,CAAC,sCAAsC,aAAa,CAAC,6BAA6B,0BAA0B,CAAC,uBAAuB,kBAAkB,CAAC,aAAa,CAAC,kDAAkD,aAAa,CAAC,wGAAwG,+BAA+B,CAAC,yBAAyB,kBAAkB,CAAC,yBAAyB,aAAa,CAAC,2BAA2B,4BAA4B,CAAC,+BAA+B,CAAC,yBAAyB,aAAa,CAAC,kBAAkB,CAAC,uFAAuF,6BAA6B,CAAC,0JAA0J,+BAA+B,CAAC,uDAAuD,aAAa,CAAC,6BAA6B,kBAAkB,CAAC,+BAA+B,+BAA+B,CAAC,aAAa,CAAC,4BAA4B,aAAa,CAAC,iPAAiP,+BAA+B,CAAC,iGAAiG,kBAAkB,CAAC,aAAa,CAAC,mEAAmE,oBAAoB,CAAC,8BAA8B,aAAa,CAAC,0BAA0B,wBAAwB,CAAC,aAAa,CAAC,mFAAmF,kBAAkB,CAAC,aAAa,CAAC,2BAA2B,kBAAkB,CAAC,0BAA0B,aAAa,CAAC,kBAAkB,CAAC,4BAA4B,aAAa\",\"sourcesContent\":[\".mbsc-cloak{visibility:hidden !important}.mbsc-empty{text-align:center;margin:3em;color:inherit}.mbsc-empty h3{margin:.666666em 0;padding:0;color:inherit;font-size:1.5em;font-weight:normal;font-family:inherit}.mbsc-empty p{margin:1em 0;padding:0;font-size:1em;line-height:1.5}.mbsc-anim-trans .mbsc-fr-scroll{overflow:hidden}.mbsc-anim-trans-flip .mbsc-fr-persp,.mbsc-anim-trans-swing .mbsc-fr-persp{-webkit-perspective:1000px;perspective:1000px}.mbsc-anim-trans .mbsc-fr-popup,.mbsc-anim-trans .mbsc-fr-overlay{-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.mbsc-anim-in .mbsc-fr-popup,.mbsc-anim-in .mbsc-fr-overlay{-webkit-animation-timing-function:ease-out;-webkit-animation-duration:225ms;animation-timing-function:ease-out;animation-duration:225ms}.mbsc-anim-out .mbsc-fr-popup,.mbsc-anim-out .mbsc-fr-overlay{-webkit-animation-timing-function:ease-in;-webkit-animation-duration:195ms;animation-timing-function:ease-in;animation-duration:195ms}.mbsc-anim-in .mbsc-fr-overlay{-webkit-animation-name:mbsc-anim-f-in;animation-name:mbsc-anim-f-in}.mbsc-anim-out .mbsc-fr-overlay{-webkit-animation-name:mbsc-anim-f-out;animation-name:mbsc-anim-f-out}.mbsc-anim-flip,.mbsc-anim-swing,.mbsc-anim-slidehorizontal,.mbsc-anim-slidevertical,.mbsc-anim-slidedown,.mbsc-anim-slideup,.mbsc-anim-fade{-webkit-backface-visibility:hidden;-webkit-transform:translateX(0);backface-visibility:hidden;transform:translateX(0)}.mbsc-anim-swing,.mbsc-anim-slidehorizontal,.mbsc-anim-slidevertical,.mbsc-anim-slidedown,.mbsc-anim-slideup,.mbsc-anim-fade{-webkit-transform-origin:0 0;transform-origin:0 0}.mbsc-anim-flip,.mbsc-anim-pop{-webkit-transform-origin:50% 50%;transform-origin:50% 50%}.mbsc-anim-in .mbsc-anim-pop{opacity:1;-webkit-animation-name:mbsc-anim-p-in;-webkit-animation-duration:100ms;-webkit-transform:scale(1);animation-name:mbsc-anim-p-in;animation-duration:100ms;transform:scale(1)}.mbsc-anim-out .mbsc-anim-pop{opacity:0;-webkit-animation-name:mbsc-anim-p-out;-webkit-animation-duration:150ms;animation-name:mbsc-anim-p-out;animation-duration:150ms}.mbsc-anim-trans-pop .mbsc-fr-overlay{-webkit-animation-duration:150ms;animation-duration:150ms}.mbsc-anim-in .mbsc-anim-flip{opacity:1;-webkit-animation-name:mbsc-anim-fl-in;-webkit-transform:scale(1);animation-name:mbsc-anim-fl-in;transform:scale(1)}.mbsc-anim-out .mbsc-anim-flip{opacity:0;-webkit-animation-name:mbsc-anim-fl-out;animation-name:mbsc-anim-fl-out}.mbsc-anim-in .mbsc-anim-swing{opacity:1;-webkit-animation-name:mbsc-anim-sw-in;-webkit-transform:scale(1);transform:scale(1);animation-name:mbsc-anim-sw-in}.mbsc-anim-out .mbsc-anim-swing{opacity:0;-webkit-animation-name:mbsc-anim-sw-out;animation-name:mbsc-anim-sw-out}.mbsc-anim-in .mbsc-anim-slidehorizontal{opacity:1;-webkit-animation-name:mbsc-anim-sh-in;-webkit-transform:scale(1);transform:scale(1);animation-name:mbsc-anim-sh-in}.mbsc-anim-out .mbsc-anim-slidehorizontal{opacity:0;-webkit-animation-name:mbsc-anim-sh-out;animation-name:mbsc-anim-sh-out}.mbsc-anim-in .mbsc-anim-slidevertical{opacity:1;-webkit-animation-name:mbsc-anim-sv-in;-webkit-transform:scale(1);animation-name:mbsc-anim-sv-in;transform:scale(1)}.mbsc-anim-out .mbsc-anim-slidevertical{opacity:0;-webkit-animation-name:mbsc-anim-sv-out;animation-name:mbsc-anim-sv-out}.mbsc-anim-in .mbsc-anim-slidedown{-webkit-animation-name:mbsc-anim-sd-in;-webkit-transform:scale(1);animation-name:mbsc-anim-sd-in;transform:scale(1)}.mbsc-anim-out .mbsc-anim-slidedown{-webkit-animation-name:mbsc-anim-sd-out;-webkit-transform:translateY(-100%);animation-name:mbsc-anim-sd-out}.mbsc-anim-in .mbsc-anim-slideup{-webkit-animation-name:mbsc-anim-su-in;-webkit-transform:scale(1);transform:scale(1);animation-name:mbsc-anim-su-in}.mbsc-anim-out .mbsc-anim-slideup{-webkit-animation-name:mbsc-anim-su-out;-webkit-transform:translateY(100%);animation-name:mbsc-anim-su-out}.mbsc-anim-in .mbsc-anim-fade{opacity:1;-webkit-animation-name:mbsc-anim-f-in;animation-name:mbsc-anim-f-in}.mbsc-anim-out .mbsc-anim-fade{opacity:0;-webkit-animation-name:mbsc-anim-f-out;animation-name:mbsc-anim-f-out}.mbsc-fr-pointer.mbsc-anim-in .mbsc-anim-slidedown{-webkit-animation-name:mbsc-anim-sd-in, mbsc-anim-f-in;animation-name:mbsc-anim-sd-in, mbsc-anim-f-in}.mbsc-fr-pointer.mbsc-anim-out .mbsc-anim-slidedown{-webkit-animation-name:mbsc-anim-sd-out, mbsc-anim-f-out;animation-name:mbsc-anim-sd-out, mbsc-anim-f-out}.mbsc-fr-pointer.mbsc-anim-in .mbsc-anim-slideup{-webkit-animation-name:mbsc-anim-su-in, mbsc-anim-f-in;animation-name:mbsc-anim-su-in, mbsc-anim-f-in}.mbsc-fr-pointer.mbsc-anim-out .mbsc-anim-slideup{-webkit-animation-name:mbsc-anim-su-out, mbsc-anim-f-out;animation-name:mbsc-anim-su-out, mbsc-anim-f-out}@keyframes mbsc-anim-f-in{from{opacity:0}to{opacity:1}}@-webkit-keyframes mbsc-anim-f-in{from{opacity:0}to{opacity:1}}@keyframes mbsc-anim-f-out{from{visibility:visible;opacity:1}to{opacity:0}}@-webkit-keyframes mbsc-anim-f-out{from{visibility:visible;opacity:1}to{opacity:0}}@keyframes mbsc-anim-p-in{from{opacity:0;transform:scale(0.8)}to{opacity:1;transform:scale(1)}}@-webkit-keyframes mbsc-anim-p-in{from{opacity:0;-webkit-transform:scale(0.8)}to{opacity:1;-webkit-transform:scale(1)}}@keyframes mbsc-anim-p-out{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0.8)}}@-webkit-keyframes mbsc-anim-p-out{from{opacity:1;-webkit-transform:scale(1)}to{opacity:0;-webkit-transform:scale(0.8)}}@keyframes mbsc-anim-fl-in{from{opacity:0;transform:rotateY(90deg)}to{opacity:1;transform:rotateY(0)}}@-webkit-keyframes mbsc-anim-fl-in{from{opacity:0;-webkit-transform:rotateY(90deg)}to{opacity:1;-webkit-transform:rotateY(0)}}@keyframes mbsc-anim-fl-out{from{opacity:1;transform:rotateY(0deg)}to{opacity:0;transform:rotateY(-90deg)}}@-webkit-keyframes mbsc-anim-fl-out{from{opacity:1;-webkit-transform:rotateY(0deg)}to{opacity:0;-webkit-transform:rotateY(-90deg)}}@keyframes mbsc-anim-sw-in{from{opacity:0;transform:rotateY(-90deg)}to{opacity:1;transform:rotateY(0deg)}}@-webkit-keyframes mbsc-anim-sw-in{from{opacity:0;-webkit-transform:rotateY(-90deg)}to{opacity:1;-webkit-transform:rotateY(0deg)}}@keyframes mbsc-anim-sw-out{from{opacity:1;transform:rotateY(0deg)}to{opacity:0;transform:rotateY(-90deg)}}@-webkit-keyframes mbsc-anim-sw-out{from{opacity:1;-webkit-transform:rotateY(0deg)}to{opacity:0;-webkit-transform:rotateY(-90deg)}}@keyframes mbsc-anim-sh-in{from{opacity:0;transform:translateX(-100%)}to{opacity:1;transform:translateX(0)}}@-webkit-keyframes mbsc-anim-sh-in{from{opacity:0;-webkit-transform:translateX(-100%)}to{opacity:1;-webkit-transform:translateX(0)}}@keyframes mbsc-anim-sh-out{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(100%)}}@-webkit-keyframes mbsc-anim-sh-out{from{opacity:1;-webkit-transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(100%)}}@keyframes mbsc-anim-sv-in{from{opacity:0;transform:translateY(-100%)}to{opacity:1;transform:translateY(0)}}@-webkit-keyframes mbsc-anim-sv-in{from{opacity:0;-webkit-transform:translateY(-100%)}to{opacity:1;-webkit-transform:translateY(0)}}@keyframes mbsc-anim-sv-out{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(100%)}}@-webkit-keyframes mbsc-anim-sv-out{from{opacity:1;-webkit-transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(100%)}}@keyframes mbsc-anim-sd-in{from{transform:translateY(-100%)}to{transform:translateY(0)}}@-webkit-keyframes mbsc-anim-sd-in{from{opacity:1;-webkit-transform:translateY(-100%)}to{opacity:1;-webkit-transform:translateY(0)}}@keyframes mbsc-anim-sd-out{from{transform:translateY(0)}to{transform:translateY(-100%)}}@-webkit-keyframes mbsc-anim-sd-out{from{opacity:1;-webkit-transform:translateY(0)}to{opacity:1;-webkit-transform:translateY(-100%)}}@keyframes mbsc-anim-su-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@-webkit-keyframes mbsc-anim-su-in{from{opacity:1;-webkit-transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0)}}@keyframes mbsc-anim-su-out{from{transform:translateY(0)}to{transform:translateY(100%)}}@-webkit-keyframes mbsc-anim-su-out{from{opacity:1;-webkit-transform:translateY(0)}to{opacity:1;-webkit-transform:translateY(100%)}}@font-face{font-family:'icons_mobiscroll';src:url(\\\"icons_mobiscroll.woff?gniomg\\\") format(\\\"woff\\\"),url(\\\"icons_mobiscroll.woff\\\") format(\\\"woff\\\"),url(\\\"icons_mobiscroll.ttf?gniomg\\\") format(\\\"truetype\\\");font-weight:normal;font-style:normal}.mbsc-ic:before{font-family:'icons_mobiscroll';speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.mbsc-ic-aid::before{content:\\\"\\\\ea01\\\"}.mbsc-ic-airplane::before{content:\\\"\\\\ea02\\\"}.mbsc-ic-alarm2::before{content:\\\"\\\\ea03\\\"}.mbsc-ic-arrow-down5::before{content:\\\"\\\\ea04\\\"}.mbsc-ic-arrow-left5::before{content:\\\"\\\\ea05\\\"}.mbsc-ic-arrow-left6::before{content:\\\"\\\\ea06\\\"}.mbsc-ic-arrow-right5::before{content:\\\"\\\\ea07\\\"}.mbsc-ic-arrow-right6::before{content:\\\"\\\\ea08\\\"}.mbsc-ic-arrow-up5::before{content:\\\"\\\\ea09\\\"}.mbsc-ic-attachment::before{content:\\\"\\\\ea0a\\\"}.mbsc-ic-bars::before{content:\\\"\\\\ea0b\\\"}.mbsc-ic-book::before{content:\\\"\\\\ea0c\\\"}.mbsc-ic-bubble::before{content:\\\"\\\\ea0d\\\"}.mbsc-ic-bubbles::before{content:\\\"\\\\ea0e\\\"}.mbsc-ic-bullhorn::before{content:\\\"\\\\ea0f\\\"}.mbsc-ic-calendar::before{content:\\\"\\\\ea10\\\"}.mbsc-ic-camera::before{content:\\\"\\\\ea11\\\"}.mbsc-ic-cart::before{content:\\\"\\\\ea12\\\"}.mbsc-ic-checkmark::before{content:\\\"\\\\ea13\\\"}.mbsc-ic-clock::before{content:\\\"\\\\ea14\\\"}.mbsc-ic-close::before{content:\\\"\\\\ea15\\\"}.mbsc-ic-cloud-download::before{content:\\\"\\\\ea16\\\"}.mbsc-ic-cloud-upload::before{content:\\\"\\\\ea17\\\"}.mbsc-ic-cogs::before{content:\\\"\\\\ea18\\\"}.mbsc-ic-connection::before{content:\\\"\\\\ea19\\\"}.mbsc-ic-copy2::before{content:\\\"\\\\ea1a\\\"}.mbsc-ic-copy3::before{content:\\\"\\\\ea1b\\\"}.mbsc-ic-credit::before{content:\\\"\\\\ea1c\\\"}.mbsc-ic-disk::before{content:\\\"\\\\ea1d\\\"}.mbsc-ic-download::before{content:\\\"\\\\ea1e\\\"}.mbsc-ic-drawer::before{content:\\\"\\\\ea1f\\\"}.mbsc-ic-droplet::before{content:\\\"\\\\ea20\\\"}.mbsc-ic-earth::before{content:\\\"\\\\ea21\\\"}.mbsc-ic-eye-blocked::before{content:\\\"\\\\ea22\\\"}.mbsc-ic-eye::before{content:\\\"\\\\ea23\\\"}.mbsc-ic-fa-globe::before{content:\\\"\\\\ea24\\\"}.mbsc-ic-fa-leaf::before{content:\\\"\\\\ea25\\\"}.mbsc-ic-fa-mail-reply::before{content:\\\"\\\\ea26\\\"}.mbsc-ic-fa-retweet::before{content:\\\"\\\\ea27\\\"}.mbsc-ic-fa-rotate-left::before{content:\\\"\\\\ea28\\\"}.mbsc-ic-file4::before{content:\\\"\\\\ea29\\\"}.mbsc-ic-film::before{content:\\\"\\\\ea2a\\\"}.mbsc-ic-flag::before{content:\\\"\\\\ea2b\\\"}.mbsc-ic-folder::before{content:\\\"\\\\ea2c\\\"}.mbsc-ic-forward::before{content:\\\"\\\\ea2d\\\"}.mbsc-ic-foundation-mail::before{content:\\\"\\\\ea2e\\\"}.mbsc-ic-foundation-minus-circle::before{content:\\\"\\\\ea2f\\\"}.mbsc-ic-globe::before{content:\\\"\\\\ea30\\\"}.mbsc-ic-heart::before{content:\\\"\\\\ea31\\\"}.mbsc-ic-history::before{content:\\\"\\\\ea32\\\"}.mbsc-ic-home::before{content:\\\"\\\\ea33\\\"}.mbsc-ic-image2::before{content:\\\"\\\\ea34\\\"}.mbsc-ic-ion-android-system-windows::before{content:\\\"\\\\ea35\\\"}.mbsc-ic-ion-bluetooth::before{content:\\\"\\\\ea36\\\"}.mbsc-ic-ion-navigate::before{content:\\\"\\\\ea37\\\"}.mbsc-ic-key2::before{content:\\\"\\\\ea38\\\"}.mbsc-ic-library::before{content:\\\"\\\\ea39\\\"}.mbsc-ic-line-settings::before{content:\\\"\\\\ea3a\\\"}.mbsc-ic-link::before{content:\\\"\\\\ea3b\\\"}.mbsc-ic-location::before{content:\\\"\\\\ea3c\\\"}.mbsc-ic-lock2::before{content:\\\"\\\\ea3d\\\"}.mbsc-ic-loop2::before{content:\\\"\\\\ea3e\\\"}.mbsc-ic-map::before{content:\\\"\\\\ea3f\\\"}.mbsc-ic-material-arrow-back::before{content:\\\"\\\\ea40\\\"}.mbsc-ic-material-brightness-medium::before{content:\\\"\\\\ea41\\\"}.mbsc-ic-material-check::before{content:\\\"\\\\ea42\\\"}.mbsc-ic-material-crop::before{content:\\\"\\\\ea43\\\"}.mbsc-ic-material-equalizer::before{content:\\\"\\\\ea44\\\"}.mbsc-ic-material-filter::before{content:\\\"\\\\ea45\\\"}.mbsc-ic-material-iso::before{content:\\\"\\\\ea46\\\"}.mbsc-ic-material-palette::before{content:\\\"\\\\ea47\\\"}.mbsc-ic-material-pause::before{content:\\\"\\\\ea48\\\"}.mbsc-ic-material-people::before{content:\\\"\\\\ea49\\\"}.mbsc-ic-material-photo-size-select-large::before{content:\\\"\\\\ea4a\\\"}.mbsc-ic-material-play-arrow::before{content:\\\"\\\\ea4b\\\"}.mbsc-ic-material-repeat::before{content:\\\"\\\\ea4c\\\"}.mbsc-ic-material-rotate-right::before{content:\\\"\\\\ea4d\\\"}.mbsc-ic-material-shuffle::before{content:\\\"\\\\ea4e\\\"}.mbsc-ic-material-skip-next::before{content:\\\"\\\\ea4f\\\"}.mbsc-ic-material-skip-previous::before{content:\\\"\\\\ea50\\\"}.mbsc-ic-material-stop::before{content:\\\"\\\\ea51\\\"}.mbsc-ic-material-texture::before{content:\\\"\\\\ea52\\\"}.mbsc-ic-material-wb-auto::before{content:\\\"\\\\ea53\\\"}.mbsc-ic-meteo-cloud2::before{content:\\\"\\\\ea54\\\"}.mbsc-ic-meteo-cloud3::before{content:\\\"\\\\ea55\\\"}.mbsc-ic-meteo-cloudy::before{content:\\\"\\\\ea56\\\"}.mbsc-ic-meteo-sun::before{content:\\\"\\\\ea57\\\"}.mbsc-ic-minus::before{content:\\\"\\\\ea58\\\"}.mbsc-ic-mobile::before{content:\\\"\\\\ea59\\\"}.mbsc-ic-music::before{content:\\\"\\\\ea5a\\\"}.mbsc-ic-neutral::before{content:\\\"\\\\ea5b\\\"}.mbsc-ic-newspaper::before{content:\\\"\\\\ea5c\\\"}.mbsc-ic-office::before{content:\\\"\\\\ea5d\\\"}.mbsc-ic-pencil::before{content:\\\"\\\\ea5e\\\"}.mbsc-ic-phone::before{content:\\\"\\\\ea5f\\\"}.mbsc-ic-play::before{content:\\\"\\\\ea60\\\"}.mbsc-ic-plus::before{content:\\\"\\\\ea61\\\"}.mbsc-ic-redo2::before{content:\\\"\\\\ea62\\\"}.mbsc-ic-remove::before{content:\\\"\\\\ea63\\\"}.mbsc-ic-reply::before{content:\\\"\\\\ea64\\\"}.mbsc-ic-sad::before{content:\\\"\\\\ea65\\\"}.mbsc-ic-sad2::before{content:\\\"\\\\ea66\\\"}.mbsc-ic-share::before{content:\\\"\\\\ea67\\\"}.mbsc-ic-smiley::before{content:\\\"\\\\ea68\\\"}.mbsc-ic-smiley2::before{content:\\\"\\\\ea69\\\"}.mbsc-ic-stack::before{content:\\\"\\\\ea6a\\\"}.mbsc-ic-star3::before{content:\\\"\\\\ea6b\\\"}.mbsc-ic-stopwatch::before{content:\\\"\\\\ea6c\\\"}.mbsc-ic-support::before{content:\\\"\\\\ea6d\\\"}.mbsc-ic-tag::before{content:\\\"\\\\ea6e\\\"}.mbsc-ic-thumbs-up::before{content:\\\"\\\\ea6f\\\"}.mbsc-ic-thumbs-up2::before{content:\\\"\\\\ea70\\\"}.mbsc-ic-undo2::before{content:\\\"\\\\ea71\\\"}.mbsc-ic-unlocked::before{content:\\\"\\\\ea72\\\"}.mbsc-ic-upload::before{content:\\\"\\\\ea73\\\"}.mbsc-ic-user4::before{content:\\\"\\\\ea74\\\"}.mbsc-ic-volume-high::before{content:\\\"\\\\ea75\\\"}.mbsc-ic-volume-medium::before{content:\\\"\\\\ea76\\\"}.mbsc-ic-volume-mute2::before{content:\\\"\\\\ea77\\\"}.mbsc-fr-w,.mbsc-fr-overlay{-webkit-transform:translateZ(0)}.mbsc-fr{pointer-events:none;z-index:99998;font-weight:normal;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-text-size-adjust:100%}.mbsc-fr-focus{outline:0}.mbsc-fr-lock-ctx{position:relative}.mbsc-fr-lock.mbsc-fr-lock-ios{overflow:hidden;position:absolute;top:0;bottom:0;left:0;right:0;height:auto}.mbsc-fr-pos{visibility:hidden}.mbsc-fr-scroll{position:relative;z-index:2;width:100%;height:100%;-ms-touch-action:pan-y;touch-action:pan-y;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}.mbsc-fr-popup{max-width:98%;position:absolute;z-index:2;top:0;left:0;font-size:12px;text-shadow:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-touch-action:pan-y;touch-action:pan-y}.mbsc-rtl{direction:rtl}.mbsc-fr-popup,.mbsc-fr-btn-cont,.mbsc-fr-arr{box-sizing:border-box}.mbsc-fr .mbsc-fr-w{box-sizing:content-box}.mbsc-fr-w{min-width:256px;max-width:100%;overflow:hidden;text-align:center;font-family:arial, verdana, sans-serif}.mbsc-fr,.mbsc-fr-persp,.mbsc-fr-overlay{position:fixed;top:0;bottom:0;left:0;right:0}.mbsc-fr-lock .mbsc-fr-persp{-ms-touch-action:none;touch-action:none}.mbsc-fr-lock-ctx>.mbsc-fr,.mbsc-fr-lock-ctx .mbsc-fr-persp,.mbsc-fr-lock-ctx .mbsc-fr-overlay{position:absolute}.mbsc-fr-persp{pointer-events:auto;overflow:hidden}.mbsc-fr-overlay{z-index:1;background:rgba(0,0,0,0.7)}.mbsc-fr-liq .mbsc-fr-popup{max-width:100%}.mbsc-fr-top .mbsc-fr-popup,.mbsc-fr-bottom .mbsc-fr-popup{width:100%;max-width:100%}.mbsc-fr-top .mbsc-fr-w,.mbsc-fr-bottom .mbsc-fr-w{padding-left:constant(safe-area-inset-left);padding-left:env(safe-area-inset-left);padding-right:constant(safe-area-inset-right);padding-right:env(safe-area-inset-right)}.mbsc-fr-bottom .mbsc-fr-w{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.mbsc-fr-top .mbsc-fr-popup{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.mbsc-fr-inline{position:relative;pointer-events:auto;z-index:0}.mbsc-fr-inline .mbsc-fr-popup{position:static;max-width:100%}.mbsc-fr-bubble,.mbsc-fr-bubble .mbsc-fr-persp{position:absolute}.mbsc-fr-bubble .mbsc-fr-arr-w{position:absolute;z-index:1;left:0;width:100%;overflow:hidden}.mbsc-fr-bubble-top .mbsc-fr-arr-w{top:100%}.mbsc-fr-bubble-bottom .mbsc-fr-arr-w{bottom:100%}.mbsc-fr-bubble .mbsc-fr-arr-i{margin:0 1.75em;position:relative;direction:ltr}.mbsc-fr-bubble .mbsc-fr-arr{display:block}.mbsc-fr-arr{display:none;position:relative;left:0;width:2em;height:2em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);margin-left:-1em}.mbsc-fr-bubble-bottom .mbsc-fr-arr{top:1.333334em}.mbsc-fr-bubble-top .mbsc-fr-arr{top:-1.333334em}.mbsc-fr-hdn{width:0;height:0;margin:0;padding:0;border:0;overflow:hidden}.mbsc-fr-hdr{overflow:hidden;text-overflow:ellipsis;text-align:center}.mbsc-fr-btn{overflow:hidden;display:block;text-decoration:none;white-space:nowrap;text-overflow:ellipsis;vertical-align:top}.mbsc-fr-btn-e{cursor:pointer}.mbsc-fr-btn.mbsc-disabled{cursor:not-allowed}.mbsc-fr-btn-cont{display:table;width:100%;text-align:center;white-space:normal}.mbsc-fr-btn-cont .mbsc-disabled{opacity:.3}.mbsc-fr-btn-w{vertical-align:top;display:table-cell;position:relative;z-index:5}.mbsc-fr-btn-w .mbsc-fr-btn:before{padding:.375em}.mbsc-fr-pointer.mbsc-fr .mbsc-fr-w .mbsc-fr-inline .mbsc-fr-w{box-shadow:none;border-radius:0}.mbsc-fr-pointer .mbsc-ltr .mbsc-fr-w,.mbsc-fr-pointer .mbsc-ltr .mbsc-sc-whl .mbsc-sel-gr{text-align:left}.mbsc-fr-pointer .mbsc-rtl .mbsc-fr-w,.mbsc-fr-pointer .mbsc-rtl .mbsc-sc-whl .mbsc-sel-gr{text-align:right}.mbsc-fr-pointer.mbsc-fr-top .mbsc-fr-w,.mbsc-fr-pointer.mbsc-fr-bottom .mbsc-fr-w{pointer-events:auto;display:inline-block;margin-top:3em;margin-bottom:3em;max-width:98%}.mbsc-fr-pointer.mbsc-fr-top .mbsc-fr-popup,.mbsc-fr-pointer.mbsc-fr-bottom .mbsc-fr-popup{text-align:center;pointer-events:none}.mbsc-fr-pointer.mbsc-fr-bubble .mbsc-fr-arr-w{display:none}.mbsc-fr-pointer .mbsc-sel-empty{text-align:center}.mbsc-mobiscroll .mbsc-fr-w{min-width:16em;font-size:16px}.mbsc-mobiscroll .mbsc-fr-hdr{padding:0 .6666em;padding-top:.6666em;font-size:.75em;text-transform:uppercase;min-height:2em;line-height:2em}.mbsc-mobiscroll .mbsc-fr-btn-cont{display:block;overflow:hidden;text-align:right;padding:0 .5em .5em .5em}.mbsc-mobiscroll .mbsc-ltr .mbsc-fr-btn-cont{text-align:right}.mbsc-mobiscroll .mbsc-rtl .mbsc-fr-btn-cont{text-align:left}.mbsc-mobiscroll .mbsc-fr-btn-w{display:inline-block}.mbsc-mobiscroll .mbsc-fr-btn{height:2.5em;line-height:2.5em;padding:0 1em;text-transform:uppercase}.mbsc-mobiscroll.mbsc-fr-center .mbsc-fr-w,.mbsc-mobiscroll.mbsc-fr-bubble .mbsc-fr-w{border-radius:.25em}.mbsc-mobiscroll.mbsc-fr-no-overlay .mbsc-fr-arr{box-shadow:0 0 1em rgba(0,0,0,0.2)}.mbsc-mobiscroll.mbsc-fr-no-overlay .mbsc-fr-w{box-shadow:0 0.125em 1em rgba(0,0,0,0.3)}.mbsc-mobiscroll.mbsc-fr-no-overlay.mbsc-fr-bubble .mbsc-fr-w{border-radius:.25em}.mbsc-mobiscroll .mbsc-fr-overlay{background:rgba(0,0,0,0.7)}.mbsc-mobiscroll .mbsc-fr-w{background:#f7f7f7;color:#454545}.mbsc-mobiscroll .mbsc-fr-hdr,.mbsc-mobiscroll .mbsc-fr-btn{color:#4eccc4}.mbsc-mobiscroll .mbsc-fr-btn.mbsc-active,.mbsc-mobiscroll.mbsc-no-touch .mbsc-fr-btn-e:not(.mbsc-disabled):hover{background:rgba(78,204,196,0.3)}.mbsc-mobiscroll .mbsc-fr-arr{background:#f7f7f7}.mbsc-sc-whl-o,.mbsc-sc-btn{-webkit-transform:translateZ(0)}.mbsc-sc .mbsc-sc-whl-c,.mbsc-sc .mbsc-sc-whl-l,.mbsc-sc .mbsc-sc-whl{box-sizing:content-box}.mbsc-sc-whl-gr-c,.mbsc-sc-itm{box-sizing:border-box}.mbsc-sc-whl-gr-c{position:relative;max-width:100%;vertical-align:middle;display:inline-block;overflow:hidden}.mbsc-fr-bottom .mbsc-sc-whl-gr-c:first-child:last-child,.mbsc-fr-top .mbsc-sc-whl-gr-c:first-child:last-child,.mbsc-fr-inline .mbsc-sc-whl-gr-c:first-child:last-child,.mbsc-fr-liq .mbsc-sc-whl-gr-c{display:block}.mbsc-sc-whl-gr{margin:0 auto;position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.mbsc-sc-whl-w{max-width:100%;position:relative;-ms-touch-action:none;touch-action:none}.mbsc-fr-pointer .mbsc-sc-whl-w,.mbsc-fr-liq .mbsc-sc-whl-w{-webkit-box-flex:1;-webkit-flex:1 auto;-ms-flex:1 auto;flex:1 auto}.mbsc-sc-whl-o{position:absolute;z-index:2;top:0;right:0;bottom:0;left:0;pointer-events:none;display:none}.mbsc-sc-whl-l{display:none;position:absolute;top:50%;left:0;right:0;pointer-events:none}.mbsc-sc-whl-w .mbsc-sc-whl-l{display:block}.mbsc-sc-whl{overflow:hidden;border-top:1px solid transparent;border-bottom:1px solid transparent;margin:-1px 0}.mbsc-sc-whl-c{position:relative;z-index:1;top:50%;border-top:1px solid transparent;border-bottom:1px solid transparent}.mbsc-sc-whl-sc{position:relative}.mbsc-sc-itm{position:relative;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mbsc-sc-itm-inv,.mbsc-sc-itm-inv-h{opacity:.3}.mbsc-sc-lbl{position:absolute;left:0;right:0;bottom:100%;display:none}.mbsc-sc-lbl-v .mbsc-sc-lbl{display:block}.mbsc-sc-btn{position:absolute;z-index:2;left:0;right:0;cursor:pointer;opacity:1;text-align:center;transition:opacity .2s linear}.mbsc-sc-btn:before{position:absolute;top:0;right:0;left:0}.mbsc-sc-whl-a .mbsc-sc-btn{opacity:0}.mbsc-sc-btn-plus{bottom:0}.mbsc-sc-btn-minus{top:0}.mbsc-sc-whl-gr-3d{-webkit-perspective:1200px;perspective:1200px}.mbsc-sc-whl-gr-3d .mbsc-sc-whl{overflow:visible}.mbsc-sc-whl-gr-3d .mbsc-sc-whl-c{overflow:hidden}.mbsc-sc-whl-gr-3d .mbsc-sc-whl-w,.mbsc-sc-whl-gr-3d .mbsc-sc-whl{transform-style:preserve-3d}.mbsc-sc-whl-3d{position:absolute;top:50%;left:0;right:0;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.mbsc-sc-itm-3d{position:absolute;width:100%;top:0;left:0;cursor:pointer;-webkit-backface-visibility:hidden;backface-visibility:hidden}.mbsc-sc-itm-del{display:none}.mbsc-sc-itm-ml{width:100%;height:auto;display:inline-block;vertical-align:middle;white-space:normal}.mbsc-sc-whl-multi .mbsc-sc-itm-sel:before{position:absolute;top:0;left:0;width:1em;text-align:center}.mbsc-fr-pointer .mbsc-fr-w .mbsc-sc-whl-gr-c,.mbsc-fr-pointer .mbsc-fr-w .mbsc-sc-whl-gr{padding:0}.mbsc-fr-pointer .mbsc-sc-whl-gr-c:first-child:last-child{display:block}.mbsc-sc-bar-c{position:absolute;z-index:4;top:0;bottom:0;right:0;width:10px;opacity:0;background:rgba(0,0,0,0.05);transform:translateZ(0);transition:opacity .2s}.mbsc-sc-bar{position:absolute;right:0;top:0;width:10px;height:100%}.mbsc-sc-bar:after{content:'';position:absolute;top:2px;right:2px;bottom:2px;left:2px;background:rgba(0,0,0,0.5);border-radius:3px}.mbsc-sc-whl-w:hover .mbsc-sc-bar-c,.mbsc-sc-whl-anim .mbsc-sc-bar-c{opacity:1}.mbsc-mobiscroll .mbsc-sc-whl-gr{padding:.5em .25em}.mbsc-mobiscroll .mbsc-sc-whl-w{margin:0 .25em}.mbsc-mobiscroll .mbsc-sc-lbl-v .mbsc-sc-whl-w{margin-top:1.875em}.mbsc-mobiscroll .mbsc-sc-lbl{font-size:.75em;line-height:2.5em;text-transform:uppercase}.mbsc-mobiscroll .mbsc-sc-cp .mbsc-sc-whl-w{padding:2em 0}.mbsc-mobiscroll .mbsc-sc-btn{height:2em;line-height:2em}.mbsc-mobiscroll .mbsc-sc-btn:before{font-size:1.5em}.mbsc-mobiscroll .mbsc-sc-itm{padding:0 .25em;font-size:1.375em}.mbsc-mobiscroll.mbsc-no-touch .mbsc-sc-itm.mbsc-btn-e:hover,.mbsc-mobiscroll .mbsc-sc-itm:focus{outline:0}.mbsc-mobiscroll .mbsc-sc-whl-multi .mbsc-sc-itm{padding:0 1.818181em}.mbsc-mobiscroll .mbsc-sc-whl-multi .mbsc-sc-itm-sel:before{font-size:1.818181em}.mbsc-mobiscroll.mbsc-fr-pointer .mbsc-sc-lbl{padding-left:1.666667em;padding-right:1.666667em}.mbsc-mobiscroll.mbsc-fr-pointer .mbsc-sc-whl-w{margin-left:0;margin-right:0}.mbsc-mobiscroll.mbsc-fr-pointer .mbsc-sc-itm{font-size:1em;padding:0 1.25em}.mbsc-mobiscroll.mbsc-fr-pointer .mbsc-sc-whl-multi .mbsc-sc-itm{padding:0 2.5em}.mbsc-mobiscroll.mbsc-fr-pointer .mbsc-sc-whl-multi .mbsc-sc-itm-sel:before{font-size:2em}.mbsc-mobiscroll.mbsc-fr-pointer .mbsc-ltr .mbsc-sc-whl-multi .mbsc-sc-itm-sel:before{left:.125em}.mbsc-mobiscroll.mbsc-fr-pointer .mbsc-rtl .mbsc-sc-whl-multi .mbsc-sc-itm-sel:before{right:.125em}.mbsc-mobiscroll .mbsc-sc-lbl{color:#4eccc4}.mbsc-mobiscroll .mbsc-sc-whl-l{border-top:1px solid #4eccc4;border-bottom:1px solid #4eccc4}.mbsc-mobiscroll .mbsc-sc-btn{color:#4eccc4;background:#f7f7f7}.mbsc-mobiscroll.mbsc-no-touch .mbsc-sc-itm.mbsc-btn-e:hover,.mbsc-mobiscroll .mbsc-sc-itm:focus{background:rgba(69,69,69,0.1)}.mbsc-mobiscroll.mbsc-no-touch .mbsc-sc-btn:hover:before,.mbsc-mobiscroll.mbsc-sc .mbsc-sc-whl .mbsc-sc-itm.mbsc-active,.mbsc-mobiscroll .mbsc-sc-btn.mbsc-active:before{background:rgba(78,204,196,0.3)}.mbsc-mobiscroll .mbsc-sc-whl-multi .mbsc-sc-itm-sel:before{color:#4eccc4}.mbsc-cal-slide,.mbsc-cal-day,.mbsc-cal-day-i{box-sizing:border-box}.mbsc-cal .mbsc-cal-day-date{text-align:center;box-sizing:content-box}.mbsc-cal-hdr,.mbsc-cal-btn-w,.mbsc-cal-days-c,.mbsc-cal-days,.mbsc-cal-tabbed .mbsc-fr-c .mbsc-sc-whl-gr-c{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.mbsc-cal-btn-w,.mbsc-cal-month,.mbsc-cal-year,.mbsc-cal-days,.mbsc-cal-days>div{-webkit-box-flex:1;-webkit-flex:1 auto;-ms-flex:1 auto;flex:1 auto}.mbsc-cal-c{position:relative;display:inline-block;vertical-align:middle;text-align:center}.mbsc-cal-btn-w{width:50%}.mbsc-cal-month,.mbsc-cal-year{width:1%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.mbsc-cal-btn.mbsc-disabled{opacity:.3;cursor:not-allowed}.mbsc-cal-days{line-height:1.875em;text-align:center}.mbsc-cal-days>div{width:14.285715%}.mbsc-cal-body{position:relative}.mbsc-cal-scroll-c{overflow:hidden;height:100%}.mbsc-cal-scroll{width:100%;height:100%}.mbsc-cal-slide{position:absolute;z-index:0;top:0;left:0;width:100%;height:100%}.mbsc-cal-slide:first-child{position:relative}.mbsc-cal-table{display:table;width:100%;height:100%;table-layout:fixed;-webkit-transform:translateZ(0)}.mbsc-cal-row{display:table-row}.mbsc-cal-cell{display:table-cell;vertical-align:middle}.mbsc-cal-cell:focus{outline:0}.mbsc-cal-picker{position:absolute;top:0;right:0;bottom:0;left:0;padding:.9375em 0;transition:all .2s ease-in-out;will-change:opacity}.mbsc-cal-picker .mbsc-cal-cell{width:33.333333%;height:25%;cursor:pointer}.mbsc-cal-h{visibility:hidden;opacity:0}.mbsc-cal-day{max-width:14.285715%;height:16.666667%;position:relative;text-align:center;cursor:pointer}.mbsc-cal-day-i{position:relative;height:100%}.mbsc-cal-day-markup{overflow:hidden}.mbsc-cal-day-diff .mbsc-cal-day-date{opacity:.5}.mbsc-cal-week-view .mbsc-cal-day-date,.mbsc-cal-day-diff.mbsc-selected .mbsc-cal-day-date{opacity:1}.mbsc-cal-cell.mbsc-disabled{cursor:not-allowed}.mbsc-cal-cell.mbsc-disabled .mbsc-cal-cell-txt{opacity:.2}.mbsc-cal-hide-diff .mbsc-cal-day-diff{cursor:default}.mbsc-cal-hide-diff .mbsc-cal-day-diff .mbsc-cal-day-i{visibility:hidden}.mbsc-ltr .mbsc-cal-weeks .mbsc-cal-days{margin-left:1.625em}.mbsc-rtl .mbsc-cal-weeks .mbsc-cal-days{margin-right:1.625em}.mbsc-cal-week-nr{width:1.625em;text-align:center}.mbsc-cal-multi .mbsc-cal-hdr{display:block}.mbsc-cal-multi .mbsc-cal-btn-w{width:auto}.mbsc-cal-multi .mbsc-cal-days,.mbsc-cal-multi .mbsc-cal-slide{padding:0 .5em}.mbsc-fr-liq .mbsc-cal-c{display:block}.mbsc-calendar.mbsc-fr-liq.mbsc-fr-center .mbsc-fr-overlay{display:none}.mbsc-calendar.mbsc-fr-liq.mbsc-fr-center .mbsc-fr-w{border-radius:0;padding-left:constant(safe-area-inset-left);padding-left:env(safe-area-inset-left);padding-right:constant(safe-area-inset-right);padding-right:env(safe-area-inset-right);padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.mbsc-cal-tabs-c{display:none}.mbsc-cal-tabs{display:table;width:100%;margin:0;padding:0;list-style:none}.mbsc-cal-tab{position:relative;width:33.33%;display:table-cell;overflow:hidden;cursor:pointer;text-align:center}.mbsc-cal-tabbed .mbsc-fr-c{position:relative}.mbsc-cal-tabbed .mbsc-w-p{transition:opacity .2s ease-in-out}.mbsc-cal-tabbed .mbsc-sc-whl-gr-c{position:absolute;z-index:1;top:0;left:0;right:0;max-width:none;height:100%;-webkit-box-align:center;-webkit-align-items:center;-ms-box-align:center;align-items:center}.mbsc-cal-tabbed .mbsc-cal-c,.mbsc-cal-tabbed .mbsc-cal-tabs-c{display:block}.mbsc-cal-tabbed .mbsc-fr-pos .mbsc-sc-whl-gr-c{width:auto}.mbsc-cal-has-marks .mbsc-cal-day{padding-bottom:.25em}.mbsc-cal-marks{position:absolute;left:0;right:0;height:.375em;margin-top:-.125em;overflow:hidden;white-space:nowrap}.mbsc-cal-mark{display:inline-block;vertical-align:top;width:.25em;height:.25em;margin:.0625em;border-radius:.25em}.mbsc-cal-txt-w{position:absolute;z-index:2;pointer-events:none}.mbsc-ltr .mbsc-cal-txt{text-align:left}.mbsc-rtl .mbsc-cal-txt{text-align:right}.mbsc-cal-txt,.mbsc-cal-txt-ph,.mbsc-cal-txt-more{position:relative;height:1.6em;line-height:1.6em;overflow:hidden;padding:0 .3em;font-size:.625em;white-space:nowrap;text-overflow:ellipsis;margin:0 .1em .2em .1em}.mbsc-cal-day .mbsc-cal-txt.mbsc-cal-txt-only{color:inherit;text-align:center}.mbsc-no-touch .mbsc-cal-txt:before{content:'';position:absolute;z-index:1;top:0;right:0;bottom:0;left:0;transition:background-color .2s}.mbsc-no-touch .mbsc-cal-txt-only:before{display:none}.mbsc-no-touch .mbsc-cal-txt.mbsc-hover:before{background-color:rgba(0,0,0,0.2)}.mbsc-no-touch .mbsc-cal-txt-more:hover{background-color:rgba(0,0,0,0.1)}.mbsc-cal-txt-more{text-align:left;transition:background-color .2s}.mbsc-cal .mbsc-cal-btn{position:relative;z-index:1}.mbsc-mobiscroll .mbsc-cal-c{padding:.5em}.mbsc-mobiscroll .mbsc-cal-btn-w{font-size:1.125em;line-height:2.222223em}.mbsc-mobiscroll .mbsc-cal .mbsc-cal-btn{width:2.666667em;height:2.666667em;line-height:2.666667em;padding:0;border-radius:2em;margin:-.222222em}.mbsc-mobiscroll .mbsc-cal-picker{border-top:1px solid transparent}.mbsc-mobiscroll .mbsc-cal-picker .mbsc-cal-cell-i{display:inline-block;height:2em;padding:0 1em;line-height:2em;border-radius:2em;white-space:nowrap}.mbsc-mobiscroll .mbsc-cal-days>div{font-size:.6875em}.mbsc-mobiscroll .mbsc-cal-day-date{display:inline-block;width:2.153847em;height:2.153847em;margin:.307692em 0;line-height:2.153847em;font-size:.8125em;border:2px solid transparent;border-radius:2em}.mbsc-mobiscroll .mbsc-cal-week-nr{width:2.363637em;font-size:.6875em}.mbsc-mobiscroll .mbsc-cal-tabs-c{line-height:1.875em;padding:.5em .5em 0 .5em;text-transform:uppercase}.mbsc-mobiscroll .mbsc-cal-tab{font-size:.7em;padding:0 1.2em}.mbsc-mobiscroll .mbsc-cal-picker{background:#f7f7f7}.mbsc-mobiscroll .mbsc-cal-days>div{border-bottom:1px solid #4eccc4;color:#4eccc4}.mbsc-mobiscroll .mbsc-cal-today{color:#4eccc4}.mbsc-mobiscroll.mbsc-no-touch:not(.mbsc-ev-cal) .mbsc-cal-cell:not(.mbsc-disabled):hover .mbsc-cal-cell-txt,.mbsc-mobiscroll.mbsc-no-touch .mbsc-cal-day:not(.mbsc-disabled) .mbsc-cal-day-date:hover,.mbsc-mobiscroll .mbsc-cal-cell:focus .mbsc-cal-cell-txt{background:rgba(78,204,196,0.3)}.mbsc-mobiscroll .mbsc-cal-c .mbsc-cal .mbsc-cal-body .mbsc-cal-row .mbsc-selected .mbsc-cal-cell-txt{background:#4eccc4;color:#f7f7f7}.mbsc-mobiscroll .mbsc-cal-day-colored.mbsc-selected .mbsc-cal-day-date{border-color:#4eccc4}.mbsc-mobiscroll .mbsc-cal-week-nr{color:#4eccc4}.mbsc-mobiscroll .mbsc-cal-tab{border:1px solid #4eccc4;color:#454545}.mbsc-mobiscroll .mbsc-fr-w .mbsc-cal-tabs-c .mbsc-cal-tabs .mbsc-cal-tab.mbsc-selected{background:#4eccc4;color:#f7f7f7}.mbsc-mobiscroll .mbsc-cal-mark{background:#454545}.mbsc-mobiscroll .mbsc-cal-txt{color:#f7f7f7;background:#454545}.mbsc-mobiscroll .mbsc-cal-icons{color:#454545}.mbsc-mobiscroll-dark .mbsc-fr-overlay{background:rgba(0,0,0,0.7)}.mbsc-mobiscroll-dark .mbsc-fr-w{background:#263238;color:#f7f7f7}.mbsc-mobiscroll-dark .mbsc-fr-hdr,.mbsc-mobiscroll-dark .mbsc-fr-btn{color:#4fccc4}.mbsc-mobiscroll-dark .mbsc-fr-btn.mbsc-active,.mbsc-mobiscroll-dark.mbsc-no-touch .mbsc-fr-btn-e:not(.mbsc-disabled):hover{background:rgba(79,204,196,0.3)}.mbsc-mobiscroll-dark .mbsc-fr-arr{background:#263238}.mbsc-mobiscroll-dark .mbsc-sc-lbl{color:#4fccc4}.mbsc-mobiscroll-dark .mbsc-sc-whl-l{border-top:1px solid #4fccc4;border-bottom:1px solid #4fccc4}.mbsc-mobiscroll-dark .mbsc-sc-btn{color:#4fccc4;background:#263238}.mbsc-mobiscroll-dark.mbsc-no-touch .mbsc-sc-itm.mbsc-btn-e:hover,.mbsc-mobiscroll-dark .mbsc-sc-itm:focus{background:rgba(247,247,247,0.1)}.mbsc-mobiscroll-dark.mbsc-no-touch .mbsc-sc-btn:hover:before,.mbsc-mobiscroll-dark.mbsc-sc .mbsc-sc-whl .mbsc-sc-itm.mbsc-active,.mbsc-mobiscroll-dark .mbsc-sc-btn.mbsc-active:before{background:rgba(79,204,196,0.3)}.mbsc-mobiscroll-dark .mbsc-sc-whl-multi .mbsc-sc-itm-sel:before{color:#4fccc4}.mbsc-mobiscroll-dark .mbsc-cal-picker{background:#263238}.mbsc-mobiscroll-dark .mbsc-cal-days>div{border-bottom:1px solid #4fccc4;color:#4fccc4}.mbsc-mobiscroll-dark .mbsc-cal-today{color:#4fccc4}.mbsc-mobiscroll-dark.mbsc-no-touch:not(.mbsc-ev-cal) .mbsc-cal-cell:not(.mbsc-disabled):hover .mbsc-cal-cell-txt,.mbsc-mobiscroll-dark.mbsc-no-touch .mbsc-cal-day:not(.mbsc-disabled) .mbsc-cal-day-date:hover,.mbsc-mobiscroll-dark .mbsc-cal-cell:focus .mbsc-cal-cell-txt{background:rgba(79,204,196,0.3)}.mbsc-mobiscroll-dark .mbsc-cal-c .mbsc-cal .mbsc-cal-body .mbsc-cal-row .mbsc-selected .mbsc-cal-cell-txt{background:#4fccc4;color:#263238}.mbsc-mobiscroll-dark .mbsc-cal-day-colored.mbsc-selected .mbsc-cal-day-date{border-color:#4fccc4}.mbsc-mobiscroll-dark .mbsc-cal-week-nr{color:#4fccc4}.mbsc-mobiscroll-dark .mbsc-cal-tab{border:1px solid #4fccc4;color:#f7f7f7}.mbsc-mobiscroll-dark .mbsc-fr-w .mbsc-cal-tabs-c .mbsc-cal-tabs .mbsc-cal-tab.mbsc-selected{background:#4fccc4;color:#263238}.mbsc-mobiscroll-dark .mbsc-cal-mark{background:#f7f7f7}.mbsc-mobiscroll-dark .mbsc-cal-txt{color:#263238;background:#f7f7f7}.mbsc-mobiscroll-dark .mbsc-cal-icons{color:#f7f7f7}.mbsc-voxco .mbsc-fr-overlay{background:rgba(0,0,0,0.7)}.mbsc-voxco .mbsc-fr-w{background:#F7F7F7;color:#454545}.mbsc-voxco .mbsc-fr-hdr,.mbsc-voxco .mbsc-fr-btn{color:#0D77BD}.mbsc-voxco .mbsc-fr-btn.mbsc-active,.mbsc-voxco.mbsc-no-touch .mbsc-fr-btn-e:not(.mbsc-disabled):hover{background:rgba(13,119,189,0.3)}.mbsc-voxco .mbsc-fr-arr{background:#F7F7F7}.mbsc-voxco .mbsc-sc-lbl{color:#0D77BD}.mbsc-voxco .mbsc-sc-whl-l{border-top:1px solid #0D77BD;border-bottom:1px solid #0D77BD}.mbsc-voxco .mbsc-sc-btn{color:#0D77BD;background:#F7F7F7}.mbsc-voxco.mbsc-no-touch .mbsc-sc-itm.mbsc-btn-e:hover,.mbsc-voxco .mbsc-sc-itm:focus{background:rgba(69,69,69,0.1)}.mbsc-voxco.mbsc-no-touch .mbsc-sc-btn:hover:before,.mbsc-voxco.mbsc-sc .mbsc-sc-whl .mbsc-sc-itm.mbsc-active,.mbsc-voxco .mbsc-sc-btn.mbsc-active:before{background:rgba(13,119,189,0.3)}.mbsc-voxco .mbsc-sc-whl-multi .mbsc-sc-itm-sel:before{color:#0D77BD}.mbsc-voxco .mbsc-cal-picker{background:#F7F7F7}.mbsc-voxco .mbsc-cal-days>div{border-bottom:1px solid #0D77BD;color:#0D77BD}.mbsc-voxco .mbsc-cal-today{color:#0D77BD}.mbsc-voxco.mbsc-no-touch:not(.mbsc-ev-cal) .mbsc-cal-cell:not(.mbsc-disabled):hover .mbsc-cal-cell-txt,.mbsc-voxco.mbsc-no-touch .mbsc-cal-day:not(.mbsc-disabled) .mbsc-cal-day-date:hover,.mbsc-voxco .mbsc-cal-cell:focus .mbsc-cal-cell-txt{background:rgba(13,119,189,0.3)}.mbsc-voxco .mbsc-cal-c .mbsc-cal .mbsc-cal-body .mbsc-cal-row .mbsc-selected .mbsc-cal-cell-txt{background:#0D77BD;color:#F7F7F7}.mbsc-voxco .mbsc-cal-day-colored.mbsc-selected .mbsc-cal-day-date{border-color:#0D77BD}.mbsc-voxco .mbsc-cal-week-nr{color:#0D77BD}.mbsc-voxco .mbsc-cal-tab{border:1px solid #0D77BD;color:#454545}.mbsc-voxco .mbsc-fr-w .mbsc-cal-tabs-c .mbsc-cal-tabs .mbsc-cal-tab.mbsc-selected{background:#0D77BD;color:#F7F7F7}.mbsc-voxco .mbsc-cal-mark{background:#454545}.mbsc-voxco .mbsc-cal-txt{color:#F7F7F7;background:#454545}.mbsc-voxco .mbsc-cal-icons{color:#454545}\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/**\\n * Material design colors from https://material.google.com/style/color.html#color-color-palette\\n */\\nhtml {\\n touch-action: manipulation;\\n}\\nhtml,\\nbody {\\n height: auto !important;\\n}\\n* {\\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\\n}\\nul.errors {\\n list-style: none;\\n margin: 0;\\n padding: 0;\\n}\\n.connection-progress {\\n position: absolute;\\n top: 0;\\n left: 0;\\n right: 0;\\n height: 3px;\\n background: transparentize(#18D9B4, 0.7);\\n z-index: 9999;\\n}\\n.connection-progress__fill {\\n position: absolute;\\n left: 0;\\n top: 0;\\n bottom: 0;\\n background: #18D9B4;\\n transition: width 200ms;\\n}\\n.progressBarBar {\\n transition: width 500ms;\\n}\\n.survey-engine .preview {\\n height: 100%;\\n display: flex;\\n}\\n.survey-engine .debug-flag {\\n display: none;\\n color: #9E9E9E;\\n}\\n.survey-engine .table-inverted {\\n display: flex;\\n overflow: hidden;\\n background: none;\\n}\\n.survey-engine .table-inverted thead {\\n display: flex;\\n flex-shrink: 0;\\n min-width: min-content;\\n}\\n.survey-engine .table-inverted tbody {\\n display: flex;\\n position: relative;\\n overflow-x: auto;\\n overflow-y: hidden;\\n}\\n.survey-engine .table-inverted tr {\\n display: flex;\\n flex-direction: column;\\n min-width: min-content;\\n flex-shrink: 0;\\n}\\n.survey-engine .table-inverted td,\\n.survey-engine .table-inverted th {\\n display: block;\\n}\\n.survey-engine__error {\\n font-family: 'Roboto Mono', monospace;\\n font-weight: 500;\\n line-height: 1.5em;\\n padding: 1em;\\n font-size: 12px;\\n color: #F41134;\\n background: white;\\n}\\n.survey-engine__error h1 {\\n font-family: 'Roboto Mono', monospace;\\n font-weight: 300;\\n font-size: 20px;\\n line-height: 29px;\\n margin: 0;\\n padding: 12px 0;\\n color: #F41134;\\n}\\n.survey-engine__error pre {\\n font-family: 'Roboto Mono', monospace;\\n white-space: pre-wrap;\\n margin: 0;\\n}\\n.survey-engine__error pre span:before {\\n color: #e3a6a6;\\n}\\n.survey-engine--debug .survey-engine__error {\\n display: block;\\n}\\n.survey-engine--debug .debug-flag {\\n display: inherit;\\n}\\n@media (max-width: 1024px) {\\n .survey-engine .preview__mobile {\\n display: none;\\n }\\n}\\n@keyframes loader-scale {\\n 0% {\\n transform: scale(0);\\n opacity: 0;\\n }\\n 50% {\\n opacity: 1;\\n }\\n 100% {\\n transform: scale(1);\\n opacity: 0;\\n }\\n}\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/assets/main.less\"],\"names\":[],\"mappings\":\"AAAA;;EAEE;AACF;EACI,0BAAA;AACJ;AAEA;;EAEI,uBAAA;AAAJ;AAGA;EACI,6CAAA;AADJ;AAIA;EACI,gBAAA;EACA,SAAA;EACA,UAAA;AAFJ;AAKA;EACI,kBAAA;EACA,MAAA;EACA,OAAA;EACA,QAAA;EACA,WAAA;EACA,wCAAA;EACA,aAAA;AAHJ;AAKI;EACI,kBAAA;EACA,OAAA;EACA,MAAA;EACA,SAAA;EACA,mBAAA;EACA,uBAAA;AAHR;AAOA;EACI,uBAAA;AALJ;AAQA;EAGQ,YAAA;EACA,aAAA;AARR;AAIA;EAQQ,aAAA;EACA,cAAA;AATR;AAAA;EAaQ,aAAA;EACA,gBAAA;EACA,gBAAA;AAVR;AALA;EAkBY,aAAA;EACA,cAAA;EACA,sBAAA;AAVZ;AAVA;EAwBY,aAAA;EACA,kBAAA;EACA,gBAAA;EACA,kBAAA;AAXZ;AAhBA;EA+BY,aAAA;EACA,sBAAA;EACA,sBAAA;EACA,cAAA;AAZZ;AAtBA;;EAuCY,cAAA;AAbZ;AAiBI;EAEI,qCAAA;EACA,gBAAA;EACA,kBAAA;EACA,YAAA;EACA,eAAA;EACA,cAAA;EACA,iBAAA;AAhBR;AAQI;EAWQ,qCAAA;EACA,gBAAA;EACA,eAAA;EACA,iBAAA;EACA,SAAA;EACA,eAAA;EACA,cAAA;AAhBZ;AADI;EAqBQ,qCAAA;EACA,qBAAA;EACA,SAAA;AAjBZ;AANI;EA0BY,cAAA;AAjBhB;AAsBI;EAGQ,cAAA;AAtBZ;AAmBI;EAOQ,gBAAA;AAvBZ;AA2BI;EAAA;IAEQ,aAAA;EAzBV;AACF;AA6BA;EACI;IACI,mBAAA;IACA,UAAA;EA3BN;EA8BE;IACI,UAAA;EA5BN;EA+BE;IACI,mBAAA;IACA,UAAA;EA7BN;AACF\",\"sourcesContent\":[\"@import 'palette.less';\\n@import 'variables.less';\\n\\nhtml {\\n touch-action: manipulation;\\n}\\n\\nhtml,\\nbody {\\n height: auto !important;\\n}\\n\\n* {\\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\\n}\\n\\nul.errors {\\n list-style: none;\\n margin: 0;\\n padding: 0;\\n}\\n\\n.connection-progress {\\n position: absolute;\\n top: 0;\\n left: 0;\\n right: 0;\\n height: 3px;\\n background: transparentize(@primary, 0.7);\\n z-index: 9999;\\n\\n &__fill {\\n position: absolute;\\n left: 0;\\n top: 0;\\n bottom: 0;\\n background: @primary;\\n transition: width 200ms;\\n }\\n}\\n\\n.progressBarBar {\\n transition: width 500ms;\\n}\\n\\n.survey-engine {\\n\\n .preview {\\n height: 100%;\\n display: flex;\\n }\\n\\n .debug-flag {\\n display: none;\\n color: @grey;\\n }\\n\\n .table-inverted {\\n display: flex;\\n overflow: hidden;\\n background: none;\\n\\n thead {\\n display: flex;\\n flex-shrink: 0;\\n min-width: min-content;\\n }\\n\\n tbody {\\n display: flex;\\n position: relative;\\n overflow-x: auto;\\n overflow-y: hidden;\\n }\\n\\n tr {\\n display: flex;\\n flex-direction: column;\\n min-width: min-content;\\n flex-shrink: 0;\\n }\\n\\n td,\\n th {\\n display: block;\\n }\\n }\\n\\n &__error {\\n //display: none;\\n font-family: 'Roboto Mono', monospace;\\n font-weight: 500;\\n line-height: 1.5em;\\n padding: 1em;\\n font-size: 12px;\\n color: @error;\\n background: white;\\n\\n h1 {\\n font-family: 'Roboto Mono', monospace;\\n font-weight: 300;\\n font-size: 20px;\\n line-height: @baseline;\\n margin: 0;\\n padding: 12px 0;\\n color: @error;\\n }\\n\\n pre {\\n font-family: 'Roboto Mono', monospace;\\n white-space: pre-wrap;\\n margin: 0;\\n\\n span:before {\\n color: desaturate(@red-200, 20%)\\n }\\n }\\n }\\n\\n &--debug {\\n\\n .survey-engine__error {\\n display: block;\\n }\\n\\n .debug-flag {\\n display: inherit;\\n }\\n }\\n\\n @media (max-width: 1024px) {\\n .preview__mobile {\\n display: none;\\n }\\n }\\n}\\n\\n@keyframes loader-scale {\\n 0% {\\n transform: scale(0);\\n opacity: 0;\\n }\\n\\n 50% {\\n opacity: 1;\\n }\\n\\n 100% {\\n transform: scale(1);\\n opacity: 0;\\n }\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","const doc = [({\"common\":({\"loading\":\"Loading\", \"nextPage\":\"Next page\", \"previousPage\":\"Previous page\", \"yes\":\"Yes\", \"no\":\"No\", \"online\":\"Online\", \"phone\":\"Phone\"}), \"debug\":({\"title\":\"Debug Panel\", \"testMode\":\"Test Mode\", \"previewMode\":\"Preview Mode\", \"toggleMobilePreview\":\"Show/hide mobile preview\", \"panels\":({\"goToQuestion\":({\"title\":\"Go To Question\", \"search\":\"Search questions...\"}), \"flow\":({\"title\":\"Survey Flow\", \"audioRecording\":\"audio recording\", \"audioRecording_start\":\"Start audio recording\", \"audioRecording_stop\":\"Stop audio recording\", \"branchTo\":\"Branch to {{destination}}\", \"branchTo_autoclean\":\"Branch to {{destination}} [autoclean]\", \"branchToExitUrl\":\"Exit url {{url}} with disposition code {{code}}\", \"completed\":\"Completed\", \"computeVariable\":\"Compute {{variable}}={{value}}\", \"conditionNotMet\":\"condition is not met\", \"exit\":\"Exit {{code}}\", \"selection\":\"Selection\", \"sendEmail\":\"Send email\", \"setPanelistData\":\"Set panelist data\", \"setRow\":\"Set {{block}} row to {{value}}\", \"setVariable\":\"Set {{variable}}={{value}}\", \"setVariable_row\":\"Set {{variable}}={{value}} with row {{matrix}}\", \"simulating\":\"Simulating\", \"toggleLogic\":\"Show/hide logic\"}), \"variables\":({\"title\":\"Variables\", \"openEnd\":\"Open-end\", \"search\":\"Search variables...\", \"text\":\"Text\"}), \"accessibility\":({\"title\":\"Accessibility\", \"label\":({\"error\":\"Error\", \"warning\":\"Warning\", \"elements\":\"Elements\"})}), \"settings\":({\"title\":\"Settings\", \"enableDebugInfo\":\"Enable debug info\", \"display\":({\"title\":\"Display\", \"dockLeft\":\"Dock to left\", \"dockRight\":\"Dock to right\", \"undock\":\"Undock\"})})})}), \"textHighligher\":({\"selectCategory\":\"Select Category\", \"comments\":\"Comments\", \"cancel\":\"Cancel\", \"save\":\"Save\", \"delete\":\"Delete\"})})];\nmodule.exports = doc.length <= 1 ? doc[0] : doc;","const doc = [({\"common\":({\"loading\":\"Chargement\", \"nextPage\":\"Page suivante\", \"previousPage\":\"Page précédente\", \"yes\":\"Oui\", \"no\":\"Non\", \"online\":\"Online\", \"phone\":\"Téléphone\"}), \"debug\":({\"title\":\"Panneau de déboguage\", \"testMode\":\"Mode Test\", \"previewMode\":\"Mode prévisualisation\", \"toggleMobilePreview\":\"Prévisualisation mobile\", \"panels\":({\"goToQuestion\":({\"title\":\"Navigateur de questions\", \"search\":\"Rechercher des questions...\"}), \"flow\":({\"title\":\"Flux\", \"audioRecording\":\"enregistrement audio\", \"audioRecording_start\":\"Démarrer l'enregistrement audio\", \"audioRecording_stop\":\"Arrêter l'enregistrement audio\", \"branchTo\":\"Brancher vers {{destination}}\", \"branchTo_autoclean\":\"Brancher vers {{destination}} [autoclean]\", \"branchToExitUrl\":\"Quitter puis naviguer vers {{url}} avec le code {{code}}\", \"completed\":\"Complété\", \"computeVariable\":\"Calculer {{variable}}={{value}}\", \"conditionNotMet\":\"condition n'est pas remplie\", \"exit\":\"Quitter {{code}}\", \"selection\":\"Sélectionner\", \"sendEmail\":\"Envoyer un courriel\", \"setPanelistData\":\"Assigner des champs de panéliste\", \"setRow\":\"Déplacer {{block}} à la rangée {{value}}\", \"setVariable\":\"Assigner {{variable}}={{value}}\", \"setVariable_row\":\"Assigner {{variable}}={{value}} pour la rangée {{matrix}}\", \"simulating\":\"Simulation\", \"toggleLogic\":\"Afficher/cacher la logique\"}), \"variables\":({\"title\":\"Variables\", \"openEnd\":\"Réponse ouverte\", \"search\":\"Rechercher des variables...\", \"text\":\"Texte\"}), \"accessibility\":({\"title\":\"Accessibilité\", \"label\":({\"error\":\"Erreur\", \"warning\":\"Avertissement\", \"elements\":\"Éléments\"})}), \"settings\":({\"title\":\"Paramètres\", \"enableDebugInfo\":\"Informations de déboguage\", \"display\":({\"title\":\"Affichage\", \"dockLeft\":\"Ancré à gauche\", \"dockRight\":\"Ancré à droite\", \"undock\":\"Flottant\"})})})}), \"textHighligher\":({\"selectCategory\":\"Sélectionnez une catégorie\", \"comments\":\"Commentaires\", \"cancel\":\"Annuler\", \"save\":\"Sauvegarder\", \"delete\":\"Supprimer\"})})];\nmodule.exports = doc.length <= 1 ? doc[0] : doc;","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!./mobiscroll.javascript.min.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!./mobiscroll.javascript.min.css\";\n export default content && content.locals ? content.locals : undefined;\n","import \"core-js\";\r\nimport smoothscroll from \"smoothscroll-polyfill\";\r\n\r\nsmoothscroll.polyfill();\r\n\r\n// IE9+ Element.closest polyfill: https://developer.mozilla.org/en-US/docs/Web/API/Element/closest\r\nif (!Element.prototype.matches) {\r\n Element.prototype.matches =\r\n (Element.prototype as any).msMatchesSelector || Element.prototype.webkitMatchesSelector;\r\n}\r\nif (!Element.prototype.closest) {\r\n Element.prototype.closest = function closest(s) {\r\n let el = this;\r\n do {\r\n if (el.matches(s)) return el;\r\n el = el.parentElement || el.parentNode;\r\n } while (el !== null && el.nodeType === 1);\r\n return null;\r\n };\r\n}\r\n","import React from \"react\";\r\nimport { connect, DispatchProp } from \"react-redux\";\r\nimport { StoreState } from \"../models/states/StoreState\";\r\nimport { ThemedSurveyEngine } from \"../components/SurveyEngine\";\r\nimport { SurveyMode } from \"../models/enums/SurveyMode\";\r\nimport { ErrorLog } from \"../components/shared/ErrorLog\";\r\n\r\ninterface StateProps {\r\n ready: boolean;\r\n debug: boolean;\r\n mode: SurveyMode;\r\n progress: number;\r\n}\r\n\r\ninterface State {\r\n error?: Error;\r\n}\r\n\r\nclass AppImpl extends React.PureComponent {\r\n constructor(props: StateProps & DispatchProp) {\r\n super(props);\r\n this.state = {};\r\n }\r\n\r\n componentDidCatch(error: Error, info: React.ErrorInfo) {\r\n // Display fallback UI\r\n this.setState({ error });\r\n console.log(error);\r\n }\r\n\r\n render() {\r\n const { error } = this.state;\r\n if (error) return ;\r\n const { progress } = this.props;\r\n return (\r\n <>\r\n {progress && (\r\n
\r\n \r\n
\r\n )}\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nconst mapStateToProps = (state: StoreState): StateProps => ({\r\n ready:\r\n state.interview &&\r\n state.interview.navigation.currentPage &&\r\n state.interview.navigation.currentPage.isReady,\r\n debug: state.application.debug,\r\n mode: state.application.mode,\r\n progress: state.connection.progress,\r\n});\r\n\r\nexport const App = connect(mapStateToProps)(AppImpl);\r\n","import i18n from \"i18next\";\r\nimport { initReactI18next } from \"react-i18next\";\r\nimport en from \"./en.yml\";\r\nimport fr from \"./fr.yml\";\r\nimport getUrlParameters from \"../utils/getUrlParameters\";\r\n\r\nconst supportedLanguages = [\"en\", \"fr\"];\r\n\r\ni18n.use(initReactI18next).init({\r\n resources: {\r\n en: { translation: en },\r\n fr: { translation: fr },\r\n },\r\n lng: document.documentElement.lang,\r\n interpolation: {\r\n escapeValue: false, // react already safes from xss\r\n },\r\n fallbackLng: \"en\",\r\n});\r\n\r\nconst debugLanguage = getUrlParameters().dlang || document.documentElement.lang;\r\nif (supportedLanguages.includes(debugLanguage)) {\r\n i18n.changeLanguage(debugLanguage);\r\n}\r\n\r\nexport default i18n;\r\n","export default function getUrlParameters(): any {\r\n const vars = {};\r\n window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, (m, key, value) => {\r\n vars[key] = value;\r\n return \"\";\r\n });\r\n return vars;\r\n}\r\n","import \"./polyfills\";\r\nimport React from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\nimport { Provider } from \"react-redux\";\r\nimport { App } from \"./containers/App\";\r\nimport { __getStore__ } from \"./redux/store\";\r\nimport { Voxco } from \"./public\";\r\nimport \"./i18n\";\r\n\r\nconsole.log(\r\n \"%c%s\",\r\n \"font-size: 10px; color: #1b9aff\",\r\n `\r\n .((((((((((((((\r\n ((((((((((((()\r\n ((((((((((((+ /\r\n (((((((((((+ ((\r\n ... ((((+++(((/ ((( ... ....\r\n)(() .(() +(((++(((+ ((((+ (/ (((( .(((((((()< .((()++(((+\r\n -((( /((+ /((/ .((( ((((() .((((( (((( )<. /((/ (((.\r\n (((. /((/ (() ((( \\\\+++++....+++++. )((( (() (((\r\n )((((((( ((( ((( /(((( )((( ((( .(((\r\n \\\\((((- -((). /((+ (((-(((. \\\\((). .+()- -((). <((+\r\n )(+- )+((((((+. (((- (((. )+(((((+<. )+((((()+.\r\n (((-\r\n .(()\r\n )((+\r\nhttps://www.voxco.com/\r\n`,\r\n);\r\nconsole.log(`🚀 SurveyEngineJS v${Voxco.version} © Voxco ${new Date().getFullYear()}`);\r\n\r\n// This is the entry point for development environments.\r\n// We can add development-specific dependencies here.\r\n\r\nrequire(\"../lib/mobiscroll/css/mobiscroll.javascript.min.css\");\r\n\r\n(window as any).Voxco = Voxco;\r\n\r\nrequire(\"./assets/main.less\");\r\n\r\nReactDOM.render(\r\n \r\n \r\n ,\r\n document.getElementById(\"root\"),\r\n);\r\n\r\nfunction onDisconnectedModeInit() {\r\n if (this.readyState === this.DONE) {\r\n const survey = JSON.parse(this.responseText);\r\n Voxco.init({\r\n debug: true,\r\n mode: \"preview\",\r\n messages: true,\r\n mobileMode: false,\r\n survey,\r\n containerHost: \"http://localhost:4444\",\r\n displayInThemeEditor: false,\r\n hideAccessibilityPanel: true,\r\n });\r\n }\r\n}\r\n\r\nfunction onIntegratedServerInit() {\r\n if (this.readyState === this.DONE) {\r\n const psid = this.getResponseHeader(\"X-VX-PSID\");\r\n const skey = this.getResponseHeader(\"X-VX-SKEY\");\r\n if (psid) {\r\n const psidInputElement = document.createElement(\"input\");\r\n psidInputElement.type = \"hidden\";\r\n psidInputElement.id = \"S2_SessionId\";\r\n psidInputElement.value = psid;\r\n\r\n document.body.appendChild(psidInputElement);\r\n }\r\n\r\n if (skey) {\r\n const skeyInputElement = document.createElement(\"input\");\r\n skeyInputElement.type = \"hidden\";\r\n skeyInputElement.id = \"S2_SessionId_Skey\";\r\n skeyInputElement.value = skey;\r\n\r\n document.body.appendChild(skeyInputElement);\r\n }\r\n\r\n Voxco.init({\r\n debug: true,\r\n mode: \"preview\",\r\n messages: true,\r\n mobileMode: false,\r\n apiUrl: \"/s2\",\r\n containerHost: \"http://localhost:4444\",\r\n displayInThemeEditor: false,\r\n hideAccessibilityPanel: false,\r\n });\r\n }\r\n}\r\n\r\nif (process.env.NODE_ENV === \"development\") {\r\n const DEBUG_TOKEN = \"kN5wYQ3jD8zLhE7fZJ1rXq6mP4sTcB9oVx0aRnG2uWl8vIpOgFyMAbEtUkSj\";\r\n\r\n const inputElement = document.createElement(\"input\");\r\n inputElement.type = \"hidden\";\r\n inputElement.name = \"__RequestVerificationToken\";\r\n inputElement.value = DEBUG_TOKEN;\r\n\r\n document.body.appendChild(inputElement);\r\n\r\n if (process.env.FULL_INTEGRATED_MODE === \"true\") {\r\n const xhr = new XMLHttpRequest();\r\n xhr.withCredentials = true;\r\n xhr.addEventListener(\"readystatechange\", onIntegratedServerInit);\r\n xhr.open(\r\n \"GET\",\r\n `/s2/sl?debug=1&cid=${process.env.CLIENT_ID}&sid=${\r\n process.env.SURVEY_ID\r\n }&nocookie=1&m=1&tui=${new Date().getTime()}`,\r\n );\r\n xhr.send();\r\n } else {\r\n const xhr = new XMLHttpRequest();\r\n xhr.withCredentials = true;\r\n xhr.addEventListener(\"readystatechange\", onDisconnectedModeInit);\r\n xhr.open(\"GET\", `/api/offline/survey/export/json/${process.env.SURVEY_ID}`);\r\n xhr.setRequestHeader(\r\n \"Authorization\",\r\n `Client ${decodeURIComponent(process.env.API_TOKEN)}`,\r\n );\r\n xhr.setRequestHeader(\"Content-Type\", \"application/json\");\r\n xhr.send();\r\n }\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\nimport * as Mixins from \"../theme/Mixins\";\r\n\r\nexport default createUseStyles({\r\n simulatedBanner: {\r\n background: \"#EB6725\",\r\n borderBottom: [[3, \"solid\", \"#FF9300\"]],\r\n boxSizing: \"border-box\",\r\n color: \"#FFFFFF\",\r\n composes: \"simulated-banner\",\r\n height: 38,\r\n left: ({ bounds }) => bounds.left,\r\n lineHeight: \"38px\",\r\n padding: [[0, 35]],\r\n position: \"absolute\",\r\n right: ({ bounds }) => bounds.right,\r\n top: 0,\r\n zIndex: 1,\r\n paddingRight: \"20px\",\r\n display: \"flex\",\r\n justifyContent: \"space-between\",\r\n\r\n \"& .modalityInformativeMessage\": {\r\n width: \"20%\",\r\n fontSize: \"14px\",\r\n fontStyle: \"normal\",\r\n fontWeight: 600,\r\n textAlign: \"end\",\r\n fontFamily: ({ theme }) => `\"${theme.TextFont}\", sans-serif`,\r\n },\r\n\r\n \"& .previewModeMessage\": {\r\n width: \"80%\",\r\n },\r\n },\r\n simulatedBannerMessage: {\r\n composes: \"simulated-banner__message\",\r\n fontFamily: ({ theme }) => `\"${theme.TextFont}\", sans-serif`,\r\n fontSize: 14,\r\n padding: [[0, 15]],\r\n },\r\n surveyEngine: {\r\n \"& .pageContainer\": {\r\n height: \"100%\",\r\n },\r\n \"& .bg-primary\": ({ theme }) => ({ background: theme.PrimaryColor }),\r\n \"& .bg-secondary\": ({ theme }) => ({ background: theme.SecondaryColor }),\r\n \"& .fill-primary\": ({ theme }) => ({ fill: theme.PrimaryColor }),\r\n \"& .fill-secondary\": ({ theme }) => ({ fill: theme.SecondaryColor }),\r\n \"& .text-primary\": ({ theme }) => ({ color: theme.PrimaryColor }),\r\n \"& .text-secondary\": ({ theme }) => ({ color: theme.SecondaryColor }),\r\n \"& .flex\": { flex: 1 },\r\n \"& .clear\": { display: \"block\", clear: \"both\" },\r\n \"& label\": {\r\n cursor: \"inherit\",\r\n },\r\n \"& h1, h2, h3, h4, h5, h6\": {\r\n margin: 0,\r\n padding: 0,\r\n fontFamily: ({ theme }) => `\"${theme.TitleFont}\", sans-serif`,\r\n fontWeight: ({ theme }) => Mixins.getFontWeight(theme.TitleFontVariant, 400),\r\n fontStyle: ({ theme }) =>\r\n theme.TitleFontVariant ? Mixins.getFontStyle(theme.TitleFontVariant) : \"normal\",\r\n textAlign: ({ theme }) => Mixins.getTextAlign(theme.TitleTextAlign),\r\n },\r\n \"& h1\": {\r\n fontSize: ({ theme }) =>\r\n Mixins.getFontSize(\r\n theme.TitleFontSize * theme.HeaderSizes.H1,\r\n `${theme.HeaderSizes.H1 * theme.TextFontSize}px`,\r\n ),\r\n lineHeight: ({ theme }) =>\r\n Mixins.getLineHeight(\r\n theme.TitleFontSize * theme.HeaderSizes.H1,\r\n 32,\r\n theme.BaseFontSize,\r\n ),\r\n marginBottom: \"1.5em\",\r\n },\r\n \"& h2\": {\r\n fontSize: ({ theme }) =>\r\n Mixins.getFontSize(\r\n theme.TitleFontSize * theme.HeaderSizes.H2,\r\n `${theme.HeaderSizes.H2 * theme.TextFontSize}px`,\r\n ),\r\n lineHeight: ({ theme }) =>\r\n Mixins.getLineHeight(\r\n theme.TitleFontSize * theme.HeaderSizes.H2,\r\n 32,\r\n theme.BaseFontSize,\r\n ),\r\n marginBottom: \"0.5em\",\r\n },\r\n \"& h3\": {\r\n fontSize: ({ theme }) =>\r\n Mixins.getFontSize(\r\n theme.TitleFontSize * theme.HeaderSizes.H3,\r\n `${theme.HeaderSizes.H3 * theme.TextFontSize}px`,\r\n ),\r\n lineHeight: ({ theme }) =>\r\n Mixins.getLineHeight(\r\n theme.TitleFontSize * theme.HeaderSizes.H3,\r\n 32,\r\n theme.BaseFontSize,\r\n ),\r\n },\r\n \"& h4\": {\r\n fontSize: ({ theme }) =>\r\n Mixins.getFontSize(\r\n theme.TitleFontSize * theme.HeaderSizes.H4,\r\n `${theme.HeaderSizes.H4 * theme.TextFontSize}px`,\r\n ),\r\n lineHeight: ({ theme }) =>\r\n Mixins.getLineHeight(\r\n theme.TitleFontSize * theme.HeaderSizes.H4,\r\n 32,\r\n theme.BaseFontSize,\r\n ),\r\n },\r\n background: ({ theme }) => theme.PageBackground,\r\n composes: \"survey-engine\",\r\n display: \"block\",\r\n fontFamily: ({ theme }) => `\"${theme.TextFont}\", sans-serif`,\r\n fontSize: ({ theme }) => Mixins.getFontSize(theme.TextFontSize),\r\n fontStyle: ({ theme }) => Mixins.getFontStyle(theme.TextFontVariant),\r\n fontWeight: ({ theme }) => Mixins.getFontWeight(theme.TextFontVariant, 400),\r\n lineHeight: ({ theme }) =>\r\n Mixins.getLineHeight(theme.TextFontSize, theme.LineHeight, theme.BaseFontSize),\r\n overflow: ({ mobilePreview }) => mobilePreview && \"hidden\",\r\n overflowY: \"scroll\",\r\n position: \"absolute\",\r\n bottom: ({ bounds }) => bounds.bottom,\r\n left: ({ bounds }) => bounds.left,\r\n right: ({ bounds }) => bounds.right,\r\n top: ({ bounds }) => bounds.top,\r\n textSizeAdjust: \"100%\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { ThemeProvider, useTheme, JssProvider } from \"react-jss\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { PageContainer } from \"../containers/page/PageContainer\";\r\nimport { getContainerDiv } from \"../utils\";\r\nimport { MobilePreview } from \"./shared/MobilePreview\";\r\nimport useStyles from \"./SurveyEngine.styles\";\r\nimport useTranslatable from \"../hooks/useTranslatable\";\r\nimport DefaultTheme from \"../theme/DefaultTheme\";\r\nimport { StoreState } from \"../models/states/StoreState\";\r\nimport { ErrorLogContainer } from \"../containers/ErrorLogContainer\";\r\nimport { Voxco } from \"../public\";\r\nimport { FontAwesomeIcon } from \"./shared/FontAwesome\";\r\nimport { SurveyMode } from \"../models/enums/SurveyMode\";\r\nimport useReservedBounds, {\r\n ReservedBoundsContextProvider,\r\n ReservedBounds,\r\n} from \"../hooks/useReservedBounds\";\r\nimport { DebugPanel } from \"./debug/DebugPanel\";\r\nimport { selectNavigationMessage } from \"../redux/selectors/interview/navigation\";\r\nimport { SurveyQuestionnaireModality } from \"../models/enums/SurveyQuestionnaireModality\";\r\nimport { QuestionnaireModel } from \"../models/QuestionnaireModel\";\r\n\r\ninterface Props {\r\n bounds: ReservedBounds;\r\n}\r\n\r\nfunction SimulatedBanner({ bounds }) {\r\n const theme = useTheme();\r\n const classes = useStyles({\r\n bounds,\r\n theme,\r\n });\r\n useReservedBounds({ top: 38 }, []);\r\n const questionnaire = useSelector((state: StoreState) => state.interview.questionnaire);\r\n const previewModeMessage = useTranslatable(questionnaire, \"previewModeMessage\");\r\n const modalityInformationText = GetModalityInformativeText(questionnaire);\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n {previewModeMessage}\r\n \r\n
\r\n
\r\n {modalityInformationText !== null && {modalityInformationText}}\r\n
\r\n
\r\n );\r\n}\r\n\r\nfunction GetModalityInformativeText(questionnaire: QuestionnaireModel) {\r\n const { t, i18n } = useTranslation();\r\n\r\n if (!questionnaire?.modality || !i18n.languages || i18n.languages.length === 0) {\r\n return null;\r\n }\r\n\r\n switch (questionnaire.modality) {\r\n case SurveyQuestionnaireModality.Online:\r\n return t(\"common.online\");\r\n case SurveyQuestionnaireModality.Phone:\r\n return t(\"common.phone\");\r\n default:\r\n return null;\r\n }\r\n}\r\n\r\nfunction SurveyEngine({ bounds }: Props) {\r\n const simulated = useSelector(\r\n (state: StoreState) =>\r\n process.env.NODE_ENV !== \"development\" && // Do not show simulated warning if we are in dev.\r\n state.interview.respondent &&\r\n state.interview.respondent.simulated,\r\n );\r\n\r\n const debugPanelVisible =\r\n useSelector(\r\n (state: StoreState) =>\r\n state.application.mode === SurveyMode.Preview ||\r\n state.application.mode === SurveyMode.Test,\r\n ) && process.env.NODE_ENV !== \"test\";\r\n const mobilePreview = useSelector((state: StoreState) => state.mobilePreview);\r\n const simulatedBannerVisible =\r\n useSelector((state: StoreState) => state.application.mode !== SurveyMode.Normal) &&\r\n simulated;\r\n\r\n const theme = useTheme();\r\n const classes = useStyles({\r\n bounds,\r\n theme,\r\n mobilePreview,\r\n simulatedBannerVisible,\r\n });\r\n\r\n const { CustomCSS, CustomJavascript } = theme as any;\r\n\r\n React.useEffect(() => {\r\n // Adjust height if debug panel is shown.\r\n const surveyEngine = getContainerDiv();\r\n const debugPanel = document.getElementsByClassName(\"debug-pane\")[0] as HTMLElement;\r\n if (debugPanel != null) {\r\n const { height } = debugPanel.getBoundingClientRect();\r\n surveyEngine.style.bottom = `${height}px`;\r\n }\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n // eslint-disable-next-line\r\n (function customJs(console) {\r\n try {\r\n // eslint-disable-next-line\r\n eval(`${CustomJavascript}\\n//# sourceURL=custom.js`);\r\n } catch (ex) {\r\n Voxco.error(ex);\r\n }\r\n }.call(Voxco, { log: Voxco.log, error: Voxco.error }));\r\n }, [CustomJavascript]);\r\n\r\n return (\r\n <>\r\n {simulatedBannerVisible && }\r\n
\r\n {debugPanelVisible && mobilePreview ? (\r\n }\r\n renderMobile={() => }\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n
\r\n {debugPanelVisible && }\r\n \r\n );\r\n}\r\n\r\nexport function ThemedSurveyEngine() {\r\n const hasQuestionnaire = useSelector(({ interview }: StoreState) =>\r\n Boolean(interview.questionnaire),\r\n );\r\n\r\n const hasMessage = useSelector(selectNavigationMessage);\r\n\r\n const settings = useSelector(\r\n ({ interview }: StoreState) => interview.theme && interview.theme.settings,\r\n );\r\n\r\n const themeSettings = React.useMemo(\r\n () => ({\r\n // Setup default settings for theme.\r\n ...DefaultTheme,\r\n // Override with theme settings.\r\n ...settings,\r\n }),\r\n [settings],\r\n );\r\n\r\n return (\r\n
\r\n {hasQuestionnaire || hasMessage ? (\r\n \r\n \r\n \r\n {(bounds) => }\r\n \r\n \r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n );\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\n\r\nexport default createUseStyles({\r\n loading: {\r\n color: \"#919191\",\r\n textAlign: \"center\",\r\n padding: [[12, 0]],\r\n lineHeight: \"20px\",\r\n fontSize: \"11px\",\r\n fontWeight: 700,\r\n },\r\n});\r\n","import * as React from \"react\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport useStyles from \"./LoadingEllipsis.styles\";\r\n\r\ninterface LoadingEllipsisProps {\r\n duration?: number;\r\n text?: string;\r\n}\r\n\r\nexport default function LoadingEllipsis({ duration = 1000, text }: LoadingEllipsisProps) {\r\n const classes = useStyles({});\r\n const [count, setCount] = React.useState(0);\r\n const { t } = useTranslation();\r\n\r\n React.useEffect(() => {\r\n const onTick = () => setCount((e) => (e + 1) % 3);\r\n const interval = window.setInterval(onTick, duration / 3);\r\n return () => window.clearInterval(interval);\r\n }, [duration]);\r\n\r\n return (\r\n
\r\n {text || t(\"common.loading\")}\r\n \r\n {\".\".repeat(count + 1)}\r\n \r\n
\r\n );\r\n}\r\n","import thunkMiddleware from \"redux-thunk\";\r\nimport { createStore, applyMiddleware, Store } from \"redux\";\r\nimport { flowController } from \"../redux/middleware/flowController\";\r\nimport { navigationNextPage } from \"../redux/actions\";\r\nimport { rootReducer } from \"../redux/reducers\";\r\nimport { PageModel } from \"../models/PageModel\";\r\nimport { StoreState } from \"../models/states/StoreState\";\r\n\r\nconst MAX_PAGES = 20; // This is the maximum number of pages we should simulate.\r\n\r\nconst pageSelector = (state: StoreState) => state.interview.navigation.currentPage;\r\n\r\nfunction createSimulatedStore(initialState: StoreState) {\r\n return createStore(rootReducer, initialState, applyMiddleware(thunkMiddleware, flowController));\r\n}\r\n\r\nfunction simulatePages(store: Store) {\r\n // Iterate until we get the same page twice.\r\n const pages = [];\r\n let lastPage: PageModel;\r\n let currentPage: PageModel;\r\n do {\r\n const previousPage = pageSelector(store.getState());\r\n store.dispatch(navigationNextPage());\r\n if (currentPage) pages.push(currentPage);\r\n lastPage = currentPage;\r\n currentPage = pageSelector(store.getState());\r\n if (currentPage === previousPage) break;\r\n if (pages.length >= MAX_PAGES) return pages;\r\n } while (lastPage !== currentPage);\r\n return pages;\r\n}\r\n\r\nexport async function startSimulationAsync(initialState: StoreState) {\r\n const store = createSimulatedStore(initialState);\r\n const pages = simulatePages(store);\r\n return pages;\r\n}\r\n","import * as React from \"react\";\r\nimport { AnyAction } from \"redux\";\r\nimport { useStore, useSelector } from \"react-redux\";\r\nimport { StoreState } from \"../models/states/StoreState\";\r\nimport { PageModel } from \"../models/PageModel\";\r\nimport { startSimulationAsync } from \"../simulator/simulatePages\";\r\n\r\nconst pageSelector = (state: StoreState) => state.interview.navigation.currentPage;\r\n\r\nexport default function useSimulatedPages() {\r\n const [simulating, setSimulating] = React.useState(true);\r\n const [simulatedPages, setSimulatedPages] = React.useState([]);\r\n const currentPage = useSelector(pageSelector);\r\n const store = useStore();\r\n\r\n React.useEffect(() => {\r\n setSimulatedPages([]);\r\n\r\n function onMessage({ data: { type, pages, error } }) {\r\n if (error) console.log(error);\r\n if (type === \"done\") setSimulatedPages(pages);\r\n setSimulating(false);\r\n }\r\n\r\n if (typeof Worker !== \"undefined\") {\r\n // If web workers are supported.\r\n setSimulating(true);\r\n\r\n const worker = new Worker(\"../simulator/worker.ts\");\r\n worker.addEventListener(\"message\", onMessage);\r\n worker.postMessage({ type: \"simulate\", initialState: store.getState() });\r\n\r\n return () => {\r\n worker.removeEventListener(\"message\", onMessage);\r\n };\r\n }\r\n\r\n // If web workers are not supported, use an async function instead.\r\n startSimulationAsync(store.getState())\r\n .catch((ex) => {\r\n if (ex) console.log(ex);\r\n })\r\n .then((pages: PageModel[]) => {\r\n setSimulatedPages(pages);\r\n setSimulating(false);\r\n });\r\n\r\n // If web workers are not supported, give up.\r\n setSimulating(false);\r\n return undefined;\r\n }, [store, currentPage]);\r\n\r\n return { simulatedPages, simulating };\r\n}\r\n","import React from \"react\";\r\n\r\ninterface Options {\r\n center?: boolean;\r\n}\r\n\r\nexport default function useScrollToActive(\r\n containerRef: React.MutableRefObject,\r\n options?: Options,\r\n) {\r\n const { center } = options || {};\r\n const activeElement = React.useRef();\r\n\r\n // On first render scroll to immediately.\r\n React.useEffect(() => {\r\n const el = containerRef.current?.querySelector(\"*[data-active=true]\");\r\n if (!el) return;\r\n if (typeof el.scrollIntoView === \"function\") {\r\n el.scrollIntoView({\r\n block: center ? \"center\" : undefined,\r\n });\r\n }\r\n activeElement.current = el;\r\n }, []);\r\n\r\n // On subsequent renders smoothly scroll.\r\n React.useEffect(() => {\r\n const el = containerRef.current?.querySelector(\"*[data-active=true]\");\r\n if (!el) return;\r\n if (el === activeElement.current) return;\r\n if (typeof el.scrollIntoView === \"function\") {\r\n el.scrollIntoView({\r\n behavior: activeElement.current ? \"smooth\" : \"auto\",\r\n block: center ? \"center\" : undefined,\r\n });\r\n }\r\n activeElement.current = el;\r\n });\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\nimport { darken, brighten } from \"../../../theme/Mixins\";\r\n\r\nconst questionColor = ({ selected, simulated, active }) => {\r\n let color = \"#117297\";\r\n if (simulated) color = \"#70bbd8\";\r\n if (active) color = \"#00A9E8\";\r\n if (selected) return darken(color, 0.7);\r\n return color;\r\n};\r\n\r\nexport default createUseStyles({\r\n blockStart: {\r\n margin: [[12, 0]],\r\n backgroundImage:\r\n \"url(data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP///9/f3////yH/C05FVFNDQVBFMi4wAwEAAAAh+QQFAAADACwAAAAAAQABAAACAlQBADs=);\",\r\n backgroundPosition: \"center center\",\r\n backgroundRepeat: \"repeat-x\",\r\n textAlign: \"center\",\r\n\r\n \"& span\": {\r\n display: \"inline-block\",\r\n position: \"relative\",\r\n padding: [[0, 15]],\r\n top: -1,\r\n lineHeight: \"20px\",\r\n fontSize: \"13px\",\r\n fontWeight: 900,\r\n maxWidth: \"60%\",\r\n background: \"white\",\r\n },\r\n },\r\n pageBreak: {\r\n margin: [[12, 0]],\r\n backgroundImage:\r\n \"url(data:image/gif;base64,R0lGODlhBQABAJEAAAAAAP///9/f3////yH/C05FVFNDQVBFMi4wAwEAAAAh+QQFAAADACwAAAAABQABAAACA5Q3BQA7)\",\r\n backgroundPosition: \"center center\",\r\n backgroundRepeat: \"repeat-x\",\r\n textAlign: \"center\",\r\n\r\n \"& span\": {\r\n color: \"#919191\",\r\n display: \"inline-block\",\r\n position: \"relative\",\r\n padding: [[0, 15]],\r\n top: -1,\r\n lineHeight: \"20px\",\r\n fontSize: \"11px\",\r\n fontWeight: 700,\r\n maxWidth: \"60%\",\r\n background: \"white\",\r\n },\r\n },\r\n flowQuestionContainer: {\r\n position: \"relative\",\r\n margin: [[6, 0]],\r\n paddingRight: 35,\r\n },\r\n flowQuestion: {\r\n composes: \"flow-question\",\r\n display: \"inline-block\",\r\n background: questionColor,\r\n color: \"white\",\r\n fontSize: \"13px\",\r\n padding: [[4, 12]],\r\n borderRadius: 5,\r\n wordBreak: \"break-word\",\r\n transition: \"background 200ms, color 200ms\",\r\n\r\n \"& .bg-color\": {\r\n questionColor,\r\n transition: \"color 200ms\",\r\n },\r\n },\r\n flowQuestionIcon: {\r\n marginRight: 12,\r\n fontSize: \"14px\",\r\n },\r\n flowQuestionActions: {\r\n position: \"absolute\",\r\n top: 0,\r\n right: -4,\r\n },\r\n flowQuestionAction: {\r\n padding: 4,\r\n paddingLeft: 2,\r\n fontSize: \"14px\",\r\n userSelect: \"none\",\r\n },\r\n flowQuestionActionButton: {\r\n cursor: \"pointer\",\r\n },\r\n flowQuestionActionActive: {\r\n color: \"#00A9E8\",\r\n },\r\n flowQuestionLogic: {\r\n borderRadius: 5,\r\n background: (props) => darken(questionColor(props), 0.5),\r\n transition: \"background 200ms, color 200ms\",\r\n padding: [[4, 8]],\r\n margin: [[4, 0]],\r\n fontSize: \"10px\",\r\n color: (props) => brighten(questionColor(props), 3),\r\n },\r\n flowQuestionLogicIcon: {\r\n marginRight: 6,\r\n },\r\n flowPage: {\r\n position: \"relative\",\r\n },\r\n flowPageSelectArea: {\r\n position: \"absolute\",\r\n top: 0,\r\n left: 0,\r\n right: 40,\r\n bottom: 0,\r\n cursor: \"pointer\",\r\n userSelect: \"none\",\r\n },\r\n questionConnector: {\r\n position: \"absolute\",\r\n bottom: \"100%\",\r\n left: 18,\r\n width: 4,\r\n height: 6,\r\n background: questionColor,\r\n transition: \"background 200ms\",\r\n },\r\n});\r\n","import * as React from \"react\";\r\nimport { FontAwesomeIcon } from \"../../shared/FontAwesome\";\r\nimport { QuestionType } from \"../../../models/enums/QuestionType\";\r\n\r\nexport default function QuestionTypeIcon({ type }) {\r\n switch (type) {\r\n case QuestionType.Description:\r\n return ;\r\n case QuestionType.RadioButton:\r\n return ;\r\n case QuestionType.CheckBox:\r\n return ;\r\n case QuestionType.OpenEndAnswer:\r\n return ;\r\n case QuestionType.TextAnswer:\r\n case QuestionType.AutoComplete:\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n case QuestionType.NumericAnswer:\r\n return (\r\n \r\n \r\n 0\r\n \r\n \r\n \r\n \r\n );\r\n case QuestionType.NumericRanking:\r\n return ;\r\n case QuestionType.DateTimeAnswer:\r\n return ;\r\n case QuestionType.DragDropRanking:\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n case QuestionType.CardSort:\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n case QuestionType.DropDownList:\r\n case QuestionType.DrillDown:\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n case QuestionType.EmailAddressAnswer:\r\n case QuestionType.RespondentEmail:\r\n return ;\r\n case QuestionType.HybridGrid:\r\n case QuestionType.ChoiceGrid:\r\n case QuestionType.RunningTotal:\r\n case QuestionType.LookupTable:\r\n return ;\r\n case QuestionType.ImageSelector:\r\n case QuestionType.ImageChoiceGrid:\r\n return ;\r\n case QuestionType.ImageAreaSelector:\r\n case QuestionType.ImageAreaEvaluator:\r\n return ;\r\n case QuestionType.RespondentPhone:\r\n return ;\r\n case QuestionType.RespondentLanguage:\r\n return ;\r\n case QuestionType.RespondentTimeZone:\r\n return ;\r\n case QuestionType.RespondentMetaData:\r\n return ;\r\n case QuestionType.Slider:\r\n return ;\r\n case QuestionType.StarRatingGrid:\r\n case QuestionType.NetPromoter:\r\n return ;\r\n case QuestionType.FileUpload:\r\n return ;\r\n case QuestionType.Timer:\r\n return ;\r\n case QuestionType.CustomQuestion:\r\n return ;\r\n default:\r\n return ;\r\n }\r\n}\r\n","import * as React from \"react\";\r\nimport { QuestionActionType } from \"../../../models/enums/QuestionActionType\";\r\nimport { FontAwesomeIcon } from \"../../shared/FontAwesome\";\r\n\r\nexport default function ActionTypeIcon({ type }) {\r\n switch (type) {\r\n case QuestionActionType.BranchTo:\r\n return ;\r\n case QuestionActionType.ComputeVariable:\r\n case QuestionActionType.SetVariableValue:\r\n return ;\r\n case QuestionActionType.ExitSurvey:\r\n return ;\r\n case QuestionActionType.MobileAudioRecording:\r\n return ;\r\n case QuestionActionType.Selection:\r\n return ;\r\n case QuestionActionType.SendEmail:\r\n return ;\r\n case QuestionActionType.SetLoopRow:\r\n return ;\r\n case QuestionActionType.SetPanelistData:\r\n return ;\r\n default:\r\n return null;\r\n }\r\n}\r\n","import * as React from \"react\";\r\nimport classNames from \"classnames\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { QuestionModel } from \"../../../models/QuestionModel\";\r\nimport useStyles from \"./FlowPanel.styles\";\r\nimport QuestionTypeIcon from \"../shared/QuestionTypeIcon\";\r\nimport { FontAwesomeIcon } from \"../../shared/FontAwesome\";\r\nimport { QuestionActionType } from \"../../../models/enums/QuestionActionType\";\r\nimport {\r\n getPropertyEnum,\r\n getPropertyString,\r\n getPropertyBoolean,\r\n} from \"../../../models/utilities/propertyUtilities\";\r\nimport { PropertyType } from \"../../../models/enums/PropertyType\";\r\nimport { DispositionCode } from \"../../../models/enums/DispositionCode\";\r\nimport { useThunkDispatch } from \"../../../redux/thunks\";\r\nimport { ActionModel } from \"../../../models/ActionModel\";\r\nimport { getExitUrl } from \"../../../models/utilities/actionUtilities\";\r\nimport { isNullOrEmpty } from \"../../../utils\";\r\nimport ActionTypeIcon from \"../shared/ActionTypeAction\";\r\nimport { evaluate } from \"../../../redux/thunks/evaluator\";\r\n\r\ninterface FlowQuestionProps {\r\n question: QuestionModel;\r\n firstOfPage: boolean;\r\n active?: boolean;\r\n simulated?: boolean;\r\n completed?: boolean;\r\n selected?: boolean;\r\n}\r\n\r\nexport default function FlowQuestion({\r\n question,\r\n firstOfPage,\r\n active,\r\n simulated,\r\n selected,\r\n completed,\r\n}: FlowQuestionProps) {\r\n const { t } = useTranslation();\r\n const { name, type, preLoadActions, postAnswerActions } = question;\r\n const [showLogic, setShowLogic] = React.useState(false);\r\n const ref = React.useRef();\r\n const dispatch = useThunkDispatch();\r\n const actions = [...preLoadActions, ...postAnswerActions];\r\n const classes = useStyles({ active, simulated, selected, completed });\r\n\r\n function getActionTitle(action: ActionModel) {\r\n switch (action.type) {\r\n case QuestionActionType.ExitSurvey: {\r\n const disposition = getPropertyEnum(action, DispositionCode, PropertyType.Status);\r\n return t(\"debug.panels.flow.exit\", { code: DispositionCode[disposition] });\r\n }\r\n case QuestionActionType.BranchTo: {\r\n const destination = getPropertyString(action, PropertyType.Question);\r\n const autoClean = getPropertyBoolean(action, PropertyType.AutoClean);\r\n const status = getPropertyEnum(action, DispositionCode, PropertyType.Status);\r\n const exitUrl = dispatch((d, getState) => getExitUrl(action, getState().interview));\r\n if (status > 0 && !isNullOrEmpty(exitUrl))\r\n return t(\"debug.panels.flow.branchToExitUrl\", {\r\n url: exitUrl,\r\n code: DispositionCode[status],\r\n });\r\n return t(\"debug.panels.flow.branchTo\", {\r\n destination,\r\n context: autoClean && \"autoclean\",\r\n });\r\n }\r\n case QuestionActionType.ComputeVariable: {\r\n const variable = getPropertyString(action, PropertyType.CalculatedVariableName);\r\n const value = getPropertyString(action, PropertyType.Value);\r\n return t(\"debug.panels.flow.computeVariable\", { variable, value });\r\n }\r\n case QuestionActionType.SetVariableValue: {\r\n const variable = getPropertyString(action, PropertyType.Variable);\r\n const matrix = getPropertyString(action, PropertyType.MatrixIndex);\r\n const value = getPropertyString(action, PropertyType.Value);\r\n return t(\"debug.panels.flow.setVariable\", {\r\n variable,\r\n value,\r\n matrix,\r\n context: isNullOrEmpty(matrix) && \"row\",\r\n });\r\n }\r\n case QuestionActionType.Selection:\r\n return t(\"debug.panels.flow.selection\");\r\n case QuestionActionType.SetLoopRow: {\r\n const block = getPropertyString(action, PropertyType.Block);\r\n const value = getPropertyString(action, PropertyType.Value);\r\n return t(\"debug.panels.flow.setRow\", { block, value });\r\n }\r\n case QuestionActionType.MobileAudioRecording: {\r\n const start = getPropertyBoolean(action, PropertyType.Mode, \"Start\");\r\n return t(\"debug.panels.flow.audioRecording\", { context: start ? \"start\" : \"stop\" });\r\n }\r\n case QuestionActionType.SendEmail:\r\n return t(\"debug.panels.flow.sendEmail\");\r\n case QuestionActionType.SetPanelistData:\r\n return t(\"debug.panels.flow.setPanelistData\");\r\n default:\r\n return null;\r\n }\r\n }\r\n\r\n function getActionConditionText(action: ActionModel) {\r\n if (!action.condition) return \"\";\r\n const evaluated = dispatch(evaluate(action.condition)).asBoolean();\r\n return (\r\n <>\r\n {getActionTitle(action)}\r\n {` ${evaluated ? \"\" : t(\"debug.panels.flow.conditionNotMet\")}`}\r\n \r\n );\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n \r\n {name}\r\n {showLogic &&\r\n actions.map((action) => (\r\n
\r\n \r\n \r\n \r\n {getActionConditionText(action)}\r\n
\r\n ))}\r\n
\r\n
\r\n setShowLogic((s) => !s)}\r\n >\r\n {actions.length > 0 && (\r\n \r\n \r\n \r\n {actions.length}\r\n \r\n \r\n )}\r\n \r\n {completed && (\r\n \r\n \r\n \r\n )}\r\n
\r\n {!firstOfPage &&
}\r\n
\r\n );\r\n}\r\n","import * as React from \"react\";\r\nimport { useSelector, useDispatch, useStore } from \"react-redux\";\r\nimport { PageModel } from \"../../../models/PageModel\";\r\nimport { StoreState } from \"../../../models/states/StoreState\";\r\nimport useStyles from \"./FlowPanel.styles\";\r\nimport FlowQuestion from \"./FlowQuestion\";\r\nimport { navigationBranchTo, navigationPreviousPage } from \"../../../redux/actions\";\r\n\r\ninterface Props {\r\n page: PageModel;\r\n showBlockName?: boolean;\r\n isFirst?: boolean;\r\n active?: boolean;\r\n simulated?: boolean;\r\n completed?: boolean;\r\n}\r\n\r\nexport default function FlowPage({\r\n page,\r\n showBlockName,\r\n isFirst,\r\n active,\r\n simulated,\r\n completed,\r\n}: Props) {\r\n const classes = useStyles({});\r\n const store = useStore();\r\n const dispatch = useDispatch();\r\n const blockName = useSelector(\r\n (state: StoreState) => state.interview.navigation?.randomizedBlocks[page.blockIndex]?.name,\r\n );\r\n const [hovered, setHovered] = React.useState(false);\r\n\r\n function navigateToPage() {\r\n if (simulated)\r\n dispatch(\r\n navigationBranchTo({\r\n destination: page.questions[0].name,\r\n isPreviewNavigation: true,\r\n }),\r\n );\r\n if (completed) {\r\n const { history } = store.getState().interview.navigation;\r\n const historyIndex = history.indexOf(page);\r\n if (historyIndex === -1) {\r\n return;\r\n }\r\n const pagesFromLast = history.length - historyIndex;\r\n for (let i = 0; i < pagesFromLast; i++) {\r\n dispatch(navigationPreviousPage());\r\n }\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n
\r\n {showBlockName && (\r\n
\r\n {blockName}\r\n
\r\n )}\r\n {!isFirst && !showBlockName && (\r\n
\r\n Page Break\r\n
\r\n )}\r\n {page.questions.map((question, questionIndex) => (\r\n \r\n ))}\r\n {!active && (\r\n setHovered(true)}\r\n onMouseOut={() => setHovered(false)}\r\n onClick={navigateToPage}\r\n />\r\n )}\r\n
\r\n \r\n );\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\n\r\nexport default createUseStyles({\r\n panelContainer: {\r\n height: \"100%\",\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n },\r\n title: {\r\n margin: 0,\r\n marginBottom: 10,\r\n fontSize: \"15px\",\r\n fontWeight: 700,\r\n color: \"#484848\",\r\n },\r\n sectionTitle: {\r\n margin: 0,\r\n marginTop: 20,\r\n marginBottom: 10,\r\n fontWeight: 700,\r\n fontSize: \"13px\",\r\n color: \"#484848\",\r\n },\r\n search: {\r\n background: \"#F3F3F3\",\r\n position: \"relative\",\r\n padding: [[8, 16]],\r\n marginBottom: 16,\r\n borderRadius: 30,\r\n },\r\n searchIcon: {\r\n color: \"#A2A2A2\",\r\n },\r\n searchInput: {\r\n width: \"100%\",\r\n position: \"absolute\",\r\n top: 0,\r\n left: 0,\r\n bottom: 0,\r\n right: 0,\r\n border: 0,\r\n background: \"none\",\r\n paddingLeft: 48,\r\n paddingRight: 16,\r\n fontSize: \"13px\",\r\n outline: \"none\",\r\n },\r\n scrollable: {\r\n flex: \"1\",\r\n overflowY: \"scroll\",\r\n overflowX: \"hidden\",\r\n paddingRight: 16,\r\n scrollbarWidth: \"18px\",\r\n scrollbarColor: \"red blue\",\r\n },\r\n});\r\n","import * as React from \"react\";\r\nimport useStyles from \"./WidgetPanel.styles\";\r\nimport { FontAwesomeIcon } from \"../../shared/FontAwesome\";\r\n\r\ninterface Props {\r\n title: string;\r\n searchable?: boolean;\r\n search?: string;\r\n setSearch?(value: string): void;\r\n searchPlaceholder?: string;\r\n containerRef: React.Ref;\r\n children: React.ReactNode;\r\n}\r\n\r\nexport default function WidgetPanel({\r\n title,\r\n searchable,\r\n search,\r\n setSearch,\r\n searchPlaceholder,\r\n containerRef,\r\n children,\r\n}: Props) {\r\n const classes = useStyles({});\r\n return (\r\n
\r\n

{title}

\r\n {searchable && (\r\n
\r\n \r\n \r\n \r\n setSearch(e.target.value)}\r\n type=\"search\"\r\n placeholder={searchPlaceholder}\r\n />\r\n
\r\n )}\r\n
\r\n {children}\r\n
\r\n
\r\n );\r\n}\r\n\r\ninterface SectionProps {\r\n title: string;\r\n children: React.ReactNode;\r\n}\r\n\r\nWidgetPanel.Section = function WidgetPanelSection({ title, children }: SectionProps) {\r\n const classes = useStyles({});\r\n return (\r\n <>\r\n

{title}

\r\n {children}\r\n \r\n );\r\n};\r\n","import * as React from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport ReactTooltip from \"react-tooltip\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { StoreState } from \"../../../models/states/StoreState\";\r\nimport { PageModel } from \"../../../models/PageModel\";\r\nimport LoadingEllipsis from \"../shared/LoadingEllipsis\";\r\nimport useSimulatedPages from \"../../../hooks/useSimulatedPages\";\r\nimport useScrollToActive from \"../../../hooks/useScrollToActive\";\r\nimport FlowPage from \"./FlowPage\";\r\nimport WidgetPanel from \"./WidgetPanel\";\r\n\r\ninterface PageProps {\r\n active?: boolean;\r\n simulated?: boolean;\r\n completed?: boolean;\r\n}\r\n\r\nexport function FlowPanel() {\r\n const containerRef = React.useRef();\r\n const history = useSelector((state: StoreState) => state.interview.navigation?.history) || [];\r\n const currentPage = useSelector((state: StoreState) => state.interview.navigation?.currentPage);\r\n const { simulatedPages, simulating } = useSimulatedPages();\r\n const { t } = useTranslation();\r\n\r\n useScrollToActive(containerRef);\r\n\r\n let previousPageBlockIndex = -1;\r\n let pageIndex = -1;\r\n function renderPages(pages: PageModel[], props: PageProps = {}) {\r\n return pages.map((page) => {\r\n if (!page) return null;\r\n const showBlockName = previousPageBlockIndex !== page.blockIndex;\r\n previousPageBlockIndex = page.blockIndex;\r\n pageIndex += 1;\r\n return (\r\n \r\n );\r\n });\r\n }\r\n\r\n React.useEffect(() => {\r\n ReactTooltip.rebuild();\r\n }, [history, currentPage, simulatedPages]);\r\n\r\n return (\r\n \r\n {renderPages(history, { completed: true })}\r\n {renderPages([currentPage], { active: true })}\r\n {renderPages(simulatedPages, { simulated: true })}\r\n {currentPage && simulating && (\r\n \r\n )}\r\n \r\n );\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\n\r\nexport default createUseStyles({\r\n variableContainer: {\r\n fontSize: \"13px\",\r\n fontFamily: \"Open Sans\",\r\n borderBottom: \"1px solid #eee\",\r\n padding: [[10, 0]],\r\n },\r\n variablePanelHeader: {\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n flexWrap: \"nowrap\",\r\n justifyContent: \"flex-end\",\r\n },\r\n variablePanelHeaderTitle: {\r\n marginRight: \"auto\",\r\n },\r\n variableValue: {\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n flexWrap: \"nowrap\",\r\n alignItems: \"center\",\r\n justifyContent: \"flex-end\",\r\n },\r\n variableName: {\r\n marginRight: \"auto\",\r\n wordBreak: \"break-all\",\r\n },\r\n variableDetails: {\r\n paddingRight: 29,\r\n overflow: \"hidden\",\r\n boxSizing: \"border-box\",\r\n },\r\n variableInput: {\r\n width: \"100%\",\r\n background: \"#333E5B\",\r\n fontSize: \"12px\",\r\n outline: \"none\",\r\n color: \"white\",\r\n border: 0,\r\n borderRadius: 5,\r\n padding: [[6, 10]],\r\n boxSizing: \"border-box\",\r\n resize: \"none\",\r\n\r\n \"&:active, &:focus\": {\r\n color: \"#F68A5A\",\r\n },\r\n },\r\n variableInputSmall: {\r\n fontSize: \"12px\",\r\n width: 100,\r\n outline: \"none\",\r\n border: 0,\r\n background: \"#333E5B\",\r\n color: \"white\",\r\n textAlign: \"right\",\r\n padding: [[6, 10]],\r\n marginLeft: 5,\r\n marginRight: 6,\r\n borderRadius: 5,\r\n\r\n \"&:active, &:focus\": {\r\n color: \"#F68A5A\",\r\n },\r\n },\r\n variableText: {\r\n margin: [[5, 0]],\r\n fontWeight: 700,\r\n fontSize: \"10px\",\r\n },\r\n variableOpenEnd: {\r\n margin: [[5, 0]],\r\n marginTop: 10,\r\n fontWeight: 700,\r\n fontSize: \"10px\",\r\n },\r\n variableDetailsIcon: {\r\n fontSize: \"12px\",\r\n padding: 4,\r\n cursor: \"pointer\",\r\n userSelect: \"none\",\r\n },\r\n variableDetailsIconActive: {\r\n color: \"#00A9E8\",\r\n },\r\n variableTypeButton: {\r\n padding: [[0, 10]],\r\n cursor: \"pointer\",\r\n marginRight: \"auto\",\r\n },\r\n});\r\n","import * as React from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { useSpring, animated } from \"react-spring\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { flatMap } from \"../../../utils/lodash\";\r\nimport useStyles from \"./VariablesPanel.styles\";\r\nimport { FontAwesomeIcon } from \"../../shared/FontAwesome\";\r\nimport { StoreState } from \"../../../models/states/StoreState\";\r\nimport { VariableType } from \"../../../models/enums/VariableType\";\r\nimport WidgetPanel from \"./WidgetPanel\";\r\n\r\ninterface VariableProps {\r\n variable: string;\r\n value: string;\r\n text: string;\r\n openEnd?: string;\r\n type?: VariableType;\r\n}\r\n\r\nconst getFilteredVariableKeys = (variables, filter) =>\r\n Object.keys(variables).filter((key) => key.toLowerCase().includes(filter));\r\n\r\nfunction Variable({ variable, value, text, openEnd, type }: VariableProps) {\r\n const isSystemVariable = type === VariableType.System;\r\n const [showDetails, setShowDetails] = React.useState(false);\r\n const props = useSpring({\r\n height: showDetails ? 152 : 0,\r\n opacity: showDetails ? 1 : 0,\r\n });\r\n const classes = useStyles({ isSystemVariable });\r\n const { t } = useTranslation();\r\n return (\r\n
\r\n
\r\n {variable}\r\n =\r\n \r\n setShowDetails((s) => !s)}\r\n >\r\n \r\n
\r\n
\r\n \r\n
\r\n
{t(\"debug.panels.variables.text\")}
\r\n \r\n
\r\n
\r\n
\r\n {t(\"debug.panels.variables.openEnd\")}\r\n
\r\n \r\n {openEnd}\r\n \r\n
\r\n
\r\n
\r\n );\r\n}\r\n\r\nexport function VariablesPanel() {\r\n const containerRef = React.useRef();\r\n const [search, setSearch] = React.useState(\"\");\r\n const [showSystemVariables] = React.useState(false);\r\n const lowerCaseSearch = search.toLowerCase();\r\n const { t } = useTranslation();\r\n\r\n const system = useSelector((state: StoreState) => state.interview.variables.system);\r\n const blocks = useSelector((state: StoreState) => state.interview.questionnaire.blocks);\r\n const mentions = useSelector(\r\n (state: StoreState) => state.interview.variables.mentionsByVariableName,\r\n );\r\n\r\n const systemVariables = getFilteredVariableKeys(system, lowerCaseSearch).map((key) => (\r\n \r\n ));\r\n\r\n const filteredVariableKeys = getFilteredVariableKeys(mentions, lowerCaseSearch);\r\n const orderedVariableKeys = flatMap(\r\n flatMap(blocks, \"questions\"),\r\n \"variableNames\",\r\n ).filter((key) => filteredVariableKeys.includes(key));\r\n\r\n const questionVariables = flatMap(orderedVariableKeys, (key) =>\r\n mentions[key].map((mention) => (\r\n \r\n )),\r\n );\r\n\r\n return (\r\n \r\n {showSystemVariables && systemVariables}\r\n {questionVariables}\r\n \r\n );\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\n\r\nexport default createUseStyles({\r\n question: {\r\n borderRadius: 12,\r\n padding: [[4, 16]],\r\n margin: [[2, 0]],\r\n cursor: \"pointer\",\r\n fontSize: \"13px\",\r\n\r\n \"&:hover\": {\r\n background: \"#F3F3F3\",\r\n color: \"black\",\r\n },\r\n },\r\n questionSelected: {\r\n background: \"#00A9E8\",\r\n color: \"white\",\r\n\r\n \"&:hover\": {\r\n background: \"#00A9E8\",\r\n color: \"white\",\r\n },\r\n },\r\n});\r\n","import * as React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport classNames from \"classnames\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { flatMap } from \"../../../utils/lodash\";\r\nimport useStyles from \"./GoToQuestionPanel.styles\";\r\nimport { StoreState } from \"../../../models/states/StoreState\";\r\nimport { navigationBranchTo } from \"../../../redux/actions\";\r\nimport useScrollToActive from \"../../../hooks/useScrollToActive\";\r\nimport WidgetPanel from \"./WidgetPanel\";\r\nimport { QuestionType } from \"../../../models/enums/QuestionType\";\r\n\r\nexport function GoToQuestionPanel() {\r\n const containerRef = React.useRef();\r\n const classes = useStyles({});\r\n const dispatch = useDispatch();\r\n const blocks = useSelector((state: StoreState) => state.interview.questionnaire?.blocks);\r\n const pageQuestions = useSelector(\r\n (state: StoreState) => state.interview.navigation.currentPage?.questions,\r\n );\r\n const questions = React.useMemo(() => flatMap(blocks, (b) => b.questions) || [], [blocks]);\r\n const [search, setSearch] = React.useState(\"\");\r\n const firstQuestion = pageQuestions && pageQuestions[0];\r\n const filteredQuestions = React.useMemo(() => {\r\n if (!search.length) return questions;\r\n const lowerCaseSearch = search.toLowerCase();\r\n return questions.filter((q) =>\r\n q.name.toLowerCase().includes(lowerCaseSearch.toLowerCase()),\r\n );\r\n }, [questions, search]);\r\n\r\n const { t } = useTranslation();\r\n\r\n useScrollToActive(containerRef, { center: true });\r\n return (\r\n \r\n {filteredQuestions\r\n .filter((q) => q.type != QuestionType.SecuredTemporaryVariable)\r\n .map(({ name }) => (\r\n \r\n dispatch(\r\n navigationBranchTo({\r\n destination: name,\r\n isPreviewNavigation: true,\r\n }),\r\n )\r\n }\r\n className={classNames(\r\n classes.question,\r\n firstQuestion?.name === name && classes.questionSelected,\r\n )}\r\n >\r\n {name}\r\n \r\n ))}\r\n \r\n );\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\n\r\nexport default createUseStyles({\r\n setting: {\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n fontSize: \"12px\",\r\n },\r\n settingLabel: {\r\n flex: 1,\r\n },\r\n settingValue: {\r\n display: \"flex\",\r\n margin: [[0, -4]],\r\n },\r\n});\r\n","import { createUseStyles } from \"react-jss\";\r\nimport { darken } from \"../../../theme/Mixins\";\r\n\r\nexport default createUseStyles({\r\n button: {\r\n background: ({ active, hover }) => darken(active ? \"#00A9E8\" : \"#F3F3F3\", hover ? 0.7 : 0),\r\n color: ({ active }) => (active ? \"#fff\" : \"#484848\"),\r\n margin: [[0, 4]],\r\n borderRadius: 5,\r\n padding: ({ layout }) => (layout === \"vertical\" ? [[8, 12]] : [[4, 16]]),\r\n minWidth: 64,\r\n cursor: \"pointer\",\r\n fontSize: \"12px\",\r\n transition: \"background 200ms, color 200ms\",\r\n display: \"flex\",\r\n flexDirection: ({ layout }) => (layout === \"vertical\" ? \"column\" : \"row\"),\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n textAlign: \"center\",\r\n boxSizing: \"border-box\",\r\n },\r\n buttonIcon: {\r\n fontSize: \"18px\",\r\n },\r\n});\r\n","import * as React from \"react\";\r\nimport { IconProp } from \"@fortawesome/fontawesome-svg-core\";\r\nimport useStyles from \"./Button.styles\";\r\nimport { FontAwesomeIcon } from \"../../shared/FontAwesome\";\r\n\r\ninterface Props {\r\n active?: boolean;\r\n text?: string;\r\n layout?: \"vertical\" | \"horizontal\";\r\n icon?: () => any | IconProp;\r\n}\r\n\r\nexport default function Button({\r\n active,\r\n text,\r\n icon,\r\n layout,\r\n ...otherProps\r\n}: Props & React.HTMLAttributes) {\r\n const [hover, setHover] = React.useState(false);\r\n const classes = useStyles({ active, hover, layout });\r\n\r\n return (\r\n setHover(true)}\r\n onMouseOut={() => setHover(false)}\r\n {...otherProps}\r\n >\r\n {icon && (\r\n
\r\n {typeof icon === \"function\" ? icon() : }\r\n
\r\n )}\r\n {text}\r\n \r\n );\r\n}\r\n","import * as React from \"react\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport Button from \"./Button\";\r\n\r\ninterface Props {\r\n value: boolean;\r\n onChange(value: boolean): void;\r\n}\r\n\r\nexport default function ToggleButton({ value, onChange }: Props) {\r\n const { t } = useTranslation();\r\n\r\n return (\r\n <>\r\n \r\n );\r\n}\r\n","import React from \"react\";\r\nimport { DimensionModel } from \"./useElementDimensions\";\r\n\r\nexport const PageWrapperDimensionsContext = React.createContext(undefined);\r\n\r\nexport default function useDimensionContext() {\r\n return React.useContext(PageWrapperDimensionsContext);\r\n}\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport classnames from \"classnames\";\r\nimport useStyles from \"./ChoiceListRenderer.styles\";\r\nimport { RendererProps, getRendererProps } from \"../BaseRenderer\";\r\nimport { ChoiceModel } from \"../../../models/ChoiceModel\";\r\nimport { QuestionType } from \"../../../models/enums/QuestionType\";\r\nimport ChoiceListItemRenderer from \"./ChoiceListItemRenderer\";\r\nimport { MentionModel } from \"../../../models/MentionModel\";\r\nimport { CheckBox } from \"../../choices/CheckBox\";\r\nimport { Radio } from \"../../choices/Radio\";\r\nimport { ImageSelect } from \"../../choices/ImageSelect\";\r\nimport {\r\n getSettingBoolean,\r\n getSettingNumber,\r\n getSettingString,\r\n} from \"../../../models/utilities/settingUtilities\";\r\nimport { VariableModel } from \"../../../models/VariableModel\";\r\nimport Button from \"../../shared/Button\";\r\nimport useQuestion from \"../../../hooks/useQuestion\";\r\nimport useTranslatable from \"../../../hooks/useTranslatable\";\r\nimport { QuestionModel } from \"../../../models/QuestionModel\";\r\nimport { getChoiceListDisplayType } from \"../../../models/utilities/questionUtilities\";\r\nimport { ChoiceListDisplayType } from \"../../../models/enums/ChoiceListDisplayType\";\r\nimport useDimensionContext from \"../../../hooks/useDimensionContext\";\r\nimport { isIE } from \"../../../utils\";\r\nimport { getRoleForQuestion } from \"../../../utils/WCAGHelper\";\r\n\r\ninterface Props extends RendererProps {\r\n variable: VariableModel;\r\n openEndValue?: { [key: string]: string };\r\n onClick?(choice: ChoiceModel): void;\r\n onOpenEndChange?(choice: ChoiceModel, text: string): void;\r\n onOpenEndBlur?(choice: ChoiceModel): void;\r\n mentions: MentionModel[];\r\n choices: ChoiceModel[];\r\n gridRendering?: boolean;\r\n onReset(): void;\r\n language: string;\r\n maxAnswers?: number;\r\n isSelected?: boolean;\r\n isCarrouselCheckboxActive?: boolean;\r\n onAfterSelection?(): void;\r\n executeUpdateForIdAfterSelection?: string;\r\n}\r\n\r\nconst shouldDisplayResetButton = (question: QuestionModel) =>\r\n getSettingBoolean(question, \"DisplayResetButton\");\r\n\r\nfunction isSelected(props: Props, choice: ChoiceModel) {\r\n const { mentions } = props;\r\n return mentions.some((mention) => mention.value === choice.value);\r\n}\r\n\r\nfunction isChoiceDisabled(props: Props, selected: boolean, controlType: any) {\r\n const { question, maxAnswers, mentions } = props;\r\n if (controlType === Radio) {\r\n return false;\r\n }\r\n if (maxAnswers === -1) {\r\n return false;\r\n }\r\n if (question.type === QuestionType.ImageSelector && maxAnswers === 1) {\r\n return false;\r\n }\r\n return !selected && mentions.length >= maxAnswers;\r\n}\r\n\r\nfunction renderChoiceListItem(\r\n props: Props,\r\n choice: ChoiceModel,\r\n isFirst: boolean,\r\n isLast: boolean,\r\n key: any,\r\n controlType: any,\r\n) {\r\n const {\r\n question,\r\n gridRendering,\r\n openEndValue,\r\n onOpenEndChange,\r\n onOpenEndBlur,\r\n variable,\r\n onAfterSelection,\r\n executeUpdateForIdAfterSelection,\r\n } = props;\r\n const displayType = getChoiceListDisplayType(question);\r\n const isHorizontalDisplay =\r\n displayType === ChoiceListDisplayType.Horizontal ||\r\n displayType === ChoiceListDisplayType.HorizontalColumns;\r\n const selected = isSelected(props, choice);\r\n const isDisabled = isChoiceDisabled(props, selected, controlType);\r\n return (\r\n \r\n );\r\n}\r\n\r\nfunction renderChoice(\r\n props: Props,\r\n choice: ChoiceModel,\r\n isFirst: boolean,\r\n isLast: boolean,\r\n key: any,\r\n) {\r\n const { question, isCarrouselCheckboxActive } = props;\r\n switch (question.type) {\r\n case QuestionType.ImageSelector:\r\n return renderChoiceListItem(props, choice, isFirst, isLast, key, ImageSelect);\r\n case QuestionType.CheckBox:\r\n return renderChoiceListItem(props, choice, isFirst, isLast, key, CheckBox);\r\n case QuestionType.Carrousel:\r\n return renderChoiceListItem(\r\n props,\r\n choice,\r\n isFirst,\r\n isLast,\r\n key,\r\n isCarrouselCheckboxActive ? CheckBox : Radio,\r\n );\r\n default:\r\n return renderChoiceListItem(props, choice, isFirst, isLast, key, Radio);\r\n }\r\n}\r\n\r\nfunction renderChoices(props: Props) {\r\n const { choices } = props;\r\n return choices.map((choice, i) =>\r\n renderChoice(props, choice, i === 0, i === choices.length - 1, choice.name),\r\n );\r\n}\r\n\r\nfunction ResetButton(props: Props) {\r\n const { theme, onReset } = props;\r\n const question = useQuestion();\r\n const defaultClearButtonText = useTranslatable(theme, \"QuestionClearButton\") || \"Reset\";\r\n const clearButtonText = useTranslatable(question, \"ResetButtonText\") || defaultClearButtonText;\r\n\r\n return (\r\n onReset()}\r\n />\r\n );\r\n}\r\n\r\nexport default function ChoiceListRenderer(props: Props) {\r\n const question = useQuestion();\r\n const { choices, isCarrouselCheckboxActive } = props;\r\n\r\n const dimension = useDimensionContext();\r\n\r\n const theme = useTheme();\r\n const displayType = getChoiceListDisplayType(question);\r\n\r\n const numberOfColumns = getSettingNumber(question, \"NumberOfColumns\");\r\n const numberOfRows = numberOfColumns > 1 ? Math.ceil(choices?.length / numberOfColumns) : 1;\r\n const classes = useStyles({ theme, displayType, numberOfColumns, numberOfRows });\r\n\r\n if (choices === undefined || choices.length === 0) {\r\n return null;\r\n }\r\n\r\n const displayAsTable = question.type === QuestionType.ImageSelector;\r\n const displayOrder = getSettingString(question, \"DisplayOrder\");\r\n\r\n const isDisplayColumns = displayType === ChoiceListDisplayType.VerticalColumns;\r\n const isDisplayWide = dimension && dimension.minWidth(778);\r\n\r\n // Internet Explorer fallback layout: vertical columns choice list will be displayed as a simple vertical choice list\r\n const displayAsGrid = isDisplayColumns && isDisplayWide && !isIE();\r\n\r\n const role = getRoleForQuestion(question);\r\n return (\r\n \r\n {renderChoices(props)}\r\n {shouldDisplayResetButton(question) && }\r\n \r\n );\r\n}\r\n","export enum CaseMode {\r\n None = \"None\",\r\n AllCaps = \"AllCaps\",\r\n FirstLetterCaps = \"FirstLetterCaps\",\r\n}\r\n","import React from \"react\";\r\nimport { DispatchProp } from \"react-redux\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { QuestionType, isGrid } from \"../../models/enums/QuestionType\";\r\nimport { BaseControl, ControlProps } from \"./BaseControl\";\r\nimport {\r\n getSettingNumber,\r\n getSettingBoolean,\r\n getSettingString,\r\n} from \"../../models/utilities/settingUtilities\";\r\nimport { ChoiceModel } from \"../../models/ChoiceModel\";\r\nimport { isNullOrEmpty } from \"../../utils\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\nimport { hasOpenEnd, isVisible } from \"../../models/utilities/choiceUtilities\";\r\nimport { ValidationBuilder } from \"../../models/builders/ValidationBuilder\";\r\nimport { getRendererProps } from \"../renderers/BaseRenderer\";\r\nimport { ValidationOptionsModel } from \"../../models/ValidationOptionsModel\";\r\nimport ChoiceListRenderer from \"../renderers/v2/ChoiceListRenderer\";\r\nimport { isQuestionValidatedServerSide } from \"../../models/utilities/validationUtilities\";\r\n\r\ninterface Props extends ControlProps, DispatchProp {}\r\n\r\ninterface State {\r\n openEndValue: { [key: string]: string };\r\n}\r\n\r\nexport class ChoiceListControl extends BaseControl {\r\n constructor(props: Props) {\r\n super(props);\r\n this.state = { openEndValue: {} };\r\n }\r\n\r\n initializeQuestion(question: QuestionModel, props: Props) {\r\n super.initializeQuestion(question, props);\r\n const variable = this.setCarrouselActiveVariable(question.id) || question.variables[0];\r\n const { choiceList = [] } = variable;\r\n\r\n if (!this.hasMentions(props)) {\r\n switch (question.type) {\r\n case QuestionType.RespondentTimeZone: {\r\n const choice = choiceList.find((answer) => answer.value === props.timeZone);\r\n if (choice) {\r\n this.setMentions(\r\n props,\r\n variable.name,\r\n (mentions) => mentions.set(choice.value),\r\n undefined,\r\n true,\r\n );\r\n }\r\n break;\r\n }\r\n default: {\r\n this.setDefaultChoices();\r\n break;\r\n }\r\n }\r\n }\r\n this.setState((s, p) => {\r\n const newState = { ...s };\r\n choiceList.forEach((choice) => {\r\n const mention = this.getMentions(p, variable.name).find(\r\n (m) => m.value === choice.value,\r\n );\r\n if (mention !== undefined && !isNullOrEmpty(mention.openEnd)) {\r\n newState.openEndValue = {\r\n ...newState.openEndValue,\r\n [choice.index]: mention.openEnd || \"\",\r\n };\r\n } else {\r\n newState.openEndValue = { ...newState.openEndValue, [choice.index]: \"\" };\r\n }\r\n });\r\n return newState;\r\n });\r\n }\r\n\r\n componentDidUpdate(prevProps: Props, prevState: State) {\r\n super.componentDidUpdate(prevProps, prevState);\r\n const variable =\r\n this.setCarrouselActiveVariable(this.props.question.id) ||\r\n this.props.question.variables[0];\r\n\r\n const mentions = this.getMentions(this.props);\r\n mentions.forEach((mention) => {\r\n const isValidChoice = this.isValidChoice(mention.value);\r\n const isChoiceNoLongerVisible = this.isChoiceNoLongerVisible(mention.value, prevProps);\r\n if (isValidChoice && isChoiceNoLongerVisible) {\r\n this.setMentions(this.props, variable.name, (m) => m.pull(mention.value));\r\n }\r\n });\r\n }\r\n\r\n willUpdateMentions(question: QuestionModel, nextProps: Props) {\r\n super.willUpdateMentions(question, nextProps);\r\n const variable = this.setCarrouselActiveVariable(question.id) || question.variables[0];\r\n const mentions = this.getMentions(nextProps, variable.name) || [];\r\n this.setState((s) => {\r\n const newState = { ...s };\r\n variable.choiceList.forEach((answer) => {\r\n const mention = mentions.find((m) => m.value === answer.value);\r\n if (mention !== undefined) {\r\n newState.openEndValue = {\r\n ...newState.openEndValue,\r\n [answer.index]: mention.openEnd,\r\n };\r\n }\r\n });\r\n return newState;\r\n });\r\n }\r\n\r\n onReset = () => {\r\n const { question } = this.props;\r\n const variable = this.setCarrouselActiveVariable(question.id) || question.variables[0];\r\n this.setMentions(this.props, variable.name, (mentions) => mentions.clear());\r\n };\r\n\r\n onOpenEndChange = (choice: ChoiceModel, text: string) => {\r\n this.setState((s) => {\r\n const newState = { ...s };\r\n newState.openEndValue = {\r\n ...newState.openEndValue,\r\n [choice.index]: this.truncateOpenEnd(choice, text),\r\n };\r\n return newState;\r\n });\r\n };\r\n\r\n onOpenEndBlur = (choice: ChoiceModel) => {\r\n const openEnd = this.state.openEndValue[choice.index];\r\n const [variable] = this.props.question.variables;\r\n this.setMentions(this.props, variable.name, (mentions) =>\r\n mentions.removeValue(choice.value).add(choice.value, openEnd.trim()),\r\n );\r\n };\r\n\r\n setDefaultChoices = () => {\r\n const { sequencedVariables } = this.props;\r\n const [variable] = sequencedVariables;\r\n const { choiceList = [] } = variable;\r\n const defaultVisibleChoices = choiceList.filter(\r\n (choice) => getSettingBoolean(choice, \"Default\") && isVisible(choice),\r\n );\r\n this.setChoicesAsMentions(variable, defaultVisibleChoices);\r\n };\r\n\r\n validate(options?: ValidationOptionsModel): ValidationResultModel {\r\n const { question, useClientValidation } = this.props;\r\n\r\n question.variables.forEach(this.removeUnavailableMentions);\r\n if (question.type === QuestionType.RadioButton) {\r\n return new ValidationBuilder().build();\r\n }\r\n\r\n if (isQuestionValidatedServerSide(question.type, useClientValidation)) {\r\n return new ValidationBuilder().build();\r\n }\r\n\r\n const softPromptValidationResult = this.validateSoftPrompt(this.props);\r\n if (!softPromptValidationResult.isValid) {\r\n return softPromptValidationResult;\r\n }\r\n\r\n const result = super.validate(options);\r\n const variable = this.setCarrouselActiveVariable(question.id) || question.variables[0];\r\n\r\n const hasMentions = this.hasMentions(this.props);\r\n\r\n if (!hasMentions) {\r\n const { choiceList } = variable;\r\n const invisibleDefaultChoices = choiceList.filter(\r\n (choice) => getSettingBoolean(choice, \"Default\") && !isVisible(choice),\r\n );\r\n if (invisibleDefaultChoices.length) {\r\n this.setChoicesAsMentions(variable, invisibleDefaultChoices);\r\n return new ValidationBuilder().build();\r\n }\r\n }\r\n\r\n if (result.isValid && hasMentions) {\r\n const min = this.minValue();\r\n const max = this.maxValue();\r\n const mentions = this.getMentions(this.props);\r\n\r\n // Test for minimum and maximum values.\r\n if (min !== null && min > 0 && mentions.length < min) {\r\n return new ValidationBuilder()\r\n .fail(variable.name, \"InvalidChoicesMin\", { min: String(min) })\r\n .build();\r\n }\r\n if (max !== null && max > 0 && mentions.length > max) {\r\n return new ValidationBuilder()\r\n .fail(variable.name, \"InvalidChoicesMax\", { max: String(max) })\r\n .build();\r\n }\r\n\r\n // Validate open end if parent is not Grid\r\n if (!question.parent || !isGrid(question.parent.type)) {\r\n const { choiceList } = variable;\r\n const choicesWithOpenEnd = choiceList.filter(hasOpenEnd);\r\n\r\n const openEndFailedValidation = choicesWithOpenEnd\r\n .map((choice) => {\r\n const openEnd = this.state.openEndValue[choice.index];\r\n const mention = mentions.find((m) => m.value === choice.value);\r\n return mention ? this.validateOpenEnd(openEnd, choice) : undefined;\r\n })\r\n .find((validation) => validation && !validation.isValid);\r\n\r\n if (openEndFailedValidation) {\r\n return openEndFailedValidation;\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n renderQuestion(question: QuestionModel) {\r\n const variable =\r\n this.setCarrouselActiveVariable(question.id) || this.props.sequencedVariables[0];\r\n const choiceList = variable ? variable.choiceList : [];\r\n return (\r\n \r\n );\r\n }\r\n}\r\n","import React from \"react\";\r\nimport { connect } from \"react-redux\";\r\nimport { createSelector, defaultMemoize, createSelectorCreator } from \"reselect\";\r\nimport { isEqual, keys, pick } from \"../../utils/lodash\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { StoreState } from \"../../models/states/StoreState\";\r\nimport { ControlProps } from \"../../components/controls/BaseControl\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\nimport { Signal } from \"../../signals/index\";\r\nimport ErrorRenderer from \"../../components/shared/ErrorRenderer\";\r\nimport {\r\n randomizeVariables,\r\n randomizeRows,\r\n randomizeColumns,\r\n} from \"../../randomization/Randomization\";\r\nimport { LogicModel } from \"../../models/LogicModel\";\r\nimport { __evaluateSafe__ } from \"../../expressions/parser\";\r\nimport { ValidationOptionsModel } from \"../../models/ValidationOptionsModel\";\r\nimport { NavigationType } from \"../../models/enums/NavigationType\";\r\nimport {\r\n getCurrentBlock,\r\n getCurrentLoop,\r\n} from \"../../redux/reducers/interview/navigationUtilities\";\r\nimport { Piping } from \"../../piping\";\r\nimport { getSettingString } from \"../../models/utilities/settingUtilities\";\r\nimport { eliminateVariables, eliminateRows, eliminateColumns } from \"../../elimination/Elimination\";\r\n\r\ninterface Props {\r\n question: QuestionModel;\r\n controlType: any;\r\n gridRendering?: boolean;\r\n isSingleOnPage?: boolean;\r\n validateSignal?: Signal;\r\n showSoftPrompt?: boolean;\r\n onNavigation?(type: NavigationType): void;\r\n isDisabled?: boolean;\r\n onAfterSelection?(): void;\r\n executeUpdateForIdAfterSelection?: string;\r\n isDesktopPreviewView?: boolean;\r\n gridRenderedColumnIndex?: number;\r\n gridRenderedRowIndex?: number;\r\n}\r\n\r\ninterface State {\r\n error?: Error;\r\n errorInfo?: React.ErrorInfo;\r\n}\r\n\r\nclass ControlContainerImpl extends React.PureComponent {\r\n constructor(props: ControlProps & Props) {\r\n super(props);\r\n this.state = {};\r\n }\r\n\r\n UNSAFE_componentWillReceiveProps(nextProps: Props) {\r\n const { question } = this.props;\r\n // Clear error.\r\n if (question !== nextProps.question) this.setState({ error: undefined });\r\n }\r\n\r\n componentDidCatch(error: Error, info: React.ErrorInfo) {\r\n // Display fallback UI\r\n this.setState({ error });\r\n }\r\n\r\n render() {\r\n const { error } = this.state;\r\n if (error) {\r\n return ;\r\n }\r\n const { controlType } = this.props;\r\n return React.createElement(controlType, {\r\n ...this.props,\r\n });\r\n }\r\n}\r\n\r\nconst createDeepEqualSelector = createSelectorCreator(defaultMemoize, isEqual);\r\n\r\nconst createShallowEqualSelector = createSelectorCreator(defaultMemoize, (a, b) => {\r\n if (a === b) return true;\r\n\r\n if (!a || !b) return false;\r\n\r\n const aKeys = keys(a);\r\n const bKeys = keys(b);\r\n const aKL = aKeys.length;\r\n const bKL = bKeys.length;\r\n\r\n if (aKL !== bKL) return false;\r\n\r\n for (let i = 0; i < aKL; i++) {\r\n const k = aKeys[i];\r\n if (k !== bKeys[i] || a[k] !== b[k]) return false;\r\n }\r\n\r\n return true;\r\n});\r\n\r\nconst interviewRef = { current: undefined };\r\nconst staticallySafeEvaluator = (logic: LogicModel) =>\r\n __evaluateSafe__(interviewRef.current, logic).asBoolean();\r\nconst getStaticallySafeEvaluator = () => staticallySafeEvaluator;\r\n\r\n// Wrap mapStateToProps to create selectors for every instance of ControlContainer\r\n// as createSelector has a cache size of 1.\r\nconst makeMapStateToProps = () => {\r\n const getRespondent = (state: StoreState) => state.interview.respondent;\r\n const getQuestion = (_state: StoreState, props: Props) => props.question;\r\n const getVariableNames = (_state: StoreState, props: Props) => props.question.variableNames;\r\n const getVariableDependencies = (_state: StoreState, props: Props) =>\r\n props.question.variableDependencies;\r\n const getVariables = (_state: StoreState, props: Props) => props.question.variables;\r\n const getQuestionnaire = (state: StoreState) => state.interview.questionnaire;\r\n const getServerPage = (state: StoreState) => state.interview.navigation?.currentPageOnServer;\r\n const getLanguage = (state: StoreState) => state.interview.language;\r\n const getMentionsByVariableName = (state: StoreState) =>\r\n state.interview.variables.mentionsByVariableName;\r\n const getFilesByVariableName = (state: StoreState) => state.files.filesByVariableName;\r\n const getEliminationOptions = (_state: StoreState, props: Props) => ({\r\n includeInvisible: false,\r\n includeSoftPrompt: props.showSoftPrompt,\r\n });\r\n\r\n // Get the main mentions, dependencies' mentions and files.\r\n const getMentions = createSelector(\r\n [getVariableNames, getMentionsByVariableName],\r\n (vars, mentions) => pick(mentions, vars),\r\n );\r\n const getDependenciesMentions = createSelector(\r\n [getVariableNames, getVariableDependencies, getMentionsByVariableName],\r\n (vars, deps, mentions) => pick(mentions, [...vars, ...deps]),\r\n );\r\n const getFiles = createSelector([getVariableNames, getFilesByVariableName], (vars, files) =>\r\n pick(files, vars),\r\n );\r\n // Only return a new object if they are different.\r\n const getCachedMentions = createShallowEqualSelector(getMentions, (mentions) => mentions);\r\n const getCachedDependenciesMentions = createShallowEqualSelector(\r\n getDependenciesMentions,\r\n (mentions) => mentions,\r\n );\r\n const getCachedFiles = createShallowEqualSelector(getFiles, (files) => files);\r\n // Randomization.\r\n const getRandomizedVariables = createSelector(\r\n [getRespondent, getQuestionnaire, getQuestion, getVariables, getLanguage, getServerPage],\r\n randomizeVariables,\r\n );\r\n const getRandomizedRows = createSelector(\r\n [getRespondent, getQuestionnaire, getQuestion, getLanguage, getServerPage],\r\n randomizeRows,\r\n );\r\n const getRandomizedColumns = createSelector(\r\n [getRespondent, getQuestionnaire, getQuestion, getLanguage, getServerPage],\r\n randomizeColumns,\r\n );\r\n // Elimination.\r\n const getSequencedVariables = createSelector(\r\n [\r\n getQuestionnaire,\r\n getQuestion,\r\n getCachedDependenciesMentions,\r\n getRandomizedVariables,\r\n getStaticallySafeEvaluator,\r\n getEliminationOptions,\r\n getServerPage,\r\n ],\r\n eliminateVariables,\r\n );\r\n const getSequencedRows = createSelector(\r\n [\r\n getQuestionnaire,\r\n getQuestion,\r\n getCachedDependenciesMentions,\r\n getRandomizedRows,\r\n getStaticallySafeEvaluator,\r\n getEliminationOptions,\r\n getServerPage,\r\n ],\r\n eliminateRows,\r\n );\r\n const getSequencedColumns = createSelector(\r\n [\r\n getQuestionnaire,\r\n getQuestion,\r\n getCachedDependenciesMentions,\r\n getRandomizedColumns,\r\n getStaticallySafeEvaluator,\r\n getEliminationOptions,\r\n getServerPage,\r\n ],\r\n eliminateColumns,\r\n );\r\n\r\n const getCachedVariables = createDeepEqualSelector(\r\n getSequencedVariables,\r\n (variable) => variable,\r\n );\r\n const getCachedRows = createDeepEqualSelector(getSequencedRows, (rows) => rows);\r\n const getCachedColumns = createDeepEqualSelector(getSequencedColumns, (columns) => columns);\r\n\r\n const mapStateToProps = (state: StoreState, props: Props): ControlProps & Props => {\r\n interviewRef.current = state.interview;\r\n const {\r\n question,\r\n onAfterSelection,\r\n executeUpdateForIdAfterSelection,\r\n isDesktopPreviewView,\r\n } = props;\r\n const min: string =\r\n getSettingString(question, \"MinRequiredAnswers\") ||\r\n getSettingString(question, \"MinValue\");\r\n const max: string =\r\n getSettingString(question, \"MaxAllowedAnswers\") ||\r\n getSettingString(question, \"MaxValue\");\r\n return {\r\n ...props,\r\n min: Piping.evaluateRecalls(state.interview, min),\r\n max: Piping.evaluateRecalls(state.interview, max),\r\n language: state.interview.language,\r\n phone: state.interview.respondent.phone,\r\n email: state.interview.respondent.email,\r\n inputAccess: state.interview.respondent.inputAccess,\r\n timeZone: state.interview.respondent.timeZone,\r\n block: getCurrentBlock(state.interview.navigation),\r\n sequencedVariables: getCachedVariables(state, props),\r\n sequencedRows: getCachedRows(state, props),\r\n sequencedColumns: getCachedColumns(state, props),\r\n questionnaire: state.interview.questionnaire,\r\n mentions: getCachedMentions(state, props),\r\n matrix: getCurrentLoop(state.interview.navigation),\r\n showSoftPrompt: props.showSoftPrompt,\r\n onNavigation: props.onNavigation,\r\n isDisabled: props.isDisabled,\r\n theme: state.interview.theme,\r\n files: getCachedFiles(state, props),\r\n useClientValidation: state.interview.useClientValidation,\r\n onAfterSelection,\r\n executeUpdateForIdAfterSelection,\r\n isDesktopPreviewView,\r\n };\r\n };\r\n return mapStateToProps;\r\n};\r\n\r\nexport const ControlContainer = connect(makeMapStateToProps)(ControlContainerImpl);\r\n","import { createUseStyles } from \"react-jss\";\r\n\r\nexport default createUseStyles({\r\n textAnswer: {\r\n composes: \"text-answer\",\r\n },\r\n textAnswerMultiLine: {\r\n composes: \"text-answer--multi-line\",\r\n },\r\n textAnswerNumeric: {\r\n composes: \"text-answer--numeric\",\r\n },\r\n textAnswerDateTime: {\r\n composes: \"text-answer--date-time\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport classnames from \"classnames\";\r\nimport { IconProp } from \"@fortawesome/fontawesome-svg-core\";\r\nimport useStyles from \"./TextAnswerRenderer.styles\";\r\nimport { RendererProps } from \"../BaseRenderer\";\r\nimport { QuestionType } from \"../../../models/enums/QuestionType\";\r\nimport { removeHtmlTags } from \"../../../utils/index\";\r\nimport { QuestionModel } from \"../../../models/QuestionModel\";\r\nimport InputBox from \"../../shared/InputBox\";\r\nimport useQuestion from \"../../../hooks/useQuestion\";\r\nimport useTranslatable from \"../../../hooks/useTranslatable\";\r\nimport { getSettingString } from \"../../../models/utilities/settingUtilities\";\r\nimport { size } from \"../../../models/utilities/questionUtilities\";\r\nimport {\r\n getAriaLabelledByFromId,\r\n useAriaLabelByForGridRenderedInputFieldQuestion,\r\n useAriaLabelledByForInputFieldQuestion,\r\n} from \"../../../utils/WCAGHelper\";\r\n\r\ninterface Props extends RendererProps {\r\n multiline?: boolean;\r\n inputType?: string;\r\n placeholder?: string;\r\n inputDivRef?: React.LegacyRef;\r\n inputRef?: React.LegacyRef;\r\n min?: number;\r\n max?: number;\r\n maxLength?: number;\r\n onBlur?: React.FocusEventHandler;\r\n onFocus?: React.FocusEventHandler;\r\n onKeyDown?: React.KeyboardEventHandler;\r\n onKeyPress?: React.KeyboardEventHandler;\r\n onChange?: React.ChangeEventHandler;\r\n openDatePicker?(): void;\r\n value?: string;\r\n disabled?: boolean;\r\n lines?: number;\r\n inputMode?: \"search\" | \"text\" | \"tel\" | \"none\" | \"url\" | \"email\" | \"numeric\" | \"decimal\";\r\n}\r\n\r\nfunction hasDatePicker(question: QuestionModel) {\r\n return [\"Date\", \"DateTime\", \"Time\"].includes(getSettingString(question, \"Type\"));\r\n}\r\n\r\nexport default function TextAnswerRenderer(props: Props) {\r\n const [focused, setFocused] = React.useState(false);\r\n\r\n const {\r\n gridRendering,\r\n multiline,\r\n inputType,\r\n placeholder,\r\n inputRef,\r\n min,\r\n max,\r\n maxLength,\r\n onBlur,\r\n onFocus,\r\n onKeyDown,\r\n onKeyPress,\r\n onChange,\r\n value,\r\n disabled,\r\n lines,\r\n inputMode,\r\n gridRenderedColumnIndex,\r\n gridRenderedRowIndex,\r\n } = props;\r\n\r\n const theme = useTheme();\r\n const classes = useStyles({ theme, gridRendering });\r\n const question = useQuestion();\r\n const questionText = useTranslatable(question, \"TEXT\");\r\n const leftLabel = useTranslatable(question, \"LeftLabel\");\r\n const rightLabel = useTranslatable(question, \"RightLabel\");\r\n const questionId = question?.parent?.elementId ?? question?.elementId;\r\n const questionType = question?.parent?.type ?? question?.type;\r\n\r\n const [variable] = question.variables;\r\n const useAriaLabelledBy = useAriaLabelledByForInputFieldQuestion(question);\r\n const isGridRenderedLabellingInputBox = useAriaLabelByForGridRenderedInputFieldQuestion(\r\n question,\r\n );\r\n\r\n const isHybridGridRenderedTextFieldTypeQuestion =\r\n gridRendering &&\r\n questionType === QuestionType.HybridGrid &&\r\n (question.type === QuestionType.NumericAnswer || question.type === QuestionType.TextAnswer);\r\n\r\n // Default should be aria-label if not grid rendered and aria-labelled by for variable type in grid\r\n const useAriaLabel = !useAriaLabelledBy && !gridRendering && isGridRenderedLabellingInputBox;\r\n\r\n const classNames = classnames(\r\n classes.textAnswer,\r\n multiline && classes.textAnswerMultiLine,\r\n question.type === QuestionType.NumericAnswer && classes.textAnswerNumeric,\r\n question.type === QuestionType.DateTimeAnswer && classes.textAnswerDateTime,\r\n );\r\n\r\n const inputOnBlur = (e) => {\r\n setFocused(false);\r\n if (onBlur) {\r\n onBlur(e);\r\n }\r\n };\r\n\r\n const inputOnFocus = (e) => {\r\n setFocused(true);\r\n if (onFocus) {\r\n onFocus(e);\r\n }\r\n };\r\n\r\n const accessory: IconProp = hasDatePicker(question) ? [\"far\", \"calendar-alt\"] : null;\r\n\r\n const ariaAttributes = {};\r\n if (useAriaLabelledBy && !isHybridGridRenderedTextFieldTypeQuestion) {\r\n ariaAttributes[\"aria-labelledby\"] = getAriaLabelledByFromId(question, questionId);\r\n } else if (useAriaLabel) {\r\n const questionAriaText = removeHtmlTags(questionText);\r\n if (questionAriaText) {\r\n ariaAttributes[\"aria-label\"] = questionAriaText;\r\n }\r\n } else if (!isGridRenderedLabellingInputBox || isHybridGridRenderedTextFieldTypeQuestion) {\r\n ariaAttributes[\"aria-labelledby\"] = getAriaLabelledByFromId(\r\n question,\r\n questionId,\r\n `${questionType}_INPUTBOX`,\r\n gridRenderedColumnIndex + 1,\r\n gridRenderedRowIndex + 1,\r\n gridRenderedColumnIndex + 1, // In hybrid question we have sub-question type so required column level index\r\n );\r\n }\r\n return (\r\n \r\n {multiline && (\r\n \r\n )}\r\n {!multiline && (\r\n \r\n )}\r\n \r\n );\r\n}\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport classnames from \"classnames\";\r\nimport { IconProp } from \"@fortawesome/fontawesome-svg-core\";\r\nimport { xor, isEqual } from \"../../utils/lodash\";\r\nimport useStyles from \"./Select.styles\";\r\nimport { RecalledText } from \"../../containers/shared/RecalledText\";\r\nimport { FontAwesomeIcon } from \"../shared/FontAwesome\";\r\nimport useRecall from \"../../hooks/useRecall\";\r\nimport { removeHtmlTags } from \"../../utils\";\r\nimport InputWrapper from \"../shared/InputWrapper\";\r\nimport useQuestion from \"../../hooks/useQuestion\";\r\nimport { QuestionType } from \"../../models/enums/QuestionType\";\r\n\r\nexport interface Option {\r\n id: string;\r\n label: string;\r\n value: string;\r\n isNonInteractive?: boolean;\r\n}\r\n\r\ninterface Props {\r\n id: string;\r\n labelId?: string;\r\n className?: string;\r\n required?: boolean;\r\n multiple?: boolean;\r\n value: string[];\r\n options: Option[];\r\n onChange(value: string[]): void;\r\n icon?: IconProp;\r\n disabled?: boolean;\r\n size?: string;\r\n}\r\n\r\ninterface OptionProps {\r\n option: Option;\r\n typeAhead: string;\r\n multiple?: boolean;\r\n selected?: boolean;\r\n onSelectOption(option: Option);\r\n onDetectCharacter(key: string);\r\n onCloseListBox();\r\n onSelectPreviousOption();\r\n onSelectNextOption();\r\n onSelectFirstOption();\r\n onSelectLastOption();\r\n}\r\n\r\nenum SelectionDirection {\r\n Previous,\r\n Next,\r\n}\r\n\r\nfunction ListBoxOption(props: OptionProps) {\r\n const {\r\n option,\r\n typeAhead,\r\n multiple,\r\n selected,\r\n onDetectCharacter,\r\n onSelectOption,\r\n onSelectPreviousOption,\r\n onSelectNextOption,\r\n onSelectFirstOption,\r\n onSelectLastOption,\r\n onCloseListBox,\r\n } = props;\r\n\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n\r\n function onOptionKeyDown(e: React.KeyboardEvent) {\r\n if (e.key === \"Enter\" || (e.key === \" \" && !typeAhead.length)) {\r\n if (option.isNonInteractive) {\r\n e.preventDefault();\r\n return;\r\n }\r\n onSelectOption(option);\r\n if (!multiple) {\r\n onCloseListBox();\r\n }\r\n e.preventDefault();\r\n return;\r\n }\r\n if (e.key === \"Escape\") {\r\n onCloseListBox();\r\n e.preventDefault();\r\n return;\r\n }\r\n if (e.key === \"ArrowUp\") {\r\n onSelectPreviousOption();\r\n e.preventDefault();\r\n return;\r\n }\r\n if (e.key === \"ArrowDown\") {\r\n onSelectNextOption();\r\n e.preventDefault();\r\n return;\r\n }\r\n if (e.key === \"Home\") {\r\n onSelectFirstOption();\r\n e.preventDefault();\r\n return;\r\n }\r\n if (e.key === \"End\") {\r\n onSelectLastOption();\r\n e.preventDefault();\r\n return;\r\n }\r\n if (onDetectCharacter(e.key)) {\r\n e.preventDefault();\r\n }\r\n }\r\n\r\n function onClickOption(e: React.MouseEvent) {\r\n if (option.isNonInteractive) {\r\n e.preventDefault();\r\n return;\r\n }\r\n onSelectOption(option);\r\n if (!multiple) {\r\n onCloseListBox();\r\n }\r\n e.preventDefault();\r\n }\r\n\r\n return (\r\n \r\n \r\n
\r\n {multiple && (\r\n \r\n )}\r\n \r\n );\r\n}\r\n\r\nexport default function Select(props: Props) {\r\n const {\r\n options,\r\n multiple,\r\n required,\r\n id,\r\n labelId,\r\n className,\r\n value,\r\n onChange,\r\n size,\r\n icon,\r\n disabled,\r\n } = props;\r\n\r\n const optionsRef = React.useRef(options);\r\n const valueRef = React.useRef(value);\r\n const selectedOptions = React.useMemo(() => {\r\n const selected = options.filter((o) => o.value && value.includes(o.value));\r\n if (!selected.length) {\r\n return [options[0]];\r\n }\r\n return selected;\r\n }, [options, value]);\r\n\r\n const displayedOptions = React.useMemo(() => {\r\n if (multiple) {\r\n return options.filter((option) => option.value !== \"\");\r\n }\r\n return options;\r\n }, [options, multiple]);\r\n\r\n const defaultFocusedOption = displayedOptions.includes(selectedOptions[0])\r\n ? selectedOptions[0]\r\n : displayedOptions[0];\r\n\r\n const ref = React.useRef();\r\n\r\n const theme = useTheme();\r\n const classes = useStyles({ theme, icon, size, disabled });\r\n\r\n const [dropdownWidth, setDropdownWidth] = React.useState(0);\r\n const [focused, setFocused] = React.useState(false);\r\n const [expanded, setExpanded] = React.useState(false);\r\n const [typeAhead, setTypeAhead] = React.useState(\"\");\r\n const [focusedOption, setFocusedOption] = React.useState(defaultFocusedOption);\r\n const [active, setActive] = React.useState(false);\r\n\r\n React.useEffect(() => {\r\n valueRef.current = value;\r\n }, [value]);\r\n\r\n React.useEffect(() => {\r\n optionsRef.current = options;\r\n }, [options]);\r\n\r\n React.useLayoutEffect(() => {\r\n if (!expanded) {\r\n return undefined;\r\n }\r\n function measure() {\r\n const rect = ref.current.getBoundingClientRect();\r\n if (!isEqual(dropdownWidth, rect.width)) {\r\n setDropdownWidth(rect.width);\r\n }\r\n }\r\n measure();\r\n }, [expanded]);\r\n\r\n React.useEffect(() => {\r\n // Set the focused option to the selected option when the control is not multi-selectable.\r\n if (!multiple) {\r\n setFocusedOption(selectedOptions[0]);\r\n }\r\n }, [multiple, selectedOptions]);\r\n\r\n React.useLayoutEffect(() => {\r\n // When focusedOption changes value, bring it in focus.\r\n if (expanded && focusedOption) {\r\n const el = document.getElementById(focusedOption.id);\r\n if (el) {\r\n el.focus();\r\n }\r\n }\r\n }, [expanded, focusedOption]);\r\n\r\n function focusOption(option) {\r\n setFocusedOption(option);\r\n }\r\n\r\n const selectOption = React.useCallback(\r\n (option) => {\r\n // If the select component is inside a Hybrid Grid, adapt the scrollable container style\r\n if (ref && ref.current) {\r\n toggleContainerStyle(!expanded);\r\n }\r\n if (multiple) {\r\n onChange(xor(valueRef.current, [option.value]));\r\n } else {\r\n onChange([option.value]);\r\n }\r\n },\r\n [expanded, multiple, onChange],\r\n );\r\n\r\n React.useEffect(() => {\r\n let timeout;\r\n if (typeAhead.length) {\r\n timeout = setTimeout(function resetTypeAhead() {\r\n setTypeAhead(\"\");\r\n }, 500);\r\n const nextMatchedOption = optionsRef.current.find((o) =>\r\n o.label.toLowerCase().startsWith(typeAhead.toLowerCase()),\r\n );\r\n if (nextMatchedOption) {\r\n setFocusedOption(nextMatchedOption);\r\n }\r\n }\r\n return function cleanup() {\r\n if (timeout) {\r\n window.clearTimeout(timeout);\r\n }\r\n };\r\n }, [typeAhead, setFocusedOption]);\r\n\r\n React.useEffect(() => {\r\n function clickOutside(event) {\r\n if (ref.current.contains(event.target)) {\r\n return;\r\n }\r\n setExpanded(false);\r\n }\r\n document.addEventListener(\"mousedown\", clickOutside);\r\n return function cleanup() {\r\n document.removeEventListener(\"mousedown\", clickOutside);\r\n };\r\n }, []);\r\n\r\n function toggleContainerStyle(showDropDown: boolean) {\r\n const scrollableWindow = ref.current.closest(\".scrollable__window\");\r\n const scrollbarsDiv = ref.current.closest(\".scrollbars\");\r\n\r\n if (scrollableWindow && scrollbarsDiv) {\r\n const scrollableWindowElement = scrollableWindow as HTMLElement;\r\n const scrollbarsDivElement = scrollbarsDiv as HTMLElement;\r\n\r\n if (showDropDown) {\r\n scrollableWindowElement.style.setProperty(\"overflow\", \"visible\", \"important\");\r\n scrollbarsDivElement.style.setProperty(\"overflow\", \"visible\", \"important\");\r\n (scrollbarsDiv.lastChild as HTMLElement)?.style.setProperty(\"z-index\", \"-99\");\r\n } else {\r\n scrollableWindowElement.style.setProperty(\"overflow\", \"auto\", \"important\");\r\n scrollbarsDivElement.style.setProperty(\"overflow\", \"auto\", \"important\");\r\n (scrollbarsDiv.lastChild as HTMLElement)?.style.removeProperty(\"z-index\");\r\n }\r\n }\r\n }\r\n\r\n function getAdjacentSelectableOption(option: Option, direction: SelectionDirection) {\r\n const focusedIndex = displayedOptions.indexOf(option);\r\n const isPrevious = direction === SelectionDirection.Previous;\r\n\r\n const adjacentIndices = Array.from(\r\n Array(Math.abs(focusedIndex - (isPrevious ? 0 : displayedOptions.length - 1))).keys(),\r\n ).map((index) =>\r\n isPrevious ? Math.abs(index + 1 - focusedIndex) : index + focusedIndex + 1,\r\n );\r\n\r\n const adjacent = adjacentIndices.find((index) => !displayedOptions[index].isNonInteractive);\r\n return adjacent !== undefined ? displayedOptions[adjacent] : option;\r\n }\r\n\r\n function selectFirstOption() {\r\n const [firstOption] = displayedOptions;\r\n selectOption(\r\n firstOption.isNonInteractive\r\n ? getAdjacentSelectableOption(firstOption, SelectionDirection.Next)\r\n : firstOption,\r\n );\r\n }\r\n\r\n function selectLastOption() {\r\n const lastOption = displayedOptions[displayedOptions.length - 1];\r\n selectOption(\r\n lastOption.isNonInteractive\r\n ? getAdjacentSelectableOption(lastOption, SelectionDirection.Previous)\r\n : lastOption,\r\n );\r\n }\r\n\r\n function selectPreviousOption() {\r\n const previous = getAdjacentSelectableOption(focusedOption, SelectionDirection.Previous);\r\n if (multiple) {\r\n focusOption(previous);\r\n } else {\r\n selectOption(previous);\r\n }\r\n }\r\n\r\n function selectNextOption() {\r\n const next = getAdjacentSelectableOption(focusedOption, SelectionDirection.Next);\r\n if (multiple) {\r\n focusOption(next);\r\n } else {\r\n selectOption(next);\r\n }\r\n }\r\n\r\n function closeListBox() {\r\n setExpanded(false);\r\n setFocusedOption(defaultFocusedOption);\r\n }\r\n\r\n function openListBox() {\r\n setExpanded(true);\r\n }\r\n\r\n function detectCharacter(key: string) {\r\n if (/^[\\w\\d\\s]$/i.test(key)) {\r\n setTypeAhead(typeAhead + key);\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n function onButtonKeyDown(e: React.KeyboardEvent) {\r\n if (e.key === \"Enter\" || (e.key === \" \" && !typeAhead.length)) {\r\n if (expanded) {\r\n closeListBox();\r\n } else {\r\n openListBox();\r\n }\r\n e.preventDefault();\r\n return;\r\n }\r\n if (e.key === \"ArrowUp\") {\r\n openListBox();\r\n selectPreviousOption();\r\n e.preventDefault();\r\n return;\r\n }\r\n if (e.key === \"ArrowDown\") {\r\n openListBox();\r\n selectNextOption();\r\n e.preventDefault();\r\n return;\r\n }\r\n if (detectCharacter(e.key)) {\r\n e.preventDefault();\r\n }\r\n }\r\n\r\n function onClickSelect(e: React.MouseEvent) {\r\n if (disabled !== true) {\r\n // If the select component is inside a Hybrid Grid, adapt the scrollable container style\r\n if (ref && ref.current) {\r\n toggleContainerStyle(!expanded);\r\n }\r\n if (expanded) {\r\n closeListBox();\r\n } else {\r\n openListBox();\r\n }\r\n e.preventDefault();\r\n }\r\n }\r\n\r\n const labelsIds = [labelId];\r\n if (selectedOptions) {\r\n labelsIds.push(...selectedOptions.map((option) => option.id));\r\n }\r\n\r\n const question = useQuestion();\r\n const parentQuestionType = question?.parent?.type ?? question?.type;\r\n\r\n const hideQuestionInLabel =\r\n question &&\r\n (question.type === QuestionType.DropDownList ||\r\n question.type === QuestionType.RespondentTimeZone ||\r\n question.type === QuestionType.RespondentLanguage);\r\n\r\n let ariaLabelledForDivIds: any;\r\n\r\n if (hideQuestionInLabel) {\r\n let idToRemove = question.elementId;\r\n\r\n if (parentQuestionType === QuestionType.HybridGrid) {\r\n idToRemove = question.parent.elementId;\r\n }\r\n\r\n ariaLabelledForDivIds = labelsIds.filter((x) => x !== `${idToRemove}_LABEL`).join(\" \");\r\n } else {\r\n ariaLabelledForDivIds = labelsIds.join(\" \");\r\n }\r\n\r\n const listBoxChildren = displayedOptions.map((option) => (\r\n \r\n ));\r\n\r\n const recalledLabel = useRecall(selectedOptions[0] && selectedOptions[0].label);\r\n\r\n return (\r\n \r\n setActive(true)}\r\n onBlur={(e) => {\r\n setActive(false);\r\n const target = e.relatedTarget || document.activeElement;\r\n // If the element that *gained* focus is not contained within, close the list box.\r\n if (!ref.current.contains(target as Node)) {\r\n closeListBox();\r\n }\r\n\r\n if (ref && ref.current) {\r\n toggleContainerStyle(expanded);\r\n }\r\n }}\r\n >\r\n {icon && (\r\n setActive(true)}\r\n />\r\n )}\r\n disabled !== true && setFocused(false)}\r\n onFocus={() => disabled !== true && setFocused(true)}\r\n aria-haspopup=\"listbox\"\r\n aria-expanded={expanded}\r\n dangerouslySetInnerHTML={{ __html: recalledLabel }}\r\n />\r\n {disabled !== true && (\r\n \r\n )}\r\n {/* eslint-disable-next-line jsx-a11y/aria-activedescendant-has-tabindex */}\r\n \r\n {listBoxChildren}\r\n \r\n
\r\n \r\n );\r\n}\r\n","import React from \"react\";\r\nimport { DispatchProp } from \"react-redux\";\r\nimport { includes, trim } from \"../../utils/lodash\";\r\nimport { ChoiceListControl } from \"./ChoiceListControl\";\r\nimport { ControlContainer } from \"../../containers/controls/ControlContainer\";\r\nimport { BaseControl, ControlProps } from \"./BaseControl\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { QuestionType } from \"../../models/enums/QuestionType\";\r\nimport { ChoiceModel } from \"../../models/ChoiceModel\";\r\nimport { PhoneRegularExpression, EmailRegularExpression } from \"../../consts\";\r\nimport { CaseMode } from \"../../models/enums/CaseMode\";\r\nimport {\r\n getSettingNumber,\r\n getSettingBoolean,\r\n getSettingString,\r\n hasSetting,\r\n getSettingEnum,\r\n} from \"../../models/utilities/settingUtilities\";\r\nimport { isNullOrEmpty, isNullOrNaN, removeHtmlTags } from \"../../utils\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\nimport { ValidationBuilder } from \"../../models/builders/ValidationBuilder\";\r\nimport { formatNumeric, getNumeral, decimalSeparator } from \"../../utils/Number\";\r\nimport { ValidationOptionsModel } from \"../../models/ValidationOptionsModel\";\r\nimport { translate } from \"../../models/utilities/translationUtilities\";\r\nimport { getRendererProps } from \"../renderers/BaseRenderer\";\r\nimport { shouldAutoFormat, getSoftPromptCode } from \"../../models/utilities/questionUtilities\";\r\nimport TextAnswerRenderer from \"../renderers/v2/TextAnswerRenderer\";\r\nimport { respondentSetPhone, respondentSetEmail } from \"../../redux/actions\";\r\nimport { getValidationResults } from \"../../redux/thunks/validation\";\r\nimport { VariableType } from \"../../models/enums/VariableType\";\r\nimport { VariableModel } from \"../../models/VariableModel\";\r\nimport { isQuestionValidatedServerSide } from \"../../models/utilities/validationUtilities\";\r\n\r\ninterface Props extends ControlProps, DispatchProp {}\r\n\r\ninterface State {\r\n value: string;\r\n focus: boolean;\r\n answers: ChoiceModel[];\r\n input?: HTMLElement;\r\n}\r\n\r\nexport class TextBoxControl extends BaseControl {\r\n input?: HTMLElement;\r\n\r\n maxResults = (props: Props) => getSettingNumber(props.question, \"MaxResults\");\r\n\r\n constructor(props: Props) {\r\n super(props);\r\n this.state = {\r\n value: \"\",\r\n focus: false,\r\n answers: undefined,\r\n };\r\n }\r\n\r\n getFilteredAnswers(state: State, props: Props, showAllAnswers?: boolean) {\r\n if (!showAllAnswers) {\r\n const minSearchLength = getSettingNumber(props.question, \"MinSearchLength\", 0);\r\n if (isNullOrEmpty(state.value) || state.value.length < minSearchLength) {\r\n return [];\r\n }\r\n }\r\n const { question } = props;\r\n const searchValue = state.value.trim().toLowerCase();\r\n let choiceList = props.sequencedVariables[0].choiceList.filter(\r\n (choice) => !isNullOrEmpty(choice.value),\r\n );\r\n if (!showAllAnswers) {\r\n switch (getSettingString(question, \"SearchOption\")) {\r\n case \"Exact\":\r\n choiceList = choiceList.filter(\r\n (choice) =>\r\n this.getChoiceText(choice, props.language).trim().toLowerCase() ===\r\n searchValue,\r\n );\r\n break;\r\n case \"StartsWith\":\r\n choiceList = choiceList.filter((choice) =>\r\n this.getChoiceText(choice, props.language)\r\n .trim()\r\n .toLowerCase()\r\n .startsWith(searchValue),\r\n );\r\n break;\r\n default:\r\n choiceList = choiceList.filter((choice) =>\r\n this.getChoiceText(choice, props.language)\r\n .trim()\r\n .toLowerCase()\r\n .includes(searchValue),\r\n );\r\n }\r\n }\r\n choiceList = choiceList.sort((a, b) => {\r\n if (a === b) {\r\n return 0;\r\n }\r\n return a < b ? -1 : 1;\r\n });\r\n if (this.maxResults(props) != null) {\r\n return choiceList.slice(0, this.maxResults(props));\r\n }\r\n return choiceList;\r\n }\r\n\r\n getChoiceText(choice: ChoiceModel, lang?: string) {\r\n return removeHtmlTags(translate(choice, \"TEXT\", lang || this.props.language));\r\n }\r\n\r\n initializeQuestion(question: QuestionModel, props: Props) {\r\n super.initializeQuestion(question, props);\r\n const variable = this.getQuestionVariable(question.variables);\r\n if (!this.hasMentions(props)) {\r\n switch (question.type) {\r\n case QuestionType.RespondentPhone:\r\n this.setMentions(this.props, variable.name, (mentions) =>\r\n mentions.set(props.phone),\r\n );\r\n break;\r\n case QuestionType.RespondentEmail:\r\n this.setMentions(this.props, variable.name, (mentions) =>\r\n mentions.set(props.email),\r\n );\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n this.updateState(props, false);\r\n }\r\n\r\n willUpdateMentions(question: QuestionModel, nextProps: Props) {\r\n super.willUpdateMentions(question, nextProps);\r\n this.updateState(nextProps, false);\r\n }\r\n\r\n componentDidUpdate(prevProps: Props, prevState: State) {\r\n super.componentDidUpdate(prevProps, prevState);\r\n if (prevProps.language !== this.props.language) {\r\n this.updateState(this.props);\r\n }\r\n }\r\n\r\n componentDidMount() {\r\n this.setState((prevState) => ({ ...prevState, input: this.input }));\r\n }\r\n\r\n hasAnswerWithValue(props: Props, value: string) {\r\n if (isNullOrEmpty(value)) {\r\n return false;\r\n }\r\n const { variables } = props.question;\r\n const [firstVariable] = variables;\r\n const { choiceList } = firstVariable;\r\n return choiceList.some((choice) => choice.value === value);\r\n }\r\n\r\n hasMentionsInChoices = (props: Props) => {\r\n const { question } = props;\r\n\r\n const [firstVariable] = question.variables;\r\n const { choiceList } = firstVariable;\r\n\r\n const hasMentions = this.hasMentions(props);\r\n const mentions = this.getMentions(props);\r\n const [firstMention] = mentions;\r\n\r\n const hasMentionInChoices =\r\n hasMentions &&\r\n choiceList\r\n .filter((choice) => !isNullOrEmpty(choice.value))\r\n .some((choice) => choice.value === firstMention.value);\r\n\r\n return hasMentionInChoices;\r\n };\r\n\r\n updateState(props: Props, shouldUpdateRespondentFields = true) {\r\n this.setState((prevState) => {\r\n const newState = { ...prevState };\r\n const mention = this.getMention(props);\r\n const softPromptCode = getSoftPromptCode(this.props.question);\r\n newState.value = \"\";\r\n switch (props.question.type) {\r\n case QuestionType.RespondentEmail:\r\n newState.value = shouldUpdateRespondentFields\r\n ? props.email\r\n : mention?.value || prevState.value;\r\n break;\r\n case QuestionType.RespondentPhone:\r\n newState.value = shouldUpdateRespondentFields\r\n ? props.phone\r\n : mention?.value || prevState.value;\r\n break;\r\n case QuestionType.OpenEndAnswer:\r\n if (mention) {\r\n newState.value = mention.openEnd;\r\n }\r\n break;\r\n case QuestionType.NumericAnswer: {\r\n const hasAnswerWithValue =\r\n mention && this.hasAnswerWithValue(props, mention.value);\r\n const hasMentionsInChoices = this.hasMentionsInChoices(props);\r\n const isChoiceVisible = mention && this.isChoiceVisible(mention.value, props);\r\n if (\r\n mention &&\r\n !hasAnswerWithValue &&\r\n (!hasMentionsInChoices || !isChoiceVisible)\r\n ) {\r\n const numeral = getNumeral(mention.value).value();\r\n if (!isNullOrNaN(numeral)) {\r\n newState.value = this.formatNumeric(numeral, props);\r\n }\r\n }\r\n break;\r\n }\r\n default:\r\n if (mention && mention.value !== softPromptCode) {\r\n newState.value = mention.value;\r\n }\r\n break;\r\n }\r\n return newState;\r\n });\r\n }\r\n\r\n onKeyPress = (event: React.KeyboardEvent) => {\r\n if (this.isKeyPrintable(event.key) && this.hasMentionsInChoices(this.props)) {\r\n const { question } = this.props;\r\n const variable = this.getQuestionVariable(question.variables);\r\n this.setMentions(this.props, variable.name, (mention) => mention.clear());\r\n }\r\n };\r\n\r\n isKeyPrintable = (key: string) => key.length === 1;\r\n\r\n onTextChanged = (event: React.ChangeEvent) => {\r\n let { value } = event.target;\r\n const { maxLength } = event.target;\r\n const { question, language } = this.props;\r\n const caseMode = getSettingEnum(question, CaseMode, \"CaseMode\");\r\n\r\n const numericQuestionTypes = [QuestionType.NumericAnswer, QuestionType.RunningTotal];\r\n const isNumeric = numericQuestionTypes.includes(question.type);\r\n\r\n if (isNumeric) {\r\n const { NumberOfDecimals: nbDecimalDefine } = question.settings;\r\n const delimiter = decimalSeparator(language);\r\n const parts = value.split(delimiter);\r\n const [wholeNumber, decimalNumber] = parts;\r\n\r\n if (nbDecimalDefine === undefined || nbDecimalDefine === 0) {\r\n if (includes(value, delimiter)) {\r\n return;\r\n }\r\n value = wholeNumber;\r\n } else if (\r\n includes(value, delimiter) &&\r\n decimalNumber &&\r\n decimalNumber.length > nbDecimalDefine\r\n ) {\r\n parts[1] = decimalNumber.substring(0, nbDecimalDefine);\r\n value = parts.join(delimiter);\r\n }\r\n\r\n if (includes(value, \".\") && delimiter === \",\") {\r\n value = value.replace(\".\", \",\");\r\n }\r\n\r\n let invalidNumber;\r\n if (question.parent && question.parent.type === QuestionType.RunningTotal) {\r\n invalidNumber = value.match(/[^\\d. ,-]|[.,]{2,}/) || includes(value, \"-\");\r\n } else {\r\n invalidNumber =\r\n value.match(/[^\\d. ,-]|[.,]{2,}/) ||\r\n Array.from(value).find((char, index) => index > 0 && char === \"-\");\r\n }\r\n if (invalidNumber) {\r\n return;\r\n }\r\n }\r\n\r\n if (caseMode === CaseMode.AllCaps) {\r\n value = value.toUpperCase();\r\n } else if (caseMode === CaseMode.FirstLetterCaps) {\r\n value = value\r\n .split(\" \")\r\n .map((v) => v.charAt(0).toUpperCase() + v.slice(1))\r\n .join(\" \");\r\n }\r\n\r\n if (maxLength > -1 && value.length > maxLength) {\r\n value = value.substring(0, maxLength);\r\n }\r\n\r\n this.setState((prevState) => {\r\n const newState = { ...prevState };\r\n newState.value = value;\r\n return newState;\r\n });\r\n };\r\n\r\n formatNumeric(value: string | number, props: Props, cultureInvariant?: boolean) {\r\n const { question } = props;\r\n return formatNumeric(\r\n value,\r\n getSettingNumber(question, \"NumberOfDecimals\"),\r\n props.language,\r\n cultureInvariant,\r\n this.shouldFormat(question),\r\n );\r\n }\r\n\r\n shouldFormat(question: QuestionModel) {\r\n return this.isNumericAnswer(question) && shouldAutoFormat(question);\r\n }\r\n\r\n isNumericAnswer(question: QuestionModel) {\r\n return question.type === QuestionType.NumericAnswer;\r\n }\r\n\r\n updateAnswers() {\r\n const { question, language } = this.props;\r\n const variable = this.getQuestionVariable(question.variables);\r\n let { value } = this.state;\r\n\r\n const hasMentionInChoices = this.hasMentionsInChoices(this.props);\r\n if (isNullOrEmpty(value) && hasMentionInChoices) {\r\n return;\r\n }\r\n\r\n if (this.isNumericAnswer(question)) {\r\n const numeral = getNumeral(value, language).value();\r\n if (!isNullOrNaN(numeral)) {\r\n value = this.formatNumeric(numeral, this.props, true);\r\n }\r\n }\r\n\r\n if (question.type === QuestionType.OpenEndAnswer) {\r\n value = trim(value || \"\");\r\n const answerCode = getSettingString(question, \"AnswerCode\", \"0\");\r\n this.updateMention(value, variable, answerCode);\r\n return;\r\n }\r\n\r\n this.updateMention(value, variable);\r\n }\r\n\r\n updateMention = (value: string, variable: VariableModel, code?: string) => {\r\n const mention = this.getMentions(this.props, variable.name)?.find((m) =>\r\n this.mentionIsValid(m, this.props.question),\r\n );\r\n if (isNullOrEmpty(value)) {\r\n if (mention) {\r\n this.setMentions(this.props, variable.name, (mentions) => mentions.clear());\r\n }\r\n } else if (mention?.value !== value) {\r\n this.setMentions(this.props, variable.name, (mentions) => {\r\n if (code) {\r\n return mentions.set(code, value);\r\n }\r\n return mentions.set(value);\r\n });\r\n }\r\n };\r\n\r\n onTextBlur = () => {\r\n this.updateAnswers();\r\n };\r\n\r\n placeholder() {\r\n return \"\";\r\n }\r\n\r\n inputtype(question: QuestionModel) {\r\n switch (question.type) {\r\n case QuestionType.RespondentEmail:\r\n case QuestionType.EmailAddressAnswer:\r\n return \"email\";\r\n case QuestionType.RespondentPhone:\r\n return \"tel\";\r\n default:\r\n return \"text\";\r\n }\r\n }\r\n\r\n maxLength = (question: QuestionModel) => getSettingNumber(question, \"MaxAnswerLength\");\r\n\r\n minValue() {\r\n const min = super.minValue();\r\n return min != null ? min : Number.MIN_SAFE_INTEGER;\r\n }\r\n\r\n maxValue() {\r\n const max = super.maxValue();\r\n return max != null ? max : Number.MAX_SAFE_INTEGER;\r\n }\r\n\r\n displayValue = () => {\r\n // Use the mention to make sure text does not disappear whenever it matches a possible answer.\r\n const mentionValue = this.getMentionValue(this.props);\r\n\r\n // Check if the value is equal to the mention to let the user change the value.\r\n const isValueMentioned =\r\n this.state.value === mentionValue && this.hasAnswerWithValue(this.props, mentionValue);\r\n\r\n if (this.state.value === undefined || isValueMentioned) {\r\n return \"\";\r\n }\r\n return this.state.value;\r\n };\r\n\r\n textAlign = (question: QuestionModel) => {\r\n if (question.type === QuestionType.NumericAnswer) {\r\n return \"right\";\r\n }\r\n return undefined;\r\n };\r\n\r\n renderQuestion(question: QuestionModel) {\r\n const multiline =\r\n getSettingBoolean(question, \"MultiLine\") ||\r\n question.type === QuestionType.OpenEndAnswer;\r\n\r\n const lines = getSettingNumber(question, \"Lines\");\r\n\r\n return (\r\n <>\r\n {\r\n this.input = r as HTMLInputElement;\r\n }}\r\n min={this.minValue()}\r\n max={this.maxValue()}\r\n maxLength={this.maxLength(question)}\r\n onBlur={this.onTextBlur}\r\n onChange={this.onTextChanged}\r\n onKeyPress={this.onKeyPress}\r\n value={this.displayValue()}\r\n disabled={this.props.isDisabled}\r\n lines={lines}\r\n />\r\n \r\n \r\n );\r\n }\r\n\r\n regexForValidationMask(mask: string) {\r\n let regex = \"\";\r\n const replacements = {\r\n A: \"[A-Z]\",\r\n Z: \"[A-Z0-9]\",\r\n 9: \"[0-9]\",\r\n \"*\": \".\",\r\n };\r\n Array.from(mask).forEach((c) => {\r\n regex += replacements[c] || `\\\\${c}`;\r\n });\r\n return `^${regex}$`;\r\n }\r\n\r\n validateFormat(question: QuestionModel, value: string) {\r\n const mask = getSettingString(question, \"ValidationMask\");\r\n if (isNullOrEmpty(mask)) {\r\n return true;\r\n }\r\n return new RegExp(this.regexForValidationMask(mask), \"i\").test(value);\r\n }\r\n\r\n shouldEnforceValidation(question: QuestionModel) {\r\n return (\r\n !hasSetting(question, \"EnforceValidation\") ||\r\n getSettingBoolean(question, \"EnforceValidation\")\r\n );\r\n }\r\n\r\n isAnswerComplete() {\r\n if (isNullOrEmpty(this.state.value) && this.hasMentions(this.props)) {\r\n const [mention] = this.getMentions(this.props);\r\n const variable = this.getQuestionVariable(this.props.sequencedVariables);\r\n const { choiceList = [] } = variable;\r\n if (choiceList.some((choice) => choice.value === mention.value)) {\r\n return true;\r\n }\r\n }\r\n return !isNullOrEmpty(trim(this.state.value));\r\n }\r\n\r\n validate(options?: ValidationOptionsModel): ValidationResultModel {\r\n this.updateAnswers();\r\n const { question, useClientValidation, dispatch } = this.props;\r\n const { value } = this.state;\r\n\r\n const validation = new ValidationBuilder();\r\n if (isQuestionValidatedServerSide(question.type, useClientValidation)) {\r\n if (question.type === QuestionType.RespondentPhone) {\r\n dispatch(respondentSetPhone(value));\r\n } else if (question.type === QuestionType.RespondentEmail) {\r\n dispatch(respondentSetEmail(value));\r\n }\r\n return validation.build();\r\n }\r\n\r\n const variable = question.variables.find((v) => v.type !== VariableType.Computed);\r\n const hasSelectedAnswer = this.hasAnswerWithValue(this.props, value);\r\n let result = super.validate(options);\r\n\r\n if (result.isValid) {\r\n if (!isNullOrEmpty(value) && !hasSelectedAnswer) {\r\n switch (question.type) {\r\n case QuestionType.OpenEndAnswer:\r\n result = this.validateOpenEnd(value, question);\r\n if (!result.isValid) {\r\n return result;\r\n }\r\n break;\r\n case QuestionType.RespondentPhone:\r\n if (\r\n this.shouldEnforceValidation(question) &&\r\n !PhoneRegularExpression.test(value)\r\n ) {\r\n return validation.fail(variable.name, \"InvalidAnswer\").build();\r\n }\r\n this.props.dispatch(respondentSetPhone(value));\r\n break;\r\n case QuestionType.RespondentEmail:\r\n if (\r\n this.shouldEnforceValidation(question) &&\r\n !EmailRegularExpression.test(value)\r\n ) {\r\n return validation.fail(variable.name, \"InvalidEmailAddress\").build();\r\n }\r\n this.props.dispatch(respondentSetEmail(value));\r\n break;\r\n case QuestionType.EmailAddressAnswer:\r\n if (\r\n this.shouldEnforceValidation(question) &&\r\n !EmailRegularExpression.test(value)\r\n ) {\r\n return validation.fail(variable.name, \"InvalidEmailAddress\").build();\r\n }\r\n break;\r\n case QuestionType.TextAnswer:\r\n if (!this.validateFormat(question, value)) {\r\n return validation.fail(variable.name, \"InvalidTextFormat\").build();\r\n }\r\n break;\r\n case QuestionType.NumericAnswer:\r\n return getValidationResults([question]);\r\n default:\r\n break;\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\nimport { getSpacing } from \"../../../theme/Mixins\";\r\n\r\nexport default createUseStyles({\r\n drillDown: {\r\n composes: \"drill-down\",\r\n marginTop: ({ theme }) => getSpacing(theme, 0, theme.QuestionSpacing?.WithinComponents),\r\n },\r\n variable: {\r\n composes: \"drill-down__variable\",\r\n },\r\n label: {\r\n composes: \"drill-down__label\",\r\n display: \"block\",\r\n fontWeight: 600,\r\n marginTop: ({ theme }) => getSpacing(theme, 20, theme.QuestionSpacing?.WithinComponents),\r\n marginBottom: 4,\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch, shallowEqual, useStore } from \"react-redux\";\r\nimport { reduce, pick } from \"../utils/lodash\";\r\nimport { StoreState } from \"../models/states/StoreState\";\r\nimport { MentionBuilderDelegate } from \"../models/builders/MentionBuilder\";\r\nimport { MentionModel } from \"../models/MentionModel\";\r\nimport { setVariableMentions } from \"../redux/actions\";\r\nimport { makeMentionsSelector } from \"../redux/selectors/mentions\";\r\n\r\nexport function useMentions(\r\n variableName: string,\r\n): [MentionModel[], (builder: MentionBuilderDelegate) => void] {\r\n const dispatch = useDispatch();\r\n const mentionsSelector = makeMentionsSelector(variableName);\r\n const mentions = useSelector((state: StoreState) => mentionsSelector(state));\r\n\r\n const setMentions = React.useCallback(\r\n (builder: MentionBuilderDelegate) => {\r\n dispatch(setVariableMentions(variableName, builder));\r\n },\r\n [dispatch, variableName],\r\n );\r\n\r\n return [mentions, setMentions];\r\n}\r\n\r\nexport function useMentionValues(\r\n variableName: string,\r\n): [string[], (builder: MentionBuilderDelegate) => void] {\r\n const [mentions, setMentions] = useMentions(variableName);\r\n const mentionValues = React.useMemo(() => mentions.map((m) => m.value), [mentions]);\r\n return [mentionValues, setMentions];\r\n}\r\n\r\nexport function useSetVariableMentions() {\r\n const dispatch = useDispatch();\r\n const matrix = useSelector(\r\n (state: StoreState) => state.interview.navigation.currentPage.loopIndex,\r\n );\r\n return (variableName: string, builder: MentionBuilderDelegate) =>\r\n dispatch(setVariableMentions(variableName, builder, matrix));\r\n}\r\n\r\nexport function useGetVariableMentions() {\r\n const store = useStore();\r\n return (variableName: string) => makeMentionsSelector(variableName)(store.getState());\r\n}\r\n\r\nexport function usePickMentions(\r\n variableNames: string[],\r\n): { [variableName: string]: MentionModel[] } {\r\n return useSelector(\r\n (state: StoreState) =>\r\n reduce(\r\n pick(state.interview.variables.mentionsByVariableName, variableNames),\r\n (result, mentions, variableName) => ({\r\n ...result,\r\n [variableName]: mentions.filter(\r\n (m) => m.matrix === state.interview.navigation.currentPage.loopIndex,\r\n ),\r\n }),\r\n {},\r\n ),\r\n shallowEqual,\r\n );\r\n}\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport { useSelector } from \"react-redux\";\r\nimport useStyles from \"./DrillDownRenderer.styles\";\r\nimport { VariableModel } from \"../../../models/VariableModel\";\r\nimport { StoreState } from \"../../../models/states/StoreState\";\r\nimport { translate } from \"../../../models/utilities/translationUtilities\";\r\nimport { getRendererProps, RendererProps } from \"../BaseRenderer\";\r\nimport { removeHtmlTags, isNullOrEmpty } from \"../../../utils\";\r\nimport Select from \"../../select/Select\";\r\nimport { MentionModel } from \"../../../models/MentionModel\";\r\nimport { ChoiceModel } from \"../../../models/ChoiceModel\";\r\nimport ChoiceOpenEndRenderer from \"./ChoiceOpenEndRenderer\";\r\nimport { size } from \"../../../models/utilities/questionUtilities\";\r\nimport { getSettingString, getSettingNumber } from \"../../../models/utilities/settingUtilities\";\r\nimport useRecall from \"../../../hooks/useRecall\";\r\nimport { usePickMentions } from \"../../../hooks/useMentions\";\r\n\r\ninterface VariableProps extends RendererProps {\r\n variable: VariableModel;\r\n parentVariable: VariableModel;\r\n mentions: { [variableName: string]: MentionModel[] };\r\n onVariableChanged(variableName: string, value: string[]): void;\r\n openEndValue?: { [key: string]: string };\r\n getFirstOpenEndedChoice(variable: VariableModel): ChoiceModel;\r\n onOpenEndChange(variable: VariableModel, choice: ChoiceModel, text: string): void;\r\n onOpenEndBlur(variable: VariableModel, choice: ChoiceModel): void;\r\n}\r\n\r\nfunction DrillDownVariable(props: VariableProps) {\r\n const {\r\n question,\r\n variable,\r\n parentVariable,\r\n mentions,\r\n onVariableChanged,\r\n openEndValue,\r\n getFirstOpenEndedChoice,\r\n onOpenEndChange,\r\n onOpenEndBlur,\r\n } = props;\r\n\r\n const theme = useTheme();\r\n const classes = useStyles({ ...props, theme });\r\n const language = useSelector((state: StoreState) => state.interview.language);\r\n const surveyTheme = useSelector((state: StoreState) => state.interview.theme);\r\n\r\n const openEndChoice = getFirstOpenEndedChoice(variable);\r\n\r\n const min = variable.settings.MinRequiredAnswers;\r\n const max = variable.settings.MaxAllowedAnswers;\r\n const varMentions = mentions[variable.name];\r\n const parentVarMentions = parentVariable ? mentions[parentVariable.name] : undefined;\r\n const isMultiple = min > 1 || max > 1;\r\n\r\n const availableChoices = React.useMemo(() => {\r\n if (!parentVariable) {\r\n return variable.choiceList;\r\n }\r\n\r\n const parentMentionValues = parentVarMentions ? parentVarMentions.map((m) => m.value) : [];\r\n return variable.choiceList.filter(\r\n (choice) =>\r\n isNullOrEmpty(choice.parentValue) ||\r\n parentMentionValues.includes(choice.parentValue),\r\n );\r\n }, [parentVariable, parentVarMentions, variable]);\r\n\r\n const availableOptions = React.useMemo(\r\n () =>\r\n availableChoices.map((choice) => ({\r\n id: choice.elementId,\r\n label: translate(choice, \"TEXT\", language),\r\n value: choice.value,\r\n })),\r\n [availableChoices, language],\r\n );\r\n\r\n const emptyAnswerOption = React.useMemo(\r\n () => ({\r\n id: `${variable.elementId}_EMPTY`,\r\n label: removeHtmlTags(translate(surveyTheme, \"DropdownEmptyAnswer\", language)),\r\n value: \"\",\r\n }),\r\n [variable, language, surveyTheme],\r\n );\r\n\r\n const options = React.useMemo(() => [emptyAnswerOption, ...availableOptions], [\r\n emptyAnswerOption,\r\n availableOptions,\r\n ]);\r\n\r\n const variableText = useRecall(translate(variable, \"Text\", language));\r\n\r\n return (\r\n
\r\n \r\n m.value || \"\") : []}\r\n multiple={isMultiple}\r\n onChange={(value) => onVariableChanged(variable.name, value)}\r\n options={options}\r\n size={size(question)}\r\n />\r\n {openEndChoice && (\r\n onOpenEndBlur(variable, choice)}\r\n onOpenEndChange={(choice, text) => onOpenEndChange(variable, choice, text)}\r\n size={getSettingString(openEndChoice, \"OpenEndSize\", \"Medium\")}\r\n lines={getSettingNumber(openEndChoice, \"OpenEndLines\", 2)}\r\n />\r\n )}\r\n
\r\n );\r\n}\r\n\r\ninterface Props extends RendererProps {\r\n variables: VariableModel[];\r\n onVariableChanged(variableName: string, value: string[]): void;\r\n openEndValue?: { [key: string]: string };\r\n getFirstOpenEndedChoice(variable: VariableModel): ChoiceModel;\r\n onOpenEndChange(variable: VariableModel, choice: ChoiceModel, text: string): void;\r\n onOpenEndBlur(variable: VariableModel, choice: ChoiceModel): void;\r\n}\r\n\r\nexport default function DrillDownRenderer(props: Props) {\r\n const {\r\n variables,\r\n onVariableChanged,\r\n openEndValue,\r\n getFirstOpenEndedChoice,\r\n onOpenEndChange,\r\n onOpenEndBlur,\r\n } = props;\r\n const theme = useTheme();\r\n const classes = useStyles({ ...props, theme });\r\n const drillDownMentions = usePickMentions(variables.map((v) => v.name));\r\n\r\n return (\r\n
\r\n {variables.map((variable) => (\r\n \r\n ))}\r\n
\r\n );\r\n}\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport classnames from \"classnames\";\r\nimport { RendererProps } from \"../BaseRenderer\";\r\nimport { getSettingString, hasSetting } from \"../../../models/utilities/settingUtilities\";\r\nimport { AxisModel } from \"../../../models/AxisModel\";\r\nimport { ValidationResultModel } from \"../../../models/ValidationResultModel\";\r\nimport { cellHasError } from \"../../../models/utilities/gridUtilities\";\r\nimport { ChoiceModel } from \"../../../models/ChoiceModel\";\r\nimport useStyle from \"./GridCellRenderer.styles\";\r\nimport { QuestionType } from \"../../../models/enums/QuestionType\";\r\n\r\ninterface Props extends RendererProps {\r\n isColumnHeader?: boolean;\r\n isChoiceHeader?: boolean;\r\n isRowHeader?: boolean;\r\n row?: AxisModel;\r\n column?: AxisModel;\r\n colSpan?: number;\r\n validationResult?: ValidationResultModel;\r\n choice?: ChoiceModel;\r\n columnIndex?: number;\r\n}\r\n\r\nenum HeaderType {\r\n Choice,\r\n Column,\r\n Row,\r\n}\r\n\r\nconst headerProps = {\r\n [HeaderType.Choice]: {\r\n role: \"columnheader\",\r\n scope: \"col\",\r\n },\r\n [HeaderType.Column]: {\r\n role: \"columnheader\",\r\n scope: \"col\",\r\n },\r\n [HeaderType.Row]: {\r\n role: \"rowheader\",\r\n scope: \"row\",\r\n },\r\n};\r\n\r\nexport default function GridCellRenderer(props: Props) {\r\n const {\r\n row,\r\n column,\r\n validationResult,\r\n isChoiceHeader,\r\n isColumnHeader,\r\n isRowHeader,\r\n colSpan,\r\n children,\r\n choice,\r\n question,\r\n } = props;\r\n const theme = useTheme();\r\n const classes = useStyle({ theme });\r\n const inputSize = getSettingString(column, \"Size\");\r\n\r\n const errorClass = cellHasError(row, column, validationResult) ? classes.gridItemError : \"\";\r\n const rowColor = hasSetting(row, \"Color\") ? getSettingString(row, \"Color\") : null;\r\n const columnColor = hasSetting(column, \"Color\") ? getSettingString(column, \"Color\") : null;\r\n const choiceColor = hasSetting(choice, \"Color\") ? getSettingString(choice, \"Color\") : null;\r\n const isStarRatting = question?.type === QuestionType.StarRatingGrid;\r\n\r\n const style = {\r\n backgroundColor: rowColor || columnColor || choiceColor,\r\n width: inputSize === \"Full\" ? \"100%\" : undefined,\r\n display: isRowHeader && isStarRatting ? \"table-cell\" : null,\r\n };\r\n\r\n let headerClass: string;\r\n let headerType: HeaderType;\r\n const attributes = {};\r\n\r\n if (isChoiceHeader) {\r\n headerType = HeaderType.Choice;\r\n headerClass = classes.gridChoiceHeader;\r\n if (choice && choice.index >= 0) {\r\n const questionName = question?.name ?? \"\";\r\n const columnIndex = column?.index ?? 0; // Hybrid choice will have 2 level of header\r\n\r\n if (question.type === QuestionType.HybridGrid) {\r\n attributes[\"id\"] = `Q_${questionName}_MAINCOLHEADER${\r\n columnIndex + 1\r\n }_CHOICEHEADER_${choice.index + 1}`;\r\n } else {\r\n attributes[\"id\"] = `Q_${questionName}_CHOICEHEADER_${choice.index + 1}`;\r\n }\r\n }\r\n } else if (isColumnHeader) {\r\n headerType = HeaderType.Column;\r\n headerClass = classes.gridColumnHeader;\r\n } else if (isRowHeader) {\r\n headerType = HeaderType.Row;\r\n headerClass = classes.gridRowHeader;\r\n } else {\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n }\r\n\r\n const { role, scope } = headerProps[headerType];\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n}\r\n","import React from \"react\";\r\nimport { DispatchProp } from \"react-redux\";\r\nimport { intersectionBy, find } from \"../../utils/lodash\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { BaseControl, ControlProps } from \"./BaseControl\";\r\nimport { ChoiceModel } from \"../../models/ChoiceModel\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\nimport { ValidationBuilder } from \"../../models/builders/ValidationBuilder\";\r\nimport { getSettingBoolean } from \"../../models/utilities/settingUtilities\";\r\nimport { VariableModel } from \"../../models/VariableModel\";\r\nimport { isNullOrEmpty } from \"../../utils\";\r\nimport { ValidationOptionsModel } from \"../../models/ValidationOptionsModel\";\r\nimport { hasOpenEnd } from \"../../models/utilities/choiceUtilities\";\r\nimport DrillDownRenderer from \"../renderers/v2/DrillDownRenderer\";\r\nimport { getRendererProps } from \"../renderers/BaseRenderer\";\r\nimport { setVariableMentions } from \"../../redux/actions\";\r\nimport { isQuestionValidatedServerSide } from \"../../models/utilities/validationUtilities\";\r\n\r\ninterface Props extends ControlProps, DispatchProp {}\r\n\r\ninterface State {\r\n popupX: number;\r\n popupY: number;\r\n openEndValue?: { [key: string]: string };\r\n}\r\n\r\nexport class DrillDownControl extends BaseControl {\r\n drillDownRef: HTMLElement;\r\n\r\n popUpRef: HTMLDivElement;\r\n\r\n constructor(props: Props) {\r\n super(props);\r\n this.state = {\r\n popupX: 0,\r\n popupY: 0,\r\n openEndValue: {},\r\n };\r\n }\r\n\r\n initializeQuestion(question: QuestionModel, props: Props): void {\r\n super.initializeQuestion(question, props);\r\n this.setDefaultChoices(props);\r\n this.setState({\r\n popupX: 0,\r\n popupY: 0,\r\n });\r\n this.updateData(props);\r\n }\r\n\r\n setDefaultChoices(props: Props): void {\r\n if (!this.hasMentions(props)) {\r\n for (const variable of props.sequencedVariables) {\r\n const defaultChoices = variable.choiceList.filter((a) =>\r\n getSettingBoolean(a, \"Default\"),\r\n );\r\n\r\n const dropdownMentions = this.getMentions(props, variable.name);\r\n\r\n if (defaultChoices.length > 0 && dropdownMentions.length < 1) {\r\n this.setMentions(props, variable.name, (mentions) => {\r\n mentions = mentions.clear();\r\n for (const choice of defaultChoices) {\r\n mentions = mentions.add(choice.value);\r\n }\r\n return mentions;\r\n });\r\n }\r\n }\r\n }\r\n }\r\n\r\n willUpdateMentions(question: QuestionModel, props: Props) {\r\n // Validate selected choices in the drilldown, making\r\n // sure choices have their parent value selected.\r\n let parentSelected: ChoiceModel[];\r\n\r\n const dropdowns = this.availableDropdowns(props);\r\n for (let i = 0; i < dropdowns.length; i++) {\r\n const dropdown = dropdowns[i];\r\n // Get the selected choices for this dropdown.\r\n const dropdownMentions = this.getMentions(props, dropdown.name);\r\n const selectedChoices = intersectionBy(\r\n dropdown.choiceList,\r\n dropdownMentions,\r\n (c) => c.value,\r\n );\r\n if (i > 0) {\r\n // Remove from the list choices not selected in the parent.\r\n const parentSelectedValues = parentSelected.map((p) => p.value);\r\n const childrenSelected = selectedChoices.filter(\r\n (c) =>\r\n isNullOrEmpty(c.parentValue) ||\r\n parentSelectedValues.includes(c.parentValue),\r\n );\r\n\r\n if (selectedChoices.length !== childrenSelected.length) {\r\n this.setMentions(props, dropdown.name, (mentions) => {\r\n mentions = mentions.clear();\r\n childrenSelected.forEach((choice) => {\r\n const choiceMention = dropdownMentions.find(\r\n (x) => x.value === choice.value,\r\n );\r\n const openEnd = choiceMention && choiceMention.openEnd;\r\n mentions = mentions.add(choice.value, openEnd);\r\n });\r\n return mentions;\r\n });\r\n }\r\n\r\n parentSelected = childrenSelected;\r\n } else {\r\n parentSelected = selectedChoices;\r\n }\r\n }\r\n }\r\n\r\n updateData(props: Props) {\r\n this.setState((s) => {\r\n const newState = { ...s };\r\n this.availableDropdowns(props).forEach((dropdown) => {\r\n const mention = find(\r\n this.getMentions(props, dropdown.name),\r\n (m) => !isNullOrEmpty(m.openEnd),\r\n );\r\n if (mention !== undefined && !isNullOrEmpty(mention.openEnd)) {\r\n newState.openEndValue = {\r\n ...newState.openEndValue,\r\n [dropdown.name]: mention.openEnd,\r\n };\r\n } else {\r\n newState.openEndValue = { ...newState.openEndValue, [dropdown.name]: \"\" };\r\n }\r\n });\r\n return newState;\r\n });\r\n }\r\n\r\n UNSAFE_componentWillReceiveProps(nextProps: Props) {\r\n super.UNSAFE_componentWillReceiveProps(nextProps);\r\n this.updateData(nextProps);\r\n }\r\n\r\n getValue = (props: Props, dropdown: VariableModel) => {\r\n if (dropdown == null) {\r\n return [];\r\n }\r\n return this.getMentions(props, dropdown.name).map((m) => m.value);\r\n };\r\n\r\n onVariableChanged = (variableName: string, value: string[]) => {\r\n this.setMentions(this.props, variableName, (builder) =>\r\n builder.clear().add(value.map((v) => ({ value: v }))),\r\n );\r\n };\r\n\r\n availableDropdowns = (props: Props) => props.sequencedVariables.filter((v) => v.choiceList);\r\n\r\n renderQuestion(question: QuestionModel) {\r\n return (\r\n this.getFirstOpenEndedChoice(variable)}\r\n />\r\n );\r\n }\r\n\r\n onOpenEndChange = (variable: VariableModel, choice: ChoiceModel, text: string) => {\r\n this.setState((state) => {\r\n const newState = { ...state };\r\n newState.openEndValue = {\r\n ...newState.openEndValue,\r\n [variable.name]: this.truncateOpenEnd(choice, text),\r\n };\r\n return newState;\r\n });\r\n };\r\n\r\n onOpenEndBlur = (variable: VariableModel, choice: ChoiceModel) => {\r\n const openEnd = this.state.openEndValue[variable.name];\r\n this.props.dispatch(\r\n setVariableMentions(variable.name, (mentions) =>\r\n mentions.removeValue(choice.value).add(choice.value, openEnd.trim()),\r\n ),\r\n );\r\n };\r\n\r\n getFirstOpenEndedChoice(variable: VariableModel) {\r\n const value = this.getValue(this.props, variable);\r\n return variable.choiceList.find((c) => c.settings.OpenEndType && value.includes(c.value));\r\n }\r\n\r\n validate(options?: ValidationOptionsModel): ValidationResultModel {\r\n const { questionnaire, question, mentions, useClientValidation } = this.props;\r\n\r\n if (isQuestionValidatedServerSide(question.type, useClientValidation)) {\r\n return new ValidationBuilder().build();\r\n }\r\n\r\n const availableDropdowns = this.availableDropdowns(this.props);\r\n for (const dropdown of availableDropdowns) {\r\n const value = this.getValue(this.props, dropdown);\r\n const min = dropdown.settings.MinRequiredAnswers;\r\n const max = dropdown.settings.MaxAllowedAnswers;\r\n if (value.length > 0) {\r\n if (min !== null && value.length < min) {\r\n return this.failValidation(availableDropdowns, \"InvalidChoicesMin\", {\r\n min: String(min),\r\n });\r\n }\r\n if (max !== null && value.length > max) {\r\n return this.failValidation(availableDropdowns, \"InvalidChoicesMax\", {\r\n max: String(max),\r\n });\r\n }\r\n // Check if selected choice has openEnd.\r\n const dropdownMentions = mentions[dropdown.name];\r\n const openEndChoices = dropdown.choiceList.filter(hasOpenEnd);\r\n for (const choice of openEndChoices) {\r\n const mention = dropdownMentions.find((m) => m.value === choice.value);\r\n const openEnd = this.state.openEndValue[dropdown.name];\r\n if (mention) {\r\n const result = this.validateOpenEnd(openEnd, choice, dropdown.name);\r\n if (!result.isValid) {\r\n return result;\r\n }\r\n }\r\n }\r\n } else if (this.isAnswerRequired(questionnaire, question)) {\r\n return this.failValidation(availableDropdowns, \"IncompleteAnswer\");\r\n }\r\n }\r\n return new ValidationBuilder().build();\r\n }\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\n\r\nexport default createUseStyles((theme: any) => ({\r\n gridItem: {\r\n composes: \"grid__item\",\r\n margin: 0,\r\n minWidth: theme.GridCellMinWidth,\r\n minHeight: theme.GridCellMinHeight,\r\n padding: theme.GridCellPadding,\r\n },\r\n gridItemError: {\r\n composes: \"grid__item--error\",\r\n },\r\n gridRowHeader: {\r\n composes: \"grid__row-header\",\r\n fontWeight: \"normal\",\r\n minWidth: 50,\r\n textAlign: \"left\",\r\n },\r\n gridColumnHeader: {\r\n composes: \"grid__column-header\",\r\n fontWeight: \"normal\",\r\n verticalAlign: \"top\",\r\n },\r\n gridChoiceHeader: {\r\n composes: \"grid__choice-header\",\r\n fontWeight: \"bold\",\r\n verticalAlign: \"top\",\r\n },\r\n}));\r\n","export enum CursorPosition {\r\n Left,\r\n Right,\r\n Middle,\r\n Hidden,\r\n}\r\n","import React from \"react\";\r\nimport { DispatchProp } from \"react-redux\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { QuestionType } from \"../../models/enums/QuestionType\";\r\nimport { BaseControl, ControlProps } from \"./BaseControl\";\r\nimport { ChoiceModel } from \"../../models/ChoiceModel\";\r\nimport { size } from \"../../models/utilities/questionUtilities\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\nimport { hasOpenEnd, isVisible } from \"../../models/utilities/choiceUtilities\";\r\nimport { isNullOrEmpty, removeHtmlTags } from \"../../utils/index\";\r\nimport { getRendererProps } from \"../renderers/BaseRenderer\";\r\nimport { translate } from \"../../models/utilities/translationUtilities\";\r\nimport { ValidationBuilder } from \"../../models/builders/ValidationBuilder\";\r\nimport ChoiceOpenEndRenderer from \"../renderers/v2/ChoiceOpenEndRenderer\";\r\nimport Select, { Option } from \"../select/Select\";\r\nimport {\r\n getSettingString,\r\n getSettingNumber,\r\n getSettingBoolean,\r\n} from \"../../models/utilities/settingUtilities\";\r\nimport { getChoice } from \"../../models/utilities/variableUtilities\";\r\nimport { respondentSetTimeZone, changeLanguage } from \"../../redux/actions\";\r\n\r\ninterface Props extends ControlProps, DispatchProp {}\r\n\r\ninterface State {\r\n openEndValue?: string;\r\n}\r\n\r\nexport class DropDownControl extends BaseControl {\r\n constructor(props: Props) {\r\n super(props);\r\n this.state = {};\r\n }\r\n\r\n initializeQuestion(question: QuestionModel, props: Props) {\r\n super.initializeQuestion(question, props);\r\n const [variable] = this.props.sequencedVariables;\r\n if (this.hasMentions(props)) {\r\n const openEnd = this.getMentionOpenEnd(props, variable.name, 0);\r\n if (openEnd) {\r\n this.setState({ openEndValue: openEnd });\r\n }\r\n }\r\n switch (question.type) {\r\n case QuestionType.RespondentLanguage: {\r\n const answers = variable.choiceList || [];\r\n const questionName = question.name;\r\n const mention = this.getMentions(this.props, questionName);\r\n let choice = null;\r\n\r\n if (mention?.length) {\r\n choice = answers.find((answer) => answer.value === mention[0].value);\r\n } else if (!isNullOrEmpty(props.language)) {\r\n choice = answers.find((answer) => answer.value === props.language);\r\n } else {\r\n answers[0];\r\n }\r\n\r\n if (choice) {\r\n this.setMentions(\r\n props,\r\n variable.name,\r\n (mentions) => mentions.set(choice.value),\r\n null,\r\n true,\r\n );\r\n this.props.dispatch(changeLanguage(choice.value));\r\n }\r\n break;\r\n }\r\n case QuestionType.RespondentTimeZone: {\r\n const answers = variable.choiceList || [];\r\n const choice = answers.find((answer) => answer.value === props.timeZone);\r\n if (choice !== undefined) {\r\n this.setMentions(\r\n props,\r\n variable.name,\r\n (mentions) => mentions.set(choice.value),\r\n null,\r\n true,\r\n );\r\n }\r\n break;\r\n }\r\n default: {\r\n if (!this.hasMentions(props)) {\r\n this.setDefaultChoices();\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n\r\n maxValue = () => 1;\r\n\r\n componentDidUpdate(prevProps: Props, prevState: State) {\r\n super.componentDidUpdate(prevProps, prevState);\r\n const { question, language } = this.props;\r\n const [variable] = question.variables;\r\n const mentions = this.getMentions(this.props);\r\n\r\n if (question.type === QuestionType.RespondentLanguage && language !== prevProps.language) {\r\n this.setMentions(this.props, variable.name, (m) => m.set(language));\r\n }\r\n\r\n mentions.forEach((mention) => {\r\n const isValidChoice = this.isValidChoice(mention.value);\r\n const isChoiceNoLongerVisible = this.isChoiceNoLongerVisible(mention.value, prevProps);\r\n if (isValidChoice && isChoiceNoLongerVisible) {\r\n this.setMentions(this.props, variable.name, (m) => m.pull(mention.value));\r\n }\r\n });\r\n }\r\n\r\n setDefaultChoices = () => {\r\n const { sequencedVariables } = this.props;\r\n const [variable] = sequencedVariables;\r\n const { choiceList = [] } = variable;\r\n const defaultVisibleChoices = choiceList.filter(\r\n (choice) => getSettingBoolean(choice, \"Default\") && isVisible(choice),\r\n );\r\n this.setChoicesAsMentions(variable, defaultVisibleChoices);\r\n };\r\n\r\n getValue() {\r\n return this.getMentionValue(this.props) || \"\";\r\n }\r\n\r\n getDropdownText(question: QuestionModel) {\r\n const { theme, language } = this.props;\r\n const value = this.getValue();\r\n const [variable] = question.variables;\r\n const choice = getChoice(variable, value);\r\n if (!choice) {\r\n return translate(theme, \"DropdownEmptyAnswer\", language);\r\n }\r\n return translate(choice, \"TEXT\", language);\r\n }\r\n\r\n onSelectedChanged = (values: string[]) => {\r\n const [value] = values;\r\n const { question, executeUpdateForIdAfterSelection } = this.props;\r\n const [variable] = question.variables;\r\n\r\n if (question.type === QuestionType.RespondentLanguage) {\r\n if (variable.choiceList.some((c) => c.value === value)) {\r\n this.props.dispatch(changeLanguage(value));\r\n }\r\n }\r\n if (question.type === QuestionType.RespondentTimeZone) {\r\n this.props.dispatch(respondentSetTimeZone(value));\r\n }\r\n if (isNullOrEmpty(value)) {\r\n this.setMentions(this.props, variable.name, (mentions) => mentions.clear());\r\n this.disableAndResetHybridQuestionMapppedCell(executeUpdateForIdAfterSelection);\r\n return;\r\n }\r\n\r\n const selectedChoice = getChoice(variable, value);\r\n const choiceHasOpenEnd = this.choiceHasOpenEnd(selectedChoice);\r\n const openEndValue =\r\n choiceHasOpenEnd && !isNullOrEmpty(this.state.openEndValue)\r\n ? this.state.openEndValue.trim()\r\n : undefined;\r\n\r\n this.setMentions(this.props, variable.name, (mentions) =>\r\n mentions.set(value, openEndValue),\r\n );\r\n\r\n this.disableAndResetHybridQuestionMapppedCell(executeUpdateForIdAfterSelection);\r\n };\r\n\r\n choiceHasOpenEnd = (choice: ChoiceModel): boolean =>\r\n !isNullOrEmpty(choice.value) && hasOpenEnd(choice);\r\n\r\n validate(): ValidationResultModel {\r\n // Bypass old validation only for standalone dropdown (not in hyrbid grid)\r\n if (!this.props.question.parent) {\r\n return new ValidationBuilder().build();\r\n }\r\n return super.validate();\r\n }\r\n\r\n onOpenEndChange = (choice: ChoiceModel, text: string) => {\r\n this.setState({ openEndValue: this.truncateOpenEnd(choice, text) });\r\n };\r\n\r\n onOpenEndBlur = (choice: ChoiceModel) => {\r\n this.setState((prevState, props) => {\r\n const { question } = props;\r\n const [variable] = question.variables;\r\n const openEnd = isNullOrEmpty(prevState.openEndValue)\r\n ? prevState.openEndValue\r\n : prevState.openEndValue.trim();\r\n this.setMentions(props, variable.name, (mentions) =>\r\n mentions.removeValue(choice.value).add(choice.value, openEnd),\r\n );\r\n return {\r\n ...prevState,\r\n openEndValue: openEnd,\r\n };\r\n });\r\n };\r\n\r\n getOpenEndChoice(props: Props) {\r\n const { question } = props;\r\n const value = this.getValue();\r\n const [variable] = question.variables;\r\n if (isNullOrEmpty(value) || !variable) {\r\n return undefined;\r\n }\r\n return getChoice(variable, value);\r\n }\r\n\r\n renderQuestion(question: QuestionModel) {\r\n const { theme, language, sequencedVariables, isDisabled } = this.props;\r\n const openEndChoice = this.getOpenEndChoice(this.props);\r\n\r\n const [variable] = sequencedVariables;\r\n const emptyAnswerOption: Option = {\r\n id: `${variable.elementId}_EMPTY`,\r\n label: removeHtmlTags(translate(theme, \"DropdownEmptyAnswer\", language)),\r\n value: \"\",\r\n };\r\n\r\n const options: Option[] = variable.choiceList.map((choice) => ({\r\n id: choice.elementId,\r\n label: translate(choice, \"TEXT\", language),\r\n value: choice.value,\r\n isNonInteractive: isNullOrEmpty(choice.value),\r\n }));\r\n\r\n const inputSize = size(question);\r\n const questionId = question?.parent?.elementId ?? question?.elementId;\r\n\r\n return (\r\n <>\r\n \r\n {openEndChoice && (\r\n \r\n )}\r\n \r\n );\r\n }\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\nimport * as Mixins from \"../../../theme/Mixins\";\r\nimport { alpha } from \"../../../theme/Mixins\";\r\n\r\nconst railHeight = ({ theme, isHybridGrid }) =>\r\n isHybridGrid ? theme.SliderRailHeightSmall : theme.SliderRailHeightLarge;\r\nconst handleSize = ({ theme, isHybridGrid }) =>\r\n isHybridGrid ? theme.SliderHandleSizeSmall : theme.SliderHandleSizeLarge;\r\n\r\nexport default createUseStyles({\r\n labelContainer: {\r\n composes: \"slider__label-container\",\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n },\r\n label: {\r\n composes: \"slider__label\",\r\n flex: \"auto\",\r\n marginTop: 16,\r\n color: ({ theme }) => Mixins.foregroundColor(theme, Mixins.wrapperBackgroundColor(theme)),\r\n },\r\n labelLeft: {\r\n composes: \"slider__label--left\",\r\n textAlign: \"left\",\r\n },\r\n labelMiddle: {\r\n composes: \"slider__label--middle\",\r\n textAlign: \"center\",\r\n },\r\n labelRight: {\r\n composes: \"slider__label--right\",\r\n textAlign: \"right\",\r\n },\r\n sliderContainer: {\r\n composes: \"slider__container\",\r\n marginLeft: ({ isHybridGrid }) => (isHybridGrid ? 10 : 0),\r\n marginRight: ({ isHybridGrid }) => (isHybridGrid ? 10 : 0),\r\n marginTop: ({ theme, hasImages }) => (hasImages ? 90 : Mixins.getSpacing(theme, 0, 30)),\r\n maxWidth: ({ theme, size }) => Mixins.inputMaxWidth(theme, size),\r\n minWidth: ({ theme, size }) => Mixins.inputMinWidth(theme, size),\r\n padding: [[0, 5]],\r\n },\r\n slider: {\r\n composes: \"slider__compound\",\r\n position: \"relative\",\r\n width: \"100%\",\r\n height: \"6em\",\r\n },\r\n disabled: {\r\n opacity: 0.5,\r\n pointerEvents: \"none\",\r\n },\r\n rail: {\r\n backgroundColor: ({ theme }) => theme.ControlBackground,\r\n borderColor: ({ theme }) => Mixins.borderColor(theme, theme.ControlBackground),\r\n borderRadius: ({ theme }) => theme.BorderRadius / 4,\r\n borderStyle: \"solid\",\r\n borderWidth: ({ theme }) => theme.BorderWidth,\r\n bottom: 0,\r\n composes: \"slider__rail\",\r\n cursor: \"pointer\",\r\n height: railHeight,\r\n left: -5,\r\n margin: [[\"auto\", 0]],\r\n marginLeft: ({ theme }) => -theme.BorderWidth,\r\n position: \"absolute\",\r\n right: -5,\r\n top: 0,\r\n zIndex: 1,\r\n },\r\n handleContainer: {\r\n composes: \"slider__handle-container\",\r\n },\r\n handle: {\r\n align: \"center\",\r\n backgroundColor: ({ theme }) => theme.SecondaryColor,\r\n border: 0,\r\n borderColor: ({ theme }) => Mixins.borderColor(theme, theme.SecondaryColor),\r\n borderRadius: \"50%\",\r\n borderStyle: \"solid\",\r\n borderWidth: ({ theme }) => theme.BorderWidth,\r\n bottom: 0,\r\n composes: \"slider__handle\",\r\n cursor: \"pointer\",\r\n height: ({ theme, isHybridGrid }) =>\r\n handleSize({ theme, isHybridGrid }) - theme.BorderWidth,\r\n left: ({ percent }) => `${percent}%`,\r\n margin: [[\"auto\", 0]],\r\n marginLeft: ({ theme, isHybridGrid }) =>\r\n (handleSize({ theme, isHybridGrid }) / 2 + theme.BorderWidth) * -1,\r\n outline: \"2px solid transparent\",\r\n position: \"absolute\",\r\n textAlign: \"center\",\r\n top: 0,\r\n transition: \"background 200ms, box-shadow 200ms, outline-color 200ms\",\r\n userSelect: \"none\",\r\n width: ({ theme, isHybridGrid }) => handleSize({ theme, isHybridGrid }) - theme.BorderWidth,\r\n zIndex: 2,\r\n\r\n \"&:focus\": {\r\n outlineColor: ({ theme }) => alpha(theme.SecondaryColor, 0.5),\r\n outlineStyle: \"solid\",\r\n outlineWidth: \"22px\",\r\n },\r\n },\r\n handleActive: {\r\n composes: \"slider__handle--active\",\r\n backgroundColor: ({ theme }) =>\r\n Mixins.darken(theme.SecondaryColor, theme.ActiveHighlightValue),\r\n },\r\n handleLabelContainer: {\r\n bottom: \"100%\",\r\n color: \"transparent\",\r\n composes: \"slider__handle-label-container\",\r\n display: \"inline-block\",\r\n left: 0,\r\n marginLeft: \"50%\",\r\n position: \"absolute\",\r\n transform: \"translateX(-50%)\",\r\n },\r\n handleLabelContainerRegular: {\r\n composes: \"slider__handle-label-container--regular\",\r\n marginBottom: 16,\r\n padding: [[5, 16]],\r\n },\r\n handleLabelContainerHybridGrid: {\r\n composes: \"slider__handle-label-container--hybrid-grid\",\r\n marginBottom: 10,\r\n paddingTop: 2,\r\n paddingBottom: 0,\r\n paddingLeft: 8,\r\n paddingRight: 6,\r\n },\r\n handleLabelText: {\r\n color: ({ theme }) =>\r\n Mixins.foregroundColor(\r\n theme,\r\n Mixins.compoundBackgroundColor(theme, theme.PrimaryColor),\r\n ),\r\n composes: \"slider__handle-label-text\",\r\n left: 0,\r\n position: \"absolute\",\r\n textAlign: \"center\",\r\n top: 0,\r\n zIndex: 4,\r\n },\r\n handleLabelTextDiscrete: {\r\n color: ({ theme }) => Mixins.foregroundColor(theme, Mixins.wrapperBackgroundColor(theme)),\r\n composes: \"slider__handle-label-text-discrete\",\r\n position: \"relative\",\r\n textAlign: \"center\",\r\n zIndex: 4,\r\n top: \"110%\",\r\n },\r\n handleLabelTextRegular: {\r\n composes: \"slider__handle-label-text--regular\",\r\n fontSize: \"1rem\",\r\n padding: [[5, 16]],\r\n },\r\n handleLabelTextHybridGrid: {\r\n composes: \"slider__handle-label-text--hybrid-grid\",\r\n fontSize: 14,\r\n paddingTop: 2,\r\n paddingBottom: 0,\r\n paddingLeft: 8,\r\n paddingRight: 0,\r\n },\r\n handleLabelImageContainer: {\r\n boxSizing: \"border-box\",\r\n composes: \"slider__handle-label-image-container\",\r\n height: 84,\r\n margin: \"auto\",\r\n position: \"relative\",\r\n width: 150,\r\n },\r\n handleLabelImage: {\r\n backgroundImage: ({ imageUrl }) => `url(\"${imageUrl}\")`,\r\n backgroundPosition: \"center\",\r\n backgroundRepeat: \"no-repeat\",\r\n backgroundSize: \"contain\",\r\n bottom: 0,\r\n composes: \"slider__handle-label-image\",\r\n left: 0,\r\n position: \"absolute\",\r\n right: 0,\r\n top: 0,\r\n zIndex: 2,\r\n },\r\n handleLabelBackground: {\r\n align: \"center\",\r\n background: ({ theme, isDiscrete }) =>\r\n Mixins.alpha(isDiscrete ? theme.ControlBackground : theme.PrimaryColor),\r\n borderRadius: ({ theme }) => theme.BorderRadius / 2,\r\n bottom: 0,\r\n boxShadow: ({ theme, isDiscrete }) =>\r\n `0 0 0 ${theme.BorderWidth}px ${Mixins.borderColor(\r\n theme,\r\n isDiscrete ? theme.ControlBackground : theme.PrimaryColor,\r\n )}`,\r\n composes: \"slider__handle-label-background\",\r\n left: 0,\r\n opacity: ({ theme }) => theme.ControlAlpha,\r\n position: \"absolute\",\r\n right: 0,\r\n top: 0,\r\n zIndex: 2,\r\n },\r\n handleLabelArrowBorder: {\r\n border: \"8px solid transparent\",\r\n borderTopColor: ({ theme, isDiscrete }) =>\r\n Mixins.borderColor(theme, isDiscrete ? theme.ControlBackground : theme.PrimaryColor),\r\n content: '\"\"',\r\n left: \"50%\",\r\n marginLeft: -8,\r\n marginTop: ({ theme }) => theme.BorderWidth - 2,\r\n opacity: ({ theme }) => theme.ControlAlpha,\r\n position: \"absolute\",\r\n top: \"100%\",\r\n zIndex: 1,\r\n },\r\n handleLabelArrow: {\r\n border: \"8px solid transparent\",\r\n borderTopColor: ({ theme, isDiscrete }) =>\r\n isDiscrete ? theme.ControlBackground : theme.PrimaryColor,\r\n left: \"50%\",\r\n marginLeft: -8,\r\n marginTop: -2,\r\n opacity: ({ theme }) => theme.ControlAlpha,\r\n position: \"absolute\",\r\n top: \"100%\",\r\n zIndex: 3,\r\n },\r\n tickContainer: {\r\n composes: \"slider__tick-container\",\r\n position: \"absolute\",\r\n top: 0,\r\n bottom: 0,\r\n left: 0,\r\n right: 0,\r\n margin: [[\"auto\", 0]],\r\n height: 10,\r\n cursor: \"default\",\r\n userSelect: \"none\",\r\n zIndex: 0,\r\n },\r\n tick: {\r\n composes: \"slider__tick\",\r\n position: \"absolute\",\r\n marginLeft: -0.5,\r\n top: \"100%\",\r\n marginTop: ({ theme }) => theme.BorderWidth,\r\n width: 1,\r\n height: 13,\r\n left: ({ percent }) => `${percent}%`,\r\n backgroundColor: ({ theme }) => Mixins.borderColor(theme, theme.ControlBackground),\r\n },\r\n tickLabel: {\r\n composes: \"slider__tick-label\",\r\n cursor: \"pointer\",\r\n position: \"absolute\",\r\n top: \"100%\",\r\n marginTop: 9,\r\n padding: [[9, 0]],\r\n overflowWrap: \"anywhere\",\r\n textAlign: \"center\",\r\n color: ({ theme }) => Mixins.foregroundColor(theme, Mixins.wrapperBackgroundColor(theme)),\r\n },\r\n tickLabelRegular: {\r\n composes: \"slider__tick-label--regular\",\r\n fontSize: 18,\r\n lineHeight: \"18px\",\r\n marginLeft: ({ count, percent }) => {\r\n if (percent === 0 && count > 1) {\r\n return -20;\r\n }\r\n if (percent === 100 && count > 1) {\r\n return 4;\r\n }\r\n return `${-(100 / count) / 2}%`;\r\n },\r\n width: ({ count, percent }) => {\r\n if ([0, 100].includes(percent) && count > 1) {\r\n return `${90 / count / 2}%`;\r\n }\r\n return `${100 / count}%`;\r\n },\r\n left: ({ count, percent }) => {\r\n if (percent === 100 && count > 1) {\r\n return `${percent - 70 / count / 2}%`;\r\n }\r\n return `${percent}%`;\r\n },\r\n },\r\n tickLabelHybridGrid: {\r\n composes: \"slider__tick-label--hybrid-grid\",\r\n fontSize: 14,\r\n lineHeight: \"14px\",\r\n marginLeft: ({ count }) => `${-(100 / count) / 2}%`,\r\n width: ({ count }) => `${100 / count}%`,\r\n left: ({ percent }) => `${percent}%`,\r\n },\r\n noAnswer: {\r\n composes: \"slider__no-answer\",\r\n marginTop: 6,\r\n outline: \"none\",\r\n \"& > div\": {\r\n flex: \"initial\",\r\n },\r\n },\r\n noAnswerLabel: {\r\n composes: \"slider__no-answer__label\",\r\n marginLeft: 10,\r\n userSelect: \"none\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport classnames from \"classnames\";\r\nimport { Slider, Rail, Handles, Ticks } from \"react-compound-slider\";\r\nimport useStyles from \"./SliderRenderer.styles\";\r\nimport { RendererProps } from \"../BaseRenderer\";\r\nimport { LabelPosition } from \"../../../models/enums/LabelPosition\";\r\nimport { RecalledText } from \"../../../containers/shared/RecalledText\";\r\nimport useTranslatable from \"../../../hooks/useTranslatable\";\r\nimport Button from \"../../shared/Button\";\r\nimport { isNullOrEmpty } from \"../../../utils\";\r\nimport { Translatable } from \"../../../models/Translatable\";\r\nimport { ElementWithSettings } from \"../../../models/ElementWithSettings\";\r\nimport { ButtonChoice } from \"../../shared/ButtonChoice\";\r\nimport { CheckBoxIcon } from \"../../shared/CheckBoxIcon\";\r\nimport InputWrapper from \"../../shared/InputWrapper\";\r\nimport useQuestion from \"../../../hooks/useQuestion\";\r\nimport { size } from \"../../../models/utilities/questionUtilities\";\r\nimport { getAriaLabelledByFromId } from \"../../../utils/WCAGHelper\";\r\n\r\ninterface Props extends RendererProps {\r\n value: number;\r\n domain: number[];\r\n stepValue: number;\r\n hasValueSet: boolean;\r\n hasNoAnswer: boolean;\r\n noAnswerLabel: string;\r\n decimals?: number;\r\n displayTicks: boolean;\r\n tickValues?: number[];\r\n onChange?(value: number[]): void;\r\n onClearAnswer?(): void;\r\n onToggleNoAnswer?(): void;\r\n displayClearButton: boolean;\r\n displayNoAnswer?: boolean;\r\n isDiscrete: boolean;\r\n discreteValues?: { [value: number]: DiscreteValue };\r\n stepDecimalPlaces: number;\r\n tickDecimalPlaces: number;\r\n defaultPosition?: number;\r\n hasImages?: boolean;\r\n isHybridGrid?: boolean;\r\n elementId: string;\r\n isDisabled?: boolean;\r\n}\r\n\r\nexport interface DiscreteValue extends ElementWithSettings, Translatable {\r\n elementId: string;\r\n choiceValueCode: string;\r\n}\r\n\r\nfunction onChoiceKeyDown(event, onToggleNoAnswer) {\r\n if (event.target !== event.currentTarget) {\r\n return;\r\n }\r\n if (event.key === \" \") {\r\n onToggleNoAnswer();\r\n event.preventDefault();\r\n }\r\n}\r\n\r\nfunction Handle({\r\n handle: { id, value, percent },\r\n domain,\r\n hasValueSet,\r\n getHandleProps,\r\n isDiscrete,\r\n discreteValues,\r\n decimalPlaces,\r\n defaultPosition,\r\n isHybridGrid,\r\n onChange,\r\n}) {\r\n const [active, setActive] = React.useState(false);\r\n const [min, max] = domain;\r\n\r\n const theme = useTheme();\r\n const classes = useStyles({\r\n theme,\r\n percent: hasValueSet ? percent : defaultPosition,\r\n isHybridGrid,\r\n });\r\n const onFocus = () => {\r\n if (!hasValueSet) {\r\n onChange([value]);\r\n }\r\n setActive(true);\r\n };\r\n\r\n return (\r\n setActive(false)}\r\n onMouseOut={() => setActive(false)}\r\n >\r\n {hasValueSet && (\r\n setActive(true)}\r\n className={classnames(\r\n classes.handleLabelContainer,\r\n isHybridGrid && !isDiscrete\r\n ? classes.handleLabelContainerHybridGrid\r\n : classes.handleLabelContainerRegular,\r\n )}\r\n >\r\n \r\n \r\n )}\r\n \r\n );\r\n}\r\n\r\nfunction HandleLabel({ discreteValues, value, isHybridGrid, decimalPlaces, isDiscrete }) {\r\n const imageUrl = useTranslatable(discreteValues && discreteValues[value], \"ImageUrl\");\r\n if (!isNullOrEmpty(imageUrl)) {\r\n return (\r\n \r\n );\r\n }\r\n if (isDiscrete) {\r\n return ;\r\n }\r\n return (\r\n \r\n );\r\n}\r\n\r\nfunction StandardHandleLabel({ value, decimalPlaces, isHybridGrid }) {\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n const displayValue = value.toFixed(decimalPlaces);\r\n return (\r\n <>\r\n
\r\n {!isHybridGrid && }\r\n \r\n {displayValue}\r\n
\r\n {displayValue} {/* This is a placeholder to calculate the container size */}\r\n \r\n );\r\n}\r\n\r\nfunction DiscreteHandleLabel({ value, isHybridGrid }) {\r\n const alt = useTranslatable(value, \"TEXT\") || value.choiceValueCode;\r\n const theme = useTheme();\r\n const classes = useStyles({ theme, isDiscrete: true });\r\n return (\r\n <>\r\n
\r\n {!isHybridGrid && }\r\n \r\n
{alt}
\r\n
\r\n {alt}\r\n \r\n );\r\n}\r\n\r\nfunction DiscreteHandleLabelWithImage({ value, isHybridGrid }) {\r\n const imageUrl = useTranslatable(value, \"ImageUrl\");\r\n const alt = useTranslatable(value, \"TEXT\") || value.choiceValueCode;\r\n const theme = useTheme();\r\n const classes = useStyles({ theme, imageUrl, isDiscrete: true });\r\n return (\r\n <>\r\n
\r\n {!isHybridGrid && }\r\n \r\n
\r\n
{alt}
\r\n
\r\n {alt.length < 10 ? (\r\n
{alt}
\r\n ) : (\r\n
{alt.concat(alt).substring(0, (alt.length * 2) / 1.6)}
\r\n )}\r\n \r\n );\r\n}\r\n\r\nfunction HandleLabelArrow({ isDiscrete }: { isDiscrete?: boolean }) {\r\n const theme = useTheme();\r\n const classes = useStyles({ theme, isDiscrete });\r\n return (\r\n <>\r\n
\r\n
\r\n \r\n );\r\n}\r\n\r\nfunction Tick({ tick, onChange, count, isDiscrete, discreteValues, decimalPlaces, isHybridGrid }) {\r\n const { percent, value } = tick;\r\n const theme = useTheme();\r\n const classes = useStyles({ theme, percent, count });\r\n\r\n const id = isDiscrete ? discreteValues[value]?.elementId : null;\r\n const discreteValue = isDiscrete ? discreteValues[value] : undefined;\r\n const discreteValueText =\r\n useTranslatable(discreteValue, \"TEXT\") ||\r\n (discreteValue !== undefined && discreteValue.choiceValueCode) ||\r\n value;\r\n const displayValue = isDiscrete ? discreteValueText : value.toFixed(decimalPlaces);\r\n\r\n return (\r\n <>\r\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}\r\n
onChange([value])}>\r\n
\r\n \r\n
\r\n \r\n );\r\n}\r\n\r\nfunction Label({ text, position }) {\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n const positionalClasses = {\r\n [LabelPosition.Left]: classes.labelLeft,\r\n [LabelPosition.Middle]: classes.labelMiddle,\r\n [LabelPosition.Right]: classes.labelRight,\r\n };\r\n if (isNullOrEmpty(text)) {\r\n return null;\r\n }\r\n return (\r\n (\r\n \r\n )}\r\n />\r\n );\r\n}\r\n\r\nfunction ClearButton({ theme, question, onClearAnswer, isDisabled = false }) {\r\n const defaultText = useTranslatable(theme, \"QuestionClearButton\") || \"Reset\";\r\n const text = useTranslatable(question, \"ResetButtonText\") || defaultText;\r\n\r\n return (\r\n onClearAnswer()}\r\n />\r\n );\r\n}\r\n\r\nfunction CompoundSlider(props: Props) {\r\n const {\r\n value,\r\n domain,\r\n hasValueSet,\r\n stepValue,\r\n onChange,\r\n displayTicks,\r\n tickValues,\r\n isDiscrete,\r\n discreteValues,\r\n stepDecimalPlaces,\r\n tickDecimalPlaces,\r\n defaultPosition,\r\n hasImages,\r\n isHybridGrid,\r\n elementId,\r\n isDisabled,\r\n gridRenderedRowIndex,\r\n gridRenderedColumnIndex,\r\n } = props;\r\n const theme = useTheme();\r\n const question = useQuestion();\r\n const questionId = question?.parent?.elementId ?? question?.elementId;\r\n const questionType = question?.parent?.type ?? question?.type;\r\n\r\n const sliderSize = isHybridGrid ? size(question) : \"Full\";\r\n const classes = useStyles({ theme, size: sliderSize, hasImages, isHybridGrid });\r\n\r\n const ariaAttributes = {};\r\n\r\n if (isHybridGrid) {\r\n ariaAttributes[\"aria-labelledby\"] = getAriaLabelledByFromId(\r\n question,\r\n questionId,\r\n `${questionType}_SLIDER`,\r\n gridRenderedColumnIndex + 1,\r\n gridRenderedRowIndex + 1,\r\n );\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n {({ getRailProps }) => (\r\n \r\n )}\r\n \r\n \r\n {({ handles, getHandleProps }) => (\r\n
\r\n {handles.map((handle) => (\r\n \r\n ))}\r\n
\r\n )}\r\n
\r\n {displayTicks && (\r\n \r\n {({ ticks }) => (\r\n
\r\n {ticks.map((tick) => (\r\n \r\n ))}\r\n
\r\n )}\r\n
\r\n )}\r\n \r\n
\r\n );\r\n}\r\n\r\nfunction NoAnswer(props: Props) {\r\n const {\r\n displayNoAnswer,\r\n hasNoAnswer,\r\n onToggleNoAnswer,\r\n isHybridGrid,\r\n noAnswerLabel,\r\n isDisabled = false,\r\n } = props;\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n\r\n if (!displayNoAnswer) {\r\n return null;\r\n }\r\n\r\n if (isHybridGrid) {\r\n return (\r\n onChoiceKeyDown(event, onToggleNoAnswer)\r\n }\r\n onClick={isDisabled ? undefined : onToggleNoAnswer}\r\n >\r\n \r\n {noAnswerLabel}\r\n
\r\n );\r\n }\r\n\r\n return (\r\n onChoiceKeyDown(event, onToggleNoAnswer)}\r\n onSelect={isDisabled ? undefined : onToggleNoAnswer}\r\n selected={hasNoAnswer}\r\n label={noAnswerLabel}\r\n className={classes.noAnswer}\r\n />\r\n );\r\n}\r\n\r\nexport default function SliderRenderer(props: Props) {\r\n const {\r\n theme: surveyTheme,\r\n question,\r\n displayClearButton,\r\n onClearAnswer,\r\n isHybridGrid,\r\n isDisabled,\r\n } = props;\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n\r\n const leftLabel = useTranslatable(question, \"LeftLabel\");\r\n const middleLabel = useTranslatable(question, \"MiddleLabel\");\r\n const rightLabel = useTranslatable(question, \"RightLabel\");\r\n\r\n const slider = (\r\n <>\r\n \r\n
\r\n {!isHybridGrid &&
\r\n \r\n {displayClearButton && (\r\n \r\n )}\r\n \r\n );\r\n\r\n if (isHybridGrid)\r\n return (\r\n \r\n {slider}\r\n \r\n );\r\n\r\n return slider;\r\n}\r\n","import React from \"react\";\r\nimport { DispatchProp } from \"react-redux\";\r\nimport { intersection, isEmpty, range } from \"../../utils/lodash\";\r\nimport { BaseControl, ControlProps } from \"./BaseControl\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { CursorPosition } from \"../../models/enums/CursorPosition\";\r\nimport {\r\n getSettingString,\r\n getSettingBoolean,\r\n getSettingEnum,\r\n getSettingNumber,\r\n hasSetting,\r\n} from \"../../models/utilities/settingUtilities\";\r\nimport { getChoiceWithValue, decimalPlaces } from \"../../models/utilities/questionUtilities\";\r\nimport { getRendererProps } from \"../renderers/BaseRenderer\";\r\nimport { translate } from \"../../models/utilities/translationUtilities\";\r\nimport { QuestionType } from \"../../models/enums/QuestionType\";\r\nimport SliderRenderer, { DiscreteValue } from \"../renderers/v2/SliderRenderer\";\r\nimport { ElementWithSettings } from \"../../models/ElementWithSettings\";\r\nimport { VariableModel } from \"../../models/VariableModel\";\r\nimport { ChoiceModel } from \"../../models/ChoiceModel\";\r\nimport { isNullOrEmpty } from \"../../utils\";\r\nimport { isQuestionValidatedServerSide } from \"../../models/utilities/validationUtilities\";\r\nimport { ValidationBuilder } from \"../../models/builders/ValidationBuilder\";\r\nimport { ValidationOptionsModel } from \"../../models/ValidationOptionsModel\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\n\r\ninterface Props extends ControlProps, DispatchProp {}\r\n\r\ninterface State {\r\n value: number;\r\n}\r\n\r\nenum SliderType {\r\n Continuous = \"Continuous\",\r\n Discrete = \"Discrete\",\r\n}\r\n\r\nexport class SliderControl extends BaseControl {\r\n trackRef: Element;\r\n\r\n constructor(props: Props) {\r\n super(props);\r\n this.state = { value: 0 };\r\n }\r\n\r\n initializeQuestion(question: QuestionModel, props: Props): void {\r\n const [variable] = question.variables;\r\n // TODO: Duplicated code, needs refactoring\r\n if (this.isDiscrete(props)) {\r\n const defaultChoice = this.getChoices(props).find((choice) =>\r\n this.isElementDefault(choice),\r\n );\r\n if (defaultChoice !== undefined) {\r\n this.setMentions(props, variable.name, (mentions) =>\r\n mentions.set(defaultChoice.choiceValueCode),\r\n );\r\n }\r\n }\r\n super.initializeQuestion(question, props);\r\n this.setState({\r\n value: this.getValue(props),\r\n });\r\n }\r\n\r\n didUpdateMentions(question: QuestionModel, prevProps: Props) {\r\n super.didUpdateMentions(question, prevProps);\r\n // We should not change the slider's position if No Answer is checked.\r\n if (!this.noAnswer(this.props)) {\r\n this.setState({ value: this.getValue(this.props) });\r\n }\r\n }\r\n\r\n didUpdateVariables(sequencedVariables: VariableModel[], prevProps: Props) {\r\n super.didUpdateVariables(sequencedVariables, prevProps);\r\n const [variable] = sequencedVariables;\r\n const mentionValue = this.getMentionValue(this.props, variable.name);\r\n const shouldClearAnswer =\r\n !isNullOrEmpty(mentionValue) &&\r\n !variable.choiceList.some((choice) => choice.value === mentionValue);\r\n\r\n if (shouldClearAnswer) {\r\n this.onClearAnswer(this.props);\r\n }\r\n }\r\n\r\n getDisplayResetButtonSetting = (props: Props) =>\r\n getSettingBoolean(props.question, \"DisplayResetButton\");\r\n\r\n getCursorPositionSetting = (props: Props) =>\r\n getSettingEnum(props.question, CursorPosition, \"CursorPosition\");\r\n\r\n getDisplayTicksSetting = (props: Props) => getSettingBoolean(props.question, \"DisplayTicks\");\r\n\r\n getStepValueSetting = (props: Props) => {\r\n const defaultValue = 1;\r\n const stepSetting = getSettingNumber(props.question, \"StepValue\", defaultValue);\r\n return this.isDiscrete(props) || stepSetting === 0 ? defaultValue : stepSetting;\r\n };\r\n\r\n getTicksIntervalSetting = (props: Props) => {\r\n const defaultValue = 1;\r\n const intervalSetting = getSettingNumber(props.question, \"TicksInterval\", defaultValue);\r\n return this.isDiscrete(props) || intervalSetting === 0 ? defaultValue : intervalSetting;\r\n };\r\n\r\n getColumnNoAnswerLabel = (props: Props) => {\r\n const { variableNames, parent } = props.question;\r\n if (!parent || parent.type !== QuestionType.HybridGrid) {\r\n return undefined;\r\n }\r\n const column = parent.columns.find(\r\n (parentColumn) =>\r\n !isEmpty(\r\n intersection(\r\n variableNames,\r\n parentColumn.variables.map((variable) => variable.name),\r\n ),\r\n ),\r\n );\r\n return translate(column, \"NoAnswerLabel\", props.language);\r\n };\r\n\r\n getDisplayNoAnswerSetting = (props: Props) =>\r\n getSettingBoolean(props.question, \"DisplayNoAnswer\");\r\n\r\n getValue(props: Props) {\r\n const [variable] = props.question.variables;\r\n const mention = this.getMention(props, variable.name);\r\n if (this.noAnswer(props) || !mention) {\r\n return this.getDefaultValue(props);\r\n }\r\n\r\n // TODO: Duplicated code, needs refactoring\r\n if (this.isDiscrete(this.props)) {\r\n const choice = this.getChoices(props).find((c) => c.choiceValueCode === mention.value);\r\n if (choice) {\r\n return choice.value;\r\n }\r\n return this.getDefaultValue(props);\r\n }\r\n\r\n const [min, max] = this.getBoundaries(props);\r\n return Math.min(max, Math.max(min, Number.parseFloat(mention.value)));\r\n }\r\n\r\n getChoices(props: Props) {\r\n const [variable] = props.sequencedVariables;\r\n const choices = variable.choiceList\r\n .filter((choice) => this.isElementVisible(choice))\r\n .filter((choice) => this.hasChoiceValue(choice))\r\n .map((choice, index) => {\r\n const { elementId, name, value, translatedTexts, settings } = choice;\r\n return {\r\n elementId,\r\n name,\r\n value: index + 1,\r\n choiceValueCode: value,\r\n translatedTexts,\r\n settings,\r\n };\r\n });\r\n return choices;\r\n }\r\n\r\n getDiscreteValues(props: Props): { [value: string]: DiscreteValue } {\r\n const choices = this.getChoices(props);\r\n const discreteValues = choices.reduce((acc, next) => {\r\n const { value, elementId, name, choiceValueCode, translatedTexts } = next;\r\n return {\r\n ...acc,\r\n [value]: {\r\n elementId,\r\n name,\r\n choiceValueCode,\r\n translatedTexts,\r\n },\r\n };\r\n }, {});\r\n return discreteValues;\r\n }\r\n\r\n getBoundaries(props: Props) {\r\n const isDiscrete = this.isDiscrete(props);\r\n const [minValue, maxValue] = isDiscrete\r\n ? [1, this.getChoices(props).length]\r\n : [Number.parseFloat(props.min), Number.parseFloat(props.max)];\r\n\r\n const min = Number.isNaN(minValue) ? 0 : minValue;\r\n const max = Number.isNaN(maxValue) ? 0 : maxValue;\r\n\r\n // TODO: What to do with a discrete slider that has only ONE choice?\r\n const overrideMax = !isDiscrete && max <= min;\r\n return [min, overrideMax ? min + this.getStepValueSetting(props) : max];\r\n }\r\n\r\n isElementVisible(element: ElementWithSettings) {\r\n return !hasSetting(element, \"Visible\") || getSettingBoolean(element, \"Visible\");\r\n }\r\n\r\n isElementDefault(element: ElementWithSettings) {\r\n return getSettingBoolean(element, \"Default\");\r\n }\r\n\r\n hasChoiceValue(choice: ChoiceModel) {\r\n return !isNullOrEmpty(choice.value);\r\n }\r\n\r\n getDefaultValue(props: Props) {\r\n if (this.isDiscrete(props)) {\r\n const defaultChoice = this.getChoices(props).find((choice) =>\r\n this.isElementDefault(choice),\r\n );\r\n if (defaultChoice) {\r\n return defaultChoice.value;\r\n }\r\n }\r\n if (hasSetting(props.question, \"DefaultValue\")) {\r\n const defaultValue = getSettingNumber(props.question, \"DefaultValue\");\r\n if (defaultValue) {\r\n return defaultValue;\r\n }\r\n }\r\n const [min, max] = this.getBoundaries(props);\r\n switch (this.getCursorPositionSetting(props)) {\r\n case CursorPosition.Hidden:\r\n case CursorPosition.Middle: {\r\n const middle = (max - min) / 2;\r\n const percent = (middle - min) / (max - min);\r\n const step = this.getStepValueSetting(props);\r\n return step * Math.round((percent * (max - min)) / step) + min;\r\n }\r\n case CursorPosition.Right:\r\n return max;\r\n case CursorPosition.Left:\r\n default:\r\n return min;\r\n }\r\n }\r\n\r\n getDefaultPosition(props: Props) {\r\n switch (this.getCursorPositionSetting(props)) {\r\n case CursorPosition.Right:\r\n return 100;\r\n case CursorPosition.Hidden:\r\n case CursorPosition.Middle:\r\n return 50;\r\n case CursorPosition.Left:\r\n default:\r\n return 0;\r\n }\r\n }\r\n\r\n getTickValues(props: Props): number[] {\r\n const [min, max] = this.getBoundaries(props);\r\n const interval = this.getTicksIntervalSetting(props);\r\n\r\n const maxAmount = 100;\r\n const amount = (max - min + 1) / interval;\r\n const increment = amount > maxAmount ? (max - min + 1) / maxAmount : interval;\r\n\r\n const values = Array.from(range(-max, -min + 1, increment))\r\n .reverse()\r\n .map((value) => -value);\r\n\r\n return values[0] === min ? values : [min, ...values];\r\n }\r\n\r\n onChange(value: number) {\r\n const [variable] = this.props.question.variables;\r\n let mentionChanged = false;\r\n if (this.isDiscrete(this.props)) {\r\n const discreteValues = this.getDiscreteValues(this.props);\r\n const discreteValue = discreteValues[value];\r\n if (discreteValue) {\r\n const { choiceValueCode } = discreteValue;\r\n if (choiceValueCode !== undefined) {\r\n mentionChanged = true;\r\n this.setMentions(this.props, variable.name, (mentions) =>\r\n mentions.set(choiceValueCode),\r\n );\r\n }\r\n }\r\n\r\n if (mentionChanged && this.props.executeUpdateForIdAfterSelection) {\r\n this.disableAndResetHybridQuestionMapppedCell(\r\n this.props.executeUpdateForIdAfterSelection,\r\n );\r\n }\r\n return;\r\n }\r\n\r\n if (this.props.executeUpdateForIdAfterSelection) {\r\n this.disableAndResetHybridQuestionMapppedCell(\r\n this.props.executeUpdateForIdAfterSelection,\r\n );\r\n }\r\n\r\n if (Number.isNaN(value)) {\r\n return;\r\n }\r\n this.setMentions(this.props, variable.name, (mentions) =>\r\n mentions.set(String(value.toFixed(this.getStepDecimalPlaces(this.props)))),\r\n );\r\n if (this.props.executeUpdateForIdAfterSelection) {\r\n this.disableAndResetHybridQuestionMapppedCell(\r\n this.props.executeUpdateForIdAfterSelection,\r\n );\r\n }\r\n }\r\n\r\n onClearAnswer = (props: Props) => {\r\n // TODO: Duplicated code, needs refactoring\r\n if (this.isDiscrete(props)) {\r\n const defaultChoice = this.getChoices(props).find((choice) =>\r\n this.isElementDefault(choice),\r\n );\r\n if (defaultChoice) {\r\n this.onChange(defaultChoice.value);\r\n } else {\r\n this.clearMentions(props);\r\n }\r\n } else if (hasSetting(props.question, \"DefaultValue\")) {\r\n const defaultValue = this.getDefaultValue(props);\r\n this.onChange(defaultValue);\r\n } else {\r\n this.clearMentions(props);\r\n }\r\n };\r\n\r\n clearMentions = (props: Props) => {\r\n const [variable] = props.question.variables;\r\n this.setMentions(props, variable.name, (mentions) => mentions.clear());\r\n };\r\n\r\n onToggleNoAnswer = (props: Props) => {\r\n const { question } = props;\r\n const [variable] = question.variables;\r\n if (!hasSetting(question, \"NoAnswerValue\")) {\r\n return;\r\n }\r\n const value = this.getMentionValue(props);\r\n const noAnswerValue = getSettingString(question, \"NoAnswerValue\");\r\n if (value !== noAnswerValue) {\r\n this.setMentions(props, variable.name, (mentions) => mentions.set(noAnswerValue));\r\n } else {\r\n this.onClearAnswer(props);\r\n }\r\n };\r\n\r\n noAnswer(props: Props) {\r\n const [variable] = props.question.variables;\r\n const mention = this.getMention(props, variable.name);\r\n if (mention === undefined) {\r\n return false;\r\n }\r\n return (\r\n this.getDisplayNoAnswerSetting(props) &&\r\n mention.value === this.getNoAnswerValueSetting(props)\r\n );\r\n }\r\n\r\n getNoAnswerValueSetting = (props: Props) =>\r\n getSettingString(props.question, \"NoAnswerValue\", \"0\");\r\n\r\n getNoAnswerLabel = (props: Props) => {\r\n return (\r\n this.getColumnNoAnswerLabel(props) ||\r\n translate(props.question, \"NoAnswerLabel\", props.language) ||\r\n translate(props.theme, \"SliderNoAnswer\", props.language)\r\n );\r\n };\r\n\r\n onChangeNoAnswer = () => {\r\n this.setState((prevState, props) => {\r\n const [variable] = props.question.variables;\r\n const newState = { ...prevState };\r\n const noAnswerValue = this.getNoAnswerValueSetting(props);\r\n if (this.noAnswer(props)) {\r\n this.setMentions(props, variable.name, (mentions) => mentions.set(noAnswerValue));\r\n } else {\r\n this.setMentions(props, variable.name, (mentions) =>\r\n mentions.set(String(newState.value)),\r\n );\r\n }\r\n return newState;\r\n });\r\n };\r\n\r\n displayValue = (props: Props, value: number) => {\r\n if (this.noAnswer(props)) {\r\n return undefined;\r\n }\r\n if (!this.isDiscrete(props)) {\r\n return String(value);\r\n }\r\n const choice = getChoiceWithValue(props.question, String(value));\r\n if (choice !== undefined) {\r\n return translate(choice, \"TEXT\", props.language);\r\n }\r\n return undefined;\r\n };\r\n\r\n isHybridGrid = (props: Props) => props.question.parent?.type === QuestionType.HybridGrid;\r\n\r\n hasImages = (props: Props) => {\r\n if (!this.isDiscrete(props)) {\r\n return false;\r\n }\r\n const {\r\n question: { variables },\r\n } = props;\r\n const [variable] = variables;\r\n const hasImages = variable?.choiceList\r\n .map((choice) => choice.translatedTexts?.[\"imageurl\"])\r\n .some((entry) => Object.keys(entry ?? {}).some((key) => !isNullOrEmpty(entry[key])));\r\n return hasImages;\r\n };\r\n\r\n getSliderType = (props: Props): SliderType => {\r\n const { question } = props;\r\n const isHybridGrid = this.isHybridGrid(props);\r\n const [key, valueDiscrete] = isHybridGrid\r\n ? [\"VarType\", \"0\"]\r\n : [\"Type\", SliderType.Discrete];\r\n\r\n const sliderType = getSettingBoolean(question, key, valueDiscrete)\r\n ? SliderType.Discrete\r\n : SliderType.Continuous;\r\n return sliderType;\r\n };\r\n\r\n isDiscrete = (props: Props) => SliderType.Discrete === this.getSliderType(props);\r\n\r\n getStepDecimalPlaces = (props: Props): number => {\r\n const value = getSettingString(props.question, \"StepValue\");\r\n return decimalPlaces(value);\r\n };\r\n\r\n getTickDecimalPlaces = (props: Props): number => {\r\n const value = getSettingString(props.question, \"TicksInterval\");\r\n return decimalPlaces(value);\r\n };\r\n\r\n hasNoAnswer = (props: Props) => {\r\n const { question } = props;\r\n const [variable] = question.variables;\r\n return (\r\n this.getMentionValue(props, variable.name) ===\r\n getSettingString(props.question, \"NoAnswerValue\")\r\n );\r\n };\r\n\r\n hasValueSet = (props: Props) => {\r\n const { question } = props;\r\n const [variable] = question.variables;\r\n const mention = this.getMention(props, variable.name);\r\n return mention && this.isValueValid(props, mention.value) && !this.hasNoAnswer(props);\r\n };\r\n\r\n isValueValid = (props: Props, value: string) => {\r\n return !this.isDiscrete(props) || this.isChoiceVisible(value, props);\r\n };\r\n\r\n validate(options?: ValidationOptionsModel): ValidationResultModel {\r\n const { question, useClientValidation } = this.props;\r\n\r\n if (isQuestionValidatedServerSide(question.type, useClientValidation)) {\r\n return new ValidationBuilder().build();\r\n }\r\n return super.validate(options);\r\n }\r\n\r\n renderQuestion() {\r\n const { state, props } = this;\r\n const [variable] = props.question.variables;\r\n return (\r\n this.onChange(value)}\r\n displayClearButton={this.getDisplayResetButtonSetting(props)}\r\n onClearAnswer={() => this.onClearAnswer(props)}\r\n onToggleNoAnswer={() => this.onToggleNoAnswer(props)}\r\n displayTicks={this.getDisplayTicksSetting(props)}\r\n tickValues={this.getTickValues(props)}\r\n displayNoAnswer={this.getDisplayNoAnswerSetting(props)}\r\n isDiscrete={this.isDiscrete(props)}\r\n discreteValues={this.getDiscreteValues(props)}\r\n stepDecimalPlaces={this.getStepDecimalPlaces(props)}\r\n tickDecimalPlaces={this.getTickDecimalPlaces(props)}\r\n defaultPosition={this.getDefaultPosition(props)}\r\n hasImages={this.hasImages(props)}\r\n isHybridGrid={this.isHybridGrid(props)}\r\n elementId={variable.elementId}\r\n isDisabled={props.isDisabled}\r\n />\r\n );\r\n }\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\n\r\nexport default createUseStyles({\r\n starRating: {\r\n composes: \"star-rating\",\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n touchAction: \"none\",\r\n userSelect: \"none\",\r\n MsUserSelect: \"none\",\r\n },\r\n starRatingSpacer: {\r\n composes: \"star-rating__spacer\",\r\n verticalAlign: \"middle\",\r\n height: ({ starHeight }) => starHeight,\r\n width: 7,\r\n },\r\n starRatingStar: ({ theme, splitWidth, starHeight }) => ({\r\n color: theme.PrimaryColor,\r\n verticalAlign: \"middle\",\r\n composes: \"star-rating__star\",\r\n height: starHeight,\r\n overflow: \"hidden\",\r\n position: \"relative\",\r\n width: splitWidth,\r\n }),\r\n disabled: {\r\n opacity: 0.5,\r\n pointerEvents: \"none\",\r\n },\r\n});\r\n","/* eslint-disable jsx-a11y/interactive-supports-focus */\r\n/* eslint-disable jsx-a11y/click-events-have-key-events */\r\nimport React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport classnames from \"classnames\";\r\nimport { range } from \"../../../utils/lodash\";\r\nimport { FontAwesomeIcon } from \"../../shared/FontAwesome\";\r\nimport useStyles from \"./StarRatingRenderer.styles\";\r\nimport { RendererProps } from \"../BaseRenderer\";\r\nimport Button from \"../../shared/Button\";\r\nimport useQuestion from \"../../../hooks/useQuestion\";\r\nimport { getAriaLabelledByFromId } from \"../../../utils/WCAGHelper\";\r\nimport { QuestionType } from \"../../../models/enums/QuestionType\";\r\n\r\ninterface Props extends RendererProps {\r\n containerRef: React.LegacyRef;\r\n setValue(value: number, reset?: boolean): void;\r\n starWidth?: number;\r\n starHeight?: number;\r\n value: number;\r\n split: number;\r\n maxValue: number;\r\n elementId: string;\r\n isDisabled?: boolean;\r\n}\r\n\r\nfunction getStars(props: Props) {\r\n const starCount = props.maxValue * (props.split || 1);\r\n return range(starCount);\r\n}\r\n\r\nexport default function StarRatingRenderer(props: Props) {\r\n const [hoveredStarValue, setHoveredStarValue] = React.useState(0);\r\n const {\r\n value,\r\n setValue,\r\n elementId,\r\n split = 1,\r\n starWidth = 24,\r\n starHeight = 24,\r\n isDisabled = false,\r\n gridRenderedRowIndex,\r\n gridRenderedColumnIndex,\r\n gridRendering,\r\n } = props;\r\n const theme = useTheme();\r\n const question = useQuestion();\r\n const questionId = question?.parent?.elementId ?? question?.elementId;\r\n\r\n const ariaAttributes = {};\r\n\r\n // Star rating is only available in Hybrid grid question i.e. we can use gridRendering\r\n if (gridRendering) {\r\n ariaAttributes[\"aria-labelledby\"] = getAriaLabelledByFromId(\r\n question,\r\n questionId,\r\n `${QuestionType.HybridGrid}_STARRATING`,\r\n gridRenderedColumnIndex + 1,\r\n gridRenderedRowIndex + 1,\r\n );\r\n }\r\n\r\n const splitWidth = starWidth / split;\r\n const classes = useStyles({ theme, starWidth, starHeight, splitWidth });\r\n\r\n return (\r\n // eslint-disable-next-line jsx-a11y/interactive-supports-focus\r\n setHoveredStarValue(0)}\r\n role=\"radiogroup\"\r\n {...ariaAttributes}\r\n >\r\n
\r\n {getStars(props).map((index) => {\r\n const starValue = (index + 1) / split;\r\n const isIconHighlighted =\r\n hoveredStarValue > 0 ? starValue <= hoveredStarValue : starValue <= value;\r\n\r\n const spacer = (\r\n setValue(starValue)}\r\n onMouseOver={isDisabled ? undefined : () => setHoveredStarValue(starValue)}\r\n />\r\n );\r\n\r\n return (\r\n \r\n {index % split === 0 && spacer}\r\n setValue(starValue)}\r\n onMouseOver={\r\n isDisabled ? undefined : () => setHoveredStarValue(starValue)\r\n }\r\n onKeyDown={(event) => {\r\n if (!isDisabled) {\r\n if (event.key === \" \") {\r\n event.preventDefault();\r\n setValue(starValue);\r\n }\r\n }\r\n }}\r\n className={`${classnames(classes.starRatingStar)} ${\r\n isDisabled ? classes.disabled : \"\"\r\n }`}\r\n aria-label={starValue.toString()}\r\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\r\n role=\"radio\"\r\n tabIndex={0}\r\n aria-checked={isIconHighlighted}\r\n >\r\n \r\n
\r\n {index % split === split - 1 && spacer}\r\n \r\n );\r\n })}\r\n
\r\n setValue(null, true)}\r\n disabled={isDisabled === true}\r\n />\r\n
\r\n );\r\n}\r\n","import React from \"react\";\r\nimport { DispatchProp } from \"react-redux\";\r\nimport { BaseControl, ControlProps } from \"./BaseControl\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport {\r\n getSettingBoolean,\r\n getSettingNumber,\r\n getSettingString,\r\n} from \"../../models/utilities/settingUtilities\";\r\nimport { isNullOrEmpty } from \"../../utils/index\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\nimport { ValidationBuilder } from \"../../models/builders/ValidationBuilder\";\r\nimport { getRendererProps } from \"../renderers/BaseRenderer\";\r\nimport { translate } from \"../../models/utilities/translationUtilities\";\r\nimport { ValidationOptionsModel } from \"../../models/ValidationOptionsModel\";\r\nimport StarRatingRenderer from \"../renderers/v2/StarRatingRenderer\";\r\nimport { isQuestionValidatedServerSide } from \"../../models/utilities/validationUtilities\";\r\nimport { VariableType } from \"../../models/enums/VariableType\";\r\n\r\ninterface Props extends ControlProps, DispatchProp {}\r\n\r\ninterface State {\r\n preview: number;\r\n down: boolean;\r\n value: number;\r\n starWidth?: number;\r\n starHeight?: number;\r\n}\r\n\r\nexport class StarRatingControl extends BaseControl {\r\n starRating: HTMLDivElement;\r\n\r\n constructor(props: Props) {\r\n super(props);\r\n this.state = {\r\n preview: -1,\r\n down: false,\r\n value: -1,\r\n };\r\n }\r\n\r\n initializeQuestion(question: QuestionModel, props: Props): void {\r\n super.initializeQuestion(question, props);\r\n this.setState({ value: this.getValue(props) });\r\n const image = new Image();\r\n image.onload = () => {\r\n this.setState({\r\n starWidth: image.width,\r\n starHeight: image.height,\r\n });\r\n };\r\n const imageUrl = translate(question, \"ImageUrl\", this.props.language);\r\n if (!isNullOrEmpty(imageUrl)) {\r\n image.src = imageUrl;\r\n }\r\n }\r\n\r\n didUpdateMentions(question: QuestionModel, prevProps: Props) {\r\n super.initializeQuestion(question, this.props);\r\n this.setState({ value: this.getValue(this.props) });\r\n }\r\n\r\n maxValue() {\r\n return super.maxValue() || 5;\r\n }\r\n\r\n split = (question: QuestionModel) => getSettingNumber(question, \"SplitStarIn\", 1);\r\n\r\n getValue(props: Props) {\r\n const value = this.getMention(props) ? this.getMentionValue(props) : \"0\";\r\n return parseFloat(value);\r\n }\r\n\r\n setValue = (value: number, reset = false) => {\r\n const [variable] = this.props.question.variables;\r\n const action =\r\n value && !reset\r\n ? (mentions) => mentions.set(String(value))\r\n : (mentions) => mentions.clear();\r\n this.setMentions(this.props, variable.name, action);\r\n };\r\n\r\n validate(options?: ValidationOptionsModel): ValidationResultModel {\r\n const { question, questionnaire, showSoftPrompt, useClientValidation } = this.props;\r\n if (isQuestionValidatedServerSide(question.type, useClientValidation)) {\r\n return new ValidationBuilder().build();\r\n }\r\n const isRequired =\r\n question.parent &&\r\n this.isAnswerRequired(questionnaire, question.parent) &&\r\n getSettingBoolean(question, \"AnswerRequired\");\r\n const hasMentions = this.hasMentions(this.props, question.name);\r\n if (!showSoftPrompt && isRequired && !hasMentions) {\r\n const customError =\r\n getSettingString(question, \"CustomErrorMessage\") ||\r\n this.parentCustomError(question.parent);\r\n\r\n return new ValidationBuilder()\r\n .fail(question.name, customError || \"IncompleteAnswer\")\r\n .build();\r\n }\r\n return new ValidationBuilder().build();\r\n }\r\n\r\n renderQuestion(question: QuestionModel) {\r\n const { sequencedVariables, isDisabled } = this.props;\r\n const variable = sequencedVariables.find((v) => v.type === VariableType.Continuous);\r\n return (\r\n {\r\n this.starRating = e as HTMLDivElement;\r\n }}\r\n setValue={this.setValue}\r\n starWidth={this.state.starWidth}\r\n starHeight={this.state.starHeight}\r\n value={this.state.value}\r\n maxValue={this.maxValue()}\r\n split={this.split(question)}\r\n elementId={variable?.elementId}\r\n isDisabled={isDisabled === true}\r\n />\r\n );\r\n }\r\n}\r\n","import { CheckBox } from \"../../components/choices/CheckBox\";\r\nimport { Radio } from \"../../components/choices/Radio\";\r\nimport { ImageSelect } from \"../../components/choices/ImageSelect\";\r\nimport { TextBoxControl } from \"../../components/controls/TextBoxControl\";\r\nimport { DropDownControl } from \"../../components/controls/DropDownControl\";\r\nimport { SliderControl } from \"../../components/controls/SliderControl\";\r\nimport { StarRatingControl } from \"../../components/controls/StarRatingControl\";\r\nimport { AxisModel } from \"../AxisModel\";\r\nimport { ColumnType } from \"../enums/ColumnType\";\r\n\r\nexport function controlTypeForColumn(column: AxisModel) {\r\n switch (column.type) {\r\n case ColumnType.CheckBox:\r\n return CheckBox;\r\n case ColumnType.RadioButton:\r\n return Radio;\r\n case ColumnType.ImageSelector:\r\n return ImageSelect;\r\n case ColumnType.DropDownList:\r\n return DropDownControl;\r\n case ColumnType.Slider:\r\n return SliderControl;\r\n case ColumnType.StarRating:\r\n return StarRatingControl;\r\n default:\r\n return TextBoxControl;\r\n }\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\nimport * as Mixins from \"../../../theme/Mixins\";\r\n\r\nexport default createUseStyles((theme: any) => ({\r\n grid: {\r\n composes: \"grid\",\r\n borderCollapse: \"separate\",\r\n borderSpacing: 0,\r\n \"& p\": {\r\n margin: 0,\r\n },\r\n ...(theme.DynamicCss?.HasGridChanges\r\n ? {\r\n marginBottom: \"20px\",\r\n }\r\n : {\r\n paddingBottom: \"20px\",\r\n }),\r\n },\r\n choiceGrid: {\r\n composes: \"choice-grid\",\r\n width: \"100%\",\r\n },\r\n gridContainer: {\r\n float: \"left\",\r\n maxWidth: \"100%\",\r\n },\r\n gridBody: {\r\n composes: \"grid__body\",\r\n \"& tr:nth-child(even) > th, tr:nth-child(even) > td\": theme.DynamicCss?.HasGridChanges\r\n ? {}\r\n : {\r\n borderTopStyle: \"solid\",\r\n borderTopColor: theme.ControlBorderColor,\r\n borderTopWidth: theme.BorderWidth,\r\n borderBottomStyle: \"solid\",\r\n borderBottomColor: theme.ControlBorderColor,\r\n borderBottomWidth: theme.BorderWidth,\r\n color: Mixins.foregroundColor(theme, Mixins.controlBackgroundColor(theme)),\r\n background: Mixins.alpha(theme.ControlBackground, theme.ControlAlpha),\r\n },\r\n \"& tr > th:first-child, tr > td:first-child\": {\r\n ...(theme.DynamicCss?.HasGridChanges\r\n ? {}\r\n : {\r\n borderLeftStyle: \"solid\",\r\n borderLeftWidth: theme.BorderWidth,\r\n }),\r\n borderTopLeftRadius: Mixins.getRowCornerBorderRadius(theme.BorderRadius),\r\n borderBottomLeftRadius: Mixins.getRowCornerBorderRadius(theme.BorderRadius),\r\n },\r\n \"& tr:nth-child(even) > th:first-child, tr:nth-child(even) > td:first-child\": theme\r\n .DynamicCss?.HasGridChanges\r\n ? {}\r\n : { borderLeftColor: theme.ControlBorderColor },\r\n \"& tr:nth-child(odd) > th:first-child, tr:nth-child(odd) > td:first-child\": theme.DynamicCss\r\n ?.HasGridChanges\r\n ? {}\r\n : { borderLeftColor: \"transparent\" },\r\n \"& tr > th:last-child, tr > td:last-child\": {\r\n ...(theme.DynamicCss?.HasGridChanges\r\n ? {}\r\n : {\r\n borderRightStyle: \"solid\",\r\n borderRightWidth: theme.BorderWidth,\r\n }),\r\n borderTopRightRadius: Mixins.getRowCornerBorderRadius(theme.BorderRadius),\r\n borderBottomRightRadius: Mixins.getRowCornerBorderRadius(theme.BorderRadius),\r\n },\r\n \"& tr:nth-child(even) > th:last-child, tr:nth-child(even) > td:last-child\": theme.DynamicCss\r\n ?.HasGridChanges\r\n ? {}\r\n : { borderRightColor: theme.ControlBorderColor },\r\n \"& tr:nth-child(odd) > th:last-child, tr:nth-child(odd) > td:last-child\": theme.DynamicCss\r\n ?.HasGridChanges\r\n ? {}\r\n : { borderRightColor: \"transparent\" },\r\n },\r\n gridRow: {\r\n composes: \"grid__row\",\r\n },\r\n gridRowError: {\r\n composes: \"grid__row--error\",\r\n },\r\n gridSummary: {\r\n composes: \"grid__summary\",\r\n textAlign: \"right\",\r\n background: theme.DynamicCss?.HasGridChanges ? {} : theme.PrimaryColor,\r\n border: theme.DynamicCss?.HasGridChanges\r\n ? {}\r\n : [[theme.BorderWidth, \"solid\", Mixins.borderColor(theme, theme.PrimaryColor)]],\r\n borderBottom:\r\n theme.ControlAlpha === 0 && theme.BorderWidth === 0\r\n ? [[3, \"solid\", Mixins.borderColor(theme, theme.PrimaryColor)]]\r\n : \"\",\r\n borderRadius: Math.min(theme.BorderRadius, theme.InputHeight / 2),\r\n lineHeight: `${theme.InputHeight + theme.BorderWidth * 2}px`,\r\n height: theme.InputHeight + theme.BorderWidth * 2,\r\n boxSizing: \"border-box\",\r\n padding: [[0, 16]],\r\n color: theme.DynamicCss?.HasGridChanges\r\n ? {}\r\n : Mixins.foregroundColor(theme, theme.PrimaryColor),\r\n },\r\n label: {\r\n composes: \"label\",\r\n },\r\n labelLeft: {\r\n composes: \"label-left\",\r\n marginRight: \"5px\",\r\n textAlign: \"left\",\r\n },\r\n labelRight: {\r\n composes: \"label-right\",\r\n marginLeft: \"5px\",\r\n textAlign: \"left\",\r\n },\r\n title: {\r\n fontWeight: \"bold\",\r\n },\r\n collapsibleGrid: {\r\n composes: \"collapsible-grid\",\r\n \"& > div:last-child\": {\r\n borderBottom: [[0.5, \"solid\", \"#eeeeee\"]],\r\n },\r\n \".image-choice__target:hover\": {\r\n boxShadow: \"initial\",\r\n },\r\n },\r\n collapsibleGridContainer: {\r\n borderTop: [[0.5, \"solid\", \"#eeeeee\"]],\r\n },\r\n collapsibleGridHeader: {\r\n composes: \"collapsible-grid__header\",\r\n position: \"relative\",\r\n padding: [[15, 0, 15, 0]],\r\n fontWeight: 700,\r\n cursor: \"pointer\",\r\n },\r\n collapsibleGridHeaderCollapse: {\r\n composes: \"collapsible-grid__header--collapse\",\r\n \"& svg\": {\r\n transform: \"rotate(180deg)\",\r\n },\r\n },\r\n collapsibleGridArrow: {\r\n composes: \"collapsible-grid__arrow\",\r\n position: \"absolute\",\r\n transition: [[\"transform\", \"400ms\", \"ease-in-out\"]],\r\n top: 0,\r\n right: 0,\r\n bottom: 0,\r\n fontSize: theme.TextFontSize,\r\n margin: \"auto\",\r\n marginRight: 12,\r\n },\r\n collapsibleGridSeparator: {\r\n composes: \"collapsible-grid__separator\",\r\n padding: [[15, 0, 15, 0]],\r\n fontWeight: 700,\r\n },\r\n collapsibleGridFooter: {\r\n composes: \"collapsible-grid__footer\",\r\n padding: [[5, 0, 15, 0]],\r\n },\r\n choiceList: {\r\n composes: \"choice-list\",\r\n },\r\n}));\r\n","import React, { Dispatch } from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport classnames from \"classnames\";\r\nimport { includes, times } from \"../../../utils/lodash\";\r\nimport { FontAwesomeIcon } from \"../../shared/FontAwesome\";\r\nimport {\r\n shouldShowRowLeftLabel,\r\n isHeaderRow,\r\n shouldShowRowRightLabel,\r\n questionForCell,\r\n isSplitColumn,\r\n isRowMergeCells,\r\n getUseChoiceTexts,\r\n variableForCell,\r\n getColumnCount,\r\n openEndVariableName,\r\n hasRightLabels,\r\n hasLeftLabels,\r\n rowHasError,\r\n hasOpenEnd,\r\n} from \"../../../models/utilities/gridUtilities\";\r\nimport {\r\n getSettingString,\r\n getSettingBoolean,\r\n hasSetting,\r\n getSettingNumber,\r\n} from \"../../../models/utilities/settingUtilities\";\r\nimport { getRendererProps, RendererProps } from \"../BaseRenderer\";\r\nimport GridCellRenderer from \"./GridCellRenderer\";\r\nimport OpenEndRenderer from \"./OpenEndRenderer\";\r\nimport { ChoiceContainer } from \"../../../containers/controls/ChoiceContainer\";\r\nimport { ChoiceModel } from \"../../../models/ChoiceModel\";\r\nimport { QuestionType } from \"../../../models/enums/QuestionType\";\r\nimport { SignalListener } from \"../../shared/SignalListener\";\r\nimport { isNullOrEmpty } from \"../../../utils\";\r\nimport { RowType } from \"../../../models/enums/RowType\";\r\nimport { controlTypeForColumn } from \"../../../models/factories/gridControlFactory\";\r\nimport { VariableModel } from \"../../../models/VariableModel\";\r\nimport { AxisModel } from \"../../../models/AxisModel\";\r\nimport { translate } from \"../../../models/utilities/translationUtilities\";\r\nimport { ControlContainer } from \"../../../containers/controls/ControlContainer\";\r\nimport { Signal } from \"../../../signals\";\r\nimport { ValidationResultModel } from \"../../../models/ValidationResultModel\";\r\nimport { ValidationOptionsModel } from \"../../../models/ValidationOptionsModel\";\r\nimport { ColumnType } from \"../../../models/enums/ColumnType\";\r\nimport { Collapsible } from \"../../shared/Collapsible\";\r\nimport useStyle from \"./GridRenderer.styles\";\r\nimport Button from \"../../shared/Button\";\r\nimport useQuestion, { QuestionContext } from \"../../../hooks/useQuestion\";\r\nimport useTranslatable from \"../../../hooks/useTranslatable\";\r\nimport useRecall from \"../../../hooks/useRecall\";\r\nimport ChoiceListItemRenderer from \"./ChoiceListItemRenderer\";\r\nimport { defaultSize } from \"../../../models/utilities/questionUtilities\";\r\nimport InputWrapper from \"../../shared/InputWrapper\";\r\nimport { Translatable } from \"../../../models/Translatable\";\r\nimport { evaluateIfChoiceVisible } from \"../../../redux/thunks/evaluator\";\r\nimport { useMentions } from \"../../../hooks/useMentions\";\r\nimport { MentionModel } from \"../../../models/MentionModel\";\r\nimport { StoreState } from \"../../../models/states/StoreState\";\r\nimport { getMentions } from \"../../../redux/reducers/interview/variablesUtilities\";\r\nimport { setQuestionFieldStatus, setVariableMentions } from \"../../../redux/actions\";\r\nimport { QuestionModel } from \"../../../models/QuestionModel\";\r\n\r\ninterface GridRendererProps extends RendererProps {\r\n rows: AxisModel[];\r\n columns: AxisModel[];\r\n validateSignal: Signal;\r\n validationResult: ValidationResultModel;\r\n getSelectedAnswers?(row: AxisModel, column: AxisModel): ChoiceModel[];\r\n shouldHideCell?(row: AxisModel, column: AxisModel): boolean;\r\n shouldDisableCell?(row: AxisModel, column: AxisModel): boolean;\r\n validateCell?(row: AxisModel, column: AxisModel): ValidationResultModel;\r\n validateColumn?(column: AxisModel): ValidationResultModel;\r\n validateRowOpenEnd?(row: AxisModel): ValidationResultModel;\r\n validateChoiceOpenEnd?(column: AxisModel, choice: ChoiceModel): ValidationResultModel;\r\n getColumnRunningTotal?(column: AxisModel): string;\r\n isRowSelected?(row: AxisModel): boolean;\r\n expandRow?(row: AxisModel): void;\r\n addAccordionRef?(rowIndex: number, ref: HTMLDivElement): void;\r\n openEndValue?: { [key: string]: string };\r\n onOpenEndChange?(answer: any, event: any): void;\r\n onOpenEndBlur?(answer: any): void;\r\n showSoftPrompt?: boolean;\r\n matrix?: number;\r\n onReset?(): void;\r\n expandedRowsIndices?: number[];\r\n isScreenSmall?: boolean;\r\n isColumnChoiceSelected?(column: AxisModel, choice: ChoiceModel): boolean;\r\n max?: string;\r\n sequencedVariables?: VariableModel[];\r\n gridRenderedRowIndex?: number;\r\n gridRenderedColumnIndex?: number;\r\n}\r\n\r\ninterface StyledProps extends GridRendererProps {\r\n classes: any;\r\n}\r\n\r\ninterface ReferencedElementProps extends StyledProps {\r\n elementRef?: React.Ref;\r\n}\r\n\r\ninterface RecalledLabelProps {\r\n translatable: Translatable;\r\n translatableKey: string;\r\n classes?: string;\r\n openEndAriaId?: string;\r\n cellId?: string;\r\n}\r\n\r\nconst isTransposedGrid = (props: GridRendererProps) =>\r\n getSettingBoolean(props.question, \"InverseRendering\");\r\n\r\nconst shouldDisplayResetButton = (props: GridRendererProps) =>\r\n getSettingBoolean(props.question, \"DisplayResetButton\");\r\n\r\nconst defaultColumnsWidth = (props: GridRendererProps) =>\r\n columnsWidth(props, \"DefaultColumnsWidth\");\r\n\r\nconst firstColumnWidth = (props: GridRendererProps) => columnsWidth(props, \"FirstColumnWidth\");\r\n\r\nconst columnsWidth = (props: GridRendererProps, key: string) => {\r\n const settingValue = getSettingString(props.question, key);\r\n return includes(settingValue, \"%\") ? settingValue : null;\r\n};\r\n\r\nfunction RecalledLabel(props: RecalledLabelProps) {\r\n const { translatable, translatableKey, classes, openEndAriaId, cellId } = props;\r\n const label = useTranslatable(translatable, translatableKey);\r\n const recalled = useRecall(label);\r\n\r\n if (!recalled) {\r\n return null;\r\n }\r\n return (\r\n \r\n );\r\n}\r\n\r\nfunction LeftLabel(props: StyledProps & { axis: AxisModel }) {\r\n const { classes, axis, question } = props;\r\n const cellId = GetRowLeftLabelAriaId(axis, question);\r\n\r\n return (\r\n \r\n );\r\n}\r\nfunction GetCellOpenEndId(rowOrChoice: AxisModel | ChoiceModel) {\r\n const leftLabel = useTranslatable(rowOrChoice, \"LeftLabel\");\r\n const text = useTranslatable(rowOrChoice, \"TEXT\");\r\n\r\n if (!hasSetting(rowOrChoice, \"OpenEndType\")) {\r\n return null;\r\n }\r\n\r\n if (leftLabel || text) {\r\n const openEndName = openEndVariableName(rowOrChoice);\r\n\r\n if (openEndName) {\r\n return `V_${openEndName}_CELL_LABEL`;\r\n }\r\n }\r\n}\r\n\r\nfunction GetRowLeftLabelAriaId(rowOrChoice: AxisModel | ChoiceModel, question: QuestionModel) {\r\n const leftLabel = useTranslatable(rowOrChoice, \"LeftLabel\");\r\n const text = useTranslatable(rowOrChoice, \"TEXT\");\r\n\r\n if (question.name && (leftLabel || text)) {\r\n return `Q_${question.name}_ROW_${rowOrChoice.index + 1}_LEFTLABEL`;\r\n }\r\n\r\n return null;\r\n}\r\n\r\nfunction RightLabel(props: StyledProps & { axis: AxisModel }) {\r\n const { classes, axis } = props;\r\n const openEndIdForCell = GetCellOpenEndId(axis);\r\n\r\n return (\r\n \r\n );\r\n}\r\n\r\nfunction Title(\r\n props: StyledProps & { row: AxisModel; column: AxisModel; showColumnHeaderId?: boolean },\r\n) {\r\n const { classes, column, row, question, showColumnHeaderId } = props;\r\n let openEndIdForCell = GetCellOpenEndId(column);\r\n const isRunningOrHybrid =\r\n question.type === QuestionType.RunningTotal || question.type === QuestionType.HybridGrid;\r\n\r\n // For Running total input cells a common id is required questionaire creator has to handle if sub title need to be manage.\r\n if (isRunningOrHybrid && !openEndIdForCell && showColumnHeaderId) {\r\n openEndIdForCell = `Q_${question.name}_HEADER_${column.index + 1}`;\r\n }\r\n\r\n return (\r\n \r\n );\r\n}\r\n\r\nfunction Text(props: StyledProps & { row: AxisModel; column: AxisModel; index: number }) {\r\n const { column, row, index } = props;\r\n const openEndIdForCell = GetCellOpenEndId(column);\r\n\r\n return (\r\n \r\n );\r\n}\r\n\r\nfunction ChoiceText(props: StyledProps & { choice: ChoiceModel }) {\r\n const { choice } = props;\r\n const openEndIdForCell = GetCellOpenEndId(choice);\r\n\r\n return (\r\n \r\n );\r\n}\r\n\r\nfunction RowOpenEnd(props: GridRendererProps & { row: AxisModel }) {\r\n const { row } = props;\r\n const isHidden = row.openEndActive !== undefined ? !row.openEndActive : false;\r\n const isDisabledIfHidden = getSettingBoolean(row, \"DisplayIfDisableInstead\");\r\n const isDisabled = row.openEndDisplayIf && isHidden && isDisabledIfHidden;\r\n\r\n return (\r\n \r\n );\r\n}\r\n\r\nfunction ChoiceColumnOpenEnd(\r\n props: GridRendererProps & { choice: ChoiceModel; column: AxisModel },\r\n) {\r\n const { choice } = props;\r\n const isHidden = choice.openEndActive !== undefined ? !choice.openEndActive : false;\r\n const isDisabledIfHidden = getSettingBoolean(choice, \"DisplayIfDisableInstead\");\r\n const isDisabled = choice.openEndDisplayLogic && isHidden && isDisabledIfHidden;\r\n\r\n return (\r\n \r\n );\r\n}\r\n\r\nfunction OpenEnd(\r\n props: GridRendererProps & {\r\n rowOrChoice: AxisModel | ChoiceModel;\r\n isHidden: boolean;\r\n isDisabledIfHidden: boolean;\r\n isDisabled: boolean;\r\n },\r\n) {\r\n const { rowOrChoice, isHidden, isDisabledIfHidden, isDisabled } = props;\r\n const leftLabel = useTranslatable(rowOrChoice, \"LeftLabel\");\r\n const text = useTranslatable(rowOrChoice, \"TEXT\");\r\n\r\n if (!hasSetting(rowOrChoice, \"OpenEndType\")) {\r\n return null;\r\n }\r\n\r\n const openEndName = openEndVariableName(rowOrChoice);\r\n const { validationResult, openEndValue, onOpenEndBlur, onOpenEndChange } = props;\r\n\r\n const size = getSettingString(rowOrChoice, \"OpenEndSize\", \"Medium\");\r\n const lines = getSettingNumber(rowOrChoice, \"OpenEndLines\", 2);\r\n return (\r\n onOpenEndBlur(rowOrChoice)}\r\n onOpenEndChange={(e) => onOpenEndChange(rowOrChoice, e)}\r\n validationResult={validationResult}\r\n size={size}\r\n lines={lines}\r\n gridRendering\r\n />\r\n );\r\n}\r\n\r\nfunction RowLeftLabel(props: StyledProps & { row: AxisModel }) {\r\n const { row } = props;\r\n if (!shouldShowRowLeftLabel(row)) {\r\n return null;\r\n }\r\n const { validationResult, validateSignal } = props;\r\n const isColumnHeader = isHeaderRow(row);\r\n return (\r\n \r\n \r\n \r\n {hasSetting(row, \"OpenEndType\") && (\r\n props.validateRowOpenEnd(row)}\r\n />\r\n )}\r\n \r\n );\r\n}\r\n\r\nfunction RowRightLabel(props: StyledProps & { row: AxisModel }) {\r\n const { row } = props;\r\n if (!shouldShowRowRightLabel(row)) {\r\n return null;\r\n }\r\n const { validationResult } = props;\r\n return (\r\n \r\n \r\n \r\n );\r\n}\r\n\r\nfunction GetQuestionFieldStatus(fieldIdentifier: string) {\r\n return useSelector((state: StoreState) => state.interview.questionFieldStatus[fieldIdentifier]);\r\n}\r\n\r\nfunction Choice(\r\n props: StyledProps & {\r\n row: AxisModel;\r\n column: AxisModel;\r\n variable: VariableModel;\r\n choice: ChoiceModel;\r\n isCollapsible?: boolean;\r\n label?: string;\r\n },\r\n) {\r\n const {\r\n question,\r\n row,\r\n column,\r\n variable,\r\n choice,\r\n isCollapsible,\r\n openEndValue,\r\n onOpenEndChange,\r\n onOpenEndBlur,\r\n } = props;\r\n const [mentions] = useMentions(variable.name);\r\n const store = useSelector((state: StoreState) => state);\r\n const dispatch = useDispatch();\r\n const isSelected = isChoiceSelected(choice, mentions);\r\n const cellQuestion = questionForCell(question, row, column);\r\n const fieldIdentifier = `${question.id}&${cellQuestion.name}`;\r\n const isHybridGrid = question?.type === QuestionType.HybridGrid;\r\n let isDisabled: boolean;\r\n let stateDisabledStatus;\r\n if (isHybridGrid) {\r\n stateDisabledStatus = GetQuestionFieldStatus(fieldIdentifier)?.isDisabled;\r\n\r\n if (stateDisabledStatus) {\r\n isDisabled = stateDisabledStatus;\r\n } else {\r\n isDisabled = isChoiceDisabled(props, mentions, store, dispatch);\r\n }\r\n } else {\r\n isDisabled = isChoiceDisabled(props, mentions, store, dispatch);\r\n }\r\n\r\n React.useEffect(() => {\r\n if (isHybridGrid && stateDisabledStatus === undefined) {\r\n dispatch(setQuestionFieldStatus([fieldIdentifier], isDisabled, false));\r\n } /* eslint-disable react-hooks/exhaustive-deps */\r\n }, []); // Runs once per component(Grid Cell)\r\n /* eslint-enable react-hooks/exhaustive-deps */\r\n\r\n const choiceRef = React.useRef();\r\n\r\n const isRadioOrCheckbox = [ColumnType.RadioButton, ColumnType.CheckBox].includes(\r\n column.type as ColumnType,\r\n );\r\n\r\n const applyCollapsibleStyles = isCollapsible && isRadioOrCheckbox;\r\n if (!applyCollapsibleStyles) {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n\r\n return (\r\n \r\n );\r\n}\r\n\r\nfunction ChoiceCells(props: StyledProps & { row: AxisModel; column: AxisModel }) {\r\n const { row, column, validateSignal, question } = props;\r\n const variable = variableForCell(row, column);\r\n const colSpan = question.variables?.find((v) => v.name === variable.name).choiceList?.length;\r\n return (\r\n <>\r\n props.validateCell(row, column)}\r\n signal={validateSignal}\r\n />\r\n {variable.choiceList.length > 0 ? (\r\n variable.choiceList.map((choice) => (\r\n \r\n \r\n \r\n ))\r\n ) : (\r\n \r\n )}\r\n \r\n );\r\n}\r\n\r\nfunction VariableCell(props: StyledProps & { row: AxisModel; column: AxisModel }) {\r\n const {\r\n shouldDisableCell,\r\n validationResult,\r\n question,\r\n showSoftPrompt,\r\n validateSignal,\r\n row,\r\n column,\r\n } = props;\r\n const dispatch = useDispatch();\r\n const cellQuestion = questionForCell(question, row, column);\r\n const fieldIdentifier = `${question.id}&${cellQuestion.name}`;\r\n\r\n let isDisabled = false;\r\n let stateDisabledStatus;\r\n const isHybridGrid = question.type === QuestionType.HybridGrid;\r\n\r\n if (isHybridGrid) {\r\n stateDisabledStatus = GetQuestionFieldStatus(fieldIdentifier);\r\n\r\n if (stateDisabledStatus) {\r\n isDisabled = stateDisabledStatus.isDisabled;\r\n } else {\r\n isDisabled = shouldDisableCell && shouldDisableCell(row, column);\r\n }\r\n } else {\r\n isDisabled = shouldDisableCell && shouldDisableCell(row, column);\r\n }\r\n\r\n React.useEffect(() => {\r\n if (isHybridGrid && stateDisabledStatus === undefined) {\r\n dispatch(setQuestionFieldStatus([fieldIdentifier], isDisabled, false));\r\n }\r\n /* eslint-disable react-hooks/exhaustive-deps */\r\n }, []); // Runs once per component(Grid Cell)\r\n /* eslint-enable react-hooks/exhaustive-deps */\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nfunction renderVariableCells(props: StyledProps, row: AxisModel, column: AxisModel) {\r\n const { shouldHideCell, question } = props;\r\n const shouldSplitColumn = isSplitColumn(column);\r\n if (shouldHideCell && shouldHideCell(row, column)) {\r\n if (shouldSplitColumn) {\r\n const variable = variableForCell(row, column);\r\n\r\n if (variable.choiceList.length > 0) {\r\n return variable.choiceList.map((choice) => (\r\n \r\n ));\r\n }\r\n const questionVariable = question.variables?.find((v) => v.name === variable.name);\r\n const colSpan = questionVariable.choiceList?.length;\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n );\r\n }\r\n if (shouldSplitColumn) {\r\n const choiceCellsKey = `${row.index}_${column.index}`;\r\n return ;\r\n }\r\n return ;\r\n}\r\n\r\nfunction CellImage(props: StyledProps & { choice: ChoiceModel }) {\r\n const { choice } = props;\r\n const imageUrl = useTranslatable(choice, \"ImageUrl\");\r\n const validTypes = [QuestionType.ChoiceGrid, QuestionType.NetPromoter];\r\n\r\n if (validTypes.some((t) => t === props.question.type)) {\r\n if (!isNullOrEmpty(imageUrl)) {\r\n return {choice.name};\r\n }\r\n }\r\n\r\n return null;\r\n}\r\n\r\nfunction CellItems(props: StyledProps & { column: AxisModel; choice: ChoiceModel }) {\r\n const { question, column, choice } = props;\r\n const isNetPromoter = question.type === QuestionType.NetPromoter;\r\n const items = (\r\n <>\r\n \r\n \r\n \r\n );\r\n return isNetPromoter ?

{items}

: items;\r\n}\r\n\r\nfunction renderChoiceTextCells(props: StyledProps, row: AxisModel, column: AxisModel) {\r\n const { question } = props;\r\n\r\n if (isSplitColumn(column)) {\r\n const choiceList = column.variables.find((v) => v.choiceList?.length > 0)?.choiceList;\r\n\r\n if (!choiceList) {\r\n const questionVariable = question.variables?.find((v) => v.choiceList?.length > 0);\r\n const colSpan = questionVariable?.choiceList?.length;\r\n\r\n return ;\r\n }\r\n return choiceList?.map((choice) => (\r\n \r\n \r\n \r\n props.validateChoiceOpenEnd(column, choice)}\r\n />\r\n \r\n ));\r\n }\r\n const { validationResult } = props;\r\n return (\r\n \r\n {row.type === RowType.Text ? (\r\n \r\n ) : (\r\n \r\n )}\r\n </GridCellRenderer>\r\n );\r\n}\r\n\r\nfunction renderTextCells(props: StyledProps, row: AxisModel, column: AxisModel) {\r\n const { question } = props;\r\n const cellVariable = column.variables.find(\r\n (variableItem) => variableItem.choiceList.length > 0,\r\n );\r\n const shouldSplitColumn = isSplitColumn(column);\r\n if (cellVariable && row.type === RowType.Text && shouldSplitColumn) {\r\n return cellVariable.choiceList.map((choice) => (\r\n <GridCellRenderer\r\n {...getRendererProps(props)}\r\n key={choice.index}\r\n isColumnHeader\r\n validationResult={props.validationResult}\r\n row={row}\r\n column={column}\r\n choice={choice}\r\n >\r\n <Text {...props} column={column} row={row} index={choice.index} />\r\n </GridCellRenderer>\r\n ));\r\n }\r\n\r\n let cellVariableDefaultChoiceListLength = cellVariable?.choiceList?.length;\r\n\r\n if (!column.variables.every((e) => e.choiceList?.length === 0)) {\r\n cellVariableDefaultChoiceListLength = question.variables?.find(\r\n (v) => v.name === cellVariable.name,\r\n ).choiceList?.length;\r\n }\r\n\r\n const colSpan = shouldSplitColumn && cellVariable ? cellVariableDefaultChoiceListLength : 1;\r\n if (colSpan === 0) {\r\n return null;\r\n }\r\n\r\n const { validationResult } = props;\r\n return (\r\n <GridCellRenderer\r\n {...getRendererProps(props)}\r\n key={column.index}\r\n colSpan={colSpan}\r\n isColumnHeader\r\n validationResult={validationResult}\r\n row={row}\r\n column={column}\r\n >\r\n {row.type === RowType.Text ? (\r\n <Text {...props} column={column} row={row} index={0} />\r\n ) : (\r\n <Title {...props} column={column} row={row} showColumnHeaderId />\r\n )}\r\n </GridCellRenderer>\r\n );\r\n}\r\n\r\nfunction MergedCells(props: StyledProps & { row: AxisModel; column: AxisModel }) {\r\n const { columns, validationResult, row, column } = props;\r\n let colSpan = getColumnCount(columns);\r\n if (!shouldShowRowLeftLabel(row)) {\r\n colSpan += 1;\r\n }\r\n if (!shouldShowRowRightLabel(row)) {\r\n colSpan += 1;\r\n }\r\n if (column.index > 0) {\r\n return null;\r\n }\r\n return (\r\n <GridCellRenderer\r\n {...getRendererProps(props)}\r\n key={column.index}\r\n colSpan={colSpan}\r\n isColumnHeader\r\n validationResult={validationResult}\r\n row={row}\r\n column={column}\r\n >\r\n {row.type === RowType.Text ? (\r\n <Text {...props} column={column} row={row} index={0} />\r\n ) : (\r\n <Title {...props} column={column} row={row} />\r\n )}\r\n </GridCellRenderer>\r\n );\r\n}\r\n\r\nfunction StandardRow(\r\n props: StyledProps & {\r\n row: AxisModel;\r\n showLeftLabels: boolean;\r\n showRightLabels: boolean;\r\n },\r\n) {\r\n const {\r\n classes,\r\n columns,\r\n validationResult,\r\n row,\r\n question,\r\n isScreenSmall,\r\n showLeftLabels,\r\n showRightLabels,\r\n } = props;\r\n const errorClassName = rowHasError(row, columns, validationResult) ? classes.gridRowError : \"\";\r\n const style = { display: isScreenSmall ? \"block\" : undefined };\r\n\r\n return (\r\n <tr\r\n className={classnames(\r\n classes.gridRow,\r\n errorClassName,\r\n isHeaderRow(row) ? \"header-row\" : \"data-row\",\r\n )}\r\n role=\"row\"\r\n style={style}\r\n >\r\n {showLeftLabels && <RowLeftLabel {...props} row={row} />}\r\n {columns.map((column) => {\r\n if (row.type === RowType.Variable) {\r\n return (\r\n <QuestionContext.Provider\r\n key={`${row.index}_${column.index}`}\r\n value={questionForCell(question, row, column)}\r\n >\r\n {renderVariableCells(props, row, column)}\r\n </QuestionContext.Provider>\r\n );\r\n }\r\n if (isRowMergeCells(row)) {\r\n return (\r\n <MergedCells\r\n key={`${row.index}_${column.index}`}\r\n {...props}\r\n row={row}\r\n column={column}\r\n />\r\n );\r\n }\r\n if (getUseChoiceTexts(row)) {\r\n return renderChoiceTextCells(props, row, column);\r\n }\r\n return renderTextCells(props, row, column);\r\n })}\r\n {showRightLabels && <RowRightLabel {...props} row={row} />}\r\n </tr>\r\n );\r\n}\r\n\r\nfunction TotalCell(props: StyledProps & { column: AxisModel }) {\r\n const { column, question, validationResult, getColumnRunningTotal } = props;\r\n const theme = useTheme();\r\n const classes = useStyle({ theme });\r\n const leftLabel = useTranslatable(column, \"LeftLabel\");\r\n const rightLabel = useTranslatable(column, \"RightLabel\");\r\n const ariaLabelledForTotalCell =\r\n `Q_${question.name}_ROW_LEFTLABEL_TOTALROW ` +\r\n `Q_${question.name}_HEADER_${column.index + 1}`;\r\n return (\r\n <GridCellRenderer\r\n {...getRendererProps(props)}\r\n key={column.index}\r\n validationResult={validationResult}\r\n column={column}\r\n >\r\n <InputWrapper\r\n size={getSettingString(column, \"Size\", defaultSize(question))}\r\n leftLabel={leftLabel}\r\n rightLabel={rightLabel}\r\n >\r\n <div className={classes.gridSummary} aria-labelledby={ariaLabelledForTotalCell}>\r\n {getColumnRunningTotal(column)}\r\n </div>\r\n </InputWrapper>\r\n </GridCellRenderer>\r\n );\r\n}\r\n\r\nfunction ColumnGroup(props: StyledProps) {\r\n const { columns } = props;\r\n const defaultWidth = defaultColumnsWidth(props);\r\n const firstWidth = firstColumnWidth(props) || defaultWidth;\r\n return (\r\n <colgroup>\r\n <col style={{ width: firstWidth }} />\r\n {times(getColumnCount(columns), (i) => (\r\n <col key={i} style={{ width: defaultWidth }} />\r\n ))}\r\n </colgroup>\r\n );\r\n}\r\n\r\nfunction TotalRow(props: StyledProps & { showLeftLabel: boolean }) {\r\n const { columns, question, validationResult, showLeftLabel } = props;\r\n return (\r\n <tr key=\"total\" role=\"row\" aria-live=\"polite\">\r\n {showLeftLabel && (\r\n <GridCellRenderer\r\n {...getRendererProps(props)}\r\n isRowHeader\r\n validationResult={validationResult}\r\n >\r\n <RecalledLabel\r\n translatable={question}\r\n translatableKey=\"TotalRowLabel\"\r\n cellId={`Q_${question.name}_ROW_LEFTLABEL_TOTALROW`}\r\n />\r\n </GridCellRenderer>\r\n )}\r\n {columns.map((column) => (\r\n <TotalCell key={column.index} {...props} column={column} />\r\n ))}\r\n </tr>\r\n );\r\n}\r\n\r\nfunction StandardRowTree(props: StyledProps) {\r\n const { rows, question, language } = props;\r\n const showLeftLabels = hasLeftLabels([...rows, question], language);\r\n const showRightLabels = hasRightLabels(rows, language);\r\n\r\n const standardRows = rows.map((row) => {\r\n const standardRow = (\r\n <StandardRow\r\n key={row.index}\r\n {...props}\r\n row={row}\r\n showLeftLabels={showLeftLabels}\r\n showRightLabels={showRightLabels}\r\n />\r\n );\r\n\r\n return standardRow;\r\n });\r\n return (\r\n <>\r\n {standardRows}\r\n {question.type === QuestionType.RunningTotal && (\r\n <TotalRow key=\"total\" {...props} showLeftLabel={showLeftLabels} />\r\n )}\r\n </>\r\n );\r\n}\r\n\r\nfunction TransposedHeaderRow(props: StyledProps) {\r\n const { rows } = props;\r\n return (\r\n <tr key=\"header\" role=\"row\">\r\n {rows.map((row) => (\r\n <GridCellRenderer\r\n key={row.index}\r\n {...getRendererProps(props)}\r\n isChoiceHeader\r\n validationResult={props.validationResult}\r\n row={row}\r\n >\r\n <LeftLabel {...props} axis={row} />\r\n <RowOpenEnd row={row} {...props} gridRenderedRowIndex={row.index} />\r\n {hasSetting(row, \"OpenEndType\") && (\r\n <SignalListener\r\n signal={props.validateSignal}\r\n handler={() => props.validateRowOpenEnd(row)}\r\n />\r\n )}\r\n </GridCellRenderer>\r\n ))}\r\n </tr>\r\n );\r\n}\r\n\r\nfunction TransposedCells(props: StyledProps & { column: AxisModel; choice: ChoiceModel }) {\r\n const { column, choice, rows } = props;\r\n const dispatch = useDispatch();\r\n\r\n if (!dispatch(evaluateIfChoiceVisible(choice))) {\r\n return null;\r\n }\r\n const cells = rows.map((row) => {\r\n const variable = variableForCell(row, column);\r\n if (row.type !== RowType.Variable) {\r\n return (\r\n <GridCellRenderer\r\n {...getRendererProps(props)}\r\n key={row.index}\r\n isColumnHeader={false}\r\n isRowHeader\r\n validationResult={props.validationResult}\r\n row={row}\r\n column={column}\r\n choice={choice}\r\n >\r\n <ChoiceText {...props} choice={choice} />\r\n <CellItems {...props} column={column} choice={choice} />\r\n <SignalListener\r\n signal={props.validateSignal}\r\n handler={() => props.validateChoiceOpenEnd(column, choice)}\r\n />\r\n </GridCellRenderer>\r\n );\r\n }\r\n const { validationResult, validateSignal } = props;\r\n return (\r\n <GridCellRenderer\r\n {...getRendererProps(props)}\r\n key={row.index}\r\n validationResult={validationResult}\r\n row={row}\r\n column={column}\r\n choice={choice}\r\n >\r\n <SignalListener\r\n signal={validateSignal}\r\n handler={() => props.validateCell(row, column)}\r\n />\r\n <Choice row={row} column={column} variable={variable} choice={choice} {...props} />\r\n </GridCellRenderer>\r\n );\r\n });\r\n\r\n return (\r\n <tr key={choice.index} role=\"row\">\r\n {cells}\r\n </tr>\r\n );\r\n}\r\n\r\nfunction TransposedRowTree(props: StyledProps) {\r\n const { columns } = props;\r\n\r\n return (\r\n <>\r\n <TransposedHeaderRow {...props} />\r\n\r\n {columns.map((column) =>\r\n column.variables\r\n .find((v) => v.choiceList?.length > 0)\r\n ?.choiceList.map((choice) => (\r\n <TransposedCells\r\n key={choice.index}\r\n {...props}\r\n column={column}\r\n choice={choice}\r\n />\r\n )),\r\n )}\r\n </>\r\n );\r\n}\r\n\r\nfunction onShouldDisableCell(\r\n props: GridRendererProps,\r\n row: AxisModel,\r\n column: AxisModel,\r\n store: StoreState,\r\n dispatch: Dispatch<any>,\r\n) {\r\n const { columns } = props;\r\n const isCellDisabled = columns\r\n .filter((sequencedColumn) => sequencedColumn.variables[0])\r\n .some((sequencedColumn) => {\r\n const cellVariable = variableForCell(row, sequencedColumn);\r\n return cellVariable.choiceList.some((choice) => {\r\n const disabledColumns = getSettingString(choice, \"DisableColumns\");\r\n if (!isNullOrEmpty(disabledColumns)) {\r\n const mentions = getMentions(store.interview.variables, cellVariable.name);\r\n if (mentions.some((m) => m.value === choice.value)) {\r\n const isDisabled = disabledColumns\r\n .replace(/\\s/g, \"\")\r\n .split(\",\")\r\n .find((c) => c === column.index.toString());\r\n if (isDisabled) {\r\n const currentCell = variableForCell(row, column);\r\n const currentMentions = getMentions(\r\n store.interview.variables,\r\n currentCell.name,\r\n );\r\n if (currentMentions && currentMentions.length > 0) {\r\n dispatch(setVariableMentions(currentCell.name, (m) => m.clear()));\r\n }\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n });\r\n });\r\n return isCellDisabled;\r\n}\r\n\r\nfunction isChoiceDisabled(\r\n props: StyledProps & {\r\n row: AxisModel;\r\n column: AxisModel;\r\n variable: VariableModel;\r\n choice: ChoiceModel;\r\n },\r\n mentions: MentionModel[],\r\n store: StoreState,\r\n dispatch: Dispatch<any>,\r\n) {\r\n const { row, column, variable, choice } = props;\r\n if (onShouldDisableCell(props, row, column, store, dispatch)) {\r\n return true;\r\n }\r\n\r\n const visibleChoiceMentions = mentions.filter((m) => isChoiceVisible(m.value, variable));\r\n const maxAllowedAnswers = parseInt(\r\n props.max || getSettingString(column, \"MaxAllowedAnswers\"),\r\n 10,\r\n );\r\n return (\r\n !Number.isNaN(maxAllowedAnswers) &&\r\n !isChoiceSelected(choice, mentions) &&\r\n visibleChoiceMentions.length >= maxAllowedAnswers\r\n );\r\n}\r\n\r\nfunction isChoiceVisible(value: string, variable: VariableModel) {\r\n return variable.choiceList.some((choice) => choice.value === value);\r\n}\r\n\r\nfunction isChoiceSelected(choice: ChoiceModel, mentions: MentionModel[]) {\r\n return mentions.some((mention) => mention.value === choice.value);\r\n}\r\n\r\nfunction isCollapsibleExpanded(props: GridRendererProps, row: AxisModel) {\r\n return props.expandedRowsIndices && props.expandedRowsIndices.includes(row.index);\r\n}\r\n\r\nfunction CollapsibleContent(props: StyledProps & { row: AxisModel }) {\r\n const { validateSignal, shouldHideCell, columns, classes, language, row } = props;\r\n\r\n const visibleColumns = columns.filter(\r\n (column) => !shouldHideCell || !shouldHideCell(row, column),\r\n );\r\n const choices = visibleColumns.map((column) => {\r\n const variable = variableForCell(row, column);\r\n return variable.choiceList.map((choice) => (\r\n <div key={choice.index} className={classes.choiceList}>\r\n <Choice\r\n row={row}\r\n column={column}\r\n variable={variable}\r\n choice={choice}\r\n label={translate(choice, \"TEXT\", language)}\r\n isCollapsible\r\n {...props}\r\n />\r\n </div>\r\n ));\r\n });\r\n\r\n const hasRightLabel = hasRightLabels([row], language);\r\n\r\n return (\r\n <Collapsible expanded={isCollapsibleExpanded(props, row)}>\r\n <SignalListener\r\n key=\"signal\"\r\n handler={() => props.validateCell(row, visibleColumns[0])}\r\n signal={validateSignal}\r\n />\r\n {choices}\r\n {hasRightLabel && (\r\n <div className={classes.collapsibleGridFooter}>\r\n <RightLabel {...props} axis={row} />\r\n </div>\r\n )}\r\n </Collapsible>\r\n );\r\n}\r\n\r\nfunction CollapsibleTitleRow(props: StyledProps & { row: AxisModel }) {\r\n const { classes, columns, row } = props;\r\n return (\r\n <div className={classes.collapsibleGridContainer} key={row.index}>\r\n <div key={row.index} className={classes.collapsibleGridSeparator}>\r\n <Title {...props} column={columns[0]} row={row} />\r\n </div>\r\n </div>\r\n );\r\n}\r\n\r\nfunction CollapsibleVariableRow(props: StyledProps & { row: AxisModel }) {\r\n const { classes, row, expandRow, addAccordionRef } = props;\r\n const className = classnames(\r\n classes.collapsibleGridHeader,\r\n !isCollapsibleExpanded(props, row) && classes.collapsibleGridHeaderCollapse,\r\n );\r\n return (\r\n <div className={classes.collapsibleGridContainer} key={row.index}>\r\n <div\r\n className={className}\r\n ref={(ref) => addAccordionRef && addAccordionRef(row.index, ref)}\r\n onClick={() => expandRow(row)}\r\n >\r\n <LeftLabel {...props} axis={row} />\r\n <FontAwesomeIcon icon=\"caret-up\" className={classes.collapsibleGridArrow} />\r\n </div>\r\n <CollapsibleContent {...props} row={row} />\r\n </div>\r\n );\r\n}\r\n\r\nfunction CollapsibleRow(props: StyledProps & { row: AxisModel }) {\r\n const { row } = props;\r\n switch (row.type as RowType) {\r\n case RowType.Title:\r\n return <CollapsibleTitleRow {...props} row={row} />;\r\n case RowType.Variable:\r\n return <CollapsibleVariableRow {...props} row={row} />;\r\n case RowType.Text:\r\n default:\r\n return null;\r\n }\r\n}\r\n\r\nfunction StandardGrid(props: ReferencedElementProps) {\r\n const { question, classes, elementRef } = props;\r\n const rows = isTransposedGrid(props) ? (\r\n <TransposedRowTree {...props} />\r\n ) : (\r\n <StandardRowTree {...props} />\r\n );\r\n const isChoiceGrid = question.type === QuestionType.ChoiceGrid;\r\n\r\n return (\r\n <table\r\n ref={elementRef as React.Ref<HTMLTableElement>}\r\n className={classnames(classes.grid, isChoiceGrid && classes.choiceGrid, \"grid-view\")}\r\n >\r\n <ColumnGroup {...props} />\r\n <tbody className={classnames(isChoiceGrid && classes.gridBody)}>{rows}</tbody>\r\n </table>\r\n );\r\n}\r\n\r\nfunction CollapsibleGrid(props: ReferencedElementProps) {\r\n const { classes, elementRef, rows } = props;\r\n\r\n return (\r\n <div ref={elementRef as React.Ref<HTMLDivElement>} className={classes.collapsibleGrid}>\r\n {rows.map((row) => (\r\n <CollapsibleRow key={row.index} {...props} row={row} />\r\n ))}\r\n </div>\r\n );\r\n}\r\n\r\nfunction ResponsiveChoiceGrid(props: StyledProps) {\r\n const elementRef: React.Ref<HTMLElement> = React.useRef(null);\r\n\r\n const [testFitElementInitialWidth, setTestFitElementInitialWidth] = React.useState<number>();\r\n const [shouldCollapse, setShouldCollapse] = React.useState<boolean>();\r\n\r\n const { question, rows, columns } = props;\r\n const isImageChoiceGrid = question.type === QuestionType.ImageChoiceGrid;\r\n\r\n const onWindowSizeChanged = React.useCallback(() => {\r\n const wrapper = elementRef.current.closest(\".page__wrapper--dynamic\");\r\n setShouldCollapse(\r\n wrapper && (isImageChoiceGrid || wrapper.clientWidth < testFitElementInitialWidth),\r\n );\r\n }, [testFitElementInitialWidth, isImageChoiceGrid]);\r\n\r\n React.useEffect(() => {\r\n if (!elementRef.current) {\r\n return;\r\n }\r\n const { width } = elementRef.current.getBoundingClientRect();\r\n if (!shouldCollapse && testFitElementInitialWidth !== width) {\r\n setTestFitElementInitialWidth(width);\r\n }\r\n }, [testFitElementInitialWidth, rows, columns, shouldCollapse]);\r\n\r\n windowsResizeListener(onWindowSizeChanged);\r\n\r\n return shouldCollapse ? (\r\n <CollapsibleGrid {...props} elementRef={elementRef} />\r\n ) : (\r\n <StandardGrid {...props} elementRef={elementRef} />\r\n );\r\n}\r\n\r\nfunction ResponsiveStarRatingGrid(props: StyledProps) {\r\n const elementRef: React.Ref<HTMLElement> = React.useRef(null);\r\n const [isScreenSmall, setIsScreenSmall] = React.useState<boolean>();\r\n\r\n const onWindowSizeChanged = () => {\r\n const wrapper = elementRef.current.closest(\".page__wrapper--dynamic\");\r\n setIsScreenSmall(wrapper !== null);\r\n };\r\n\r\n windowsResizeListener(onWindowSizeChanged);\r\n\r\n return <StandardGrid {...props} isScreenSmall={isScreenSmall} elementRef={elementRef} />;\r\n}\r\n\r\nfunction windowsResizeListener(handler: any) {\r\n React.useEffect(() => {\r\n window.addEventListener(\"resize\", handler);\r\n handler();\r\n return function cleanup() {\r\n window.removeEventListener(\"resize\", handler);\r\n };\r\n }, [handler]);\r\n}\r\n\r\nfunction ResetButton(props: GridRendererProps) {\r\n const { onReset, theme } = props;\r\n\r\n const question = useQuestion();\r\n const defaultClearButtonText = useTranslatable(theme, \"QuestionClearButton\") || \"Reset\";\r\n const clearButtonText = useTranslatable(question, \"ResetButtonText\") || defaultClearButtonText;\r\n\r\n return <Button size=\"full\" text={useRecall(clearButtonText)} onClick={() => onReset()} />;\r\n}\r\n\r\nfunction Grid(props: StyledProps) {\r\n const { question, rows, columns } = props;\r\n if (question.type === QuestionType.StarRatingGrid) {\r\n return <ResponsiveStarRatingGrid {...props} />;\r\n }\r\n const isChoiceGrid = [QuestionType.ChoiceGrid, QuestionType.ImageChoiceGrid].includes(\r\n question.type,\r\n );\r\n\r\n const hasColumnOpenEnd =\r\n columns &&\r\n columns.length &&\r\n columns[0].variables.some((variable) => variable.choiceList.some(hasOpenEnd));\r\n const hasRowOpenEnd = rows.some(hasOpenEnd);\r\n const isResponsiveChoiceGrid = isChoiceGrid && !(hasRowOpenEnd || hasColumnOpenEnd);\r\n\r\n return isResponsiveChoiceGrid ? (\r\n <ResponsiveChoiceGrid {...props} />\r\n ) : (\r\n <StandardGrid {...props} />\r\n );\r\n}\r\n\r\nexport default React.memo(function GridRenderer(props: GridRendererProps) {\r\n const { question } = props;\r\n const theme = useTheme();\r\n const classes = useStyle({ theme });\r\n\r\n const hasResetButton =\r\n question.type === QuestionType.RunningTotal && shouldDisplayResetButton(props);\r\n\r\n return (\r\n <>\r\n <Grid {...props} classes={classes} />\r\n {hasResetButton && <ResetButton {...props} />}\r\n </>\r\n );\r\n});\r\n","import React from \"react\";\r\n\r\nimport { isEqual, difference, min, pull, find, isEmpty, every, each } from \"../../utils/lodash\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { BaseControl, ControlProps } from \"./BaseControl\";\r\nimport { RowType } from \"../../models/enums/RowType\";\r\nimport { ChoiceModel } from \"../../models/ChoiceModel\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\nimport {\r\n getSettingString,\r\n hasSetting,\r\n getSettingNumber,\r\n getSettingBoolean,\r\n} from \"../../models/utilities/settingUtilities\";\r\nimport { isNullOrEmpty, getContainerDiv } from \"../../utils\";\r\nimport { Signal } from \"../../signals\";\r\nimport { ValidationBuilder } from \"../../models/builders/ValidationBuilder\";\r\nimport { getRendererProps } from \"../renderers/BaseRenderer\";\r\nimport {\r\n variableForCell,\r\n openEndVariableName,\r\n isSingleChoice,\r\n isHeaderRow,\r\n hasOpenEnd,\r\n} from \"../../models/utilities/gridUtilities\";\r\nimport { AxisModel } from \"../../models/AxisModel\";\r\nimport { ValidationOptionsModel } from \"../../models/ValidationOptionsModel\";\r\nimport { translate } from \"../../models/utilities/translationUtilities\";\r\nimport { __getStore__ } from \"../../redux/store\";\r\nimport GridRenderer from \"../renderers/v2/GridRenderer\";\r\nimport { isVisible } from \"../../models/utilities/choiceUtilities\";\r\nimport { ElementWithSettings } from \"../../models/ElementWithSettings\";\r\nimport { VariableModel } from \"../../models/VariableModel\";\r\nimport { QuestionType } from \"../../models/enums/QuestionType\";\r\nimport { SurveyMode } from \"../../models/enums/SurveyMode\";\r\nimport { ThunkDispatchProp } from \"../../models/actions/ThunkDispatchProp\";\r\nimport {\r\n getSoftPromptCode,\r\n shouldSetSoftPromptCode,\r\n} from \"../../models/utilities/questionUtilities\";\r\nimport { isQuestionValidatedServerSide } from \"../../models/utilities/validationUtilities\";\r\nimport { evaluateIsVariableVisible } from \"../../redux/thunks/evaluator\";\r\nimport { enableAllMappedVariablesFieldStatus } from \"../../redux/actions\";\r\n\r\ninterface Props extends ControlProps, ThunkDispatchProp {}\r\n\r\ninterface State {\r\n validationResult?: ValidationResultModel;\r\n openEndValue: { [key: string]: string };\r\n expandedRowsIndices: number[];\r\n}\r\nexport class GridControl extends BaseControl<Props, State> {\r\n validateSignal = new Signal<ValidationOptionsModel, ValidationResultModel>();\r\n tableRef: HTMLTableElement;\r\n accordionRefs: HTMLDivElement[] = [];\r\n\r\n constructor(props: Props) {\r\n super(props);\r\n this.state = {\r\n openEndValue: {},\r\n expandedRowsIndices: [],\r\n };\r\n }\r\n\r\n initializeQuestion(question: QuestionModel, props: Props): void {\r\n super.initializeQuestion(question, props);\r\n this.setState(\r\n {\r\n openEndValue: {},\r\n validationResult: null,\r\n expandedRowsIndices: [],\r\n },\r\n () => this.updateData(props),\r\n );\r\n this.initializeOpenEnd(question, props);\r\n this.setDefaultValues(props.sequencedVariables);\r\n // Remove mentions from rows no longer available\r\n each(question.rows, (r) => {\r\n if (\r\n this.axisHasMentions(r) &&\r\n every(props.sequencedRows, (sequencedRow) => sequencedRow.index !== r.index)\r\n ) {\r\n each(r.variables, (v) => {\r\n this.setMentions(this.props, v.name, (m) => m.clear());\r\n });\r\n }\r\n });\r\n }\r\n\r\n setOpenEndState = (openEndName: string, openEndValue: string) => {\r\n this.setState((prevState) => {\r\n const newState = { ...prevState };\r\n newState.openEndValue[openEndName] = openEndValue;\r\n return newState;\r\n });\r\n };\r\n\r\n initializeOpenEnd(question: QuestionModel, props: Props) {\r\n question.rows.forEach((row) => {\r\n row.variables.forEach((variable) => {\r\n const answersWithOpenEnd = variable.choiceList.filter((answer) =>\r\n hasSetting(answer, \"OpenEndType\"),\r\n );\r\n answersWithOpenEnd.forEach((answer) => {\r\n const openEndName = openEndVariableName(answer);\r\n const mentions = this.getMentions(props, openEndName);\r\n const mention = mentions != null ? mentions[0] : undefined;\r\n const openEndValue = !isNullOrEmpty(mention?.openEnd) ? mention.openEnd : \"\";\r\n if (this.state.openEndValue[openEndName] !== openEndValue) {\r\n this.setOpenEndState(openEndName, openEndValue);\r\n }\r\n });\r\n });\r\n\r\n if (!hasSetting(row, \"OpenEndType\")) {\r\n return;\r\n }\r\n\r\n const openEndName = openEndVariableName(row);\r\n const mentions = this.getMentions(props, openEndName);\r\n const mention = mentions != null ? mentions[0] : undefined;\r\n const openEndValue = !isNullOrEmpty(mention?.openEnd) ? mention.openEnd : \"\";\r\n if (this.state.openEndValue[openEndName] !== openEndValue) {\r\n this.setOpenEndState(openEndName, openEndValue);\r\n }\r\n });\r\n }\r\n\r\n UNSAFE_componentWillReceiveProps(nextProps: Props) {\r\n this.updateData(nextProps);\r\n this.initializeOpenEnd(nextProps.question, nextProps);\r\n super.UNSAFE_componentWillReceiveProps(nextProps);\r\n }\r\n\r\n componentDidUpdate(prevProps: Props, prevState: State) {\r\n super.componentDidUpdate(prevProps, prevState);\r\n const rows = this.props.sequencedRows;\r\n // When validation result changes and is invalid\r\n if (\r\n this.state.validationResult &&\r\n !this.state.validationResult.isValid &&\r\n !isEqual(prevState.validationResult, this.state.validationResult)\r\n ) {\r\n if (!this.hasMaxAnswers(this.props.question)) {\r\n // Expand all rows to make error messages visible\r\n this.setState((state) => {\r\n const newState = { ...state };\r\n newState.expandedRowsIndices = [\r\n ...rows.filter((r) => !isHeaderRow(r)).map((r) => r.index),\r\n ];\r\n return newState;\r\n });\r\n } else {\r\n // Scroll to the first invalid row\r\n const firstInvalidRow = rows.find(\r\n (row) => !isHeaderRow(row) && this.isRowInvalid(this.state, this.props, row),\r\n );\r\n if (firstInvalidRow && !this.isRowExpanded(firstInvalidRow.index)) {\r\n this.onExpandRow(firstInvalidRow);\r\n }\r\n }\r\n }\r\n }\r\n\r\n didUpdateMentions(question: QuestionModel, prevProps: Props) {\r\n super.didUpdateMentions(question, prevProps);\r\n const { mentions } = this.props;\r\n const { mentions: prevMentions } = prevProps;\r\n const mentionKeys = Object.keys(mentions);\r\n const prevMentionKeys = Object.keys(prevMentions);\r\n if (this.hasMaxAnswers(question)) {\r\n // Get the new/changed mention ir order to decide which row should be collapsed\r\n const newMentions = difference(mentionKeys, prevMentionKeys);\r\n if (newMentions.length > 0) {\r\n newMentions.forEach((variableName) => {\r\n this.openNextRow(variableName);\r\n });\r\n } else {\r\n mentionKeys.forEach((variableName) => {\r\n if (!isEqual(mentions[variableName], prevMentions[variableName])) {\r\n this.openNextRow(variableName);\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n setDefaultValues(variables: VariableModel[]) {\r\n variables\r\n .filter((variable) => !this.hasMentions(this.props, variable.name))\r\n .forEach((variable) => {\r\n const { choiceList = [] } = variable;\r\n const defaultVisibleChoices = choiceList.filter(\r\n (choice) => getSettingBoolean(choice, \"Default\") && isVisible(choice),\r\n );\r\n this.setChoicesAsMentions(variable, defaultVisibleChoices);\r\n });\r\n }\r\n\r\n updateData(props: Props) {\r\n const { sequencedRows } = props;\r\n if (isEmpty(this.state.expandedRowsIndices)) {\r\n this.setState((s, p) => {\r\n const newState = { ...s };\r\n if (\r\n !this.hasMaxAnswers(p.question) ||\r\n getSettingBoolean(p.question, \"DisableAutoCollapse\")\r\n ) {\r\n newState.expandedRowsIndices.push(\r\n ...sequencedRows.filter((row) => !isHeaderRow(row)).map((row) => row.index),\r\n );\r\n } else {\r\n const row = sequencedRows.find((r) => !isHeaderRow(r));\r\n if (row) {\r\n newState.expandedRowsIndices.push(row.index);\r\n }\r\n }\r\n return newState;\r\n });\r\n }\r\n }\r\n\r\n isRowInvalid(state: State, props: Props, row: AxisModel) {\r\n return props.sequencedColumns.some((column) => {\r\n const cellVariable = variableForCell(row, column);\r\n const cellErrors = state.validationResult.errorsByVariableName[cellVariable.name];\r\n return cellErrors && cellErrors.length > 0;\r\n });\r\n }\r\n\r\n hasMaxAnswers = (question: QuestionModel) => this.getMaxAnswers(question) > 0;\r\n\r\n getMaxAnswers = (question: QuestionModel) => {\r\n if (isSingleChoice(question)) {\r\n return 1;\r\n }\r\n const rows = this.props.sequencedRows;\r\n const maxAnswers = getSettingNumber(question, \"MaxAllowedAnswers\", -1);\r\n const noneHeaderRows = rows.filter((row) => !isHeaderRow(row));\r\n const numberOfChoices = noneHeaderRows[0]?.variables[0]?.choiceList?.length ?? 0;\r\n\r\n return min([maxAnswers, numberOfChoices].filter(Boolean));\r\n };\r\n\r\n onIsRowSelected = (row: AxisModel) => {\r\n if (row.variables[0] == null) {\r\n return false;\r\n }\r\n return this.getMention(this.props, row.variables[0].name) != null;\r\n };\r\n\r\n onOpenEndChange = (answer: any, event: any) => {\r\n const { value } = event.target;\r\n this.setState((state) => {\r\n const newState = { ...state };\r\n newState.openEndValue = {\r\n ...newState.openEndValue,\r\n [openEndVariableName(answer)]: this.truncateOpenEnd(answer, value),\r\n };\r\n return newState;\r\n });\r\n };\r\n\r\n onOpenEndBlur = (answer: any) => {\r\n const openEndName = openEndVariableName(answer);\r\n const openEnd = this.state.openEndValue[openEndName];\r\n if (isNullOrEmpty(openEnd)) {\r\n this.setMentions(this.props, openEndName, (mentions) => mentions.clear());\r\n } else {\r\n this.setMentions(this.props, openEndName, (mentions) =>\r\n mentions.set(getSettingString(answer, \"OpenEndAnswerCode\", \"0\"), openEnd.trim()),\r\n );\r\n }\r\n };\r\n\r\n onExpandRow = (row: AxisModel) => {\r\n this.setState((state) => {\r\n const newState = { ...state };\r\n newState.expandedRowsIndices = [...state.expandedRowsIndices];\r\n if (this.isRowExpanded(row.index, newState)) {\r\n pull(newState.expandedRowsIndices, row.index);\r\n } else {\r\n newState.expandedRowsIndices = [row.index];\r\n }\r\n return newState;\r\n });\r\n };\r\n\r\n onAddAccordionRef = (index: number, ref: HTMLDivElement) => {\r\n this.accordionRefs[index] = ref;\r\n };\r\n\r\n openNextRow(currentRowVariableName: string) {\r\n if (\r\n this.getMentions(this.props, currentRowVariableName).length ===\r\n this.getMaxAnswers(this.props.question)\r\n ) {\r\n const rows = this.props.sequencedRows;\r\n const currentRow = rows.find((row) =>\r\n row.variables.map((variable) => variable.name).includes(currentRowVariableName),\r\n );\r\n if (currentRow && !hasOpenEnd(currentRow)) {\r\n const nextRow = rows.find(\r\n (row, index) =>\r\n !isHeaderRow(row) &&\r\n index > this.getRowPosition(currentRow) &&\r\n !this.axisHasMentions(row),\r\n );\r\n if (nextRow) {\r\n if (!this.isRowExpanded(nextRow.index)) {\r\n this.adjustScrollPosition(currentRow);\r\n this.onExpandRow(nextRow);\r\n }\r\n } else {\r\n this.onExpandRow(currentRow);\r\n }\r\n }\r\n }\r\n }\r\n\r\n adjustScrollPosition = (row: AxisModel) => {\r\n const ref = this.accordionRefs[row.index];\r\n if (ref) {\r\n const rects = ref.getBoundingClientRect();\r\n if (rects.top < 0) {\r\n const { mode } = __getStore__().getState().application;\r\n const bannerHeight = mode !== SurveyMode.Normal ? -38 : 0;\r\n const container = getContainerDiv();\r\n container.scrollTo(\r\n 0,\r\n container.scrollTop + rects.top + rects.height + bannerHeight,\r\n );\r\n }\r\n }\r\n };\r\n\r\n getRowPosition = (row: AxisModel) =>\r\n this.props.sequencedRows.findIndex((r) => r.index === row.index);\r\n\r\n isRowExpanded = (rowIndex: number, state: State = this.state) =>\r\n state.expandedRowsIndices.includes(rowIndex);\r\n\r\n cellHasMentions(row: AxisModel, column: AxisModel) {\r\n const { question } = this.props;\r\n const softPromptCode = shouldSetSoftPromptCode(question)\r\n ? getSoftPromptCode(question)\r\n : null;\r\n const variable = variableForCell(row, column);\r\n const mentions = this.getMentions(this.props, variable.name);\r\n return mentions.some((mention) => {\r\n const isMentionSoftPrompt = mention.value === softPromptCode;\r\n const mentionHasValue =\r\n mention.value !== undefined && mention.value !== null && !isMentionSoftPrompt;\r\n const mentionHasOpenEnd =\r\n mention.openEnd !== undefined &&\r\n mention.openEnd !== null &&\r\n mention.openEnd.length > 0;\r\n return mentionHasValue || mentionHasOpenEnd;\r\n });\r\n }\r\n\r\n onShouldHideCell = (row: AxisModel, column: AxisModel) => {\r\n const variable = variableForCell(row, column);\r\n if (!variable || variable.skipLogic == null) {\r\n return false;\r\n }\r\n const { dispatch } = this.props;\r\n const isHidden = !dispatch(evaluateIsVariableVisible(variable));\r\n\r\n if (isHidden) {\r\n if (this.hasMentions(this.props, variable.name)) {\r\n const variableAllMentions = this.getLatestMentionsForVariableName(variable.name);\r\n dispatch(enableAllMappedVariablesFieldStatus(variable.name, variableAllMentions));\r\n\r\n this.setMentions(this.props, variable.name, (m) => m.clear());\r\n }\r\n }\r\n\r\n return isHidden;\r\n };\r\n\r\n isChoiceSelected = (variable: VariableModel, choice: ChoiceModel) => {\r\n const mentions = this.getMentions(this.props, variable.name);\r\n return mentions.some((mention) => mention.value === choice.value);\r\n };\r\n\r\n isColumnChoiceSelected = (column: AxisModel, choice: ChoiceModel) =>\r\n this.props.sequencedRows.some((row) => {\r\n if (row.type !== RowType.Variable) {\r\n return false;\r\n }\r\n const cellVariable = variableForCell(row, column);\r\n return this.isChoiceSelected(cellVariable, choice);\r\n });\r\n\r\n onShouldDisableCell = (row: AxisModel, column: AxisModel) => {\r\n const { sequencedColumns } = this.props;\r\n const isCellDisabled = sequencedColumns\r\n .filter((sequencedColumn) => sequencedColumn.variables[0])\r\n .some((sequencedColumn) => {\r\n const cellVariable = variableForCell(row, sequencedColumn);\r\n return cellVariable.choiceList.some((choice) => {\r\n const disabledColumns = getSettingString(choice, \"DisableColumns\");\r\n if (!isNullOrEmpty(disabledColumns)) {\r\n const mentions = this.getMentions(this.props, cellVariable.name);\r\n if (mentions.some((m) => m.value === choice.value)) {\r\n const isDisabled = disabledColumns\r\n .replace(/\\s/g, \"\")\r\n .split(\",\")\r\n .find((c) => c === column.index.toString());\r\n if (isDisabled) {\r\n const currentCell = variableForCell(row, column);\r\n const currentMentions = this.getMentions(\r\n this.props,\r\n currentCell.name,\r\n );\r\n if (currentMentions && currentMentions.length > 0) {\r\n this.setMentions(this.props, currentCell.name, (m) =>\r\n m.clear(),\r\n );\r\n }\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n });\r\n });\r\n return isCellDisabled;\r\n };\r\n\r\n setChoicesAsMentions = (element: ElementWithSettings, choices: ChoiceModel[]) => {\r\n const values = choices.map((choice) => ({ value: choice.value }));\r\n if (values.length) {\r\n this.setMentions(\r\n this.props,\r\n element.name,\r\n (mentions) => mentions.clear().add(values),\r\n undefined,\r\n true,\r\n );\r\n }\r\n };\r\n\r\n validate(options?: ValidationOptionsModel): ValidationResultModel {\r\n const { question, useClientValidation } = this.props;\r\n question.variables.forEach(this.removeUnavailableMentions);\r\n this.removeHiddenOrDisabledOpenEndMentions(this.props);\r\n\r\n if (isQuestionValidatedServerSide(question.type, useClientValidation)) {\r\n return new ValidationBuilder().build();\r\n }\r\n\r\n const softPromptValidationResult = this.validateSoftPrompt(this.props);\r\n if (!softPromptValidationResult.isValid) {\r\n return softPromptValidationResult;\r\n }\r\n const isSingleStarRatingQuestion =\r\n question.type === QuestionType.StarRatingGrid && question.variables.length === 1;\r\n if (isSingleStarRatingQuestion) {\r\n const row = find(question.rows, (r) => !isEmpty(r.variables));\r\n const [column] = question.columns;\r\n return this.onValidateCell(row, column);\r\n }\r\n const results = this.validateSignal.dispatch(options);\r\n const result = results.reduce(\r\n (a, b) => ({\r\n isValid: a.isValid && b.isValid,\r\n errorsByVariableName: { ...a.errorsByVariableName, ...b.errorsByVariableName },\r\n }),\r\n { isValid: true, errorsByVariableName: {} },\r\n );\r\n if (!options || !options.silent) {\r\n this.setState((prevState) => ({ ...prevState, validationResult: result }));\r\n }\r\n return result;\r\n }\r\n\r\n removeHiddenOrDisabledOpenEndMentions(props: Props) {\r\n const { sequencedRows: rows, sequencedColumns: columns } = props;\r\n [...rows, ...columns].forEach((axisItem) => {\r\n if (axisItem.openEndActive !== false) {\r\n return;\r\n }\r\n const openEndVariable = openEndVariableName(axisItem);\r\n if (isNullOrEmpty(openEndVariable)) {\r\n return;\r\n }\r\n const openEndHasMentions = this.hasMentions(this.props, openEndVariable);\r\n if (!openEndHasMentions) {\r\n return;\r\n }\r\n this.setMentions(this.props, openEndVariable, (mentions) => mentions.clear());\r\n });\r\n }\r\n\r\n validateRowOpenEnd = (\r\n row: AxisModel,\r\n openEndValue: { [key: string]: string },\r\n ): ValidationResultModel => {\r\n if (hasSetting(row, \"OpenEndType\")) {\r\n const openEndName = openEndVariableName(row);\r\n const openEnd = openEndValue[openEndName];\r\n\r\n if (row.openEndActive) {\r\n if (!isNullOrEmpty(openEnd.trim()) || this.axisHasMentions(row)) {\r\n const result = this.validateOpenEnd(openEnd, row, openEndName);\r\n if (!result.isValid) {\r\n return result;\r\n }\r\n }\r\n } else if (!isNullOrEmpty(openEnd)) {\r\n this.setMentions(this.props, openEndName, (mentions) => mentions.clear());\r\n }\r\n }\r\n return new ValidationBuilder().build();\r\n };\r\n\r\n onValidateRowOpenEnd = (row: AxisModel): ValidationResultModel =>\r\n this.validateRowOpenEnd(row, this.state.openEndValue);\r\n\r\n onValidateChoiceOpenEnd = (column: AxisModel, choice: ChoiceModel): ValidationResultModel => {\r\n // Check if the choice has an enforced open-end.\r\n if (hasSetting(choice, \"OpenEndType\")) {\r\n // Check if this choice is selected in any row.\r\n const choiceSelected = this.isColumnChoiceSelected(column, choice);\r\n const openEndVariable = openEndVariableName(choice);\r\n const openEnd = this.state.openEndValue[openEndVariable];\r\n\r\n if (choiceSelected || !isNullOrEmpty(openEnd.trim())) {\r\n const result = this.validateOpenEnd(openEnd, choice, openEndVariable);\r\n if (!result.isValid) {\r\n return result;\r\n }\r\n }\r\n }\r\n return new ValidationBuilder().build();\r\n };\r\n\r\n onValidateCell = (row: AxisModel, column: AxisModel): ValidationResultModel => {\r\n const { questionnaire, question, language } = this.props;\r\n const validation = new ValidationBuilder();\r\n\r\n const isAnswerRequired =\r\n this.isAnswerRequired(questionnaire, question) &&\r\n this.isAxisAnswerRequired(row) &&\r\n this.isAxisAnswerRequired(column);\r\n const isCellDisabled = this.onShouldDisableCell(row, column);\r\n const cellHasMentions = this.cellHasMentions(row, column);\r\n\r\n // Validate right away if nothing is required.\r\n if (isCellDisabled || (!isAnswerRequired && !cellHasMentions)) {\r\n return validation.build();\r\n }\r\n\r\n const variable = question.variables.find(\r\n (unfilteredVariable) => row.variables[0].name === unfilteredVariable.name,\r\n );\r\n\r\n const cellVariable = variableForCell(row, column);\r\n const customError = translate(question, \"CustomErrorMessage\", language);\r\n\r\n if (cellHasMentions) {\r\n // Check the minimum and maximum answers if an answer was selected\r\n const mentions = this.getMentions(this.props, cellVariable.name);\r\n // For HybridGrid, the min and max are defined per column\r\n const minValue = this.minValue() || column.settings.MinRequiredAnswers;\r\n const maxValue = this.maxValue() || column.settings.MaxAllowedAnswers;\r\n if (minValue !== null && mentions.length < minValue) {\r\n return validation\r\n .fail(cellVariable.name, customError || \"InvalidChoicesMin\", {\r\n min: String(minValue),\r\n })\r\n .build();\r\n }\r\n if (maxValue !== null && mentions.length > maxValue) {\r\n return validation\r\n .fail(cellVariable.name, customError || \"InvalidChoicesMax\", {\r\n max: String(maxValue),\r\n })\r\n .build();\r\n }\r\n } else {\r\n const { choiceList } = variable;\r\n const invisibleDefaultChoices = choiceList.filter(\r\n (choice) => getSettingBoolean(choice, \"Default\") && !isVisible(choice),\r\n );\r\n if (invisibleDefaultChoices.length) {\r\n this.setChoicesAsMentions(variable, invisibleDefaultChoices);\r\n return validation.build();\r\n }\r\n return this.validateSoftPrompt(this.props, [cellVariable]);\r\n }\r\n\r\n return validation.build();\r\n };\r\n\r\n renderQuestion(): JSX.Element {\r\n return (\r\n <GridRenderer\r\n {...getRendererProps(this.props)}\r\n columns={this.props.sequencedColumns}\r\n rows={this.props.sequencedRows}\r\n validateSignal={this.validateSignal}\r\n isRowSelected={this.onIsRowSelected}\r\n expandRow={this.onExpandRow}\r\n addAccordionRef={this.onAddAccordionRef}\r\n expandedRowsIndices={this.state.expandedRowsIndices}\r\n shouldHideCell={this.onShouldHideCell}\r\n shouldDisableCell={this.onShouldDisableCell}\r\n validationResult={this.state.validationResult}\r\n openEndValue={this.state.openEndValue}\r\n validateCell={this.onValidateCell}\r\n validateRowOpenEnd={this.onValidateRowOpenEnd}\r\n validateChoiceOpenEnd={this.onValidateChoiceOpenEnd}\r\n onOpenEndBlur={this.onOpenEndBlur}\r\n onOpenEndChange={this.onOpenEndChange}\r\n showSoftPrompt={this.props.showSoftPrompt}\r\n matrix={this.props.matrix}\r\n isColumnChoiceSelected={this.isColumnChoiceSelected}\r\n max={this.props.max}\r\n sequencedVariables={this.props.sequencedVariables}\r\n />\r\n );\r\n }\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\n\r\nexport default createUseStyles({\r\n imageAreaSelection: {\r\n composes: \"image-area__selection\",\r\n content: \"\",\r\n cursor: \"pointer\",\r\n display: \"inline-block\",\r\n lineHeight: 0,\r\n maxWidth: \"100%\",\r\n opacity: 0,\r\n outline: \"none\",\r\n position: \"absolute\",\r\n transition: \"background 200ms, opacity 200ms\",\r\n },\r\n imageAreaSelectionSelected: {\r\n background: ({ theme }) => theme.PrimaryColor,\r\n composes: \"image-area__selection--selected\",\r\n opacity: 0.3,\r\n },\r\n imageAreaSelectionActive: {\r\n background: \"#999\",\r\n composes: \"image-area__selection--active\",\r\n opacity: 0.5,\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport classnames from \"classnames\";\r\nimport { RendererProps } from \"../BaseRenderer\";\r\nimport useStyle from \"./ImageAreaSelectionRenderer.styles\";\r\n\r\ninterface Props extends RendererProps {\r\n onSelect?(): void;\r\n selected?: boolean;\r\n top: string;\r\n left: string;\r\n width: string;\r\n height: string;\r\n color: string;\r\n text: string;\r\n variableName?: string;\r\n areaCode?: string;\r\n}\r\n\r\nexport default function ImageAreaSelectionRenderer(props: Props) {\r\n const divRef = React.useRef();\r\n const { text, selected, onSelect, variableName } = props;\r\n const theme = useTheme();\r\n const classes = useStyle({ theme });\r\n\r\n // Style-specific props\r\n const { top, left, width, height, color, areaCode } = props;\r\n const style = {\r\n top: top || \"0px\",\r\n left: left || \"0px\",\r\n width,\r\n height,\r\n backgroundColor: selected ? color : null,\r\n };\r\n\r\n const [active, setActive] = React.useState(false);\r\n\r\n return (\r\n <div\r\n id={variableName}\r\n data-areacode={areaCode}\r\n ref={divRef}\r\n role=\"checkbox\"\r\n aria-checked={selected}\r\n tabIndex={0}\r\n aria-label={text}\r\n className={classnames(\r\n classes.imageAreaSelection,\r\n active && classes.imageAreaSelectionActive,\r\n selected && classes.imageAreaSelectionSelected,\r\n )}\r\n onKeyDown={(event) => {\r\n if (event.target !== divRef.current) return;\r\n if (event.key === \" \") {\r\n onSelect();\r\n event.preventDefault();\r\n }\r\n }}\r\n onMouseDown={(event) => {\r\n onSelect();\r\n event.preventDefault();\r\n }}\r\n onFocus={() => setActive(true)}\r\n onBlur={() => setActive(false)}\r\n onMouseOver={() => setActive(true)}\r\n onMouseOut={() => setActive(false)}\r\n style={style}\r\n title={text}\r\n />\r\n );\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\nimport { foregroundColor, alpha, controlBackgroundColor, getSpacing } from \"../../../theme/Mixins\";\r\n\r\nexport default createUseStyles({\r\n imageArea: {\r\n border: ({ theme }) => [[theme.BorderWidth, \"solid\", theme.ControlBorderColor]],\r\n borderRadius: ({ theme }) => theme.BorderRadius,\r\n composes: \"image-area\",\r\n display: \"inline-block\",\r\n fontSize: 0,\r\n lineHeight: 0,\r\n maxWidth: \"100%\",\r\n overflow: \"hidden\",\r\n position: \"relative\",\r\n marginTop: ({ theme }) => getSpacing(theme, 0, theme.QuestionSpacing?.WithinComponents),\r\n },\r\n imageAreaImage: {\r\n composes: \"image-area__image\",\r\n lineHeight: 0,\r\n maxWidth: \"100%\",\r\n position: \"relative\",\r\n },\r\n imageAreaLegend: {\r\n composes: \"image-area-legend\",\r\n background: ({ theme }) => alpha(theme.ControlBackground, theme.ControlAlpha),\r\n border: ({ theme }) => [[theme.BorderWidth, \"solid\", theme.ControlBorderColor]],\r\n borderRadius: ({ theme }) => theme.BorderRadius,\r\n color: ({ theme }) => foregroundColor(theme, controlBackgroundColor(theme)),\r\n display: \"flex\",\r\n marginTop: ({ theme }) => getSpacing(theme, 18, theme.QuestionSpacing?.WithinComponents),\r\n padding: 9,\r\n },\r\n dynamicImageAreaLegend: {\r\n flexWrap: \"wrap\",\r\n },\r\n imageAreaLegendTitle: {\r\n composes: \"image-area-legend__title\",\r\n alignSelf: \"center\",\r\n flex: 1,\r\n fontWeight: 600,\r\n margin: [[0, 20]],\r\n },\r\n imageAreaLegendList: {\r\n display: \"flex\",\r\n flexWrap: \"wrap\",\r\n flex: 3,\r\n composes: \"image-area-legend__list\",\r\n },\r\n initialFlex: {\r\n flex: \"auto\",\r\n },\r\n imageAreaLegendContainer: {\r\n composes: \"image-area-legend__container\",\r\n margin: [[4, 20]],\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n },\r\n imageAreaLegendColor: {\r\n borderRadius: ({ theme }) => Math.min(theme.BorderRadius, 12.5),\r\n composes: \"image-area-legend__color\",\r\n display: \"inline-block\",\r\n height: 25,\r\n marginRight: 15,\r\n verticalAlign: \"middle\",\r\n width: 25,\r\n },\r\n imageAreaLegendText: {\r\n composes: \"image-area-legend__text\",\r\n display: \"inline-block\",\r\n verticalAlign: \"middle\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport classnames from \"classnames\";\r\nimport { RendererProps } from \"../BaseRenderer\";\r\nimport { translate } from \"../../../models/utilities/translationUtilities\";\r\nimport { getSettingString } from \"../../../models/utilities/settingUtilities\";\r\nimport useStyle from \"./ImageAreaRenderer.styles\";\r\nimport useQuestion from \"../../../hooks/useQuestion\";\r\nimport { QuestionType } from \"../../../models/enums/QuestionType\";\r\nimport useDimensionContext from \"../../../hooks/useDimensionContext\";\r\nimport { RecalledText } from \"../../../containers/shared/RecalledText\";\r\nimport { ChoiceModel } from \"../../../models/ChoiceModel\";\r\n\r\ninterface Props extends RendererProps {\r\n imageSrc: string;\r\n legendLabel: string;\r\n height: string;\r\n width: string;\r\n choices: ChoiceModel[];\r\n}\r\n\r\nfunction Legend(props: Props) {\r\n const theme = useTheme();\r\n const classes = useStyle({ theme });\r\n const { choices, legendLabel, language } = props;\r\n const dimension = useDimensionContext();\r\n\r\n const legendItems = Object.keys(choices).map((key) => {\r\n const choice: ChoiceModel = choices[key];\r\n\r\n return (\r\n <div key={key} className={classes.imageAreaLegendContainer}>\r\n <div\r\n id={choice.elementId}\r\n className={classes.imageAreaLegendColor}\r\n style={{ background: getSettingString(choices[key], \"Color\") }}\r\n />\r\n <RecalledText\r\n text={translate(choices[key], \"TEXT\", language)}\r\n render={(recalled) => (\r\n <div\r\n className={classes.imageAreaLegendText}\r\n dangerouslySetInnerHTML={{ __html: recalled }}\r\n />\r\n )}\r\n />\r\n </div>\r\n );\r\n });\r\n\r\n return (\r\n <>\r\n {dimension && dimension.maxWidth(670) ? (\r\n <div\r\n className={classnames(classes.imageAreaLegend, classes.dynamicImageAreaLegend)}\r\n >\r\n <div className={classnames(classes.imageAreaLegendTitle, classes.initialFlex)}>\r\n Legend\r\n </div>\r\n <div className={classnames(classes.imageAreaLegendList, classes.initialFlex)}>\r\n {legendItems}\r\n </div>\r\n </div>\r\n ) : (\r\n <div className={classes.imageAreaLegend}>\r\n <div className={classes.imageAreaLegendTitle}>{legendLabel}</div>\r\n <div className={classes.imageAreaLegendList}>{legendItems}</div>\r\n </div>\r\n )}\r\n </>\r\n );\r\n}\r\n\r\nexport default function ImageAreaRenderer(props: Props) {\r\n const theme = useTheme();\r\n const classes = useStyle({ theme });\r\n const { imageSrc, children, height, width } = props;\r\n const question = useQuestion();\r\n const displayLegend = question.type === QuestionType.ImageAreaEvaluator;\r\n\r\n return (\r\n <>\r\n <div className={classes.imageArea} role=\"group\">\r\n <img\r\n className={classes.imageAreaImage}\r\n src={imageSrc}\r\n alt=\"\"\r\n style={{ width, height }}\r\n />\r\n {children}\r\n </div>\r\n {displayLegend && <Legend {...props} />}\r\n </>\r\n );\r\n}\r\n","import React from \"react\";\r\nimport { DispatchProp } from \"react-redux\";\r\nimport { isEmpty } from \"../../utils/lodash\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { BaseControl, ControlProps } from \"./BaseControl\";\r\nimport { ChoiceModel } from \"../../models/ChoiceModel\";\r\nimport { QuestionType } from \"../../models/enums/QuestionType\";\r\nimport { ElementWithSettings } from \"../../models/ElementWithSettings\";\r\nimport {\r\n getSettingBoolean,\r\n getSettingNumber,\r\n getSettingString,\r\n hasSetting,\r\n} from \"../../models/utilities/settingUtilities\";\r\nimport { getChoice } from \"../../models/utilities/variableUtilities\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\nimport { ValidationBuilder } from \"../../models/builders/ValidationBuilder\";\r\nimport { blurFocusedField } from \"../../utils/index\";\r\nimport { VariableModel } from \"../../models/VariableModel\";\r\nimport { translate } from \"../../models/utilities/translationUtilities\";\r\nimport { getRendererProps } from \"../renderers/BaseRenderer\";\r\nimport { ValidationOptionsModel } from \"../../models/ValidationOptionsModel\";\r\nimport ImageAreaSelectionRenderer from \"../renderers/v2/ImageAreaSelectionRenderer\";\r\nimport ImageAreaRenderer from \"../renderers/v2/ImageAreaRenderer\";\r\nimport { isQuestionValidatedServerSide } from \"../../models/utilities/validationUtilities\";\r\n\r\ninterface Props extends ControlProps, DispatchProp {}\r\n\r\ninterface State {\r\n filteredAnswers: ChoiceModel[];\r\n}\r\n\r\nexport class ImageAreaControl extends BaseControl<Props, State> {\r\n onSelectArea(variable: VariableModel) {\r\n const { choiceList } = variable;\r\n let choice = this.getAreaCurrentChoice(this.props, variable);\r\n const nextIndex =\r\n choice === undefined ? 0 : choiceList.findIndex((c) => c.value === choice.value) + 1;\r\n\r\n if (nextIndex >= choiceList.length) {\r\n this.setMentions(this.props, variable.name, (mentions) => mentions.clear());\r\n return;\r\n }\r\n choice = choiceList[nextIndex];\r\n this.setMentions(this.props, variable.name, (mentions) => mentions.set(choice.value));\r\n }\r\n\r\n onSelectChoice(choice: ChoiceModel) {\r\n blurFocusedField();\r\n const { question } = this.props;\r\n const [variable] = question.variables;\r\n const mentions = this.getMentions(this.props);\r\n if (\r\n hasSetting(question, \"MaxAllowedAnswers\") &&\r\n mentions.length >= getSettingNumber(question, \"MaxAllowedAnswers\") &&\r\n !mentions.find((m) => m.value === choice.value)\r\n ) {\r\n const [firstMention] = mentions;\r\n this.setMentions(this.props, variable.name, (m) => m.toggle(firstMention.value));\r\n }\r\n\r\n this.setMentions(this.props, variable.name, (m) => {\r\n const isSelectedExclusive = getSettingBoolean(choice, \"Exclusive\");\r\n if (variable.choiceList !== undefined) {\r\n variable.choiceList.forEach((c) => {\r\n if (isSelectedExclusive || getSettingBoolean(c, \"Exclusive\")) {\r\n m = m.removeValue(c.value);\r\n }\r\n });\r\n }\r\n return m.toggle(choice.value);\r\n });\r\n }\r\n\r\n getAreaCurrentChoice(props: Props, area: VariableModel) {\r\n const value = this.getMentionValue(props, area.name);\r\n return getChoice(area, value);\r\n }\r\n\r\n isChoiceSelected(choice: ChoiceModel) {\r\n return this.getMentions(this.props).some((m) => m.value === choice.value);\r\n }\r\n\r\n getDimension(element: ElementWithSettings, name: string) {\r\n const dimension = getSettingNumber(element, name) * 100;\r\n return Number.isNaN(dimension) ? \"0\" : `${dimension}%`;\r\n }\r\n\r\n renderMapChoice(question: QuestionModel, choice: ChoiceModel) {\r\n return (\r\n <ImageAreaSelectionRenderer\r\n {...getRendererProps(this.props)}\r\n key={choice.index}\r\n selected={this.isChoiceSelected(choice)}\r\n top={this.getDimension(choice, \"Top\")}\r\n width={this.getDimension(choice, \"Width\")}\r\n height={this.getDimension(choice, \"Height\")}\r\n left={this.getDimension(choice, \"Left\")}\r\n color={getSettingString(choice, \"Color\")}\r\n onSelect={() => this.onSelectChoice(choice)}\r\n text={translate(choice, \"TEXT\", this.props.language)}\r\n variableName={choice.elementId}\r\n />\r\n );\r\n }\r\n\r\n renderMapArea(question: QuestionModel, variable: VariableModel) {\r\n const choice = this.getAreaCurrentChoice(this.props, variable);\r\n\r\n return (\r\n <ImageAreaSelectionRenderer\r\n {...getRendererProps(this.props)}\r\n key={variable.index}\r\n selected={choice !== undefined}\r\n top={this.getDimension(variable, \"Top\")}\r\n width={this.getDimension(variable, \"Width\")}\r\n height={this.getDimension(variable, \"Height\")}\r\n left={this.getDimension(variable, \"Left\")}\r\n color={choice !== undefined ? getSettingString(choice, \"Color\") : null}\r\n onSelect={() => this.onSelectArea(variable)}\r\n text={translate(variable, \"TEXT\", this.props.language)}\r\n variableName={variable.elementId}\r\n areaCode={choice !== undefined ? choice.value : \"none\"}\r\n />\r\n );\r\n }\r\n\r\n renderMap(question: QuestionModel) {\r\n const variables = this.availableAreas(this.props);\r\n if (question.type === QuestionType.ImageAreaEvaluator) {\r\n return variables.map((variable) => this.renderMapArea(question, variable));\r\n }\r\n const [firstVariable] = variables;\r\n const choiceList = firstVariable ? firstVariable.choiceList : [];\r\n return choiceList.map((answer) => this.renderMapChoice(question, answer));\r\n }\r\n\r\n availableAreas = (props: Props) => {\r\n const { question, sequencedVariables } = props;\r\n if (question.type === QuestionType.ImageAreaEvaluator) {\r\n return sequencedVariables.filter((v) => !isEmpty(v.settings));\r\n }\r\n return sequencedVariables.filter((v) => v.choiceList && v.choiceList.length > 0);\r\n };\r\n\r\n renderQuestion(question: QuestionModel) {\r\n const { language } = this.props;\r\n\r\n return (\r\n <ImageAreaRenderer\r\n {...getRendererProps(this.props)}\r\n choices={this.props.sequencedVariables[0].choiceList}\r\n imageSrc={translate(question, \"ImageUrl\", language)}\r\n legendLabel={translate(question, \"LegendLabel\", language, \"Legend\")}\r\n height={getSettingString(question, \"Height\")}\r\n width={getSettingString(question, \"Width\")}\r\n >\r\n {this.renderMap(question)}\r\n </ImageAreaRenderer>\r\n );\r\n }\r\n\r\n validate(options?: ValidationOptionsModel): ValidationResultModel {\r\n const { questionnaire, question, showSoftPrompt, useClientValidation } = this.props;\r\n const bypassClientValidation = isQuestionValidatedServerSide(\r\n question.type,\r\n useClientValidation,\r\n );\r\n\r\n const availableAreas = this.availableAreas(this.props);\r\n\r\n const choices =\r\n question.type === QuestionType.ImageAreaSelector\r\n ? availableAreas[0].choiceList.filter((answer) => this.isChoiceSelected(answer))\r\n : availableAreas\r\n .map((area) => this.getAreaCurrentChoice(this.props, area))\r\n .filter((answer) => answer !== undefined);\r\n\r\n if (this.isSoftPrompt(this.props) && !this.hasMentions(this.props)) {\r\n return this.validateSoftPrompt(this.props);\r\n }\r\n\r\n if (bypassClientValidation) {\r\n return new ValidationBuilder().build();\r\n }\r\n\r\n if (choices.length > 0) {\r\n const min = this.minValue();\r\n const max = this.maxValue();\r\n if (min !== null && max !== null) {\r\n if (choices.length < min || choices.length > max) {\r\n return this.failValidation(availableAreas, \"OutOfBounds\", {\r\n min: String(min),\r\n max: String(max),\r\n });\r\n }\r\n } else {\r\n if (min !== null && choices.length < min) {\r\n return this.failValidation(availableAreas, \"InvalidChoicesMin\", {\r\n min: String(min),\r\n });\r\n }\r\n if (max !== null && choices.length > max) {\r\n return this.failValidation(availableAreas, \"InvalidChoicesMax\", {\r\n max: String(max),\r\n });\r\n }\r\n }\r\n } else if (!showSoftPrompt && this.isAnswerRequired(questionnaire, question)) {\r\n return this.failValidation(availableAreas, \"IncompleteAnswer\");\r\n }\r\n\r\n const validationResult = new ValidationBuilder().build();\r\n return validationResult;\r\n }\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\nimport * as Mixins from \"../../../theme/Mixins\";\r\n\r\nfunction getRelativeSize(originalSize, { TextFontSize, BaseFontSize }) {\r\n return (TextFontSize * originalSize) / BaseFontSize;\r\n}\r\n\r\nexport default createUseStyles({\r\n fileUploadContainer: {\r\n composes: \"file-upload__container\",\r\n height: ({ theme }) => getRelativeSize(256, theme),\r\n border: ({ theme }) => [[3, \"dashed\", theme.ControlBorderColor]],\r\n borderRadius: ({ theme }) => Math.min(theme.BorderRadius, getRelativeSize(256, theme) / 2),\r\n marginTop: ({ theme }) => Mixins.getSpacing(theme, 0, theme.QuestionSpacing?.WithinComponents),\r\n textAlign: \"center\",\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n flexDirection: \"column\",\r\n },\r\n fileUploadContainerDrag: {\r\n composes: \"file-upload__container--drag\",\r\n border: ({ theme }) => [[3, \"dashed\", theme.PrimaryColor]],\r\n },\r\n fileUploadIcon: {\r\n composes: \"file-upload__icon\",\r\n color: ({ theme }) => theme.PrimaryColor,\r\n margin: [[0, \"auto\"]],\r\n },\r\n fileUploadOptionText: {\r\n composes: \"file-upload__upload-option-text\",\r\n fontWeight: \"bolder\",\r\n margin: [[25, 0]],\r\n },\r\n fileUploadButton: {\r\n \"&:hover\": {\r\n background: ({ theme }) =>\r\n Mixins.darken(theme.PrimaryColor, theme.ActiveHighlightValue),\r\n },\r\n background: ({ theme }) => theme.PrimaryColor,\r\n borderRadius: ({ theme }) => theme.BorderRadius,\r\n color: ({ theme }) => Mixins.foregroundColor(theme, theme.PrimaryColor),\r\n composes: \"file-upload__button\",\r\n cursor: \"pointer\",\r\n fontSize: ({ theme }) => getRelativeSize(15, theme),\r\n fontWeight: 700,\r\n padding: [[10, 40]],\r\n transition: [[\"background\", \"200ms\", \"ease\"]],\r\n },\r\n fileUploadSelectedFile: {\r\n background: ({ theme }) => Mixins.alpha(theme.ControlBackground, theme.ControlAlpha),\r\n borderRadius: ({ theme }) => Math.min(theme.BorderRadius, theme.ChoiceHeight / 2),\r\n boxShadow: ({ theme }) => `0 0 0 ${theme.BorderWidth}px ${theme.ControlBorderColor} inset`,\r\n composes: \"file-upload__selected-file\",\r\n marginTop: 26,\r\n overflow: \"hidden\",\r\n position: \"relative\",\r\n },\r\n fileUploadFileInfo: {\r\n composes: \"file-upload__file-info\",\r\n height: ({ theme }) => theme.ChoiceHeight,\r\n position: \"relative\",\r\n padding: [[0, 26]],\r\n display: \"flex\",\r\n },\r\n fileUploadFileContainer: {\r\n composes: \"file-upload__file-container\",\r\n flexGrow: 1,\r\n minWidth: 0,\r\n },\r\n fileUploadFileContainerInner: {\r\n display: \"inline-flex\",\r\n minWidth: 0,\r\n maxWidth: \"100%\",\r\n cursor: \"pointer\",\r\n transition: \"color 200ms ease\",\r\n outline: \"none\",\r\n },\r\n fileUploadFileIcon: {\r\n composes: \"file-upload__file-icon\",\r\n display: \"inline-block\",\r\n fontSize: 40,\r\n lineHeight: ({ theme }) => `${theme.ChoiceHeight}px`,\r\n marginRight: 20,\r\n \"& img\": {\r\n borderRadius: 3,\r\n height: 38,\r\n objectFit: \"cover\",\r\n paddingTop: 10,\r\n width: 38,\r\n },\r\n },\r\n fileUploadFileDetails: {\r\n composes: \"file-upload__file-details\",\r\n paddingTop: 10,\r\n fontSize: ({ theme }) => getRelativeSize(15, theme),\r\n lineHeight: \"20px\",\r\n display: \"inline-block\",\r\n minWidth: 0,\r\n },\r\n fileUploadFileName: {\r\n composes: \"file-upload__file-name\",\r\n fontWeight: \"bolder\",\r\n textOverflow: \"ellipsis\",\r\n overflowX: \"hidden\",\r\n whiteSpace: \"nowrap\",\r\n },\r\n fileUploadFileSize: {\r\n composes: \"file-upload__file-size\",\r\n },\r\n fileUploadProgress: {\r\n background: ({ theme }) => theme.SecondaryColor,\r\n composes: \"file-upload__progress\",\r\n height: ({ theme }) => theme.ChoiceHeight,\r\n opacity: 0.15,\r\n position: \"absolute\",\r\n transition: \"width 200ms ease 0s\",\r\n zIndex: 2,\r\n },\r\n fileUploadProgressText: {\r\n composes: \"file-upload__progress-text\",\r\n flexShrink: 0,\r\n fontSize: 15,\r\n fontWeight: \"bolder\",\r\n height: \"50%\",\r\n margin: [[\"auto\", 30]],\r\n },\r\n fileUploadValidationError: {\r\n color: ({ theme }) => theme.ErrorColor,\r\n composes: \"file-upload__validation-error\",\r\n extend: \"fileUploadProgressText\",\r\n fontWeight: \"lighter\",\r\n },\r\n fileUploadValidationErrorIcon: {\r\n composes: \"validation-error__icon\",\r\n marginRight: 10,\r\n },\r\n fileUploadDeleteButton: {\r\n composes: \"file-upload__delete-button\",\r\n height: \"50%\",\r\n margin: [[\"auto\", 0]],\r\n color: ({ theme }) => theme.SecondaryColor,\r\n cursor: \"pointer\",\r\n \"&:hover\": {\r\n color: ({ theme }) => Mixins.darken(theme.SecondaryColor, theme.ActiveHighlightValue),\r\n },\r\n \"&:focus-visible\": {\r\n color: ({ theme }) => theme.PrimaryColor,\r\n },\r\n outline: \"none\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport classnames from \"classnames\";\r\nimport { RendererProps } from \"../BaseRenderer\";\r\nimport { FontAwesomeIcon } from \"../../shared/FontAwesome\";\r\nimport useStyle from \"./FileUploadRenderer.styles\";\r\nimport { getFileSize } from \"../../../utils/index\";\r\n\r\ninterface Props extends RendererProps {\r\n variableName?: string;\r\n fileName?: string;\r\n fileSize?: number;\r\n fileType?: string;\r\n fileMime?: string;\r\n fileStatus?: string;\r\n fileBlob?: Blob;\r\n fileProgress?: number;\r\n isValid?: boolean;\r\n onFileOpen?: React.MouseEventHandler;\r\n onClearFile?: Function;\r\n onFileSelection?: (file: File) => void;\r\n browseFilesLabel?: string;\r\n dragFilesLabel?: string;\r\n uploadErrorMessage?: string;\r\n}\r\n\r\nexport default function FileUploadRenderer(props: Props) {\r\n const {\r\n fileName,\r\n fileSize,\r\n fileMime,\r\n fileBlob,\r\n fileProgress,\r\n isValid,\r\n onFileOpen,\r\n onFileSelection,\r\n variableName,\r\n browseFilesLabel,\r\n dragFilesLabel: dragFileLabel,\r\n uploadErrorMessage,\r\n } = props;\r\n const theme = useTheme();\r\n const classes = useStyle({ theme });\r\n const [isDragOver, setIsDragOver] = React.useState(false);\r\n const [dragCounter, setDragCounter] = React.useState(0);\r\n\r\n const isFileSelected = fileName !== undefined && fileName !== \"\";\r\n let browseBtn;\r\n\r\n function onFileSelected(file: File) {\r\n if (file) onFileSelection(file);\r\n }\r\n\r\n function onChange(event: React.ChangeEvent<HTMLInputElement>) {\r\n onFileSelected(event.target.files[0]);\r\n }\r\n\r\n function onDrop(event: React.DragEvent) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n if (event.dataTransfer.files && event.dataTransfer.files[0]) {\r\n onFileSelected(event.dataTransfer.files[0]);\r\n }\r\n\r\n setIsDragOver(false);\r\n setDragCounter(0);\r\n }\r\n\r\n function onDragOver(event: React.DragEvent) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n }\r\n\r\n function onDragEnter(event: React.DragEvent) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n setDragCounter(dragCounter + 1);\r\n setIsDragOver(true);\r\n }\r\n\r\n function onDragExit(event: React.DragEvent) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n const counterValue = dragCounter - 1;\r\n setDragCounter(counterValue);\r\n if (counterValue > 0) return;\r\n setIsDragOver(false);\r\n }\r\n\r\n function onClearFile() {\r\n props.onClearFile();\r\n }\r\n\r\n function onKeyPress(event, func: Function) {\r\n if (event.key === \" \" || event.key === \"Enter\") {\r\n if (func) {\r\n func();\r\n }\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n function getFilePreview() {\r\n switch (fileMime.split(\"/\").shift()) {\r\n case \"image\":\r\n if (!fileBlob) return <FontAwesomeIcon icon={[\"far\", \"file-image\"]} />;\r\n return fileBlob && <img alt=\"File preview\" src={URL.createObjectURL(fileBlob)} />;\r\n case \"video\":\r\n return <FontAwesomeIcon icon={[\"far\", \"file-video\"]} />;\r\n case \"audio\":\r\n return <FontAwesomeIcon icon={[\"far\", \"file-audio\"]} />;\r\n case \"text\":\r\n return <FontAwesomeIcon icon={[\"far\", \"file-alt\"]} />;\r\n case \"application\":\r\n switch (fileMime.split(\"/\").pop()) {\r\n case \"pdf\":\r\n return <FontAwesomeIcon icon={[\"far\", \"file-pdf\"]} />;\r\n case \"x-zipped-compressed\":\r\n return <FontAwesomeIcon icon={[\"far\", \"file-archive\"]} />;\r\n case \"vnd.ms-excel\":\r\n case \"vnd.openxmlformats-officedocument.spreadsheetml.sheet\":\r\n return <FontAwesomeIcon icon={[\"far\", \"file-excel\"]} />;\r\n case \"msword\":\r\n case \"vnd.openxmlformats-officedocument.wordprocessingml.document\":\r\n return <FontAwesomeIcon icon={[\"far\", \"file-word\"]} />;\r\n case \"vnd.ms-powerpoint\":\r\n case \"vnd.openxmlformats-officedocument.presentationml.presentation\":\r\n return <FontAwesomeIcon icon={[\"far\", \"file-powerpoint\"]} />;\r\n default:\r\n return <FontAwesomeIcon icon={[\"far\", \"file\"]} />;\r\n }\r\n default:\r\n return <FontAwesomeIcon icon={[\"far\", \"file\"]} />;\r\n }\r\n }\r\n\r\n return (\r\n <div className=\"file-upload__question\">\r\n <div\r\n className={classnames(\r\n classes.fileUploadContainer,\r\n isDragOver && classes.fileUploadContainerDrag,\r\n )}\r\n onDrop={onDrop}\r\n onDragEnter={onDragEnter}\r\n onDragExit={onDragExit}\r\n onDragLeave={onDragExit}\r\n onDragOver={onDragOver}\r\n >\r\n <div className={classes.fileUploadIcon}>\r\n <FontAwesomeIcon icon={[\"far\", \"cloud-upload\"]} size=\"2x\" />\r\n </div>\r\n\r\n <div className={classes.fileUploadOptionText}>{dragFileLabel}</div>\r\n <div\r\n className={classes.fileUploadButton}\r\n tabIndex={0}\r\n onKeyPress={(event) => {\r\n onKeyPress(event, () => browseBtn.click());\r\n }}\r\n >\r\n <label id={`${variableName}_LABEL`} htmlFor={`${variableName}_INPUT`}>\r\n {browseFilesLabel}\r\n </label>\r\n <input\r\n id={`${variableName}_INPUT`}\r\n type=\"file\"\r\n className=\"form-control\"\r\n hidden\r\n onChange={onChange}\r\n ref={(el) => (browseBtn = el)}\r\n aria-labelledby={`${variableName}_LABEL`}\r\n />\r\n </div>\r\n </div>\r\n {isFileSelected && (\r\n <div className={classes.fileUploadSelectedFile}>\r\n {isValid && fileProgress < 1 && (\r\n <div\r\n className={classes.fileUploadProgress}\r\n style={{\r\n width: `${fileProgress * 100}%`,\r\n }}\r\n />\r\n )}\r\n <div className={classes.fileUploadFileInfo}>\r\n <div className={classes.fileUploadFileContainer}>\r\n <div\r\n className={classes.fileUploadFileContainerInner}\r\n onClick={onFileOpen}\r\n role=\"button\"\r\n tabIndex={-1}\r\n >\r\n <div className={classes.fileUploadFileIcon}>{getFilePreview()}</div>\r\n <div className={classes.fileUploadFileDetails}>\r\n <div className={classes.fileUploadFileName}>{fileName}</div>\r\n <div className={classes.fileUploadFileSize}>\r\n {getFileSize(fileSize)}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n {isValid ? (\r\n <div className={classes.fileUploadProgressText}>\r\n {(fileProgress * 100).toFixed(0)}%\r\n </div>\r\n ) : (\r\n <div className={classes.fileUploadValidationError}>\r\n <FontAwesomeIcon\r\n icon={[\"far\", \"exclamation-triangle\"]}\r\n className={classes.fileUploadValidationErrorIcon}\r\n />\r\n {uploadErrorMessage}\r\n </div>\r\n )}\r\n <div\r\n className={classes.fileUploadDeleteButton}\r\n onClick={onClearFile}\r\n onKeyPress={(event) => {\r\n onKeyPress(event, onClearFile);\r\n }}\r\n role=\"button\"\r\n tabIndex={0}\r\n >\r\n <FontAwesomeIcon icon=\"times-circle\" />\r\n </div>\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n );\r\n}\r\n","import { CancelTokenSource } from \"axios\";\r\nimport { CancellationTokenSource } from \"../models/CancellationTokenSource\";\r\n\r\nexport class AxiosCancellationTokenSource implements CancellationTokenSource {\r\n private readonly source: CancelTokenSource;\r\n\r\n constructor(source: CancelTokenSource) {\r\n this.source = source;\r\n }\r\n\r\n cancel = () => {\r\n this.source.cancel();\r\n };\r\n}\r\n","import axios from \"axios\";\r\nimport {\r\n fileUploadCompleted,\r\n fileUploadStarted,\r\n fileUploadProgress,\r\n fileUploadFailed,\r\n getFileFailed,\r\n fileUploadCleared,\r\n setNavigationEnabled,\r\n} from \"../actions\";\r\nimport { StoreState } from \"../../models/states/StoreState\";\r\nimport { SuccessModel } from \"../../models/SuccessModel\";\r\nimport { ThunkActionType } from \"../actions/types\";\r\nimport { makeAxios } from \"./validation\";\r\nimport { FileUploadErrorModel } from \"../../models/FileUploadErrorModel\";\r\nimport { AxiosCancellationTokenSource } from \"../../utils/AxiosCancellationTokenSource\";\r\n\r\nconst enableNavigation: ThunkActionType = (dispatch, getState) => {\r\n const state = getState();\r\n if (\r\n Object.values(state.files.filesByVariableName).every((v) =>\r\n v.every((f) => f.status === \"completed\" || f.status === \"failed\"),\r\n )\r\n ) {\r\n dispatch(setNavigationEnabled(true));\r\n }\r\n};\r\n\r\nexport function uploadFile(\r\n variableName: string,\r\n matrix: number,\r\n file: File,\r\n callback: (serverErrorKey?: string) => void,\r\n): ThunkActionType<Promise<void>> {\r\n return async (dispatch, getState) => {\r\n const state: StoreState = getState();\r\n if (state.interview.respondent.simulated) {\r\n dispatch(fileUploadCompleted(variableName, matrix));\r\n callback();\r\n return;\r\n }\r\n const data = new FormData();\r\n data.append(\"variableName\", variableName);\r\n data.append(\"matrix\", String(matrix));\r\n data.append(\"file\", file);\r\n\r\n const cancelToken = axios.CancelToken;\r\n const source = cancelToken.source();\r\n const cancellationTokenSource = new AxiosCancellationTokenSource(source);\r\n\r\n dispatch(\r\n fileUploadStarted(variableName, matrix, file.name, file.size, cancellationTokenSource),\r\n );\r\n dispatch(setNavigationEnabled(false));\r\n try {\r\n const result = await dispatch(makeAxios()).post<FileUploadErrorModel>(\r\n \"f/Upload\",\r\n data,\r\n {\r\n cancelToken: source.token,\r\n onUploadProgress: (pe: ProgressEvent) => {\r\n if (pe.lengthComputable)\r\n dispatch(\r\n fileUploadProgress(variableName, matrix, pe.loaded / pe.total),\r\n );\r\n },\r\n },\r\n );\r\n if (result.status !== 200) throw new Error(`Unexpected status ${result.status}`);\r\n const { key } = result.data;\r\n if (key) {\r\n dispatch(\r\n fileUploadFailed(\r\n variableName,\r\n matrix,\r\n file.name,\r\n new Error(`File upload failed ${file.name}`),\r\n ),\r\n );\r\n callback(key);\r\n return;\r\n }\r\n dispatch(fileUploadCompleted(variableName, matrix));\r\n callback();\r\n } catch (err) {\r\n if (axios.isCancel(err)) return;\r\n dispatch(fileUploadFailed(variableName, matrix, file.name, err));\r\n const { response } = err;\r\n if (response && response.status === 413) {\r\n callback(\"InvalidFileSize\");\r\n return;\r\n }\r\n callback(\"UnexpectedError\");\r\n } finally {\r\n dispatch(enableNavigation);\r\n }\r\n };\r\n}\r\n\r\nexport function getFile(\r\n variableName: string,\r\n fileName: string,\r\n mimType: string,\r\n matrix = 0,\r\n): ThunkActionType<Promise<any>> {\r\n return async (dispatch, getState) => {\r\n try {\r\n const state: StoreState = getState();\r\n if (state.interview.respondent.simulated) return null;\r\n const result = await dispatch(makeAxios()).get(\"f/GetFile\", {\r\n params: { variableName, fileName, matrix },\r\n responseType: \"blob\",\r\n });\r\n if (result.status !== 200) throw new Error(`Unexpected status ${result.status}`);\r\n if (result.data.type !== mimType) throw new Error(`File not found ${fileName}`);\r\n return result.data;\r\n } catch (err) {\r\n dispatch(getFileFailed(variableName, fileName, err));\r\n return null;\r\n }\r\n };\r\n}\r\n\r\nexport function clearFile(variableName: string, matrix: number): ThunkActionType<Promise<void>> {\r\n return async (dispatch, getState) => {\r\n const state: StoreState = getState();\r\n if (state.interview.respondent.simulated) return;\r\n dispatch(fileUploadCleared(variableName, matrix));\r\n dispatch(enableNavigation);\r\n try {\r\n const result = await dispatch(makeAxios()).delete<SuccessModel>(\"f/delete\", {\r\n params: { variableName, matrix },\r\n });\r\n if (result.status !== 200) throw new Error(`Unexpected status ${result.status}`);\r\n if (!result.data.success) throw new Error(`File deletion failed ${variableName}`);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n };\r\n}\r\n","import React from \"react\";\r\nimport { saveAs } from \"file-saver\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { BaseControl, ControlProps } from \"./BaseControl\";\r\nimport { getSettingString } from \"../../models/utilities/settingUtilities\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\nimport { ValidationBuilder } from \"../../models/builders/ValidationBuilder\";\r\nimport { getRendererProps } from \"../renderers/BaseRenderer\";\r\nimport FileUploadRenderer from \"../renderers/v2/FileUploadRenderer\";\r\nimport { translate } from \"../../models/utilities/translationUtilities\";\r\nimport { ThunkDispatchProp } from \"../../models/actions/ThunkDispatchProp\";\r\nimport { setVariableMentions, validationClear } from \"../../redux/actions\";\r\nimport { getFile, clearFile, uploadFile } from \"../../redux/thunks/file\";\r\nimport { isQuestionValidatedServerSide } from \"../../models/utilities/validationUtilities\";\r\n\r\ninterface Props extends ControlProps, ThunkDispatchProp {}\r\n\r\ninterface State {\r\n fileName: string;\r\n mimeType: string;\r\n size: number;\r\n fileBlob: Blob;\r\n status: string;\r\n progress: number;\r\n validationResult?: ValidationResultModel;\r\n isValid: boolean;\r\n errorMessage: string;\r\n}\r\n\r\nexport class FileUploadControl extends BaseControl<Props, State> {\r\n constructor(props: Props) {\r\n super(props);\r\n this.state = {\r\n fileName: \"\",\r\n size: 0,\r\n mimeType: \"\",\r\n fileBlob: null,\r\n status: \"\",\r\n progress: 0,\r\n isValid: true,\r\n errorMessage: \"\",\r\n };\r\n }\r\n\r\n initializeQuestion(question: QuestionModel, props: Props) {\r\n super.initializeQuestion(question, props);\r\n this.updateState(props);\r\n const [variable] = props.question.variables;\r\n const mention = this.getMention(props, variable.name);\r\n if (mention) {\r\n const stateObject = JSON.parse(mention.value);\r\n props\r\n .dispatch(getFile(variable.name, stateObject.fileName, stateObject.mimeType))\r\n .then((data) => {\r\n if (data) {\r\n this.setState((state) => ({ ...state, fileBlob: data }));\r\n } else {\r\n this.onClearFile();\r\n }\r\n });\r\n }\r\n }\r\n\r\n UNSAFE_componentWillReceiveProps(nextProps: Props) {\r\n this.updateState(nextProps);\r\n }\r\n\r\n updateState(props: Props) {\r\n this.setState((s) => {\r\n const newState = { ...s };\r\n const [variable] = props.question.variables;\r\n\r\n const mention = this.getMention(props, variable.name);\r\n if (mention) {\r\n const stateObject = JSON.parse(mention.value);\r\n newState.fileName = stateObject.fileName;\r\n newState.size = stateObject.size;\r\n newState.mimeType = stateObject.mimeType;\r\n }\r\n\r\n const file = this.getFile(props, variable.name);\r\n if (file) {\r\n newState.status = file.status;\r\n newState.progress = file.progress;\r\n }\r\n return newState;\r\n });\r\n }\r\n\r\n onFileOpen = () => {\r\n const { fileBlob, fileName } = this.state;\r\n if (fileBlob) saveAs(fileBlob, fileName);\r\n };\r\n\r\n onClearFile = () => {\r\n this.clearFileSelection();\r\n };\r\n\r\n onFileSelection = (selectedFile: File) => {\r\n const { name, size, type } = selectedFile;\r\n const { question, matrix, dispatch } = this.props;\r\n const [variable] = question.variables;\r\n this.setState((state) => ({\r\n ...state,\r\n fileName: name,\r\n size,\r\n mimeType: type,\r\n fileBlob: new Blob([selectedFile]),\r\n status: \"\",\r\n progress: 0,\r\n isValid: true,\r\n errorMessage: \"\",\r\n }));\r\n\r\n dispatch(setVariableMentions(variable.name, (mentions) => mentions.clear()));\r\n\r\n dispatch(validationClear());\r\n\r\n if (size > 0) {\r\n const addMention = () => {\r\n dispatch(\r\n setVariableMentions(variable.name, (mentions) =>\r\n mentions.add(\r\n JSON.stringify({\r\n fileName: name,\r\n size,\r\n mimeType: type,\r\n }),\r\n ),\r\n ),\r\n );\r\n };\r\n\r\n if (!this.isFileSizeValid(selectedFile.size)) {\r\n this.setInvalidState(\"InvalidFileSize\");\r\n addMention();\r\n } else if (!this.isMimeTypeValid(selectedFile.name)) {\r\n this.setInvalidState(\"InvalidFileType\");\r\n addMention();\r\n } else {\r\n dispatch(\r\n uploadFile(variable.name, matrix, selectedFile, (serverErrorKey) => {\r\n if (serverErrorKey) {\r\n this.setInvalidState(serverErrorKey);\r\n } else {\r\n addMention();\r\n }\r\n }),\r\n );\r\n }\r\n }\r\n };\r\n\r\n setInvalidState = (errorKey) => {\r\n const message = translate(this.props.questionnaire, errorKey, this.props.language);\r\n this.setState((state) => ({ ...state, isValid: false, errorMessage: message }));\r\n };\r\n\r\n clearFileSelection = () => {\r\n const [variable] = this.props.question.variables;\r\n this.props.dispatch(clearFile(variable.name, this.props.matrix));\r\n this.setState({ fileName: \"\", size: 0, mimeType: \"\", fileBlob: null });\r\n this.setMentions(this.props, variable.name, (m) => m.clear());\r\n };\r\n\r\n renderQuestion() {\r\n const {\r\n fileName,\r\n size,\r\n mimeType,\r\n status,\r\n fileBlob,\r\n progress,\r\n isValid,\r\n errorMessage,\r\n } = this.state;\r\n const { theme, language } = this.props;\r\n const [variable] = this.props.question.variables;\r\n const browseFilesLabel = translate(theme, \"BrowseFiles\", language) || \"BrowseFiles\";\r\n const dragFilesLabel = translate(theme, \"DragDropFiles\", language) || \"DragDropFiles\";\r\n\r\n return (\r\n <FileUploadRenderer\r\n {...getRendererProps(this.props)}\r\n variableName={variable.name}\r\n fileName={fileName}\r\n fileSize={size}\r\n fileType={fileName.split(\".\").pop()}\r\n fileMime={mimeType}\r\n fileStatus={status}\r\n fileBlob={fileBlob}\r\n fileProgress={progress}\r\n onClearFile={this.onClearFile}\r\n onFileSelection={this.onFileSelection}\r\n onFileOpen={this.onFileOpen}\r\n browseFilesLabel={browseFilesLabel}\r\n dragFilesLabel={dragFilesLabel}\r\n isValid={isValid}\r\n uploadErrorMessage={errorMessage}\r\n />\r\n );\r\n }\r\n\r\n validate(): ValidationResultModel {\r\n const { question, useClientValidation, questionnaire } = this.props;\r\n\r\n if (isQuestionValidatedServerSide(question.type, useClientValidation)) {\r\n return new ValidationBuilder().build();\r\n }\r\n\r\n const [variable] = question.variables;\r\n const required = this.isAnswerRequired(questionnaire, question);\r\n const mention = this.getMention(this.props, variable.name);\r\n\r\n if (required && !mention)\r\n return new ValidationBuilder().fail(variable.name, \"IncompleteAnswer\").build();\r\n\r\n if (mention) {\r\n const mentionValueObject = JSON.parse(mention.value);\r\n\r\n if (!this.isMimeTypeValid(mentionValueObject.fileName))\r\n return new ValidationBuilder().fail(variable.name, \"InvalidFileType\").build();\r\n\r\n if (!this.isFileSizeValid(mentionValueObject.size)) {\r\n const maxSize = parseFloat(getSettingString(question, \"MaxFileSize\")) * 1024;\r\n return new ValidationBuilder()\r\n .fail(variable.name, \"InvalidFileSize\", { max: maxSize.toString() })\r\n .build();\r\n }\r\n }\r\n return new ValidationBuilder().build();\r\n }\r\n\r\n isFileSizeValid(size: number): boolean {\r\n const maxSize = parseFloat(getSettingString(this.props.question, \"MaxFileSize\")) * 1024;\r\n if (maxSize && maxSize > 0 && size > maxSize) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n isMimeTypeValid(fileName: string): boolean {\r\n const acceptsMimeTypes = getSettingString(this.props.question, \"AcceptedFileTypes\");\r\n let acceptsMimeType: string[] = [];\r\n if (acceptsMimeTypes && acceptsMimeTypes.length > 0) {\r\n acceptsMimeType = acceptsMimeTypes.split(\",\");\r\n }\r\n const fileExtension = fileName.split(\".\").pop();\r\n\r\n if (acceptsMimeType.length === 0) {\r\n return true;\r\n }\r\n\r\n return fileName !== undefined && acceptsMimeType.some((m) => m.includes(fileExtension));\r\n }\r\n}\r\n","import React from \"react\";\r\nimport { DateTime } from \"luxon\";\r\nimport { DispatchProp } from \"react-redux\";\r\nimport { range, find, times } from \"../../utils/lodash\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { BaseControl, ControlProps } from \"./BaseControl\";\r\nimport { ControlContainer } from \"../../containers/controls/ControlContainer\";\r\nimport { ChoiceListControl } from \"./ChoiceListControl\";\r\nimport {\r\n getSettingBoolean,\r\n getSettingString,\r\n hasSetting,\r\n} from \"../../models/utilities/settingUtilities\";\r\nimport { isNullOrEmpty, removeHtmlTags } from \"../../utils\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\nimport { ValidationBuilder } from \"../../models/builders/ValidationBuilder\";\r\nimport { dateFromValue, dateFormat, size } from \"../../models/utilities/questionUtilities\";\r\nimport { translate } from \"../../models/utilities/translationUtilities\";\r\nimport { getRendererProps } from \"../renderers/BaseRenderer\";\r\nimport { ValidationOptionsModel } from \"../../models/ValidationOptionsModel\";\r\nimport {\r\n IMobiscroll,\r\n Calendar,\r\n MbscCalendarOptions,\r\n} from \"../../../lib/mobiscroll/js/mobiscroll.javascript.min\";\r\nimport { cDateFormatToMobiscroll } from \"../../utils/time\";\r\nimport Select, { Option } from \"../select/Select\";\r\nimport { getChoice } from \"../../models/utilities/variableUtilities\";\r\nimport TextAnswerRenderer from \"../renderers/v2/TextAnswerRenderer\";\r\nimport { respondentSetAppointment } from \"../../redux/actions\";\r\nimport { isQuestionValidatedServerSide } from \"../../models/utilities/validationUtilities\";\r\n\r\n/* import Mobiscroll JS, Typings and CSS */\r\nconst mobiscroll: IMobiscroll = require(\"../../../lib/mobiscroll/js/mobiscroll.javascript.min.js\");\r\n\r\ntype MbscSize = \"xsmall\" | \"small\" | \"medium\" | \"large\" | \"xlarge\" | number;\r\ntype MbscDisplay = \"center\" | \"inline\" | \"bubble\" | \"top\" | \"bottom\";\r\ntype MbscControl = \"date\" | \"time\" | \"calendar\";\r\n\r\nconst MOBISCROLL_THEME = \"voxco\";\r\n\r\nconst daysRange = [1, 31];\r\nconst hoursRange = [0, 23];\r\nconst minutesRange = [0, 59];\r\nconst weekDays = [\"sunday\", \"monday\", \"tuesday\", \"wednesday\", \"thursday\", \"friday\", \"saturday\"];\r\nconst initialState = {\r\n value: \"\",\r\n year: \"\",\r\n month: null,\r\n date: \"\",\r\n hour: \"00\",\r\n minute: \"00\",\r\n};\r\n\r\ninterface Props extends ControlProps, DispatchProp {}\r\n\r\ninterface State {\r\n value: string;\r\n year: string;\r\n month: number;\r\n date: string;\r\n hour: string;\r\n minute: string;\r\n}\r\n\r\nexport class DateTimeControl extends BaseControl<Props, State> {\r\n inputRef: HTMLElement;\r\n inputDivRef: HTMLElement;\r\n picker?: Calendar;\r\n\r\n constructor(props: Props) {\r\n super(props);\r\n this.state = { ...initialState };\r\n }\r\n\r\n initializeQuestion(question: QuestionModel, props: Props) {\r\n super.initializeQuestion(question, props);\r\n this.setState({ ...initialState });\r\n this.updateState(props);\r\n this.bindDatePicker(props);\r\n }\r\n\r\n willUpdateMentions(question: QuestionModel, nextProps: Props) {\r\n super.willUpdateMentions(question, nextProps);\r\n this.updateState(nextProps);\r\n }\r\n\r\n finalizeQuestion(question: QuestionModel, props: Props) {\r\n super.finalizeQuestion(question, props);\r\n if (this.picker) {\r\n this.picker.destroy();\r\n this.picker = null;\r\n }\r\n }\r\n\r\n componentDidUpdate(prevProps: Props) {\r\n if (\r\n prevProps.question !== this.props.question ||\r\n prevProps.language !== this.props.language\r\n ) {\r\n this.bindDatePicker(this.props);\r\n }\r\n }\r\n\r\n componentDidMount() {\r\n this.bindDatePicker(this.props);\r\n }\r\n\r\n openDatePicker() {\r\n if (this.picker && !this.picker.isVisible()) {\r\n this.picker.show();\r\n }\r\n }\r\n\r\n isYearType = (question: QuestionModel) => getSettingBoolean(question, \"Type\", \"Year\");\r\n\r\n isMonthType = (question: QuestionModel) => getSettingBoolean(question, \"Type\", \"Month\");\r\n\r\n isDayType = (question: QuestionModel) => getSettingBoolean(question, \"Type\", \"Day\");\r\n\r\n isHourType = (question: QuestionModel) => getSettingBoolean(question, \"Type\", \"Hours\");\r\n\r\n isMinuteType = (question: QuestionModel) => getSettingBoolean(question, \"Type\", \"Minutes\");\r\n\r\n findAnswer = (props: Props, value: string) => getChoice(props.sequencedVariables[0], value);\r\n\r\n updateState(props: Props) {\r\n this.setState((prevState) => {\r\n const newState = { ...prevState };\r\n newState.value = undefined;\r\n const [mention] = this.getMentions(props);\r\n if (mention !== undefined) {\r\n newState.value = mention.value;\r\n }\r\n if (this.isMonthType(props.question)) {\r\n newState.month = Number(newState.value);\r\n }\r\n if (this.isDayType(props.question)) {\r\n newState.date = Number(newState.value).toString();\r\n }\r\n if (this.isHourType(props.question)) {\r\n newState.hour = newState.value;\r\n }\r\n if (this.isMinuteType(props.question)) {\r\n newState.minute = newState.value;\r\n }\r\n if (newState.value == null || this.findAnswer(this.props, newState.value) != null) {\r\n newState.value = \"\";\r\n }\r\n if (this.picker) {\r\n const value = this.dateValue();\r\n this.picker.setVal(value);\r\n }\r\n return newState;\r\n });\r\n }\r\n\r\n minDate = () => {\r\n const { min: value, question } = this.props;\r\n const isMinDateToday =\r\n value?.toString().split(\"T\")[0] === new Date().toISOString().split(\"T\")[0];\r\n\r\n if (isNullOrEmpty(value)) {\r\n return undefined;\r\n }\r\n if (value === \"TodayValue\" || isMinDateToday) {\r\n return DateTime.now().startOf(\"day\");\r\n }\r\n const result = dateFromValue(question, value);\r\n return result.isValid ? result : undefined;\r\n };\r\n\r\n maxDate = () => {\r\n const { max: value, question } = this.props;\r\n if (isNullOrEmpty(value)) {\r\n return undefined;\r\n }\r\n if (value === \"TodayValue\") {\r\n return DateTime.now().endOf(\"day\");\r\n }\r\n const result = dateFromValue(question, value);\r\n return result.isValid ? result : undefined;\r\n };\r\n\r\n dateValue = () => {\r\n const { value } = this.state;\r\n const { question } = this.props;\r\n if (value === undefined) {\r\n return undefined;\r\n }\r\n return dateFromValue(question, value);\r\n };\r\n\r\n shouldShowCalendar = (props: Props) => {\r\n const { question } = props;\r\n const questionType = getSettingString(question, \"Type\");\r\n return [\"Date\", \"DateTime\", \"Time\"].includes(questionType);\r\n };\r\n\r\n mobiscrollDisplay(calendarSize?: MbscSize): MbscDisplay {\r\n const isSmall = calendarSize === \"xsmall\" || calendarSize === \"small\";\r\n return isSmall ? \"bottom\" : \"center\";\r\n }\r\n\r\n mobiscrollControls(props: Props): MbscControl[] {\r\n const { question } = props;\r\n const type = getSettingString(question, \"Type\", \"Date\");\r\n if (type === \"DateTime\") {\r\n return [\"calendar\", \"time\"];\r\n }\r\n if (type === \"Time\") {\r\n return [\"time\"];\r\n }\r\n return [\"calendar\"];\r\n }\r\n\r\n bindDatePicker(props: Props) {\r\n const { question, language } = props;\r\n if (this.picker) {\r\n this.picker.destroy();\r\n this.picker = null;\r\n }\r\n\r\n const input = this.inputRef;\r\n const showCalendar = this.shouldShowCalendar(props);\r\n if (!showCalendar || !input) {\r\n return;\r\n }\r\n\r\n const type = getSettingString(question, \"Type\", \"Date\");\r\n const showButtons = !(type === \"Date\");\r\n\r\n const onClear = (event, instance) => {\r\n this.setState((prevState) => ({ ...prevState, value: undefined }));\r\n if (type === \"Date\" && !showButtons) {\r\n instance.hide();\r\n }\r\n };\r\n\r\n const onSet = (event, instance) => {\r\n if (type === \"Date\") {\r\n return;\r\n }\r\n const value = instance.getVal();\r\n const format = dateFormat(question);\r\n const luxonValue = DateTime.fromJSDate(value);\r\n const text = luxonValue.toFormat(format);\r\n this.setState((prevState) => ({ ...prevState, value: text }));\r\n };\r\n\r\n const onSetDate = (event, instance) => {\r\n if (showButtons || !event.control) {\r\n return;\r\n }\r\n const format = dateFormat(question);\r\n const luxonValue = DateTime.fromJSDate(event.date);\r\n const text = luxonValue.toFormat(format, { numberingSystem: \"latn\" });\r\n this.setState((prevState) => ({ ...prevState, value: text }));\r\n if (type === \"Date\" && !showButtons) {\r\n instance.hide();\r\n }\r\n };\r\n\r\n const formatValue = () => this.state.value;\r\n\r\n const responsive = {\r\n xsmall: {\r\n display: this.mobiscrollDisplay(\"xsmall\"),\r\n },\r\n small: {\r\n display: this.mobiscrollDisplay(\"small\"),\r\n months: type === \"DateTime\" ? 1 : 2,\r\n },\r\n medium: {\r\n display: this.mobiscrollDisplay(\"medium\"),\r\n months: type === \"DateTime\" ? 1 : 2,\r\n touchUi: false,\r\n tabs: false,\r\n },\r\n };\r\n\r\n const dateFormatSetting = getSettingString(question, \"DateFormat\") || \"yyyy-mm-dd\";\r\n const pickerDateFormat = cDateFormatToMobiscroll(dateFormatSetting);\r\n\r\n const timeFormatSetting = getSettingString(question, \"TimeFormat\") || \"hh:mm\";\r\n const pickerTimeFormat = cDateFormatToMobiscroll(timeFormatSetting);\r\n\r\n const buttons = showButtons ? [\"cancel\", \"clear\", \"now\", \"set\"] : [\"clear\"];\r\n\r\n const options: MbscCalendarOptions = {\r\n theme: MOBISCROLL_THEME,\r\n controls: this.mobiscrollControls(props),\r\n lang: language,\r\n min: this.minDate(),\r\n max: this.maxDate(),\r\n showLabel: true,\r\n dateFormat: pickerDateFormat,\r\n timeWheels: pickerTimeFormat,\r\n headerText: (value) => (value !== undefined ? value : \"\"),\r\n invalid: [],\r\n layout: \"fixed\",\r\n onClear,\r\n onSet,\r\n onSetDate,\r\n formatValue,\r\n responsive,\r\n buttons,\r\n width: 100,\r\n };\r\n\r\n if (hasSetting(question, \"DisabledDates\")) {\r\n const disabledDates = JSON.parse(getSettingString(question, \"DisabledDates\"));\r\n const shiftWeekDays = DateTime.local().startOf(\"week\").weekday;\r\n const localizedWeekDays = [...weekDays];\r\n if (shiftWeekDays) {\r\n localizedWeekDays.push(localizedWeekDays.shift());\r\n }\r\n options.invalid = [\r\n ...disabledDates.ranges.map(({ start, end }) => ({\r\n start: dateFromValue(question, start, false),\r\n end: dateFromValue(question, end, false),\r\n })),\r\n ...disabledDates.dates.map((date) => dateFromValue(question, date, false)),\r\n ...disabledDates.weekdays.map(\r\n (wkd) => `w${localizedWeekDays.indexOf(wkd) + shiftWeekDays}`,\r\n ),\r\n ];\r\n }\r\n\r\n this.picker = mobiscroll.calendar(input, options);\r\n if (this.dateValue()) {\r\n this.picker.setVal(this.dateValue());\r\n }\r\n }\r\n\r\n isDateDisabled(date: Date) {\r\n const { question } = this.props;\r\n\r\n const isDateType =\r\n getSettingBoolean(question, \"Type\", \"Date\") ||\r\n getSettingBoolean(question, \"Type\", \"DateTime\");\r\n const disabledDates = JSON.parse(getSettingString(question, \"DisabledDates\", null));\r\n\r\n if (!isDateType || !disabledDates) {\r\n return false;\r\n }\r\n\r\n const isDisabledWeekDay = () =>\r\n disabledDates.weekdays?.some((entry) => entry === date.getDay());\r\n\r\n const isDisabledDay = () =>\r\n disabledDates.weekdays?.some(\r\n (entry) => dateFromValue(question, entry).valueOf() === date.valueOf(),\r\n );\r\n\r\n const isDisabledRange = () =>\r\n disabledDates.ranges?.some(\r\n ({ start, end }) =>\r\n date >= dateFromValue(question, start).toJSDate() &&\r\n date <= dateFromValue(question, end).toJSDate(),\r\n );\r\n\r\n const isDisabled = isDisabledWeekDay() || isDisabledDay() || isDisabledRange();\r\n return isDisabled;\r\n }\r\n\r\n onYearChanged = (event) => {\r\n const { value } = event.target;\r\n this.setState((prevState) => ({\r\n ...prevState,\r\n year: value,\r\n }));\r\n };\r\n\r\n onMonthChanged = ([value]) => {\r\n const { question } = this.props;\r\n const [variable] = question.variables;\r\n this.setMentions(this.props, variable.name, (mentions) => {\r\n mentions.clear();\r\n if (!isNullOrEmpty(value)) {\r\n mentions.set(value);\r\n }\r\n return mentions;\r\n });\r\n this.setState((prevState) => ({\r\n ...prevState,\r\n month: value,\r\n }));\r\n };\r\n\r\n onDayChanged = ([value]) => {\r\n const { question } = this.props;\r\n const [variable] = question.variables;\r\n this.setMentions(this.props, variable.name, (mentions) => {\r\n mentions.clear();\r\n if (!isNullOrEmpty(value)) {\r\n mentions.set(value);\r\n }\r\n return mentions;\r\n });\r\n this.setState((prevState) => ({\r\n ...prevState,\r\n date: value,\r\n }));\r\n };\r\n\r\n onHourChanged = ([value]) => {\r\n const { question } = this.props;\r\n const [variable] = question.variables;\r\n this.setMentions(this.props, variable.name, (mentions) => {\r\n mentions.clear();\r\n if (!isNullOrEmpty(value)) {\r\n mentions.set(value);\r\n }\r\n return mentions;\r\n });\r\n this.setState((prevState) => ({\r\n ...prevState,\r\n hour: value,\r\n }));\r\n };\r\n\r\n onMinuteChanged = ([value]) => {\r\n const { question } = this.props;\r\n const [variable] = question.variables;\r\n this.setMentions(this.props, variable.name, (mentions) => {\r\n mentions.clear();\r\n if (!isNullOrEmpty(value)) {\r\n mentions.set(value);\r\n }\r\n return mentions;\r\n });\r\n this.setState((prevState) => ({\r\n ...prevState,\r\n minute: value,\r\n }));\r\n };\r\n\r\n onTextChanged = (event) => {\r\n const { question } = this.props;\r\n const { value } = event.target;\r\n const type = getSettingString(question, \"Type\");\r\n if ([\"Day\", \"Hours\", \"Minutes\", \"Year\"].includes(type) && /[^\\d]/.test(value)) {\r\n return;\r\n }\r\n this.setState((prevState) => ({\r\n ...prevState,\r\n value,\r\n }));\r\n };\r\n\r\n onTextBlur = () => {\r\n const { question } = this.props;\r\n const [variable] = question.variables;\r\n const type = getSettingString(question, \"Type\");\r\n if ([\"Date\", \"DateTime\", \"Time\"].includes(type)) {\r\n this.onDateBlur();\r\n return;\r\n }\r\n let { value } = this.state;\r\n const typeBounds: { [type: string]: number[] } = {\r\n Day: daysRange,\r\n Hours: hoursRange,\r\n Minutes: minutesRange,\r\n };\r\n if (typeBounds[type] != null && !isNullOrEmpty(value)) {\r\n const [lowerBound, upperBound] = typeBounds[type];\r\n if (parseInt(value, 10) < lowerBound) {\r\n value = String(lowerBound);\r\n } else if (parseInt(value, 10) > upperBound) {\r\n value = String(upperBound);\r\n }\r\n this.setState((prevState) => ({ ...prevState, value }));\r\n }\r\n this.setMentions(this.props, variable.name, (mentions) => mentions.set(value));\r\n };\r\n\r\n onDateBlur = () => {\r\n this.setMentionToDate(this.dateValue());\r\n };\r\n\r\n getNormalizedDate(date: DateTime) {\r\n const minDate = this.minDate();\r\n if (minDate != null && date.valueOf() < minDate.valueOf()) {\r\n return minDate;\r\n }\r\n const maxDate = this.maxDate();\r\n if (maxDate != null && date.valueOf() > maxDate.valueOf()) {\r\n return maxDate;\r\n }\r\n return date;\r\n }\r\n\r\n setMentionToDate(date: DateTime) {\r\n const { question } = this.props;\r\n const [variable] = question.variables;\r\n if (date == null) {\r\n this.setMentions(this.props, variable.name, (mentions) => mentions.clear());\r\n return;\r\n }\r\n let normalizedDate = this.getNormalizedDate(date);\r\n if (getSettingBoolean(question, \"SetRespondentAppointment\")) {\r\n this.props.dispatch(respondentSetAppointment(normalizedDate.toJSDate()));\r\n }\r\n\r\n // 'hh:mm a' and 'hh-mm a' formats have issues with AM/PM in different languages ==> set locale to English\r\n const dateTimeFormat = dateFormat(question);\r\n if (dateTimeFormat.indexOf(\"hh:mm a\") > -1 || dateTimeFormat.indexOf(\"hh-mm a\") > -1) {\r\n normalizedDate = normalizedDate.setLocale(\"en\");\r\n }\r\n\r\n const text = normalizedDate.toFormat(dateTimeFormat, {\r\n numberingSystem: \"latn\",\r\n });\r\n this.setState((prevState) => ({ ...prevState, value: text }));\r\n this.setMentions(this.props, variable.name, (mentions) => mentions.set(text));\r\n }\r\n\r\n monthArray() {\r\n return times(12, (i) => DateTime.fromFormat(String(i + 1), \"M\").toFormat(\"MMMM\"));\r\n }\r\n\r\n dayArray() {\r\n const [min, max] = daysRange;\r\n return range(min, max + 1);\r\n }\r\n\r\n hourArray() {\r\n const [min, max] = hoursRange;\r\n return range(min, max + 1);\r\n }\r\n\r\n minuteArray() {\r\n const [min, max] = minutesRange;\r\n const increment = 5;\r\n return range(min, max, increment);\r\n }\r\n\r\n renderYear() {\r\n return (\r\n <>\r\n <TextAnswerRenderer\r\n {...getRendererProps(this.props)}\r\n inputType=\"text\"\r\n maxLength={4}\r\n onBlur={this.onTextBlur}\r\n onChange={this.onTextChanged}\r\n value={this.state.value}\r\n />\r\n <ControlContainer\r\n controlType={ChoiceListControl}\r\n {...getRendererProps(this.props)}\r\n />\r\n </>\r\n );\r\n }\r\n\r\n renderSelect(value: string, options: Option[], onChange: (value: string[]) => void) {\r\n const { question, theme, language } = this.props;\r\n const [variable] = question.variables;\r\n return (\r\n <>\r\n <Select\r\n id={`${variable.elementId}_INPUT`}\r\n value={[value]}\r\n size={size(question)}\r\n onChange={onChange}\r\n options={[\r\n {\r\n id: `${variable.elementId}_EMPTY`,\r\n label: removeHtmlTags(\r\n translate(theme, \"DropdownEmptyAnswer\", language),\r\n ),\r\n value: \"\",\r\n },\r\n ...options,\r\n ]}\r\n />\r\n <ControlContainer\r\n controlType={ChoiceListControl}\r\n {...getRendererProps(this.props)}\r\n />\r\n </>\r\n );\r\n }\r\n\r\n renderMonth() {\r\n const { month } = this.state;\r\n const { question } = this.props;\r\n const [variable] = question.variables;\r\n\r\n const options = this.monthArray().map((value, index) => ({\r\n id: `${variable.elementId}_C_${index + 1}`,\r\n value: (index + 1).toString(),\r\n label: value,\r\n }));\r\n\r\n return this.renderSelect(String(month), options, this.onMonthChanged);\r\n }\r\n\r\n renderDay() {\r\n const { date } = this.state;\r\n const { question } = this.props;\r\n const [variable] = question.variables;\r\n\r\n const options = this.dayArray().map((value) => ({\r\n id: `${variable.elementId}_C_${value}`,\r\n value: value.toString(),\r\n label: value.toString(),\r\n }));\r\n\r\n return this.renderSelect(date, options, this.onDayChanged);\r\n }\r\n\r\n renderHours() {\r\n const { hour } = this.state;\r\n const { question } = this.props;\r\n const [variable] = question.variables;\r\n\r\n const options = this.hourArray().map((value) => ({\r\n id: `${variable.elementId}_C_${value}`,\r\n value: value.toString(),\r\n label: value.toString(),\r\n }));\r\n\r\n return this.renderSelect(hour, options, this.onHourChanged);\r\n }\r\n\r\n renderMinutes() {\r\n const { minute } = this.state;\r\n const { question } = this.props;\r\n const [variable] = question.variables;\r\n\r\n const options = this.minuteArray().map((value) => ({\r\n id: `${variable.elementId}_C_${value}`,\r\n value: value.toString(),\r\n label: value.toString(),\r\n }));\r\n\r\n return this.renderSelect(minute, options, this.onMinuteChanged);\r\n }\r\n\r\n renderDateTime() {\r\n return (\r\n <>\r\n <TextAnswerRenderer\r\n {...getRendererProps(this.props)}\r\n inputRef={(r) => {\r\n this.inputRef = r;\r\n }}\r\n inputDivRef={(r) => {\r\n this.inputDivRef = r;\r\n }}\r\n inputType=\"text\"\r\n onBlur={this.onTextBlur}\r\n onChange={this.onTextChanged}\r\n openDatePicker={this.openDatePicker}\r\n value={this.state.value}\r\n />\r\n <ControlContainer\r\n controlType={ChoiceListControl}\r\n {...getRendererProps(this.props)}\r\n />\r\n </>\r\n );\r\n }\r\n\r\n renderQuestion(question: QuestionModel) {\r\n if (this.isMonthType(question)) {\r\n return this.renderMonth();\r\n }\r\n if (this.isYearType(question)) {\r\n return this.renderYear();\r\n }\r\n if (this.isDayType(question)) {\r\n return this.renderDay();\r\n }\r\n if (this.isHourType(question)) {\r\n return this.renderHours();\r\n }\r\n if (this.isMinuteType(question)) {\r\n return this.renderMinutes();\r\n }\r\n if ([\"Date\", \"DateTime\", \"Time\"].includes(getSettingString(question, \"Type\"))) {\r\n return this.renderDateTime();\r\n }\r\n const { min, max } = this.props;\r\n return (\r\n <>\r\n <TextAnswerRenderer\r\n {...getRendererProps(this.props)}\r\n inputType=\"text\"\r\n min={Number(min)}\r\n max={Number(max)}\r\n onBlur={this.onTextBlur}\r\n onChange={this.onTextChanged}\r\n value={this.state.value}\r\n />\r\n <ControlContainer\r\n controlType={ChoiceListControl}\r\n {...getRendererProps(this.props)}\r\n />\r\n </>\r\n );\r\n }\r\n\r\n isAnswerComplete(props: Props) {\r\n if (isNullOrEmpty(this.state.value) && this.hasMentions(this.props)) {\r\n const mention = find(this.getMentions(this.props));\r\n const [variable] = this.props.sequencedVariables;\r\n if (variable.choiceList.some((choice) => choice.value === mention.value)) {\r\n return true;\r\n }\r\n }\r\n return !isNullOrEmpty(this.state.value) || super.isAnswerComplete(props);\r\n }\r\n\r\n isLowerBoundInvalid(date: Date, useTime = true) {\r\n let min = this.minDate();\r\n if (min) {\r\n if (!useTime) {\r\n min = min.startOf(\"day\");\r\n }\r\n return DateTime.fromJSDate(date) < min;\r\n }\r\n return false;\r\n }\r\n\r\n isUpperBoundInvalid(date: Date, useTime = true) {\r\n let max = this.maxDate();\r\n if (max) {\r\n if (!useTime) {\r\n max = max.endOf(\"day\");\r\n }\r\n return DateTime.fromJSDate(date) > max;\r\n }\r\n return false;\r\n }\r\n\r\n validate(options?: ValidationOptionsModel): ValidationResultModel {\r\n const { value } = this.state;\r\n const { question, sequencedVariables, useClientValidation } = this.props;\r\n\r\n if (isQuestionValidatedServerSide(question.type, useClientValidation)) {\r\n return new ValidationBuilder().build();\r\n }\r\n\r\n const [variable] = sequencedVariables;\r\n const result = super.validate(options);\r\n\r\n let hasSelectedAnswer = variable.choiceList\r\n .filter((choice) => getSettingBoolean(choice, \"Visible\"))\r\n .some((choice) => choice.value === value);\r\n\r\n if (isNullOrEmpty(value) && this.hasMentions(this.props)) {\r\n hasSelectedAnswer = variable.choiceList.some(\r\n (choice) => choice.value === find(this.getMentions(this.props)).value,\r\n );\r\n }\r\n\r\n if (result.isValid && !isNullOrEmpty(value) && !hasSelectedAnswer) {\r\n const type = getSettingString(question, \"Type\", \"\");\r\n const minValue = this.minValue();\r\n const maxValue = this.maxValue();\r\n\r\n if ([\"Year\", \"Month\", \"Day\", \"Hours\", \"Minutes\"].includes(type)) {\r\n // Validate non-date values.\r\n const intValue = parseInt(value, 10);\r\n const hasMinValue = minValue !== null && minValue !== undefined;\r\n const hasMaxValue = maxValue !== null && maxValue !== undefined;\r\n\r\n const [minRange, maxRange] = {\r\n Year: [0, 9999],\r\n Month: [1, 12],\r\n Day: daysRange,\r\n Hours: hoursRange,\r\n Minutes: minutesRange,\r\n }[type];\r\n\r\n if (intValue < minRange || intValue > maxRange) {\r\n return new ValidationBuilder().fail(variable.name, \"InvalidDate\").build();\r\n }\r\n\r\n if (hasMinValue && hasMaxValue) {\r\n if (intValue < minValue || intValue > maxValue) {\r\n return new ValidationBuilder()\r\n .fail(variable.name, \"OutOfBounds\", {\r\n min: String(minValue),\r\n max: String(maxValue),\r\n })\r\n .build();\r\n }\r\n } else if (hasMinValue && !hasMaxValue && intValue < minValue) {\r\n return new ValidationBuilder()\r\n .fail(variable.name, \"LowerBoundNotFulfilled\", {\r\n min: String(minValue),\r\n })\r\n .build();\r\n } else if (!hasMinValue && hasMaxValue && intValue > maxValue) {\r\n return new ValidationBuilder()\r\n .fail(variable.name, \"UpperBoundNotFulfilled\", {\r\n max: String(maxValue),\r\n })\r\n .build();\r\n }\r\n } else {\r\n // Validate date values.\r\n const date = this.dateValue();\r\n const format = dateFormat(question);\r\n\r\n if (type === \"Time\" && format && !DateTime.fromFormat(value, format).isValid) {\r\n return new ValidationBuilder().fail(variable.name, \"InvalidDate\").build();\r\n }\r\n\r\n const dateValue = date.toJSDate();\r\n\r\n if (this.isDateDisabled(dateValue)) {\r\n return new ValidationBuilder().fail(variable.name, \"UnavailableDate\").build();\r\n }\r\n\r\n if (this.isLowerBoundInvalid(dateValue) || this.isUpperBoundInvalid(dateValue)) {\r\n return new ValidationBuilder()\r\n .fail(variable.name, \"OutOfBounds\", {\r\n min: this.minDate()?.toFormat(format),\r\n max: this.maxDate()?.toFormat(format),\r\n })\r\n .build();\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\nimport { foregroundColor, darken, alpha } from \"../../theme/Mixins\";\r\n\r\nexport default createUseStyles({\r\n container: {\r\n position: \"relative\",\r\n userSelect: \"none\",\r\n },\r\n group: {\r\n position: \"absolute\",\r\n textAlign: \"center\",\r\n fontWeight: \"bolder\",\r\n },\r\n bucket: {\r\n position: \"absolute\",\r\n background: ({ theme, color }) =>\r\n `${alpha(\r\n color || theme.ControlBackground,\r\n theme.ControlAlpha,\r\n )} 0% 0% no-repeat padding-box`,\r\n color: ({ theme, color }) => foregroundColor(theme, color || theme.ControlBackground),\r\n border: ({ theme, color }) => [\r\n [\r\n theme.BorderWidth,\r\n \"solid\",\r\n darken(color || theme.ControlBackground, theme.BorderValue),\r\n ],\r\n ],\r\n borderRadius: ({ theme }) => Math.min(theme.BorderRadius, 50),\r\n textAlign: \"center\",\r\n fontWeight: \"bolder\",\r\n },\r\n card: {\r\n backgroundColor: ({ theme, color }) => color || theme.SecondaryColor,\r\n border: ({ theme, color }) => [\r\n [\r\n Math.max(theme.BorderWidth, 1),\r\n \"solid\",\r\n darken(color || theme.SecondaryColor, theme.BorderValue),\r\n ],\r\n ],\r\n borderRadius: ({ theme }) => theme.BorderRadius,\r\n color: ({ theme, color }) => foregroundColor(theme, color || theme.SecondaryColor),\r\n position: \"absolute\",\r\n textAlign: \"center\",\r\n fontWeight: \"bolder\",\r\n backgroundSize: \"cover\",\r\n backgroundPosition: \"center\",\r\n cursor: \"grab\",\r\n\r\n \"&:active\": {\r\n cursor: \"grabbing\",\r\n },\r\n },\r\n});\r\n","import React from \"react\";\r\n\r\nexport interface ElementDimensions<T extends HTMLElement> {\r\n ref: React.Ref<T>;\r\n dimensions: DimensionModel;\r\n calcDimensions(): void;\r\n}\r\n\r\nexport interface DimensionModel {\r\n width: number;\r\n height: number;\r\n innerWidth: number;\r\n innerHeight: number;\r\n\r\n minWidth(minWidth: number): boolean;\r\n maxWidth(maxWidth: number): boolean;\r\n}\r\n\r\nconst makeDimension = ({\r\n width,\r\n height,\r\n innerWidth,\r\n innerHeight,\r\n}: {\r\n width: number;\r\n height: number;\r\n innerWidth: number;\r\n innerHeight: number;\r\n}): DimensionModel => ({\r\n width,\r\n height,\r\n innerWidth,\r\n innerHeight,\r\n minWidth: (min) => width >= min,\r\n maxWidth: (max) => width < max,\r\n});\r\n\r\nexport function useElementDimensions<T extends HTMLElement>(\r\n initialElement?: T,\r\n): ElementDimensions<T> {\r\n const [dimensions, setDimensions] = React.useState(\r\n makeDimension({ width: 0, height: 0, innerWidth: 0, innerHeight: 0 }),\r\n );\r\n const [element, setElement] = React.useState(initialElement);\r\n const ref: React.Ref<T> = (instance) => setElement(instance);\r\n const calcDimensions = React.useCallback(() => {\r\n window.requestAnimationFrame(() => {\r\n if (element) {\r\n const width = element.offsetWidth;\r\n const height = element.offsetHeight;\r\n\r\n const cs = window.getComputedStyle(element);\r\n const hpadding = parseInt(cs.paddingLeft, 10) + parseInt(cs.paddingRight, 10);\r\n const vpadding = parseInt(cs.paddingTop, 10) + parseInt(cs.paddingBottom, 10);\r\n const innerWidth = element.offsetWidth - hpadding;\r\n const innerHeight = element.offsetHeight - vpadding;\r\n\r\n setDimensions(makeDimension({ width, height, innerWidth, innerHeight }));\r\n }\r\n });\r\n }, [element]);\r\n\r\n React.useLayoutEffect(() => {\r\n const observer = new MutationObserver((mutations) => {\r\n if (\r\n mutations.some(\r\n (mutation) =>\r\n mutation.type === \"attributes\" && mutation.attributeName === \"style\",\r\n )\r\n ) {\r\n calcDimensions();\r\n }\r\n });\r\n\r\n window.addEventListener(\"resize\", calcDimensions);\r\n if (window.visualViewport) {\r\n window.visualViewport.addEventListener(\"resize\", calcDimensions);\r\n }\r\n window.addEventListener(\"orientationchange\", calcDimensions);\r\n if (element) {\r\n observer.observe(element, { attributes: true });\r\n }\r\n calcDimensions();\r\n\r\n return () => {\r\n window.removeEventListener(\"resize\", calcDimensions);\r\n if (window.visualViewport) {\r\n window.visualViewport.removeEventListener(\"resize\", calcDimensions);\r\n }\r\n window.removeEventListener(\"orientationchange\", calcDimensions);\r\n observer.disconnect();\r\n };\r\n }, [element, calcDimensions]);\r\n\r\n return { ref, dimensions, calcDimensions };\r\n}\r\n","import React from \"react\";\r\n\r\nexport function usePrevious(value) {\r\n const ref = React.useRef();\r\n React.useEffect(() => {\r\n ref.current = value;\r\n }, [value]);\r\n return ref.current;\r\n}\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreState } from \"../models/states/StoreState\";\r\n\r\nexport default function useQuestionnaire() {\r\n return useSelector((state: StoreState) => state.interview.questionnaire);\r\n}\r\n","import React, { useMemo } from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { useSignal, Signal } from \"../signals\";\r\nimport { ValidationOptionsModel } from \"../models/ValidationOptionsModel\";\r\nimport { ValidationResultModel } from \"../models/ValidationResultModel\";\r\nimport {\r\n getSettingBoolean,\r\n hasSetting,\r\n getSettingString,\r\n} from \"../models/utilities/settingUtilities\";\r\nimport { QuestionType } from \"../models/enums/QuestionType\";\r\nimport {\r\n useMentionValues,\r\n usePickMentions,\r\n useSetVariableMentions,\r\n useGetVariableMentions,\r\n} from \"./useMentions\";\r\nimport { isQuestionSoftPrompt } from \"../models/utilities/questionUtilities\";\r\nimport { ValidationBuilder } from \"../models/builders/ValidationBuilder\";\r\nimport { translate } from \"../models/utilities/translationUtilities\";\r\nimport { QuestionModel } from \"../models/QuestionModel\";\r\nimport { useLanguage } from \"./useLanguage\";\r\nimport useQuestionnaire from \"./useQuestionnaire\";\r\nimport { QuestionnaireModel } from \"../models/QuestionnaireModel\";\r\nimport { VariableModel } from \"../models/VariableModel\";\r\nimport useRecall from \"./useRecall\";\r\nimport { isInputRequired } from \"../models/utilities/questionnaireUtilities\";\r\nimport { useThunkDispatch } from \"../redux/thunks\";\r\nimport { StoreState } from \"../models/states/StoreState\";\r\n// eslint-disable-next-line import/no-deprecated\r\nimport { supportValidateSoftPrompt } from \"../redux/thunks/validation\";\r\nimport { isQuestionValidatedServerSide } from \"../models/utilities/validationUtilities\";\r\n\r\nexport function isAnswerRequired(question: QuestionModel, questionnaire: QuestionnaireModel) {\r\n if (question.type === QuestionType.Description) {\r\n return false;\r\n }\r\n if (!getSettingBoolean(questionnaire, \"INPUT_REQUIRED\")) {\r\n return false;\r\n }\r\n const answerRequired =\r\n !hasSetting(question, \"AnswerRequired\") || getSettingBoolean(question, \"AnswerRequired\");\r\n const control = !answerRequired ? question : question.parent || question;\r\n return (\r\n !hasSetting(control, \"AnswerRequired\") ||\r\n getSettingBoolean(control, \"AnswerRequired\", \"Yes\", \"SoftPrompt\", \"UniquePrompt\")\r\n );\r\n}\r\n\r\ntype ValidatorCallback = (options: ValidationOptionsModel) => ValidationResultModel;\r\n\r\nexport const composeValidators = (...validators: ValidatorCallback[]) => (\r\n opt: ValidationOptionsModel,\r\n) => validators.reduce((r, v) => (!r.isValid ? r : v(opt)), new ValidationBuilder().build());\r\n\r\nfunction useCustomErrorMessage(question: QuestionModel) {\r\n const [language] = useLanguage();\r\n\r\n return React.useMemo(() => {\r\n const { parent } = question;\r\n if (hasSetting(question, \"CustomErrorMessage\"))\r\n return translate(question, \"CustomErrorMessage\", language);\r\n if (!parent) return null;\r\n if (parent.type === QuestionType.StarRatingGrid)\r\n return translate(parent.columns[0], \"CustomErrorMessage\", language);\r\n return translate(parent, \"CustomErrorMessage\", language);\r\n }, [question, language]);\r\n}\r\n\r\n/**\r\n * Answer required validator makes sure there is at least one mention for a variable.\r\n */\r\nexport function useAnswerRequiredValidator(\r\n question: QuestionModel,\r\n variable: VariableModel,\r\n): ValidatorCallback {\r\n const questionnaire = useQuestionnaire();\r\n const getMentions = useGetVariableMentions();\r\n const state = useSelector((s: StoreState) => s);\r\n const dispatch = useThunkDispatch();\r\n\r\n const isSoftPrompt = isInputRequired(questionnaire) && isQuestionSoftPrompt(question);\r\n const customError = useCustomErrorMessage(question);\r\n\r\n return () => {\r\n const isAnswerComplete = getMentions(variable.name).some(\r\n ({ value }) => value !== undefined && value !== null && value.length > 0,\r\n );\r\n const bypassClientValidation = isQuestionValidatedServerSide(\r\n question.type,\r\n state?.interview.useClientValidation,\r\n );\r\n if (!getSettingBoolean(questionnaire, \"INPUT_REQUIRED\"))\r\n return new ValidationBuilder().build();\r\n if (!isAnswerComplete && isAnswerRequired(question, questionnaire)) {\r\n if (bypassClientValidation) {\r\n return new ValidationBuilder().build();\r\n }\r\n // Validate soft-prompt.\r\n if (isSoftPrompt) {\r\n const variables = [variable];\r\n // eslint-disable-next-line import/no-deprecated\r\n return supportValidateSoftPrompt(question, variables, dispatch, state);\r\n }\r\n // Question is required but has no mentions.\r\n return new ValidationBuilder()\r\n .fail(variable.name, customError || \"IncompleteAnswer\")\r\n .build();\r\n }\r\n // Question is valid.\r\n return new ValidationBuilder().build();\r\n };\r\n}\r\n\r\n/**\r\n * Discrete answer validator makes sure there is at least one valid choice for a variable\r\n * and checks for minimum and maximum selected choices.\r\n */\r\nexport function useDiscreteAnswerValidator(\r\n question: QuestionModel,\r\n variable: VariableModel,\r\n showSoftPrompt: boolean,\r\n): ValidatorCallback {\r\n const state = useSelector((s: StoreState) => s);\r\n const [mentions, setMentions] = useMentionValues(variable.name);\r\n const min = parseInt(useRecall(getSettingString(question, \"MinRequiredAnswers\")), 10);\r\n const max = parseInt(useRecall(getSettingString(question, \"MaxAllowedAnswers\")), 10);\r\n const softPromptCode = getSettingString(question, \"SoftPromptChoiceCode\");\r\n const getMentions = useGetVariableMentions();\r\n\r\n React.useEffect(() => {\r\n const choiceValues = variable.choiceList.map((c) => c.value);\r\n const shouldRemove = (m) => !choiceValues.includes(m);\r\n if (mentions.some(shouldRemove)) setMentions((b) => b.remove(shouldRemove));\r\n }, [question, mentions, setMentions, variable.name, variable.choiceList, softPromptCode]);\r\n\r\n return composeValidators(\r\n useAnswerRequiredValidator(question, variable),\r\n function discreteAnswerValidator() {\r\n const bypassClientValidation = isQuestionValidatedServerSide(\r\n question.type,\r\n state?.interview.useClientValidation,\r\n );\r\n if (bypassClientValidation) {\r\n return new ValidationBuilder().build();\r\n }\r\n const currentMentions = getMentions(variable.name);\r\n const isChoiceVisible = (value: string) =>\r\n variable.choiceList?.some((c) => c.value === value);\r\n const isValidMention = (m) => m && m.value.length && isChoiceVisible(m.value);\r\n if (currentMentions.some(isValidMention)) {\r\n // Test for minimum and maximum values.\r\n if (min !== null && min > 0 && currentMentions.length < min) {\r\n return new ValidationBuilder()\r\n .fail(question.name, \"InvalidChoicesMin\", { min: String(min) })\r\n .build();\r\n }\r\n if (max !== null && max > 0 && currentMentions.length > max) {\r\n return new ValidationBuilder()\r\n .fail(question.name, \"InvalidChoicesMax\", { max: String(max) })\r\n .build();\r\n }\r\n }\r\n return new ValidationBuilder().build();\r\n },\r\n );\r\n}\r\n\r\n/**\r\n * A variadic validator validates that any of the variables have an answer and that\r\n * each of their mentions match a valid choice. In a variadic question minimum and\r\n * maximum applies to how many variables have an answer.\r\n */\r\nexport function useDiscreteVariadicValidator(\r\n question: QuestionModel,\r\n variables: VariableModel[],\r\n): ValidatorCallback {\r\n const mentionsByVariable = usePickMentions(\r\n useMemo(() => variables.map((v) => v.name), [variables]),\r\n );\r\n const questionnaire = useQuestionnaire();\r\n const min = parseInt(useRecall(getSettingString(question, \"MinRequiredAnswers\")), 10);\r\n const max = parseInt(useRecall(getSettingString(question, \"MaxAllowedAnswers\")), 10);\r\n const setMentions = useSetVariableMentions();\r\n const getMentions = useGetVariableMentions();\r\n const state = useSelector((s: StoreState) => s);\r\n const customError = useCustomErrorMessage(question);\r\n const dispatch = useThunkDispatch();\r\n\r\n React.useEffect(() => {\r\n variables.forEach((variable) => {\r\n const choiceValues = variable.choiceList.map((c) => c.value);\r\n const shouldRemove = (m) => !choiceValues.includes(m);\r\n const mentions = mentionsByVariable[variable.name] || [];\r\n const mentionValues = mentions.map((m) => m.value);\r\n if (mentionValues.some(shouldRemove))\r\n setMentions(variable.name, (b) => b.remove(shouldRemove));\r\n });\r\n }, [mentionsByVariable, setMentions, variables]);\r\n\r\n return function discreteVariadicValidator() {\r\n const isChoiceVisible = (value: string) =>\r\n variables[0]?.choiceList?.some((c) => c.value === value);\r\n const isValidMention = (m) => m && m.value.length && isChoiceVisible(m.value);\r\n const answeredVariables = variables.filter(({ name }) =>\r\n getMentions(name).some(isValidMention),\r\n );\r\n // Convert answered variables' names to a set\r\n const answeredSet = new Set(answeredVariables.map(({ name }) => name));\r\n\r\n // Filter unanswered variables by checking the difference between variables and answeredSet\r\n const unansweredVariables = variables.filter(({ name }) => !answeredSet.has(name));\r\n const answerRequired = isAnswerRequired(question, questionnaire);\r\n const isSoftPrompt = answerRequired && isQuestionSoftPrompt(question);\r\n const failAllVariables = (key: string, args?: { [name: string]: string }) => {\r\n const result = new ValidationBuilder();\r\n variables.forEach(({ name }) => result.fail(name, key, args));\r\n return result.build();\r\n };\r\n const bypassClientValidation = isQuestionValidatedServerSide(\r\n question.type,\r\n state?.interview.useClientValidation,\r\n );\r\n if (\r\n (!answeredVariables.length && answerRequired) ||\r\n (unansweredVariables.length &&\r\n answerRequired &&\r\n question.type === QuestionType.Carrousel)\r\n ) {\r\n if (bypassClientValidation) {\r\n return new ValidationBuilder().build();\r\n }\r\n // Validate soft-prompt.\r\n if (isSoftPrompt) {\r\n if (question.type === QuestionType.Carrousel) {\r\n return supportValidateSoftPrompt(\r\n question,\r\n unansweredVariables,\r\n dispatch,\r\n state,\r\n );\r\n }\r\n // eslint-disable-next-line import/no-deprecated\r\n return supportValidateSoftPrompt(question, variables, dispatch, state);\r\n }\r\n // Question is required but has no mentions.\r\n return failAllVariables(customError || \"IncompleteAnswer\");\r\n }\r\n if (answeredVariables.length && !bypassClientValidation) {\r\n // Test for minimum and maximum values.\r\n if (min !== null && min > 0 && answeredVariables.length < min) {\r\n return failAllVariables(\"InvalidChoicesMin\", { min: String(min) });\r\n }\r\n if (max !== null && max > 0 && answeredVariables.length > max) {\r\n return failAllVariables(\"InvalidChoicesMax\", { max: String(max) });\r\n }\r\n }\r\n return new ValidationBuilder().build();\r\n };\r\n}\r\n\r\nexport function useValidation(\r\n signal: Signal<ValidationOptionsModel, ValidationResultModel>,\r\n validator?: ValidatorCallback,\r\n) {\r\n useSignal(signal, validator);\r\n}\r\n","import * as React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport { useSpring, interpolate, animated } from \"react-spring\";\r\nimport { useDrag } from \"react-use-gesture\";\r\nimport { uniq, clamp } from \"../../utils/lodash\";\r\nimport useStyles from \"./CardSortControl.styles\";\r\nimport { useLanguage } from \"../../hooks/useLanguage\";\r\nimport { ControlProps } from \"./BaseControl\";\r\nimport { translate } from \"../../models/utilities/translationUtilities\";\r\nimport { useElementDimensions } from \"../../hooks/useElementDimensions\";\r\nimport useRecall from \"../../hooks/useRecall\";\r\nimport { VariableModel } from \"../../models/VariableModel\";\r\nimport { usePickMentions, useSetVariableMentions } from \"../../hooks/useMentions\";\r\nimport { usePrevious } from \"../../hooks/usePrevious\";\r\nimport { ChoiceModel } from \"../../models/ChoiceModel\";\r\nimport { useValidation, useDiscreteVariadicValidator } from \"../../hooks/useValidation\";\r\nimport { getSettingString } from \"../../models/utilities/settingUtilities\";\r\nimport { getChoice } from \"../../models/utilities/variableUtilities\";\r\n\r\nconst CARD_SIZE_RATIO = 3 / 5;\r\nconst PADDING_RATIO = 2 / 100;\r\nconst MARGIN_RATIO = 2 / 100;\r\nconst MAX_CARD_SIZE = 200;\r\nconst MIN_FONT_SIZE = 12;\r\nconst MAX_FONT_SIZE = 19;\r\nconst FONT_SIZE_RATIO = 2 / 100;\r\nconst BOUNDS_MARGIN = 90;\r\nconst CARD_MAX_SPACING_RATIO = 3 / 100;\r\n\r\nconst makeCardSpring = ({\r\n gestureState: {\r\n down,\r\n movement: [x, y],\r\n },\r\n left,\r\n top,\r\n immediate,\r\n}: any) => ({\r\n x: down ? x : left,\r\n y: down ? y : top,\r\n z: down ? 10 : 0,\r\n immediate: (name) => (immediate || down) && [\"x\", \"y\"].includes(name),\r\n config: { mass: 1, tension: 170, friction: 25 },\r\n});\r\n\r\ninterface CardProps {\r\n text: string;\r\n color: string;\r\n imageUrl: string;\r\n width: number;\r\n height: number;\r\n padding: number;\r\n left: number;\r\n top: number;\r\n onDrop(xy: number[]);\r\n bounds: { top: number; bottom: number; left: number; right: number };\r\n id: string;\r\n areaCode: any;\r\n}\r\n\r\nfunction CardSortCard({\r\n left,\r\n top,\r\n text,\r\n color,\r\n imageUrl,\r\n width,\r\n height,\r\n padding,\r\n bounds,\r\n onDrop,\r\n id,\r\n areaCode,\r\n}: CardProps) {\r\n const recalledImage = useRecall(imageUrl);\r\n const recalledText = useRecall(text);\r\n const prevBounds = usePrevious(bounds);\r\n const theme = useTheme();\r\n const classes = useStyles({ theme, color });\r\n const drag = React.useRef<any>({ down: false, movement: [0, 0] });\r\n\r\n const [spring, set] = useSpring(() =>\r\n makeCardSpring({ gestureState: drag.current, left, top }),\r\n );\r\n\r\n const boundsChanged = prevBounds !== bounds;\r\n React.useLayoutEffect(() => {\r\n set(makeCardSpring({ gestureState: drag.current, left, top, immediate: boundsChanged }));\r\n }, [left, top, set, boundsChanged]);\r\n\r\n const bind = useDrag(\r\n (state) => {\r\n drag.current = state;\r\n set(makeCardSpring({ gestureState: state, left, top }));\r\n const { movement, down, tap } = state;\r\n if (tap) return;\r\n if (!down && onDrop) onDrop(movement);\r\n },\r\n {\r\n initial: () => [spring.x.getValue(), spring.y.getValue()],\r\n capture: true,\r\n filterTaps: true,\r\n bounds: {\r\n ...bounds,\r\n right: bounds.right - width,\r\n bottom: bounds.bottom - height,\r\n },\r\n },\r\n );\r\n\r\n return (\r\n <animated.div\r\n style={{\r\n width,\r\n height,\r\n transform: interpolate(\r\n [spring.x, spring.y, spring.z],\r\n (x, y, z) => `translate(${x}px, ${y}px) scale(${z * 0.01 + 1})`,\r\n ),\r\n boxShadow: spring.z.interpolate((z) => `0 ${z * 0.3}px ${z + 3}px rgba(0,0,0,0.2)`),\r\n zIndex: spring.z.interpolate((z) => Math.max(1, 1 + Math.round(z))),\r\n backgroundImage: recalledImage && `url('${recalledImage}')`,\r\n touchAction: \"none\",\r\n }}\r\n {...bind()}\r\n className={classes.card}\r\n id={id}\r\n data-areacode={areaCode}\r\n aria-label={recalledText}\r\n >\r\n <div\r\n className=\"allowFocusOnQuestion\"\r\n style={{\r\n padding,\r\n }}\r\n dangerouslySetInnerHTML={{ __html: recalledImage ? undefined : recalledText }}\r\n />\r\n </animated.div>\r\n );\r\n}\r\n\r\ninterface BucketProps {\r\n text: string;\r\n color: string;\r\n width: number;\r\n height: number;\r\n lineHeight: number;\r\n left: number;\r\n top: number;\r\n id: string;\r\n}\r\n\r\nfunction CardSortBucket({ text, color, width, height, lineHeight, left, top, id }: BucketProps) {\r\n const theme = useTheme();\r\n const classes = useStyles({ theme, color });\r\n\r\n return (\r\n <div\r\n className={classes.bucket}\r\n style={{\r\n width,\r\n height,\r\n lineHeight: `${lineHeight}px`,\r\n left,\r\n top,\r\n }}\r\n dangerouslySetInnerHTML={{ __html: text }}\r\n id={id}\r\n aria-label={text}\r\n />\r\n );\r\n}\r\n\r\ninterface GroupProps {\r\n text: string;\r\n width: number;\r\n height: number;\r\n lineHeight: number;\r\n left: number;\r\n top: number;\r\n}\r\n\r\nfunction CardSortGroup({ text, width, height, lineHeight, left, top }: GroupProps) {\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n\r\n return (\r\n <div\r\n className={classes.group}\r\n style={{\r\n width,\r\n height,\r\n lineHeight: `${lineHeight}px`,\r\n left,\r\n top,\r\n }}\r\n dangerouslySetInnerHTML={{ __html: text }}\r\n aria-label={text}\r\n />\r\n );\r\n}\r\n\r\nexport function CardSortControl(props: ControlProps) {\r\n const { question, sequencedVariables, validateSignal } = props;\r\n const [language] = useLanguage();\r\n const [insertionOrder, setInsertionOrder] = React.useState<number[]>([]);\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n const {\r\n ref: containerRef,\r\n dimensions: { innerWidth },\r\n } = useElementDimensions<HTMLDivElement>();\r\n const choices = sequencedVariables[0].choiceList;\r\n const bucketPadding = innerWidth * PADDING_RATIO;\r\n const bucketMargin = innerWidth * MARGIN_RATIO;\r\n const cardSpacing = innerWidth * CARD_MAX_SPACING_RATIO;\r\n const fontSize = clamp(innerWidth * FONT_SIZE_RATIO, MIN_FONT_SIZE, MAX_FONT_SIZE);\r\n const lineHeight = fontSize * 3;\r\n const bucketWidth = innerWidth / 2 - bucketMargin / 2;\r\n const cardSize = clamp((bucketWidth - bucketPadding * 2) * CARD_SIZE_RATIO, 0, MAX_CARD_SIZE);\r\n const cardPadding = cardSize * PADDING_RATIO;\r\n const setMentions = useSetVariableMentions();\r\n const cardVariableMentions = usePickMentions(question.variableNames);\r\n const getCardGroup = React.useCallback(\r\n (card: VariableModel) => translate(card, \"group\", language),\r\n [language],\r\n );\r\n const mentionValueForCard = React.useCallback(\r\n (card: VariableModel) => {\r\n const mentions = cardVariableMentions[card.name] || [];\r\n return mentions[0] && mentions[0].value;\r\n },\r\n [cardVariableMentions],\r\n );\r\n const unselectedCards = React.useMemo(\r\n () => sequencedVariables.filter((c) => mentionValueForCard(c) === undefined),\r\n [sequencedVariables, mentionValueForCard],\r\n );\r\n const groups = React.useMemo(() => uniq(sequencedVariables.map(getCardGroup)), [\r\n sequencedVariables,\r\n getCardGroup,\r\n ]);\r\n const bucketHeight = lineHeight + cardSize + bucketPadding;\r\n const bucketsHeight = Math.ceil(choices.length / 2) * (bucketHeight + bucketMargin);\r\n const groupsHeight = Math.max(Math.ceil(groups.length / 2), 1) * (bucketHeight + bucketMargin);\r\n const containerHeight = bucketsHeight + groupsHeight;\r\n\r\n const bounds = React.useMemo(\r\n () => ({\r\n top: -BOUNDS_MARGIN,\r\n bottom: containerHeight + BOUNDS_MARGIN,\r\n left: -BOUNDS_MARGIN,\r\n right: innerWidth + BOUNDS_MARGIN,\r\n }),\r\n [innerWidth, containerHeight],\r\n );\r\n\r\n useValidation(validateSignal, useDiscreteVariadicValidator(question, sequencedVariables));\r\n\r\n const insertionOrderSort = (a, b) =>\r\n insertionOrder.indexOf(a.id) - insertionOrder.indexOf(b.id);\r\n\r\n const unselectedCardGroup = (group: string) =>\r\n unselectedCards.filter((v) => getCardGroup(v) === group).sort(insertionOrderSort);\r\n\r\n const cardsForChoice = (choice: ChoiceModel) =>\r\n sequencedVariables\r\n .filter((v) => mentionValueForCard(v) === choice.value)\r\n .sort(insertionOrderSort);\r\n\r\n const cardTop = (card: VariableModel) => {\r\n const value = mentionValueForCard(card);\r\n const group = getCardGroup(card);\r\n const i = choices.findIndex((c) => c.value === value);\r\n if (i === -1) {\r\n const groupIndex = groups.indexOf(group);\r\n return (\r\n bucketsHeight +\r\n Math.floor(groupIndex / 2) * (bucketHeight + bucketMargin) +\r\n lineHeight\r\n );\r\n }\r\n return Math.floor(i / 2) * (bucketHeight + bucketMargin) + lineHeight;\r\n };\r\n\r\n const cardLeft = (card: VariableModel) => {\r\n const value = mentionValueForCard(card);\r\n const choice = choices.find((c) => c.value === value);\r\n const group = getCardGroup(card);\r\n const cards = choice ? cardsForChoice(choice) : unselectedCardGroup(group);\r\n const spacing = clamp(\r\n (bucketWidth - bucketPadding - cardSize) / cards.length,\r\n 0,\r\n cardSpacing,\r\n );\r\n const choiceIndex = choice ? choices.indexOf(choice) : groups.indexOf(group);\r\n const cardIndex = cards.indexOf(card);\r\n const offset = cardIndex * spacing;\r\n return (choiceIndex % 2) * (innerWidth / 2 + bucketMargin / 2) + offset + bucketPadding;\r\n };\r\n\r\n const onChoiceDrop = (card: VariableModel) => ([x, y]: number[]) => {\r\n const cx = x + cardSize / 2;\r\n const cy = y + cardSize / 2;\r\n const r = Math.floor(cy / bucketHeight);\r\n const c = cx < innerWidth / 2 ? 0 : 1;\r\n const i = c + r * 2;\r\n const dropBucket = i >= 0 && i < choices.length ? i : undefined;\r\n\r\n if (dropBucket !== undefined) {\r\n const dropChoice = choices[dropBucket];\r\n setMentions(card.name, (b) => b.set(dropChoice.value));\r\n } else {\r\n setMentions(card.name, (b) => b.clear());\r\n }\r\n setInsertionOrder([...insertionOrder.filter((id) => id !== card.id), card.id]);\r\n };\r\n\r\n // To Do : remove duplicated code from BaseControl.tsx\r\n const getMentions = (props: ControlProps, variableName?: string) => {\r\n const [variable] = props.question.variables;\r\n const mentions = props.mentions[(variableName || variable.name).toUpperCase()] || [];\r\n return mentions.filter((mention) => mention.matrix === props.matrix);\r\n };\r\n\r\n // To Do : remove duplicated code from BaseControl.tsx\r\n const getMention = (props: ControlProps, variableName?: string, mentionIndex?: number) =>\r\n getMentions(props, variableName).find((m) => m.index === (mentionIndex || 1));\r\n\r\n // To Do : remove duplicated code from BaseControl.tsx\r\n const getMentionValue = (props: ControlProps, variableName?: string, mentionIndex?: number) =>\r\n (getMention(props, variableName, mentionIndex) || { value: \"\" }).value;\r\n\r\n const getCurrentChoice = (props: ControlProps, variableName: VariableModel) => {\r\n const value = getMentionValue(props, variableName.name);\r\n return getChoice(variableName, value);\r\n };\r\n\r\n return (\r\n <div\r\n className={classes.container}\r\n ref={containerRef}\r\n style={{\r\n height: containerHeight,\r\n fontSize: `${fontSize}px`,\r\n }}\r\n >\r\n {sequencedVariables[0].choiceList.map((c, i) => (\r\n <CardSortBucket\r\n id={c.elementId}\r\n key={c.name}\r\n color={getSettingString(c, \"Color\")}\r\n text={translate(c, \"text\", language)}\r\n top={Math.floor(i / 2) * (bucketHeight + bucketMargin)}\r\n left={(i % 2) * (innerWidth / 2 + bucketMargin / 2)}\r\n width={bucketWidth}\r\n height={bucketHeight}\r\n lineHeight={lineHeight}\r\n />\r\n ))}\r\n {groups.map((g, i) => (\r\n <CardSortGroup\r\n key={g}\r\n text={g}\r\n top={bucketsHeight + Math.floor(i / 2) * (bucketHeight + bucketMargin)}\r\n left={(i % 2) * (innerWidth / 2 + bucketMargin / 2)}\r\n width={bucketWidth}\r\n height={bucketHeight}\r\n lineHeight={lineHeight}\r\n />\r\n ))}\r\n {sequencedVariables.sort(insertionOrderSort).map((v) => {\r\n const choice = getCurrentChoice(props, v);\r\n\r\n return (\r\n <CardSortCard\r\n id={v.elementId}\r\n key={v.name}\r\n color={getSettingString(v, \"Color\")}\r\n text={translate(v, \"text\", language)}\r\n imageUrl={translate(v, \"imageUrl\", language)}\r\n onDrop={onChoiceDrop(v)}\r\n top={cardTop(v)}\r\n left={cardLeft(v)}\r\n width={cardSize}\r\n height={cardSize}\r\n padding={cardPadding}\r\n bounds={bounds}\r\n areaCode={choice !== undefined ? choice.value : \"none\"}\r\n />\r\n );\r\n })}\r\n </div>\r\n );\r\n}\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport { Scrollbars } from \"react-custom-scrollbars\";\r\nimport classnames from \"classnames\";\r\nimport { IconProp } from \"@fortawesome/fontawesome-svg-core\";\r\nimport { FontAwesomeIcon } from \"./FontAwesome\";\r\nimport useStyles from \"./ScrollableContainer.styles\";\r\n\r\ninterface Props {\r\n children?: any;\r\n}\r\n\r\nenum ScrollDirection {\r\n Left = -1,\r\n Right = 1,\r\n}\r\n\r\nfunction ScrollableIndicator({ onClick, direction, showIndicator }) {\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n\r\n const [icon, indicatorClass] =\r\n direction === ScrollDirection.Left\r\n ? [\"chevron-left\", classes.indicatorLeft]\r\n : [\"chevron-right\", classes.indicatorRight];\r\n\r\n return (\r\n <div\r\n role=\"button\"\r\n className={classnames(\r\n classes.indicator,\r\n indicatorClass,\r\n !showIndicator && classes.indicatorHidden,\r\n )}\r\n onClick={onClick}\r\n >\r\n <FontAwesomeIcon icon={icon as IconProp} className={classes.icon} />\r\n </div>\r\n );\r\n}\r\n\r\nconst defaultScrollValues = { scrollLeft: 0, scrollWidth: 0, clientWidth: 0 };\r\nconst deadzone = 29;\r\n\r\nexport default function ScrollableContainer(props: Props) {\r\n const theme = useTheme();\r\n const scrollbarRef = React.useRef<Scrollbars>(null);\r\n const classes = useStyles({ theme });\r\n const toggleIndicators = React.useCallback(({ scrollLeft, scrollWidth, clientWidth }) => {\r\n const isContainerNarrow = clientWidth < scrollWidth;\r\n setShowLeftScrollIndicator(isContainerNarrow && scrollLeft > deadzone);\r\n setShowRightScrollIndicator(\r\n isContainerNarrow && scrollLeft + clientWidth < scrollWidth - deadzone,\r\n );\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n window.addEventListener(\"load\", toggleIndicators);\r\n return () => {\r\n window.removeEventListener(\"load\", toggleIndicators);\r\n };\r\n }, []);\r\n\r\n const [showLeftScrollIndicator, setShowLeftScrollIndicator] = React.useState(false);\r\n const [showRightScrollIndicator, setShowRightScrollIndicator] = React.useState(false);\r\n const [{ scrollLeft, scrollWidth, clientWidth }, setScrollValues] = React.useState(\r\n defaultScrollValues,\r\n );\r\n const { children } = props;\r\n\r\n const scrollBy = React.useCallback((value: number) => {\r\n if (scrollbarRef.current.view)\r\n scrollbarRef.current.view.scrollBy({\r\n left: value,\r\n behavior: \"smooth\",\r\n });\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n const isContainerNarrow = clientWidth < scrollWidth;\r\n const hasMoreLeft = scrollLeft > deadzone;\r\n const shouldShowLeftScrollIndicator = isContainerNarrow && hasMoreLeft;\r\n\r\n setShowLeftScrollIndicator(shouldShowLeftScrollIndicator);\r\n\r\n const hasMoreRight = scrollLeft + clientWidth < scrollWidth - deadzone;\r\n const shouldShowRightScrollIndicator = isContainerNarrow && hasMoreRight;\r\n\r\n setShowRightScrollIndicator(shouldShowRightScrollIndicator);\r\n }, [clientWidth, scrollWidth, scrollLeft]);\r\n\r\n function scrollPage(direction: ScrollDirection) {\r\n scrollBy(clientWidth * direction);\r\n }\r\n\r\n return (\r\n <div className={classes.scrollable}>\r\n <ScrollableIndicator\r\n onClick={() => scrollPage(ScrollDirection.Left)}\r\n direction={ScrollDirection.Left}\r\n showIndicator={showLeftScrollIndicator}\r\n />\r\n <Scrollbars\r\n className={classnames(classes.scrollbars)}\r\n ref={scrollbarRef}\r\n autoHide={false}\r\n autoHeight\r\n autoHeightMax={Number.MAX_SAFE_INTEGER}\r\n onUpdate={(values) => {\r\n toggleIndicators(values);\r\n setScrollValues(values);\r\n }}\r\n renderTrackHorizontal={(trackProps) => (\r\n <div {...trackProps} className={classnames(classes.scrollTrackHorizontal)} />\r\n )}\r\n renderThumbHorizontal={(thumbProps) => (\r\n <div {...thumbProps} className={classes.scrollThumbHorizontal} />\r\n )}\r\n renderView={(viewProps) => {\r\n return <div {...viewProps} className={classes.scrollableWindow} />;\r\n }}\r\n >\r\n <div className={classes.scrollableChild}>{children}</div>\r\n </Scrollbars>\r\n <ScrollableIndicator\r\n onClick={() => scrollPage(ScrollDirection.Right)}\r\n direction={ScrollDirection.Right}\r\n showIndicator={showRightScrollIndicator}\r\n />\r\n </div>\r\n );\r\n}\r\n","import { BaseControl, ControlProps } from \"./BaseControl\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\nimport { ValidationBuilder } from \"../../models/builders/ValidationBuilder\";\r\nimport { ValidationOptionsModel } from \"../../models/ValidationOptionsModel\";\r\n\r\nexport class NullControl extends BaseControl<any, any> {\r\n initializeQuestion(question: QuestionModel, props: ControlProps): void {}\r\n\r\n renderQuestion(question: QuestionModel): JSX.Element | null {\r\n return null;\r\n }\r\n\r\n validate(options?: ValidationOptionsModel): ValidationResultModel {\r\n return new ValidationBuilder().build();\r\n }\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\nimport { controlBackgroundColor, foregroundColor, getSpacing } from \"../../theme/Mixins\";\r\n\r\nexport default createUseStyles((theme: any) => ({\r\n scrollbars: {\r\n composes: \"scrollbars\",\r\n /* Override overflow from react-custom-scrollbars to allow overflow for dropdowns */\r\n overflow: \"auto !important\",\r\n \"&::-webkit-scrollbar\": {\r\n height: \"8px\",\r\n },\r\n \"&::-webkit-scrollbar-track\": {\r\n background: \"#f1f1f1\",\r\n },\r\n \"&::-webkit-scrollbar-thumb\": {\r\n background: \"#888\",\r\n },\r\n \"&::-webkit-scrollbar-button\": {\r\n display: \"none\",\r\n },\r\n },\r\n scrollable: {\r\n composes: \"scrollable\",\r\n margin: ({ theme }) => [[getSpacing(theme, 0, theme.QuestionSpacing?.WithinComponents), 0]],\r\n position: \"relative\",\r\n },\r\n scrollableWindow: {\r\n composes: \"scrollable__window\",\r\n display: \"flex\",\r\n overflow: \"auto !important\",\r\n margin: \"0 !important\",\r\n },\r\n scrollTrackHorizontal: {\r\n left: 29,\r\n right: 29,\r\n zIndex: \"auto\",\r\n bottom: 0,\r\n height: \"16px !important\",\r\n transition: \"opacity 200ms\",\r\n },\r\n scrollThumbHorizontal: {\r\n borderRadius: 3,\r\n background: theme.ControlBorderColor,\r\n height: \"6px !important\",\r\n top: 5,\r\n transition: \"height 100ms, border-radius 100ms, top 100ms\",\r\n },\r\n scrollThumbHorizontalActive: {\r\n borderRadius: 8,\r\n top: 0,\r\n height: \"16px !important\",\r\n },\r\n scrollableChild: {\r\n composes: \"scrollable__child\",\r\n width: \"100%\",\r\n },\r\n indicator: {\r\n position: \"absolute\",\r\n top: \"50%\",\r\n cursor: \"pointer\",\r\n zIndex: 10,\r\n opacity: 0.5,\r\n fontSize: 30,\r\n transition: \"opacity 0.3s\",\r\n \"&:hover\": {\r\n opacity: 1,\r\n },\r\n },\r\n indicatorLeft: {\r\n composes: \"scrollable__scroll-indicator--left\",\r\n left: 10,\r\n position: \"absolute\",\r\n },\r\n indicatorRight: {\r\n composes: \"scrollable__scroll-indicator--right\",\r\n right: 10,\r\n position: \"absolute\",\r\n },\r\n indicatorHidden: {\r\n composes: \"scrollable__scroll-indicator--hidden\",\r\n display: \"none\",\r\n },\r\n icon: {\r\n composes: \"scrollable__scroll-indicator__icon\",\r\n color: foregroundColor(theme, controlBackgroundColor(theme)),\r\n },\r\n}));\r\n","import { createUseStyles } from \"react-jss\";\r\nimport { foregroundColor, alpha, getFontSize } from \"../../theme/Mixins\";\r\n\r\nexport default createUseStyles({\r\n paginatedTable: {\r\n composes: \"paginated-table\",\r\n },\r\n table: {\r\n composes: \"grid-view\",\r\n background: ({ theme }) =>\r\n theme.DynamicCss?.HasGridChanges ? {} : alpha(\"#fff\", theme.ControlAlpha),\r\n color: ({ theme }) => (theme.DynamicCss?.HasGridChanges ? {} : theme.ForegroundColorDark),\r\n borderCollapse: \"collapse\",\r\n borderRadius: ({ theme }) => Math.min(theme.BorderRadius, 20),\r\n overflow: \"hidden\",\r\n boxShadow: ({ theme }) =>\r\n theme.BorderWidth > 1 && `0 0 0 ${theme.BorderWidth}px ${theme.ControlBorderColor}`,\r\n margin: ({ theme }) => theme.BorderWidth > 1 && theme.BorderWidth,\r\n\r\n \"& td, & th\": {\r\n padding: [[8, 24]],\r\n border: 0,\r\n whiteSpace: \"nowrap\",\r\n overflow: \"hidden\",\r\n textOverflow: \"ellipsis\",\r\n maxWidth: 400,\r\n },\r\n },\r\n tableRow: {\r\n composes: \"data-row\",\r\n },\r\n tableRowAlternate: {\r\n background: ({ theme }) =>\r\n theme.DynamicCss?.HasGridChanges\r\n ? {}\r\n : alpha(theme.ControlBackground, theme.ControlAlpha),\r\n },\r\n tableRowSelectable: {\r\n composes: \"row--selectable\",\r\n cursor: \"pointer\",\r\n userSelect: \"none\",\r\n },\r\n tableRowSelected: {\r\n composes: \"row--selected\",\r\n background: ({ theme }) =>\r\n theme.DynamicCss?.HasGridChanges ? {} : theme.ControlAlpha !== 0 && theme.PrimaryColor,\r\n color: ({ theme }) =>\r\n theme.DynamicCss?.HasGridChanges\r\n ? {}\r\n : theme.ControlAlpha !== 0 && foregroundColor(theme, theme.PrimaryColor),\r\n },\r\n tableRowCheckbox: {\r\n padding: \"6px !important\",\r\n\r\n \"& span\": {\r\n height: 32,\r\n },\r\n },\r\n tableColumn: {\r\n background: ({ theme }) => (theme.DynamicCss?.HasGridChanges ? {} : theme.SecondaryColor),\r\n color: ({ theme }) =>\r\n theme.DynamicCss?.HasGridChanges ? {} : foregroundColor(theme, theme.SecondaryColor),\r\n textAlign: \"left\",\r\n fontWeight: \"normal\",\r\n cursor: \"pointer\",\r\n userSelect: \"none\",\r\n },\r\n tableColumnFilter: {\r\n background: ({ theme }) => (theme.DynamicCss?.HasGridChanges ? {} : theme.SecondaryColor),\r\n color: ({ theme }) =>\r\n theme.DynamicCss?.HasGridChanges ? {} : foregroundColor(theme, theme.SecondaryColor),\r\n padding: \"0 6px 8px 6px !important\",\r\n },\r\n tableColumnFilterInput: {\r\n display: \"block\",\r\n boxSizing: \"border-box\",\r\n width: \"100%\",\r\n background: \"#fff\",\r\n padding: \"8px 18px\",\r\n fontSize: \"14px\",\r\n outline: 0,\r\n border: 0,\r\n },\r\n sortedColumn: {\r\n fontWeight: \"bolder\",\r\n },\r\n searchToggleButton: {\r\n borderRadius: ({ theme }) => theme.BorderRadius,\r\n margin: 0,\r\n },\r\n hiddenItem: {\r\n display: \"none\",\r\n },\r\n inputWithButton: {\r\n position: \"absolute\",\r\n right: 0,\r\n top: 0,\r\n padding: \"5px\",\r\n margin: 0,\r\n border: 0,\r\n background: \"none\",\r\n width: \"30px\",\r\n height: \"30px\",\r\n cursor: \"pointer\",\r\n lineHeight: \"35px\",\r\n },\r\n gridHeaderButtons: {\r\n display: \"flex\",\r\n justifyContent: \"space-between\",\r\n alignItems: \"flex-start\",\r\n alignSelf: \"stretch\",\r\n width: \"100%\",\r\n },\r\n gridSearchZone: {\r\n display: \"flex\",\r\n alignContent: \"right\",\r\n },\r\n formRow: {\r\n marginBottom: ({ theme }) => theme.QuestionSpacing?.BetweenComponents,\r\n },\r\n label: {\r\n fontSize: ({ theme }) => getFontSize(theme.TextFontSize),\r\n marginBottom: ({ theme }) => theme.QuestionSpacing?.WithinComponents,\r\n },\r\n inputField: {\r\n width: \"100%\",\r\n fontSize: ({ theme }) => getFontSize(theme.TextFontSize),\r\n lineHeight: \"22px\",\r\n outline: \"none\",\r\n border: \"1px solid #D0D3DD\",\r\n borderRadius: 6,\r\n padding: [[9, 10]],\r\n boxSizing: \"border-box\",\r\n resize: \"none\",\r\n\r\n \"&:active, &:focus\": {\r\n color: \"#F68A5A\",\r\n },\r\n },\r\n});\r\n","import { createUseStyles } from \"react-jss\";\r\n\r\nexport default createUseStyles({\r\n footer: {\r\n composes: \"paginated-table__footer\",\r\n display: \"flex\",\r\n fontSize: \"12px\",\r\n flexDirection: \"row\",\r\n alignItems: \"center\",\r\n padding: [[12, 0]],\r\n \"@media (max-width: 600px)\": {\r\n flexDirection: \"column\",\r\n },\r\n },\r\n pageInfo: {\r\n composes: \"paginated-table__page-info\",\r\n },\r\n flex: {\r\n flex: 1,\r\n },\r\n rowsPerPage: {\r\n padding: [[0, 24]],\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n alignItems: \"center\",\r\n },\r\n});\r\n","import { createUseStyles } from \"react-jss\";\r\nimport { foregroundColor, alpha, darken } from \"../../theme/Mixins\";\r\n\r\nexport default createUseStyles({\r\n buttonGroup: {\r\n display: \"flex\",\r\n paddingLeft: ({ theme }) => theme.BorderWidth,\r\n },\r\n groupButton: {\r\n boxShadow: ({ theme }) => `0 0 0 ${theme.BorderWidth}px ${theme.ControlBorderColor} inset`,\r\n marginLeft: ({ theme }) => -theme.BorderWidth,\r\n fontWeight: 700,\r\n background: ({ theme }) => theme.ControlBackground,\r\n color: ({ theme }) => foregroundColor(theme, theme.ControlBackground),\r\n userSelect: \"none\",\r\n cursor: \"pointer\",\r\n\r\n \"&:first-child\": {\r\n borderTopLeftRadius: ({ theme }) => theme.BorderRadius,\r\n borderBottomLeftRadius: ({ theme }) => theme.BorderRadius,\r\n },\r\n\r\n \"&:last-child\": {\r\n borderTopRightRadius: ({ theme }) => theme.BorderRadius,\r\n borderBottomRightRadius: ({ theme }) => theme.BorderRadius,\r\n },\r\n },\r\n groupButtonActive: {\r\n boxShadow: ({ theme }) =>\r\n `0 0 0 ${theme.BorderWidth}px ${darken(theme.PrimaryColor, 0.5)} inset`,\r\n background: ({ theme }) => theme.PrimaryColor,\r\n color: ({ theme }) => foregroundColor(theme, theme.PrimaryColor),\r\n zIndex: 2,\r\n },\r\n groupButtonDisabled: {\r\n color: ({ theme }) => alpha(foregroundColor(theme, theme.ControlBackground), 0.6),\r\n cursor: \"default\",\r\n },\r\n groupButtonGrid: {\r\n padding: [8, 16],\r\n lineHeight: \"34px\",\r\n },\r\n groupButtonNoGrid: {\r\n padding: ({ theme }) => [[0, 9 + theme.BorderWidth]],\r\n lineHeight: \"1.6em\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport useStyles from \"./ButtonGroup.styles\";\r\nimport { FontAwesomeIcon } from \"./FontAwesome\";\r\nimport { IconProp } from \"@fortawesome/fontawesome-svg-core\";\r\nimport classNames from \"classnames\";\r\n\r\ninterface GroupButtonInheritedProps {\r\n size?: \"small\" | \"large\";\r\n isGrid?: boolean;\r\n}\r\n\r\ninterface GroupButtonProps {\r\n text?: React.ReactNode;\r\n icon?: IconProp;\r\n inheritedProps?: GroupButtonInheritedProps;\r\n onClick?(): void;\r\n active?: boolean;\r\n disabled?: boolean;\r\n}\r\n\r\nfunction GroupButton(props: GroupButtonProps) {\r\n const { text, icon, active, disabled, onClick, inheritedProps } = props;\r\n const { size = \"large\", isGrid } = inheritedProps;\r\n\r\n const theme = useTheme();\r\n const classes = useStyles({ theme, size });\r\n\r\n let content = text;\r\n if (icon) content = <FontAwesomeIcon icon={icon} />;\r\n\r\n return (\r\n <div\r\n onClick={!disabled ? onClick : undefined}\r\n className={classNames(\r\n classes.groupButton,\r\n isGrid ? classes.groupButtonGrid : classes.groupButtonNoGrid,\r\n disabled && classes.groupButtonDisabled,\r\n active && classes.groupButtonActive,\r\n )}\r\n role=\"button\"\r\n >\r\n {content}\r\n </div>\r\n );\r\n}\r\n\r\ninterface Props {\r\n children: any;\r\n}\r\n\r\nexport default function ButtonGroup(props: Props & GroupButtonInheritedProps) {\r\n const { children, size } = props;\r\n\r\n const theme = useTheme();\r\n const classes = useStyles({ theme, size });\r\n\r\n const clonedChildren = React.Children.map(children, (child) => {\r\n return child && React.cloneElement(child, { inheritedProps: props });\r\n });\r\n\r\n return <div className={classes.buttonGroup}>{clonedChildren}</div>;\r\n}\r\n\r\nButtonGroup.Button = GroupButton;\r\n","import { createUseStyles } from \"react-jss\";\r\n\r\nexport default createUseStyles({\r\n pagination: {\r\n flexShrink: 0,\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport { range } from \"../../utils/lodash\";\r\nimport { PaginatedTableProps } from \"./PaginatedTable\";\r\nimport ButtonGroup from \"../shared/ButtonGroup\";\r\nimport useStyles from \"./TablePagination.styles\";\r\n\r\ninterface PaginationProps {\r\n tableProps: PaginatedTableProps;\r\n rowsPerPage: number;\r\n currentPage: number;\r\n pageCount: number;\r\n}\r\n\r\nexport function TablePagination(props: PaginationProps) {\r\n const { tableProps, rowsPerPage, currentPage, pageCount } = props;\r\n const { onChangePage: onPageChanged } = tableProps;\r\n\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n\r\n let startPage = currentPage - 1;\r\n let endPage = startPage + 3;\r\n\r\n let showStartEllipsis = startPage > 2;\r\n if (!showStartEllipsis) {\r\n startPage = 2;\r\n endPage = 6;\r\n }\r\n\r\n const showEndEllipsis = endPage < pageCount - 2;\r\n if (!showEndEllipsis) {\r\n startPage = pageCount - 4;\r\n endPage = pageCount;\r\n showStartEllipsis = startPage > 3;\r\n }\r\n\r\n startPage = Math.max(startPage, 2);\r\n endPage = Math.min(endPage, pageCount);\r\n\r\n function navigateToPage(page: number) {\r\n if (page > pageCount) {\r\n navigateToPage(pageCount);\r\n return;\r\n }\r\n if (page < 1) {\r\n navigateToPage(1);\r\n return;\r\n }\r\n onPageChanged((page - 1) * rowsPerPage, rowsPerPage);\r\n }\r\n\r\n return (\r\n <div className={classes.pagination}>\r\n <ButtonGroup size=\"small\">\r\n <ButtonGroup.Button\r\n icon=\"chevron-double-left\"\r\n disabled={currentPage <= 1}\r\n onClick={() => navigateToPage(1)}\r\n />\r\n <ButtonGroup.Button\r\n icon=\"chevron-left\"\r\n disabled={currentPage <= 1}\r\n onClick={() => navigateToPage(currentPage - 1)}\r\n />\r\n <ButtonGroup.Button\r\n text=\"1\"\r\n active={currentPage === 1}\r\n onClick={() => navigateToPage(1)}\r\n />\r\n {showStartEllipsis && <ButtonGroup.Button text=\"…\" disabled />}\r\n {endPage > 1 &&\r\n range(startPage, endPage).map((page) => (\r\n <ButtonGroup.Button\r\n key={page}\r\n text={String(page)}\r\n active={currentPage === page}\r\n onClick={() => navigateToPage(page)}\r\n />\r\n ))}\r\n {showEndEllipsis && <ButtonGroup.Button text=\"…\" disabled />}\r\n {endPage > 1 && (\r\n <ButtonGroup.Button\r\n text={String(pageCount)}\r\n active={currentPage === pageCount}\r\n onClick={() => navigateToPage(pageCount)}\r\n />\r\n )}\r\n <ButtonGroup.Button\r\n icon=\"chevron-right\"\r\n disabled={currentPage >= pageCount}\r\n onClick={() => navigateToPage(currentPage + 1)}\r\n />\r\n <ButtonGroup.Button\r\n icon=\"chevron-double-right\"\r\n disabled={currentPage >= pageCount}\r\n onClick={() => navigateToPage(pageCount)}\r\n />\r\n </ButtonGroup>\r\n </div>\r\n );\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\nimport { foregroundColor } from \"../../theme/Mixins\";\r\n\r\nexport default createUseStyles({\r\n select: ({ theme }) => ({\r\n boxShadow: `0 0 0 ${theme.BorderWidth}px ${theme.ControlBorderColor} inset`,\r\n borderRadius: theme.BorderRadius,\r\n background: theme.ControlBackground,\r\n color: foregroundColor(theme, theme.ControlBackground),\r\n padding: [[1, 4]],\r\n lineHeight: \"1.6em\",\r\n border: 0,\r\n margin: \"10px\",\r\n }),\r\n});\r\n","import React from \"react\";\r\nimport useStyles from \"./TinySelect.styles\";\r\nimport { useTheme } from \"react-jss\";\r\n\r\ninterface Props {\r\n value: string;\r\n options: string[];\r\n onChange(value: string): void;\r\n}\r\n\r\nexport function TinySelect(props: Props) {\r\n const { options, onChange, value } = props;\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n return (\r\n <select className={classes.select} value={value} onChange={(e) => onChange(e.target.value)}>\r\n {options.map((v) => (\r\n <option value={v} key={v}>\r\n {v}\r\n </option>\r\n ))}\r\n </select>\r\n );\r\n}\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport useStyles from \"./TableFooter.styles\";\r\nimport { PaginatedTableProps } from \"./PaginatedTable\";\r\nimport { TablePagination } from \"./TablePagination\";\r\nimport { TinySelect } from \"../select/TinySelect\";\r\nimport Button from \"../shared/Button\";\r\ninterface FooterProps {\r\n children: React.ReactNode;\r\n rowsPerPage: number;\r\n tableProps: PaginatedTableProps;\r\n currentPage: number;\r\n pageCount: number;\r\n lengthMenuText: string;\r\n isShowRowsPerPage?: boolean;\r\n isShowPageInfo?: boolean;\r\n isAddNewItem?: boolean;\r\n newItemLabel?: string;\r\n onChangeRowsPerPage(value: number);\r\n onItemAdd?(): void;\r\n isShowPagination?: boolean;\r\n}\r\n\r\nexport function TableFooter(props: FooterProps) {\r\n const {\r\n children,\r\n rowsPerPage,\r\n tableProps,\r\n onChangeRowsPerPage,\r\n currentPage,\r\n pageCount,\r\n lengthMenuText,\r\n isShowRowsPerPage = true,\r\n isShowPageInfo = true,\r\n isAddNewItem,\r\n onItemAdd,\r\n newItemLabel,\r\n isShowPagination = true,\r\n } = props;\r\n const { rowsPerPageOptions } = tableProps;\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n const [displayText, itemsText] = lengthMenuText.split(\"_MENU_\");\r\n return (\r\n <div className={classes.footer}>\r\n {isShowPagination && (\r\n <>\r\n {isShowPageInfo && (\r\n <div className={classes.pageInfo} role=\"status\" aria-live=\"polite\">\r\n {children}\r\n </div>\r\n )}\r\n {isShowRowsPerPage && (\r\n <>\r\n <div className={classes.flex} />\r\n <div className={classes.rowsPerPage}>\r\n {displayText}\r\n <TinySelect\r\n value={String(rowsPerPage)}\r\n options={rowsPerPageOptions.map(String)}\r\n onChange={(value) => onChangeRowsPerPage(parseInt(value, 10))}\r\n />\r\n {itemsText}\r\n </div>\r\n </>\r\n )}\r\n <TablePagination\r\n currentPage={currentPage}\r\n pageCount={pageCount}\r\n rowsPerPage={rowsPerPage}\r\n tableProps={tableProps}\r\n />\r\n </>\r\n )}\r\n {isAddNewItem && (\r\n <>\r\n <div className={classes.flex} />\r\n <Button\r\n icon={[\"far\", \"plus\"]}\r\n iconPosition=\"start\"\r\n text={newItemLabel}\r\n onClick={onItemAdd}\r\n />\r\n </>\r\n )}\r\n </div>\r\n );\r\n}\r\n","import { createUseStyles } from \"react-jss\"\r\nimport { getFontSize } from \"../../theme/Mixins\"\r\n\r\n\r\nexport default createUseStyles((theme: any) => ({\r\n modalContent: {\r\n fontFamily: ({ theme }) => `\"${theme.TextFont}\", sans-serif`,\r\n fontSize: ({ theme }) => getFontSize(theme.TextFontSize),\r\n },\r\n modalHeader: {\r\n display: \"flex\",\r\n justifyContent: \"space-between\",\r\n alignItems: \"flex-start\",\r\n marginBottom: \"20px\",\r\n borderBottom: \"1px solid #D0D3DD\",\r\n padding: \"0 12px\",\r\n },\r\n modalTitle: {\r\n display: \"flex\",\r\n height: \"45px\",\r\n alignItems: \"center\",\r\n alignSelf: \"stretch\",\r\n fontSize: \"20px\",\r\n },\r\n modalBody: {\r\n marginBottom: \"20px\",\r\n padding: \"0 24px\",\r\n height: \"380px\",\r\n overflowY: \"auto\",\r\n },\r\n modalFooter: {\r\n display: \"flex\",\r\n justifyContent: \"flex-end\",\r\n padding: \"0 12px\",\r\n alignItems: \"center\",\r\n borderTop: \"1px solid #D0D3DD\",\r\n },\r\n closeButton: {\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n fontSize: \"20px\",\r\n border: 0,\r\n background: 0,\r\n height: \"45px\",\r\n cursor: \"pointer\",\r\n },\r\n}))","import Modal from \"react-modal\";\r\nimport React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport useStyles from \"./ModalDialog.style\";\r\nimport Button from \"./Button\";\r\n\r\nexport interface OkResult {\r\n isSuccess: boolean;\r\n message?: string;\r\n onSuccess?(): void;\r\n}\r\n\r\ninterface Props {\r\n isOpen: boolean;\r\n title: string;\r\n okActionText: string;\r\n cancelActionText: string;\r\n onOkAction?(): OkResult;\r\n onCancelAction?(): void;\r\n children: unknown;\r\n isDisableConfirm?: boolean;\r\n}\r\n\r\nexport default function ModalDialog(props: Props) {\r\n const [width, setWidth] = React.useState(window.innerWidth);\r\n const {\r\n onOkAction,\r\n onCancelAction,\r\n cancelActionText,\r\n okActionText,\r\n children,\r\n isOpen,\r\n title,\r\n isDisableConfirm,\r\n } = props;\r\n\r\n React.useEffect(() => {\r\n const updateWindowDimensions = () => {\r\n const newWidth = window.innerWidth;\r\n setWidth(newWidth);\r\n };\r\n window.addEventListener(\"resize\", updateWindowDimensions);\r\n return () => window.removeEventListener(\"resize\", updateWindowDimensions)\r\n }, []);\r\n\r\n const theme: any = useTheme();\r\n const classes = useStyles({ theme });\r\n const calculatedMargin = width / 2 - 200;\r\n const modalStyles = {\r\n content: {\r\n maxHeight: \"541px\",\r\n maxWidth: \"400px\",\r\n marginLeft: calculatedMargin,\r\n padding: 0\r\n },\r\n overlay: {\r\n zIndex: 1000,\r\n },\r\n };\r\n\r\n const onSaveAction = () => {\r\n const validation = onOkAction();\r\n if (validation.isSuccess) {\r\n if (validation.onSuccess) {\r\n validation.onSuccess();\r\n }\r\n onCancelAction();\r\n return;\r\n }\r\n\r\n alert(validation.message);\r\n }\r\n\r\n return (\r\n <Modal isOpen={isOpen} style={modalStyles} ariaHideApp={false} shouldCloseOnOverlayClick>\r\n <div className={classes.modalContent}>\r\n <div className={classes.modalHeader}>\r\n <div className={classes.modalTitle}>{title}</div>\r\n <button type=\"button\" className={classes.closeButton} onClick={onCancelAction}>X</button>\r\n </div>\r\n <div className={classes.modalBody}>{children}</div>\r\n <div className={classes.modalFooter}>\r\n <Button\r\n text={cancelActionText}\r\n onClick={onCancelAction}\r\n size=\"large\"\r\n buttonType=\"CANCEL\"\r\n />\r\n <Button\r\n text={okActionText}\r\n onClick={onSaveAction}\r\n size=\"large\"\r\n buttonType=\"SUBMIT\"\r\n disabled={isDisableConfirm}\r\n />\r\n </div>\r\n </div>\r\n </Modal>\r\n );\r\n}\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport numeral from \"numeral\";\r\nimport classNames from \"classnames\";\r\nimport ScrollableContainer from \"../shared/ScrollableContainer\";\r\nimport useStyles from \"./PaginatedTable.styles\";\r\nimport { FontAwesomeIcon } from \"../shared/FontAwesome\";\r\nimport { TableFooter } from \"./TableFooter\";\r\nimport InputBox from \"../shared/InputBox\";\r\nimport { CheckBoxIcon } from \"../shared/CheckBoxIcon\";\r\nimport Button from \"../shared/Button\";\r\nimport ButtonGroup from \"../shared/ButtonGroup\";\r\nimport ModalDialog, { OkResult } from \"../shared/ModalDialog\";\r\nimport { AdvancedSettingsVersion } from \"../../consts\";\r\n\r\nexport interface TableColumn {\r\n name: string;\r\n searchable?: boolean;\r\n width?: number;\r\n filter?: string;\r\n translatedName?: string;\r\n}\r\n\r\nexport interface TableRow {\r\n id: number;\r\n selected?: boolean;\r\n [columnName: string]: any;\r\n}\r\n\r\nexport interface ColumnFilterProps {\r\n value?: string;\r\n onChange?(value: string): void;\r\n name?: string;\r\n}\r\n\r\nexport interface TableTexts {\r\n search: string;\r\n selectedItems: string;\r\n selectedItemsLimit: string;\r\n emptyTable: string;\r\n info: string;\r\n infoFiltered: string;\r\n lengthMenu: string;\r\n lookupTableAll: string;\r\n lookupTableSelected: string;\r\n lookupTableUnselected: string;\r\n lookupTableAddChoiceButtonLabel: string;\r\n cancelNewItemText: string;\r\n saveNewItemText: string;\r\n addChoicePopupTitle: string;\r\n confirmationButtonLabel: string;\r\n cancelButtonLabel: string;\r\n}\r\n\r\nexport interface AdvancedSettings {\r\n respondentActions: {\r\n allow: boolean;\r\n access: number;\r\n };\r\n displayTabs: boolean;\r\n hideTableByDefault: boolean;\r\n hideTableHeader: boolean;\r\n hideTablePageNavigation: boolean;\r\n version: string;\r\n searchBarForAllColumns: boolean;\r\n}\r\n\r\nexport interface NewItemFormProps {\r\n columns: TableColumn[];\r\n title: string;\r\n onCancel(): void;\r\n onSave(props: Record<string, string>): OkResult;\r\n onSuccess?(): void;\r\n isOpen: boolean;\r\n cancelNewItemText: string;\r\n saveNewItemText: string;\r\n}\r\n\r\nfunction NewItemAddForm(props: NewItemFormProps) {\r\n const theme: any = useTheme();\r\n const classes = useStyles({ theme });\r\n const [inputValues, setInputValues] = React.useState<Record<string, string>>({});\r\n const [isDisableConfirm, setIsDisableConfirm] = React.useState(true);\r\n const { columns, isOpen, cancelNewItemText, saveNewItemText, title, onCancel } = props;\r\n const columnNames = columns.map(({ name }) => name);\r\n const handleInputChange = (e) => {\r\n setInputValues({\r\n ...inputValues,\r\n [e.target.name]: e.target.value,\r\n });\r\n };\r\n\r\n React.useEffect(() => {\r\n const allFieldsFilled = columnNames.every(\r\n (field) => Object.keys(inputValues).includes(field) && inputValues[field],\r\n );\r\n setIsDisableConfirm(!allFieldsFilled);\r\n }, [inputValues]);\r\n\r\n const saveForm = (): OkResult => {\r\n const result = props.onSave(inputValues);\r\n if (result.isSuccess) {\r\n setInputValues({});\r\n props.onSuccess();\r\n }\r\n return result;\r\n };\r\n\r\n return (\r\n <ModalDialog\r\n isOpen={isOpen}\r\n cancelActionText={cancelNewItemText}\r\n okActionText={saveNewItemText}\r\n title={title}\r\n onCancelAction={onCancel}\r\n onOkAction={saveForm}\r\n isDisableConfirm={isDisableConfirm}\r\n >\r\n {columns.map((item) => {\r\n return (\r\n <div className={classes.formRow} key={item.translatedName}>\r\n <div className={classes.label}>{item.translatedName}</div>\r\n <input\r\n type=\"text\"\r\n name={item.name}\r\n className={classes.inputField}\r\n value={inputValues[item.name] || \"\"}\r\n onChange={handleInputChange}\r\n />\r\n </div>\r\n );\r\n })}\r\n </ModalDialog>\r\n );\r\n}\r\n\r\nfunction ColumnFilter(props: ColumnFilterProps) {\r\n const { value: _value, onChange, name } = props;\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n const prevValue = React.useRef(_value);\r\n const [value, setValue] = React.useState(_value);\r\n const onChangeRef = React.useRef(onChange);\r\n\r\n React.useEffect(() => {\r\n onChangeRef.current = onChange;\r\n }, [onChange]);\r\n\r\n React.useEffect(() => {\r\n if (prevValue.current === value) return undefined;\r\n prevValue.current = value;\r\n const timer = setTimeout(() => onChangeRef.current && onChangeRef.current(value), 500);\r\n return () => {\r\n clearTimeout(timer);\r\n };\r\n }, [value]);\r\n\r\n return (\r\n <input\r\n type=\"text\"\r\n className={classes.tableColumnFilterInput}\r\n value={value}\r\n onChange={(e) => setValue(e.target.value)}\r\n aria-labelledby={`TH_${name.toUpperCase()}`}\r\n />\r\n );\r\n}\r\n\r\ninterface PaginatedTableRowProps {\r\n index: number;\r\n row: TableRow;\r\n tableProps: PaginatedTableProps;\r\n}\r\n\r\nfunction PaginatedTableRow(props: PaginatedTableRowProps) {\r\n const { index, row, tableProps } = props;\r\n const { selectable, columns, max, totalSelected, onChangeRowSelected } = tableProps;\r\n const theme: any = useTheme();\r\n const classes = useStyles({ theme });\r\n const [hover, setHover] = React.useState(false);\r\n\r\n return (\r\n // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events\r\n <tr\r\n id={String(row.id)}\r\n key={row.id}\r\n onMouseOver={() => setHover(true)}\r\n onMouseOut={() => setHover(false)}\r\n className={classNames(\r\n classes.tableRow,\r\n index % 2 === 1 && classes.tableRowAlternate,\r\n selectable && !row.disabled && classes.tableRowSelectable,\r\n row.selected && classes.tableRowSelected,\r\n )}\r\n onClick={(e) => {\r\n if (row.selected || !max || totalSelected < max) {\r\n onChangeRowSelected(row, !row.selected);\r\n e.preventDefault();\r\n }\r\n }}\r\n >\r\n {selectable && theme.DisplayChoiceIcon === \"left\" && (\r\n <td className={classes.tableRowCheckbox}>\r\n <CheckBoxIcon\r\n checked={row.selected}\r\n hover={hover}\r\n disabled={!row.selected && max && totalSelected >= max}\r\n backgroundless={theme.ControlAlpha === 0}\r\n />\r\n </td>\r\n )}\r\n {columns.map(({ name, width, searchable }) => (\r\n <td\r\n id={`${row.id}_${name}`}\r\n key={name}\r\n style={{ minWidth: width, maxWidth: width }}\r\n >\r\n {row[name]}\r\n </td>\r\n ))}\r\n {selectable && theme.DisplayChoiceIcon === \"right\" && (\r\n <td className={classes.tableRowCheckbox}>\r\n <CheckBoxIcon\r\n checked={row.selected}\r\n disabled={!row.selected && max && totalSelected >= max}\r\n backgroundless={theme.ControlAlpha === 0}\r\n />\r\n </td>\r\n )}\r\n </tr>\r\n );\r\n}\r\n\r\nexport interface PaginatedTableProps {\r\n id: string;\r\n columns: TableColumn[];\r\n defaultRowsPerPage?: number;\r\n rowsPerPageOptions: number[];\r\n pageRows: TableRow[];\r\n pageStart: number;\r\n max?: number;\r\n selectable?: boolean;\r\n filterable?: boolean;\r\n sortColumn?: string;\r\n sortAsc?: boolean;\r\n totalRows: number;\r\n totalFilteredRows?: number;\r\n totalSelected?: number;\r\n search?: string;\r\n texts?: TableTexts;\r\n advancedSettings: AdvancedSettings;\r\n isShowPageInfo?: boolean;\r\n isShowRowsPerPage?: boolean;\r\n isAddNewItem?: boolean;\r\n\r\n onChangeRowSelected?(row: TableRow, selected: boolean): void;\r\n onChangeSort?(sortColumn: string, sortAsc: boolean): void;\r\n onChangePage?(pageStart: number, length: number): void;\r\n onChangeSearch?(value: string): void;\r\n onChangeColumnFilter?(column: string, value: string): void;\r\n onSelectedTabChange?(value: string): void;\r\n onItemAdd?(props: any): OkResult;\r\n}\r\n\r\nexport function PaginatedTable(props: PaginatedTableProps) {\r\n const {\r\n columns,\r\n pageRows,\r\n pageStart,\r\n max,\r\n totalRows,\r\n totalFilteredRows,\r\n totalSelected,\r\n sortAsc,\r\n sortColumn,\r\n selectable,\r\n filterable,\r\n advancedSettings,\r\n onChangeSort,\r\n defaultRowsPerPage,\r\n rowsPerPageOptions,\r\n search: searchValue,\r\n texts,\r\n onChangeSearch,\r\n onChangeColumnFilter,\r\n onChangePage,\r\n onSelectedTabChange,\r\n onItemAdd,\r\n isShowPageInfo,\r\n isShowRowsPerPage,\r\n isAddNewItem,\r\n } = props;\r\n const initialRowsPerPage = defaultRowsPerPage || rowsPerPageOptions[0] || 10;\r\n const prevRowsPerPage = React.useRef(initialRowsPerPage);\r\n const [rowsPerPage, setRowsPerPage] = React.useState(initialRowsPerPage);\r\n const onChangePageRef = React.useRef<(pageStart: number, length: number) => void>();\r\n\r\n const pageCount = Math.ceil(totalFilteredRows / rowsPerPage);\r\n const currentPage = Math.floor(pageStart / rowsPerPage) + 1;\r\n\r\n const prevSearch = React.useRef(searchValue);\r\n const [search, setSearch] = React.useState(searchValue);\r\n\r\n const theme: any = useTheme();\r\n const classes = useStyles({ theme });\r\n\r\n const [isSearchOn, setIsSearchOn] = React.useState(false);\r\n const [selectedTab, setSelectedTab] = React.useState(\"all\");\r\n const [isGridOn, setIsGridOn] = React.useState(!advancedSettings.hideTableByDefault);\r\n const [isModalOn, setIsModalOn] = React.useState(false);\r\n\r\n React.useEffect(() => {\r\n if (prevSearch.current === search) return undefined;\r\n prevSearch.current = search;\r\n const timer = setTimeout(() => {\r\n onChangeSearch(search);\r\n if (advancedSettings.hideTableByDefault) {\r\n if (search) {\r\n setIsGridOn(true);\r\n } else {\r\n setIsGridOn(false);\r\n }\r\n }\r\n }, 500);\r\n return () => {\r\n clearTimeout(timer);\r\n };\r\n }, [search, onChangeSearch, advancedSettings.hideTableByDefault]);\r\n\r\n React.useEffect(() => {\r\n onChangePageRef.current = onChangePage;\r\n }, [onChangePage]);\r\n\r\n React.useEffect(() => {\r\n if (prevRowsPerPage.current === rowsPerPage) return;\r\n prevRowsPerPage.current = rowsPerPage;\r\n onChangePageRef.current(0, rowsPerPage);\r\n }, [rowsPerPage]);\r\n\r\n const hasSearchableColumns = columns.some((c) => c.searchable);\r\n\r\n const isSearchableColumn = (column: string): boolean => {\r\n return columns.some((c) => c.name === column && c.searchable);\r\n };\r\n\r\n const updateSelectedTab = (item) => {\r\n onSelectedTabChange(item);\r\n setSelectedTab(item);\r\n };\r\n\r\n const resetFilters = () => {\r\n setSearch(\"\");\r\n updateSelectedTab(\"all\");\r\n };\r\n\r\n const resetSearch = () => {\r\n setIsSearchOn(false);\r\n setSearch(\"\");\r\n };\r\n\r\n const newVersion = advancedSettings.version === AdvancedSettingsVersion;\r\n\r\n const renderSearchBar =\r\n (!newVersion && hasSearchableColumns) ||\r\n (newVersion && advancedSettings.searchBarForAllColumns);\r\n\r\n const renderFilter = (!newVersion && filterable) || (newVersion && hasSearchableColumns);\r\n\r\n return (\r\n <div className={classes.paginatedTable}>\r\n {advancedSettings.displayTabs ? (\r\n <>\r\n <div className={classes.gridHeaderButtons}>\r\n {!isSearchOn && (\r\n <ButtonGroup size=\"large\" isGrid>\r\n <ButtonGroup.Button\r\n active={selectedTab === \"all\"}\r\n text={texts.lookupTableAll}\r\n onClick={() => {\r\n updateSelectedTab(\"all\");\r\n }}\r\n />\r\n <ButtonGroup.Button\r\n text={texts.lookupTableSelected}\r\n active={selectedTab === \"selected\"}\r\n onClick={() => {\r\n updateSelectedTab(\"selected\");\r\n }}\r\n />\r\n <ButtonGroup.Button\r\n text={texts.lookupTableUnselected}\r\n active={selectedTab === \"unselected\"}\r\n onClick={() => {\r\n updateSelectedTab(\"unselected\");\r\n }}\r\n />\r\n </ButtonGroup>\r\n )}\r\n {renderSearchBar && (\r\n <div\r\n className={classes.gridSearchZone}\r\n style={{ width: isSearchOn && \"100%\" }}\r\n >\r\n <Button\r\n onClick={() => {\r\n setIsSearchOn(true);\r\n }}\r\n icon={[\"fas\", \"search\"]}\r\n className={\r\n isSearchOn ? classes.hiddenItem : classes.searchToggleButton\r\n }\r\n />\r\n </div>\r\n )}\r\n </div>\r\n {isSearchOn && (\r\n <InputBox accessoryLeft=\"search\" size=\"100%\">\r\n <input\r\n type=\"text\"\r\n placeholder={texts.search}\r\n value={search}\r\n onChange={(e) => setSearch(e.target.value)}\r\n />\r\n <span\r\n className={classes.inputWithButton}\r\n onClick={resetSearch}\r\n onKeyDown={(event) => {\r\n if (event.key === \" \") {\r\n resetSearch();\r\n }\r\n }}\r\n role=\"button\"\r\n tabIndex={0}\r\n >\r\n <FontAwesomeIcon icon={[\"fas\", \"times\"]} />\r\n </span>\r\n </InputBox>\r\n )}\r\n </>\r\n ) : (\r\n renderSearchBar && (\r\n <InputBox accessoryLeft=\"search\" style={{ marginBottom: 8 }}>\r\n <input\r\n type=\"text\"\r\n placeholder={texts.search}\r\n value={search}\r\n onChange={(e) => setSearch(e.target.value)}\r\n />\r\n </InputBox>\r\n )\r\n )}\r\n <br />\r\n {isGridOn && (\r\n <ScrollableContainer>\r\n <table className={classNames(classes.table, \"grid-view\")}>\r\n {!advancedSettings.hideTableHeader && (\r\n <thead>\r\n <tr>\r\n {selectable && theme.DisplayChoiceIcon === \"left\" && (\r\n <th className={classes.tableColumn} />\r\n )}\r\n {columns.map(({ name, width, searchable, translatedName }) => (\r\n <th\r\n key={name}\r\n onClick={() =>\r\n onChangeSort(\r\n name,\r\n sortColumn === name ? !sortAsc : true,\r\n )\r\n }\r\n style={{ minWidth: width, maxWidth: width }}\r\n className={classNames(\r\n classes.tableColumn,\r\n sortColumn === name && classes.sortedColumn,\r\n )}\r\n >\r\n {searchable && (\r\n <FontAwesomeIcon\r\n icon={[\r\n sortColumn === name && classes.sortedColumn\r\n ? \"fas\"\r\n : \"far\",\r\n \"search\",\r\n ]}\r\n size=\"sm\"\r\n fixedWidth\r\n />\r\n )}\r\n <span id={`TH_${name.toUpperCase()}`}>\r\n {translatedName || name}\r\n </span>\r\n\r\n {sortColumn === name && (\r\n <FontAwesomeIcon\r\n icon={sortAsc ? \"angle-down\" : \"angle-up\"}\r\n fixedWidth\r\n />\r\n )}\r\n </th>\r\n ))}\r\n {selectable && theme.DisplayChoiceIcon === \"right\" && (\r\n <th className={classes.tableColumn} />\r\n )}\r\n </tr>\r\n {renderFilter && (\r\n <tr>\r\n {selectable && theme.DisplayChoiceIcon === \"left\" && (\r\n <th className={classes.tableColumn} />\r\n )}\r\n {columns.map(({ name, width, filter }) => (\r\n <th\r\n key={name}\r\n className={classes.tableColumnFilter}\r\n style={{ minWidth: width, maxWidth: width }}\r\n >\r\n {!newVersion ||\r\n (newVersion && isSearchableColumn(name)) ? (\r\n <ColumnFilter\r\n value={filter || \"\"}\r\n onChange={(value) =>\r\n onChangeColumnFilter(name, value)\r\n }\r\n name={name}\r\n />\r\n ) : (\r\n <></>\r\n )}\r\n </th>\r\n ))}\r\n {selectable && theme.DisplayChoiceIcon === \"right\" && (\r\n <th className={classes.tableColumn} />\r\n )}\r\n </tr>\r\n )}\r\n </thead>\r\n )}\r\n <tbody>\r\n {pageRows.map((row, index) => (\r\n <PaginatedTableRow\r\n key={row.id}\r\n index={index}\r\n row={row}\r\n tableProps={props}\r\n />\r\n ))}\r\n </tbody>\r\n </table>\r\n </ScrollableContainer>\r\n )}\r\n <TableFooter\r\n tableProps={props}\r\n rowsPerPage={rowsPerPage}\r\n pageCount={pageCount}\r\n currentPage={currentPage}\r\n lengthMenuText={texts.lengthMenu}\r\n onChangeRowsPerPage={setRowsPerPage}\r\n isShowPageInfo={isShowPageInfo}\r\n isShowRowsPerPage={isShowRowsPerPage}\r\n isAddNewItem={isAddNewItem}\r\n newItemLabel={texts.lookupTableAddChoiceButtonLabel}\r\n onItemAdd={() => {\r\n setIsModalOn(true);\r\n }}\r\n isShowPagination={!advancedSettings.hideTablePageNavigation && isGridOn}\r\n >\r\n {!pageRows.length && texts.emptyTable}\r\n {pageRows.length > 0 &&\r\n texts.info\r\n .replace(\"_START_\", `${pageStart + 1}`)\r\n .replace(\"_END_\", `${pageStart + pageRows.length}`)\r\n .replace(\"_TOTAL_\", numeral(totalFilteredRows).format(\"0,0\"))}\r\n {totalFilteredRows < totalRows\r\n ? ` ${texts.infoFiltered.replace(\"_MAX_\", numeral(totalRows).format(\"0,0\"))}`\r\n : \"\"}\r\n {totalSelected\r\n ? ` ${(max ? texts.selectedItemsLimit : texts.selectedItems)\r\n .replace(\"{count}\", `${totalSelected}`)\r\n .replace(\"{limit}\", `${max || \"\"}`)}`\r\n : \"\"}\r\n </TableFooter>\r\n\r\n {isAddNewItem && (\r\n <NewItemAddForm\r\n columns={columns}\r\n onCancel={() => {\r\n setIsModalOn(false);\r\n }}\r\n onSave={onItemAdd}\r\n title={texts.addChoicePopupTitle ?? texts.lookupTableAddChoiceButtonLabel}\r\n isOpen={isModalOn}\r\n cancelNewItemText={texts.cancelButtonLabel ?? texts.cancelNewItemText}\r\n saveNewItemText={texts.confirmationButtonLabel ?? texts.saveNewItemText}\r\n onSuccess={resetFilters}\r\n />\r\n )}\r\n </div>\r\n );\r\n}\r\n","import React from \"react\";\r\nimport { connect } from \"react-redux\";\r\nimport { BaseControl, ControlProps } from \"./BaseControl\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { StoreState } from \"../../models/states/StoreState\";\r\nimport { LookupTablePage } from \"../../models/LookupTablePage\";\r\nimport {\r\n getSettingString,\r\n getSettingBoolean,\r\n getSettingNumber,\r\n} from \"../../models/utilities/settingUtilities\";\r\nimport { LookupTableParams } from \"../../models/LookupTableParams\";\r\nimport { isNullOrEmpty } from \"../../utils/index\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\nimport { ValidationBuilder } from \"../../models/builders/ValidationBuilder\";\r\nimport { Piping } from \"../../piping\";\r\nimport { ValidationOptionsModel } from \"../../models/ValidationOptionsModel\";\r\nimport { __getStore__ } from \"../../redux/store\";\r\nimport { AdvancedSettings, PaginatedTable, TableRow, TableTexts } from \"../table/PaginatedTable\";\r\nimport { isVisible } from \"../../models/utilities/choiceUtilities\";\r\nimport { getChoice } from \"../../models/utilities/variableUtilities\";\r\nimport { getSoftPromptCode } from \"../../models/utilities/questionUtilities\";\r\nimport { lookupTableFetch } from \"../../redux/actions\";\r\nimport { translate } from \"../../models/utilities/translationUtilities\";\r\nimport { isQuestionValidatedServerSide } from \"../../models/utilities/validationUtilities\";\r\nimport { OkResult } from \"../shared/ModalDialog\";\r\nimport { addChoiceItem } from \"../../redux/thunks/lookuptable\";\r\nimport { ThunkDispatchProp } from \"../../models/actions/ThunkDispatchProp\";\r\n\r\ninterface StateProps {\r\n page: LookupTablePage;\r\n}\r\n\r\ninterface Props extends ControlProps, StateProps, ThunkDispatchProp { }\r\n\r\ninterface State {\r\n params: LookupTableParams;\r\n shouldDisplayFilters: boolean;\r\n}\r\n\r\nconst mapStateToProps = (state: StoreState, ownProps: Props): StateProps => ({\r\n page: state.lookupTable.lookupTable[ownProps.question.name],\r\n});\r\n\r\nconst SEARCH = \"SEARCH\";\r\nconst SELECTED_ITEMS_LIMIT = \"SELECTED_ITEMS_LIMIT\";\r\nconst SELECTED_ITEMS = \"SELECTED_ITEMS\";\r\nconst DATA_TABLE_EMPTY_TABLE = \"DATA_TABLE_EMPTY_TABLE\";\r\nconst DATA_TABLE_INFO = \"DATA_TABLE_INFO\";\r\nconst DATA_TABLE_INFO_FILTERED = \"DATA_TABLE_INFO_FILTERED\";\r\nconst DATA_TABLE_LENGTH_MENU = \"DATA_TABLE_LENGTH_MENU\";\r\nconst LOOKUP_TABLE_SELECTED = \"LookupTableSelected\";\r\nconst LOOKUP_TABLE_UNSELECTED = \"LookupTableUnselected\";\r\nconst LOOKUP_TABLE_ALL = \"LookupTableAll\";\r\nconst LOOKUP_TABLE_ADD_CHOICE_BUTTON_LABEL = \"LookupTableAddChoiceButtonLabel\";\r\nconst LOOKUP_TABLE_CONFIRMATION_BUTTON_LABEL = \"ConfirmationButtonLabel\";\r\nconst LOOKUP_TABLE_CANCEL_BUTTON_LABEL = \"CancelButtonLabel\";\r\nconst LOOKUP_TABLE_ADD_CHOICE_POPUP_TITLE = \"AddChoicePopupTitle\";\r\n\r\nclass LookupTableImpl extends BaseControl<Props, State> {\r\n constructor(props: Props) {\r\n super(props);\r\n this.state = {\r\n shouldDisplayFilters: false,\r\n params: {\r\n pageStart: 0,\r\n pageLength: 25,\r\n search: \"\",\r\n searchableColumns: [],\r\n columnFilters: {},\r\n sortColumn: \"\",\r\n sortAsc: false,\r\n selected: [],\r\n includeSelected: false,\r\n excludeSelected: false,\r\n },\r\n };\r\n }\r\n\r\n tableName = (props: Props) => getSettingString(props.question, \"Name\");\r\n\r\n pageCount = (props: Props) =>\r\n Math.ceil(props.page.totalFilteredRows / props.page.params.pageLength);\r\n\r\n currentPage = (props: Props) => props.page.params.pageStart / props.page.params.pageLength + 1;\r\n\r\n searchableColumns = (props: Props) =>\r\n props.sequencedVariables\r\n .filter((c) => getSettingBoolean(c, \"Searchable\"))\r\n .map((c) => getSettingString(c, \"ColumnName\"));\r\n\r\n showColumnFilters = (props: Props) => getSettingBoolean(props.question, \"ColumnFilters\");\r\n\r\n initializeQuestion(question: QuestionModel, props: Props): void {\r\n super.initializeQuestion(question, props);\r\n if (props.sequencedVariables.length === 0) {\r\n return;\r\n }\r\n const mentions = this.getSelectedInternalIds(props);\r\n const shouldDisplayFilters = mentions != null && mentions.length > 0;\r\n this.setState(\r\n (state) => {\r\n const newState = { ...state };\r\n newState.shouldDisplayFilters = shouldDisplayFilters;\r\n newState.params = {\r\n pageStart: 0,\r\n pageLength: getSettingNumber(props.question, \"PageSize\", 25),\r\n selected: this.getSelectedInternalIds(props),\r\n search: \"\",\r\n searchableColumns: this.searchableColumns(props),\r\n columnFilters: {},\r\n sqlFilter: \"\",\r\n sortColumn: getSettingString(question, \"SortColumn\"),\r\n sortAsc: getSettingBoolean(props.question, \"SortDirection\", \"asc\"),\r\n includeSelected: false,\r\n excludeSelected: false\r\n };\r\n return newState;\r\n },\r\n () => this.updateSqlFilter(question, props),\r\n );\r\n }\r\n\r\n willUpdateMentions(question: QuestionModel, nextProps: Props) {\r\n super.willUpdateMentions(question, nextProps);\r\n this.updateSqlFilter(question, nextProps);\r\n this.updateSelected(nextProps);\r\n }\r\n\r\n updateSelected(props: Props) {\r\n this.setState((state) => ({\r\n ...state,\r\n params: {\r\n ...state.params,\r\n selected: this.getSelectedInternalIds(props),\r\n },\r\n }));\r\n }\r\n\r\n getMaxAnswer(props: Props) {\r\n return getSettingNumber(props.question, \"MaxAllowedAnswers\");\r\n }\r\n\r\n getAdvancedSettings(props: Props): AdvancedSettings {\r\n return {\r\n respondentActions: {\r\n allow: getSettingBoolean(props.question, \"AllowRespondentToAddCustomChoice\"),\r\n access: getSettingNumber(props.question, props.inputAccess),\r\n },\r\n displayTabs: getSettingBoolean(props.question, \"DisplayAllSelectedAndUnselectedTabs\"),\r\n hideTableByDefault: getSettingBoolean(props.question, \"HideTableByDefault\"),\r\n hideTableHeader: getSettingBoolean(props.question, \"HideTableHeader\"),\r\n hideTablePageNavigation: getSettingBoolean(props.question, \"HideTablePageNavigation\"),\r\n version: getSettingString(props.question, \"Version\"),\r\n searchBarForAllColumns: getSettingBoolean(props.question, \"SearchBarForAllColumns\"),\r\n };\r\n }\r\n\r\n updateSqlFilter(question: QuestionModel, props: Props) {\r\n const { interview } = __getStore__().getState();\r\n let filter: string;\r\n if (question.lookupFilter) {\r\n filter = Piping.evaluateRecalls(interview, question.lookupFilter.expression);\r\n }\r\n if (filter == null) {\r\n this.fetchLookupTable(props);\r\n return;\r\n }\r\n this.setState(\r\n (state) => ({\r\n ...state,\r\n params: {\r\n ...state.params,\r\n sqlFilter: filter,\r\n },\r\n }),\r\n () => this.fetchLookupTable(props),\r\n );\r\n }\r\n\r\n fetchLookupTable(props: Props) {\r\n props.dispatch(\r\n lookupTableFetch(this.tableName(props), this.state.params, props.question.name),\r\n );\r\n }\r\n\r\n idForRow(row: number) {\r\n return `${this.props.question.name}_${row}`;\r\n }\r\n\r\n isVisibleColumn(props: Props, columnName: string) {\r\n return props.sequencedVariables.some(\r\n (variable) =>\r\n columnName === getSettingString(variable, \"ColumnName\") &&\r\n getSettingBoolean(variable, \"Visible\"),\r\n );\r\n }\r\n\r\n getColumnNameByIndex(page: LookupTablePage, index) {\r\n return page.columns[index];\r\n }\r\n\r\n getInternalIdVariableName(props: Props) {\r\n return props.question.variables.find((v) =>\r\n getSettingBoolean(v, \"ColumnName\", \"InternalId\"),\r\n ).name;\r\n }\r\n\r\n maxAnswersReached(props: Props) {\r\n const maxAnswer = this.getMaxAnswer(props);\r\n const mentionCount = this.getSelectedRowCount(props);\r\n return maxAnswer > 0 && mentionCount >= maxAnswer;\r\n }\r\n\r\n onChangeRowSelected = (row: TableRow, selected: boolean) => {\r\n const { props } = this;\r\n if (selected && this.maxAnswersReached(props)) {\r\n return;\r\n }\r\n const isRowSelected = this.isRowSelected(props, row.id);\r\n if (isRowSelected && !selected) {\r\n const mentionIndex = this.getMentions(\r\n props,\r\n this.getInternalIdVariableName(props),\r\n ).findIndex((m) => parseInt(m.value, 10) === row.id);\r\n props.question.variables.forEach((variable) => {\r\n this.setMentions(props, variable.name, (mentions) =>\r\n mentions.splice(mentionIndex, 1),\r\n );\r\n });\r\n } else if (!isRowSelected && selected) {\r\n props.question.variables.forEach((variable) => {\r\n const columnName = getSettingString(variable, \"ColumnName\");\r\n const value = row[columnName];\r\n this.setMentions(props, variable.name, (mentions) => mentions.add(String(value)));\r\n });\r\n }\r\n };\r\n\r\n onSelectedTabChange = (value: string) => {\r\n let { includeSelected, excludeSelected } = this.state.params;\r\n if (value === \"all\") {\r\n includeSelected = false;\r\n excludeSelected = false;\r\n }\r\n if (value === \"selected\") {\r\n includeSelected = true;\r\n excludeSelected = false;\r\n }\r\n if (value === \"unselected\") {\r\n includeSelected = false;\r\n excludeSelected = true;\r\n }\r\n this.setState(\r\n (state) => ({\r\n ...state,\r\n params: {\r\n ...state.params,\r\n includeSelected,\r\n excludeSelected,\r\n },\r\n }),\r\n () => this.fetchLookupTable(this.props),\r\n );\r\n }\r\n\r\n getSelectedRowCount(props: Props) {\r\n return this.getSelectedInternalIds(props).length;\r\n }\r\n\r\n getSelectedInternalIds(props: Props) {\r\n const mentions = this.getMentions(props, this.getInternalIdVariableName(props));\r\n return mentions.map((m) => parseInt(m.value, 10));\r\n }\r\n\r\n isRowSelected(props: Props, id: number) {\r\n return this.getSelectedInternalIds(props).includes(id);\r\n }\r\n\r\n changePage(page: number) {\r\n this.setState(\r\n (state) => ({\r\n ...state,\r\n params: {\r\n ...state.params,\r\n pageStart: (page - 1) * state.params.pageLength,\r\n },\r\n }),\r\n () => this.fetchLookupTable(this.props),\r\n );\r\n }\r\n\r\n onFirstPageClick = () => {\r\n this.changePage(1);\r\n };\r\n\r\n onLastPageClick = () => {\r\n this.changePage(this.pageCount(this.props));\r\n };\r\n\r\n onPrevPageclick = () => {\r\n const page = this.currentPage(this.props) - 1;\r\n if (page >= 1) {\r\n this.changePage(page);\r\n }\r\n };\r\n\r\n onNextPageClick = () => {\r\n const page = this.currentPage(this.props) + 1;\r\n if (page <= this.pageCount(this.props)) {\r\n this.changePage(page);\r\n }\r\n };\r\n\r\n onChangeItemCount = (event) => {\r\n const { value } = event.target.value;\r\n this.onFirstPageClick();\r\n this.setState(\r\n (state) => ({\r\n ...state,\r\n params: {\r\n ...state.params,\r\n pageLength: parseInt(value, 10),\r\n },\r\n }),\r\n () => this.fetchLookupTable(this.props),\r\n );\r\n };\r\n\r\n onChangeSearch = (value: string) => {\r\n this.setState((state) => ({\r\n ...state,\r\n params: {\r\n ...state.params,\r\n search: value,\r\n pageStart: 0,\r\n },\r\n }));\r\n this.fetchLookupTable(this.props);\r\n };\r\n\r\n onClickHeader = (header: string) => {\r\n if (this.state.params.sortColumn.includes(header)) {\r\n this.setState(\r\n (state) => ({\r\n ...state,\r\n params: {\r\n ...state.params,\r\n sortAsc: !state.params.sortAsc,\r\n },\r\n }),\r\n () => this.fetchLookupTable(this.props),\r\n );\r\n } else {\r\n this.setState(\r\n (state) => ({\r\n ...state,\r\n params: {\r\n ...state.params,\r\n sortColumn: header,\r\n sortAsc: true,\r\n },\r\n }),\r\n () => this.fetchLookupTable(this.props),\r\n );\r\n }\r\n };\r\n\r\n onClearColumnFilters = () => {\r\n this.setState(\r\n (state) => ({\r\n ...state,\r\n params: {\r\n ...state.params,\r\n columnFilters: {},\r\n pageStart: 0,\r\n },\r\n }),\r\n () => this.fetchLookupTable(this.props),\r\n );\r\n };\r\n\r\n onChangeColumnFilter = (column: string, value: string) => {\r\n this.setState(\r\n (state) => {\r\n let columnFilters = {\r\n ...state.params.columnFilters,\r\n [column]: value,\r\n };\r\n columnFilters = Object.entries(columnFilters)\r\n .filter(([, v]) => v)\r\n .reduce((obj, [k, v]) => ({ ...obj, [k]: v }), {});\r\n return {\r\n ...state,\r\n params: {\r\n ...state.params,\r\n columnFilters,\r\n pageStart: 0,\r\n },\r\n };\r\n },\r\n () => this.fetchLookupTable(this.props),\r\n );\r\n };\r\n\r\n onFieldKeyPress = (event) => {\r\n if (event.key === \"Enter\") {\r\n this.fetchLookupTable(this.props);\r\n }\r\n };\r\n\r\n hasMentions(props: Props) {\r\n const variableName = this.getInternalIdVariableName(props);\r\n const mentions = this.getMentions(props, variableName);\r\n return (\r\n mentions !== undefined &&\r\n mentions.length > 0 &&\r\n mentions.some((m) => this.mentionIsValid(m, props.question))\r\n );\r\n }\r\n\r\n validate(options?: ValidationOptionsModel): ValidationResultModel {\r\n const { question, useClientValidation } = this.props;\r\n\r\n if (isQuestionValidatedServerSide(question.type, useClientValidation)) {\r\n return new ValidationBuilder().build();\r\n }\r\n\r\n const required = this.isAnswerRequired(this.props.questionnaire, this.props.question);\r\n const [variable] = question.variables;\r\n const min = this.minValue();\r\n if (this.hasMentions(this.props)) {\r\n const max = this.maxValue();\r\n const selected = this.state.params.selected.length;\r\n if (max != null && selected > Number(max)) {\r\n const message = getSettingString(question, \"UpperBoundNotFulfilledMessage\");\r\n return new ValidationBuilder()\r\n .fail(\r\n variable.name,\r\n !isNullOrEmpty(message) ? message : \"UpperBoundNotFulfilled\",\r\n { max: String(max) },\r\n )\r\n .build();\r\n }\r\n if (min != null && selected < Number(min)) {\r\n const message = getSettingString(question, \"LowerBoundNotFulfilledMessage\");\r\n return new ValidationBuilder()\r\n .fail(variable.name, !isNullOrEmpty(message) ? message : \"InvalidChoicesMin\", {\r\n min: String(min),\r\n })\r\n .build();\r\n }\r\n } else if (required) {\r\n // Validate soft-prompt.\r\n const validation = new ValidationBuilder();\r\n const softPromptCode = getSoftPromptCode(question);\r\n if (this.props.showSoftPrompt && softPromptCode != null) {\r\n const softPromptChoice = getChoice(question.variables[0], softPromptCode);\r\n if (!isVisible(softPromptChoice)) {\r\n this.setMentions(this.props, variable.name, (mentions) =>\r\n mentions.set(softPromptCode),\r\n );\r\n }\r\n return new ValidationBuilder().build();\r\n }\r\n if (min != null && Number(min) > 0) {\r\n const message = getSettingString(question, \"LowerBoundNotFulfilledMessage\");\r\n validation.fail(\r\n variable.name,\r\n !isNullOrEmpty(message) ? message : \"InvalidChoicesMin\",\r\n { min: String(min) },\r\n );\r\n }\r\n // Question is required but has no mentions.\r\n return validation.fail(variable.name, \"IncompleteAnswer\").build();\r\n }\r\n // Question is valid.\r\n return new ValidationBuilder().build();\r\n }\r\n\r\n hasSearchableColumns() {\r\n return this.props.sequencedVariables.some((c) => getSettingBoolean(c, \"Searchable\"));\r\n }\r\n\r\n onSortChanged = (sortColumn: string, sortAsc: boolean) => {\r\n this.setState(\r\n (state) => ({\r\n ...state,\r\n params: {\r\n ...state.params,\r\n sortColumn,\r\n sortAsc,\r\n },\r\n }),\r\n () => this.fetchLookupTable(this.props),\r\n );\r\n };\r\n\r\n onPageChanged = (pageStart: number, pageLength: number) => {\r\n this.setState(\r\n (state) => ({\r\n ...state,\r\n params: {\r\n ...state.params,\r\n pageStart,\r\n pageLength,\r\n },\r\n }),\r\n () => this.fetchLookupTable(this.props),\r\n );\r\n };\r\n\r\n getTableTexts = (question: QuestionModel, language: string): TableTexts => {\r\n const translateKey = (key: string, defaultValue: string) =>\r\n translate(question, key, language) || defaultValue;\r\n\r\n const translateGlobal = (key: string, defaultValue: string) =>\r\n translate(this.props.questionnaire, key, language) || defaultValue;\r\n\r\n return {\r\n search: translateKey(SEARCH, \"Search\"),\r\n selectedItemsLimit: translateKey(SELECTED_ITEMS_LIMIT, \"{count} of {limit} selected\"),\r\n selectedItems: translateKey(SELECTED_ITEMS, \"{count} selected\"),\r\n emptyTable: translateKey(DATA_TABLE_EMPTY_TABLE, \"No items to display\"),\r\n info: translateKey(DATA_TABLE_INFO, \"Displaying _START_ to _END_ of _TOTAL_ item(s)\"),\r\n infoFiltered: translateKey(DATA_TABLE_INFO_FILTERED, \"(Filtered from _MAX_ item(s))\"),\r\n lengthMenu: translateKey(DATA_TABLE_LENGTH_MENU, \"Display _MENU_ items\"),\r\n lookupTableAll: translateKey(LOOKUP_TABLE_ALL, \"All\"),\r\n lookupTableSelected: translateKey(LOOKUP_TABLE_SELECTED, \"Selected\"),\r\n lookupTableUnselected: translateKey(LOOKUP_TABLE_UNSELECTED, \"Unselected\"),\r\n addChoicePopupTitle: translateKey(LOOKUP_TABLE_ADD_CHOICE_POPUP_TITLE, \"Add a choice\"),\r\n confirmationButtonLabel: translateKey(\r\n LOOKUP_TABLE_CONFIRMATION_BUTTON_LABEL,\r\n \"Confirm\",\r\n ),\r\n cancelButtonLabel: translateKey(LOOKUP_TABLE_CANCEL_BUTTON_LABEL, \"Cancel\"),\r\n lookupTableAddChoiceButtonLabel: translateKey(\r\n LOOKUP_TABLE_ADD_CHOICE_BUTTON_LABEL,\r\n \"New Choice\",\r\n ),\r\n cancelNewItemText: translateGlobal(\"CancelButton\", \"Cancel\"),\r\n saveNewItemText: translateGlobal(\"SubmitButton\", \"Submit\"),\r\n };\r\n };\r\n\r\n onItemAdd = (formData: Record<string, string>): OkResult => {\r\n this.props\r\n .dispatch(addChoiceItem(this.props.question.name, this.tableName(this.props), formData))\r\n .then((newId: number) => {\r\n this.onChangeRowSelected({ id: newId, InternalId: newId, ...formData }, true);\r\n });\r\n this.fetchLookupTable(this.props);\r\n return {\r\n isSuccess: true,\r\n };\r\n };\r\n\r\n renderQuestion(question: QuestionModel) {\r\n const { props } = this;\r\n const { page, language } = props;\r\n if (!page) {\r\n return <div>Loading...</div>;\r\n }\r\n const { columns, rows, totalRows, totalFilteredRows, params, columnsTranslation } = page;\r\n const filterable = this.showColumnFilters(props);\r\n const columnFilters = params.columnFilters || {};\r\n const tableColumns = props.sequencedVariables\r\n .filter((variable) => {\r\n const columnName = getSettingString(variable, \"ColumnName\");\r\n return this.isVisibleColumn(props, columnName) && columns.includes(columnName);\r\n })\r\n .map((variable) => {\r\n const columnName = getSettingString(variable, \"ColumnName\");\r\n const translatedName = translate(\r\n variable,\r\n \"TEXT\",\r\n language,\r\n (columnsTranslation || {})[columnName],\r\n );\r\n return {\r\n name: columnName,\r\n searchable: getSettingBoolean(variable, \"Searchable\"),\r\n width: getSettingNumber(variable, \"Width\"),\r\n filter: columnFilters[columnName],\r\n translatedName,\r\n };\r\n })\r\n .sort((a, b) => columns.indexOf(a.name) - columns.indexOf(b.name));\r\n const pageRows = rows.map(({ RowNum, ...row }) => {\r\n const selected = this.isRowSelected(props, parseInt(row.InternalId, 10));\r\n return {\r\n id: parseInt(row.InternalId, 10),\r\n index: RowNum,\r\n selected,\r\n ...row,\r\n };\r\n });\r\n\r\n const max = this.getMaxAnswer(props);\r\n const totalSelected = this.getSelectedRowCount(props);\r\n const advancedSettings = this.getAdvancedSettings(props);\r\n const isAddItem =\r\n advancedSettings.respondentActions.allow &&\r\n advancedSettings.respondentActions.access > 0 &&\r\n (!max || max > totalSelected);\r\n\r\n return (\r\n <PaginatedTable\r\n id={question.elementId}\r\n pageStart={params.pageStart}\r\n columns={tableColumns}\r\n pageRows={pageRows}\r\n totalRows={totalRows}\r\n totalFilteredRows={totalFilteredRows}\r\n totalSelected={totalSelected}\r\n max={max}\r\n sortAsc={params.sortAsc}\r\n sortColumn={params.sortColumn}\r\n onChangePage={this.onPageChanged}\r\n onChangeSort={this.onSortChanged}\r\n selectable\r\n filterable={filterable}\r\n search={params.search || \"\"}\r\n texts={this.getTableTexts(question, language)}\r\n onChangeColumnFilter={this.onChangeColumnFilter}\r\n onChangeSearch={this.onChangeSearch}\r\n onChangeRowSelected={this.onChangeRowSelected}\r\n rowsPerPageOptions={[10, 25, 50, 100]}\r\n defaultRowsPerPage={params.pageLength}\r\n advancedSettings={advancedSettings}\r\n onSelectedTabChange={this.onSelectedTabChange}\r\n isAddNewItem={isAddItem}\r\n isShowPageInfo={false}\r\n isShowRowsPerPage={false}\r\n onItemAdd={this.onItemAdd}\r\n />\r\n );\r\n }\r\n}\r\n\r\nexport const LookupTableControl = connect(mapStateToProps)(LookupTableImpl);\r\n","import { Log } from \"../../utils/logging\";\r\nimport { addChoiceItemFailed } from \"../actions\";\r\nimport { ThunkActionType } from \"../actions/types\";\r\nimport { makeAxios } from \"./validation\";\r\n\r\nexport function addChoiceItem(\r\n questionName: string,\r\n tableName: string,\r\n params: Record<string, string>,\r\n): ThunkActionType<Promise<number>> {\r\n return async (dispatch, getState) => {\r\n try {\r\n Log.d(\"lookuptable\", \"Creating a new choice item\");\r\n const result = await dispatch(makeAxios()).post(\"s/addLookupTableName?\", {\r\n formdata: JSON.stringify(params),\r\n questionName,\r\n tableName,\r\n });\r\n\r\n if (result.status !== 200) throw new Error(`Unexpected status ${result.status}`);\r\n if (result.data.success !== true)\r\n throw new Error(`Unexpected response ${result.data.success}`);\r\n if (!result.data.data || !result.data.data.id)\r\n throw new Error(`Unexpected error, lookup choice item is not created`);\r\n return result.data.data.id;\r\n } catch (err) {\r\n dispatch(addChoiceItemFailed(questionName, tableName, params, err));\r\n return null;\r\n }\r\n };\r\n}\r\n","import React from \"react\";\r\nimport parser from \"mini-html-parser\";\r\nimport { flatten } from \"../../utils/lodash\";\r\n\r\nconst findScripts = (node) => {\r\n if (node.nodeName && node.nodeName === \"SCRIPT\")\r\n return (node.childNodes || []).map((n) => n.nodeValue);\r\n return flatten((node.childNodes || []).map(findScripts));\r\n};\r\n\r\ninterface Props {\r\n render?(html: string): JSX.Element;\r\n scriptKey: string;\r\n html: string;\r\n}\r\n\r\nexport function ExecutableHtml(props: Props): JSX.Element {\r\n const { html, scriptKey, render } = props;\r\n\r\n React.useEffect(() => {\r\n const timeout = setTimeout(() => {\r\n const content = html;\r\n const scripts = findScripts(parser(content).parse());\r\n scripts.forEach((script) => {\r\n (window as any).eval(`${script}\\n//# sourceURL=${scriptKey}.js`);\r\n });\r\n });\r\n return function cleanup() {\r\n clearTimeout(timeout);\r\n };\r\n }, [html, scriptKey]);\r\n\r\n if (render) return render(html);\r\n return <div dangerouslySetInnerHTML={{ __html: html }} />;\r\n}\r\n","import React from \"react\";\r\nimport { DispatchProp, useDispatch } from \"react-redux\";\r\nimport { uniq, filter, isEmpty } from \"../../utils/lodash\";\r\nimport { ControlProps } from \"./BaseControl\";\r\nimport { ExecutableHtml } from \"../shared/ExecutableHtml\";\r\nimport useTranslatable from \"../../hooks/useTranslatable\";\r\nimport { usePickMentions } from \"../../hooks/useMentions\";\r\nimport { useValidation, isAnswerRequired } from \"../../hooks/useValidation\";\r\nimport { ValidationBuilder } from \"../../models/builders/ValidationBuilder\";\r\nimport { isNullOrEmpty } from \"../../utils\";\r\nimport { MentionBuilderDelegate } from \"../../models/builders/MentionBuilder\";\r\nimport { setMultipleVariablesMentions } from \"../../redux/actions\";\r\n\r\ninterface Props extends ControlProps, DispatchProp {}\r\n\r\nconst supportedSingleValueInputTypes = [\"text\", \"hidden\", \"date\", \"number\", \"password\"];\r\n\r\nfunction findHtmlVariables(html: string) {\r\n const regex = /name\\s*=\\s*(?:[\"']([^\"':]*?:[^\"']*?)[\"']|[\"']([^\"':]*?)[\"']|(\\S+))/gi;\r\n const variables = [];\r\n let matches;\r\n // eslint-disable-next-line no-cond-assign\r\n while ((matches = regex.exec(html))) {\r\n variables.push(matches[1] || matches[2] || matches[3]);\r\n }\r\n return uniq(variables);\r\n}\r\n\r\nfunction documentFindValue(name: string) {\r\n const elements = document.getElementsByName(name) as any;\r\n if (!elements || !elements[0]) {\r\n return undefined;\r\n }\r\n if ([\"TEXTAREA\", \"SELECT\"].includes(elements[0].tagName)) {\r\n return elements[0].value;\r\n }\r\n if (\r\n elements[0].tagName === \"INPUT\" &&\r\n supportedSingleValueInputTypes.includes(elements[0].type)\r\n ) {\r\n return elements[0].value;\r\n }\r\n if ([\"checkbox\", \"radio\"].includes(elements[0].type)) {\r\n return filter(elements as HTMLInputElement[], (el) => el.checked).map((el) => el.value);\r\n }\r\n return undefined;\r\n}\r\n\r\nfunction validateAnswersInHtml(html: string) {\r\n const variables = findHtmlVariables(html);\r\n return variables.every((name) => {\r\n const [variableName, choiceValue, openEnd] = name.split(\":\");\r\n // Open-end answers are not required if the open-end choice is not selected.\r\n if (openEnd && !documentFindValue(variableName)?.includes(choiceValue)) {\r\n return true;\r\n }\r\n return !isEmpty(documentFindValue(name));\r\n });\r\n}\r\n\r\nexport function CustomHtmlControl(props: Props) {\r\n const { question, questionnaire, validateSignal } = props;\r\n\r\n const variableMentions = usePickMentions(question.variableNames);\r\n const contentTemplate = useTranslatable(question, \"content\") || \"\";\r\n const dispatch = useDispatch();\r\n const previousValue = React.useRef<string>();\r\n\r\n const answerForMatch = React.useCallback(\r\n (_value: string, variable: string, choice: string, openEnd: string) => {\r\n let mentions = variableMentions[variable];\r\n if (!mentions || !mentions[0]) {\r\n return \"\";\r\n }\r\n if (choice) {\r\n if (openEnd) {\r\n mentions = mentions.filter((mention) => mention.customChoiceIndex === choice);\r\n if (!mentions || !mentions[0] || !mentions[0].openEnd) {\r\n return \"\";\r\n }\r\n return mentions[0].openEnd;\r\n }\r\n return mentions.some((mention) => mention.customChoiceIndex === choice)\r\n ? \"checked selected\"\r\n : \"\";\r\n }\r\n return mentions[0].value || \"\";\r\n },\r\n [variableMentions],\r\n );\r\n\r\n const content = React.useMemo(\r\n () => contentTemplate.replace(/%(\\w+):?(\\w*):?(\\w*)%/gi, answerForMatch),\r\n [answerForMatch, contentTemplate],\r\n );\r\n\r\n const captureAnswers = React.useCallback(\r\n (html: string) => {\r\n // Find all mentions in html.\r\n const variables = findHtmlVariables(html);\r\n let mentionsByVariable: { [variableName: string]: MentionBuilderDelegate } = {};\r\n const addMention = (variableName: string, builder: MentionBuilderDelegate) => {\r\n mentionsByVariable = {\r\n ...mentionsByVariable,\r\n [variableName]: builder,\r\n };\r\n };\r\n variables.forEach((name) => {\r\n const elements = document.getElementsByName(name) as any;\r\n const variable = name.split(\":\")[0];\r\n const openEnd = name.indexOf(\":O\");\r\n if (!elements || !elements[0]) {\r\n return;\r\n }\r\n const elValue = elements[0].value;\r\n if (isNullOrEmpty(elValue) && openEnd == -1) {\r\n // element is not openend\r\n addMention(variable, (m) => m.clear());\r\n } else if (elements[0].tagName === \"TEXTAREA\") {\r\n const choice = name.split(\":\")[1];\r\n if (choice && !isNullOrEmpty(elValue)) {\r\n addMention(name, (m) =>\r\n m.addOpenEndValueByCustomChoiceIndex(choice, elValue),\r\n );\r\n } else if (!isNullOrEmpty(elValue)) {\r\n addMention(variable, (m) => m.set(elValue));\r\n }\r\n } else if (elements[0].tagName === \"SELECT\") {\r\n addMention(variable, (m) => m.set(elValue));\r\n } else if (supportedSingleValueInputTypes.includes(elements[0].type)) {\r\n if (!isNullOrEmpty(elValue)) {\r\n addMention(variable, (m) => m.set(elValue));\r\n }\r\n } else if ([\"checkbox\", \"radio\"].includes(elements[0].type)) {\r\n const checked = filter(elements as HTMLInputElement[], (el) => el.checked);\r\n addMention(variable, (m) => {\r\n m.clear();\r\n checked.forEach((c) =>\r\n m.add(c.value, null, [...elements].indexOf(c) + 1 + \"\"),\r\n );\r\n return m;\r\n });\r\n }\r\n });\r\n if (!isEmpty(mentionsByVariable)) {\r\n dispatch(setMultipleVariablesMentions(mentionsByVariable));\r\n }\r\n },\r\n [dispatch],\r\n );\r\n\r\n useValidation(validateSignal, () => {\r\n const answerRequired = isAnswerRequired(question, questionnaire);\r\n captureAnswers(content);\r\n\r\n if (validateAnswersInHtml(content) || !answerRequired) {\r\n return new ValidationBuilder().build();\r\n }\r\n\r\n // Question is not answered, so we fail validation for 1st empty variable\r\n let firstEmptyVariableName = \"\";\r\n for (let i = 0; i < question.variableNames.length; i++) {\r\n const variableName = question.variableNames[i];\r\n if (isEmpty(documentFindValue(variableName))) {\r\n firstEmptyVariableName = variableName;\r\n break;\r\n }\r\n }\r\n return new ValidationBuilder().fail(firstEmptyVariableName, \"IncompleteAnswer\").build();\r\n });\r\n\r\n // Capture the answers before we render new html.\r\n if (previousValue.current && previousValue.current !== content) {\r\n captureAnswers(previousValue.current);\r\n }\r\n previousValue.current = content;\r\n\r\n return <ExecutableHtml html={content} scriptKey={`${question.name}_content`} />;\r\n}\r\n","import React from \"react\";\r\nimport { BaseControl, ControlProps } from \"./BaseControl\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport ErrorRenderer from \"../shared/ErrorRenderer\";\r\nimport { QuestionType } from \"../../models/enums/QuestionType\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\nimport { ValidationBuilder } from \"../../models/builders/ValidationBuilder\";\r\nimport { ValidationOptionsModel } from \"../../models/ValidationOptionsModel\";\r\n\r\nexport class UndefinedControl extends BaseControl<any, any> {\r\n initializeQuestion(question: QuestionModel, props: ControlProps): void {}\r\n\r\n renderQuestion(question: QuestionModel) {\r\n return (\r\n <ErrorRenderer error={`No renderer for question type ${QuestionType[question.type]}`} />\r\n );\r\n }\r\n\r\n validate(options?: ValidationOptionsModel): ValidationResultModel {\r\n return new ValidationBuilder().build();\r\n }\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\nimport * as Mixins from \"../../../theme/Mixins\";\r\n\r\nexport default createUseStyles({\r\n numericRanking: {\r\n composes: \"numericRanking\",\r\n },\r\n numericOptionList: {\r\n composes: \"numeric-option-list\",\r\n },\r\n numericOption: {\r\n composes: \"numeric-option\",\r\n },\r\n numericOptionChoiceTextHeader: {\r\n composes: \"numeric-option__choice-text-header\",\r\n },\r\n numericOptionChoiceRankingHeader: {\r\n composes: \"numeric-option__choice-ranking-header\",\r\n },\r\n numericOptionChoiceHeader: {\r\n composes: \"numeric-option__choice-header\",\r\n paddingBottom: \"13px\",\r\n paddingTop: \"13px\",\r\n },\r\n numericOptionChoiceText: {\r\n composes: \"numeric-option__choice-text\",\r\n paddingBottom: \"13px\",\r\n paddingRight: \"24px\",\r\n paddingTop: \"13px\",\r\n verticalAlign: \"middle\",\r\n },\r\n numericOptionChoiceRanking: {\r\n composes: \"numeric-option__choice-ranking\",\r\n paddingRight: \"24px\",\r\n verticalAlign: \"middle\",\r\n },\r\n numericOptionChoiceInput: {\r\n composes: \"numeric-option__choice-Input\",\r\n },\r\n numericOptionChoiceLabel: {\r\n composes: \"numeric-option__choice-label\",\r\n },\r\n numericOptionChoiceSelected: ({ theme }) => ({\r\n background: theme.PrimaryColor,\r\n color: Mixins.foregroundColor(theme, theme.PrimaryColor),\r\n composes: \"numeric-option__choice-ranking--selected\",\r\n }),\r\n});\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport useStyles from \"./NumericRankingRenderer.styles\";\r\nimport { RendererProps } from \"../BaseRenderer\";\r\nimport { ChoiceModel } from \"../../../models/ChoiceModel\";\r\nimport { getSettingString } from \"../../../models/utilities/settingUtilities\";\r\nimport { isNullOrEmpty } from \"../../../utils/index\";\r\nimport { RecalledText } from \"../../../containers/shared/RecalledText\";\r\nimport { translate } from \"../../../models/utilities/translationUtilities\";\r\nimport { NumericRankingModel } from \"../../../models/NumericRankingModel\";\r\nimport { getChoiceRanking } from \"../../../models/utilities/choiceUtilities\";\r\nimport InputBox from \"../../shared/InputBox\";\r\n\r\ninterface Props extends RendererProps {\r\n rankings: NumericRankingModel[];\r\n labelsHeader: string;\r\n answerHeader: string;\r\n choices: ChoiceModel[];\r\n onFocus?: React.FocusEventHandler<Element>;\r\n onChange(choice: ChoiceModel, value: string): void;\r\n}\r\n\r\nfunction RankingHeader(props: Props) {\r\n const theme: any = useTheme();\r\n const classes = useStyles({ theme });\r\n const { question } = props;\r\n const {\r\n answerHeader = getSettingString(question, \"AnswersHeader\"),\r\n labelsHeader = getSettingString(question, \"LabelsHeader\"),\r\n } = props;\r\n\r\n return (\r\n <tr className={classes.numericOption}>\r\n {theme.DisplayChoiceIcon === \"right\" && !isNullOrEmpty(labelsHeader) && (\r\n <th className={classes.numericOptionChoiceText}>\r\n <RecalledText\r\n text={labelsHeader}\r\n render={(recalled) => (\r\n <span\r\n className={classes.numericOptionChoiceTextHeader}\r\n dangerouslySetInnerHTML={{ __html: recalled }}\r\n />\r\n )}\r\n />\r\n </th>\r\n )}\r\n {!isNullOrEmpty(answerHeader) && (\r\n <th className={classes.numericOptionChoiceRanking}>\r\n <RecalledText\r\n text={answerHeader}\r\n render={(recalled) => (\r\n <span\r\n className={classes.numericOptionChoiceRankingHeader}\r\n dangerouslySetInnerHTML={{ __html: recalled }}\r\n />\r\n )}\r\n />\r\n </th>\r\n )}\r\n {theme.DisplayChoiceIcon !== \"right\" && !isNullOrEmpty(labelsHeader) && (\r\n <th className={classes.numericOptionChoiceText}>\r\n <RecalledText\r\n text={labelsHeader}\r\n render={(recalled) => (\r\n <span\r\n className={classes.numericOptionChoiceTextHeader}\r\n dangerouslySetInnerHTML={{ __html: recalled }}\r\n />\r\n )}\r\n />\r\n </th>\r\n )}\r\n </tr>\r\n );\r\n}\r\n\r\nfunction Header({ language, choice }) {\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n return (\r\n <tr className={classes.numericOption}>\r\n <RecalledText\r\n text={translate(choice, \"TEXT\", language)}\r\n render={(recalled) => (\r\n <td\r\n className={classes.numericOptionChoiceHeader}\r\n dangerouslySetInnerHTML={{ __html: recalled }}\r\n colSpan={2}\r\n />\r\n )}\r\n />\r\n </tr>\r\n );\r\n}\r\n\r\nfunction Row(props: Props & { choice: ChoiceModel }) {\r\n const [focused, setFocused] = React.useState(false);\r\n const theme: any = useTheme();\r\n const classes = useStyles({ theme });\r\n const { choice, rankings, language, onFocus, onChange } = props;\r\n const choiceText = translate(choice, \"TEXT\", language);\r\n\r\n return (\r\n <tr className={classes.numericOption}>\r\n {theme.DisplayChoiceIcon === \"right\" && (\r\n <td className={classes.numericOptionChoiceText}>\r\n <RecalledText\r\n text={choiceText}\r\n render={(recalled) => (\r\n <label\r\n id={`${choice.elementId}_LABEL`}\r\n htmlFor={`${choice.elementId}_INPUT`}\r\n className={classes.numericOptionChoiceLabel}\r\n dangerouslySetInnerHTML={{ __html: recalled }}\r\n />\r\n )}\r\n />\r\n </td>\r\n )}\r\n <td className={classes.numericOptionChoiceRanking}>\r\n <InputBox\r\n focused={focused}\r\n className={classes.numericOptionChoiceInput}\r\n size=\"XSmall\"\r\n >\r\n <input\r\n id={`${choice.elementId}_INPUT`}\r\n type=\"text\"\r\n inputMode=\"decimal\"\r\n value={getChoiceRanking(choice, rankings)}\r\n onFocus={(e) => {\r\n setFocused(true);\r\n onFocus(e);\r\n }}\r\n onBlur={() => setFocused(false)}\r\n onChange={(e) => onChange(choice, (e.target as any).value)}\r\n />\r\n </InputBox>\r\n </td>\r\n {theme.DisplayChoiceIcon !== \"right\" && (\r\n <td className={classes.numericOptionChoiceText}>\r\n <RecalledText\r\n text={translate(choice, \"TEXT\", language)}\r\n render={(recalled) => (\r\n <label\r\n id={`${choice.elementId}_LABEL`}\r\n htmlFor={`${choice.elementId}_INPUT`}\r\n className={classes.numericOptionChoiceLabel}\r\n dangerouslySetInnerHTML={{ __html: recalled }}\r\n />\r\n )}\r\n />\r\n </td>\r\n )}\r\n </tr>\r\n );\r\n}\r\n\r\nexport default function NumericRankingRenderer(props: Props) {\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n const { choices, language } = props;\r\n return (\r\n <div className={classes.numericRanking}>\r\n <table className={classes.numericOptionList}>\r\n <tbody>\r\n <RankingHeader {...props} />\r\n {choices.map((choice) =>\r\n !choice.value ? (\r\n <Header key={choice.elementId} language={language} choice={choice} />\r\n ) : (\r\n <Row key={choice.elementId} {...props} choice={choice} />\r\n ),\r\n )}\r\n </tbody>\r\n </table>\r\n <div className=\"clear\" />\r\n </div>\r\n );\r\n}\r\n","export enum TimerLocation {\r\n Left,\r\n Center,\r\n Right,\r\n}\r\n","export enum TimerType {\r\n CountUp,\r\n CountDown,\r\n}\r\n","export enum TimerAction {\r\n None,\r\n EnableNavigation,\r\n AutoAdvance,\r\n DisplayMessage,\r\n TerminateSurvey,\r\n}\r\n","import React from \"react\";\r\nimport { DispatchProp } from \"react-redux\";\r\nimport { remove, isEmpty, max, cloneDeep } from \"../../utils/lodash\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { ControlProps, BaseControl } from \"./BaseControl\";\r\nimport { ChoiceModel } from \"../../models/ChoiceModel\";\r\nimport { isNullOrEmpty } from \"../../utils/index\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\nimport { ValidationBuilder } from \"../../models/builders/ValidationBuilder\";\r\nimport { getSettingNumber, getSettingString } from \"../../models/utilities/settingUtilities\";\r\nimport { getRendererProps } from \"../renderers/BaseRenderer\";\r\nimport { translate } from \"../../models/utilities/translationUtilities\";\r\nimport { NumericRankingModel } from \"../../models/NumericRankingModel\";\r\nimport { MentionModel } from \"../../models/MentionModel\";\r\nimport NumericRankingRenderer from \"../renderers/v2/NumericRankingRenderer\";\r\nimport { getSoftPromptCode } from \"../../models/utilities/questionUtilities\";\r\nimport { getChoice } from \"../../models/utilities/variableUtilities\";\r\nimport { isVisible } from \"../../models/utilities/choiceUtilities\";\r\nimport { isQuestionValidatedServerSide } from \"../../models/utilities/validationUtilities\";\r\nimport { VariableModel } from \"../../models/VariableModel\";\r\n\r\ninterface Props extends ControlProps, DispatchProp {}\r\n\r\ninterface State {\r\n rankings: NumericRankingModel[];\r\n}\r\n\r\nexport class NumericRankingControl extends BaseControl<Props, State> {\r\n constructor(props: Props) {\r\n super(props);\r\n this.state = { rankings: [] };\r\n }\r\n\r\n initializeQuestion(question: QuestionModel, props: Props) {\r\n super.initializeQuestion(question, props);\r\n const mentions: MentionModel[] = this.getMentions(props);\r\n this.setState({\r\n rankings: mentions.map((mention, i) => ({\r\n choiceValue: mention.value,\r\n rankingValue: i + 1,\r\n })),\r\n });\r\n }\r\n\r\n getSoftPromptChoiceRanking = (choiceValue: string): NumericRankingModel => ({\r\n choiceValue,\r\n rankingValue: 1,\r\n });\r\n\r\n getMaxAnswers(): number {\r\n const maxAnswers = getSettingNumber(this.props.question, \"MaxAllowedAnswers\");\r\n const choicesCount = this.props.sequencedVariables[0].choiceList.filter(\r\n (a) => !isNullOrEmpty(a.value),\r\n ).length;\r\n\r\n return maxAnswers !== undefined && !Number.isNaN(maxAnswers)\r\n ? Math.min(maxAnswers, choicesCount)\r\n : choicesCount;\r\n }\r\n\r\n getMinAnswers(): number {\r\n const minAnswers = getSettingNumber(this.props.question, \"MinRequiredAnswers\");\r\n if (minAnswers !== undefined && !Number.isNaN(minAnswers)) {\r\n return minAnswers;\r\n }\r\n return 1;\r\n }\r\n\r\n getRankingValue = (value: string): number => {\r\n const sanitizedValue = value.replace(/\\D/g, \"\");\r\n if (!isNullOrEmpty(sanitizedValue)) {\r\n const maxAnswers = this.getMaxAnswers();\r\n const intValue = parseInt(sanitizedValue, 10);\r\n if (!Number.isNaN(intValue) && intValue >= 1 && intValue <= maxAnswers) {\r\n return intValue;\r\n }\r\n }\r\n return undefined;\r\n };\r\n\r\n onChange = (choice: ChoiceModel, value: string) => {\r\n const { sequencedVariables } = this.props;\r\n const [variable] = sequencedVariables;\r\n\r\n const { value: choiceValue } = choice;\r\n const rankingValue = this.getRankingValue(value);\r\n const ranking: NumericRankingModel = {\r\n choiceValue,\r\n rankingValue,\r\n };\r\n\r\n this.setState((prevState) => {\r\n const newState = cloneDeep(prevState);\r\n remove(newState.rankings, (r) => r.choiceValue === choiceValue);\r\n if (rankingValue) {\r\n newState.rankings.push(ranking);\r\n }\r\n this.setNumericRankingMentions(variable, newState.rankings);\r\n return newState;\r\n });\r\n };\r\n\r\n setNumericRankingMentions(variable: VariableModel, rankings: NumericRankingModel[]): void {\r\n const { name: variableName } = variable;\r\n const rankingsToSet = this.getRankingIndicesToSet(rankings);\r\n this.setMentions(this.props, variableName, (mentions) => {\r\n mentions.clear();\r\n rankingsToSet.forEach((index) => {\r\n const choices = rankings\r\n .filter((ranking) => ranking.rankingValue === index)\r\n .map((ranking) => ranking.choiceValue)\r\n .sort();\r\n const [firstChoiceInRanking] = choices;\r\n if (firstChoiceInRanking) {\r\n choices.forEach(() => mentions.add(firstChoiceInRanking));\r\n } else {\r\n mentions.add(\"\");\r\n }\r\n });\r\n return mentions;\r\n });\r\n }\r\n\r\n getRankingIndicesToSet(rankings: NumericRankingModel[]): number[] {\r\n if (!rankings?.length) {\r\n return [];\r\n }\r\n const maxRankingInState = Math.max(...rankings.map((ranking) => ranking.rankingValue));\r\n const maxAnswers = this.getMaxAnswers();\r\n const maxRanking = Math.min(maxAnswers, maxRankingInState);\r\n const rankingsToSet = [...Array(maxRanking)].map((_, i) => i + 1);\r\n return rankingsToSet;\r\n }\r\n\r\n onFocus = (event) => {\r\n const inputIsEmpty = isEmpty(event.target.value);\r\n const alreadyHasMaxAnswers = this.state.rankings.length >= this.getMaxAnswers();\r\n if (inputIsEmpty && alreadyHasMaxAnswers) {\r\n event.target.blur();\r\n }\r\n };\r\n\r\n validate(): ValidationResultModel {\r\n const {\r\n question,\r\n questionnaire,\r\n showSoftPrompt,\r\n sequencedVariables,\r\n useClientValidation,\r\n } = this.props;\r\n const [variable] = sequencedVariables;\r\n const { choiceList } = variable;\r\n const { rankings } = this.state;\r\n const validation = new ValidationBuilder();\r\n\r\n if (isQuestionValidatedServerSide(question.type, useClientValidation)) {\r\n return new ValidationBuilder().build();\r\n }\r\n\r\n const customError =\r\n getSettingString(question, \"CustomErrorMessage\") ||\r\n this.parentCustomError(question.parent);\r\n const incompleteAnswerError = customError || \"IncompleteAnswer\";\r\n\r\n const hasValues = rankings.length;\r\n const isRequired = this.isAnswerRequired(questionnaire, question);\r\n if (!isRequired && !hasValues) {\r\n return validation.build();\r\n }\r\n\r\n const isSoftPrompt = this.isSoftPrompt(this.props);\r\n const softPromptCode = getSoftPromptCode(question);\r\n const hasNonSoftPromptAnswers = rankings.some(\r\n (ranking) => softPromptCode === undefined || ranking.choiceValue !== softPromptCode,\r\n );\r\n if (isSoftPrompt && !hasNonSoftPromptAnswers) {\r\n if (showSoftPrompt) {\r\n // Short-circuit validation: set invisible choice mentions (if any) and return valid\r\n const softPromptChoice = getChoice(variable, softPromptCode);\r\n if (softPromptChoice !== undefined && !isVisible(softPromptChoice)) {\r\n const ranking = this.getSoftPromptChoiceRanking(softPromptChoice.value);\r\n this.setMentions(this.props, variable.name, (mentions) =>\r\n mentions.set(ranking.choiceValue),\r\n );\r\n }\r\n return validation.build();\r\n }\r\n return this.validateSoftPrompt(this.props);\r\n }\r\n\r\n if (!hasValues) {\r\n return validation.fail(variable.name, incompleteAnswerError).build();\r\n }\r\n\r\n // Sorting numbers will return unexpected results without a comparer: (a, b) => a - b\r\n const values = rankings.map((r) => r.rankingValue).sort((a, b) => a - b);\r\n\r\n const hasFewerAnswersThanMinimum = values.length < this.getMinAnswers();\r\n if (hasFewerAnswersThanMinimum) {\r\n return validation\r\n .fail(variable.name, \"InvalidChoicesMin\", { min: String(this.getMinAnswers()) })\r\n .build();\r\n }\r\n\r\n const hasGapsInRanking = values.slice(1).some((value, i) => value - values[i] !== 1);\r\n const maxRankExceedsMaxLength = values.length !== max(values);\r\n const hasInvalidValue = values.some(\r\n (value, index) =>\r\n Number.isNaN(value) ||\r\n value < 0 ||\r\n value > choiceList.length ||\r\n values.indexOf(value) !== index,\r\n );\r\n\r\n const [firstValue] = values;\r\n const hasInvalidResponse =\r\n firstValue !== 1 || hasGapsInRanking || maxRankExceedsMaxLength || hasInvalidValue;\r\n if (hasInvalidResponse) {\r\n return validation\r\n .fail(variable.name, \"InvalidRankingValue\", {\r\n min: String(1),\r\n max: String(this.getMaxAnswers()),\r\n })\r\n .build();\r\n }\r\n\r\n return validation.build();\r\n }\r\n\r\n renderQuestion(question: QuestionModel) {\r\n const { language, sequencedVariables } = this.props;\r\n return (\r\n <NumericRankingRenderer\r\n {...getRendererProps(this.props)}\r\n labelsHeader={translate(question, \"LabelsHeader\", language)}\r\n answerHeader={translate(question, \"AnswersHeader\", language)}\r\n choices={sequencedVariables[0].choiceList}\r\n onChange={this.onChange}\r\n onFocus={this.onFocus}\r\n rankings={this.state.rankings}\r\n />\r\n );\r\n }\r\n}\r\n","import React from \"react\";\r\nimport { DispatchProp } from \"react-redux\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { BaseControl, ControlProps } from \"./BaseControl\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\nimport {\r\n getSettingBoolean,\r\n getSettingString,\r\n getSettingNumber,\r\n hasSetting,\r\n} from \"../../models/utilities/settingUtilities\";\r\nimport { Signal } from \"../../signals/index\";\r\nimport { ValidationBuilder } from \"../../models/builders/ValidationBuilder\";\r\nimport { getRendererProps } from \"../renderers/BaseRenderer\";\r\nimport {\r\n isHeaderRow,\r\n variableForCell,\r\n hasOpenEnd,\r\n openEndVariableName,\r\n} from \"../../models/utilities/gridUtilities\";\r\nimport { Piping } from \"../../piping\";\r\nimport { isNullOrEmpty } from \"../../utils/index\";\r\nimport { AxisModel } from \"../../models/AxisModel\";\r\nimport { ValidationOptionsModel } from \"../../models/ValidationOptionsModel\";\r\nimport { RecallType } from \"../../piping/RecallType\";\r\nimport { getNumeral, formatNumeric } from \"../../utils/Number\";\r\nimport { __getStore__ } from \"../../redux/store\";\r\nimport GridRenderer from \"../renderers/v2/GridRenderer\";\r\nimport { ElementWithSettings } from \"../../models/ElementWithSettings\";\r\nimport { MentionModel } from \"../../models/MentionModel\";\r\nimport { VariableModel } from \"../../models/VariableModel\";\r\nimport { translate } from \"../../models/utilities/translationUtilities\";\r\nimport { isQuestionValidatedServerSide } from \"../../models/utilities/validationUtilities\";\r\n\r\ninterface Props extends ControlProps, DispatchProp {}\r\n\r\ninterface State {\r\n validationResult?: ValidationResultModel;\r\n openEndValue: { [key: string]: string };\r\n}\r\n\r\nexport class RunningTotalControl extends BaseControl<Props, State> {\r\n validateSignal = new Signal<ValidationOptionsModel, ValidationResultModel>();\r\n tableRef: HTMLTableElement;\r\n\r\n constructor(props: Props) {\r\n super(props);\r\n this.state = { openEndValue: {} };\r\n }\r\n\r\n initializeQuestion(question: QuestionModel, props: Props): void {\r\n super.initializeQuestion(question, props);\r\n this.setState({\r\n openEndValue: {},\r\n validationResult: null,\r\n });\r\n this.initializeOpenEnd(question, props);\r\n }\r\n\r\n UNSAFE_componentWillReceiveProps(nextProps: Props) {\r\n this.initializeOpenEnd(nextProps.question, nextProps);\r\n super.UNSAFE_componentWillReceiveProps(nextProps);\r\n }\r\n\r\n getVariableNames = (axes: AxisModel[]): string[] =>\r\n axes\r\n .map((axis) => axis.variables.map((variable) => variable.name))\r\n .reduce((acc, next) => [...acc, ...next], [])\r\n .reduce((acc, next) => (acc.includes(next) ? acc : [...acc, next]), []);\r\n\r\n getAxesVariablesToClear = (prevAxes: AxisModel[], currentAxes: AxisModel[]): string[] => {\r\n const prevAxesVariables = this.getVariableNames(prevAxes);\r\n const currentAxesVariables = this.getVariableNames(currentAxes);\r\n const axesVariablesToClear = prevAxesVariables.filter(\r\n (variable) => !currentAxesVariables.includes(variable),\r\n );\r\n return axesVariablesToClear;\r\n };\r\n\r\n getOpenEndVariablesToClear = (prevRows: AxisModel[], currentRows: AxisModel[]): string[] => {\r\n const prevOpenEnds = prevRows\r\n .filter((row) => !isNullOrEmpty(row.settings.OpenEndVariable))\r\n .map((row) => row.settings.OpenEndVariable);\r\n const currentOpenEnds = currentRows\r\n .filter((row) => !isNullOrEmpty(row.settings.OpenEndVariable))\r\n .map((row) => row.settings.OpenEndVariable);\r\n const openEndVariablesToClear = prevOpenEnds.filter(\r\n (variable) => !currentOpenEnds.includes(variable),\r\n );\r\n return openEndVariablesToClear;\r\n };\r\n\r\n getRemovedVariableNames = (prevProps: Props, props: Props): string[] => {\r\n const columnVariablesToClear = this.getAxesVariablesToClear(\r\n prevProps.sequencedColumns,\r\n props.sequencedColumns,\r\n );\r\n const rowVariablesToClear = this.getAxesVariablesToClear(\r\n prevProps.sequencedRows,\r\n props.sequencedRows,\r\n );\r\n const openEndVariablesToClear = this.getOpenEndVariablesToClear(\r\n prevProps.sequencedRows,\r\n props.sequencedRows,\r\n );\r\n const variablesToClear = [...columnVariablesToClear, ...rowVariablesToClear]\r\n .reduce((acc, next) => (acc.includes(next) ? acc : [...acc, next]), [])\r\n .concat(openEndVariablesToClear);\r\n return variablesToClear;\r\n };\r\n\r\n didUpdateVariables(sequencedVariables: VariableModel[], prevProps: Props) {\r\n const variablesToClear = this.getRemovedVariableNames(prevProps, this.props);\r\n variablesToClear.forEach((variableName) =>\r\n this.setMentions(this.props, variableName, (mentions) => mentions.clear()),\r\n );\r\n }\r\n\r\n initializeOpenEnd(question: QuestionModel, props: Props) {\r\n this.setState((prevState) => {\r\n const newState = { ...prevState };\r\n question.rows\r\n .filter((row) => hasOpenEnd(row))\r\n .forEach((row) => {\r\n const openEndName = openEndVariableName(row);\r\n const mentions = this.getMentions(props, openEndName);\r\n const mention = mentions != null ? mentions[0] : undefined;\r\n if (mention !== undefined && !isNullOrEmpty(mention.openEnd)) {\r\n newState.openEndValue[openEndName] = mention.openEnd;\r\n } else {\r\n newState.openEndValue[openEndName] = \"\";\r\n }\r\n });\r\n return newState;\r\n });\r\n }\r\n\r\n onOpenEndChange = (answer: any, event: any) => {\r\n const { value } = event.target;\r\n this.setState((prevState) => {\r\n const newState = { ...prevState };\r\n newState.openEndValue = {\r\n ...newState.openEndValue,\r\n [openEndVariableName(answer)]: this.truncateOpenEnd(answer, value),\r\n };\r\n return newState;\r\n });\r\n };\r\n\r\n onOpenEndBlur = (answer: any) => {\r\n const openEndName = openEndVariableName(answer);\r\n const openEnd = this.state.openEndValue[openEndName];\r\n if (isNullOrEmpty(openEnd)) {\r\n this.setMentions(this.props, openEndName, (mentions) => mentions.clear());\r\n } else {\r\n this.setMentions(this.props, openEndName, (mentions) =>\r\n mentions.set(getSettingString(answer, \"OpenEndAnswerCode\", \"0\"), openEnd.trim()),\r\n );\r\n }\r\n };\r\n\r\n onColumnDisplayRunningTotal = (column: AxisModel) => {\r\n const total = this.columnRunningTotal(column);\r\n return this.formatNumeric(total, column);\r\n };\r\n\r\n bodyRows = () => {\r\n const { sequencedRows = [] } = this.props;\r\n return sequencedRows.filter((row) => !isHeaderRow(row));\r\n };\r\n\r\n columnRunningTotal(column: AxisModel) {\r\n const rows = this.bodyRows();\r\n const total = rows\r\n .map((row) => {\r\n const variable = variableForCell(row, column);\r\n const value = this.getMentionValue(this.props, variable.name);\r\n return getNumeral(value).value();\r\n })\r\n .reduce((a: number, b: number) => a + b, 0);\r\n return total;\r\n }\r\n\r\n formatNumeric(value: string | number, column: AxisModel): string {\r\n const decimals = getSettingNumber(column, \"NumberOfDecimals\");\r\n return formatNumeric(\r\n value,\r\n decimals,\r\n this.props.language,\r\n false,\r\n !hasSetting(column, \"AutoFormatting\") || getSettingBoolean(column, \"AutoFormatting\"),\r\n );\r\n }\r\n\r\n onReset = (question: QuestionModel) => {\r\n question.variableNames.forEach((v) =>\r\n this.setMentions(this.props, v, (mentions) => mentions.clear()),\r\n );\r\n };\r\n\r\n validateAnswerRequired = (\r\n rows: AxisModel[],\r\n columns: AxisModel[],\r\n customError: string,\r\n validation: ValidationBuilder,\r\n ): ValidationBuilder => {\r\n const errorKey = !isNullOrEmpty(customError) ? customError : \"IncompleteAnswer\";\r\n columns.forEach((column) => {\r\n const isColumnRequired = this.isAxisAnswerRequired(column);\r\n if (!isColumnRequired) {\r\n return;\r\n }\r\n rows.forEach((row) => {\r\n const isRowRequired = this.isAxisAnswerRequired(row);\r\n const variable = variableForCell(row, column);\r\n if (!isRowRequired || variable === undefined) {\r\n return;\r\n }\r\n const hasMentions = this.variableHasMentions(variable);\r\n if (!hasMentions) {\r\n validation.fail(variable.name, errorKey);\r\n }\r\n });\r\n });\r\n return validation;\r\n };\r\n\r\n hasValidNumericValue = (mention: MentionModel) =>\r\n mention && !Number.isNaN(parseFloat(mention.value));\r\n\r\n variableHasMentions = (variable: VariableModel) =>\r\n this.getMentions(this.props, variable.name).filter(this.hasValidNumericValue).length;\r\n\r\n axisHasMentions = (axis: AxisModel) => axis.variables.some(this.variableHasMentions);\r\n\r\n validateColumnRunningTotal = (\r\n column: AxisModel,\r\n customError: string,\r\n validation: ValidationBuilder,\r\n ): ValidationBuilder => {\r\n const hasMentionsSet = this.axisHasMentions(column);\r\n if (!hasMentionsSet) {\r\n return validation;\r\n }\r\n\r\n const { language } = this.props;\r\n const min = this.getColumnValueSetting(column, \"MinValue\");\r\n const max = this.getColumnValueSetting(column, \"MaxValue\");\r\n const total = this.columnRunningTotal(column);\r\n\r\n const hasMax = max !== undefined;\r\n const hasMin = min !== undefined;\r\n\r\n const invalidMax = hasMax && total > max;\r\n const invalidMin = hasMin && total < min;\r\n const outOfBounds = hasMax && hasMin && (invalidMax || invalidMin);\r\n\r\n let columnError = \"\";\r\n if (invalidMax) {\r\n columnError = translate(column, \"UpperBoundNotFulfilledMessage\", language);\r\n } else if (invalidMin) {\r\n columnError = translate(column, \"LowerBoundNotFulfilledMessage\", language);\r\n }\r\n\r\n let errorKey = \"\";\r\n\r\n if (outOfBounds) {\r\n errorKey = customError || \"OutOfBounds\";\r\n } else if (invalidMax) {\r\n errorKey = customError || \"UpperBoundNotFulfilled\";\r\n } else if (invalidMin) {\r\n errorKey = customError || \"LowerBoundNotFulfilled\";\r\n }\r\n\r\n if (!isNullOrEmpty(errorKey)) {\r\n column.variables.forEach((variable) =>\r\n validation.fail(\r\n variable.name,\r\n !isNullOrEmpty(columnError) ? \"CustomErrorMessage\" : errorKey,\r\n {\r\n min: hasMin ? String(min) : undefined,\r\n max: hasMax ? String(max) : undefined,\r\n },\r\n columnError,\r\n ),\r\n );\r\n }\r\n return validation;\r\n };\r\n\r\n validateRowOpenEnd = (\r\n row: AxisModel,\r\n openEndValue: { [key: string]: string },\r\n customError: string,\r\n validation: ValidationBuilder,\r\n ): ValidationBuilder => {\r\n const hasMentionsSet = this.axisHasMentions(row);\r\n const rowHasOpenEnd = hasOpenEnd(row);\r\n const isRowOpenEndRequired = getSettingBoolean(row, \"EnforceOpenEnd\");\r\n if (!hasMentionsSet || !rowHasOpenEnd || !isRowOpenEndRequired || !row.openEndActive) {\r\n return validation;\r\n }\r\n\r\n const rowOpenEndVariableName = openEndVariableName(row);\r\n const hasOpenEndMentionSet =\r\n openEndValue !== undefined && !isNullOrEmpty(openEndValue[rowOpenEndVariableName]);\r\n if (!hasOpenEndMentionSet) {\r\n const errorKey = !isNullOrEmpty(customError) ? customError : \"IncompleteAnswer\";\r\n validation.fail(rowOpenEndVariableName, errorKey);\r\n }\r\n\r\n const minLength = getSettingNumber(row, \"MinOpenEndLength\");\r\n const isOpenEndValueMinimumLengthValid =\r\n minLength === undefined ||\r\n (hasOpenEndMentionSet && openEndValue[rowOpenEndVariableName].length >= minLength);\r\n if (!isOpenEndValueMinimumLengthValid) {\r\n const errorKey = !isNullOrEmpty(customError) ? customError : \"InvalidCharactersMin\";\r\n validation.fail(rowOpenEndVariableName, errorKey, {\r\n min: String(minLength),\r\n });\r\n }\r\n\r\n return validation;\r\n };\r\n\r\n validate(options?: ValidationOptionsModel): ValidationResultModel {\r\n const {\r\n questionnaire,\r\n question,\r\n sequencedColumns,\r\n sequencedRows,\r\n language,\r\n useClientValidation,\r\n } = this.props;\r\n const validation = new ValidationBuilder();\r\n question.variables.forEach(this.removeUnavailableMentions);\r\n\r\n if (isQuestionValidatedServerSide(question.type, useClientValidation)) {\r\n return validation.build();\r\n }\r\n\r\n if (this.isSoftPrompt(this.props) && !this.hasMentions(this.props)) {\r\n return this.validateSoftPrompt(this.props);\r\n }\r\n const isQuestionRequired = this.isAnswerRequired(questionnaire, question);\r\n const customError = translate(question, \"CustomErrorMessage\", language);\r\n\r\n if (isQuestionRequired) {\r\n this.validateAnswerRequired(sequencedRows, sequencedColumns, customError, validation);\r\n }\r\n sequencedRows.forEach((row) => {\r\n this.validateRowOpenEnd(row, this.state.openEndValue, customError, validation);\r\n });\r\n sequencedColumns.forEach((column) => {\r\n this.validateColumnRunningTotal(column, customError, validation);\r\n });\r\n return validation.build();\r\n }\r\n\r\n getColumnValueSetting(column: ElementWithSettings, setting: \"MinValue\" | \"MaxValue\") {\r\n const { interview } = __getStore__().getState();\r\n const value = getSettingString(column, setting);\r\n const pipedValue = Piping.evaluateRecalls(interview, value, RecallType.Code);\r\n const parsedValue = parseInt(pipedValue, 10);\r\n return !Number.isNaN(parsedValue) ? parsedValue : undefined;\r\n }\r\n\r\n renderQuestion(question: QuestionModel): JSX.Element {\r\n return (\r\n <GridRenderer\r\n {...getRendererProps(this.props)}\r\n columns={this.props.sequencedColumns}\r\n rows={this.props.sequencedRows}\r\n validateSignal={this.validateSignal}\r\n validationResult={this.state.validationResult}\r\n getColumnRunningTotal={this.onColumnDisplayRunningTotal}\r\n openEndValue={this.state.openEndValue}\r\n onOpenEndBlur={this.onOpenEndBlur}\r\n onOpenEndChange={this.onOpenEndChange}\r\n showSoftPrompt={this.props.showSoftPrompt}\r\n matrix={this.props.matrix}\r\n onReset={() => this.onReset(question)}\r\n />\r\n );\r\n }\r\n}\r\n","import React from \"react\";\r\nimport { DateTime } from \"luxon\";\r\nimport { DispatchProp, connect } from \"react-redux\";\r\nimport { isEmpty } from \"../../utils/lodash\";\r\nimport { BaseControl, ControlProps } from \"./BaseControl\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport {\r\n getSettingString,\r\n getSettingEnum,\r\n getSettingNumber,\r\n getSettingBoolean,\r\n hasSetting,\r\n} from \"../../models/utilities/settingUtilities\";\r\nimport { TimerLocation } from \"../../models/enums/TimerLocation\";\r\nimport { TimerType } from \"../../models/enums/TimerType\";\r\nimport { TimerAction } from \"../../models/enums/TimerAction\";\r\nimport { DispositionCode } from \"../../models/enums/DispositionCode\";\r\nimport { RecalledText } from \"../../containers/shared/RecalledText\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\nimport { ValidationBuilder } from \"../../models/builders/ValidationBuilder\";\r\nimport { NavigationType } from \"../../models/enums/NavigationType\";\r\nimport { translate } from \"../../models/utilities/translationUtilities\";\r\nimport { ValidationOptionsModel } from \"../../models/ValidationOptionsModel\";\r\nimport { setNavigationEnabled, navigationQuit } from \"../../redux/actions\";\r\nimport { __getStore__ } from \"../../redux/store\";\r\nimport { Piping } from \"../../piping\";\r\nimport { StoreState } from \"../../models/states/StoreState\";\r\nimport { selectNavigationDisabled } from \"../../redux/selectors/interview/navigation\";\r\n\r\ninterface StateProps {\r\n navigationEnabled: boolean;\r\n}\r\n\r\ninterface Props extends ControlProps, StateProps, DispatchProp {}\r\n\r\ninterface State {\r\n displayText: string;\r\n displayMessage?: string | JSX.Element;\r\n totalTime: string;\r\n clickCount: string;\r\n firstClick: string;\r\n lastClick: string;\r\n navigationEnabled: boolean;\r\n}\r\n\r\nconst mapStateToProps = (state: StoreState): StateProps => ({\r\n navigationEnabled: !selectNavigationDisabled(state),\r\n});\r\n\r\nclass TimerControlImpl extends BaseControl<Props, State> {\r\n secondTimerId: number;\r\n actionTimerId: number;\r\n startTime: Date;\r\n firstClickTime: Date;\r\n lastClickTime: Date;\r\n clickCount = 0;\r\n moved = false;\r\n\r\n constructor(props: Props) {\r\n super(props);\r\n this.state = {\r\n displayText: \"\",\r\n totalTime: \"0\",\r\n clickCount: \"0\",\r\n firstClick: \"0\",\r\n lastClick: \"0\",\r\n navigationEnabled: true,\r\n };\r\n }\r\n\r\n totalTimeVar = (props: Props) => getSettingString(props.question, \"TotalTimeVariableName\");\r\n firstClickVar = (props: Props) => getSettingString(props.question, \"FirstClickVariableName\");\r\n lastClickVar = (props: Props) => getSettingString(props.question, \"LastClickVariableName\");\r\n clickCountVar = (props: Props) => getSettingString(props.question, \"ClickCountVariableName\");\r\n dateFormat = (props: Props) => getSettingString(props.question, \"TimeFormat\", \"hh:mm:ss\");\r\n secondToAction = (props: Props) => getSettingNumber(props.question, \"SecondToAction\", 0);\r\n timerType = (props: Props) => getSettingNumber(props.question, \"Type\");\r\n timerAction = (props: Props) => getSettingNumber(props.question, \"Action\");\r\n actionMessage = (props: Props) => translate(props.question, \"ActionMessage\", props.language);\r\n terminateSurveyActionUrl = (props: Props) =>\r\n translate(props.question, \"TerminateSurveyActionURL\", props.language);\r\n\r\n terminateSurveyActionDisposition = (props: Props) => {\r\n return getSettingEnum(props.question, DispositionCode, \"TerminateSurveyActionDisposition\");\r\n };\r\n\r\n terminateSurveyActionMessage = (props: Props) => {\r\n const message = translate(props.question, \"TerminateSurveyActionMessage\", props.language);\r\n if (!isEmpty(message)) {\r\n const { interview } = __getStore__().getState();\r\n return Piping.evaluateRecalls(interview, message);\r\n }\r\n return null;\r\n };\r\n\r\n initializeQuestion(question: QuestionModel, props: Props) {\r\n super.initializeQuestion(question, props);\r\n window.addEventListener(\"click\", this.onWindowClick, true);\r\n this.moved = false;\r\n this.startTime = new Date();\r\n this.onSecondTimer();\r\n if (this.secondToAction(props) > 0)\r\n this.actionTimerId = window.setTimeout(\r\n this.onActionTimeout,\r\n this.secondToAction(props) * 1000,\r\n );\r\n this.secondTimerId = window.setInterval(this.onSecondTimer, 1000);\r\n if (this.timerAction(props) === TimerAction.EnableNavigation) {\r\n this.setState({ navigationEnabled: false });\r\n props.dispatch(setNavigationEnabled(false));\r\n } else {\r\n this.setState({ navigationEnabled: true });\r\n }\r\n }\r\n\r\n componentDidUpdate() {\r\n if (this.props.navigationEnabled && !this.state.navigationEnabled) {\r\n this.props.dispatch(setNavigationEnabled(false));\r\n }\r\n }\r\n\r\n finalizeQuestion(question: QuestionModel, props: Props) {\r\n super.finalizeQuestion(question, props);\r\n window.removeEventListener(\"click\", this.onWindowClick, true);\r\n window.clearTimeout(this.actionTimerId);\r\n window.clearInterval(this.secondTimerId);\r\n if (this.timerAction(props) === TimerAction.EnableNavigation)\r\n props.dispatch(setNavigationEnabled(true));\r\n }\r\n\r\n setTimerVariables = (props: Props) => {\r\n this.setMentions(this.props, this.totalTimeVar(this.props), (mentions) =>\r\n mentions.set(this.state.totalTime),\r\n );\r\n this.setMentions(this.props, this.clickCountVar(this.props), (mentions) =>\r\n mentions.set(this.state.clickCount),\r\n );\r\n this.setMentions(this.props, this.firstClickVar(this.props), (mentions) =>\r\n mentions.set(this.state.firstClick),\r\n );\r\n this.setMentions(this.props, this.lastClickVar(this.props), (mentions) =>\r\n mentions.set(this.state.lastClick),\r\n );\r\n };\r\n\r\n onWindowClick = (event: any) => {\r\n const navBar = document.getElementsByClassName(\"navigationBar\")[0];\r\n if (navBar != null && navBar.contains(event.target)) return; // Prevent clicks on navigation bar buttons from registering as a page click.\r\n if (this.firstClickTime === undefined) this.firstClickTime = new Date();\r\n this.lastClickTime = new Date();\r\n this.clickCount++;\r\n this.setState((s, p) => {\r\n const newState = { ...s };\r\n newState.clickCount = this.clicks();\r\n newState.firstClick = this.firstClick();\r\n newState.lastClick = this.lastClick();\r\n return newState;\r\n });\r\n };\r\n\r\n onSecondTimer = () => {\r\n this.setState((s, p) => {\r\n const newState = { ...s };\r\n newState.totalTime = this.totalTime();\r\n newState.firstClick = this.firstClick();\r\n newState.lastClick = this.lastClick();\r\n return newState;\r\n });\r\n this.updateDisplay();\r\n };\r\n\r\n onActionTimeout = () => {\r\n switch (this.timerAction(this.props)) {\r\n case TimerAction.AutoAdvance: {\r\n if (this.props.onNavigation) this.props.onNavigation(NavigationType.Next);\r\n window.setTimeout(window.clearInterval, 200, this.secondTimerId);\r\n break;\r\n }\r\n case TimerAction.DisplayMessage: {\r\n this.setState({\r\n displayMessage: <RecalledText text={this.actionMessage(this.props)} />,\r\n });\r\n break;\r\n }\r\n case TimerAction.EnableNavigation: {\r\n this.setState({ navigationEnabled: true }, () =>\r\n this.props.dispatch(setNavigationEnabled(true)),\r\n );\r\n break;\r\n }\r\n case TimerAction.TerminateSurvey: {\r\n const { id, settings } = this.props.question;\r\n const disposition = this.terminateSurveyActionDisposition(this.props);\r\n const redirectUrl = this.terminateSurveyActionUrl(this.props);\r\n const message = this.terminateSurveyActionMessage(this.props);\r\n const terminationSurveyAction = Number(settings.TerminateSurveyAction);\r\n\r\n this.props.dispatch(\r\n navigationQuit(disposition, {\r\n forcedQuit: true,\r\n questionId: id,\r\n redirectUrl,\r\n message,\r\n terminationSurveyAction,\r\n }),\r\n );\r\n break;\r\n }\r\n default:\r\n break;\r\n }\r\n };\r\n\r\n totalTime = () => this.dateDiffInSeconds([new Date(), this.startTime]);\r\n\r\n firstClick = () => this.dateDiffInSeconds([this.firstClickTime, this.startTime]);\r\n\r\n lastClick = () => this.dateDiffInSeconds([this.lastClickTime, this.startTime]);\r\n\r\n dateDiffInSeconds = (dates: Date[]) => {\r\n const [a, b] = dates.map((date) => DateTime.fromJSDate(date));\r\n return String(Math.trunc(a.diff(b, \"seconds\").seconds));\r\n };\r\n\r\n clicks = () => String(this.clickCount || \"\");\r\n\r\n updateDisplay() {\r\n const start = DateTime.fromJSDate(this.startTime);\r\n const now = DateTime.fromJSDate(new Date());\r\n const diff = now.diff(start);\r\n const dateFormat = this.dateFormat(this.props).replace(\"hh\", \"HH\");\r\n this.setState((s, p) => {\r\n const newState = { ...s };\r\n if (this.timerType(this.props) === TimerType.CountDown) {\r\n const timeToAction = Math.max(\r\n this.secondToAction(this.props) * 1000 - diff.milliseconds,\r\n 0,\r\n );\r\n newState.displayText = DateTime.fromMillis(timeToAction)\r\n .toUTC()\r\n .toFormat(dateFormat);\r\n } else {\r\n newState.displayText = DateTime.fromMillis(diff.milliseconds)\r\n .toUTC()\r\n .toFormat(dateFormat);\r\n }\r\n return newState;\r\n });\r\n }\r\n\r\n validate(options?: ValidationOptionsModel): ValidationResultModel {\r\n this.setTimerVariables(this.props);\r\n return new ValidationBuilder().build();\r\n }\r\n\r\n renderText(question: QuestionModel) {\r\n if (!hasSetting(question, \"Show\") || !getSettingBoolean(question, \"Show\")) return null;\r\n return (\r\n <>\r\n <div className=\"timerLabel\" id=\"timerLabel\">\r\n <RecalledText text={translate(question, \"Label\", this.props.language)} />\r\n </div>\r\n <div className=\"timerTime\" aria-labelledby=\"timerLabel\" aria-live=\"polite\">\r\n {this.state.displayText}\r\n </div>\r\n </>\r\n );\r\n }\r\n\r\n renderQuestion(question: QuestionModel): JSX.Element | null {\r\n const align = getSettingNumber(question, \"Location\", TimerLocation.Left);\r\n let textAlign: \"center\" | \"left\" | \"right\" = \"center\";\r\n if (align === TimerLocation.Left) textAlign = \"left\";\r\n if (align === TimerLocation.Right) textAlign = \"right\";\r\n return (\r\n <div className=\"timerDisplay\" role=\"timer\" style={{ textAlign }}>\r\n {this.renderText(question)}\r\n <div className=\"timerMessage\">{this.state.displayMessage}</div>\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nexport const TimerControl = connect(mapStateToProps)(TimerControlImpl);\r\n","import { createUseStyles } from \"react-jss\";\r\nimport { controlBackgroundColor, alpha, foregroundColor, darken, getSpacing } from \"../../../theme/Mixins\";\r\n\r\nexport default createUseStyles({\r\n choice: {\r\n background: ({ theme }) => alpha(theme.ControlBackground, theme.ControlAlpha),\r\n border: ({ theme }) => [[theme.BorderWidth, \"solid\", theme.ControlBorderColor]],\r\n borderRadius: ({ theme }) => theme.BorderRadius,\r\n color: ({ theme }) => foregroundColor(theme, controlBackgroundColor(theme)),\r\n composes: \"choice radio-button\",\r\n cursor: \"pointer\",\r\n flex: 1,\r\n outline: \"none\",\r\n position: \"relative\",\r\n textAlign: \"center\",\r\n transition: \"background 200ms, border-color 200ms, color 200ms\",\r\n margin: 3,\r\n\r\n \"&:before\": {\r\n content: \"''\",\r\n float: \"left\",\r\n paddingTop: \"100%\",\r\n },\r\n },\r\n dynamicChoice: {\r\n width: \"100%\",\r\n margin: ({ theme }) => [[getSpacing(theme, theme.ChoiceSpacing, theme.QuestionSpacing?.WithinComponents) / 2, 0]],\r\n padding: [[14.5, 0]],\r\n\r\n \"&:before\": {\r\n paddingTop: \"0\",\r\n height: 29,\r\n width: \"100%\",\r\n },\r\n },\r\n choiceSelected: {\r\n background: ({ theme }) => theme.PrimaryColor,\r\n borderColor: ({ theme }) => darken(theme.PrimaryColor, theme.ActiveHighlightValue),\r\n color: ({ theme }) => foregroundColor(theme, theme.PrimaryColor),\r\n composes: \"choice--selected\",\r\n },\r\n choiceActive: {\r\n background: ({ theme, selected }) =>\r\n selected\r\n ? darken(theme.PrimaryColor, theme.ActiveHighlightValue)\r\n : darken(theme.ControlBackground, theme.ActiveBackgroundValue),\r\n composes: \"choice--active\",\r\n color: ({ theme, selected }) => {\r\n return selected\r\n ? foregroundColor(theme, darken(theme.PrimaryColor, theme.ActiveHighlightValue))\r\n : foregroundColor(\r\n theme,\r\n darken(theme.ControlBackground, theme.ActiveBackgroundValue),\r\n );\r\n },\r\n },\r\n content: {\r\n alignItems: \"center\",\r\n bottom: 0,\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n left: 0,\r\n position: \"absolute\",\r\n right: 0,\r\n top: 0,\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport classnames from \"classnames\";\r\nimport { RendererProps } from \"../BaseRenderer\";\r\nimport { ChoiceModel } from \"../../../models/ChoiceModel\";\r\nimport useStyle from \"./NetPromoterItemRenderer.styles\";\r\nimport useTranslatable from \"../../../hooks/useTranslatable\";\r\nimport useDimensionContext from \"../../../hooks/useDimensionContext\";\r\n\r\ninterface Props extends RendererProps {\r\n choice?: ChoiceModel;\r\n selected?: boolean;\r\n onSelect?(choice: ChoiceModel): void;\r\n}\r\n\r\nexport default function NetPromoterItemRenderer(props: Props) {\r\n const { choice, selected, onSelect } = props;\r\n const theme = useTheme();\r\n const dimension = useDimensionContext();\r\n const classes = useStyle({ theme, selected, dimension });\r\n const label = useTranslatable(choice, \"Text\");\r\n const [active, setActive] = React.useState(false);\r\n const acceptedKeyCodes = [13, 32]; //Enter, Space\r\n\r\n return (\r\n <div\r\n role=\"radio\"\r\n aria-checked={selected}\r\n tabIndex={0}\r\n className={classnames(\r\n classes.choice,\r\n dimension && dimension.maxWidth(480) && classes.dynamicChoice,\r\n selected && classes.choiceSelected,\r\n active && classes.choiceActive,\r\n )}\r\n style={{}}\r\n onFocus={() => setActive(true)}\r\n onBlur={() => setActive(false)}\r\n onMouseOver={() => setActive(true)}\r\n onMouseOut={() => setActive(false)}\r\n onClick={() => onSelect(choice)}\r\n onKeyDown={(event) => {\r\n if (acceptedKeyCodes.includes(event.keyCode)) {\r\n onSelect(choice);\r\n event.preventDefault();\r\n }\r\n }}\r\n >\r\n <div className={classnames(classes.content, active && classes.choiceActive)}>\r\n <span>{label}</span>\r\n </div>\r\n </div>\r\n );\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\nimport { getSpacing } from \"../../../theme/Mixins\";\r\n\r\nexport default createUseStyles({\r\n choices: {\r\n alignItems: \"center\",\r\n composes: \"net-promoter__choices\",\r\n display: \"flex\",\r\n justifyContent: \"space-between\",\r\n margin: ({theme}) => [[getSpacing(theme, 0, theme.QuestionSpacing?.WithinComponents), -3]],\r\n },\r\n dynamicChoices: {\r\n flexDirection: \"column\",\r\n margin: 0,\r\n },\r\n labels: {\r\n composes: \"net-promoter__labels\",\r\n display: \"flex\",\r\n justifyContent: \"space-between\",\r\n margin: [[20, 0]],\r\n },\r\n dynamicLabels: {\r\n display: \"none\",\r\n },\r\n label: {\r\n composes: \"net-promoter__label\",\r\n },\r\n mobileLabel: {\r\n textAlign: \"center\",\r\n display: \"none\",\r\n },\r\n dynamicMobileLabel: {\r\n display: \"block\",\r\n },\r\n});\r\n","import { createUseStyles } from \"react-jss\";\r\n\r\nexport default createUseStyles({\r\n icon: {\r\n composes: \"validation-error__icon\",\r\n position: \"relative\",\r\n float: \"left\",\r\n fontSize: 30,\r\n color: ({ theme }) => theme.ErrorColor,\r\n marginRight: 14.5,\r\n },\r\n dynamicIcon: {\r\n left: -44,\r\n },\r\n validationError: {\r\n composes: \"validation-error\",\r\n position: \"relative\",\r\n fontWeight: 700,\r\n color: ({ theme }) => theme.ErrorColor,\r\n margin: [[14.5, 0]],\r\n },\r\n dynamicValidationError: {\r\n left: -41,\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport classnames from \"classnames\";\r\nimport { FontAwesomeIcon } from \"./FontAwesome\";\r\nimport { ValidationErrorModel } from \"../../models/ValidationErrorModel\";\r\nimport { translate } from \"../../models/utilities/translationUtilities\";\r\nimport { QuestionnaireModel } from \"../../models/QuestionnaireModel\";\r\nimport useStyles from \"./ValidationError.styles\";\r\nimport useDimensionContext from \"../../hooks/useDimensionContext\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport useRecall from \"../../hooks/useRecall\";\r\nimport { QuestionType } from \"../../models/enums/QuestionType\";\r\n\r\ninterface Props {\r\n error: ValidationErrorModel;\r\n question: QuestionModel;\r\n questionnaire: QuestionnaireModel;\r\n language: string;\r\n}\r\n\r\nfunction replaceArgs(text: string, args: { [name: string]: string }) {\r\n if (text == null || args == null) return text;\r\n return text.replace(/{(.*?)}/g, (x, g) => args[g]);\r\n}\r\n\r\nfunction getCustomErrorMessage(props: Props) {\r\n const { error, question, language } = props;\r\n const customErrorKey = \"CustomErrorMessage\";\r\n if (error.key === customErrorKey && error.message) {\r\n return error.message;\r\n }\r\n return (\r\n translate(question, customErrorKey, language) ||\r\n getSingleColumnCustomErrorMessage(question, customErrorKey, language)\r\n );\r\n}\r\n\r\nfunction getSingleColumnCustomErrorMessage(\r\n question: QuestionModel,\r\n customErrorKey: string,\r\n language: string,\r\n) {\r\n const isSingleColumnStarRatingQuestion =\r\n question.type === QuestionType.StarRatingGrid && question.columns?.length === 1;\r\n\r\n if (isSingleColumnStarRatingQuestion) {\r\n const [column] = question.columns;\r\n return translate(column, customErrorKey, language);\r\n }\r\n\r\n return \"\";\r\n}\r\n\r\nfunction getMessageText(props: Props) {\r\n const { error, question, questionnaire, language } = props;\r\n if (!error) return \"\";\r\n\r\n let text = getCustomErrorMessage(props);\r\n if (!text) {\r\n const key = error.key || \"InvalidAnswer\";\r\n text =\r\n error.message ||\r\n translate(question, key, language) ||\r\n translate(questionnaire, key, language) ||\r\n key;\r\n }\r\n return replaceArgs(text, error.args);\r\n}\r\n\r\nexport default function ValidationError(props: Props) {\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n const dimension = useDimensionContext();\r\n const messageText = useRecall(getMessageText(props));\r\n\r\n const { question, error } = props;\r\n const isDisplayWide = dimension && dimension.minWidth(778);\r\n\r\n if (error === undefined) {\r\n return null;\r\n }\r\n\r\n return (\r\n <>\r\n <FontAwesomeIcon\r\n icon=\"exclamation-circle\"\r\n className={classnames(classes.icon, isDisplayWide && classes.dynamicIcon)}\r\n />\r\n <div\r\n id={`${question.elementId}_ERROR`}\r\n className={classnames(\r\n classes.validationError,\r\n isDisplayWide && classes.dynamicValidationError,\r\n )}\r\n dangerouslySetInnerHTML={{ __html: messageText }}\r\n />\r\n </>\r\n );\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\nimport * as Mixins from \"../../../theme/Mixins\";\r\n\r\nexport default createUseStyles({\r\n fieldset: {\r\n minInlineSize: \"auto\",\r\n },\r\n question: {\r\n composes: \"question\",\r\n position: \"relative\",\r\n margin: ({ theme }) => [\r\n [\r\n Mixins.getSpacing(\r\n theme,\r\n theme.QuestionSpacing,\r\n theme.QuestionSpacing?.BetweenComponents,\r\n ),\r\n -29,\r\n ],\r\n ],\r\n padding: ({ theme }) => [\r\n [Mixins.getSpacing(theme, 0, theme.QuestionSpacing?.WithinComponents), 29],\r\n ],\r\n \"& img, video, iframe\": {\r\n maxWidth: \"100%\",\r\n },\r\n },\r\n questionLegend: {\r\n composes: \"question__legend\",\r\n\r\n /* Set width of <legend> encapsulating the question label to fix text-wrapping of long questions in IE11 */\r\n width: \"100%\",\r\n },\r\n questionName: {\r\n composes: \"question__name\",\r\n lineHeight: `inherit`,\r\n marginTop: ({ theme }) => Mixins.getSpacing(theme, 29, 0),\r\n marginBottom: ({ theme }) => Mixins.getSpacing(theme, 14.5, 0),\r\n },\r\n questionTitle: {\r\n composes: \"question__title\",\r\n },\r\n questionText: {\r\n composes: \"question__text\",\r\n display: \"block\",\r\n textAlign: ({ theme }) => Mixins.getTextAlign(theme.TextTextAlign),\r\n wordWrap: \"break-word\",\r\n marginBottom: ({ theme }) => Mixins.getSpacing(theme, \"0.5em\", 0),\r\n padding: ({ theme }) => [[Mixins.getSpacing(theme, 0, 8), 0]],\r\n },\r\n questionContent: {\r\n composes: \"question__content\",\r\n marginTop: ({ theme }) => Mixins.getSpacing(theme, 29, 0),\r\n },\r\n questionShortText: {\r\n composes: \"question__short-text\",\r\n },\r\n questionError: {\r\n composes: \"question--error\",\r\n },\r\n questionValidation: {\r\n alignItems: \"center\",\r\n composes: \"question__validation\",\r\n display: \"inline-flex\",\r\n },\r\n questionValidationFocus: {\r\n borderLeftColor: ({ theme }) => theme.ErrorColor,\r\n composes: \"question__validation-focus\",\r\n },\r\n dynamicQuestionValidationFocus: {\r\n borderLeftStyle: \"solid\",\r\n borderLeftWidth: 3,\r\n left: -30,\r\n paddingLeft: 30,\r\n position: \"relative\",\r\n width: \"100%\",\r\n },\r\n});\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreState } from \"../../models/states/StoreState\";\r\n\r\nexport function DebugInfo({ children }) {\r\n const showDebugInfo = useSelector((state: StoreState) => state.application.debugInfo);\r\n if (!showDebugInfo) return null;\r\n return children;\r\n}\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport classnames from \"classnames\";\r\nimport { kebabCase } from \"../../../utils/lodash\";\r\nimport { RendererProps } from \"../BaseRenderer\";\r\nimport { QuestionType, isGrid } from \"../../../models/enums/QuestionType\";\r\nimport ValidationError from \"../../shared/ValidationError\";\r\nimport { ValidationResultModel } from \"../../../models/ValidationResultModel\";\r\nimport { isNullOrEmpty } from \"../../../utils\";\r\nimport useStyles from \"./QuestionRenderer.styles\";\r\nimport { translate } from \"../../../models/utilities/translationUtilities\";\r\nimport useDimensionContext from \"../../../hooks/useDimensionContext\";\r\nimport ScrollableContainer from \"../../shared/ScrollableContainer\";\r\nimport { DebugInfo } from \"../../debug/DebugInfo\";\r\nimport useRecall from \"../../../hooks/useRecall\";\r\nimport { RecalledText } from \"../../../containers/shared/RecalledText\";\r\nimport { useElementDimensions } from \"../../../hooks/useElementDimensions\";\r\nimport { StoreState } from \"../../../models/states/StoreState\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { isFieldsetGroupingQuestion } from \"../../../utils/WCAGHelper\";\r\nimport { QuestionModel } from \"../../../models/QuestionModel\";\r\n\r\ninterface Props extends RendererProps {\r\n isHidden?: boolean;\r\n control: any;\r\n language: string;\r\n validationResult?: ValidationResultModel;\r\n isDesktopPreviewView: boolean;\r\n}\r\n\r\nconst getTitle = ({ question, language }) => translate(question, \"TITLE\", language);\r\nconst getText = ({ question, language }) => translate(question, \"TEXT\", language);\r\nconst getShortText = ({ question, language }) => translate(question, \"SHORT_TEXT\", language);\r\n\r\nfunction typeClass({ question }) {\r\n const classes = QuestionType[question.type];\r\n return `question--type-${kebabCase(classes)}`;\r\n}\r\n\r\nfunction ErrorMessageContainer({ question, questionnaire, language, validationResult }) {\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n const firstErrorVariable = Object.keys(validationResult.errorsByVariableName)[0];\r\n const variableErrors = validationResult.errorsByVariableName[firstErrorVariable];\r\n if (variableErrors) {\r\n const firstError = variableErrors[0];\r\n if (firstError) {\r\n return (\r\n <div className={classes.questionValidation}>\r\n <ValidationError\r\n question={question}\r\n key={firstError}\r\n questionnaire={questionnaire}\r\n language={language}\r\n error={firstError}\r\n />\r\n </div>\r\n );\r\n }\r\n }\r\n return <div className={classes.questionValidation} />;\r\n}\r\n\r\nfunction QuestionTitle({ question, title, classes }) {\r\n const recalledTitle = useRecall(title);\r\n return (\r\n <h2\r\n id={`${question.elementId}_TITLE`}\r\n className={classes.questionTitle}\r\n dangerouslySetInnerHTML={{ __html: recalledTitle }}\r\n />\r\n );\r\n}\r\n\r\nfunction RecalledQuestionLabel({ text }) {\r\n const {\r\n ref,\r\n dimensions: { innerHeight },\r\n } = useElementDimensions<HTMLDivElement>();\r\n const [minHeight, setMinHeight] = React.useState(0);\r\n\r\n React.useLayoutEffect(() => {\r\n if (innerHeight > minHeight) {\r\n setMinHeight(innerHeight);\r\n }\r\n }, [innerHeight, minHeight]);\r\n\r\n // RecalledText gets removed and added back from dom on iOS and that causes critical layout issues\r\n // Setting min height fixes this issue\r\n return (\r\n <div ref={ref} style={{ minHeight }}>\r\n <RecalledText text={text} />\r\n </div>\r\n );\r\n}\r\n\r\ninterface QuestionLabelProps {\r\n question: QuestionModel;\r\n text: any;\r\n shortText: any;\r\n classes: any;\r\n elementNameOrId?: string | null;\r\n}\r\n\r\nexport function QuestionLabel({\r\n question,\r\n text,\r\n shortText,\r\n classes,\r\n elementNameOrId,\r\n}: QuestionLabelProps) {\r\n const device = useSelector((state: StoreState) => state.interview.device);\r\n const isIOS = [\"ios\", \"mac_os_x\", \"mac_os\"].includes(device?.os?.toLowerCase());\r\n return (\r\n <div id={`${elementNameOrId ?? question.elementId}_LABEL`} className={classes.questionText}>\r\n {isIOS ? <RecalledQuestionLabel text={text} /> : <RecalledText text={text} />}\r\n {!isGrid(question.type) && !isNullOrEmpty(shortText) && (\r\n <>\r\n <br />\r\n <RecalledText\r\n text={shortText}\r\n render={(recalled) => (\r\n <p\r\n className={classes.questionShortText}\r\n dangerouslySetInnerHTML={{ __html: recalled }}\r\n />\r\n )}\r\n />\r\n </>\r\n )}\r\n </div>\r\n );\r\n}\r\n\r\nfunction QuestionContent({ isDesktopPreviewView, question, control, classes }) {\r\n let content = (\r\n <>\r\n {control}\r\n <div className=\"clear\" />\r\n </>\r\n );\r\n if (isGrid(question.type)) {\r\n content = <ScrollableContainer>{content}</ScrollableContainer>;\r\n }\r\n return <div className={classes.questionContent}>{content}</div>;\r\n}\r\n\r\nexport default function QuestionRenderer(props: Props) {\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n const dimension = useDimensionContext();\r\n const isDisplayWide = dimension && dimension.minWidth(778);\r\n\r\n const title = getTitle(props);\r\n const text = getText(props);\r\n const shortText = getShortText(props);\r\n\r\n const {\r\n questionnaire,\r\n question,\r\n language,\r\n isHidden,\r\n control,\r\n validationResult,\r\n isDesktopPreviewView,\r\n } = props;\r\n\r\n const isValid = !validationResult || validationResult.isValid;\r\n const isTitleVisible = !isNullOrEmpty(title);\r\n const useFieldsetGrouping = isFieldsetGroupingQuestion(question);\r\n const questionContent = (\r\n <QuestionContent\r\n isDesktopPreviewView={isDesktopPreviewView}\r\n question={question}\r\n control={control}\r\n classes={classes}\r\n />\r\n );\r\n const questionTitle = isTitleVisible && (\r\n <QuestionTitle question={question} title={title} classes={classes} />\r\n );\r\n const questionLabel = (\r\n <QuestionLabel\r\n question={question}\r\n text={text}\r\n shortText={shortText}\r\n classes={classes}\r\n elementNameOrId={null}\r\n />\r\n );\r\n\r\n // Question Title, Question Text, Short Text content to be displayed based on fieldset option\r\n const legendContent = useFieldsetGrouping ? (\r\n <legend className={classes.questionLegend}>\r\n {questionTitle}\r\n {questionLabel}\r\n </legend>\r\n ) : (\r\n <div className={classes.questionLegend}>\r\n {questionTitle}\r\n {questionLabel}\r\n </div>\r\n );\r\n\r\n return (\r\n <section\r\n id={question.elementId}\r\n className={classnames(\r\n classes.question,\r\n typeClass(props),\r\n !isValid && classes.questionError,\r\n )}\r\n style={{ display: isHidden ? \"none\" : undefined }}\r\n >\r\n <DebugInfo>{question.name}</DebugInfo>\r\n {!isValid && (\r\n <ErrorMessageContainer\r\n question={question}\r\n questionnaire={questionnaire}\r\n language={language}\r\n validationResult={validationResult}\r\n />\r\n )}\r\n <div\r\n className={classnames(\r\n !isValid && classes.questionValidationFocus,\r\n !isValid && isDisplayWide && classes.dynamicQuestionValidationFocus,\r\n )}\r\n >\r\n {useFieldsetGrouping ? (\r\n <fieldset className={classes.fieldset}>\r\n {legendContent}\r\n {questionContent}\r\n </fieldset>\r\n ) : (\r\n <div\r\n className=\"non-fieldset-grouping-question\"\r\n aria-invalid={!isValid}\r\n aria-describedby={isValid ? undefined : `${question.elementId}_ERROR`}\r\n >\r\n {legendContent}\r\n {questionContent}\r\n </div>\r\n )}\r\n </div>\r\n </section>\r\n );\r\n}\r\n","export enum NpsFeedbackQuestionSettings {\r\n HasFeedbackQuestion = \"HasFeedbackQuestion\",\r\n DefaultFeedbackQuestion = \"DefaultFeedbackQuestion\",\r\n FeedbackVariable = \"FeedbackVariable\",\r\n FeedbackAnswerRequired = \"FeedbackAnswerRequired\",\r\n PromotersFeedbackQuestion = \"PromotersFeedbackQuestion\",\r\n PromotersVariable = \"PromotersVariable\",\r\n PromotersAnswerRequired = \"PromotersAnswerRequired\",\r\n PassivesFeedbackQuestion = \"PassivesFeedbackQuestion\",\r\n PassivesVariable = \"PassivesVariable\",\r\n PassivesAnswerRequired = \"PassivesAnswerRequired\",\r\n DetractorsFeedbackQuestion = \"DetractorsFeedbackQuestion\",\r\n DetractorsVariable = \"DetractorsVariable\",\r\n DetractorsAnswerRequired = \"DetractorsAnswerRequired\",\r\n}\r\nexport enum NpsScoresBySegment {\r\n PromotersScore = 9,\r\n DetractorsScore = 6,\r\n}\r\n","import React from \"react\";\r\nimport { createUseStyles, useTheme } from \"react-jss\";\r\nimport classnames from \"classnames\";\r\nimport { RendererProps, getRendererProps } from \"../BaseRenderer\";\r\nimport { ChoiceModel } from \"../../../models/ChoiceModel\";\r\nimport { MentionModel } from \"../../../models/MentionModel\";\r\nimport NetPromoterItemRenderer from \"./NetPromoterItemRenderer\";\r\nimport useStyle from \"./NetPromoterRenderer.styles\";\r\nimport useQuestion from \"../../../hooks/useQuestion\";\r\nimport useDimensionContext from \"../../../hooks/useDimensionContext\";\r\nimport useTranslatable from \"../../../hooks/useTranslatable\";\r\nimport OpenEndRenderer from \"./OpenEndRenderer\";\r\nimport { QuestionLabel } from \"./QuestionRenderer\";\r\n\r\ninterface Props extends RendererProps {\r\n mentions: MentionModel[];\r\n choices: ChoiceModel[];\r\n onSelect(choice: ChoiceModel): void;\r\n showFeedbackQuestion?: boolean;\r\n feedbackQuestion?: string;\r\n feedbackVariable?: string;\r\n openEndValue?: string;\r\n onOpenEndChange?(event: any): void;\r\n onOpenEndBlur?(): void;\r\n}\r\n\r\nfunction isSelected(props: Props, choice: ChoiceModel) {\r\n return props.mentions.some((mention) => mention.value === choice.value);\r\n}\r\n\r\nexport default function NetPromoterRenderer(props: Props) {\r\n const theme = useTheme();\r\n const classes = useStyle({ theme });\r\n const {\r\n choices,\r\n gridRendering,\r\n variable,\r\n onSelect,\r\n showFeedbackQuestion,\r\n feedbackQuestion,\r\n feedbackVariable,\r\n openEndValue,\r\n onOpenEndChange,\r\n onOpenEndBlur,\r\n } = props;\r\n const question = useQuestion();\r\n const leftLabel = useTranslatable(question, \"LeftLabel\");\r\n const rightLabel = useTranslatable(question, \"RightLabel\");\r\n const displayQuestion = useTranslatable(question, feedbackQuestion);\r\n const dimension = useDimensionContext();\r\n const isMobileDimension = dimension && dimension.maxWidth(480);\r\n\r\n return (\r\n <div>\r\n {(leftLabel !== null || rightLabel !== null) && isMobileDimension && (\r\n <div\r\n className={classnames(\r\n classes.label,\r\n classes.mobileLabel,\r\n isMobileDimension && classes.dynamicMobileLabel,\r\n )}\r\n dangerouslySetInnerHTML={{ __html: leftLabel }}\r\n />\r\n )}\r\n <div\r\n className={classnames(classes.choices, isMobileDimension && classes.dynamicChoices)}\r\n >\r\n {choices.map((choice) => {\r\n const selected = isSelected(props, choice);\r\n return (\r\n <NetPromoterItemRenderer\r\n key={choice.elementId}\r\n {...getRendererProps(props)}\r\n gridRendering={gridRendering}\r\n selected={selected}\r\n choice={choice}\r\n variable={variable}\r\n onSelect={onSelect}\r\n />\r\n );\r\n })}\r\n </div>\r\n {(leftLabel !== null || rightLabel !== null) && (\r\n <>\r\n {!isMobileDimension && (\r\n <div\r\n className={classnames(\r\n classes.labels,\r\n isMobileDimension && classes.dynamicLabels,\r\n )}\r\n >\r\n <div\r\n className={classes.label}\r\n dangerouslySetInnerHTML={{ __html: leftLabel }}\r\n />\r\n <div\r\n className={classes.label}\r\n dangerouslySetInnerHTML={{ __html: rightLabel }}\r\n />\r\n </div>\r\n )}\r\n\r\n {isMobileDimension && (\r\n <div\r\n className={classnames(\r\n classes.label,\r\n classes.mobileLabel,\r\n isMobileDimension && classes.dynamicMobileLabel,\r\n )}\r\n dangerouslySetInnerHTML={{ __html: rightLabel }}\r\n />\r\n )}\r\n </>\r\n )}\r\n {showFeedbackQuestion && (\r\n <>\r\n <QuestionLabel\r\n question={question}\r\n text={displayQuestion}\r\n shortText={undefined}\r\n classes={createUseStyles(undefined, undefined)}\r\n elementNameOrId={feedbackVariable}\r\n />\r\n <OpenEndRenderer\r\n {...getRendererProps(props)}\r\n name={feedbackVariable}\r\n label={displayQuestion}\r\n value={openEndValue}\r\n isDisabled={false}\r\n onOpenEndBlur={onOpenEndBlur}\r\n onOpenEndChange={onOpenEndChange}\r\n />\r\n </>\r\n )}\r\n </div>\r\n );\r\n}\r\n","export enum VariableDataType {\r\n Text = 0,\r\n Numeric = 1,\r\n Image = 2,\r\n Date = 3,\r\n File = 4,\r\n Base64 = 5,\r\n}\r\n","import React from \"react\";\r\nimport { DispatchProp } from \"react-redux\";\r\nimport { BaseControl, ControlProps } from \"./BaseControl\";\r\nimport { getRendererProps } from \"../renderers/BaseRenderer\";\r\nimport { ChoiceModel } from \"../../models/ChoiceModel\";\r\nimport NetPromoterRenderer from \"../renderers/v2/NetPromoterRenderer\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\nimport { ValidationBuilder } from \"../../models/builders/ValidationBuilder\";\r\nimport {\r\n NpsFeedbackQuestionSettings,\r\n NpsScoresBySegment,\r\n} from \"../../models/enums/NpsFeedbackQuestionSettings\";\r\nimport {\r\n getSettingBoolean,\r\n getSettingString,\r\n hasSetting,\r\n} from \"../../models/utilities/settingUtilities\";\r\nimport { isNullOrEmpty } from \"../../utils\";\r\n\r\ninterface Props extends ControlProps, DispatchProp {}\r\ninterface State {\r\n feedbackQuestion: string;\r\n feedbackVariable: string;\r\n feedbackAnswerRequired: boolean;\r\n showFeedbackQuestion: boolean;\r\n openEndValue: string;\r\n oldFeedbackVariable: string;\r\n}\r\nexport class NetPromoterControl extends BaseControl<Props, State> {\r\n constructor(props: Props) {\r\n super(props);\r\n const { question } = this.props;\r\n this.state = {\r\n ...this.generateNpsFeedbackQuestionObject(\r\n NpsFeedbackQuestionSettings.DefaultFeedbackQuestion,\r\n getSettingString(question, NpsFeedbackQuestionSettings.FeedbackVariable.toString()),\r\n getSettingBoolean(\r\n question,\r\n NpsFeedbackQuestionSettings.FeedbackAnswerRequired.toString(),\r\n ),\r\n ),\r\n showFeedbackQuestion: false,\r\n openEndValue: \"\",\r\n oldFeedbackVariable: \"\",\r\n };\r\n }\r\n\r\n onSelect = (choice: ChoiceModel) => {\r\n const [variable] = this.props.sequencedVariables;\r\n this.setMentions(this.props, variable.name, (mentions) => mentions.set(choice.value));\r\n const { question } = this.props;\r\n this.setState({\r\n oldFeedbackVariable: this.state.feedbackVariable,\r\n });\r\n let npsFeedbackQuestion;\r\n if (\r\n hasSetting(question, NpsFeedbackQuestionSettings.HasFeedbackQuestion) &&\r\n getSettingBoolean(question, NpsFeedbackQuestionSettings.HasFeedbackQuestion)\r\n ) {\r\n if (\r\n hasSetting(question, NpsFeedbackQuestionSettings.FeedbackVariable.toString())\r\n ) {\r\n npsFeedbackQuestion = this.generateNpsFeedbackQuestionObject(\r\n NpsFeedbackQuestionSettings.DefaultFeedbackQuestion,\r\n getSettingString(question, NpsFeedbackQuestionSettings.FeedbackVariable),\r\n getSettingBoolean(question, NpsFeedbackQuestionSettings.FeedbackAnswerRequired),\r\n );\r\n }\r\n if (\r\n Number(choice.value) >= NpsScoresBySegment.PromotersScore &&\r\n hasSetting(\r\n question,\r\n NpsFeedbackQuestionSettings.PromotersVariable.toString(),\r\n )\r\n ) {\r\n npsFeedbackQuestion = this.generateNpsFeedbackQuestionObject(\r\n NpsFeedbackQuestionSettings.PromotersFeedbackQuestion,\r\n getSettingString(question, NpsFeedbackQuestionSettings.PromotersVariable),\r\n getSettingBoolean(\r\n question,\r\n NpsFeedbackQuestionSettings.PromotersAnswerRequired,\r\n ),\r\n );\r\n }\r\n if (\r\n Number(choice.value) < NpsScoresBySegment.PromotersScore &&\r\n Number(choice.value) > NpsScoresBySegment.DetractorsScore &&\r\n hasSetting(\r\n question,\r\n NpsFeedbackQuestionSettings.PassivesVariable.toString(),\r\n )\r\n ) {\r\n npsFeedbackQuestion = this.generateNpsFeedbackQuestionObject(\r\n NpsFeedbackQuestionSettings.PassivesFeedbackQuestion,\r\n getSettingString(question, NpsFeedbackQuestionSettings.PassivesVariable),\r\n getSettingBoolean(question, NpsFeedbackQuestionSettings.PassivesAnswerRequired),\r\n );\r\n }\r\n if (\r\n Number(choice.value) <= NpsScoresBySegment.DetractorsScore &&\r\n hasSetting(\r\n question,\r\n NpsFeedbackQuestionSettings.DetractorsVariable.toString(),\r\n )\r\n ) {\r\n npsFeedbackQuestion = this.generateNpsFeedbackQuestionObject(\r\n NpsFeedbackQuestionSettings.DetractorsFeedbackQuestion,\r\n getSettingString(question, NpsFeedbackQuestionSettings.DetractorsVariable),\r\n getSettingBoolean(\r\n question,\r\n NpsFeedbackQuestionSettings.DetractorsAnswerRequired,\r\n ),\r\n );\r\n }\r\n this.setState({\r\n ...npsFeedbackQuestion,\r\n showFeedbackQuestion: true,\r\n });\r\n this.renderQuestion();\r\n }\r\n };\r\n\r\n onOpenEndChange = (event: any) => {\r\n const { value } = event.target;\r\n this.setState({\r\n openEndValue: value,\r\n });\r\n };\r\n\r\n onOpenEndBlur = (): void => {\r\n const openEndName = this.state.feedbackVariable;\r\n const openEnd = this.state.openEndValue;\r\n const openEndAnswerCode = \"0\";\r\n if (this.state.oldFeedbackVariable !== undefined) {\r\n this.setMentions(this.props, this.state.oldFeedbackVariable, (mentions) =>\r\n mentions.clear(),\r\n );\r\n }\r\n this.setMentions(this.props, openEndName, (mentions) => mentions.clear());\r\n if (!isNullOrEmpty(openEnd)) {\r\n this.setMentions(this.props, openEndName, (mentions) =>\r\n mentions.set(openEndAnswerCode, openEnd.trim()),\r\n );\r\n }\r\n };\r\n\r\n generateNpsFeedbackQuestionObject(\r\n feedbackQuestion: string,\r\n feedbackVariable: string,\r\n feedbackAnswerRequired: boolean,\r\n ) {\r\n return {\r\n feedbackQuestion,\r\n feedbackVariable,\r\n feedbackAnswerRequired,\r\n };\r\n }\r\n\r\n getChoiceList = () => {\r\n const { question } = this.props;\r\n if (question.variables.length > 0) {\r\n return question.variables.filter((variable) => variable.choiceList.length > 0)[0]\r\n .choiceList;\r\n }\r\n\r\n return null;\r\n };\r\n\r\n validate(): ValidationResultModel {\r\n if (this.state.feedbackAnswerRequired && isNullOrEmpty(this.state.openEndValue)) {\r\n return new ValidationBuilder()\r\n .fail(this.state.feedbackVariable, \"IncompleteAnswer\", {\r\n openEnd: this.state.feedbackVariable,\r\n })\r\n .build();\r\n }\r\n return new ValidationBuilder().build();\r\n }\r\n\r\n renderQuestion() {\r\n return (\r\n <NetPromoterRenderer\r\n choices={this.getChoiceList()}\r\n mentions={this.getMentions(this.props, this.props.sequencedVariables[0].name)}\r\n onSelect={this.onSelect}\r\n {...getRendererProps(this.props)}\r\n showFeedbackQuestion={this.state.showFeedbackQuestion}\r\n feedbackQuestion={this.state.feedbackQuestion}\r\n feedbackVariable={this.state.feedbackVariable}\r\n openEndValue={this.state.openEndValue}\r\n onOpenEndChange={this.onOpenEndChange}\r\n onOpenEndBlur={this.onOpenEndBlur}\r\n />\r\n );\r\n }\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\nimport { alpha } from \"../../theme/Mixins\";\r\n\r\nconst cornerSize = 5;\r\nconst cornerWidth = 2;\r\nconst borderRadiuses = {\r\n squared: 0,\r\n soft: 15,\r\n rounded: 50,\r\n};\r\n\r\nconst makeCornerStyle = () => ({\r\n position: \"absolute\",\r\n pointerEvents: \"none\",\r\n width: `${cornerSize}%`,\r\n margin: ({ theme }) =>\r\n Math.min(theme.BorderRadius, borderRadiuses.rounded) >= borderRadiuses.rounded ? 20 : 12,\r\n height: ({ ratio }) => `${cornerSize * ratio}%`,\r\n});\r\n\r\nexport default createUseStyles({\r\n container: {\r\n display: \"inline-block\",\r\n background: ({ theme }) => alpha(theme.InputBackground, theme.ControlAlpha),\r\n borderRadius: ({ theme }) => Math.min(theme.BorderRadius, 50),\r\n border: ({ theme }) => [[theme.BorderWidth, \"solid\", theme.ControlBorderColor]],\r\n },\r\n signatureArea: {\r\n position: \"relative\",\r\n },\r\n canvas: {\r\n cursor: \"crosshair\",\r\n },\r\n image: {\r\n width: ({ signatureWidth }) => `${signatureWidth}px`,\r\n height: ({ signatureWidth, ratio }) => `${signatureWidth / ratio}px`,\r\n cursor: \"not-allowed\",\r\n },\r\n undoButton: {\r\n position: \"absolute\",\r\n top: \"20%\",\r\n left: \"10%\",\r\n marginBottom: ({ signatureWidth }) => `${signatureWidth * 0.03}px`,\r\n cursor: \"pointer\",\r\n },\r\n clearButton: {\r\n position: \"absolute\",\r\n top: \"20%\",\r\n right: \"10%\",\r\n marginBottom: ({ signatureWidth }) => `${signatureWidth * 0.03}px`,\r\n cursor: \"pointer\",\r\n },\r\n signatureLine: {\r\n position: \"absolute\",\r\n bottom: \"20%\",\r\n left: \"10%\",\r\n right: \"10%\",\r\n pointerEvents: \"none\",\r\n fontSize: ({ signatureWidth }) => signatureWidth * 0.04,\r\n lineHeight: ({ signatureWidth }) => `${signatureWidth * 0.1}px`,\r\n borderBottom: \"2px solid #999\",\r\n },\r\n topLeftCorner: {\r\n ...makeCornerStyle(),\r\n top: 0,\r\n left: 0,\r\n borderTop: ({ theme }) => `${cornerWidth}px solid ${theme.ControlBorderColor}`,\r\n borderLeft: ({ theme }) => `${cornerWidth}px solid ${theme.ControlBorderColor}`,\r\n },\r\n topRightCorner: {\r\n ...makeCornerStyle(),\r\n top: 0,\r\n right: 0,\r\n borderTop: ({ theme }) => `${cornerWidth}px solid ${theme.ControlBorderColor}`,\r\n borderRight: ({ theme }) => `${cornerWidth}px solid ${theme.ControlBorderColor}`,\r\n },\r\n bottomLeftCorner: {\r\n ...makeCornerStyle(),\r\n bottom: 0,\r\n left: 0,\r\n borderBottom: ({ theme }) => `${cornerWidth}px solid ${theme.ControlBorderColor}`,\r\n borderLeft: ({ theme }) => `${cornerWidth}px solid ${theme.ControlBorderColor}`,\r\n },\r\n bottomRightCorner: {\r\n ...makeCornerStyle(),\r\n bottom: 0,\r\n right: 0,\r\n borderBottom: ({ theme }) => `${cornerWidth}px solid ${theme.ControlBorderColor}`,\r\n borderRight: ({ theme }) => `${cornerWidth}px solid ${theme.ControlBorderColor}`,\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { DispatchProp } from \"react-redux\";\r\nimport SignaturePad, { IPointGroup } from \"signature_pad\";\r\nimport { useTheme } from \"react-jss\";\r\nimport { ControlProps } from \"./BaseControl\";\r\nimport useDimensionContext from \"../../hooks/useDimensionContext\";\r\nimport { getSettingString, getSettingBoolean } from \"../../models/utilities/settingUtilities\";\r\nimport useStyles from \"./SignatureControl.styles\";\r\nimport { FontAwesomeIcon } from \"../shared/FontAwesome\";\r\nimport Button from \"../shared/Button\";\r\nimport { ButtonChoice } from \"../shared/ButtonChoice\";\r\nimport useTranslatable from \"../../hooks/useTranslatable\";\r\nimport { useMentions } from \"../../hooks/useMentions\";\r\nimport { useValidation, useAnswerRequiredValidator } from \"../../hooks/useValidation\";\r\nimport { VariableDataType } from \"../../models/enums/VariableDataType\";\r\n\r\ninterface Props extends ControlProps, DispatchProp {}\r\n\r\ntype SizeType = \"Small\" | \"Medium\" | \"Large\" | \"Full\";\r\n\r\nfunction resizeData(data: IPointGroup[], scale: number): IPointGroup[] {\r\n return data.map((pointGroup) => ({\r\n ...pointGroup,\r\n points: pointGroup.points.map((point) => ({\r\n ...point,\r\n x: point.x * scale,\r\n y: point.y * scale,\r\n })),\r\n }));\r\n}\r\n\r\nfunction maxSize(size: SizeType) {\r\n switch (size) {\r\n case \"Small\":\r\n return 300;\r\n case \"Medium\":\r\n return 500;\r\n case \"Full\":\r\n return 1000;\r\n default:\r\n return 800;\r\n }\r\n}\r\n\r\nfunction onChoiceKeyDown(event, onToggleNoAnswer) {\r\n if (event.target !== event.currentTarget) {\r\n return;\r\n }\r\n if (event.key === \" \") {\r\n onToggleNoAnswer();\r\n event.preventDefault();\r\n }\r\n}\r\n\r\nexport function SignatureControl(props: Props) {\r\n const { question, validateSignal } = props;\r\n\r\n const displayNoAnswer = getSettingBoolean(question, \"DisplayNoAnswer\");\r\n const noAnswerValue = getSettingString(question, \"NoAnswerValue\");\r\n const noAnswerLabel = useTranslatable(question, \"NoAnswerLabel\");\r\n\r\n const variable = question.variables[0];\r\n const canvasRef = React.useRef<HTMLCanvasElement>();\r\n const signatureRef = React.useRef<SignaturePad>();\r\n const { innerWidth } = useDimensionContext();\r\n const [mentions, setMentions] = useMentions(variable.name);\r\n const mentionValue = mentions[0] && mentions[0].value;\r\n const [hasLines, setHasLines] = React.useState(false);\r\n const [initialValue, setInitialValue] = React.useState(\r\n mentionValue !== noAnswerValue ? mentionValue : undefined,\r\n );\r\n\r\n const theme = useTheme();\r\n const ratio = 21 / 9;\r\n const signatureWidth = Math.min(\r\n innerWidth - 2,\r\n maxSize(getSettingString(question, \"Size\") as SizeType),\r\n );\r\n const classes = useStyles({ theme, signatureWidth, ratio });\r\n\r\n useValidation(validateSignal, useAnswerRequiredValidator(question, variable));\r\n\r\n const isSvg = variable.dataType === VariableDataType.Base64;\r\n\r\n React.useEffect(() => {\r\n if (initialValue) {\r\n return undefined;\r\n }\r\n let data;\r\n if (signatureRef.current) {\r\n data = signatureRef.current.toData();\r\n }\r\n const canvas = canvasRef.current;\r\n const prevCanvasWidth = canvas.width;\r\n canvas.width = signatureWidth;\r\n canvas.height = canvas.width / ratio;\r\n signatureRef.current = new SignaturePad(canvas, {\r\n penColor: getSettingString(question, \"PenColor\", \"#000000\"),\r\n minWidth: signatureWidth * 0.002,\r\n maxWidth: signatureWidth * 0.006,\r\n minDistance: signatureWidth * 0.006,\r\n onEnd: () => {\r\n setHasLines(true);\r\n setMentions((b) =>\r\n b.set(signatureRef.current.toDataURL(isSvg ? \"image/svg+xml\" : null)),\r\n );\r\n },\r\n });\r\n if (data) {\r\n data = resizeData(data, canvas.width / prevCanvasWidth);\r\n signatureRef.current.fromData(data);\r\n }\r\n\r\n return () => {\r\n signatureRef.current.off();\r\n };\r\n }, [initialValue, innerWidth, isSvg, question, ratio, setMentions, signatureWidth]);\r\n\r\n const onToggleNoAnswer = React.useCallback(() => {\r\n signatureRef.current.clear();\r\n if (mentionValue === noAnswerValue) {\r\n setMentions((b) => b.clear());\r\n } else {\r\n setMentions((b) => b.set(noAnswerValue));\r\n }\r\n setHasLines(false);\r\n }, [mentionValue, noAnswerValue, setMentions]);\r\n\r\n return (\r\n <>\r\n <div className={classes.container}>\r\n <div className={classes.signatureArea}>\r\n <div className={classes.topLeftCorner} />\r\n <div className={classes.topRightCorner} />\r\n <div className={classes.bottomLeftCorner} />\r\n <div className={classes.bottomRightCorner} />\r\n {hasLines && (\r\n <div className={classes.undoButton}>\r\n <Button\r\n icon={[\"fas\", \"undo\"]}\r\n text=\"Undo\"\r\n displayText={false}\r\n size={signatureWidth * 0.03}\r\n onClick={() => {\r\n if (signatureRef.current) {\r\n const data = signatureRef.current.toData();\r\n signatureRef.current.clear();\r\n signatureRef.current.fromData(data.slice(0, -1));\r\n if (data.length > 1) {\r\n setMentions((b) =>\r\n b.set(\r\n signatureRef.current.toDataURL(\r\n isSvg ? \"image/svg+xml\" : null,\r\n ),\r\n ),\r\n );\r\n } else {\r\n setMentions((m) => m.clear());\r\n setHasLines(false);\r\n }\r\n }\r\n }}\r\n />\r\n </div>\r\n )}\r\n <div className={classes.clearButton}>\r\n <Button\r\n icon={[\"fas\", \"times\"]}\r\n text=\"Clear\"\r\n displayText={false}\r\n size={signatureWidth * 0.03}\r\n onClick={() => {\r\n setMentions((b) => b.clear());\r\n setInitialValue(undefined);\r\n setHasLines(false);\r\n if (signatureRef.current) {\r\n signatureRef.current.clear();\r\n }\r\n }}\r\n />\r\n </div>\r\n <div className={classes.signatureLine}>\r\n <FontAwesomeIcon icon=\"signature\" fixedWidth />\r\n </div>\r\n {!initialValue && <canvas className={classes.canvas} ref={canvasRef} />}\r\n {initialValue && <img className={classes.image} src={initialValue} alt=\"\" />}\r\n </div>\r\n </div>\r\n {displayNoAnswer && (\r\n <ButtonChoice\r\n type=\"checkbox\"\r\n onKeyDown={(event) => onChoiceKeyDown(event, onToggleNoAnswer)}\r\n onSelect={onToggleNoAnswer}\r\n selected={mentionValue === noAnswerValue}\r\n label={noAnswerLabel}\r\n />\r\n )}\r\n </>\r\n );\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\nimport { foregroundColor, darken, alpha, getSpacing } from \"../../theme/Mixins\";\r\n\r\nexport default createUseStyles({\r\n container: {\r\n composes: \"drag-drop\",\r\n position: \"relative\",\r\n userSelect: \"none\",\r\n margin: \"auto\",\r\n maxWidth: 600,\r\n marginTop: ({ theme }) => getSpacing(theme, 0, theme.QuestionSpacing?.WithinComponents),\r\n },\r\n bucket: {\r\n composes: \"drag-drop__list\",\r\n border: \"1px solid #999\",\r\n position: \"absolute\",\r\n borderRadius: ({ theme }) => Math.min(theme.BorderRadius, 50),\r\n },\r\n bucketOrigin: {\r\n composes: \"drag-drop__list--origin\",\r\n border: ({ theme }) => [\r\n [Math.max(theme.BorderWidth, 1), \"solid\", theme.ControlBorderColor],\r\n ],\r\n },\r\n bucketOriginNoDrag: {\r\n composes: \"drag-drop__list--origin--no-drag\",\r\n cursor: \"not-allowed\",\r\n },\r\n bucketDestination: {\r\n composes: \"drag-drop__list--destination\",\r\n background: ({ theme }) =>\r\n `${alpha(theme.ControlBackground, theme.ControlAlpha)} 0% 0% no-repeat padding-box`,\r\n border: ({ theme }) => [[theme.BorderWidth, \"solid\", theme.ControlBorderColor]],\r\n },\r\n card: {\r\n composes: \"drag-drop__choice\",\r\n backgroundColor: ({ theme }) => theme.SecondaryColor,\r\n border: ({ theme }) => [\r\n [\r\n Math.max(theme.BorderWidth, 1),\r\n \"solid\",\r\n darken(theme.SecondaryColor, theme.BorderValue),\r\n ],\r\n ],\r\n borderRadius: ({ theme }) => theme.BorderRadius,\r\n color: ({ theme }) => foregroundColor(theme, theme.SecondaryColor),\r\n position: \"absolute\",\r\n padding: 8,\r\n textAlign: \"center\",\r\n fontWeight: \"bolder\",\r\n boxSizing: \"border-box\",\r\n backgroundSize: \"cover\",\r\n backgroundPosition: \"center\",\r\n cursor: \"grab\",\r\n\r\n \"&:active\": {\r\n cursor: \"grabbing\",\r\n },\r\n },\r\n cardNoDrag: {\r\n composes: \"drag-drop__choice--no-drag\",\r\n pointerEvents: \"none\",\r\n cursor: \"not-allowed\",\r\n backgroundColor: ({ theme }) => darken(theme.SecondaryColor),\r\n border: ({ theme }) => [\r\n [\r\n Math.max(theme.BorderWidth, 1),\r\n \"solid\",\r\n darken(theme.SecondaryColor, theme.BorderValue),\r\n ],\r\n ],\r\n borderRadius: ({ theme }) => theme.BorderRadius,\r\n color: ({ theme }) => foregroundColor(theme, theme.SecondaryColor),\r\n position: \"absolute\",\r\n padding: 8,\r\n textAlign: \"center\",\r\n fontWeight: \"bolder\",\r\n boxSizing: \"border-box\",\r\n backgroundSize: \"cover\",\r\n backgroundPosition: \"center\",\r\n\r\n \"&:active\": {\r\n cursor: \"grabbing\",\r\n },\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { useDrag } from \"react-use-gesture\";\r\nimport { useTheme } from \"react-jss\";\r\nimport classnames from \"classnames\";\r\nimport { useSpring, animated, interpolate } from \"react-spring\";\r\nimport useStyles from \"./DragDropControl.styles\";\r\nimport { useElementDimensions } from \"../../hooks/useElementDimensions\";\r\nimport { ControlProps } from \"./BaseControl\";\r\nimport { useMentionValues } from \"../../hooks/useMentions\";\r\nimport useRecall from \"../../hooks/useRecall\";\r\nimport { ChoiceModel } from \"../../models/ChoiceModel\";\r\nimport { translate } from \"../../models/utilities/translationUtilities\";\r\nimport { useLanguage } from \"../../hooks/useLanguage\";\r\nimport { useValidation, useDiscreteAnswerValidator } from \"../../hooks/useValidation\";\r\nimport { usePrevious } from \"../../hooks/usePrevious\";\r\nimport { isIE } from \"../../../src/utils\";\r\n\r\nconst BUCKET_DIVIDER_SIZE = 16;\r\nconst MIN_CARD_HEIGHT = 47;\r\nconst CARD_SPACING = 15;\r\nconst BOUNDS_MARGIN = 90;\r\n\r\nconst ORIGIN = 0;\r\nconst DESTINATION = 1;\r\n\r\nconst insert = (l, i, x) => [...l.slice(0, x), i, ...l.slice(x)];\r\n\r\ninterface CardProps {\r\n id?: string;\r\n text: string;\r\n imageUrl: string;\r\n width: number;\r\n height: number;\r\n top: number;\r\n left: number;\r\n bounds: { top: number; bottom: number; left: number; right: number };\r\n onDrag(xy: number[]);\r\n onDrop(xy: number[]);\r\n setCardRef(id: string, ref: any): void;\r\n isDragAllowed: boolean;\r\n}\r\n\r\nconst makeCardSpring = ({\r\n gestureState: {\r\n down,\r\n movement: [x, y],\r\n },\r\n left,\r\n top,\r\n immediate,\r\n}: any) => ({\r\n x: down ? x : left,\r\n y: down ? y : top,\r\n z: down ? 10 : 0,\r\n immediate: (name) => (immediate || down) && [\"x\", \"y\"].includes(name),\r\n config: { mass: 1, tension: 170, friction: 25 },\r\n});\r\n\r\nfunction DragDropCard({\r\n id,\r\n text,\r\n imageUrl,\r\n width,\r\n height,\r\n top,\r\n left,\r\n onDrag,\r\n onDrop,\r\n bounds,\r\n setCardRef,\r\n isDragAllowed,\r\n}: CardProps) {\r\n const recalledImage = useRecall(imageUrl);\r\n const recalledText = useRecall(text);\r\n const prevBounds = usePrevious(bounds);\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n const drag = React.useRef<any>({ down: false, movement: [0, 0] });\r\n\r\n const [spring, set] = useSpring(() =>\r\n makeCardSpring({ gestureState: drag.current, left, top }),\r\n );\r\n\r\n const boundsChanged = prevBounds !== bounds;\r\n const isLegacyBrowser = isIE();\r\n\r\n React.useLayoutEffect(() => {\r\n set(makeCardSpring({ gestureState: drag.current, left, top, immediate: boundsChanged }));\r\n }, [left, top, set, boundsChanged]);\r\n\r\n const bind = useDrag(\r\n (state) => {\r\n drag.current = state;\r\n set(makeCardSpring({ gestureState: state, left, top }));\r\n const { movement, down } = state;\r\n if (down && onDrag) onDrag(movement);\r\n if (!down && onDrop) onDrop(movement);\r\n },\r\n {\r\n initial: () => [spring.x.getValue(), spring.y.getValue()],\r\n filterTaps: true,\r\n bounds: {\r\n ...bounds,\r\n right: bounds.right - width,\r\n bottom: bounds.bottom - height,\r\n },\r\n },\r\n );\r\n\r\n return (\r\n <animated.div\r\n id={id}\r\n ref={(ref) => setCardRef(id, ref)}\r\n style={{\r\n left: CARD_SPACING,\r\n top: CARD_SPACING * 2,\r\n width: width - CARD_SPACING * 2,\r\n minHeight: height,\r\n transform: interpolate(\r\n [spring.x, spring.y, spring.z],\r\n (x, y, z) => `translate(${x}px, ${y}px) scale(${z * 0.01 + 1})`,\r\n ),\r\n boxShadow: spring.z.interpolate((z) => `0 ${z * 0.3}px ${z + 3}px rgba(0,0,0,0.2)`),\r\n zIndex: spring.z.interpolate((z) => Math.max(1, 1 + Math.round(z))),\r\n backgroundImage: recalledImage && `url('${recalledImage}')`,\r\n cursor: isLegacyBrowser && \"pointer\",\r\n }}\r\n {...bind()}\r\n className={classnames(classes.card, isDragAllowed && classes.cardNoDrag)}\r\n dangerouslySetInnerHTML={recalledImage ? undefined : { __html: recalledText }}\r\n aria-label={recalledText}\r\n />\r\n );\r\n}\r\n\r\ninterface BucketProps {\r\n origin?: boolean;\r\n destination?: boolean;\r\n width: number;\r\n height: number;\r\n left: number;\r\n top: number;\r\n isCursorNoDrag?: boolean;\r\n}\r\n\r\nexport function DragDropBucket({\r\n origin,\r\n destination,\r\n width,\r\n height,\r\n left,\r\n top,\r\n isCursorNoDrag,\r\n}: BucketProps) {\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n\r\n return (\r\n <div\r\n className={classnames(\r\n classes.bucket,\r\n origin && classes.bucketOrigin,\r\n isCursorNoDrag && classes.bucketOriginNoDrag,\r\n destination && classes.bucketDestination,\r\n )}\r\n style={{ width, height, left, top }}\r\n />\r\n );\r\n}\r\n\r\nexport function DragDropControl(props: ControlProps) {\r\n const { question, sequencedVariables, showSoftPrompt, validateSignal, max } = props;\r\n const variable = sequencedVariables[0];\r\n const [mentions, setMentions] = useMentionValues(variable.name);\r\n const [dragging, setDragging] = React.useState<ChoiceModel>();\r\n const [dropBucket, setDropBucket] = React.useState(0);\r\n const [dropIndex, setDropIndex] = React.useState(0);\r\n const [language] = useLanguage();\r\n const theme = useTheme();\r\n const [imageRatioByCard, setImageRatioByCard] = React.useState<{ [name: string]: number }>({});\r\n const classes = useStyles({ theme });\r\n const {\r\n ref: containerRef,\r\n dimensions: { innerWidth },\r\n calcDimensions,\r\n } = useElementDimensions<HTMLDivElement>();\r\n const [cardsRefs, setCardsRefs] = React.useState<{ [key: string]: any }>({});\r\n React.useLayoutEffect(calcDimensions, [cardsRefs]);\r\n\r\n const bucketWidth = innerWidth / 2 - BUCKET_DIVIDER_SIZE;\r\n\r\n const getCardHeight = (choice: ChoiceModel) =>\r\n Math.max(\r\n bucketWidth / imageRatioByCard[choice.name] || 0,\r\n MIN_CARD_HEIGHT,\r\n getCardRefHeight(choice),\r\n );\r\n\r\n const getCardRefHeight = ({ elementId }) => {\r\n const ref = cardsRefs[elementId];\r\n return ref ? ref.clientHeight : 0;\r\n };\r\n\r\n let [originChoices, destinationChoices] = [\r\n variable.choiceList\r\n .filter(({ value }) => !mentions.includes(value))\r\n .filter((choice) => choice !== dragging),\r\n mentions\r\n .map((value) => variable.choiceList.find((c) => c.value === value))\r\n .filter(Boolean)\r\n .filter((choice) => choice !== dragging),\r\n ];\r\n\r\n const onChoiceDrag = (choice: ChoiceModel) => ([x, y]: number[]) => {\r\n setDragging(choice);\r\n const cx = x + bucketWidth / 2;\r\n const bucket = cx < innerWidth / 2 ? ORIGIN : DESTINATION;\r\n const choices = bucket === ORIGIN ? originChoices : destinationChoices;\r\n setDropBucket(bucket);\r\n setDropIndex(getDropIndex(choices, y));\r\n };\r\n\r\n if (dragging && dropBucket === ORIGIN) {\r\n originChoices = insert(originChoices, dragging, dropIndex);\r\n }\r\n\r\n if (dragging && dropBucket === DESTINATION) {\r\n destinationChoices = insert(destinationChoices, dragging, dropIndex);\r\n }\r\n\r\n const originBucketHeight =\r\n variable.choiceList\r\n .map((choice) => getCardHeight(choice) + CARD_SPACING)\r\n .reduce((a, b) => a + b) +\r\n CARD_SPACING * 3;\r\n\r\n let dynamicArrayOfChoices: ChoiceModel[] = [];\r\n\r\n if (destinationChoices.length < Number(max) || max === undefined || Number(max) === 0) {\r\n dynamicArrayOfChoices = variable.choiceList;\r\n } else {\r\n dynamicArrayOfChoices = destinationChoices;\r\n }\r\n\r\n const destinationBucketHeight =\r\n dynamicArrayOfChoices\r\n .map((choice, index) => {\r\n return Number(max) > index ? getCardHeight(choice) + CARD_SPACING : 0;\r\n })\r\n .reduce((a, b) => a + b) +\r\n CARD_SPACING * 3;\r\n\r\n const isChoiceSelected = ({ value }) => mentions && mentions.includes(value);\r\n\r\n const getCardTop = (list, choice) =>\r\n list\r\n .slice(0, list.indexOf(choice))\r\n .map((c) => getCardHeight(c) + CARD_SPACING)\r\n .reduce((sum, x) => sum + x, 0);\r\n\r\n const getDropIndex = (list, y) => {\r\n const fl = list.filter((c) => c !== dragging);\r\n return fl.filter((c) => y > getCardTop(fl, c) + getCardHeight(c) / 2).length;\r\n };\r\n\r\n const borderWidth = 1;\r\n const destinationLeft = bucketWidth + BUCKET_DIVIDER_SIZE * 2 - borderWidth * 2;\r\n const bounds = React.useMemo(\r\n () => ({\r\n top: -BOUNDS_MARGIN,\r\n bottom: originBucketHeight + BOUNDS_MARGIN,\r\n left: -BOUNDS_MARGIN,\r\n right: innerWidth + BOUNDS_MARGIN,\r\n }),\r\n [innerWidth, originBucketHeight],\r\n );\r\n\r\n useValidation(validateSignal, useDiscreteAnswerValidator(question, variable, showSoftPrompt));\r\n\r\n React.useEffect(\r\n () =>\r\n variable.choiceList.forEach((card) => {\r\n const imageUrl = translate(card, \"imageurl\", language);\r\n if (imageUrl) {\r\n const { name } = card;\r\n const img = new Image();\r\n img.addEventListener(\"load\", () => {\r\n const ratio = img.naturalWidth / img.naturalHeight;\r\n setImageRatioByCard((state) => ({ ...state, [name]: ratio }));\r\n });\r\n img.src = imageUrl;\r\n }\r\n }),\r\n [variable.choiceList, language],\r\n );\r\n\r\n const onChoiceDrop = (choice: ChoiceModel) => () => {\r\n const { value } = choice;\r\n if (dropBucket === DESTINATION) {\r\n setMentions((b) => b.removeValue(value).insert(dropIndex, value));\r\n } else {\r\n setMentions((b) => b.removeValue(value));\r\n }\r\n setDragging(undefined);\r\n };\r\n\r\n const setCardRef = (id: string, ref: any) => {\r\n if (!cardsRefs[id] && ref) setCardsRefs((refs) => ({ ...refs, [id]: ref }));\r\n };\r\n\r\n const maxAnswers = Number.parseInt(max, 10);\r\n\r\n return (\r\n <div\r\n className={classes.container}\r\n ref={containerRef}\r\n style={{ height: originBucketHeight }}\r\n >\r\n <DragDropBucket\r\n origin\r\n width={bucketWidth}\r\n height={originBucketHeight}\r\n left={0}\r\n top={0}\r\n isCursorNoDrag={destinationChoices?.length >= maxAnswers}\r\n />\r\n <DragDropBucket\r\n destination\r\n width={bucketWidth}\r\n height={max === undefined ? originBucketHeight : destinationBucketHeight}\r\n left={destinationLeft}\r\n top={0}\r\n />\r\n\r\n {variable.choiceList.map((choice) => (\r\n <DragDropCard\r\n isDragAllowed={\r\n originChoices.includes(choice) && destinationChoices?.length >= maxAnswers\r\n }\r\n id={choice.elementId}\r\n key={choice.name}\r\n text={translate(choice, \"text\", language)}\r\n imageUrl={translate(choice, \"imageurl\", language)}\r\n width={bucketWidth}\r\n left={isChoiceSelected(choice) ? destinationLeft : 0}\r\n height={getCardHeight(choice)}\r\n top={getCardTop(\r\n isChoiceSelected(choice) ? destinationChoices : originChoices,\r\n choice,\r\n )}\r\n bounds={bounds}\r\n onDrag={onChoiceDrag(choice)}\r\n onDrop={onChoiceDrop(choice)}\r\n setCardRef={setCardRef}\r\n />\r\n ))}\r\n </div>\r\n );\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\n\r\nexport default createUseStyles({\r\n selectedWord: {\r\n composes: \"selected-word\",\r\n \"background-color\": \"#2366DB\",\r\n color: \"#FFFFFF\",\r\n },\r\n selectedCategory0: ({ category0Color }) => ({\r\n composes: \"selected-category-0\",\r\n \"background-color\": category0Color,\r\n }),\r\n selectedCategory1: ({ category1Color }) => ({\r\n composes: \"selected-category-1\",\r\n \"background-color\": category1Color,\r\n }),\r\n selectedCategory2: ({ category2Color }) => ({\r\n composes: \"selected-category-2\",\r\n \"background-color\": category2Color,\r\n }),\r\n selectedCategory3: ({ category3Color }) => ({\r\n composes: \"selected-category-3\",\r\n \"background-color\": category3Color,\r\n }),\r\n selectedCategory4: ({ category4Color }) => ({\r\n composes: \"selected-category-4\",\r\n \"background-color\": category4Color,\r\n }),\r\n selectedCategory5: ({ category5Color }) => ({\r\n composes: \"selected-category-5\",\r\n \"background-color\": category5Color,\r\n }),\r\n saveButton: {\r\n composes: \"save__button\",\r\n \"background-color\": \"#3AAAEA\",\r\n color: \"white\",\r\n \"font-family\": \"Open Sans\",\r\n \"font-size\": \"14px\",\r\n \"font-weight\": \"600\",\r\n \"line-height\": \"19px\",\r\n \"letter-spacing\": \"0em\",\r\n \"text-align\": \"center\",\r\n width: \"104.61px\",\r\n height: \"33px\",\r\n \"border-radius\": \"8px\",\r\n },\r\n saveButtonDisabled: {\r\n composes: \"save__button__disabled\",\r\n \"background-color\": \"#F3F3F3\",\r\n color: \"#000000\",\r\n \"font-family\": \"Open Sans\",\r\n \"font-size\": \"14px\",\r\n \"font-weight\": \"600\",\r\n \"line-height\": \"19px\",\r\n \"letter-spacing\": \"0em\",\r\n \"text-align\": \"center\",\r\n width: \"104.61px\",\r\n height: \"33px\",\r\n \"border-radius\": \"8px\",\r\n },\r\n cancelButton: {\r\n composes: \"cancel__button\",\r\n width: \"104.82px\",\r\n height: \"33px\",\r\n background: \"#F3F3F3\",\r\n \"border-radius\": \"8px\",\r\n color: \"#000000\",\r\n \"font-weight\": \"600\",\r\n \"font-family\": \"Open Sans\",\r\n },\r\n cancelButtonHover: {\r\n composes: \"cancel__button buttonActive\",\r\n color: \"black\",\r\n },\r\n deleteButton: {\r\n composes: \"delete__button\",\r\n width: \"104.82px\",\r\n height: \"33px\",\r\n background: \"#FF006F\",\r\n color: \"#FFFFFF\",\r\n \"border-radius\": \"8px\",\r\n \"font-weight\": \"600\",\r\n \"font-family\": \"Open Sans\",\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n cursor: \"pointer\",\r\n },\r\n withFormatDisableUserSelection: {\r\n display: \"flex\",\r\n flexFlow: \"wrap\",\r\n WebkitTouchCallout: \"none\",\r\n WebkitUserSelect: \"none\",\r\n KhtmlUserSelect: \"none\",\r\n MozUserSelect: \"none\",\r\n msUserSelect: \"none\",\r\n userSelect: \"none\",\r\n },\r\n withoutFormatDisableUserSelection: {\r\n WebkitTouchCallout: \"none\",\r\n WebkitUserSelect: \"none\",\r\n KhtmlUserSelect: \"none\",\r\n MozUserSelect: \"none\",\r\n msUserSelect: \"none\",\r\n userSelect: \"none\",\r\n },\r\n withoutFormatButtonWrapper: {\r\n marginRight: \"5px\",\r\n },\r\n});\r\n","import { createUseStyles } from \"react-jss\";\r\nimport * as Mixins from \"../../../theme/Mixins\";\r\n\r\nconst backgroundless = (theme) =>\r\n theme.ChoiceListBackgroundAlpha === 0 && theme.ChoiceListBackgroundBorderWidth === 0;\r\n\r\nexport default createUseStyles({\r\n choice: {\r\n background: ({ theme }) =>\r\n Mixins.alpha(theme.ControlBackground, theme.ChoiceListBackgroundAlpha),\r\n borderRadius: ({ theme }) =>\r\n Math.min(theme.ChoiceListBackgroundBorderRadius, theme.ChoiceHeight / 2),\r\n boxShadow: \"0 0 0 0\",\r\n boxSizing: \"border-box\",\r\n color: \"black\",\r\n composes: \"choice\",\r\n cursor: \"pointer\",\r\n margin: \"0\",\r\n outline: \"2px solid transparent\",\r\n overflow: \"hidden\",\r\n padding: ({ theme }) => (backgroundless(theme) ? [[16, 13]] : [[16, 26]]),\r\n textAlign: ({ theme }) => (theme.DisplayChoiceIcon === \"right\" ? \"right\" : \"\"),\r\n transition: \"background 200ms, box-shadow 200ms, outline-color 200ms\",\r\n userSelect: \"none\",\r\n \"& .check-box__icon\": {\r\n display: ({ theme }) => (!theme.ShowCheckboxSettings ? \"none\" : \"\"),\r\n },\r\n \"& .radio__icon\": {\r\n display: ({ theme }) => (!theme.ShowRadioSettings ? \"none\" : \"\"),\r\n },\r\n },\r\n choiceHeader: {\r\n composes: \"choice__header\",\r\n fontWeight: 700,\r\n margin: ({ theme }) => [[Mixins.getSpacing(theme, theme.ChoiceSpacing, theme.QuestionSpacing?.WithinComponents), 0]],\r\n },\r\n choiceTextTextHighlighter: {\r\n composes: \"choice__text__highlighter\",\r\n fontWeight: \"normal\",\r\n marginLeft: 8,\r\n paddingLeft: 20,\r\n },\r\n choiceContainer: {\r\n alignItems: \"center\",\r\n composes: \"choice-container\",\r\n display: \"flex\",\r\n flex: 1,\r\n \"margin-top\": 0,\r\n \"margin-bottom\": 0,\r\n flexDirection: ({ theme }) =>\r\n theme.CheckBoxIconAlignment === \"right\" ? \"row-reverse\" : \"row\",\r\n },\r\n choiceSelected: {\r\n background: ({ theme }) => !backgroundless(theme) && theme.PrimaryColor,\r\n boxShadow: ({ theme }) =>\r\n `0 0 0 ${theme.BorderWidth}px ${Mixins.borderColor(theme, theme.PrimaryColor)} inset`,\r\n color: ({ theme }) =>\r\n backgroundless(theme)\r\n ? theme.PrimaryColor\r\n : Mixins.foregroundColor(theme, theme.PrimaryColor),\r\n composes: \"choice--selected\",\r\n },\r\n choiceHover: {\r\n composes: \"choice--hover\",\r\n background: ({ theme, selected }) => {\r\n if (backgroundless(theme)) return undefined;\r\n return selected\r\n ? Mixins.darken(theme.PrimaryColor, theme.ActiveHighlightValue)\r\n : Mixins.darken(theme.ControlBackground, theme.ActiveHighlightValue);\r\n },\r\n boxShadow: ({ theme, selected }) =>\r\n `0 0 0 ${theme.BorderWidth}px ${Mixins.borderColor(\r\n theme,\r\n selected\r\n ? Mixins.darken(theme.PrimaryColor, theme.ActiveHighlightValue)\r\n : Mixins.darken(theme.ControlBackground, theme.ActiveHighlightValue),\r\n )} inset`,\r\n },\r\n choiceActive: {\r\n composes: \"choice--active\",\r\n background: ({ theme, selected }) => {\r\n if (backgroundless(theme)) return undefined;\r\n return selected\r\n ? Mixins.darken(theme.PrimaryColor, theme.ActiveHighlightValue)\r\n : Mixins.darken(theme.ControlBackground, theme.ActiveHighlightValue);\r\n },\r\n outlineColor: ({ theme }) => backgroundless(theme) && theme.PrimaryColor,\r\n },\r\n});\r\n","import { createUseStyles } from \"react-jss\";\r\nimport { getSpacing } from \"../../theme/Mixins\";\r\n\r\nexport default createUseStyles({\r\n choiceTextHighlighter: {\r\n composes: \"choice\",\r\n borderRadius: ({ theme }) =>\r\n Math.min(theme.ChoiceListBackgroundBorderRadius, theme.ChoiceHeight / 2),\r\n boxSizing: \"border-box\",\r\n cursor: \"pointer\",\r\n display: ({ hasOpenEnd, openEndSize }) =>\r\n hasOpenEnd && openEndSize === \"Full\" ? \"block\" : \"flex\",\r\n flexWrap: \"wrap\",\r\n overflow: \"hidden\",\r\n textAlign: ({ theme }) => (theme.DisplayChoiceIcon === \"right\" ? \"right\" : \"\"),\r\n transition: \"background 200ms, box-shadow 200ms, outline-color 200ms\",\r\n userSelect: \"none\",\r\n outline: \"2px solid transparent\",\r\n \"& .radio__icon, & .check-box__icon\": {\r\n display: ({ theme }) => (theme.DisplayChoiceIcon === \"none\" ? \"none\" : \"\"),\r\n },\r\n fontFamily: \"Open Sans\",\r\n fontWeight: \"normal\",\r\n },\r\n choiceHeader: {\r\n composes: \"choice__header\",\r\n fontWeight: 400,\r\n margin: ({ theme }) => [[getSpacing(theme, theme.ChoiceSpacing, theme.QuestionSpacing?.WithinComponents), 0]],\r\n },\r\n choiceTextTextHighlighter: {\r\n composes: \"choice__text__highlighter\",\r\n fontWeight: \"normal\",\r\n FontFace: \"openSans\",\r\n },\r\n choiceContainer: {\r\n composes: \"choice__container\",\r\n alignItems: \"center\",\r\n display: \"flex\",\r\n flexGrow: 1,\r\n minWidth: 125,\r\n flexDirection: ({ theme }) => (theme.DisplayChoiceIcon === \"right\" ? \"row-reverse\" : \"row\"),\r\n margin: [[8, 8, 8, 0]],\r\n },\r\n choiceSelectedTextHighlighter: {\r\n composes: \"choice--selected\",\r\n },\r\n choiceHoverTextHighlighter: {\r\n composes: \"choice--hover\",\r\n },\r\n choiceActiveTextHighlighter: {\r\n composes: \"choice--active\",\r\n },\r\n spacer: {\r\n width: 20,\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport classnames from \"classnames\";\r\nimport useStyles from \"./ButtonChoiceTextHighlighter.styles\";\r\n\r\ninterface Props {\r\n id?: string;\r\n type: \"radio\";\r\n label?: string;\r\n className?: string;\r\n disabled?: boolean;\r\n selected?: boolean;\r\n hasOpenEnd?: boolean;\r\n openEndSize?: string;\r\n horizontal?: boolean;\r\n onSelect?(): void;\r\n onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;\r\n renderChoice?(): any;\r\n}\r\n\r\nexport function ButtonChoiceTextHighlighter(props: Props) {\r\n const {\r\n id,\r\n label,\r\n type,\r\n className,\r\n hasOpenEnd,\r\n openEndSize,\r\n horizontal,\r\n selected,\r\n onSelect,\r\n onKeyDown,\r\n renderChoice,\r\n } = props;\r\n\r\n const [hover, setHover] = React.useState(false);\r\n const [active, setActive] = React.useState(false);\r\n\r\n const theme = useTheme() as any;\r\n const classes = useStyles({ theme, selected, hasOpenEnd, openEndSize, horizontal });\r\n\r\n return (\r\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\r\n <div\r\n id={id}\r\n role={type}\r\n aria-checked={selected}\r\n aria-label={label}\r\n onFocus={() => setActive(true)}\r\n onBlur={() => setActive(false)}\r\n onMouseOver={() => setHover(true)}\r\n onMouseOut={() => setHover(false)}\r\n onKeyDown={onKeyDown}\r\n onMouseDown={(e) => {\r\n const div = e.target as HTMLDivElement;\r\n const activeElement = document.activeElement as HTMLElement;\r\n if (!div.contains(activeElement)) activeElement.blur();\r\n e.preventDefault();\r\n onSelect();\r\n }}\r\n className={classnames(\r\n classes.choiceTextHighlighter,\r\n ...([className] || []),\r\n hover && classes.choiceHoverTextHighlighter,\r\n active && classes.choiceActiveTextHighlighter,\r\n selected && classes.choiceSelectedTextHighlighter,\r\n )}\r\n >\r\n <div className={classes.choiceContainer}>{renderChoice()}</div>\r\n </div>\r\n );\r\n}\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport { Dictionary } from \"lodash\";\r\nimport { kebabCase } from \"../../../utils/lodash\";\r\nimport useStyles from \"./ChoiceListItemTextHighlighterRenderer.styles\";\r\nimport { RendererProps, getRendererProps } from \"../BaseRenderer\";\r\nimport { ChoiceModel } from \"../../../models/ChoiceModel\";\r\nimport { VariableModel } from \"../../../models/VariableModel\";\r\nimport { QuestionType, isChoiceList } from \"../../../models/enums/QuestionType\";\r\nimport { ChoiceRef } from \"../../choices/BaseChoice\";\r\nimport useQuestion from \"../../../hooks/useQuestion\";\r\nimport ChoiceLabelRenderer from \"./ChoiceLabelRenderer\";\r\nimport useTranslatable from \"../../../hooks/useTranslatable\";\r\nimport { getSettingBoolean, getSettingString } from \"../../../models/utilities/settingUtilities\";\r\nimport { isNullOrEmpty, removeHtmlTags } from \"../../../utils\";\r\nimport { ButtonChoiceTextHighlighter } from \"../../shared/ButtonChoiceTextHighlighter\";\r\nimport { translate } from \"../../../models/utilities/translationUtilities\";\r\nimport { ChoiceContainer } from \"../../../containers/controls/ChoiceContainer\";\r\nimport { MentionModel } from \"../../../models/MentionModel\";\r\n\r\ninterface Props extends RendererProps {\r\n selected?: boolean;\r\n variable: VariableModel;\r\n isFirst?: boolean;\r\n isLast?: boolean;\r\n name?: string;\r\n gridRendering?: boolean;\r\n openEnd?: string;\r\n onOpenEndChange?(choice: ChoiceModel, text: string): void;\r\n onOpenEndBlur?(choice: ChoiceModel): void;\r\n choice?: ChoiceModel;\r\n horizontal?: boolean;\r\n controlType?: any;\r\n disabled?: boolean;\r\n highlightedWordsByCategories: Dictionary<any[]>;\r\n highlightedWords: Dictionary<any[]>;\r\n selectedChoiceModels: ChoiceModel[];\r\n duplicateWords: string[];\r\n openEndValue?: { [key: string]: string };\r\n mentions: { [variableName: string]: MentionModel[] };\r\n toggleIsCategorySelected(isSelected: boolean, enable: boolean): void;\r\n onDeleteHighlight(shouldSave: boolean): void;\r\n}\r\nexport default function ChoiceListItemTextHighlighterRenderer(props: Props) {\r\n const {\r\n choice,\r\n controlType,\r\n isFirst,\r\n isLast,\r\n disabled,\r\n openEnd,\r\n gridRendering,\r\n selected,\r\n variable,\r\n horizontal,\r\n highlightedWordsByCategories,\r\n selectedChoiceModels,\r\n highlightedWords,\r\n duplicateWords,\r\n language,\r\n openEndValue,\r\n mentions,\r\n toggleIsCategorySelected,\r\n onDeleteHighlight,\r\n } = props;\r\n const choiceRef: ChoiceRef = React.useRef();\r\n const question = useQuestion();\r\n const theme = useTheme();\r\n const classes = useStyles({ theme, selected, horizontal });\r\n const choiceLabel = removeHtmlTags(useTranslatable(choice, \"TEXT\"));\r\n if (!choice.value) {\r\n return (\r\n <div id={`${choice.elementId}_INPUT`} className={classes.choiceHeader}>\r\n <ChoiceLabelRenderer choice={choice} gridRendering={gridRendering} />\r\n </div>\r\n );\r\n }\r\n\r\n const type = isChoiceList(question.type) ? question.type : QuestionType.RadioButton;\r\n\r\n function onSelect() {\r\n onDeleteHighlight(false);\r\n // Counter for selection\r\n Object.entries(selectedChoiceModels).forEach(([id, selectedChoiceModel]) => {\r\n if (choiceRef.current) {\r\n const isOpenEndRequired = getSettingBoolean(question, \"MakeCommentsMandatory\");\r\n if (isOpenEndRequired && isNullOrEmpty(openEndValue[selectedChoiceModel.value])) {\r\n toggleIsCategorySelected(true, true);\r\n } else {\r\n toggleIsCategorySelected(true, false);\r\n }\r\n }\r\n\r\n Object.entries(highlightedWordsByCategories).forEach(([key, value]) => {\r\n if (mentions[key]) {\r\n const mentionIndex = mentions[key].findIndex(\r\n (item) => selectedChoiceModel.value === item.value,\r\n );\r\n if (mentionIndex > -1) {\r\n mentions[key].splice(mentionIndex, 1);\r\n }\r\n }\r\n const choiceIndex = value.findIndex(\r\n (item) => selectedChoiceModel === item.choiceModel,\r\n );\r\n if (choiceIndex > -1) {\r\n highlightedWordsByCategories[key].splice(choiceIndex, 1);\r\n }\r\n });\r\n let highlightedWord: string;\r\n const choiceText = translate(selectedChoiceModel, \"TEXT\", language);\r\n if (duplicateWords.includes(choiceText)) {\r\n highlightedWord = `${choiceText} `;\r\n } else {\r\n highlightedWord = choiceText;\r\n }\r\n\r\n highlightedWordsByCategories[choice.name].push({\r\n highlightedWord,\r\n choiceModel: selectedChoiceModel,\r\n // addd counter for selection to remember\r\n });\r\n Object.entries(highlightedWords).forEach(([key, value]) => {\r\n value.splice(0);\r\n });\r\n });\r\n }\r\n\r\n function onKeyDown(event: React.KeyboardEvent<HTMLDivElement>) {\r\n if (event.target !== event.currentTarget) {\r\n return;\r\n }\r\n if (event.key === \" \") {\r\n onSelect();\r\n event.preventDefault();\r\n }\r\n if (event.key === \"ArrowUp\" || event.key === \"ArrowDown\") {\r\n const choices = variable.choiceList;\r\n const index = choices.indexOf(choice) + (event.key === \"ArrowDown\" ? 1 : -1);\r\n if (choices[index]) {\r\n const siblingElement = document.getElementById(`${choices[index].elementId}_INPUT`);\r\n if (siblingElement) {\r\n siblingElement.focus();\r\n if (type === QuestionType.RadioButton) siblingElement.click();\r\n event.preventDefault();\r\n }\r\n }\r\n }\r\n }\r\n\r\n const openEndSize = getSettingString(choice, \"OpenEndSize\", \"Medium\");\r\n\r\n return (\r\n <>\r\n <ButtonChoiceTextHighlighter\r\n id={`${choice.elementId}_INPUT`}\r\n type=\"radio\"\r\n label={choiceLabel}\r\n onKeyDown={onKeyDown}\r\n onSelect={onSelect}\r\n hasOpenEnd={false}\r\n openEndSize={openEndSize}\r\n selected={selected}\r\n className={kebabCase(QuestionType[type])}\r\n horizontal={horizontal}\r\n renderChoice={() => (\r\n <ChoiceContainer\r\n {...getRendererProps(props)}\r\n choiceRef={choiceRef}\r\n choice={choice}\r\n controlType={controlType}\r\n openEnd={openEnd}\r\n isFirst={isFirst}\r\n isLast={isLast}\r\n isDisabled={disabled}\r\n isSelected={selected}\r\n variable={variable}\r\n />\r\n )}\r\n />\r\n </>\r\n );\r\n}\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport classnames from \"classnames\";\r\nimport { Dictionary } from \"lodash\";\r\nimport useStyles from \"./ChoiceListRenderer.styles\";\r\nimport { RendererProps, getRendererProps } from \"../BaseRenderer\";\r\nimport { ChoiceModel } from \"../../../models/ChoiceModel\";\r\nimport { QuestionType } from \"../../../models/enums/QuestionType\";\r\nimport { MentionModel } from \"../../../models/MentionModel\";\r\nimport { Radio } from \"../../choices/Radio\";\r\nimport {\r\n getSettingBoolean,\r\n getSettingNumber,\r\n getSettingString,\r\n} from \"../../../models/utilities/settingUtilities\";\r\nimport { VariableModel } from \"../../../models/VariableModel\";\r\nimport Button from \"../../shared/Button\";\r\nimport useQuestion from \"../../../hooks/useQuestion\";\r\nimport useTranslatable from \"../../../hooks/useTranslatable\";\r\nimport { QuestionModel } from \"../../../models/QuestionModel\";\r\nimport { getChoiceListDisplayType } from \"../../../models/utilities/questionUtilities\";\r\nimport { ChoiceListDisplayType } from \"../../../models/enums/ChoiceListDisplayType\";\r\nimport useDimensionContext from \"../../../hooks/useDimensionContext\";\r\nimport { isIE } from \"../../../utils\";\r\nimport ChoiceListItemTextHighlighterRenderer from \"./ChoiceListItemTextHighlighterRenderer\";\r\n\r\ninterface Props extends RendererProps {\r\n variable: VariableModel;\r\n openEndValue?: { [key: string]: string };\r\n onClick?(choice: ChoiceModel): void;\r\n onOpenEndChange?(choice: ChoiceModel, text: string): void;\r\n onOpenEndBlur?(choice: ChoiceModel): void;\r\n mentions: { [variableName: string]: MentionModel[] };\r\n choices: ChoiceModel[];\r\n gridRendering?: boolean;\r\n onReset(): void;\r\n language: string;\r\n maxAnswers?: number;\r\n isSelected?: boolean;\r\n highlightedWordsByCategories: Dictionary<any[]>;\r\n selectedChoiceModels: ChoiceModel[];\r\n highlightedWords: Dictionary<any[]>;\r\n isChoiceAlreadyHighlighted: (choice: ChoiceModel, variableName: string) => boolean;\r\n duplicateWords: string[];\r\n toggleIsCategorySelected(isSelected: boolean, enable: boolean): void;\r\n onDeleteHighlight(shouldSave: boolean): void;\r\n}\r\n\r\nconst shouldDisplayResetButton = (question: QuestionModel) =>\r\n getSettingBoolean(question, \"DisplayResetButton\");\r\n\r\nfunction renderChoiceListItemTextHighlighter(\r\n props: Props,\r\n choice: ChoiceModel,\r\n isFirst: boolean,\r\n isLast: boolean,\r\n key: any,\r\n controlType: any,\r\n) {\r\n const {\r\n question,\r\n gridRendering,\r\n openEndValue,\r\n onOpenEndChange,\r\n onOpenEndBlur,\r\n variable,\r\n highlightedWordsByCategories,\r\n selectedChoiceModels,\r\n highlightedWords,\r\n isChoiceAlreadyHighlighted,\r\n duplicateWords,\r\n mentions,\r\n toggleIsCategorySelected,\r\n onDeleteHighlight,\r\n } = props;\r\n const displayType = getChoiceListDisplayType(question);\r\n const isHorizontalDisplay =\r\n displayType === ChoiceListDisplayType.Horizontal ||\r\n displayType === ChoiceListDisplayType.HorizontalColumns;\r\n const selected = [];\r\n Object.entries(selectedChoiceModels).forEach(([id, selectedChoiceModel]) => {\r\n selected.push(isChoiceAlreadyHighlighted(selectedChoiceModel, choice.name));\r\n });\r\n return (\r\n <ChoiceListItemTextHighlighterRenderer\r\n key={key}\r\n {...getRendererProps(props)}\r\n controlType={controlType}\r\n gridRendering={gridRendering}\r\n isFirst={isFirst}\r\n isLast={isLast}\r\n openEnd={(openEndValue || {})[choice.index]}\r\n openEndValue={openEndValue}\r\n onOpenEndChange={onOpenEndChange}\r\n onOpenEndBlur={onOpenEndBlur}\r\n selected={selected.every((value) => value === true)}\r\n choice={choice}\r\n variable={variable}\r\n disabled={false}\r\n horizontal={isHorizontalDisplay}\r\n highlightedWordsByCategories={highlightedWordsByCategories}\r\n selectedChoiceModels={selectedChoiceModels}\r\n highlightedWords={highlightedWords}\r\n duplicateWords={duplicateWords}\r\n mentions={mentions}\r\n toggleIsCategorySelected={toggleIsCategorySelected}\r\n onDeleteHighlight={onDeleteHighlight}\r\n />\r\n );\r\n}\r\n\r\nfunction renderChoice(\r\n props: Props,\r\n choice: ChoiceModel,\r\n isFirst: boolean,\r\n isLast: boolean,\r\n key: any,\r\n) {\r\n return renderChoiceListItemTextHighlighter(props, choice, isFirst, isLast, key, Radio);\r\n}\r\n\r\nfunction renderChoices(props: Props) {\r\n const { choices } = props;\r\n return choices.map((choice, i) =>\r\n renderChoice(props, choice, i === 0, i === choices.length - 1, choice.name),\r\n );\r\n}\r\n\r\nfunction ResetButton(props: Props) {\r\n const { theme, onReset } = props;\r\n const question = useQuestion();\r\n const defaultClearButtonText = useTranslatable(theme, \"QuestionClearButton\") || \"Reset\";\r\n const clearButtonText = useTranslatable(question, \"ResetButtonText\") || defaultClearButtonText;\r\n\r\n return (\r\n <Button\r\n className=\"button--clear\"\r\n text={clearButtonText}\r\n size=\"full\"\r\n onClick={() => onReset()}\r\n />\r\n );\r\n}\r\n\r\nexport default function ChoiceListTextHighlighterRenderer(props: Props) {\r\n const question = useQuestion();\r\n const { choices } = props;\r\n const dimension = useDimensionContext();\r\n\r\n const theme = useTheme();\r\n const displayType = getChoiceListDisplayType(question);\r\n\r\n const numberOfColumns = getSettingNumber(question, \"NumberOfColumns\");\r\n const numberOfRows = numberOfColumns > 1 ? Math.ceil(choices?.length / numberOfColumns) : 1;\r\n\r\n const classes = useStyles({ theme, displayType, numberOfColumns, numberOfRows });\r\n\r\n if (choices === undefined || choices.length === 0) {\r\n return null;\r\n }\r\n\r\n const displayAsTable = question.type === QuestionType.ImageSelector;\r\n const displayOrder = getSettingString(question, \"DisplayOrder\");\r\n\r\n const isDisplayColumns = displayType === ChoiceListDisplayType.VerticalColumns;\r\n const isDisplayWide = dimension && dimension.minWidth(778);\r\n\r\n // Internet Explorer fallback layout: vertical columns choice list will be displayed as a simple vertical choice list\r\n const displayAsGrid = isDisplayColumns && isDisplayWide && !isIE();\r\n\r\n const role = question.type === QuestionType.RadioButton ? \"radiogroup\" : \"group\";\r\n\r\n return (\r\n <div\r\n role={role}\r\n className={classnames(\r\n classes.choiceList,\r\n displayAsTable && displayOrder === \"Vertical\" && classes.choiceListTableVertical,\r\n displayAsTable &&\r\n displayOrder === \"Horizontal\" &&\r\n classes.choiceListTableHorizontal,\r\n displayAsGrid && classes.choiceListGrid,\r\n )}\r\n >\r\n {renderChoices(props)}\r\n {shouldDisplayResetButton(question) && <ResetButton {...props} />}\r\n </div>\r\n );\r\n}\r\n","import { ChoiceModel } from \"./ChoiceModel\";\r\nimport { LogicModel } from \"./LogicModel\";\r\nimport { TranslatedText } from \"./TranslatedText\";\r\n\r\nexport class VariableToChoiceModel implements ChoiceModel {\r\n elementId: string;\r\n index: number;\r\n value: string;\r\n parentValue: string;\r\n openEndDisplayLogic: LogicModel;\r\n openEndActive?: boolean;\r\n position?: number;\r\n name: string;\r\n settings: { [key: string]: any };\r\n skipLogic?: LogicModel;\r\n displayLogic?: LogicModel;\r\n translatedTexts?: { [key: string]: TranslatedText };\r\n\r\n constructor(\r\n elementId: string,\r\n index: number,\r\n value: string,\r\n name: string,\r\n openEndActive?: boolean,\r\n translatedTexts?: { [key: string]: TranslatedText },\r\n ) {\r\n this.elementId = elementId;\r\n this.index = index;\r\n this.value = value;\r\n this.name = name;\r\n this.openEndActive = openEndActive;\r\n this.translatedTexts = translatedTexts;\r\n }\r\n}\r\n","/* eslint-disable react-hooks/rules-of-hooks */\r\n/* eslint-disable @typescript-eslint/no-unused-vars */\r\nimport parse from \"html-react-parser\";\r\nimport React, { useEffect, useState } from \"react\";\r\nimport Modal from \"react-modal\";\r\nimport { Dictionary } from \"lodash\";\r\nimport useStyles from \"./TextHighlighterRenderer.styles\";\r\nimport { getRendererProps, RendererProps } from \"../BaseRenderer\";\r\nimport { MentionModel } from \"../../../models/MentionModel\";\r\nimport ChoiceListTextHighlighterRenderer from \"./ChoiceListTextHighlighterRenderer\";\r\nimport { VariableModel } from \"../../../models/VariableModel\";\r\nimport { ChoiceModel } from \"../../../models/ChoiceModel\";\r\nimport { VariableToChoiceModel } from \"../../../models/VariableToChoiceModel\";\r\nimport OpenEndRenderer from \"./OpenEndRenderer\";\r\nimport { translate } from \"../../../models/utilities/translationUtilities\";\r\nimport { getSettingBoolean, getSettingString } from \"../../../models/utilities/settingUtilities\";\r\nimport useTranslatable from \"../../../hooks/useTranslatable\";\r\n\r\ninterface Props extends RendererProps {\r\n onHighlight: (e: any) => void;\r\n highlightedWords: Dictionary<any[]>;\r\n highlightedWordsByCategories: Dictionary<any[]>;\r\n showModal: boolean;\r\n mentions: { [variableName: string]: MentionModel[] };\r\n onReset(): void;\r\n onCancelModal: () => void;\r\n modalPositions: DOMRect;\r\n onOpenEndChange?(answer: any, event: any): void;\r\n onOpenEndBlur?(answer: any): void;\r\n showDeleteButton: boolean;\r\n onDeleteHighlight: (shouldSave: boolean) => void;\r\n selectedChoiceModels: ChoiceModel[];\r\n isChoiceAlreadyHighlighted: (choice: ChoiceModel, variableName: string) => boolean;\r\n duplicateWords: string[];\r\n openEndValue: { [key: string]: any };\r\n variables: VariableModel[];\r\n sequencedVariables: VariableModel[];\r\n toggleIsCategorySelected(isSelected: boolean, enable: boolean): void;\r\n handleMouseDown: (e: any) => void;\r\n handleMouseMove: (e: any) => void;\r\n selectedButtons: string[];\r\n buttonsRef: any;\r\n modalRef: any;\r\n handleTouchStart: (e: any) => void;\r\n handleTouchMove: (e: any) => void;\r\n handleTouchEnd: (e: any) => void;\r\n}\r\nexport default function TextHighlighterRenderer(props: Props) {\r\n function mapVariablesToChoices(variables: VariableModel[]): ChoiceModel[] {\r\n const choiceList: ChoiceModel[] = [];\r\n variables.forEach((variable) => {\r\n const choice = new VariableToChoiceModel(\r\n variable.elementId,\r\n variable.index,\r\n variable.name,\r\n variable.name,\r\n true,\r\n variable.translatedTexts,\r\n );\r\n choiceList.push(choice);\r\n });\r\n return choiceList;\r\n }\r\n const {\r\n highlightedWords,\r\n highlightedWordsByCategories,\r\n onHighlight,\r\n showModal,\r\n mentions,\r\n onReset,\r\n onCancelModal,\r\n question,\r\n questionnaire,\r\n modalPositions,\r\n onOpenEndBlur,\r\n onOpenEndChange,\r\n showDeleteButton,\r\n onDeleteHighlight,\r\n selectedChoiceModels,\r\n isChoiceAlreadyHighlighted,\r\n duplicateWords,\r\n language,\r\n openEndValue,\r\n variables,\r\n sequencedVariables,\r\n toggleIsCategorySelected,\r\n handleMouseDown,\r\n handleMouseMove,\r\n selectedButtons,\r\n buttonsRef,\r\n modalRef,\r\n handleTouchStart,\r\n handleTouchMove,\r\n handleTouchEnd,\r\n } = props;\r\n const questionTexts = question.variables[0].choiceList;\r\n const FormatTemplate = getSettingString(question, \"HighlightFormat\");\r\n let categoriesColors: string[] = getCategoriesColors();\r\n const classes = useStyles({\r\n category0Color: categoriesColors[0],\r\n category1Color: categoriesColors[1],\r\n category2Color: categoriesColors[2],\r\n category3Color: categoriesColors[3],\r\n category4Color: categoriesColors[4],\r\n category5Color: categoriesColors[5],\r\n });\r\n const variable = question.variables[0];\r\n const choiceList = mapVariablesToChoices(sequencedVariables);\r\n const [deviceWidth] = useState<number>(window.innerWidth);\r\n const isMobilePreview = deviceWidth <= 768;\r\n const isClickEventPropagation = true;\r\n const isMouseDownEventPropagation = true;\r\n let modalStyles;\r\n const responsePopUpTitle = useTranslatable(question, \"ResponsePopUpTitle\");\r\n const responsePopUpText = useTranslatable(question, \"ResponsePopUpText\");\r\n const responsePopUpDelete = useTranslatable(question, \"ResponsePopUpDelete\");\r\n\r\n if (showModal) {\r\n if (isMobilePreview) {\r\n modalStyles = {\r\n content: {\r\n position: \"absolute\",\r\n top: \"50%\",\r\n left: \"50%\",\r\n transform: \"translate(-50%, -50%)\",\r\n width: \"72%\",\r\n height: showDeleteButton ? \"50%\" : \"auto\",\r\n border: \"1px solid #DFDFDF\",\r\n borderRadius: \"20px\",\r\n },\r\n overlay: {\r\n backgroundColor: \"transparent\",\r\n },\r\n };\r\n } else {\r\n modalStyles = {\r\n content: {\r\n top: `${modalPositions?.bottom}px`,\r\n left: `${modalPositions?.left}px`,\r\n right: \"auto\",\r\n bottom: \"auto\",\r\n transform: \"\",\r\n width: \"fit-content\",\r\n height: \"auto\",\r\n position: \"relative\",\r\n border: \"1px solid #DFDFDF\",\r\n bordeRadius: \"20px\",\r\n outline: \"none\",\r\n },\r\n overlay: {\r\n position: \"absolute\",\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n marginRight: \"-50%\",\r\n width: \"100%\",\r\n height: \"auto\",\r\n backgroundColor: \"transparent\",\r\n overflow: \"auto\",\r\n zIndex: 1000,\r\n },\r\n };\r\n }\r\n }\r\n\r\n function getCategoriesColors() {\r\n categoriesColors = [];\r\n variables.forEach((variableItem, index) => {\r\n categoriesColors[index] = getSettingString(variableItem, \"Color\");\r\n });\r\n return categoriesColors;\r\n }\r\n\r\n function getCurrentHighlightedStyle(choiceValue: string) {\r\n let highlightColor = \"\";\r\n\r\n variables.forEach((variableItem) => {\r\n highlightedWordsByCategories[variableItem.name].forEach((x) => {\r\n if (x.choiceModel && x.choiceModel.value === choiceValue) {\r\n highlightColor = getClassName(variableItem);\r\n }\r\n });\r\n });\r\n return highlightColor;\r\n }\r\n\r\n function setStateFromMentions(choice: ChoiceModel) {\r\n variables.forEach((variableItem) => {\r\n if (\r\n isSelected(choice, variableItem.name) &&\r\n !highlightedWordsByCategories[variableItem.name].some(\r\n (item) => choice === item.choiceModel,\r\n )\r\n ) {\r\n highlightedWordsByCategories[variableItem.name].push({\r\n highlightedWord: translate(choice, \"TEXT\", language),\r\n choiceModel: choice,\r\n });\r\n openEndValue[choice.value] = getOpenEndFromMention(choice, variableItem.name);\r\n }\r\n });\r\n }\r\n function isSelected(choice: ChoiceModel, variableName: string) {\r\n return props.mentions[variableName]?.some((mention) => mention.value === choice.value);\r\n }\r\n\r\n function getOpenEndFromMention(choice: ChoiceModel, variableName: string) {\r\n return props.mentions[variableName].filter((mention) => mention.value === choice.value)[0]\r\n .openEnd;\r\n }\r\n\r\n function getClassName(variableItem: VariableModel) {\r\n switch (variableItem.index) {\r\n case 0: {\r\n return classes.selectedCategory0;\r\n }\r\n case 1: {\r\n return classes.selectedCategory1;\r\n }\r\n case 2: {\r\n return classes.selectedCategory2;\r\n }\r\n case 3: {\r\n return classes.selectedCategory3;\r\n }\r\n case 4: {\r\n return classes.selectedCategory4;\r\n }\r\n default: {\r\n return classes.selectedCategory5;\r\n }\r\n }\r\n }\r\n\r\n function HighlightButton({ choiceValue, choicePositionIndex }) {\r\n const [hovered, setHovered] = useState(false);\r\n const [selected, setSelected] = useState(false);\r\n\r\n useEffect(() => {\r\n if (selectedButtons.includes(`text-highlight-choice-${choiceValue}`)) {\r\n setSelected(true);\r\n } else {\r\n setSelected(false);\r\n }\r\n }, [choiceValue]);\r\n\r\n const choice = questionTexts.find((item) => item.value === choiceValue);\r\n if (!choice) return null;\r\n const choiceText = translate(choice, \"TEXT\", language);\r\n if (!choiceText) return null;\r\n\r\n setStateFromMentions(choice);\r\n const touchEvent = typeof window !== \"undefined\" && \"ontouchstart\" in window;\r\n\r\n const divStyles = {\r\n cursor: \"pointer\",\r\n backgroundColor: hovered || selected ? \"lightgrey\" : \"\",\r\n };\r\n\r\n if (variables.length > 0 && getSettingBoolean(choice, \"Highlightable\")) {\r\n return (\r\n <span\r\n key={`${choiceValue}-${choicePositionIndex}`}\r\n id={`text-highlight-choice-${choiceValue}`}\r\n data-position={choicePositionIndex}\r\n onClick={touchEvent ? undefined : onHighlight}\r\n onKeyPress={touchEvent ? undefined : onHighlight}\r\n onMouseDown={(e) => handleMouseDown(e)}\r\n onMouseEnter={(e) => {\r\n setHovered(true);\r\n handleMouseMove(e);\r\n }}\r\n onMouseLeave={() => setHovered(false)}\r\n onTouchStart={handleTouchStart}\r\n role=\"button\"\r\n tabIndex={0}\r\n style={divStyles}\r\n className={getCurrentHighlightedStyle(choice.value)}\r\n >\r\n {choiceText}\r\n </span>\r\n );\r\n }\r\n\r\n return (\r\n <span\r\n key={`${choiceValue}-${choicePositionIndex}`}\r\n id={`text-highlight-choice-${choiceValue}`}\r\n data-position={choicePositionIndex}\r\n role=\"button\"\r\n tabIndex={0}\r\n style={variables.length > 0 ? {} : { marginRight: 5 }}\r\n >\r\n {choiceText}\r\n </span>\r\n );\r\n }\r\n\r\n function parseHighlightFormat(highlightFormat) {\r\n let choicePositionIndex = 0;\r\n\r\n // Backward compatibility for question created in previous version (6.11)\r\n // Previous version don't have format, only words with spaces\r\n if (highlightFormat === null || highlightFormat === \"\" || highlightFormat === undefined) {\r\n return questionTexts.map((item) => (\r\n // eslint-disable-next-line react/jsx-key\r\n <div className={classes.withoutFormatButtonWrapper}>\r\n <HighlightButton\r\n choiceValue={item.value}\r\n choicePositionIndex={choicePositionIndex++}\r\n />\r\n </div>\r\n ));\r\n }\r\n\r\n // eslint-disable-next-line consistent-return\r\n const replace = (domNode) => {\r\n if (domNode.attribs && domNode.name === \"span\" && domNode.attribs.mappedchoicecode) {\r\n const choiceValue = domNode.attribs.mappedchoicecode;\r\n return (\r\n <HighlightButton\r\n choiceValue={choiceValue}\r\n choicePositionIndex={choicePositionIndex++}\r\n />\r\n );\r\n }\r\n };\r\n\r\n return parse(highlightFormat, { replace });\r\n }\r\n\r\n function getOpenEndValue() {\r\n if (!selectedChoiceModels || selectedChoiceModels.length === 0) {\r\n return \"\";\r\n }\r\n\r\n const firstOpenEndValue = openEndValue[selectedChoiceModels[0].value];\r\n\r\n if (firstOpenEndValue === undefined) {\r\n return \"\";\r\n }\r\n\r\n for (let i = 1; i < selectedChoiceModels.length; i++) {\r\n if (openEndValue[selectedChoiceModels[i].value] !== firstOpenEndValue) {\r\n return \"\";\r\n }\r\n }\r\n\r\n return firstOpenEndValue;\r\n }\r\n\r\n return (\r\n <>\r\n <div\r\n ref={buttonsRef}\r\n className={\r\n FormatTemplate === null || FormatTemplate === undefined\r\n ? classes.withFormatDisableUserSelection\r\n : classes.withoutFormatDisableUserSelection\r\n }\r\n onTouchMove={handleTouchMove}\r\n onTouchEnd={handleTouchEnd}\r\n >\r\n {parseHighlightFormat(FormatTemplate)}\r\n </div>\r\n {showModal && (\r\n <Modal\r\n ref={modalRef}\r\n isOpen={showModal}\r\n style={modalStyles}\r\n ariaHideApp={false}\r\n shouldCloseOnOverlayClick\r\n onRequestClose={onCancelModal}\r\n >\r\n <label\r\n style={{ fontWeight: \"bold\", fontFamily: \"Open Sans\" }}\r\n dangerouslySetInnerHTML={{ __html: responsePopUpTitle }}\r\n />\r\n <ChoiceListTextHighlighterRenderer\r\n onReset={onReset}\r\n variable={variable}\r\n mentions={mentions}\r\n choices={choiceList}\r\n highlightedWordsByCategories={highlightedWordsByCategories}\r\n selectedChoiceModels={selectedChoiceModels}\r\n highlightedWords={highlightedWords}\r\n isChoiceAlreadyHighlighted={isChoiceAlreadyHighlighted}\r\n duplicateWords={duplicateWords}\r\n openEndValue={openEndValue}\r\n toggleIsCategorySelected={toggleIsCategorySelected}\r\n onDeleteHighlight={onDeleteHighlight}\r\n {...getRendererProps(props)}\r\n />\r\n <label\r\n style={{ fontWeight: \"bold\", fontFamily: \"Open Sans\" }}\r\n dangerouslySetInnerHTML={{ __html: responsePopUpText }}\r\n />\r\n <OpenEndRenderer\r\n question={question}\r\n questionnaire={questionnaire}\r\n theme={undefined}\r\n onOpenEndBlur={onOpenEndBlur}\r\n value={getOpenEndValue()}\r\n onOpenEndChange={(e) => onOpenEndChange(undefined, e)}\r\n language={language}\r\n style={{ background: \"#F3F3F3\", borderRadius: 2 }}\r\n isClickEventPropagation={isClickEventPropagation}\r\n isMouseDownEventPropagation={isMouseDownEventPropagation}\r\n />\r\n <div\r\n style={{ flexDirection: \"row\", display: \"flex\", justifyContent: \"center\" }}\r\n >\r\n {showDeleteButton && (\r\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\r\n <div\r\n role=\"button\"\r\n className={classes.deleteButton}\r\n tabIndex={0}\r\n onClick={(event) => {\r\n event.stopPropagation();\r\n onDeleteHighlight(true);\r\n }}\r\n dangerouslySetInnerHTML={{ __html: responsePopUpDelete }}\r\n />\r\n )}\r\n </div>\r\n </Modal>\r\n )}\r\n </>\r\n );\r\n}\r\n","/* eslint-disable react/no-access-state-in-setstate */\r\nimport { Dictionary } from \"lodash\";\r\nimport React from \"react\";\r\nimport { DispatchProp } from \"react-redux\";\r\nimport { ValidationBuilder } from \"../../models/builders/ValidationBuilder\";\r\nimport { ChoiceModel } from \"../../models/ChoiceModel\";\r\nimport { getSettingBoolean } from \"../../models/utilities/settingUtilities\";\r\nimport { translate } from \"../../models/utilities/translationUtilities\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\nimport { getRendererProps } from \"../renderers/BaseRenderer\";\r\nimport TextHighlighterRenderer from \"../renderers/v2/TextHighlighterRenderer\";\r\nimport { BaseControl, ControlProps } from \"./BaseControl\";\r\nimport { ElementWithSettings } from \"../../models/ElementWithSettings\";\r\nimport { isQuestionValidatedServerSide } from \"../../models/utilities/validationUtilities\";\r\n\r\ninterface Props extends ControlProps, DispatchProp {}\r\ninterface State {\r\n highlightedWords: Dictionary<any[]>;\r\n showModal: boolean;\r\n showDeleteButton: boolean;\r\n highlightedWordsByCategories: Dictionary<any[]>;\r\n modalPositions?: DOMRect;\r\n selectedChoiceModels: ChoiceModel[];\r\n duplicateWords: string[];\r\n openEndValue: { [key: string]: any };\r\n isCategorySelected: boolean;\r\n isMouseDown: boolean;\r\n startButtonIndex: number;\r\n finalButtonIndex: number;\r\n selectedButtons: string[];\r\n historyOfHighlighted: any[];\r\n isDeleting: boolean;\r\n buttonsRef: any;\r\n modalRef: any;\r\n previousHighlightedWordsByCategories: {};\r\n previousOpenEndValue: {};\r\n}\r\n\r\nexport class TextHighlighterControl extends BaseControl<Props, State> {\r\n constructor(props: Props) {\r\n super(props);\r\n this.state = {\r\n highlightedWords: this.generateHighlightedWords(),\r\n showModal: false,\r\n selectedChoiceModels: [],\r\n highlightedWordsByCategories: this.generateHighlightedWordsByCategories(),\r\n modalPositions: undefined,\r\n showDeleteButton: false,\r\n duplicateWords: [],\r\n openEndValue: {},\r\n isCategorySelected: false,\r\n isMouseDown: false,\r\n startButtonIndex: null,\r\n finalButtonIndex: null,\r\n selectedButtons: [],\r\n historyOfHighlighted: [],\r\n isDeleting: false,\r\n buttonsRef: React.createRef<HTMLDivElement>(),\r\n modalRef: React.createRef(),\r\n previousHighlightedWordsByCategories: {},\r\n previousOpenEndValue: {},\r\n };\r\n }\r\n\r\n variables = this.props.question.variables.filter((variableItem) =>\r\n getSettingBoolean(variableItem, \"Visible\"),\r\n );\r\n\r\n sequencedVariables = this.props.sequencedVariables.filter((variableItem) =>\r\n getSettingBoolean(variableItem, \"Visible\"),\r\n );\r\n\r\n choiceList = this.variables[0]?.choiceList;\r\n\r\n onReset = () => {\r\n return null;\r\n };\r\n\r\n onCloseModal = () => {\r\n Object.entries(this.state.highlightedWords).forEach(([key, value]) => {\r\n value.pop();\r\n });\r\n this.setState((prevState) => ({\r\n ...prevState,\r\n showModal: false,\r\n isCategorySelected: false,\r\n }));\r\n };\r\n\r\n onCancelModal = () => {\r\n if (this.state.isCategorySelected) {\r\n const isHighlightedWordsModified =\r\n JSON.stringify(this.state.previousHighlightedWordsByCategories) !==\r\n JSON.stringify(this.state.highlightedWordsByCategories);\r\n\r\n const isOpenEndValueModified =\r\n JSON.stringify(this.state.previousOpenEndValue) !==\r\n JSON.stringify(this.state.openEndValue);\r\n\r\n if (isHighlightedWordsModified || isOpenEndValueModified) {\r\n // Only save result if categories or open-end vlaues are modified.\r\n this.onSaveHighlight();\r\n }\r\n }\r\n this.onCloseModal();\r\n };\r\n\r\n onDeleteHighlight = (shouldSave: boolean) => {\r\n // Create a copy of the historyOfHighlighted array\r\n let updatedHistory = [...this.state.historyOfHighlighted];\r\n const updatedHighlightedWordsByCategories = { ...this.state.highlightedWordsByCategories };\r\n const updatedOpenEndValue = { ...this.state.openEndValue };\r\n\r\n this.state.selectedChoiceModels.forEach((selectedChoiceModel) => {\r\n // Modify the copy, not the state directly\r\n updatedHistory = updatedHistory\r\n .map((highlightedCollection) => {\r\n const modifiedCollection = {\r\n selectedButtons: highlightedCollection.selectedButtons,\r\n selectedChoiceModels: highlightedCollection.selectedChoiceModels.filter(\r\n (choiceModel) => choiceModel.value !== selectedChoiceModel.value,\r\n ),\r\n openEndValue: Object.keys(highlightedCollection.openEndValue).reduce(\r\n (acc, key) => {\r\n if (key !== selectedChoiceModel.value) {\r\n acc[key] = highlightedCollection.openEndValue[key];\r\n }\r\n return acc;\r\n },\r\n {},\r\n ),\r\n };\r\n return modifiedCollection;\r\n })\r\n .filter(\r\n (highlightedCollection) =>\r\n highlightedCollection.selectedChoiceModels.length !== 0,\r\n );\r\n\r\n // Modify highlightedWordsByCategories\r\n Object.entries(updatedHighlightedWordsByCategories).forEach(([key, value]) => {\r\n const choiceIndex = value.findIndex(\r\n (item) => selectedChoiceModel === item.choiceModel,\r\n );\r\n if (this.props.mentions[key]) {\r\n const mentionIndex = this.props.mentions[key].findIndex(\r\n (item) => selectedChoiceModel.value === item.value,\r\n );\r\n if (mentionIndex > -1) {\r\n this.props.mentions[key].splice(mentionIndex, 1);\r\n }\r\n }\r\n if (choiceIndex > -1) {\r\n updatedHighlightedWordsByCategories[key].splice(choiceIndex, 1);\r\n }\r\n });\r\n\r\n // Modify openEndValue\r\n delete updatedOpenEndValue[selectedChoiceModel.value];\r\n });\r\n\r\n this.setState(\r\n {\r\n historyOfHighlighted: updatedHistory,\r\n highlightedWordsByCategories: updatedHighlightedWordsByCategories,\r\n openEndValue: updatedOpenEndValue,\r\n isDeleting: true,\r\n },\r\n () => {\r\n if (shouldSave) {\r\n this.onSaveHighlight();\r\n }\r\n this.setState({\r\n isDeleting: false,\r\n });\r\n },\r\n );\r\n };\r\n\r\n toggleIsCategorySelected = (isSelected: boolean, enable: boolean) => {\r\n this.setState({ isCategorySelected: isSelected });\r\n };\r\n\r\n getMentionsFromCurrentMatrix = (props: Props) => {\r\n const { mentions, matrix } = props;\r\n const filteredMentions = {};\r\n\r\n Object.keys(mentions).forEach((key) => {\r\n filteredMentions[key] = mentions[key].filter((model) => model.matrix === matrix);\r\n });\r\n return filteredMentions;\r\n };\r\n\r\n renderQuestion() {\r\n return (\r\n <TextHighlighterRenderer\r\n highlightedWordsByCategories={this.state.highlightedWordsByCategories}\r\n {...getRendererProps(this.props)}\r\n onHighlight={this.onHighlight}\r\n highlightedWords={this.state.highlightedWords}\r\n showModal={this.state.showModal}\r\n mentions={this.getMentionsFromCurrentMatrix(this.props)}\r\n onReset={this.onReset}\r\n onCancelModal={this.onCancelModal}\r\n modalPositions={this.state.modalPositions}\r\n onOpenEndBlur={this.onOpenEndBlur}\r\n onOpenEndChange={this.onOpenEndChange}\r\n showDeleteButton={this.state.showDeleteButton}\r\n onDeleteHighlight={this.onDeleteHighlight}\r\n selectedChoiceModels={this.state.selectedChoiceModels}\r\n isChoiceAlreadyHighlighted={this.isChoiceAlreadyHighlighted}\r\n duplicateWords={this.state.duplicateWords}\r\n openEndValue={this.state.openEndValue}\r\n variables={this.variables}\r\n sequencedVariables={this.sequencedVariables}\r\n toggleIsCategorySelected={this.toggleIsCategorySelected}\r\n handleMouseDown={this.handleMouseDown}\r\n handleMouseMove={this.handleMouseMove}\r\n selectedButtons={this.state.selectedButtons}\r\n buttonsRef={this.state.buttonsRef}\r\n modalRef={this.state.modalRef}\r\n handleTouchStart={this.handleTouchStart}\r\n handleTouchMove={this.handleTouchMove}\r\n handleTouchEnd={this.handleTouchEnd}\r\n />\r\n );\r\n }\r\n\r\n getWordPosition = (button: HTMLSpanElement) => {\r\n const positionStr = button.getAttribute(\"data-position\");\r\n if (!positionStr) {\r\n return null;\r\n }\r\n const position = parseInt(positionStr, 10);\r\n // eslint-disable-next-line no-restricted-globals\r\n if (isNaN(position)) {\r\n return null;\r\n }\r\n return position;\r\n };\r\n\r\n handleTouchStart = (e: TouchEvent) => {\r\n e.preventDefault();\r\n const touch = e.touches[0];\r\n const initialButton = document.elementFromPoint(\r\n touch.clientX,\r\n touch.clientY,\r\n ) as HTMLElement;\r\n\r\n if (initialButton instanceof HTMLSpanElement) {\r\n initialButton.setAttribute(\r\n \"data-start-index\",\r\n String(this.getWordPosition(initialButton)),\r\n );\r\n initialButton.setAttribute(\"data-selected\", \"true\");\r\n initialButton.style.backgroundColor = \"lightgrey\";\r\n }\r\n };\r\n\r\n handleTouchMove = (e: TouchEvent) => {\r\n const touch = e.touches[0];\r\n const currentButton = document.elementFromPoint(\r\n touch.clientX,\r\n touch.clientY,\r\n ) as HTMLElement;\r\n\r\n if (currentButton instanceof HTMLSpanElement) {\r\n e.preventDefault();\r\n const currentButtonIndex = this.getWordPosition(currentButton);\r\n const buttons = Array.from(\r\n this.state.buttonsRef.current.querySelectorAll(\"[data-position]\"),\r\n ) as HTMLElement[];\r\n\r\n // Retrieve the start index from the attribute we set during touch start\r\n const startButton = this.state.buttonsRef.current.querySelector(\"[data-start-index]\");\r\n const startButtonIndex = startButton\r\n ? Number(startButton.getAttribute(\"data-start-index\"))\r\n : null;\r\n\r\n if (startButtonIndex !== null) {\r\n const startIndex = Math.min(currentButtonIndex, startButtonIndex);\r\n const endIndex = Math.max(currentButtonIndex, startButtonIndex);\r\n\r\n for (let i = 0; i < buttons.length; i++) {\r\n const buttonPosition = this.getWordPosition(buttons[i]);\r\n if (buttonPosition >= startIndex && buttonPosition <= endIndex) {\r\n buttons[i].setAttribute(\"data-selected\", \"true\");\r\n const selectedChoiceValue = buttons[i].id.split(\"-\")[3];\r\n const selectedChoice = this.choiceList.find(\r\n (choice) => choice.value === selectedChoiceValue,\r\n );\r\n if (getSettingBoolean(selectedChoice, \"Highlightable\")) {\r\n buttons[i].style.backgroundColor = \"lightgrey\";\r\n }\r\n } else {\r\n buttons[i].removeAttribute(\"data-selected\");\r\n buttons[i].style.backgroundColor = \"\";\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n handleTouchEnd = (e: TouchEvent) => {\r\n e.preventDefault();\r\n // Get the array of all buttons\r\n const buttons = Array.from(\r\n this.state.buttonsRef.current.querySelectorAll(\"[data-position]\"),\r\n ) as HTMLElement[];\r\n\r\n // Get the id of all buttons with 'lightgrey' background color\r\n const selectedButtons = buttons.filter((button) => button.hasAttribute(\"data-selected\"));\r\n // Map selected buttons to their respective position indices\r\n const selectedButtonIndices = selectedButtons.map((button) => this.getWordPosition(button));\r\n\r\n // Get the id of the final button\r\n const finalButtonIndex = Math.max(...selectedButtonIndices);\r\n\r\n this.setState(\r\n {\r\n isMouseDown: false,\r\n startButtonIndex: null,\r\n finalButtonIndex,\r\n selectedButtons: selectedButtons.map((button) => button.id),\r\n },\r\n () => {\r\n if (selectedButtons.length > 0) {\r\n // Delay showing the modal to allow rendering to continue\r\n setTimeout(() => {\r\n this.onHighlight();\r\n }, 100);\r\n }\r\n },\r\n );\r\n\r\n // Reset color of all buttons\r\n // eslint-disable-next-line no-return-assign, no-param-reassign\r\n buttons.forEach((button) => (button.style.backgroundColor = \"\"));\r\n buttons.forEach((button) => button.removeAttribute(\"data-selected\"));\r\n\r\n // At the end of the touch event, remove the 'data-start-index' attribute from the initial button\r\n const startButton = this.state.buttonsRef.current.querySelector(\"[data-start-index]\");\r\n if (startButton) {\r\n startButton.removeAttribute(\"data-start-index\");\r\n }\r\n };\r\n\r\n handleMouseDown = (e: MouseEvent) => {\r\n const initialButton = e.target as HTMLSpanElement;\r\n this.setState({\r\n isMouseDown: true,\r\n startButtonIndex: this.getWordPosition(initialButton),\r\n finalButtonIndex: this.getWordPosition(initialButton),\r\n selectedButtons: [initialButton.id],\r\n });\r\n };\r\n\r\n handleMouseMove = (e: MouseEvent) => {\r\n if (!this.state.isMouseDown) {\r\n return;\r\n }\r\n\r\n const currentButton = e.target as HTMLSpanElement;\r\n const currentButtonIndex = this.getWordPosition(currentButton);\r\n const range = {\r\n start: Math.min(this.state.startButtonIndex, currentButtonIndex),\r\n end: Math.max(this.state.startButtonIndex, currentButtonIndex),\r\n };\r\n const selectedButtons = this.getButtonsInRange(range.start, range.end);\r\n this.setState({ selectedButtons, finalButtonIndex: currentButtonIndex });\r\n };\r\n\r\n handleMouseUp = () => {\r\n this.setState({ isMouseDown: false });\r\n this.setState({ startButtonIndex: null });\r\n if (this.state.selectedButtons.length > 0) {\r\n this.onHighlight();\r\n }\r\n };\r\n\r\n getButtonsInRange = (startIndex: number, endIndex: number): string[] => {\r\n const selectedButtons = [];\r\n const buttons = this.state.buttonsRef.current.querySelectorAll(\"[data-position]\");\r\n\r\n for (let i = 0; i < buttons.length; i++) {\r\n const button = buttons[i];\r\n // eslint-disable-next-line radix\r\n const position = parseInt(button.getAttribute(\"data-position\") || \"\");\r\n // eslint-disable-next-line no-restricted-globals\r\n if (!isNaN(position) && position >= startIndex && position <= endIndex) {\r\n selectedButtons.push(buttons[i].id);\r\n }\r\n }\r\n return selectedButtons;\r\n };\r\n\r\n handleOutsideButtonsClick = (e: MouseEvent) => {\r\n const targetElement = e.target as HTMLElement;\r\n if (targetElement) {\r\n if (!targetElement.id.startsWith(\"text-highlight-choice-\")) {\r\n this.setState({ selectedButtons: [] });\r\n }\r\n }\r\n };\r\n\r\n checkIfSubSelectionByMentions = () => {\r\n // this is used when user come back to text highlighter to modify their answer, but the status of history is not here.\r\n // need to investigate how to keep it in future\r\n const values = this.state.selectedChoiceModels.map((choice) => choice.value);\r\n return Object.values(this.props.mentions).some((mentionList) =>\r\n values.every((value) => mentionList.some((mention) => mention.value === value)),\r\n );\r\n };\r\n\r\n onHighlight = () => {\r\n if (this.state.showModal) {\r\n return;\r\n }\r\n\r\n const isChoiceAlreadyHighlightedArray = [];\r\n const modalPositionId = this.state.selectedButtons.find(\r\n (element) =>\r\n document.getElementById(element).getAttribute(\"data-position\") ===\r\n this.state.finalButtonIndex.toString(),\r\n );\r\n\r\n // if there still someting get selected\r\n if (this.state.selectedChoiceModels !== undefined) {\r\n this.setState({ selectedChoiceModels: [] });\r\n }\r\n\r\n Object.entries(this.state.selectedButtons).forEach(([index, buttonId]) => {\r\n const selectedChoiceValue = buttonId.split(\"-\")[3];\r\n this.state.highlightedWords[selectedChoiceValue].splice(0);\r\n const selectedChoice = this.choiceList.find(\r\n (choice) => choice.value === selectedChoiceValue,\r\n );\r\n\r\n // make selected choice model here\r\n if (getSettingBoolean(selectedChoice, \"Highlightable\")) {\r\n this.state.selectedChoiceModels.push(selectedChoice);\r\n const freeSelectionEnabled = this.choiceList.every(\r\n (choice) =>\r\n !getSettingBoolean(choice, \"Highlightable\") &&\r\n !getSettingBoolean(choice, \"IsGroup\"),\r\n );\r\n\r\n const choiceText = translate(selectedChoice, \"TEXT\", this.props.language);\r\n const isChoiceHighlighted = this.isChoiceAlreadyHighlighted(\r\n selectedChoice,\r\n undefined,\r\n );\r\n isChoiceAlreadyHighlightedArray.push(isChoiceHighlighted);\r\n\r\n if (\r\n !isChoiceHighlighted &&\r\n (getSettingBoolean(selectedChoice, \"Highlightable\") || freeSelectionEnabled)\r\n ) {\r\n this.state.highlightedWords[selectedChoice.value].push(choiceText);\r\n }\r\n }\r\n });\r\n const subsetSelection = this.state.historyOfHighlighted.some((highlightedSelection) => {\r\n const previousButtons = highlightedSelection.selectedChoiceModels;\r\n return (\r\n this.state.selectedChoiceModels.length <= previousButtons.length &&\r\n this.state.selectedChoiceModels.every((item) => previousButtons.includes(item))\r\n );\r\n });\r\n\r\n this.setState({\r\n showDeleteButton: isChoiceAlreadyHighlightedArray.includes(true),\r\n showModal: true,\r\n modalPositions: this.state.buttonsRef.current\r\n .querySelector(`#${modalPositionId}`)\r\n .getBoundingClientRect(),\r\n isCategorySelected: subsetSelection || this.checkIfSubSelectionByMentions(),\r\n });\r\n };\r\n\r\n /*\r\n Each Selection of Highlight (a sentence, a word) are will be at same group (rpsMatrix)\r\n */\r\n getMatrixIdByChoiceValue = (currentChoiceValue) => {\r\n const choiceGroupIndex = this.state.historyOfHighlighted.findIndex((highlightedGroup) =>\r\n highlightedGroup.selectedChoiceModels.some(\r\n (choice) => choice.value === currentChoiceValue,\r\n ),\r\n );\r\n let choiceOpenEndValue =\r\n this.state.historyOfHighlighted[choiceGroupIndex].openEndValue[currentChoiceValue];\r\n\r\n if (typeof choiceOpenEndValue === \"undefined\") {\r\n choiceOpenEndValue = null;\r\n }\r\n\r\n return [choiceGroupIndex + 1, choiceOpenEndValue];\r\n };\r\n\r\n removeMentionAcrossMatrices = (variableName, valueToRemove, newMatrixId) => {\r\n // Iterate over all matrices from 1 to newMatrixId and remove mentions with the provided value\r\n for (let matrixId = 1; matrixId < newMatrixId; matrixId++) {\r\n this.setMentions(\r\n this.props,\r\n variableName,\r\n (mentions) => mentions.pull(valueToRemove),\r\n matrixId, // Use the current matrixId in the loop\r\n true,\r\n );\r\n }\r\n };\r\n\r\n setChoicesAsMentions = (element: ElementWithSettings, choices: ChoiceModel[]) => {\r\n const values = choices.map((choice) => choice.value);\r\n if (values.length) {\r\n values.forEach((value) => {\r\n // For future\r\n // const [currentMatrixId, currentOpenEndValue] = this.getMatrixIdByChoiceValue(value);\r\n // this.removeMentionAcrossMatrices(element.name, value, currentMatrixId);\r\n const currentOpenEndValue = this.state.openEndValue[value];\r\n this.setMentions(\r\n this.props,\r\n element.name,\r\n (mentions) => mentions.pull(value).add(value, currentOpenEndValue),\r\n undefined,\r\n true,\r\n );\r\n });\r\n }\r\n };\r\n\r\n saveCurrentHighlight = () => {\r\n Object.entries(this.state.highlightedWordsByCategories).forEach(\r\n ([key, highlightedWords]) => {\r\n const variable = this.props.question.variables.find((x) => x.name === key);\r\n if (highlightedWords.length) {\r\n const values = highlightedWords\r\n .filter((item) => item.choiceModel !== undefined)\r\n .flatMap((item) => item.choiceModel);\r\n if (values.length) {\r\n this.setChoicesAsMentions(variable, values);\r\n } else {\r\n this.setMentions(this.props, variable.name, (m) => m.clear());\r\n }\r\n }\r\n },\r\n );\r\n };\r\n\r\n onSaveHighlight = () => {\r\n this.onCloseModal();\r\n Object.entries(this.state.highlightedWords).forEach(([key, value]) => {\r\n value.splice(0);\r\n });\r\n const previousHighlightedWordsByCategories = JSON.parse(\r\n JSON.stringify(this.state.highlightedWordsByCategories),\r\n );\r\n const previousOpenEndValue = JSON.parse(JSON.stringify(this.state.openEndValue));\r\n if (!this.state.isDeleting) {\r\n // Need to delete first to have new matrix Id\r\n let updatedHistory = [...this.state.historyOfHighlighted];\r\n this.state.selectedChoiceModels.forEach((selectedChoiceModel) => {\r\n // Modify the copy, not the state directly\r\n updatedHistory = updatedHistory\r\n .map((highlightedCollection) => {\r\n const modifiedCollection = {\r\n selectedButtons: highlightedCollection.selectedButtons,\r\n selectedChoiceModels: highlightedCollection.selectedChoiceModels.filter(\r\n (choiceModel) => choiceModel.value !== selectedChoiceModel.value,\r\n ),\r\n openEndValue: Object.keys(highlightedCollection.openEndValue).reduce(\r\n (acc, key) => {\r\n if (key !== selectedChoiceModel.value) {\r\n acc[key] = highlightedCollection.openEndValue[key];\r\n }\r\n return acc;\r\n },\r\n {},\r\n ),\r\n };\r\n return modifiedCollection;\r\n })\r\n .filter(\r\n (highlightedCollection) =>\r\n highlightedCollection.selectedChoiceModels.length !== 0,\r\n );\r\n });\r\n\r\n const selectedChoiceOpenEndValues = {};\r\n this.state.selectedChoiceModels.forEach((selectedChoiceModel) => {\r\n const choiceValue = selectedChoiceModel.value;\r\n const openEndValue = this.state.openEndValue[choiceValue];\r\n if (openEndValue !== undefined) {\r\n selectedChoiceOpenEndValues[choiceValue] = openEndValue;\r\n }\r\n });\r\n\r\n const newHighlightedSelection = {\r\n selectedButtons: [...this.state.selectedButtons],\r\n selectedChoiceModels: [...this.state.selectedChoiceModels],\r\n openEndValue: { ...selectedChoiceOpenEndValues },\r\n };\r\n\r\n // Create deep copies of the state objects\r\n const copiedSelectedButtons = [...newHighlightedSelection.selectedButtons];\r\n const copiedSelectedChoiceModels = [...newHighlightedSelection.selectedChoiceModels];\r\n const copiedOpenEndValue = { ...newHighlightedSelection.openEndValue };\r\n this.setState(\r\n () => ({\r\n selectedChoiceModels: [],\r\n historyOfHighlighted: [\r\n ...updatedHistory,\r\n {\r\n selectedButtons: copiedSelectedButtons,\r\n selectedChoiceModels: copiedSelectedChoiceModels,\r\n openEndValue: copiedOpenEndValue,\r\n },\r\n ],\r\n previousHighlightedWordsByCategories,\r\n previousOpenEndValue,\r\n }),\r\n () => {\r\n this.saveCurrentHighlight();\r\n },\r\n );\r\n } else {\r\n this.saveCurrentHighlight();\r\n }\r\n };\r\n\r\n getNumberOfHighlightedChoices = () => {\r\n return Object.values(this.props.mentions).reduce((acc, arr) => acc + arr.length, 0);\r\n };\r\n\r\n validate(): ValidationResultModel {\r\n const { question, useClientValidation, questionnaire } = this.props;\r\n\r\n if (isQuestionValidatedServerSide(question.type, useClientValidation)) {\r\n return new ValidationBuilder().build();\r\n }\r\n\r\n const [variable] = question.variables;\r\n const required = this.isAnswerRequired(questionnaire, question);\r\n const numberOfHighlightedChoices = this.getNumberOfHighlightedChoices();\r\n\r\n if (required && numberOfHighlightedChoices === 0) {\r\n return new ValidationBuilder().fail(variable.name, \"IncompleteAnswer\").build();\r\n }\r\n\r\n if (numberOfHighlightedChoices > 0) {\r\n const min = this.minValue();\r\n const max = this.maxValue();\r\n\r\n // Test for minimum and maximum values.\r\n if (min !== null && min > 0 && numberOfHighlightedChoices < min) {\r\n return new ValidationBuilder()\r\n .fail(variable.name, \"InvalidChoicesMin\", { min: String(min) })\r\n .build();\r\n }\r\n if (max !== null && max > 0 && numberOfHighlightedChoices > max) {\r\n return new ValidationBuilder()\r\n .fail(variable.name, \"InvalidChoicesMax\", { max: String(max) })\r\n .build();\r\n }\r\n }\r\n return new ValidationBuilder().build();\r\n }\r\n\r\n onOpenEndChange = (answer: any, event: any) => {\r\n const { value } = event.target;\r\n if (this.state.isCategorySelected) {\r\n // Allow changing the open end value only if isCategorySelected is true\r\n Object.entries(this.state.selectedChoiceModels).forEach(([id, selectedChoiceModel]) => {\r\n this.setState((prevState) => {\r\n const newState = {\r\n ...prevState,\r\n openEndValue: {\r\n ...prevState.openEndValue,\r\n [selectedChoiceModel.value]: this.truncateOpenEnd(answer, value),\r\n },\r\n };\r\n return newState;\r\n });\r\n });\r\n }\r\n // is modal modifed true\r\n };\r\n\r\n onOpenEndBlur = (answer: any) => {\r\n return null;\r\n };\r\n\r\n generateHighlightedWordsByCategories(): Dictionary<any[]> {\r\n const highlightedWordsModelList: Dictionary<any[]> = {};\r\n this.variables.forEach((variable) => {\r\n highlightedWordsModelList[variable.name] = [\r\n { highlightedWord: new RegExp(\"^$\"), choiceModel: undefined },\r\n ];\r\n });\r\n return highlightedWordsModelList;\r\n }\r\n\r\n generateHighlightedWords(): Dictionary<any[]> {\r\n const highlightedWordsModelList: Dictionary<any[]> = {};\r\n if (this.choiceList) {\r\n this.choiceList.forEach((choice) => {\r\n highlightedWordsModelList[choice.value] = [new RegExp(\"^$\")];\r\n });\r\n }\r\n return highlightedWordsModelList;\r\n }\r\n\r\n isChoiceAlreadyHighlighted = (selectedChoice: ChoiceModel, variableName: string): boolean => {\r\n let result = false;\r\n if (variableName !== undefined) {\r\n result = this.state.highlightedWordsByCategories[variableName].some(\r\n (item) => item.choiceModel === selectedChoice,\r\n );\r\n } else {\r\n result = Object.entries(this.state.highlightedWordsByCategories).some(([key, value]) =>\r\n value.some((item) => item.choiceModel === selectedChoice),\r\n );\r\n }\r\n return result;\r\n };\r\n\r\n componentDidMount() {\r\n const { question } = this.props;\r\n if (question !== this.renderedQuestion) {\r\n this.questionFirstRender((this.renderedQuestion = question), this.props);\r\n }\r\n window.addEventListener(\"mouseup\", this.handleMouseUp);\r\n window.addEventListener(\"mousedown\", this.handleOutsideButtonsClick);\r\n window.addEventListener(\"touchmove\", this.handleTouchMove, { passive: false });\r\n }\r\n\r\n componentWillUnmount() {\r\n const { question } = this.props;\r\n this.finalizeQuestion(question, this.props);\r\n window.removeEventListener(\"mouseup\", this.handleMouseUp);\r\n window.removeEventListener(\"mousedown\", this.handleOutsideButtonsClick);\r\n window.removeEventListener(\"touchmove\", this.handleTouchMove);\r\n }\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\nimport { foregroundColor, alpha, controlBackgroundColor, getSpacing } from \"../../../theme/Mixins\";\r\n\r\nexport default createUseStyles({\r\n imageArea: {\r\n border: ({ theme }) => [[theme.BorderWidth, \"solid\", theme.ControlBorderColor]],\r\n borderRadius: ({ theme }) => theme.BorderRadius,\r\n composes: \"image-area\",\r\n display: \"inline-block\",\r\n fontSize: 0,\r\n lineHeight: 0,\r\n maxWidth: \"100%\",\r\n overflow: \"hidden\",\r\n position: \"relative\",\r\n marginTop: ({ theme }) => getSpacing(theme, 0, theme.QuestionSpacing?.WithinComponents),\r\n },\r\n imageAreaImage: {\r\n composes: \"image-area__image\",\r\n lineHeight: 0,\r\n maxWidth: \"100%\",\r\n position: \"relative\",\r\n cursor: \"pointer\",\r\n },\r\n imageAreaLegend: {\r\n composes: \"image-area-legend\",\r\n background: ({ theme }) => alpha(theme.ControlBackground, theme.ControlAlpha),\r\n border: ({ theme }) => [[theme.BorderWidth, \"solid\", theme.ControlBorderColor]],\r\n borderRadius: ({ theme }) => theme.BorderRadius,\r\n color: ({ theme }) => foregroundColor(theme, controlBackgroundColor(theme)),\r\n display: \"flex\",\r\n marginTop: ({ theme }) => getSpacing(theme, 18, theme.QuestionSpacing?.WithinComponents),\r\n padding: 9,\r\n },\r\n dynamicImageAreaLegend: {\r\n flexWrap: \"wrap\",\r\n },\r\n imageAreaLegendTitle: {\r\n composes: \"image-area-legend__title\",\r\n alignSelf: \"center\",\r\n flex: 1,\r\n fontWeight: 600,\r\n margin: [[0, 20]],\r\n },\r\n imageAreaLegendList: {\r\n display: \"flex\",\r\n flexWrap: \"wrap\",\r\n flex: 3,\r\n composes: \"image-area-legend__list\",\r\n },\r\n initialFlex: {\r\n flex: \"auto\",\r\n },\r\n imageAreaLegendContainer: {\r\n composes: \"image-area-legend__container\",\r\n margin: [[4, 20]],\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n },\r\n imageAreaLegendColor: {\r\n borderRadius: ({ theme }) => Math.min(theme.BorderRadius, 12.5),\r\n composes: \"image-area-legend__color\",\r\n display: \"inline-block\",\r\n height: 25,\r\n marginRight: 15,\r\n verticalAlign: \"middle\",\r\n width: 25,\r\n },\r\n imageAreaLegendText: {\r\n composes: \"image-area-legend__text\",\r\n display: \"inline-block\",\r\n verticalAlign: \"middle\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport { RendererProps } from \"../BaseRenderer\";\r\nimport useStyle from \"./HeatMapRenderer.styles\";\r\n\r\ninterface Props extends RendererProps {\r\n imageSrc?: string;\r\n height?: string;\r\n width?: string;\r\n onSelect?(event: any): void;\r\n top?: string;\r\n left?: string;\r\n color?: string;\r\n text?: string;\r\n variableName?: string;\r\n areaCode?: string;\r\n}\r\n\r\nexport default function HeatMapRenderer(props: Props) {\r\n const theme = useTheme();\r\n const divRef = React.useRef();\r\n const { text, onSelect, variableName } = props;\r\n const classes = useStyle({ theme });\r\n const { imageSrc, children, height, width } = props;\r\n return (\r\n <>\r\n <div\r\n id={variableName}\r\n className={classes.imageArea}\r\n aria-label={text}\r\n role=\"group\"\r\n onKeyDown={(event) => {\r\n if (event.target !== divRef.current) return;\r\n if (event.key === \" \") {\r\n event.preventDefault();\r\n }\r\n }}\r\n onMouseDown={(event) => {\r\n onSelect(event);\r\n event.preventDefault();\r\n }}\r\n >\r\n <img\r\n className={classes.imageAreaImage}\r\n src={imageSrc}\r\n alt=\"\"\r\n style={{ width, height }}\r\n />\r\n {children}\r\n </div>\r\n </>\r\n );\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\n\r\nexport default createUseStyles({\r\n imageAreaSelection: {\r\n composes: \"image-area__selection\",\r\n content: \"\",\r\n cursor: \"pointer\",\r\n display: \"inline-block\",\r\n lineHeight: 0,\r\n maxWidth: \"100%\",\r\n opacity: \"1\",\r\n position: \"absolute\",\r\n transition: \"background 200ms, opacity 200ms\",\r\n width: \"10px\",\r\n height: \"10px\",\r\n borderRadius: \"50%\",\r\n boxShadow: \"0 6px 12px rgba(0,0,0,.175)\",\r\n background: \"white !important\",\r\n },\r\n imageAreaSelectionActive: {\r\n background: \"#999\",\r\n composes: \"image-area__selection--active\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport classnames from \"classnames\";\r\nimport { RendererProps } from \"../BaseRenderer\";\r\nimport useStyle from \"./HeatMapSelectionRenderer.styles\";\r\n\r\ninterface Props extends RendererProps {\r\n top: string;\r\n left: string;\r\n width?: string;\r\n height?: string;\r\n color: string;\r\n borderWidth: string;\r\n variableName?: string;\r\n areaCode?: string;\r\n onSelect?(index: any): void;\r\n index?: number;\r\n}\r\n\r\nexport default function ImageAreaSelectionRenderer(props: Props) {\r\n const divRef = React.useRef();\r\n const { index, variableName, onSelect } = props;\r\n const theme = useTheme();\r\n const classes = useStyle({ theme });\r\n // Style-specific props\r\n const { top, left, color, areaCode, borderWidth } = props;\r\n const border =\r\n (!borderWidth ? 1 : borderWidth) +\r\n \"px solid \" +\r\n (!color || color == \"\" ? \"#000000\" : color);\r\n const style = {\r\n top: top || \"0px\",\r\n left: left || \"0px\",\r\n border: border || \"1px solid black\",\r\n };\r\n\r\n const [active, setActive] = React.useState(false);\r\n\r\n return (\r\n <div\r\n id={variableName}\r\n data-areacode={areaCode}\r\n ref={divRef}\r\n role=\"checkbox\"\r\n tabIndex={0}\r\n data-index={index}\r\n className={classnames(\r\n classes.imageAreaSelection,\r\n active && classes.imageAreaSelectionActive,\r\n )}\r\n onMouseDown={(event) => {\r\n onSelect(index);\r\n event.preventDefault();\r\n }}\r\n onFocus={() => setActive(true)}\r\n onMouseOver={() => setActive(true)}\r\n onMouseOut={() => setActive(false)}\r\n style={style}\r\n />\r\n );\r\n}\r\n","import React from \"react\";\r\nimport { DispatchProp } from \"react-redux\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { BaseControl, ControlProps } from \"./BaseControl\";\r\nimport { ChoiceModel } from \"../../models/ChoiceModel\";\r\nimport { getSettingString } from \"../../models/utilities/settingUtilities\";\r\nimport { translate } from \"../../models/utilities/translationUtilities\";\r\nimport { getRendererProps } from \"../renderers/BaseRenderer\";\r\nimport HeatMapRenderer from \"../renderers/v2/HeatMapRenderer\";\r\nimport HeatMapSelectionRenderer from \"../renderers/v2/HeatMapSelectionRenderer\";\r\n\r\ninterface Props extends ControlProps, DispatchProp {}\r\n\r\ninterface State {\r\n value: string;\r\n focus: boolean;\r\n answers: ChoiceModel[];\r\n input?: HTMLElement;\r\n}\r\n\r\nexport class HeatMapControl extends BaseControl<Props, State> {\r\n onSelectedHeatMapArea(event: any, variableName = \"\") {\r\n var bounds = event.target.getBoundingClientRect();\r\n var x = event.clientX - bounds.left;\r\n var y = event.clientY - bounds.top;\r\n var value = x.toFixed(4) + \",\" + y.toFixed(4);\r\n if (!this.onSelectDot) {\r\n this.setState((prevState) => {\r\n const newState = { ...prevState };\r\n if (!newState.value) {\r\n newState.value = value;\r\n } else {\r\n newState.value = newState.value + \"|\" + value;\r\n }\r\n return newState;\r\n });\r\n this.setMentions(this.props, variableName, (m) => {\r\n return m.add(value);\r\n });\r\n\r\n if (\r\n this.renderHeatMapPreview[variableName] &&\r\n this.renderHeatMapPreview[variableName].length > 0\r\n ) {\r\n this.renderHeatMapPreview[variableName].push(value);\r\n } else {\r\n this.renderHeatMapPreview[variableName] = [];\r\n this.renderHeatMapPreview[variableName].push(value);\r\n }\r\n }\r\n this.onSelectDot = false;\r\n }\r\n\r\n onSelectDot = false;\r\n onSelectedHeatMapAreaOnDot(index, variableName) {\r\n this.onSelectDot = true;\r\n this.setState((prevState) => {\r\n const newState = { ...prevState };\r\n var totalVal = newState.value ? newState.value.split(\"|\") : [];\r\n if (totalVal.length > 0) totalVal.splice(index - 1, 1);\r\n if (totalVal.length != 0) {\r\n newState.value = totalVal.join(\"|\");\r\n } else {\r\n newState.value = undefined;\r\n }\r\n return newState;\r\n });\r\n var mentions = this.getMentions(this.props);\r\n var selectedMentions = mentions.filter((m) => m.index === index);\r\n if (selectedMentions.length > 0) {\r\n this.setMentions(this.props, variableName, (m) =>\r\n m.removeValue(selectedMentions[0].value),\r\n );\r\n }\r\n }\r\n\r\n getDimension(value: any) {\r\n return Number.isNaN(value) ? \"0\" : `${value}px`;\r\n }\r\n\r\n renderMapChoice(question: QuestionModel, variableName: any, choice: any, index = 1) {\r\n var dataPoint = choice.split(\",\");\r\n return (\r\n <HeatMapSelectionRenderer\r\n {...getRendererProps(this.props)}\r\n key={index}\r\n top={this.getDimension(dataPoint[1])}\r\n left={this.getDimension(dataPoint[0])}\r\n color={getSettingString(question, \"OutlineColor\")}\r\n onSelect={(divIndex) => this.onSelectedHeatMapAreaOnDot(divIndex, variableName)}\r\n index={index}\r\n borderWidth={getSettingString(question, \"OutlineWeight\")}\r\n variableName={variableName}\r\n />\r\n );\r\n }\r\n\r\n renderHeatMapPreview = {};\r\n renderMap(question: QuestionModel) {\r\n var variableName = question.variables.length > 0 ? question.variables[0].name : \"\";\r\n var dataPoints = this.state?.value?.replace(\"undefined\", \"\").split(\"|\");\r\n var mentions = this.getMentions(this.props, variableName);\r\n if (mentions && mentions.length > 0) {\r\n dataPoints = [];\r\n mentions.map((mention) => {\r\n dataPoints.push(mention.value);\r\n });\r\n }\r\n return dataPoints?.map((answer, index) =>\r\n this.renderMapChoice(question, variableName, answer, index + 1),\r\n );\r\n }\r\n\r\n updateState(props: Props) {\r\n this.setState((prevState) => {\r\n const newState = { ...prevState };\r\n const mention = this.getMention(props);\r\n if (!newState.value) {\r\n newState.value = mention?.value;\r\n } else {\r\n newState.value = newState.value + \"|\" + mention?.value;\r\n }\r\n return newState;\r\n });\r\n }\r\n\r\n renderQuestion(question: QuestionModel) {\r\n const { language } = this.props;\r\n var variableName = question.variables.length > 0 ? question.variables[0].name : \"\";\r\n if (variableName) {\r\n return (\r\n <HeatMapRenderer\r\n {...getRendererProps(this.props)}\r\n imageSrc={translate(question, \"ImageUrl\", language)}\r\n height={getSettingString(question, \"Height\")}\r\n width={getSettingString(question, \"Width\")}\r\n onSelect={(event) => this.onSelectedHeatMapArea(event, variableName)}\r\n >\r\n {this.renderMap(question)}\r\n </HeatMapRenderer>\r\n );\r\n }\r\n }\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\n\r\nconst DESKTOP_DIMENSIONS = 376;\r\nconst MOBILE_VIEW_GAP = 16;\r\nconst DESKTOP_VIEW_GAP = 64;\r\n\r\nexport default createUseStyles({\r\n container: {\r\n position: \"relative\",\r\n width: ({ isMobileView }) => (isMobileView ? \"100%\" : \"auto\"),\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n gap:({isMobileView, isAboveChoiceNavigation})=> (isMobileView || !isAboveChoiceNavigation) ? \"8px\" : \"16px\",\r\n },\r\n statementsContainer: {\r\n width: \"100%\",\r\n display: \"flex\",\r\n overflowX: \"hidden\",\r\n scrollBehavior: \"smooth\",\r\n gap: ({ isMobileView }) =>\r\n isMobileView ? `${MOBILE_VIEW_GAP}px` : `${DESKTOP_VIEW_GAP}px`,\r\n padding: \"8px 0px\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n position: \"relative\",\r\n \"& > div .lottie-gesture\": {\r\n width: \"61px\",\r\n height: \"30px\",\r\n position: \"absolute\",\r\n left: \"50%\",\r\n top: \"50%\",\r\n transform: \"translate(-50%, -50%)\"\r\n },\r\n },\r\n statement: {\r\n width: ({ statementWidth }) => `${statementWidth}px`,\r\n color: \"#555555\",\r\n textAlign: \"center\",\r\n minWidth: ({ isMobileView }) => (isMobileView ? \"100%\" : \"\"),\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n alignItems: \"center\",\r\n overflow: \"hidden\",\r\n boxShadow: ({ isActiveItem }) =>\r\n isActiveItem ? \"0px 0px 6px 1px rgba(0, 0, 0, 0.20)\" : \"\",\r\n justifyContent: ({ justifyContent }) => justifyContent,\r\n border: \"1px solid #ccc\",\r\n borderRadius: ({ theme, statementWidth }) => {\r\n let calDimension = statementWidth;\r\n return `${\r\n theme.ShowStatementBackgroundSettings\r\n ? Math.min(\r\n theme.CustomBorderValue\r\n ? theme.StatementBorderRadius\r\n : theme.ChoiceListBackgroundBorderRadius,\r\n calDimension / 2,\r\n )\r\n : \"\"\r\n }px`;\r\n },\r\n \"& .statementTextContent\": {\r\n padding: \"16px\",\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n lineHeight: \"1.2\",\r\n opacity: ({ isActiveItem, isShowLottieGesture, imageUrl}) => {\r\n return (!isActiveItem || (isShowLottieGesture && !imageUrl) ? \"0\" : \"1\");\r\n },\r\n transition: \"opacity 0.3s ease-in\",\r\n width: \"100%\",\r\n boxSizing: \"border-box\",\r\n },\r\n\r\n \"& .statementTextContent:empty\": {\r\n display: \"none\",\r\n },\r\n \"& .image-wrapper\": {\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n backgroundColor: ({ isActiveItem }) => (!isActiveItem ? \"#F2F2F2\" : \"\"),\r\n width: ({ isMobileView }) => (isMobileView ? \"100%\" : `${DESKTOP_DIMENSIONS}px`),\r\n flex: 1,\r\n \"& .image-element\": {\r\n opacity: ({ isActiveItem, isShowLottieGesture }) => {\r\n if (isShowLottieGesture) {\r\n return \"0.2\";\r\n }else{\r\n return (!isActiveItem ? \"0\" : \"1\");\r\n }\r\n },\r\n transition: \"opacity 0.3s ease-in\",\r\n borderRadius: ({ theme }) => {\r\n if (!theme.ShowStatementBackgroundSettings || !theme.CustomBorderValue) {\r\n if (theme.ChoiceListBackgroundBorderRadius === 100) return \"20px\";\r\n if (theme.ChoiceListBackgroundBorderRadius === 15) return \"8px\";\r\n }\r\n\r\n if (\r\n theme.ShowStatementBackgroundSettings &&\r\n theme.StatementBackgroundAlpha === 0\r\n ) {\r\n return `${theme.StatementBorderRadius}px`;\r\n }\r\n return \"\";\r\n },\r\n },\r\n },\r\n },\r\n choiceAndNavigationContainer: {\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n gap:({ isMobileView })=> isMobileView ? \"16px\" : \"24px\",\r\n },\r\n navigationButtonsPanel: {\r\n textAlign: \"center\",\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n margin: \"0 auto\",\r\n alignItems: \"center\",\r\n minWidth: \"192px\",\r\n gap: \"16px\",\r\n \"& .fixedWidth\": {\r\n flex: \"0 0 20px\",\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n width: \"16px\",\r\n height: \"16px\",\r\n padding: \"8px 0px\",\r\n \"& svg\": {\r\n width: \"16px\",\r\n }\r\n },\r\n \"& .counter-navigation\": {\r\n minWidth : \"110px\",\r\n },\r\n },\r\n navigationButton: {\r\n height: \"100%\",\r\n cursor: \"pointer\",\r\n color: \"#667085\"\r\n },\r\n bulletNavigationPanel: {\r\n display: \"flex\",\r\n gap: \"16px\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n \"& .ellipse-item\": {\r\n width: \"16px\", \r\n height: \"16px\",\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n \"& div\": {\r\n width: \"6px\", \r\n height: \"6px\",\r\n borderRadius: \"50%\",\r\n backgroundColor: \"#667085\",\r\n }\r\n },\r\n \"& .bullets-container\":{\r\n display: \"flex\",\r\n gap: \"8px\",\r\n alignItems: \"center\",\r\n maxWidth: \"136px\",\r\n overflow: \"hidden\",\r\n padding: \"3px\",\r\n \"& > div\":{\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n \"& svg\": {\r\n width: \"16px\",\r\n height: \"16px\",\r\n }\r\n },\r\n \"& .active-answered-item\": {\r\n outline: \"2px solid #316AEE\",\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n borderRadius: \"50%\",\r\n \"& svg\": {\r\n width: \"16px\",\r\n height: \"16px\",\r\n }\r\n },\r\n \"& .active-not-answered-item\": {\r\n outline: \"3px solid #D0D3DD\",\r\n borderRadius: \"50%\",\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n \"& svg\": {\r\n width: \"16px\",\r\n height: \"16px\",\r\n }\r\n },\r\n \"& .bullet\": {\r\n width: \"16px\",\r\n height: \"16px\",\r\n backgroundColor: \"#D0D3DD\",\r\n borderRadius: \"50%\",\r\n },\r\n },\r\n \r\n }\r\n});\r\n","export default __webpack_public_path__ + \"a9f30278bc821456eace1c129d1fea1e.gif\";","import * as React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { StoreState } from \"../../models/states/StoreState\";\r\nimport {\r\n setCarrouselActiveVariableIndex,\r\n validationClear,\r\n validationSetResult,\r\n} from \"../../redux/actions\";\r\nimport useStyles from \"./CarrouselControl.styles\";\r\nimport { useLanguage } from \"../../hooks/useLanguage\";\r\nimport { ControlProps } from \"./BaseControl\";\r\nimport { translate } from \"../../models/utilities/translationUtilities\";\r\nimport {\r\n useValidation,\r\n useDiscreteVariadicValidator,\r\n isAnswerRequired,\r\n} from \"../../hooks/useValidation\";\r\nimport {\r\n getSettingBoolean,\r\n getSettingNumber,\r\n getSettingString,\r\n hasSetting,\r\n} from \"../../models/utilities/settingUtilities\";\r\nimport { ControlContainer } from \"../../containers/controls/ControlContainer\";\r\nimport { getRendererProps } from \"../renderers/BaseRenderer\";\r\nimport { ChoiceListControl } from \"./ChoiceListControl\";\r\nimport { FontAwesomeIcon } from \"../shared/FontAwesome\";\r\nimport { QuestionType } from \"../../models/enums/QuestionType\";\r\nimport { isQuestionSoftPrompt } from \"../../models/utilities/questionUtilities\";\r\nimport lottieGif from \"../../assets/images/lottie.gif\";\r\n\r\ninterface StatementProps {\r\n id: string;\r\n key: string;\r\n text: string;\r\n color: string;\r\n imageUrl: string;\r\n isMobileView: boolean;\r\n isActiveItem: boolean;\r\n statementWidth: number;\r\n handleSwipe: (direction: string) => void;\r\n isShowLottieGesture: boolean;\r\n}\r\n\r\nconst MOBILE_DIMENSIONS = 270;\r\nconst RESIZE_CAROUSEL = \"resize-carousel\";\r\nconst MOBILE_VIEW_GAP = 16;\r\nconst DESKTOP_VIEW_GAP = 64;\r\nconst DESKTOP_STATEMENT_WIDTH = 376;\r\nconst OFFSET_MARGIN_FOR_MOBILE = 20;\r\nconst PARTIAL_WIDTH_FOR_MOBILE = 20; // for prev and next statement\r\n\r\nconst Statement = (props: StatementProps) => {\r\n const {\r\n id,\r\n color,\r\n text,\r\n imageUrl,\r\n isMobileView,\r\n isActiveItem,\r\n statementWidth,\r\n isShowLottieGesture,\r\n } = props;\r\n const theme: any = useTheme();\r\n const { ContentResponsivenessOption: contentResponsivenessOption } = theme;\r\n const justifyContent = imageUrl ? \"space-between\" : \"center\";\r\n const imageWrapperRef = React.useRef(null);\r\n const classes = useStyles({\r\n theme,\r\n color,\r\n justifyContent,\r\n isMobileView,\r\n contentResponsivenessOption,\r\n isActiveItem,\r\n statementWidth,\r\n isShowLottieGesture,\r\n imageUrl,\r\n });\r\n const containerRef = React.useRef(null);\r\n const imageRef = React.useRef(null);\r\n const textContainerRef = React.useRef(null);\r\n const [forceUpdateKey] = React.useState(0);\r\n React.useEffect(() => {\r\n const container = containerRef.current;\r\n const image = imageRef.current;\r\n const wrapperContainer = imageWrapperRef.current;\r\n if (image) {\r\n image.addEventListener(\"load\", responsiveRender);\r\n } else {\r\n resizeFont();\r\n }\r\n\r\n return () => {\r\n image && image.removeEventListener(\"load\", responsiveRender);\r\n };\r\n\r\n function responsiveRender() {\r\n resizeCarousel(image, container, wrapperContainer);\r\n resizeFont();\r\n }\r\n\r\n function resizeFont() {\r\n const fontSize = getFontSize(container);\r\n container.style.fontSize = `${fontSize}px`;\r\n }\r\n }, [imageUrl, isMobileView, contentResponsivenessOption]);\r\n const isStatementHasContent = text.replace(\"<br>\", \"\").trim().length > 0;\r\n const resizeCarousel = (image, container, wrapperContainer) => {\r\n if (!image) return;\r\n const originalWidth = image.naturalWidth;\r\n const isSmallImage = statementWidth > originalWidth;\r\n const imageWidth = statementWidth < originalWidth ? \"100%\" : `${originalWidth}px`;\r\n image.style.width = imageWidth;\r\n container.style.width = `${statementWidth}px`;\r\n if (isSmallImage) {\r\n wrapperContainer.style.paddingTop = \"16px\";\r\n }\r\n if (isSmallImage && !isStatementHasContent) {\r\n wrapperContainer.style.paddingBottom = \"16px\";\r\n }\r\n };\r\n\r\n const getFontSize = (container) => {\r\n const DEFAULT_FONT_SIZE = 16;\r\n const MINIMUM_FONT_SIZE = 12;\r\n const MAXIMUM_FONT_SIZE = 30;\r\n const containerWidth = container.offsetWidth;\r\n const canvas = document.createElement(\"canvas\");\r\n const context = canvas.getContext(\"2d\");\r\n\r\n context.font = `${DEFAULT_FONT_SIZE}px sans-serif`;\r\n const textWidth = context.measureText(text).width;\r\n\r\n let fontSize = Math.floor((containerWidth / textWidth) * DEFAULT_FONT_SIZE);\r\n fontSize = Math.max(fontSize, MINIMUM_FONT_SIZE);\r\n fontSize = Math.min(fontSize, MAXIMUM_FONT_SIZE);\r\n\r\n if (textWidth < containerWidth && fontSize < DEFAULT_FONT_SIZE) {\r\n fontSize = DEFAULT_FONT_SIZE;\r\n }\r\n if (contentResponsivenessOption === RESIZE_CAROUSEL) {\r\n fontSize = DEFAULT_FONT_SIZE;\r\n }\r\n return fontSize;\r\n };\r\n\r\n const ClampedHTML = ({ htmlContent, elementId }) => {\r\n return (\r\n <span\r\n className={isActiveItem ? \"active-statement\" : \"\"}\r\n id={elementId}\r\n style={{\r\n display: \"block\",\r\n WebkitLineClamp: \"unset\",\r\n WebkitBoxOrient: \"unset\",\r\n overflow: \"hidden\",\r\n textOverflow: \"clip\",\r\n wordWrap: \"break-word\",\r\n lineHeight: \"1.2em\",\r\n }}\r\n dangerouslySetInnerHTML={{ __html: htmlContent }}\r\n />\r\n );\r\n };\r\n\r\n const [touchStartX, setTouchStartX] = React.useState(null);\r\n const [touchEndX, setTouchEndX] = React.useState(null);\r\n const SWIPE_THRESHOLD = 20; // Minimum distance for a valid swipe\r\n\r\n React.useEffect(() => {\r\n const handleTouchStart = (e) => {\r\n setTouchStartX(e.touches[0].clientX);\r\n setTouchEndX(null); // Reset touch end\r\n };\r\n\r\n const handleTouchMove = (e) => {\r\n setTouchEndX(e.touches[0].clientX);\r\n };\r\n\r\n const handleTouchEnd = () => {\r\n if (touchStartX === null || touchEndX === null) return;\r\n\r\n const deltaX = touchStartX - touchEndX;\r\n if (Math.abs(deltaX) > SWIPE_THRESHOLD) {\r\n if (deltaX > 0) {\r\n props.handleSwipe(\"next\"); // Swipe Left detected\r\n } else {\r\n props.handleSwipe(\"prev\"); // Swipe Right detected\r\n }\r\n }\r\n // Reset swipe values\r\n setTouchStartX(null);\r\n setTouchEndX(null);\r\n };\r\n\r\n const element = containerRef.current;\r\n if (element) {\r\n element.addEventListener(\"touchstart\", handleTouchStart);\r\n element.addEventListener(\"touchmove\", handleTouchMove);\r\n element.addEventListener(\"touchend\", handleTouchEnd);\r\n }\r\n\r\n return () => {\r\n if (element) {\r\n element.removeEventListener(\"touchstart\", handleTouchStart);\r\n element.removeEventListener(\"touchmove\", handleTouchMove);\r\n element.removeEventListener(\"touchend\", handleTouchEnd);\r\n }\r\n };\r\n }, [touchStartX, touchEndX]);\r\n\r\n return (\r\n <div className={classes.statement} id={id} ref={containerRef}>\r\n {imageUrl && (\r\n <span className=\"image-wrapper\" ref={imageWrapperRef}>\r\n <img className={`image-element`} src={imageUrl} ref={imageRef} alt={imageUrl} />\r\n </span>\r\n )}\r\n {isStatementHasContent && (\r\n <div className=\"statementTextContent\" aria-hidden=\"false\" ref={textContainerRef}>\r\n <ClampedHTML\r\n elementId=\"statementTextContent\"\r\n htmlContent={text.trim()}\r\n key={forceUpdateKey}\r\n />\r\n </div>\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nconst WrapperWithNavigationButtons = ({\r\n classes,\r\n isPrevBtnActive,\r\n isNextBtnActive,\r\n handleNavigationButtonClick,\r\n backButtonText,\r\n nextButtonText,\r\n isNumberNavigation,\r\n carrouselActiveVariableIndex,\r\n sequencedVariables,\r\n mentions,\r\n}) => {\r\n const prevButtonRef = React.useRef(null);\r\n const nextButtonRef = React.useRef(null);\r\n const isKeyboardNavigation = React.useRef(false);\r\n\r\n React.useEffect(() => {\r\n if (!isPrevBtnActive && document.activeElement === prevButtonRef.current) {\r\n nextButtonRef.current.focus();\r\n } else if (!isNextBtnActive && document.activeElement === nextButtonRef.current) {\r\n prevButtonRef.current.focus();\r\n }\r\n isKeyboardNavigation.current = false;\r\n }, [isPrevBtnActive, isNextBtnActive]);\r\n\r\n return (\r\n <div className={classes.navigationButtonsPanel} role=\"radiogroup\">\r\n <div\r\n className=\"fixedWidth\"\r\n role=\"radio\"\r\n ref={prevButtonRef}\r\n aria-checked={isPrevBtnActive}\r\n tabIndex={isPrevBtnActive ? 0 : -1}\r\n onKeyDown={(event) => {\r\n if (event.key === \"Enter\" || event.key === \" \") {\r\n isKeyboardNavigation.current = true;\r\n handleNavigationButtonClick(\"prev\");\r\n }\r\n }}\r\n onClick={() => handleNavigationButtonClick(\"prev\")}\r\n aria-label={backButtonText}\r\n >\r\n {isPrevBtnActive && (\r\n <FontAwesomeIcon\r\n icon={[\"fas\", \"chevron-left\"]}\r\n fixedWidth\r\n className={classes.navigationButton}\r\n />\r\n )}\r\n </div>\r\n {(() => {\r\n if (isNumberNavigation) {\r\n return (\r\n <CounterNavigation\r\n carrouselActiveVariableIndex={carrouselActiveVariableIndex}\r\n totalLength={sequencedVariables.length}\r\n />\r\n );\r\n } else {\r\n return (\r\n <BulletNavigation\r\n mentions={mentions}\r\n carrouselActiveVariableIndex={carrouselActiveVariableIndex}\r\n sequencedVariables={sequencedVariables}\r\n classes={classes}\r\n />\r\n );\r\n }\r\n })()}\r\n <div\r\n className=\"fixedWidth\"\r\n role=\"radio\"\r\n ref={nextButtonRef}\r\n aria-checked={!isPrevBtnActive && isNextBtnActive}\r\n tabIndex={isNextBtnActive ? 0 : -1}\r\n onKeyDown={(event) => {\r\n if (event.key === \"Enter\" || event.key === \" \") {\r\n isKeyboardNavigation.current = true;\r\n handleNavigationButtonClick(\"next\");\r\n }\r\n }}\r\n onClick={() => handleNavigationButtonClick(\"next\")}\r\n aria-label={nextButtonText}\r\n >\r\n {isNextBtnActive && (\r\n <FontAwesomeIcon\r\n icon={[\"fas\", \"chevron-right\"]}\r\n fixedWidth\r\n className={classes.navigationButton}\r\n />\r\n )}\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nconst BulletNavigation = ({\r\n mentions,\r\n sequencedVariables,\r\n carrouselActiveVariableIndex,\r\n classes,\r\n}) => {\r\n const itemsToDisplay = 6;\r\n const showFirstEllipse =\r\n itemsToDisplay < sequencedVariables.length &&\r\n itemsToDisplay / 2 < carrouselActiveVariableIndex + 1;\r\n const showLastEllipse =\r\n itemsToDisplay < sequencedVariables.length &&\r\n carrouselActiveVariableIndex < sequencedVariables.length - 4;\r\n const fixedTransformValue = 25;\r\n const [transformValue, setTransformValue] = React.useState(0);\r\n React.useEffect(() => {\r\n let newTransformValue = transformValue;\r\n if (sequencedVariables.length > 6) {\r\n if (\r\n carrouselActiveVariableIndex > 2 &&\r\n sequencedVariables.length - carrouselActiveVariableIndex > 3\r\n ) {\r\n newTransformValue = -fixedTransformValue * (carrouselActiveVariableIndex - 2);\r\n } else if (carrouselActiveVariableIndex < 3) {\r\n newTransformValue = 0;\r\n } else if (newTransformValue == 0 && carrouselActiveVariableIndex > itemsToDisplay) {\r\n newTransformValue =\r\n -fixedTransformValue * (sequencedVariables.length - itemsToDisplay);\r\n }\r\n if (newTransformValue !== transformValue) {\r\n setTransformValue(newTransformValue); // Update state only if there's a change\r\n }\r\n }\r\n });\r\n return (\r\n <div className={classes.bulletNavigationPanel} role=\"radiogroup\">\r\n <div className=\"ellipse-item\">{showFirstEllipse && <div></div>}</div>\r\n <div className=\"bullets-container\">\r\n {sequencedVariables.map((variable, index) => {\r\n const activeItem = carrouselActiveVariableIndex === index;\r\n const answeredItem =\r\n mentions.hasOwnProperty(variable.name) && mentions[variable.name].length;\r\n const className =\r\n activeItem && answeredItem\r\n ? \"active-answered-item\"\r\n : activeItem && !answeredItem\r\n ? \"active-not-answered-item\"\r\n : \"\";\r\n return (\r\n <div\r\n key={index}\r\n style={{\r\n transform: `translateX(${transformValue}px)`,\r\n transition: \"transform 0.8s ease-in-out\",\r\n }}\r\n className={className}\r\n >\r\n {activeItem && answeredItem ? (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"18\"\r\n height=\"18\"\r\n viewBox=\"0 0 18 18\"\r\n fill=\"none\"\r\n >\r\n <rect\r\n x=\"0.5\"\r\n y=\"0.5\"\r\n width=\"17\"\r\n height=\"17\"\r\n rx=\"8.5\"\r\n stroke=\"white\"\r\n />\r\n <path\r\n d=\"M9 17C13.4187 17 17 13.4187 17 9C17 4.58125 13.4187 1 9 1C4.58125 1 1 4.58125 1 9C1 13.4187 4.58125 17 9 17ZM12.5312 7.53125L8.53125 11.5312C8.2375 11.825 7.7625 11.825 7.47188 11.5312L5.47188 9.53125C5.17813 9.2375 5.17813 8.7625 5.47188 8.47188C5.76562 8.18125 6.24062 8.17813 6.53125 8.47188L8 9.94063L11.4688 6.46875C11.7625 6.175 12.2375 6.175 12.5281 6.46875C12.8187 6.7625 12.8219 7.2375 12.5281 7.52812L12.5312 7.53125Z\"\r\n fill=\"#316AEE\"\r\n />\r\n </svg>\r\n ) : answeredItem && !activeItem ? (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"18\"\r\n height=\"18\"\r\n viewBox=\"0 0 18 18\"\r\n fill=\"none\"\r\n >\r\n <rect\r\n x=\"0.5\"\r\n y=\"0.5\"\r\n width=\"17\"\r\n height=\"17\"\r\n rx=\"8.5\"\r\n stroke=\"white\"\r\n />\r\n <path\r\n d=\"M9 17C13.4187 17 17 13.4187 17 9C17 4.58125 13.4187 1 9 1C4.58125 1 1 4.58125 1 9C1 13.4187 4.58125 17 9 17ZM12.5312 7.53125L8.53125 11.5312C8.2375 11.825 7.7625 11.825 7.47188 11.5312L5.47188 9.53125C5.17813 9.2375 5.17813 8.7625 5.47188 8.47188C5.76562 8.18125 6.24062 8.17813 6.53125 8.47188L8 9.94063L11.4688 6.46875C11.7625 6.175 12.2375 6.175 12.5281 6.46875C12.8187 6.7625 12.8219 7.2375 12.5281 7.52812L12.5312 7.53125Z\"\r\n fill=\"#316AEE\"\r\n />\r\n </svg>\r\n ) : activeItem && !answeredItem ? (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"20\"\r\n height=\"20\"\r\n viewBox=\"0 0 20 20\"\r\n fill=\"none\"\r\n >\r\n <circle\r\n cx=\"10\"\r\n cy=\"10\"\r\n r=\"8\"\r\n fill=\"#316AEE\"\r\n stroke=\"white\"\r\n strokeWidth=\"2\"\r\n />\r\n </svg>\r\n ) : (\r\n <div className=\"bullet\" role=\"radio\"></div>\r\n )}\r\n </div>\r\n );\r\n })}\r\n </div>\r\n <div className=\"ellipse-item\">{showLastEllipse && <div></div>}</div>\r\n </div>\r\n );\r\n};\r\nconst CounterNavigation = ({ carrouselActiveVariableIndex, totalLength }) => {\r\n return (\r\n <div\r\n className=\"counter-navigation\"\r\n aria-label={`${carrouselActiveVariableIndex + 1}/${totalLength}`}\r\n >{`${carrouselActiveVariableIndex + 1}/${totalLength}`}</div>\r\n );\r\n};\r\n\r\nexport function CarrouselControl(props: ControlProps) {\r\n const {\r\n question,\r\n sequencedVariables,\r\n validateSignal,\r\n mentions,\r\n questionnaire,\r\n isDesktopPreviewView,\r\n showSoftPrompt,\r\n } = props;\r\n const questionHasAtleastOneVariable = sequencedVariables && sequencedVariables.length > 0;\r\n\r\n // This condition only occurs if all the statements is eliminated then only question description is displayed\r\n if (!questionHasAtleastOneVariable) {\r\n return \"\";\r\n }\r\n\r\n const instanceId = `${question.id}_statement`;\r\n const isNumberNavigation = question.settings.NavigationStyle != \"Bullets\";\r\n let hideVariableBackArrow = false;\r\n let canLoopVariable = false;\r\n let advanceAutomatically = false;\r\n let choiceListAnswerType = QuestionType[QuestionType.CheckBox];\r\n let activeStatementMentionsCount = 0;\r\n const questionName = question.name;\r\n const dispatch = useDispatch();\r\n\r\n if (hasSetting(question, \"HideVariableBackArrow\")) {\r\n hideVariableBackArrow = getSettingBoolean(question, \"HideVariableBackArrow\");\r\n }\r\n\r\n if (hasSetting(question, \"LoopVariable\")) {\r\n canLoopVariable = getSettingBoolean(question, \"LoopVariable\");\r\n }\r\n\r\n if (hasSetting(question, \"AutoAdvanceVariable\")) {\r\n advanceAutomatically = getSettingBoolean(question, \"AutoAdvanceVariable\");\r\n }\r\n\r\n if (hasSetting(question, \"CarrouselChoiceListAnswerType\")) {\r\n choiceListAnswerType = getSettingString(question, \"CarrouselChoiceListAnswerType\");\r\n }\r\n\r\n const backButtonAlwaysVisible = canLoopVariable && !hideVariableBackArrow;\r\n const [language] = useLanguage();\r\n const theme = useTheme();\r\n const counter = React.useRef(1);\r\n const containerRef = React.useRef<HTMLDivElement>();\r\n const [deviceWidth] = React.useState<number>(window.innerWidth);\r\n const [deviceHeight] = React.useState<number>(window.innerHeight);\r\n const mobilePreview = useSelector((state: StoreState) => state.mobilePreview);\r\n const isMobileView = !isDesktopPreviewView && (deviceWidth <= 768 || mobilePreview);\r\n const backButtonAriaLabelText = translate(questionnaire.theme, \"BackButton\", language);\r\n const nextButtonAriaLabelText = translate(questionnaire.theme, \"NextButton\", language);\r\n const isAboveChoiceNavigation = question.settings?.NavigationDisplay?.includes(\"Above\") ?? true;\r\n const isBelowChoiceNavigation =\r\n question.settings?.NavigationDisplay?.includes(\"Below\") ?? false;\r\n const justifyContent = isMobileView ? \"space-between\" : \"center\";\r\n const classes = useStyles({ theme, isMobileView, justifyContent, isAboveChoiceNavigation });\r\n const [statementValidation, setStatementValidationCheck] = React.useState({\r\n action: \"NONE\",\r\n direction: \"NONE\",\r\n });\r\n const [directionSaved, setDirection] = React.useState(\"NONE\");\r\n const isPrevBtnActive = useSelector(\r\n (state: StoreState) => state.interview.carrousel[instanceId]?.isPrevBtnActive || false,\r\n );\r\n const isNextBtnActive = useSelector(\r\n (state: StoreState) => state.interview.carrousel[instanceId]?.isNextBtnActive || false,\r\n );\r\n const carrouselActiveVariableIndex = useSelector(\r\n (state: StoreState) => state.interview.carrousel[instanceId]?.activeVariableIndex || 0,\r\n );\r\n const errorMonitor = useSelector(\r\n (state: StoreState) => state.interview.validation.errorsByVariableName,\r\n );\r\n let prevErrorMonitorRef = React.useRef(null);\r\n let activeVariable = sequencedVariables[carrouselActiveVariableIndex];\r\n const [isCarouselVisible, setIsCarouselVisible] = React.useState(false);\r\n const [isFirstTimeRender, setIsFirstTimeRender] = React.useState(true);\r\n const [showLottieGesture, setShowLottieGesture] = React.useState(true);\r\n const isShowLottieGesture = showLottieGesture && isMobileView;\r\n React.useEffect(() => {\r\n const questionContainerHeight = containerRef.current?.offsetHeight;\r\n const observer = new IntersectionObserver(\r\n ([entry]) => {\r\n if (isMobileView) {\r\n setIsCarouselVisible(entry.isIntersecting); // Update visibility state\r\n }\r\n },\r\n {\r\n root: null, // Use the viewport as the root\r\n threshold: questionContainerHeight > deviceHeight ? 0.5 : 0.9, // Trigger based on viewport\r\n },\r\n );\r\n if (containerRef.current) {\r\n observer.observe(containerRef.current); // Start observing the carousel container\r\n }\r\n // Cleanup the observer on component unmount\r\n return () => {\r\n if (containerRef.current) {\r\n observer.unobserve(containerRef.current);\r\n }\r\n };\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n if (isCarouselVisible) {\r\n if (isFirstTimeRender) {\r\n setIsFirstTimeRender(false);\r\n if (showLottieGesture) {\r\n setTimeout(() => {\r\n setShowLottieGesture(false);\r\n }, 2000);\r\n }\r\n }\r\n }\r\n }, [isCarouselVisible]);\r\n // This condition occurs if due to statement elimination some variable got removed and greater active index is previously stored\r\n if (!activeVariable) {\r\n if (questionHasAtleastOneVariable && carrouselActiveVariableIndex !== 0) {\r\n // dispatch will be triggered with some delay then exception so setting active variable here\r\n activeVariable = sequencedVariables[0];\r\n dispatch(\r\n setCarrouselActiveVariableIndex(\r\n instanceId,\r\n 0,\r\n backButtonAlwaysVisible,\r\n canLoopVariable || counter.current !== sequencedVariables.length,\r\n ),\r\n );\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n\r\n const variableHasChoices =\r\n activeVariable && activeVariable.choiceList && activeVariable.choiceList.length > 0;\r\n const variableName = activeVariable.name;\r\n const isSoftPrompt = isQuestionSoftPrompt(question);\r\n const isRequired = isAnswerRequired(question, questionnaire) && !isSoftPrompt;\r\n const defaultMinRequiredAnswerValue = 1;\r\n\r\n const getMinRequiredAnswers = React.useCallback(() => {\r\n const number = getSettingNumber(question, \"MinRequiredAnswers\");\r\n if (number !== undefined && !Number.isNaN(number)) {\r\n return number === 0 ? defaultMinRequiredAnswerValue : number;\r\n }\r\n return null;\r\n }, [question, defaultMinRequiredAnswerValue]);\r\n\r\n const minRequiredAnswers = getMinRequiredAnswers();\r\n\r\n if (\r\n mentions &&\r\n Object.keys(mentions).length > 0 &&\r\n mentions[variableName] &&\r\n mentions[variableName].length > 0\r\n ) {\r\n activeStatementMentionsCount = mentions[variableName].length;\r\n }\r\n const activeStatementHasRequiredMentions =\r\n activeStatementMentionsCount >= (minRequiredAnswers ?? defaultMinRequiredAnswerValue);\r\n\r\n React.useEffect(() => {\r\n if (isSoftPrompt) {\r\n if (JSON.stringify(prevErrorMonitorRef.current) === JSON.stringify(errorMonitor)) {\r\n return;\r\n }\r\n\r\n prevErrorMonitorRef.current = errorMonitor;\r\n\r\n if (\r\n !errorMonitor ||\r\n !question ||\r\n !sequencedVariables ||\r\n sequencedVariables.length === 0\r\n ) {\r\n return;\r\n }\r\n if (errorMonitor.hasOwnProperty(question.name)) {\r\n const errors = errorMonitor[question.name];\r\n if (Array.isArray(errors) && errors.length > 0) {\r\n const lastError = errors[errors.length - 1];\r\n const errorVariableIndex = sequencedVariables.findIndex(\r\n (variable) => variable.name === lastError.varInfo,\r\n );\r\n counter.current = errorVariableIndex + 1;\r\n const newPrevBtnActive = backButtonAlwaysVisible || errorVariableIndex > 0;\r\n const newNextBtnActive =\r\n canLoopVariable || errorVariableIndex < sequencedVariables.length - 1;\r\n dispatch(\r\n setCarrouselActiveVariableIndex(\r\n instanceId,\r\n errorVariableIndex,\r\n newPrevBtnActive,\r\n newNextBtnActive,\r\n ),\r\n );\r\n }\r\n }\r\n }\r\n }, [errorMonitor]);\r\n\r\n React.useEffect(() => {\r\n if (statementValidation.action === \"VALIDATEMENTIONS\") {\r\n if (activeStatementHasRequiredMentions) {\r\n scrollHandler(statementValidation.direction, sequencedVariables);\r\n setStatementValidationCheck({\r\n action: \"MENTIONSVALIDATEDSUCCESSFULLY\",\r\n direction: \"NONE\",\r\n });\r\n dispatch(validationClear(true, true, [questionName]));\r\n } else {\r\n setStatementValidationCheck({\r\n action: \"SHOWMENTIONERROR\",\r\n direction: \"NONE\",\r\n });\r\n\r\n const errorKey =\r\n activeStatementMentionsCount === 0 ? \"IncompleteAnswer\" : \"InvalidChoicesMin\";\r\n\r\n const minChoices = minRequiredAnswers ?? defaultMinRequiredAnswerValue;\r\n\r\n const questionValidationError = {\r\n [questionName]: [\r\n { key: errorKey, softPrompt: showSoftPrompt, args: { min: minChoices } },\r\n ],\r\n };\r\n\r\n dispatch(\r\n validationSetResult({\r\n errorsByVariableName: questionValidationError,\r\n isValid: false,\r\n }),\r\n );\r\n }\r\n }\r\n }); // Runs every time cause mention might get changed\r\n\r\n React.useEffect(() => {\r\n const index = counter.current - 1;\r\n const canLoop = canLoopVariable || counter.current !== sequencedVariables.length;\r\n\r\n dispatch(\r\n setCarrouselActiveVariableIndex(instanceId, index, backButtonAlwaysVisible, canLoop),\r\n );\r\n }, []); // Runs once on component mount\r\n\r\n const scrollHandler = (direction, vars) => {\r\n const isPrev = direction === \"prev\";\r\n\r\n // eslint-disable-next-line no-nested-ternary\r\n counter.current = isPrev\r\n ? canLoopVariable && counter.current === 1\r\n ? vars.length\r\n : counter.current - 1\r\n : canLoopVariable && counter.current === vars.length\r\n ? 1\r\n : Math.min(counter.current + 1, sequencedVariables.length);\r\n\r\n const newPrevBtnActive = isPrev\r\n ? backButtonAlwaysVisible || counter.current > 1\r\n : !hideVariableBackArrow;\r\n\r\n const newNextBtnActive = canLoopVariable || counter.current !== sequencedVariables.length;\r\n if (directionSaved !== direction) {\r\n setDirection(direction);\r\n }\r\n dispatch(\r\n setCarrouselActiveVariableIndex(\r\n instanceId,\r\n counter.current - 1,\r\n newPrevBtnActive,\r\n newNextBtnActive,\r\n ),\r\n );\r\n dispatch(validationClear(true, true, [questionName]));\r\n };\r\n\r\n const handleNavigationButtonClick = React.useCallback(\r\n (direction, isAfterSelectionAction = false) => {\r\n // If no choices is there then no validation check on arrow click (Can be due to elimination process)\r\n if (variableHasChoices) {\r\n const notRequiredButMinChoiceIsDefinedValidation =\r\n !isRequired &&\r\n minRequiredAnswers &&\r\n activeStatementMentionsCount !== 0 &&\r\n !activeStatementHasRequiredMentions;\r\n\r\n // For automatically advance(radio only) and prev button click move to next statement\r\n if (isAfterSelectionAction || (direction === \"prev\" && !canLoopVariable)) {\r\n scrollHandler(direction, sequencedVariables);\r\n } else if (isRequired || notRequiredButMinChoiceIsDefinedValidation) {\r\n setStatementValidationCheck({\r\n action: \"VALIDATEMENTIONS\",\r\n direction,\r\n });\r\n } else {\r\n scrollHandler(direction, sequencedVariables);\r\n }\r\n } else {\r\n scrollHandler(direction, sequencedVariables);\r\n }\r\n },\r\n [\r\n isRequired,\r\n sequencedVariables,\r\n minRequiredAnswers,\r\n activeStatementMentionsCount,\r\n activeStatementHasRequiredMentions,\r\n variableHasChoices,\r\n ],\r\n );\r\n\r\n const onAfterCarouselChoiceSelection = React.useCallback(\r\n (isAfterSelectionAction) => {\r\n if (\r\n advanceAutomatically &&\r\n choiceListAnswerType === QuestionType[QuestionType.RadioButton]\r\n ) {\r\n if (sequencedVariables.length - 1 > carrouselActiveVariableIndex) {\r\n handleNavigationButtonClick(\"next\", isAfterSelectionAction);\r\n }\r\n }\r\n },\r\n [\r\n sequencedVariables,\r\n carrouselActiveVariableIndex,\r\n advanceAutomatically,\r\n choiceListAnswerType,\r\n handleNavigationButtonClick,\r\n ],\r\n );\r\n\r\n useValidation(validateSignal, useDiscreteVariadicValidator(question, sequencedVariables));\r\n\r\n const commonProps = {\r\n isNextBtnActive,\r\n isPrevBtnActive,\r\n handleNavigationButtonClick,\r\n classes,\r\n carrouselActiveVariableIndex,\r\n isNumberNavigation,\r\n sequencedVariables,\r\n mentions,\r\n };\r\n\r\n const gap = isMobileView ? MOBILE_VIEW_GAP : DESKTOP_VIEW_GAP;\r\n const borderWidth = 1;\r\n const noOfSides = 2; // both side value i.e left and right\r\n const bordersTotalWidth = noOfSides * borderWidth;\r\n let statementWidth;\r\n if (isMobileView && deviceWidth < 550) {\r\n statementWidth =\r\n deviceWidth -\r\n (noOfSides * OFFSET_MARGIN_FOR_MOBILE +\r\n noOfSides * MOBILE_VIEW_GAP +\r\n noOfSides * PARTIAL_WIDTH_FOR_MOBILE);\r\n } else if (isDesktopPreviewView != null && !isDesktopPreviewView && deviceWidth > 768) {\r\n statementWidth = MOBILE_DIMENSIONS;\r\n } else {\r\n statementWidth = DESKTOP_STATEMENT_WIDTH;\r\n }\r\n const itemWidth = statementWidth + bordersTotalWidth;\r\n const TOTAL_ITEM_WIDTH =\r\n itemWidth * sequencedVariables.length - 1 + gap * (sequencedVariables.length - 3);\r\n const transformValue =\r\n TOTAL_ITEM_WIDTH / 2 -\r\n itemWidth / 2 +\r\n gap -\r\n (itemWidth + gap) * carrouselActiveVariableIndex;\r\n const handleSwipe = (direction) => {\r\n handleNavigationButtonClick(direction);\r\n };\r\n return (\r\n <div className={classes.container} ref={containerRef}>\r\n <div className={classes.statementsContainer}>\r\n {sequencedVariables.map((variable, index) => (\r\n <div\r\n key={variable.name}\r\n style={{\r\n transform: `translateX(${transformValue}px)`,\r\n transition: \"transform 0.8s ease-in-out\",\r\n }}\r\n >\r\n {index === 0 && isShowLottieGesture && isCarouselVisible && (\r\n <img src={lottieGif} className=\"lottie-gesture\" />\r\n )}\r\n <Statement\r\n id={variable.elementId}\r\n key={variable.name}\r\n color={getSettingString(variable, \"Color\", \"#F2F2F2\")}\r\n text={translate(variable, \"text\", language)}\r\n imageUrl={translate(variable, \"imageUrl\", language)}\r\n isMobileView={isMobileView}\r\n isActiveItem={carrouselActiveVariableIndex === index}\r\n statementWidth={statementWidth}\r\n handleSwipe={handleSwipe}\r\n isShowLottieGesture={isShowLottieGesture}\r\n />\r\n </div>\r\n ))}\r\n </div>\r\n {isAboveChoiceNavigation ? (\r\n <WrapperWithNavigationButtons\r\n {...commonProps}\r\n backButtonText={backButtonAriaLabelText}\r\n nextButtonText={nextButtonAriaLabelText}\r\n />\r\n ) : (\r\n \"\"\r\n )}\r\n <div className={classes.choiceAndNavigationContainer}>\r\n <ControlContainer\r\n controlType={ChoiceListControl}\r\n onAfterSelection={() => {\r\n onAfterCarouselChoiceSelection(true);\r\n }}\r\n isSingleOnPage={props.isSingleOnPage}\r\n onNavigation={props.onNavigation}\r\n {...getRendererProps(props)}\r\n />\r\n {isBelowChoiceNavigation ? (\r\n <WrapperWithNavigationButtons\r\n {...commonProps}\r\n backButtonText={backButtonAriaLabelText}\r\n nextButtonText={nextButtonAriaLabelText}\r\n />\r\n ) : (\r\n \"\"\r\n )}\r\n </div>\r\n </div>\r\n );\r\n}\r\n","import React from \"react\";\r\nimport { DispatchProp } from \"react-redux\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { AutoCompleteControl } from \"../controls/AutoCompleteControl\";\r\nimport { TextBoxControl } from \"../controls/TextBoxControl\";\r\nimport { ChoiceListControl } from \"../controls/ChoiceListControl\";\r\nimport { QuestionType } from \"../../models/enums/QuestionType\";\r\nimport { ControlContainer } from \"../../containers/controls/ControlContainer\";\r\nimport { DrillDownControl } from \"../controls/DrillDownControl\";\r\nimport { GridControl } from \"../controls/GridControl\";\r\nimport { SliderControl } from \"../controls/SliderControl\";\r\nimport { ImageAreaControl } from \"../controls/ImageAreaControl\";\r\nimport { FileUploadControl } from \"../controls/FileUploadControl\";\r\nimport { DateTimeControl } from \"../controls/DateTimeControl\";\r\nimport { CardSortControl } from \"../controls/CardSortControl\";\r\nimport { NullControl } from \"../controls/NullControl\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\nimport { LookupTableControl } from \"../controls/LookupTableControl\";\r\nimport { CustomHtmlControl } from \"../controls/CustomHtmlControl\";\r\nimport { DropDownControl } from \"../controls/DropDownControl\";\r\nimport { UndefinedControl } from \"../controls/UndefinedControl\";\r\nimport { NavigationType } from \"../../models/enums/NavigationType\";\r\nimport { NumericRankingControl } from \"../controls/NumericRankingControl\";\r\nimport { RunningTotalControl } from \"../controls/RunningTotalControl\";\r\nimport { TimerControl } from \"../controls/TimerControl\";\r\nimport { NetPromoterControl } from \"../controls/NetPromoterControl\";\r\nimport { Signal } from \"../../signals\";\r\nimport { SignalListener } from \"../shared/SignalListener\";\r\nimport { ValidationBuilder } from \"../../models/builders/ValidationBuilder\";\r\nimport { ThemeModel } from \"../../models/ThemeModel\";\r\nimport { QuestionnaireModel } from \"../../models/QuestionnaireModel\";\r\nimport { DeviceModel } from \"../../models/DeviceModel\";\r\nimport { isNullOrEmpty } from \"../../utils\";\r\nimport { ValidationOptionsModel } from \"../../models/ValidationOptionsModel\";\r\nimport { QuestionContext } from \"../../hooks/useQuestion\";\r\nimport { SignatureControl } from \"../controls/SignatureControl\";\r\nimport { isQuestionSoftPrompt } from \"../../models/utilities/questionUtilities\";\r\nimport { DragDropControl } from \"../controls/DragDropControl\";\r\nimport { isInputRequired } from \"../../models/utilities/questionnaireUtilities\";\r\nimport QuestionRenderer from \"../renderers/v2/QuestionRenderer\";\r\nimport { setVariableMentions } from \"../../redux/actions\";\r\nimport { Voxco } from \"../../public\";\r\nimport { VariableType } from \"../../models/enums/VariableType\";\r\nimport { __getStore__ } from \"../../redux/store\";\r\nimport { getMentions } from \"../../redux/reducers/interview/variablesUtilities\";\r\nimport { getCurrentLoop } from \"../../redux/reducers/interview/navigationUtilities\";\r\nimport { TextHighlighterControl } from \"../controls/TextHighlighterControl\";\r\nimport { HeatMapControl } from \"../controls/HeatMapControl\";\r\nimport { CarrouselControl } from \"../controls/CarrouselControl\";\r\n\r\ninterface Props extends DispatchProp {\r\n isHidden?: boolean;\r\n question: QuestionModel;\r\n isSingleOnPage: boolean;\r\n questionnaire: QuestionnaireModel;\r\n device: DeviceModel;\r\n language: string;\r\n validateSignal?: Signal<ValidationOptionsModel, ValidationResultModel>;\r\n onNavigation(type: NavigationType): void;\r\n isNavigationDisabled: boolean;\r\n validationResult?: ValidationResultModel;\r\n theme: ThemeModel;\r\n isDesktopPreviewView?: boolean;\r\n}\r\n\r\nexport class Question extends React.PureComponent<Props> {\r\n validateSignal = new Signal<ValidationOptionsModel, ValidationResultModel>();\r\n\r\n constructor(props: Props) {\r\n super(props);\r\n this.state = {};\r\n }\r\n\r\n componentDidMount() {\r\n this.questionReady();\r\n }\r\n\r\n UNSAFE_componentWillReceiveProps(nextProps: Props) {\r\n const { question, isHidden, isNavigationDisabled, dispatch } = this.props;\r\n const differentQuestion = nextProps.question !== question;\r\n if (differentQuestion) {\r\n this.validateSignal = new Signal<ValidationOptionsModel, ValidationResultModel>();\r\n }\r\n if (!isNavigationDisabled && nextProps.isHidden && (!isHidden || differentQuestion)) {\r\n const nextQuestion = nextProps.question;\r\n if (nextQuestion.type !== QuestionType.RespondentMetaData) {\r\n nextQuestion.variableNames.forEach((v) =>\r\n dispatch(setVariableMentions(v, (b) => b.clear())),\r\n );\r\n }\r\n }\r\n }\r\n\r\n // Not really needing this right now, maybe we need it for further requirements\r\n componentDidUpdate() {\r\n this.questionReady();\r\n }\r\n\r\n getErrors(result: ValidationResultModel) {\r\n const { question } = this.props;\r\n return result.errorsByVariableName[question.name] || [];\r\n }\r\n\r\n getControlType(question: QuestionModel) {\r\n switch (question.type) {\r\n case QuestionType.CheckBox:\r\n case QuestionType.ImageSelector:\r\n case QuestionType.RadioButton:\r\n return ChoiceListControl;\r\n\r\n case QuestionType.DropDownList:\r\n case QuestionType.RespondentTimeZone:\r\n case QuestionType.RespondentLanguage:\r\n return DropDownControl;\r\n\r\n case QuestionType.AutoComplete:\r\n return AutoCompleteControl;\r\n\r\n case QuestionType.NumericAnswer:\r\n case QuestionType.EmailAddressAnswer:\r\n case QuestionType.OpenEndAnswer:\r\n case QuestionType.RespondentEmail:\r\n case QuestionType.RespondentPhone:\r\n case QuestionType.TextAnswer:\r\n return TextBoxControl;\r\n\r\n case QuestionType.ChoiceGrid:\r\n case QuestionType.HybridGrid:\r\n case QuestionType.ImageChoiceGrid:\r\n case QuestionType.StarRatingGrid:\r\n return GridControl;\r\n\r\n case QuestionType.ImageAreaEvaluator:\r\n case QuestionType.ImageAreaSelector:\r\n return ImageAreaControl;\r\n\r\n case QuestionType.NetPromoter:\r\n return NetPromoterControl;\r\n case QuestionType.RunningTotal:\r\n return RunningTotalControl;\r\n case QuestionType.NumericRanking:\r\n return NumericRankingControl;\r\n case QuestionType.CardSort:\r\n return CardSortControl;\r\n case QuestionType.CustomQuestion:\r\n return CustomHtmlControl;\r\n case QuestionType.DateTimeAnswer:\r\n return DateTimeControl;\r\n case QuestionType.DragDropRanking:\r\n return DragDropControl;\r\n case QuestionType.DrillDown:\r\n return DrillDownControl;\r\n case QuestionType.FileUpload:\r\n return FileUploadControl;\r\n case QuestionType.LookupTable:\r\n return LookupTableControl;\r\n case QuestionType.Signature:\r\n return SignatureControl;\r\n case QuestionType.Slider:\r\n return SliderControl;\r\n case QuestionType.Timer:\r\n return TimerControl;\r\n case QuestionType.RespondentMetaData:\r\n case QuestionType.Description:\r\n return NullControl;\r\n case QuestionType.TextHighlighter:\r\n return TextHighlighterControl;\r\n case QuestionType.HeatMap:\r\n return HeatMapControl;\r\n case QuestionType.Carrousel:\r\n return CarrouselControl;\r\n default:\r\n return UndefinedControl;\r\n }\r\n }\r\n\r\n onValidate = (options?: ValidationOptionsModel): ValidationResultModel => {\r\n // Get the validation result.\r\n return this.validateControl(options);\r\n };\r\n\r\n getControl(question: QuestionModel) {\r\n const {\r\n questionnaire,\r\n validationResult,\r\n validateSignal,\r\n isHidden,\r\n isSingleOnPage,\r\n onNavigation,\r\n isDesktopPreviewView,\r\n } = this.props;\r\n\r\n const showSoftPrompt =\r\n isInputRequired(questionnaire) &&\r\n isQuestionSoftPrompt(question) &&\r\n this.hasSoftPromptError(validationResult);\r\n\r\n return (\r\n <>\r\n <SignalListener signal={validateSignal} handler={this.onValidate} />\r\n {!isHidden && (\r\n <ControlContainer\r\n question={question}\r\n isSingleOnPage={isSingleOnPage}\r\n validateSignal={this.validateSignal}\r\n showSoftPrompt={showSoftPrompt}\r\n onNavigation={onNavigation}\r\n controlType={this.getControlType(question)}\r\n isDesktopPreviewView={isDesktopPreviewView}\r\n />\r\n )}\r\n </>\r\n );\r\n }\r\n\r\n hasMentions = (question: QuestionModel) => {\r\n const { interview } = __getStore__().getState();\r\n const matrix = getCurrentLoop(interview.navigation);\r\n return question.variables\r\n .filter((v) => v.type !== VariableType.Computed)\r\n .some(\r\n (v) =>\r\n getMentions(interview.variables, v.name, matrix).filter(\r\n (m) => !isNullOrEmpty(m.value),\r\n ).length > 0,\r\n );\r\n };\r\n\r\n hasSoftPromptError = (validationResult: ValidationResultModel): boolean =>\r\n Object.keys(validationResult.errorsByVariableName)\r\n .map((variable) => validationResult.errorsByVariableName[variable])\r\n .reduce((acc, current) => (current ? acc.concat(current) : acc), [])\r\n .some((error) => error.softPrompt);\r\n\r\n questionReady = () => {\r\n const { question } = this.props;\r\n Voxco.trigger(\"questionReady\", question);\r\n };\r\n\r\n validateControl(options?: ValidationOptionsModel): ValidationResultModel {\r\n const { isHidden } = this.props;\r\n if (isHidden) {\r\n return new ValidationBuilder().build();\r\n }\r\n // Validate and reduce results.\r\n const results = this.validateSignal.dispatch(options);\r\n const initialValidationState = { isValid: true, errorsByVariableName: {} };\r\n return results.reduce(\r\n (a, b) => ({\r\n isValid: a.isValid && b.isValid,\r\n errorsByVariableName: { ...a.errorsByVariableName, ...b.errorsByVariableName },\r\n }),\r\n initialValidationState,\r\n );\r\n }\r\n\r\n renderControl(question: QuestionModel) {\r\n const {\r\n questionnaire,\r\n isHidden,\r\n validationResult,\r\n language,\r\n theme,\r\n isDesktopPreviewView,\r\n } = this.props;\r\n return (\r\n <QuestionContext.Provider value={question}>\r\n <QuestionRenderer\r\n isHidden={isHidden}\r\n questionnaire={questionnaire}\r\n question={question}\r\n control={this.getControl(question)}\r\n validationResult={validationResult}\r\n language={language}\r\n theme={theme}\r\n isDesktopPreviewView={isDesktopPreviewView}\r\n />\r\n </QuestionContext.Provider>\r\n );\r\n }\r\n\r\n render() {\r\n const { question } = this.props;\r\n if (question.type === QuestionType.RespondentMetaData) return null;\r\n return this.renderControl(question);\r\n }\r\n}\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { setIsFormFocused } from \"../../../redux/actions\";\r\n\r\ninterface Props {\r\n isFormInputFocused: boolean;\r\n}\r\n\r\nexport default function InputFocusRenderer(props: Props) {\r\n const { isFormInputFocused } = props;\r\n const dispatch = useDispatch();\r\n\r\n React.useEffect(() => {\r\n if (!isFormInputFocused) {\r\n const questionToFocus = document.querySelector(\".question--error\");\r\n if (questionToFocus) {\r\n if (questionToFocus.scrollIntoView) {\r\n questionToFocus.scrollIntoView(true);\r\n }\r\n const inputToFocus: HTMLElement = questionToFocus.querySelector(\r\n '.allowFocusOnQuestion, button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])',\r\n );\r\n\r\n if (inputToFocus) {\r\n inputToFocus.focus();\r\n\r\n dispatch(setIsFormFocused(true));\r\n }\r\n }\r\n }\r\n });\r\n\r\n return <></>;\r\n}\r\n","import React from \"react\";\r\nimport { connect, DispatchProp } from \"react-redux\";\r\nimport { createSelector } from \"reselect\";\r\nimport { pick } from \"../../utils/lodash\";\r\nimport { StoreState } from \"../../models/states/StoreState\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { InterviewState } from \"../../models/states/InterviewState\";\r\nimport { __isQuestionVisible__ } from \"../../expressions/parser\";\r\nimport { NavigationType } from \"../../models/enums/NavigationType\";\r\nimport { Question } from \"../../components/page/Question\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\nimport { Signal } from \"../../signals\";\r\nimport { SignalListener } from \"../../components/shared/SignalListener\";\r\nimport { ThemeModel } from \"../../models/ThemeModel\";\r\nimport { QuestionnaireModel } from \"../../models/QuestionnaireModel\";\r\nimport { DeviceModel } from \"../../models/DeviceModel\";\r\nimport { ValidationOptionsModel } from \"../../models/ValidationOptionsModel\";\r\nimport InputFocusRenderer from \"../../components/renderers/v2/InputFocusRenderer\";\r\nimport { isAutoAdvanceExcluded } from \"../../models/utilities/questionUtilities\";\r\nimport { QuestionType } from \"../../models/enums/QuestionType\";\r\nimport { selectNavigationDisabled } from \"../../redux/selectors/interview/navigation\";\r\n\r\ninterface Props {\r\n questions: QuestionModel[];\r\n questionnaire: QuestionnaireModel;\r\n matrixIndex: number;\r\n language: string;\r\n validateSignal: Signal<ValidationOptionsModel, ValidationResultModel>;\r\n onNavigation(type: NavigationType): void;\r\n theme: ThemeModel;\r\n isDesktopPreviewView?: boolean;\r\n}\r\n\r\ninterface StateProps {\r\n device: DeviceModel;\r\n interview: InterviewState;\r\n validationByQuestion: ValidationResultModel[];\r\n isNavigationDisabled: boolean;\r\n isDesktopPreviewView?: boolean;\r\n isFormInputFocused: boolean;\r\n}\r\n\r\ntype PropsU = Props & StateProps & DispatchProp;\r\n\r\nclass QuestionListContainerImpl extends React.PureComponent<PropsU> {\r\n validateSignal = new Signal<ValidationOptionsModel, ValidationResultModel>();\r\n\r\n componentDidUpdate(prevProps: PropsU) {\r\n const { questions } = this.props;\r\n // On page change scroll to the first question.\r\n if (prevProps.questions !== questions) {\r\n this.scrollToFirstQuestion();\r\n }\r\n }\r\n\r\n onValidate = (options?: ValidationOptionsModel): ValidationResultModel => {\r\n const results = this.validateSignal.dispatch(options);\r\n const initialValidationState = { isValid: true, errorsByVariableName: {} };\r\n return results.reduce(\r\n (a, b) => ({\r\n isValid: a.isValid && b.isValid,\r\n errorsByVariableName: { ...a.errorsByVariableName, ...b.errorsByVariableName },\r\n }),\r\n initialValidationState,\r\n );\r\n };\r\n\r\n scrollToFirstQuestion() {\r\n const firstQuestion = document.getElementsByClassName(\"questionBlock\")[0];\r\n if (firstQuestion != null) {\r\n firstQuestion.scrollIntoView(true);\r\n }\r\n }\r\n\r\n render() {\r\n const {\r\n validateSignal,\r\n questions,\r\n dispatch,\r\n questionnaire,\r\n device,\r\n matrixIndex,\r\n interview,\r\n language,\r\n validationByQuestion,\r\n onNavigation,\r\n theme,\r\n isNavigationDisabled,\r\n isFormInputFocused,\r\n isDesktopPreviewView,\r\n } = this.props;\r\n return (\r\n <main className=\"question-list\" id=\"maincontent\">\r\n <SignalListener signal={validateSignal} handler={this.onValidate} />\r\n {questions.map((q, i) => (\r\n <Question\r\n question={q}\r\n dispatch={dispatch}\r\n key={`${q.elementId}.row(${matrixIndex})`}\r\n questionnaire={questionnaire}\r\n device={device}\r\n isHidden={!__isQuestionVisible__(q, interview)}\r\n isSingleOnPage={\r\n questions.filter((pageQuestion) => !isAutoAdvanceExcluded(pageQuestion))\r\n .length === 1\r\n }\r\n validateSignal={this.validateSignal}\r\n language={language}\r\n validationResult={validationByQuestion[i]}\r\n onNavigation={onNavigation}\r\n isNavigationDisabled={isNavigationDisabled}\r\n theme={theme}\r\n isDesktopPreviewView={isDesktopPreviewView}\r\n />\r\n ))}\r\n <InputFocusRenderer isFormInputFocused={isFormInputFocused} />\r\n </main>\r\n );\r\n }\r\n}\r\n\r\nconst getQuestions = (state: StoreState) => {\r\n if (!state.interview.navigation.currentPage) {\r\n return [];\r\n }\r\n return state.interview.navigation.currentPage.questions;\r\n};\r\n\r\nconst getValidation = (state: StoreState) => state.interview.validation;\r\n\r\nconst getIsFormInputFocused = (state: StoreState) => state.isFormInputFocused;\r\n\r\nfunction QuestionIsMultiVariableType(question) {\r\n switch (question.type) {\r\n case QuestionType.CardSort:\r\n case QuestionType.TextHighlighter:\r\n case QuestionType.ImageAreaEvaluator:\r\n case QuestionType.Carrousel:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\nconst getValidationForQuestion = createSelector(\r\n (validation: ValidationResultModel) => validation,\r\n (_validation, question: QuestionModel) => question,\r\n (validation, question) => {\r\n let errorsByVariableName = null;\r\n if (!QuestionIsMultiVariableType(question)) {\r\n errorsByVariableName = pick(validation.errorsByVariableName, [\r\n ...question.variableNames,\r\n question.name,\r\n ]);\r\n } else {\r\n errorsByVariableName = pick(validation.errorsByVariableName, [question.name]);\r\n }\r\n\r\n return { isValid: Object.entries(errorsByVariableName).length === 0, errorsByVariableName };\r\n },\r\n);\r\n\r\nconst getValidationByQuestion = createSelector(\r\n getValidation,\r\n getQuestions,\r\n (validation, questions) =>\r\n questions.map((question) => getValidationForQuestion(validation, question)),\r\n);\r\n\r\nconst mapStateToProps = (state: StoreState, props: Props): Props & StateProps => ({\r\n ...props,\r\n device: state.interview.device,\r\n interview: state.interview,\r\n isNavigationDisabled: selectNavigationDisabled(state),\r\n validationByQuestion: getValidationByQuestion(state),\r\n isFormInputFocused: getIsFormInputFocused(state),\r\n});\r\n\r\nexport const QuestionListContainer = connect(mapStateToProps)(QuestionListContainerImpl);\r\n","import { createUseStyles } from \"react-jss\";\r\nimport { getSpacing } from \"../../../theme/Mixins\";\r\n\r\nexport default createUseStyles({\r\n navigation: {\r\n bottom: 0,\r\n composes: \"navigation\",\r\n left: 0,\r\n margin: ({ theme }) =>\r\n theme.BottomNavigationPosition === \"floating\" ? [[0, 0]] : \r\n [[getSpacing(theme, 29, theme.QuestionSpacing?.BetweenComponents), -6, 0, -6]],\r\n padding: ({ theme }) => [[getSpacing(theme, 0, theme.QuestionSpacing?.WithinComponents), 0]],\r\n position: ({ theme }) => theme.BottomNavigationPosition === \"floating\" && \"fixed\",\r\n right: 0,\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n justifyContent: \"space-between\",\r\n },\r\n navigationLeft: {\r\n marginRight: \"5%\",\r\n flex: \"1 1 auto\",\r\n display: \"flex\",\r\n justifyContent: \"flex-start\",\r\n flexWrap: \"nowrap\",\r\n \"& > .button\": {\r\n flexBasis: \"0 0 auto\",\r\n margin: [[\"0%\", \"8px\"]],\r\n padding: [[0, 12]],\r\n maxWidth: \"60%\",\r\n },\r\n maxWidth: \"50%\",\r\n },\r\n navigationCenter: {\r\n flex: \"1 1 auto\",\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n flexWrap: \"nowrap\",\r\n \"& > .button\": {\r\n flexBasis: \"0 0 auto\",\r\n margin: [[\"0%\", \"8px\"]],\r\n padding: [[0, 12]],\r\n maxWidth: \"60%\",\r\n },\r\n maxWidth: \"50%\",\r\n },\r\n navigationRight: {\r\n marginLeft: \"5%\",\r\n flex: \"1 1 auto\",\r\n display: \"flex\",\r\n flexWrap: \"nowrap\",\r\n justifyContent: \"flex-end\",\r\n \"& > .button\": {\r\n flexBasis: \"0 0 auto\",\r\n margin: [[\"0%\", \"8px\"]],\r\n padding: [[0, 12]],\r\n maxWidth: \"60%\",\r\n },\r\n maxWidth: \"50%\",\r\n },\r\n navigationButtonContainer: {\r\n width: \"100%\",\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n textAlign: \"center\",\r\n \"& .button\": {\r\n margin: ({ theme }) => theme.BottomNavigationPosition === \"floating\" && 0,\r\n borderRadius: ({ theme }) => theme.BottomNavigationPosition === \"floating\" && 0,\r\n },\r\n },\r\n navigationPlaceHolder: {\r\n display: \"flex\",\r\n }\r\n});\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\n\r\nimport useStyles from \"./NavigationBarRenderer.styles\";\r\nimport { NavigationType } from \"../../../models/enums/NavigationType\";\r\nimport { ThemeModel } from \"../../../models/ThemeModel\";\r\nimport { ShortcutModel } from \"../../../models/ShortcutModel\";\r\nimport Button from \"../../shared/Button\";\r\nimport useTranslatable from \"../../../hooks/useTranslatable\";\r\nimport useDimensionContext from \"../../../hooks/useDimensionContext\";\r\nimport useBlock from \"../../../hooks/useBlock\";\r\nimport { getSettingBoolean } from \"../../../models/utilities/settingUtilities\";\r\n\r\ninterface Props {\r\n surveyTheme: ThemeModel;\r\n disabled: boolean;\r\n shortcuts: ShortcutModel[];\r\n hasPreviousPage: boolean;\r\n hasNextPage: boolean;\r\n hideBackButton: boolean;\r\n onNavigateShortcut(shortcut: ShortcutModel): void;\r\n onNavigation(type: NavigationType): void;\r\n position: \"top\" | \"bottom\";\r\n}\r\n\r\nconst getButtons = (props: Props, theme: any): NavigationType[] => {\r\n const buttons: NavigationType[] = [];\r\n const { hasPreviousPage, hasNextPage, hideBackButton } = props;\r\n if (hasPreviousPage && !hideBackButton && theme.BackButtonVisible) {\r\n buttons.push(NavigationType.Back);\r\n }\r\n if (hasNextPage && theme.QuitButtonVisible) {\r\n buttons.push(NavigationType.Quit);\r\n }\r\n if (!hasNextPage && theme.SubmitButtonVisible) {\r\n buttons.push(NavigationType.Submit);\r\n } else {\r\n buttons.push(NavigationType.Next);\r\n }\r\n return buttons;\r\n};\r\n\r\ninterface ShortcutProps {\r\n shortcut: ShortcutModel;\r\n onClick(): void;\r\n}\r\n\r\nconst Shortcut = (props: ShortcutProps) => {\r\n const { onClick, shortcut } = props;\r\n\r\n const text = useTranslatable(shortcut, shortcut.blockName);\r\n return (\r\n <Button\r\n className=\"navigation__shortcut\"\r\n text={text}\r\n key={`Shortcut_${shortcut.blockName}`}\r\n onClick={onClick}\r\n data-block={shortcut.blockName}\r\n size=\"flex\"\r\n />\r\n );\r\n};\r\n\r\nconst getButtonAlignment = (theme, position) => {\r\n return {\r\n Back: getAlignmentClass(\r\n theme.BackButtonPlacement,\r\n position,\r\n theme.BackButtonDisplayBothTopBottom,\r\n ),\r\n Submit: getAlignmentClass(\r\n theme.SubmitButtonPlacement,\r\n position,\r\n theme.SubmitButtonDisplayBothTopBottom,\r\n ),\r\n Next: getAlignmentClass(\r\n theme.NextButtonPlacement,\r\n position,\r\n theme.NextButtonDisplayBothTopBottom,\r\n ),\r\n Quit: getAlignmentClass(\r\n theme.QuitButtonPlacement,\r\n position,\r\n theme.QuitButtonDisplayBothTopBottom,\r\n ),\r\n };\r\n};\r\n\r\nconst getAlignmentClass = (placement, position, displayBothTopBottom) => {\r\n if (placement.includes(position) || displayBothTopBottom) {\r\n if (placement.includes(\"left\")) {\r\n return \"navigationLeft\";\r\n }\r\n if (placement.includes(\"right\")) {\r\n return \"navigationRight\";\r\n }\r\n if (placement.includes(\"center\")) {\r\n return \"navigationCenter\";\r\n }\r\n }\r\n return null;\r\n};\r\n\r\ninterface NavigationButtonProps {\r\n disabled?: boolean;\r\n surveyTheme: ThemeModel;\r\n types: NavigationType[];\r\n visibleTypes: NavigationType[];\r\n onClick(type: NavigationType);\r\n placeholderWhenHidden?: boolean;\r\n size: \"flex\" | \"large\";\r\n}\r\n\r\nfunction NavigationButton(navButtonProps: NavigationButtonProps) {\r\n const {\r\n types,\r\n disabled,\r\n surveyTheme,\r\n onClick,\r\n visibleTypes,\r\n placeholderWhenHidden,\r\n size,\r\n } = navButtonProps;\r\n\r\n const theme = useTheme();\r\n\r\n const type = types.find((t) => visibleTypes.includes(t)) || types[0];\r\n const hidden = !visibleTypes.includes(type);\r\n\r\n const dimension = useDimensionContext();\r\n const isSmallScreen = dimension && dimension.maxWidth(500);\r\n const themeButtonKey = `${NavigationType[type]}Button`;\r\n const displayType = theme[`${themeButtonKey}Type`] || \"text\";\r\n const icon = theme[`${themeButtonKey}Icon`] ? theme[`${themeButtonKey}Icon`].split(\" \") : null;\r\n const iconOnHover = theme[`${themeButtonKey}IconOnHover`];\r\n const imageUrl = theme[`${themeButtonKey}ImageUrl`]\r\n ? theme[`${themeButtonKey}ImageUrl`].split(\" \")\r\n : null;\r\n\r\n const showText = displayType === \"text\" || displayType === \"textAndIcon\";\r\n const showIcon = displayType === \"icon\" || displayType === \"textAndIcon\";\r\n\r\n const className = `navigation__${NavigationType[type].toLowerCase()}`;\r\n const text = useTranslatable(surveyTheme, `${NavigationType[type]}Button`);\r\n const buttonType = NavigationType[type].toUpperCase();\r\n\r\n if (hidden && !placeholderWhenHidden) return null;\r\n\r\n return (\r\n <Button\r\n className={className}\r\n text={text}\r\n displayText={!isSmallScreen && showText}\r\n icon={icon}\r\n displayIcon={showIcon || isSmallScreen}\r\n iconPosition={type === NavigationType.Back ? \"start\" : \"end\"}\r\n iconOnHover={iconOnHover}\r\n hidden={hidden}\r\n disabled={disabled}\r\n onClick={!hidden ? () => onClick(type) : undefined}\r\n size={size}\r\n imageUrl={imageUrl}\r\n buttonType={buttonType}\r\n />\r\n );\r\n}\r\n\r\nexport default function NavigationBarRenderer(props: Props) {\r\n const { shortcuts, onNavigation, onNavigateShortcut, surveyTheme, disabled, position } = props;\r\n\r\n const theme: any = useTheme();\r\n const classes = useStyles({ theme });\r\n\r\n const block = useBlock();\r\n const displayShortcuts = block && getSettingBoolean(block, \"DisplayShortcuts\");\r\n\r\n const buttons = getButtons(props, theme);\r\n const buttonAlignments = getButtonAlignment(theme, position);\r\n if (buttons.length === 0) return null;\r\n\r\n const { SubmitButtonPlacement: submitPosition } = theme;\r\n const buttonsSize = theme.BottomNavigationPosition === \"floating\" ? \"flex\" : \"large\";\r\n const renderButtons = (alignment: string) => {\r\n return [\"Back\", \"Next\", \"Quit\"].map((key) => {\r\n if (buttonAlignments[key] === alignment) {\r\n const navigationType = NavigationType[key as keyof typeof NavigationType];\r\n const buttonTypes =\r\n navigationType === NavigationType.Next\r\n ? [NavigationType.Submit, NavigationType.Next]\r\n : [navigationType];\r\n return (\r\n <NavigationButton\r\n key={key}\r\n placeholderWhenHidden={false}\r\n disabled={disabled}\r\n surveyTheme={surveyTheme}\r\n visibleTypes={buttons}\r\n onClick={onNavigation}\r\n types={buttonTypes}\r\n size={buttonsSize}\r\n />\r\n );\r\n }\r\n return null;\r\n });\r\n };\r\n\r\n const leftButton = renderButtons(\"navigationLeft\");\r\n const centerButton = renderButtons(\"navigationCenter\");\r\n const rightButton = renderButtons(\"navigationRight\");\r\n const isRender = [leftButton, centerButton, rightButton].some((buttonGroup) =>\r\n buttonGroup.some((button) => button),\r\n );\r\n const isRenderShortCuts = displayShortcuts && submitPosition.includes(position);\r\n\r\n return (\r\n <>\r\n {isRender || isRenderShortCuts ? (\r\n <nav className={classes.navigation}>\r\n <div className={classes.navigationButtonContainer}>\r\n <div className={classes.navigationLeft}>{leftButton}</div>\r\n <div className={classes.navigationCenter}>{centerButton}</div>\r\n <div className={classes.navigationRight}>{rightButton}</div>\r\n </div>\r\n {isRenderShortCuts && (\r\n <div className={classes.navigationButtonContainer}>\r\n {shortcuts.map((shortcut) => (\r\n <Shortcut\r\n key={shortcut.blockName}\r\n onClick={() => onNavigateShortcut(shortcut)}\r\n shortcut={shortcut}\r\n />\r\n ))}\r\n </div>\r\n )}\r\n </nav>\r\n ) : (\r\n <div className={classes.navigationPlaceHolder} />\r\n )}\r\n </>\r\n );\r\n}\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreState } from \"../models/states/StoreState\";\r\nimport { getCurrentBlock } from \"../redux/reducers/interview/navigationUtilities\";\r\n\r\nexport default function useBlock() {\r\n return useSelector((state: StoreState) => getCurrentBlock(state.interview.navigation));\r\n}\r\n","import React from \"react\";\r\nimport { DispatchProp } from \"react-redux\";\r\nimport { ThemeModel } from \"../../models/ThemeModel\";\r\nimport { NavigationType } from \"../../models/enums/NavigationType\";\r\nimport { ShortcutModel } from \"../../models/ShortcutModel\";\r\nimport { ShortcutExitToType } from \"../../models/enums/ShortcutExitToType\";\r\nimport NavigationBarRenderer from \"../renderers/v2/NavigationBarRenderer\";\r\nimport { navigationShortcut } from \"../../redux/actions\";\r\n\r\ninterface Props extends DispatchProp {\r\n shortcuts: ShortcutModel[];\r\n language: string;\r\n disabled: boolean;\r\n hasNextPage: boolean;\r\n hasPreviousPage: boolean;\r\n hideBackButton: boolean;\r\n theme: ThemeModel;\r\n position: \"top\" | \"bottom\";\r\n onNavigation(type: NavigationType): void;\r\n}\r\n\r\nexport class Navigation extends React.PureComponent<Props, {}> {\r\n onNavigation = (type: NavigationType) => {\r\n const { disabled, onNavigation } = this.props;\r\n if (disabled) {\r\n return;\r\n }\r\n onNavigation(type);\r\n };\r\n\r\n onNavigateShortcut = (shortcut: ShortcutModel) => {\r\n const { dispatch } = this.props;\r\n dispatch(\r\n navigationShortcut(\r\n shortcut.blockName,\r\n shortcut.type === ShortcutExitToType.NextQuestion,\r\n ),\r\n );\r\n };\r\n\r\n render() {\r\n const {\r\n theme,\r\n shortcuts,\r\n disabled,\r\n hasPreviousPage,\r\n hasNextPage,\r\n hideBackButton,\r\n position,\r\n } = this.props;\r\n return (\r\n <NavigationBarRenderer\r\n position={position}\r\n surveyTheme={theme}\r\n hasPreviousPage={hasPreviousPage}\r\n hasNextPage={hasNextPage}\r\n hideBackButton={hideBackButton}\r\n shortcuts={shortcuts}\r\n onNavigateShortcut={this.onNavigateShortcut}\r\n onNavigation={this.onNavigation}\r\n disabled={disabled}\r\n />\r\n );\r\n }\r\n}\r\n","import React from \"react\";\r\nimport { connect, DispatchProp } from \"react-redux\";\r\nimport { NavigationType } from \"../../models/enums/NavigationType\";\r\nimport { Navigation } from \"../../components/page/Navigation\";\r\nimport { StoreState } from \"../../models/states/StoreState\";\r\nimport { ThemeModel } from \"../../models/ThemeModel\";\r\nimport { getSettingBoolean } from \"../../models/utilities/settingUtilities\";\r\nimport { __isQuestionVisible__ } from \"../../expressions/parser\";\r\nimport { ShortcutModel } from \"../../models/ShortcutModel\";\r\nimport { selectNavigationDisabled } from \"../../redux/selectors/interview/navigation\";\r\n\r\ninterface Props {\r\n onNavigation(type: NavigationType): void;\r\n position: \"top\" | \"bottom\";\r\n}\r\n\r\ninterface StateProps {\r\n hasPreviousPage: boolean;\r\n hasNextPage: boolean;\r\n hideBackButton: boolean;\r\n disabled: boolean;\r\n theme: ThemeModel;\r\n language: string;\r\n shortcuts: ShortcutModel[];\r\n}\r\n\r\nclass NavigationContainerImpl extends React.PureComponent<Props & StateProps & DispatchProp, {}> {\r\n render() {\r\n return <Navigation {...this.props} />;\r\n }\r\n}\r\n\r\nconst hideBackButton = (state: StoreState) =>\r\n state.interview.navigation.currentPage.questions.some(\r\n (q) => __isQuestionVisible__(q, state.interview) && getSettingBoolean(q, \"HideBackButton\"),\r\n ) || !getSettingBoolean(state.interview.questionnaire, \"ALLOW_BACKWARD_JUMPS\");\r\n\r\nconst mapStateToProps = (state: StoreState, props: Props): Props & StateProps => ({\r\n ...props,\r\n shortcuts: state.interview.questionnaire.shortcuts,\r\n language: state.interview.language,\r\n disabled: selectNavigationDisabled(state),\r\n hasNextPage: state.interview.navigation.hasNextPage,\r\n hasPreviousPage: state.interview.navigation.hasPreviousPage,\r\n hideBackButton: hideBackButton(state),\r\n theme: state.interview.theme,\r\n});\r\n\r\nexport const NavigationContainer = connect(mapStateToProps)(NavigationContainerImpl);\r\n","import { createUseStyles } from \"react-jss\";\r\nimport {\r\n borderColor,\r\n controlBackgroundColor,\r\n foregroundColor,\r\n getSpacing,\r\n progressBarValueColor,\r\n progressBarVerticalPosition,\r\n} from \"../../theme/Mixins\";\r\n\r\nexport default createUseStyles({\r\n progress: {\r\n composes: \"progress\",\r\n height: ({ theme }) => theme.ProgressBarHeight,\r\n margin: ({ theme }) =>\r\n theme.ProgressBarType === \"floating\"\r\n ? 0\r\n : [[getSpacing(theme, 29, theme.QuestionSpacing?.WithinComponents), 0]],\r\n fontSize: 0,\r\n position: ({ theme, isMobilePreview }) =>\r\n theme.ProgressBarType === \"floating\" && (isMobilePreview ? \"absolute\" : \"fixed\"),\r\n top: ({ theme, position, simulatedBannerVisible }) =>\r\n position === \"top\" && progressBarVerticalPosition(theme, simulatedBannerVisible),\r\n bottom: ({ theme, position }) =>\r\n position === \"bottom\" && progressBarVerticalPosition(theme),\r\n left: 0,\r\n width: \"100%\",\r\n zIndex: 10,\r\n },\r\n bar: {\r\n composes: \"progress__bar\",\r\n zIndex: ({ isMobilePreview }) => isMobilePreview && 1,\r\n width: ({ isMobilePreview }) => isMobilePreview && \"100%\",\r\n marginLeft: ({ isMobilePreview }) => isMobilePreview && \"0px\",\r\n top: ({ isMobilePreview, position }) => isMobilePreview && position === \"bottom\" && \"692px\",\r\n cursor: ({ isMobilePreview }) => isMobilePreview && \"not-allowed\",\r\n transform: ({ isMobilePreview, position }) =>\r\n isMobilePreview && position === \"top\" && \"translateY(0px)\",\r\n position: \"relative\",\r\n background: ({ theme }) => controlBackgroundColor(theme),\r\n borderRadius: ({ theme }) =>\r\n theme.ProgressBarType === \"floating\"\r\n ? 0\r\n : Math.min(theme.BorderRadius, theme.ProgressBarHeight / 2),\r\n boxShadow: ({ theme }) =>\r\n theme.ProgressBarType === \"floating\"\r\n ? undefined\r\n : `0 0 0 ${Math.min(theme.BorderWidth, 1)}px ${theme.ControlBorderColor} inset`,\r\n overflow: \"hidden\",\r\n height: ({ theme }) => theme.ProgressBarHeight,\r\n },\r\n fill: {\r\n composes: \"progress__fill\",\r\n position: \"absolute\",\r\n top: 0,\r\n left: 0,\r\n bottom: 0,\r\n transition: \"width 600ms ease\",\r\n background: ({ theme }) => theme.PrimaryColor,\r\n overflow: \"hidden\",\r\n },\r\n innerValue: {\r\n position: \"absolute\",\r\n top: 0,\r\n bottom: 0,\r\n width: 200,\r\n marginLeft: -100,\r\n textAlign: \"center\",\r\n color: ({ theme }) => progressBarValueColor(theme, 0),\r\n fontSize: ({ theme }) => theme.ProgressBarFontSize,\r\n lineHeight: ({ theme }) => `${theme.ProgressBarHeight}px`,\r\n },\r\n innerFillValue: {\r\n position: \"absolute\",\r\n top: 0,\r\n bottom: 0,\r\n width: 200,\r\n marginLeft: -100,\r\n textAlign: \"center\",\r\n color: ({ theme }) => progressBarValueColor(theme, 100),\r\n fontSize: ({ theme }) => theme.ProgressBarFontSize,\r\n lineHeight: ({ theme }) => `${theme.ProgressBarHeight}px`,\r\n },\r\n bottomRightValue: {\r\n width: 200,\r\n marginLeft: \"auto\",\r\n marginRight: 24,\r\n fontSize: ({ theme }) => theme.ProgressBarFontSize,\r\n textAlign: \"right\",\r\n },\r\n bottomValue: {\r\n width: 50,\r\n margin: \"auto\",\r\n fontSize: ({ theme }) => theme.ProgressBarFontSize,\r\n textAlign: \"center\",\r\n color: ({ theme }) => progressBarValueColor(theme, 100),\r\n },\r\n floatingValue: {\r\n position: \"absolute\",\r\n top: ({ theme }) => theme.ProgressBarHeight + 8,\r\n width: 50,\r\n fontSize: ({ theme }) => theme.ProgressBarFontSize,\r\n textAlign: \"center\",\r\n marginTop: 4,\r\n marginLeft: -25,\r\n color: ({ theme }) => foregroundColor(theme, theme.PrimaryColor),\r\n background: ({ theme }) => theme.PrimaryColor,\r\n borderRadius: ({ theme }) => Math.min(theme.BorderRadius, 8),\r\n boxShadow: ({ theme }) =>\r\n `0 0 0 ${theme.BorderWidth}px ${borderColor(theme, theme.PrimaryColor)}`,\r\n opacity: \"0\",\r\n pointerEvents: \"none\",\r\n transition: \"left 600ms ease, opacity 200ms\",\r\n },\r\n floatingValueHover: {\r\n opacity: \"1\",\r\n },\r\n floatingValueArrowBorder: {\r\n border: [[8, \"solid\", \"transparent\"]],\r\n borderBottomColor: ({ theme }) => borderColor(theme, theme.PrimaryColor),\r\n display: \"block\",\r\n content: \"\",\r\n position: \"absolute\",\r\n top: ({ theme }) => -16 - theme.BorderWidth,\r\n left: 17,\r\n },\r\n floatingValueArrow: {\r\n border: [[8, \"solid\", \"transparent\"]],\r\n borderBottomColor: ({ theme }) => theme.PrimaryColor,\r\n display: \"block\",\r\n content: \"\",\r\n position: \"absolute\",\r\n top: -16,\r\n left: 17,\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { useTheme } from \"react-jss\";\r\nimport classnames from \"classnames\";\r\nimport useStyles from \"./Progress.styles\";\r\nimport { StoreState } from \"../../models/states/StoreState\";\r\nimport { SurveyMode } from \"../../models/enums/SurveyMode\";\r\nimport { some, find } from \"../../utils/lodash\";\r\n\r\ninterface Props {\r\n value: number;\r\n position?: \"top\" | \"bottom\";\r\n}\r\n\r\nfunction progressTextPosition(theme: any) {\r\n if (!theme.ProgressBarShowValue) {\r\n return \"none\";\r\n }\r\n if (theme.ProgressBarHeight >= theme.ProgressBarFontSize) {\r\n return \"inner\";\r\n }\r\n if (theme.ProgressBarType === \"floating\") {\r\n return \"floating\";\r\n }\r\n return \"bottom\";\r\n}\r\n\r\nfunction progressBarPosition(theme: any) {\r\n return theme.ProgressBarType;\r\n}\r\n\r\nexport default function Progress(props: Props) {\r\n const { value, position } = props;\r\n const boundedValue = Math.max(Math.min(value, 100), 0);\r\n\r\n const simulated = useSelector(\r\n (state: StoreState) =>\r\n process.env.NODE_ENV !== \"development\" && // Do not show simulated warning if we are in dev.\r\n state.interview.respondent &&\r\n state.interview.respondent.simulated,\r\n );\r\n const simulatedBannerVisible =\r\n useSelector((state: StoreState) => state.application.mode !== SurveyMode.Normal) &&\r\n simulated;\r\n\r\n const progressBarRef = React.useRef(null);\r\n const [progressBarWidth, setProgressBarWidth] = React.useState(0);\r\n const [hover, setHover] = React.useState(false);\r\n const [isMobilePreview, setIsMobilePreview] = React.useState(false);\r\n\r\n const theme = useTheme();\r\n const classes = useStyles({\r\n theme,\r\n position,\r\n simulatedBannerVisible,\r\n isMobilePreview,\r\n });\r\n\r\n const textPosition = progressTextPosition(theme);\r\n\r\n const onWindowSizeChanged = React.useCallback(() => {\r\n if (!progressBarRef || !progressBarRef.current) {\r\n return;\r\n }\r\n // Adjust progress bar position on mobile preview\r\n if (progressBarPosition(theme) === \"floating\") {\r\n const deviceFrame = progressBarRef.current.closest(\".device-frame\");\r\n if (deviceFrame) {\r\n if (!some(deviceFrame.childNodes, (child) => child === progressBarRef.current)) {\r\n // Remove any other progress bar with same position\r\n const child = find(\r\n deviceFrame.childNodes,\r\n (c: HTMLElement) => c.getAttribute(\"data-position\") === position,\r\n );\r\n if (child) deviceFrame.removeChild(child);\r\n // Move progress bar the its new position\r\n deviceFrame.appendChild(progressBarRef.current);\r\n }\r\n }\r\n }\r\n setIsMobilePreview(progressBarRef.current.closest(\".preview__mobile\") != null);\r\n setProgressBarWidth(progressBarRef.current.getBoundingClientRect().width);\r\n }, []);\r\n\r\n React.useLayoutEffect(() => {\r\n onWindowSizeChanged();\r\n window.addEventListener(\"resize\", onWindowSizeChanged);\r\n return function cleanup() {\r\n window.removeEventListener(\"resize\", onWindowSizeChanged);\r\n };\r\n });\r\n\r\n return (\r\n <aside\r\n className={classes.progress}\r\n onFocus={() => setHover(true)}\r\n onBlur={() => setHover(false)}\r\n onMouseOver={() => setHover(true)}\r\n onMouseOut={() => setHover(false)}\r\n >\r\n <div\r\n ref={progressBarRef}\r\n className={classes.bar}\r\n role=\"progressbar\"\r\n aria-valuemin={0}\r\n aria-valuemax={100}\r\n aria-valuenow={boundedValue}\r\n data-position={position}\r\n >\r\n {textPosition === \"inner\" && (\r\n <div\r\n className={classes.innerValue}\r\n style={{ left: progressBarWidth / 2 }}\r\n >{`${Math.round(boundedValue)} %`}</div>\r\n )}\r\n <div className={classes.fill} style={{ width: `${boundedValue}%` }}>\r\n {textPosition === \"inner\" && (\r\n <div\r\n className={classes.innerFillValue}\r\n style={{ left: progressBarWidth / 2 }}\r\n >{`${Math.round(boundedValue)} %`}</div>\r\n )}\r\n </div>\r\n </div>\r\n {textPosition === \"bottom\" && (\r\n <div className={classes.bottomValue}>{`${Math.round(boundedValue)} %`}</div>\r\n )}\r\n {textPosition === \"floating\" && (\r\n <div\r\n className={classnames(\r\n classes.floatingValue,\r\n hover && classes.floatingValueHover,\r\n )}\r\n style={{\r\n left: Math.min(\r\n progressBarWidth - 50,\r\n Math.max(50, (progressBarWidth * boundedValue) / 100),\r\n ),\r\n }}\r\n >\r\n {`${Math.round(boundedValue)} %`}\r\n <div className={classes.floatingValueArrowBorder} />\r\n <div className={classes.floatingValueArrow} />\r\n </div>\r\n )}\r\n </aside>\r\n );\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\nimport * as Mixins from \"../../../theme/Mixins\";\r\n\r\nexport default createUseStyles({\r\n icon: {\r\n composes: \"error__icon\",\r\n display: \"inline-block\",\r\n fontSize: 30,\r\n marginRight: 14.5,\r\n verticalAlign: \"middle\",\r\n },\r\n errorContainer: {\r\n background: ({ theme }) => theme.ErrorColor,\r\n borderRadius: 10,\r\n color: ({ theme }) => Mixins.foregroundColor(theme, theme.ErrorColor),\r\n composes: \"error__container\",\r\n margin: [[14.5, 0]],\r\n padding: [[9.67, 14.5]],\r\n },\r\n errorMessage: {\r\n composes: \"error__message\",\r\n fontWeight: 700,\r\n verticalAlign: \"middle\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { useTheme } from \"react-jss\";\r\nimport { FontAwesomeIcon } from \"../../shared/FontAwesome\";\r\nimport useStyles from \"./ValidationSummaryRenderer.styles\";\r\nimport { RecalledText } from \"../../../containers/shared/RecalledText\";\r\nimport { translate } from \"../../../models/utilities/translationUtilities\";\r\n\r\nexport default function ValidationSummary({ language, questionnaire, isValid }) {\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n\r\n if (isValid) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div className={classes.errorContainer} role=\"alert\">\r\n <FontAwesomeIcon icon=\"exclamation-circle\" className={classes.icon} />\r\n <RecalledText\r\n text={translate(questionnaire, \"PageHasErrors\", language)}\r\n render={(recalled) => (\r\n <span\r\n className={classes.errorMessage}\r\n dangerouslySetInnerHTML={{ __html: recalled }}\r\n />\r\n )}\r\n />\r\n </div>\r\n );\r\n}\r\n","import { createUseStyles } from \"react-jss\";\r\nimport * as Mixins from \"../../../theme/Mixins\";\r\n\r\nexport default createUseStyles({\r\n page: {\r\n composes: \"page\",\r\n height: \"100%\",\r\n color: ({ theme }) => Mixins.foregroundColor(theme, Mixins.wrapperBackgroundColor(theme)),\r\n transition: \"opacity 2000ms\",\r\n\r\n \"& hr\": {\r\n height: 0,\r\n border: 0,\r\n margin: ({ theme }) => [[theme.PageSeparatorsSpacing, 0]],\r\n borderTop: ({ theme }) =>\r\n `${theme.PageSeparatorsWidth}px solid ${Mixins.foregroundColor(\r\n theme,\r\n Mixins.wrapperBackgroundColor(theme),\r\n )}`,\r\n },\r\n\r\n \"& img, video\": {\r\n maxWidth: \"100%\",\r\n },\r\n\r\n \"& fieldset\": {\r\n display: \"block\",\r\n border: 0,\r\n margin: 0,\r\n padding: 0,\r\n \"& legend\": {\r\n margin: 0,\r\n padding: 0,\r\n },\r\n },\r\n\r\n \"& .non-fieldset-grouping-question\": {\r\n display: \"block\",\r\n border: 0,\r\n margin: 0,\r\n padding: 0,\r\n \"margin-inline-start\": \"2px\",\r\n \"margin-inline-end\": \"2px\",\r\n \"padding-block-start\": \"0.35em\",\r\n \"padding-block-end\": \"0.625em\",\r\n\r\n \"& div.question__legend\": {\r\n margin: 0,\r\n padding: 0,\r\n display: \"block\",\r\n \"padding-inline-start\": \"2px\",\r\n \"padding-inline-end\": \"2px\",\r\n \"unicode-bidi\": \"isolate\",\r\n \"border-width\": \"initial\",\r\n \"border-style\": \"none\",\r\n \"border-color\": \"initial\",\r\n \"border-image\": \"initial\",\r\n },\r\n },\r\n },\r\n pageWrapper: {\r\n composes: \"page__wrapper\",\r\n minHeight: \"100%\",\r\n margin: [[0, \"auto\"]],\r\n padding: ({ theme }) =>\r\n theme.TopNavigationPosition === \"floating\" ? [[61, 109]] : [[56, 109]],\r\n position: \"relative\",\r\n background: ({ theme }) => theme.PageWrapperBackground,\r\n boxSizing: \"border-box\",\r\n maxWidth: ({ theme }) => theme.PageWrapperMaxWidth,\r\n },\r\n dynamicPageWrapper: {\r\n composes: \"page__wrapper--dynamic\",\r\n padding: () => 29, // It must be a function to override pageWrapper padding!\r\n },\r\n pageContent: {\r\n composes: \"page__content\",\r\n paddingTop: 29,\r\n },\r\n pageMessage: {\r\n composes: \"page__message\",\r\n textAlign: \"center\",\r\n margin: \"106px 0\",\r\n padding: 29,\r\n border: ({ theme }) => `${theme.BorderWidth} solid #707070`,\r\n borderRadius: ({ theme }) => theme.BorderRadius,\r\n fontSize: \"1.1em\",\r\n },\r\n pageHeader: {\r\n composes: \"page__header\",\r\n marginBottom: ({ theme }) => Mixins.getSpacing(theme, 58, 0),\r\n \"& h1, h2, h3, h4, h5, h6\": {\r\n margin: 0,\r\n padding: 0,\r\n },\r\n },\r\n pageHeaderLogo: {\r\n composes: \"header__logo\",\r\n display: \"block\",\r\n maxWidth: 250,\r\n maxHeight: 250,\r\n marginLeft: ({ theme }) => (theme.LogoAlign === \"left\" ? undefined : \"auto\"),\r\n marginRight: ({ theme }) => (theme.LogoAlign === \"right\" ? undefined : \"auto\"),\r\n },\r\n pageHeaderContent: {\r\n composes: \"header__content\",\r\n marginTop: ({ theme }) => Mixins.getSpacing(theme, 20, theme.QuestionSpacing?.WithinComponents),\r\n outline: \"none\",\r\n },\r\n pageFooter: {\r\n composes: \"page__footer\",\r\n \"& h1, h2, h3, h4, h5, h6\": {\r\n margin: 0,\r\n padding: 0,\r\n },\r\n },\r\n legacyBrowserWarningFloating: {\r\n composes: \"legacy__browser__warning--floating\",\r\n maxWidth: \"450px\",\r\n position: \"fixed\",\r\n zIndex: 2,\r\n margin: [\"2em\", 0, 0, \"2em\"],\r\n },\r\n legacyBrowserWarningInline: {\r\n composes: \"legacy__browser__warning--inline\",\r\n position: \"relative\",\r\n maxWidth: \"100%\",\r\n margin: [0, 0, \"1em\", 0],\r\n },\r\n legacyBrowserWarningIconContainer: {\r\n composes: \"legacy-browser-warning__icon__container\",\r\n position: \"absolute\",\r\n marginTop: \"-25px\",\r\n width: \"100%\",\r\n zIndex: 3,\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n },\r\n legacyBrowserWarningIconBackground: {\r\n composes: \"legacy-browser-warning__icon__background\",\r\n backgroundColor: \"#ff9933\",\r\n height: 46,\r\n width: 46,\r\n borderRadius: 23,\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n },\r\n legacyBrowserWarningContent: {\r\n composes: \"legacy-browser-warning__content\",\r\n color: ({ theme }) => Mixins.foregroundColor(theme, theme.ControlBackground),\r\n backgroundColor: ({ theme }) => theme.ControlBackground,\r\n borderRadius: ({ theme }) => theme.BorderRadius,\r\n padding: [15, 20],\r\n },\r\n legacyBrowserWarningEmphasis: {\r\n composes: \"legacy-browser-warning__emphasis\",\r\n fontWeight: \"bold\",\r\n },\r\n legacyBrowserWarningButton: {\r\n composes: \"legacy-browser-warning__button\",\r\n textAlign: \"center\",\r\n backgroundColor: ({ theme }) => theme.PrimaryColor,\r\n color: ({ theme }) => Mixins.foregroundColor(theme, theme.PrimaryColor),\r\n padding: \"5px\",\r\n borderRadius: ({ theme }) => theme.BorderRadius,\r\n maxWidth: \"150px\",\r\n \"&:hover\": {\r\n backgroundColor: ({ theme }) => theme.SecondaryColor,\r\n cursor: \"pointer\",\r\n },\r\n },\r\n backlinkContainer: {\r\n composes: \"backlink-container\",\r\n position: \"sticky\",\r\n bottom: 0,\r\n float: \"right\",\r\n padding: [\"10px\", \"30px\"],\r\n borderRadius: [\"5px\", \"0\", \"0\", \"0\"],\r\n backgroundColor: ({ theme }) => Mixins.alpha(theme.PrimaryColor, 0.4),\r\n color: ({ theme }) => Mixins.foregroundColor(theme, theme.PrimaryColor),\r\n \"&:hover\": {\r\n backgroundColor: ({ theme }) => theme.PrimaryColor,\r\n },\r\n },\r\n backlink: {\r\n composes: \"backlink\",\r\n color: ({ theme }) => Mixins.foregroundColor(theme, theme.PrimaryColor),\r\n },\r\n skiplinkContainer: {\r\n // https://webaim.org/techniques/css/invisiblecontent/#skipnavlinks\r\n composes: \"skiplinkContainer\",\r\n \"& a\": {\r\n position: \"absolute\",\r\n left: \"-10000px\",\r\n top: \"auto\",\r\n width: \"1px\",\r\n height: \"1px\",\r\n overflow: \"hidden\",\r\n \"&:focus\": {\r\n position: \"static\",\r\n width: \"auto\",\r\n height: \"auto\",\r\n },\r\n },\r\n },\r\n});\r\n","import { createUseStyles } from \"react-jss\";\r\nimport { getSpacing } from \"../../theme/Mixins\";\r\n\r\nexport default createUseStyles({\r\n topNavigation: {\r\n alignItems: \"center\",\r\n boxSizing: \"border-box\",\r\n composes: \"top-navigation\",\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n justifyContent: \"flex-end\",\r\n left: 0,\r\n marginBottom: ({ theme }) => theme.TopNavigationPosition === \"wrapper\" && getSpacing(theme, 10, theme.QuestionSpacing?.PageHeader),\r\n paddingRight: ({ theme }) => theme.TopNavigationPosition === \"floating\" && 10,\r\n position: ({ theme }) => theme.TopNavigationPosition === \"floating\" && \"absolute\",\r\n right: 0,\r\n top: ({ theme }) => theme.TopNavigationPosition === \"floating\" && 10,\r\n zIndex: 2,\r\n },\r\n languageSelector: {\r\n composes: \"top-navigation__language-selector\",\r\n fontSize: \"13px\",\r\n zIndex: 11,\r\n marginLeft: \"10px\",\r\n },\r\n});\r\n","/* Generate this object in a C# .Net environment like https://dotnetfiddle.net/\r\nusing System;\r\nusing System.Linq;\r\n\t\t\t\t\t\r\npublic class Program\r\n{\r\n\tpublic static void Main()\r\n\t{\r\n\t\tSystem.Globalization.CultureInfo[] allCultures = System.Globalization.CultureInfo.GetCultures(System.Globalization.CultureTypes.NeutralCultures);\r\n\t\tvar json = \"{\" + allCultures\r\n\t\t\t.GroupBy(c => c.TwoLetterISOLanguageName)\r\n\t\t\t.Select(g => \"\\n\\t\" + g.Key + \":\" + new String(' ', 4 - g.Key.Length)\r\n\t\t\t\t+ \"{\"\r\n\t\t\t\t\t+ \"name: \\\"\" + g.First().EnglishName + \"\\\", \"\r\n\t\t\t\t\t+ \"nativeName: \\\"\" + g.First().NativeName + \"\\\"\"\r\n\t\t\t\t\t+ (g.First().TextInfo.IsRightToLeft ? \", isRightToLeft: true\" : \"\")\r\n\t\t\t\t+ \"}\")\r\n\t\t\t.Aggregate((a, b) => a + \", \" + b)+ \"\\n}\";\r\n\t\tConsole.WriteLine(json);\r\n\t}\r\n} */\r\nexport const CULTURE_INFO: {\r\n [code: string]: { name: string; nativeName: string; isRightToLeft?: boolean };\r\n} = {\r\n iv: {\r\n name: \"Invariant Language (Invariant Country)\",\r\n nativeName: \"Invariant Language (Invariant Country)\",\r\n },\r\n aa: { name: \"Afar\", nativeName: \"Qafar\" },\r\n af: { name: \"Afrikaans\", nativeName: \"Afrikaans\" },\r\n agq: { name: \"Aghem\", nativeName: \"Aghem\" },\r\n ak: { name: \"Akan\", nativeName: \"Akan\" },\r\n am: { name: \"Amharic\", nativeName: \"አማርኛ\" },\r\n ar: { name: \"Arabic\", nativeName: \"العربية\", isRightToLeft: true },\r\n arn: { name: \"Mapudungun\", nativeName: \"Mapudungun\" },\r\n as: { name: \"Assamese\", nativeName: \"অসমীয়া\" },\r\n asa: { name: \"Asu\", nativeName: \"Kipare\" },\r\n ast: { name: \"Asturian\", nativeName: \"Asturianu\" },\r\n az: { name: \"Azerbaijani\", nativeName: \"Azərbaycan dili\" },\r\n ba: { name: \"Bashkir\", nativeName: \"Башҡорт\" },\r\n bas: { name: \"Basaa\", nativeName: \"Ɓàsàa\" },\r\n be: { name: \"Belarusian\", nativeName: \"Беларуская\" },\r\n bem: { name: \"Bemba\", nativeName: \"Ichibemba\" },\r\n bez: { name: \"Bena\", nativeName: \"Hibena\" },\r\n bg: { name: \"Bulgarian\", nativeName: \"Български\" },\r\n bin: { name: \"Edo\", nativeName: \"Ẹ̀dó\" },\r\n bm: { name: \"Bamanankan\", nativeName: \"Bamanakan\" },\r\n bn: { name: \"Bangla\", nativeName: \"বাংলা\" },\r\n bo: { name: \"Tibetan\", nativeName: \"བོད་ཡིག\" },\r\n br: { name: \"Breton\", nativeName: \"Brezhoneg\" },\r\n brx: { name: \"Bodo\", nativeName: \"बड़ो\" },\r\n bs: { name: \"Bosnian\", nativeName: \"Bosanski\" },\r\n byn: { name: \"Blin\", nativeName: \"ብሊን\" },\r\n ca: { name: \"Catalan\", nativeName: \"Català\" },\r\n ce: { name: \"Chechen\", nativeName: \"Нохчийн\" },\r\n cgg: { name: \"Chiga\", nativeName: \"Rukiga\" },\r\n chr: { name: \"Cherokee\", nativeName: \"ᏣᎳᎩ\" },\r\n co: { name: \"Corsican\", nativeName: \"Corsu\" },\r\n cs: { name: \"Czech\", nativeName: \"Čeština\" },\r\n cu: { name: \"Church Slavic\", nativeName: \"Церковнослове́нскїй\" },\r\n cy: { name: \"Welsh\", nativeName: \"Cymraeg\" },\r\n da: { name: \"Danish\", nativeName: \"Dansk\" },\r\n dav: { name: \"Taita\", nativeName: \"Kitaita\" },\r\n de: { name: \"German\", nativeName: \"Deutsch\" },\r\n dje: { name: \"Zarma\", nativeName: \"Zarmaciine\" },\r\n dsb: { name: \"Lower Sorbian\", nativeName: \"Dolnoserbšćina\" },\r\n dua: { name: \"Duala\", nativeName: \"Duálá\" },\r\n dv: { name: \"Divehi\", nativeName: \"ދިވެހިބަސް\", isRightToLeft: true },\r\n dyo: { name: \"Jola-Fonyi\", nativeName: \"Joola\" },\r\n dz: { name: \"Dzongkha\", nativeName: \"རྫོང་ཁ\" },\r\n ebu: { name: \"Embu\", nativeName: \"Kĩembu\" },\r\n ee: { name: \"Ewe\", nativeName: \"Eʋegbe\" },\r\n el: { name: \"Greek\", nativeName: \"Ελληνικά\" },\r\n en: { name: \"English\", nativeName: \"English\" },\r\n eo: { name: \"Esperanto\", nativeName: \"Esperanto\" },\r\n es: { name: \"Spanish\", nativeName: \"Español\" },\r\n et: { name: \"Estonian\", nativeName: \"Eesti\" },\r\n eu: { name: \"Basque\", nativeName: \"Euskara\" },\r\n ewo: { name: \"Ewondo\", nativeName: \"Ewondo\" },\r\n fa: { name: \"Persian\", nativeName: \"فارسى\", isRightToLeft: true },\r\n ff: { name: \"Fulah\", nativeName: \"Fulah\" },\r\n fi: { name: \"Finnish\", nativeName: \"Suomi\" },\r\n fil: { name: \"Filipino\", nativeName: \"Filipino\" },\r\n fo: { name: \"Faroese\", nativeName: \"Føroyskt\" },\r\n fr: { name: \"French\", nativeName: \"Français\" },\r\n fur: { name: \"Friulian\", nativeName: \"Furlan\" },\r\n fy: { name: \"Western Frisian\", nativeName: \"Frysk\" },\r\n ga: { name: \"Irish\", nativeName: \"Gaeilge\" },\r\n gd: { name: \"Scottish Gaelic\", nativeName: \"Gàidhlig\" },\r\n gl: { name: \"Galician\", nativeName: \"Galego\" },\r\n gn: { name: \"Guarani\", nativeName: \"Avañe’ẽ\" },\r\n gsw: { name: \"Alsatian\", nativeName: \"Elsässisch\" },\r\n gu: { name: \"Gujarati\", nativeName: \"ગુજરાતી\" },\r\n guz: { name: \"Gusii\", nativeName: \"Ekegusii\" },\r\n gv: { name: \"Manx\", nativeName: \"Gaelg\" },\r\n ha: { name: \"Hausa\", nativeName: \"Hausa\" },\r\n haw: { name: \"Hawaiian\", nativeName: \"ʻŌlelo Hawaiʻi\" },\r\n he: { name: \"Hebrew\", nativeName: \"עברית\", isRightToLeft: true },\r\n hi: { name: \"Hindi\", nativeName: \"हिंदी\" },\r\n hr: { name: \"Croatian\", nativeName: \"Hrvatski\" },\r\n hsb: { name: \"Upper Sorbian\", nativeName: \"Hornjoserbšćina\" },\r\n hu: { name: \"Hungarian\", nativeName: \"Magyar\" },\r\n hy: { name: \"Armenian\", nativeName: \"Հայերեն\" },\r\n ia: { name: \"Interlingua\", nativeName: \"Interlingua\" },\r\n ibb: { name: \"Ibibio\", nativeName: \"Ibibio-Efik\" },\r\n id: { name: \"Indonesian\", nativeName: \"Indonesia\" },\r\n ig: { name: \"Igbo\", nativeName: \"Igbo\" },\r\n ii: { name: \"Yi\", nativeName: \"ꆈꌠꁱꂷ\" },\r\n is: { name: \"Icelandic\", nativeName: \"Íslenska\" },\r\n it: { name: \"Italian\", nativeName: \"Italiano\" },\r\n iu: { name: \"Inuktitut\", nativeName: \"Inuktitut\" },\r\n ja: { name: \"Japanese\", nativeName: \"日本語\" },\r\n jgo: { name: \"Ngomba\", nativeName: \"Ndaꞌa\" },\r\n jmc: { name: \"Machame\", nativeName: \"Kimachame\" },\r\n jv: { name: \"Javanese\", nativeName: \"Basa Jawa\" },\r\n ka: { name: \"Georgian\", nativeName: \"Ქართული\" },\r\n kab: { name: \"Kabyle\", nativeName: \"Taqbaylit\" },\r\n kam: { name: \"Kamba\", nativeName: \"Kikamba\" },\r\n kde: { name: \"Makonde\", nativeName: \"Chimakonde\" },\r\n kea: { name: \"Kabuverdianu\", nativeName: \"Kabuverdianu\" },\r\n khq: { name: \"Koyra Chiini\", nativeName: \"Koyra ciini\" },\r\n ki: { name: \"Kikuyu\", nativeName: \"Gikuyu\" },\r\n kk: { name: \"Kazakh\", nativeName: \"Қазақ тілі\" },\r\n kkj: { name: \"Kako\", nativeName: \"Kakɔ\" },\r\n kl: { name: \"Greenlandic\", nativeName: \"Kalaallisut\" },\r\n kln: { name: \"Kalenjin\", nativeName: \"Kalenjin\" },\r\n km: { name: \"Khmer\", nativeName: \"ភាសាខ្មែរ\" },\r\n kn: { name: \"Kannada\", nativeName: \"ಕನ್ನಡ\" },\r\n ko: { name: \"Korean\", nativeName: \"한국어\" },\r\n kok: { name: \"Konkani\", nativeName: \"कोंकणी\" },\r\n kr: { name: \"Kanuri\", nativeName: \"Kanuri\" },\r\n ks: { name: \"Kashmiri\", nativeName: \"کٲشُر\" },\r\n ksb: { name: \"Shambala\", nativeName: \"Kishambaa\" },\r\n ksf: { name: \"Bafia\", nativeName: \"Rikpa\" },\r\n ksh: { name: \"Ripuarian\", nativeName: \"Kölsch\" },\r\n ku: { name: \"Central Kurdish\", nativeName: \"کوردیی ناوەڕاست\", isRightToLeft: true },\r\n kw: { name: \"Cornish\", nativeName: \"Kernewek\" },\r\n ky: { name: \"Kyrgyz\", nativeName: \"Кыргыз\" },\r\n la: { name: \"Latin\", nativeName: \"Lingua latīna\" },\r\n lag: { name: \"Langi\", nativeName: \"Kɨlaangi\" },\r\n lb: { name: \"Luxembourgish\", nativeName: \"Lëtzebuergesch\" },\r\n lg: { name: \"Ganda\", nativeName: \"Luganda\" },\r\n lkt: { name: \"Lakota\", nativeName: \"Lakȟólʼiyapi\" },\r\n ln: { name: \"Lingala\", nativeName: \"Lingála\" },\r\n lo: { name: \"Lao\", nativeName: \"ລາວ\" },\r\n lrc: { name: \"Northern Luri\", nativeName: \"لۊری شومالی\" },\r\n lt: { name: \"Lithuanian\", nativeName: \"Lietuvių\" },\r\n lu: { name: \"Luba-Katanga\", nativeName: \"Tshiluba\" },\r\n luo: { name: \"Luo\", nativeName: \"Dholuo\" },\r\n luy: { name: \"Luyia\", nativeName: \"Luluhia\" },\r\n lv: { name: \"Latvian\", nativeName: \"Latviešu\" },\r\n mas: { name: \"Masai\", nativeName: \"Maa\" },\r\n mer: { name: \"Meru\", nativeName: \"Kĩmĩrũ\" },\r\n mfe: { name: \"Morisyen\", nativeName: \"Kreol morisien\" },\r\n mg: { name: \"Malagasy\", nativeName: \"Malagasy\" },\r\n mgh: { name: \"Makhuwa-Meetto\", nativeName: \"Makua\" },\r\n mgo: { name: \"Metaʼ\", nativeName: \"Metaʼ\" },\r\n mi: { name: \"Maori\", nativeName: \"Reo Māori\" },\r\n mk: { name: \"Macedonian\", nativeName: \"Македонски\" },\r\n ml: { name: \"Malayalam\", nativeName: \"മലയാളം\" },\r\n mn: { name: \"Mongolian\", nativeName: \"Монгол хэл\" },\r\n mni: { name: \"Manipuri\", nativeName: \"মৈতৈলোন্\" },\r\n moh: { name: \"Mohawk\", nativeName: \"Kanien’kéha\" },\r\n mr: { name: \"Marathi\", nativeName: \"मराठी\" },\r\n ms: { name: \"Malay\", nativeName: \"Bahasa Melayu\" },\r\n mt: { name: \"Maltese\", nativeName: \"Malti\" },\r\n mua: { name: \"Mundang\", nativeName: \"MUNDAŊ\" },\r\n my: { name: \"Burmese\", nativeName: \"ဗမာ\" },\r\n mzn: { name: \"Mazanderani\", nativeName: \"مازرونی\" },\r\n naq: { name: \"Nama\", nativeName: \"Khoekhoegowab\" },\r\n nb: { name: \"Norwegian Bokmål\", nativeName: \"Norsk bokmål\" },\r\n nd: { name: \"North Ndebele\", nativeName: \"IsiNdebele\" },\r\n ne: { name: \"Nepali\", nativeName: \"नेपाली\" },\r\n nl: { name: \"Dutch\", nativeName: \"Nederlands\" },\r\n nmg: { name: \"Kwasio\", nativeName: \"Kwasio\" },\r\n nn: { name: \"Norwegian Nynorsk\", nativeName: \"Nynorsk\" },\r\n nnh: { name: \"Ngiemboon\", nativeName: \"Shwóŋò ngiembɔɔn\" },\r\n nqo: { name: \"N'ko\", nativeName: \"ߒߞߏ\", isRightToLeft: true },\r\n nr: { name: \"South Ndebele\", nativeName: \"IsiNdebele\" },\r\n nso: { name: \"Sesotho sa Leboa\", nativeName: \"Sesotho sa Leboa\" },\r\n nus: { name: \"Nuer\", nativeName: \"Thok Nath\" },\r\n nyn: { name: \"Nyankole\", nativeName: \"Runyankore\" },\r\n oc: { name: \"Occitan\", nativeName: \"Occitan\" },\r\n om: { name: \"Oromo\", nativeName: \"Oromoo\" },\r\n or: { name: \"Odia\", nativeName: \"ଓଡ଼ିଆ\" },\r\n os: { name: \"Ossetian\", nativeName: \"Ирон æвзаг\" },\r\n pa: { name: \"Punjabi\", nativeName: \"ਪੰਜਾਬੀ\" },\r\n pap: { name: \"Papiamento\", nativeName: \"Papiamentu\" },\r\n pl: { name: \"Polish\", nativeName: \"Polski\" },\r\n prg: { name: \"Prussian\", nativeName: \"Prūsiskan\" },\r\n prs: { name: \"Dari\", nativeName: \"درى\", isRightToLeft: true },\r\n ps: { name: \"Pashto\", nativeName: \"پښتو\", isRightToLeft: true },\r\n pt: { name: \"Portuguese(Brazil)\", nativeName: \"Português(Brasil)\" },\r\n quc: { name: \"K'iche'\", nativeName: \"K'iche'\" },\r\n quz: { name: \"Quechua\", nativeName: \"Runasimi\" },\r\n rm: { name: \"Romansh\", nativeName: \"Rumantsch\" },\r\n rn: { name: \"Rundi\", nativeName: \"Ikirundi\" },\r\n ro: { name: \"Romanian\", nativeName: \"Română\" },\r\n rof: { name: \"Rombo\", nativeName: \"Kihorombo\" },\r\n ru: { name: \"Russian\", nativeName: \"Русский\" },\r\n rw: { name: \"Kinyarwanda\", nativeName: \"Kinyarwanda\" },\r\n rwk: { name: \"Rwa\", nativeName: \"Kiruwa\" },\r\n sa: { name: \"Sanskrit\", nativeName: \"संस्कृत\" },\r\n sah: { name: \"Sakha\", nativeName: \"Саха\" },\r\n saq: { name: \"Samburu\", nativeName: \"Kisampur\" },\r\n sbp: { name: \"Sangu\", nativeName: \"Ishisangu\" },\r\n sd: { name: \"Sindhi\", nativeName: \"سنڌي\", isRightToLeft: true },\r\n se: { name: \"Northern Sami\", nativeName: \"Davvisámegiella\" },\r\n seh: { name: \"Sena\", nativeName: \"Sena\" },\r\n ses: { name: \"Koyraboro Senni\", nativeName: \"Koyraboro senni\" },\r\n sg: { name: \"Sango\", nativeName: \"Sängö\" },\r\n shi: { name: \"Tachelhit\", nativeName: \"ⵜⴰⵛⵍⵃⵉⵜ\" },\r\n si: { name: \"Sinhala\", nativeName: \"සිංහල\" },\r\n sk: { name: \"Slovak\", nativeName: \"Slovenčina\" },\r\n sl: { name: \"Slovenian\", nativeName: \"Slovenščina\" },\r\n sma: { name: \"Sami (Southern)\", nativeName: \"Åarjelsaemiengïele\" },\r\n smj: { name: \"Sami (Lule)\", nativeName: \"Julevusámegiella\" },\r\n smn: { name: \"Sami (Inari)\", nativeName: \"Anarâškielâ\" },\r\n sms: { name: \"Sami (Skolt)\", nativeName: \"Sää´mǩiõll\" },\r\n sn: { name: \"Shona\", nativeName: \"ChiShona\" },\r\n so: { name: \"Somali\", nativeName: \"Soomaali\" },\r\n sq: { name: \"Albanian\", nativeName: \"Shqip\" },\r\n sr: { name: \"Serbian\", nativeName: \"Srpski\" },\r\n ss: { name: \"siSwati\", nativeName: \"Siswati\" },\r\n ssy: { name: \"Saho\", nativeName: \"Saho\" },\r\n st: { name: \"Sesotho\", nativeName: \"Sesotho\" },\r\n sv: { name: \"Swedish\", nativeName: \"Svenska\" },\r\n sw: { name: \"Kiswahili\", nativeName: \"Kiswahili\" },\r\n syr: { name: \"Syriac\", nativeName: \"ܣܘܪܝܝܐ\", isRightToLeft: true },\r\n ta: { name: \"Tamil\", nativeName: \"தமிழ்\" },\r\n te: { name: \"Telugu\", nativeName: \"తెలుగు\" },\r\n teo: { name: \"Teso\", nativeName: \"Kiteso\" },\r\n tg: { name: \"Tajik\", nativeName: \"Тоҷикӣ\" },\r\n th: { name: \"Thai\", nativeName: \"ไทย\" },\r\n ti: { name: \"Tigrinya\", nativeName: \"ትግርኛ\" },\r\n tig: { name: \"Tigre\", nativeName: \"ትግረ\" },\r\n tk: { name: \"Turkmen\", nativeName: \"Türkmen dili\" },\r\n tn: { name: \"Setswana\", nativeName: \"Setswana\" },\r\n to: { name: \"Tongan\", nativeName: \"Lea fakatonga\" },\r\n tr: { name: \"Turkish\", nativeName: \"Türkçe\" },\r\n ts: { name: \"Tsonga\", nativeName: \"Xitsonga\" },\r\n tt: { name: \"Tatar\", nativeName: \"Татар\" },\r\n twq: { name: \"Tasawaq\", nativeName: \"Tasawaq senni\" },\r\n tzm: { name: \"Central Atlas Tamazight\", nativeName: \"Tamaziɣt n laṭlaṣ\" },\r\n ug: { name: \"Uyghur\", nativeName: \"ئۇيغۇرچە\", isRightToLeft: true },\r\n uk: { name: \"Ukrainian\", nativeName: \"Українська\" },\r\n ur: { name: \"Urdu\", nativeName: \"اُردو\", isRightToLeft: true },\r\n uz: { name: \"Uzbek\", nativeName: \"O‘zbek\" },\r\n vai: { name: \"Vai\", nativeName: \"ꕙꔤ\" },\r\n ve: { name: \"Venda\", nativeName: \"Tshivenḓa\" },\r\n vi: { name: \"Vietnamese\", nativeName: \"Tiếng Việt\" },\r\n vo: { name: \"Volapük\", nativeName: \"Volapük\" },\r\n vun: { name: \"Vunjo\", nativeName: \"Kyivunjo\" },\r\n wae: { name: \"Walser\", nativeName: \"Walser\" },\r\n wal: { name: \"Wolaytta\", nativeName: \"ወላይታቱ\" },\r\n wo: { name: \"Wolof\", nativeName: \"Wolof\" },\r\n xh: { name: \"isiXhosa\", nativeName: \"IsiXhosa\" },\r\n xog: { name: \"Soga\", nativeName: \"Olusoga\" },\r\n yav: { name: \"Yangben\", nativeName: \"Nuasue\" },\r\n yi: { name: \"Yiddish\", nativeName: \"ייִדיש\", isRightToLeft: true },\r\n yo: { name: \"Yoruba\", nativeName: \"Èdè Yorùbá\" },\r\n zgh: { name: \"Standard Moroccan Tamazight\", nativeName: \"ⵜⴰⵎⴰⵣⵉⵖⵜ\" },\r\n zh: { name: \"Chinese\", nativeName: \"中文\" },\r\n zu: { name: \"isiZulu\", nativeName: \"IsiZulu\" },\r\n\r\n /* Extended Language List From Azure Translation */\r\n yue: { name: \"Cantonais\", nativeName: \"粤语\" },\r\n mww: { name: \"Daw Hmong\", nativeName: \"Hmong Daw\" },\r\n ikt: { name: \"Inuinnaqtun\", nativeName: \"Inuinnaqtun\" },\r\n yua: { name: \"Yucatec Maya\", nativeName: \"mayaʼ tʼàan\" },\r\n kmr: { name: \"Kurdish(Northern)\", nativeName: \"كوردی\" },\r\n lzh: { name: \"Chinese(Literary)\", nativeName: \"中文(文言文)\" },\r\n \"tlh-latn\": { name: \"Klingon\", nativeName: \"tlhIngan Hol\" },\r\n \"tlh-piqd\": { name: \"Klingon(plqaD)\", nativeName: \"tlhIngan Hol(plqaD)\" },\r\n \"fr-ca\": { name: \"French(Canada)\", nativeName: \"Français(Canada)\" },\r\n \"iu-latn\": { name: \"Inuktitut(Latin)\", nativeName: \"Inuktitut(Latin)\" },\r\n \"pt-pt\": { name: \"Portuguese\", nativeName: \"Português\" },\r\n \"zh-hans\": { name: \"Chinese Traditional\", nativeName: \"中文(简体)\" },\r\n \"zh-hant\": { name: \"Chinese Simplified\", nativeName: \"中文(繁體)\" },\r\n \"mn-cyrl\": { name: \"Mongolian(Cyrillic)\", nativeName: \"Монгол хэл(Cyrillic)\" },\r\n \"mn-mong\": { name: \"Mongolian(Traditional)\", nativeName: \"Монгол хэл(Traditional)\" },\r\n \"sr-cyrl\": { name: \"Serbian(Cyrillic)\", nativeName: \"Srpski(cyrillique)\" },\r\n \"sr-latn\": { name: \"Serbian(Latin)\", nativeName: \"Srpski(Latin)\" },\r\n\r\n ab: { name: \"Abkhazian\", nativeName: \"Аҧсуа\" },\r\n ae: { name: \"Avestan\", nativeName: \"Avesta\" },\r\n an: { name: \"Aragonés\", nativeName: \"Aragonese\" },\r\n av: { name: \"Avaric\", nativeName: \"авар мацӀ ; магӀарул мацӀ\" },\r\n ay: { name: \"Aymara\", nativeName: \"Aymar aru\" },\r\n bh: { name: \"Bihari\", nativeName: \"भोजपुरी\" },\r\n bi: { name: \"Bislama\", nativeName: \"Bislama\" },\r\n ch: { name: \"Chamorro\", nativeName: \"Chamorro\" },\r\n cr: { name: \"Cree\", nativeName: \"ᐦᐃᔭᐍᐏᐣ\" },\r\n cv: { name: \"Chuvash\", nativeName: \"чӑваш чӗлхи\" },\r\n fj: { name: \"Fijian\", nativeName: \"Vosa Vakaviti\" },\r\n ho: { name: \"Hiri Motu\", nativeName: \"Hiri Motu\" },\r\n ht: { name: \"Haitian\", nativeName: \"Kreyòl ayisyen\" },\r\n hz: { name: \"Herero\", nativeName: \"Otjiherero\" },\r\n ie: { name: \"Interlingue\", nativeName: \"Interlingue\" },\r\n ik: { name: \"Inupiaq\", nativeName: \"Iñupiaq ; Iñupiatun\" },\r\n io: { name: \"Ido\", nativeName: \"Ido\" },\r\n kg: { name: \"Kongo\", nativeName: \"KiKongo\" },\r\n kj: { name: \"Kwanyama\", nativeName: \"Kuanyama\" },\r\n kv: { name: \"Komi\", nativeName: \"коми кыв\" },\r\n li: { name: \"Limburgish\", nativeName: \"Limburgs\" },\r\n mh: { name: \"Marshallese\", nativeName: \"Kajin M̧ajeļ\" },\r\n mo: { name: \"Moldavian\", nativeName: \"лимба молдовеняскэ\" },\r\n na: { name: \"Nauru\", nativeName: \"Ekakairũ Naoero\" },\r\n ng: { name: \"Ndonga\", nativeName: \"Owambo\" },\r\n no: { name: \"Norwegian\", nativeName: \"Norsk\" },\r\n nv: { name: \"Navajo\", nativeName: \"Diné bizaad ; Dinékʼehǰí\" },\r\n ny: { name: \"Chichewa\", nativeName: \"ChiCheŵa ; chinyanja\" },\r\n oj: { name: \"Ojibwa\", nativeName: \"ᐊᓂᔑᓈᐯᒧᐎᓐ\" },\r\n pi: { name: \"Pāli\", nativeName: \"पािऴ\" },\r\n qu: { name: \"Quechua\", nativeName: \"Runa Simi ; Kichwa\" },\r\n sc: { name: \"Sardinian\", nativeName: \"sardu\" },\r\n sh: { name: \"Serbo-Croatian\", nativeName: \"Српскохрватски\" },\r\n sm: { name: \"Samoan\", nativeName: \"Gagana fa''a Samoa\" },\r\n su: { name: \"Sundanese\", nativeName: \"Basa Sunda\" },\r\n tl: { name: \"Tagalog\", nativeName: \"Tagalog\" },\r\n tw: { name: \"Twi\", nativeName: \"Twi\" },\r\n ty: { name: \"Tahitian\", nativeName: \"Reo Mā`ohi\" },\r\n wa: { name: \"Walloon\", nativeName: \"Walon\" },\r\n za: { name: \"Zhuang\", nativeName: \"Saw cueŋƅ ; Saw cuengh\" },\r\n};\r\n","import React from \"react\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { useTheme } from \"react-jss\";\r\nimport Select from \"../select/Select\";\r\nimport useStyles from \"./TopNavigation.styles\";\r\nimport { StoreState } from \"../../models/states/StoreState\";\r\nimport Button from \"../shared/Button\";\r\nimport useTranslatable from \"../../hooks/useTranslatable\";\r\nimport { ThemeModel } from \"../../models/ThemeModel\";\r\nimport { changeLanguage } from \"../../redux/actions\";\r\nimport { CULTURE_INFO } from \"../../utils/lang\";\r\nimport { maxBy } from \"../../utils/lodash\";\r\nimport { QueryParameters } from \"../../consts\";\r\n\r\ninterface Props {\r\n theme: ThemeModel;\r\n}\r\n\r\nexport default function TopNavigation(props: Props) {\r\n const { theme: surveyTheme } = props;\r\n const theme: any = useTheme();\r\n const classes = useStyles({ theme });\r\n const {\r\n LanguageSelectorVisible,\r\n ViewResponsesButtonVisible,\r\n LanguageSelectorLabelActive,\r\n } = theme;\r\n\r\n const dispatch = useDispatch();\r\n const language = useSelector((state: StoreState) => state.interview.language);\r\n const languages = useSelector((state: StoreState) => state.interview.questionnaire.languages);\r\n\r\n const longestLanguageNameCode = maxBy(\r\n languages,\r\n (code) => CULTURE_INFO[code].nativeName.length,\r\n );\r\n const longestLanguageNameLength = CULTURE_INFO[longestLanguageNameCode].nativeName.length;\r\n\r\n const viewResponsesText = useTranslatable(surveyTheme, \"PrintResponsesButton\");\r\n const languageSelectorTranslatedText = useTranslatable(surveyTheme, \"LanguageSelector\");\r\n\r\n function viewResponses() {\r\n let url = window.location.href;\r\n let win = null;\r\n\r\n if (url.includes(`/S2`)) {\r\n url =\r\n url.split(`/S2`)[0] + `/S2/Responses/Index?${QueryParameters.LANGUAGE}=${language}`;\r\n } else {\r\n url = `Responses/Index?${QueryParameters.LANGUAGE}=${language}`;\r\n }\r\n\r\n const psid = document.querySelector<HTMLInputElement>(\"#S2_SessionId\")?.value;\r\n const skey = document.querySelector<HTMLInputElement>(\"#S2_SessionId_Skey\")?.value;\r\n\r\n if (psid) {\r\n url += `&${QueryParameters.PAGE_SESSION_ID}=${psid}`;\r\n }\r\n if (skey) {\r\n url += `&${QueryParameters.SESSION_KEY}=${skey}`;\r\n }\r\n\r\n win = window.open(url);\r\n if (win) win.focus();\r\n }\r\n const languageSelectorLabel = LanguageSelectorLabelActive && (\r\n <span>{languageSelectorTranslatedText}</span>\r\n );\r\n return (\r\n <aside className={classes.topNavigation} aria-label=\"Top Navigation\">\r\n {ViewResponsesButtonVisible && (\r\n <Button\r\n className=\"top-navigation__view-responses\"\r\n text={viewResponsesText}\r\n onClick={viewResponses}\r\n size=\"small\"\r\n />\r\n )}\r\n\r\n {LanguageSelectorVisible && (\r\n <>\r\n {languageSelectorLabel}\r\n <Select\r\n id=\"LANGUAGE_SELECTOR_INPUT\"\r\n className={classes.languageSelector}\r\n value={[language]}\r\n size={`${longestLanguageNameLength * 20}px`}\r\n onChange={(code) => dispatch(changeLanguage(code[0]))}\r\n icon=\"globe\"\r\n disabled={languages.length < 2}\r\n options={languages.map((code) => ({\r\n id: `LANGUAGE_SELECTOR_INPUT_${code.toUpperCase()}`,\r\n label: CULTURE_INFO[code.toLowerCase()].nativeName,\r\n value: code,\r\n }))}\r\n />\r\n </>\r\n )}\r\n </aside>\r\n );\r\n}\r\n","import React from \"react\";\r\nimport { Settings } from \"luxon\";\r\nimport { useTheme } from \"react-jss\";\r\nimport classnames from \"classnames\";\r\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { QuestionListContainer } from \"../../../containers/page/QuestionListContainer\";\r\nimport { NavigationContainer } from \"../../../containers/page/NavigationContainer\";\r\nimport { NavigationType } from \"../../../models/enums/NavigationType\";\r\nimport Progress from \"../../page/Progress\";\r\nimport { ThemeModel } from \"../../../models/ThemeModel\";\r\nimport { Signal } from \"../../../signals\";\r\nimport { QuestionnaireModel } from \"../../../models/QuestionnaireModel\";\r\nimport { ValidationOptionsModel } from \"../../../models/ValidationOptionsModel\";\r\nimport { ValidationResultModel } from \"../../../models/ValidationResultModel\";\r\nimport ValidationSummary from \"./ValidationSummaryRenderer\";\r\nimport useStyles from \"./PageRenderer.styles\";\r\nimport useTranslatable from \"../../../hooks/useTranslatable\";\r\nimport { PageWrapperDimensionsContext } from \"../../../hooks/useDimensionContext\";\r\nimport TopNavigation from \"../../page/TopNavigation\";\r\nimport { useElementDimensions, DimensionModel } from \"../../../hooks/useElementDimensions\";\r\nimport ErrorRenderer from \"../../shared/ErrorRenderer\";\r\nimport { isIE } from \"../../../utils\";\r\nimport { StoreState } from \"../../../models/states/StoreState\";\r\nimport { useThunkDispatch } from \"../../../redux/thunks\";\r\nimport { setEnableLegacyBrowserWarning } from \"../../../redux/actions\";\r\nimport { translate } from \"../../../models/utilities/translationUtilities\";\r\nimport { isEmpty } from \"../../../utils/lodash\";\r\nimport { checkIfS2LoadedInsideAgent } from \"../../../utils/voxcoAgentHelper\";\r\nimport { QuestionModel } from \"../../../models/QuestionModel\";\r\n\r\ninterface Props {\r\n questions: QuestionModel[];\r\n message: string | Error;\r\n language: string;\r\n questionnaire: QuestionnaireModel;\r\n matrixIndex: number;\r\n isNavigationDisabled: boolean;\r\n progress: number;\r\n title: string;\r\n theme: ThemeModel;\r\n validateSignal: Signal<ValidationOptionsModel, ValidationResultModel>;\r\n isValid: boolean;\r\n onNavigation(type: NavigationType): void;\r\n isDesktopPreviewView?: boolean;\r\n}\r\ninterface PageProps {\r\n children?: React.ReactNode;\r\n pageRef: React.RefObject<HTMLDivElement>;\r\n}\r\ninterface PageWrapperProps {\r\n children?: React.ReactNode;\r\n wrapperRef: React.Ref<HTMLDivElement>;\r\n dimension: DimensionModel;\r\n}\r\ninterface PageContentProps {\r\n pageRef: React.RefObject<HTMLDivElement>;\r\n wrapperRef: React.Ref<HTMLDivElement>;\r\n dimension: DimensionModel;\r\n}\r\n\r\nfunction Page(props: PageProps) {\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n const { children, pageRef } = props;\r\n\r\n return (\r\n <div role=\"none\" className={classes.page} ref={pageRef}>\r\n <Skiplink />\r\n {children}\r\n </div>\r\n );\r\n}\r\n\r\nfunction PageWrapper(props: PageWrapperProps) {\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n const { children, wrapperRef, dimension } = props;\r\n return (\r\n <div\r\n ref={wrapperRef}\r\n className={classnames(\r\n classes.pageWrapper,\r\n dimension && dimension.maxWidth(778) && classes.dynamicPageWrapper,\r\n )}\r\n >\r\n {children}\r\n </div>\r\n );\r\n}\r\n\r\nfunction ErrorMessage({ message }) {\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n return process.env.NODE_ENV === \"development\" ? (\r\n <ErrorRenderer error={message} />\r\n ) : (\r\n <div className={classes.pageMessage}>An error has occurred.</div>\r\n );\r\n}\r\n\r\nfunction PageMessage({ message, pageRef, wrapperRef, dimension }) {\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n return (\r\n <Page pageRef={pageRef}>\r\n <PageWrapper wrapperRef={wrapperRef} dimension={dimension}>\r\n <div className={classes.pageContent}>\r\n {typeof message === \"object\" ? (\r\n <ErrorMessage message={message} />\r\n ) : (\r\n <div\r\n className={classes.pageMessage}\r\n dangerouslySetInnerHTML={{ __html: message }}\r\n />\r\n )}\r\n </div>\r\n </PageWrapper>\r\n </Page>\r\n );\r\n}\r\n\r\nfunction Logo(props: Props) {\r\n const { theme: surveyTheme } = props;\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n const logo = useTranslatable(surveyTheme, \"Logo\");\r\n const { LogoDescription } = theme as any;\r\n\r\n if (!logo) {\r\n return null;\r\n }\r\n return <img className={classes.pageHeaderLogo} src={logo} alt={LogoDescription ?? \"\"} />;\r\n}\r\n\r\nfunction PageHeader(props: Props) {\r\n const { theme: surveyTheme } = props;\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n const pageHeader = useTranslatable(surveyTheme, \"PageHeader\");\r\n return (\r\n <>\r\n <header className={classes.pageHeader}>\r\n <Logo {...props} />\r\n <div\r\n id=\"PageHeader\"\r\n className={classes.pageHeaderContent}\r\n dangerouslySetInnerHTML={{ __html: pageHeader }}\r\n />\r\n </header>\r\n <div className=\"clear\" />\r\n </>\r\n );\r\n}\r\n\r\nfunction PageFooter(props: Props) {\r\n const { theme: surveyTheme } = props;\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n const pageFooter = useTranslatable(surveyTheme, \"PageFooter\");\r\n return (\r\n <>\r\n <footer\r\n className={classes.pageFooter}\r\n dangerouslySetInnerHTML={{ __html: pageFooter }}\r\n />\r\n <div className=\"clear\" />\r\n </>\r\n );\r\n}\r\n\r\nfunction LegacyBrowserWarning({ isDisplayWide, questionnaire, language }) {\r\n const dispatch = useThunkDispatch();\r\n const theme: any = useTheme();\r\n const classes = useStyles({ theme });\r\n\r\n const buttonText = translate(questionnaire.theme, \"acknowledgementButton\", language);\r\n const message = translate(questionnaire, \"legacyBrowserWarning\", language);\r\n\r\n // Split message into sentences by replacing punctuation marks (optionally followed by spaces) with pipe and splitting by pipe\r\n const sentences = message.replace(/([.?!])\\s*(?=[A-Z0-9])/g, \"$1|\").split(\"|\");\r\n const firstSentence = sentences[0];\r\n\r\n // Join remaining sentences if any\r\n const remainingSentences = sentences.length > 1 ? sentences.slice(1).join(\" \") : null;\r\n\r\n const onClick = () => {\r\n // Change questionnaire setting to hide warning\r\n dispatch(setEnableLegacyBrowserWarning(false));\r\n };\r\n\r\n return (\r\n <div\r\n className={\r\n isDisplayWide\r\n ? classes.legacyBrowserWarningFloating\r\n : classes.legacyBrowserWarningInline\r\n }\r\n >\r\n <div className={classes.legacyBrowserWarningIconContainer}>\r\n <div className={classes.legacyBrowserWarningIconBackground}>\r\n <FontAwesomeIcon\r\n size=\"3x\"\r\n icon={[\"fas\", \"exclamation\"]}\r\n transform=\"shrink-7\"\r\n color={theme.ControlBackground}\r\n />\r\n </div>\r\n </div>\r\n <div className={classes.legacyBrowserWarningContent}>\r\n <div>\r\n <p className={classes.legacyBrowserWarningEmphasis}>{firstSentence}</p>\r\n {remainingSentences && <p>{remainingSentences}</p>}\r\n </div>\r\n <div\r\n className={classes.legacyBrowserWarningButton}\r\n role=\"button\"\r\n onClick={onClick}\r\n tabIndex={0}\r\n onKeyPress={null}\r\n >\r\n {buttonText}\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n\r\nfunction Backlink() {\r\n const theme: any = useTheme();\r\n const classes = useStyles({ theme });\r\n\r\n return (\r\n <div className={classes.backlinkContainer}>\r\n <a\r\n className={classes.backlink}\r\n href=\"https://www.voxco.com\"\r\n target=\"_blank\"\r\n rel=\"noopener noreferrer\"\r\n >\r\n Survey Software\r\n </a>{\" \"}\r\n Powered by Voxco\r\n </div>\r\n );\r\n}\r\n\r\nfunction Skiplink() {\r\n const theme = useTheme();\r\n const classes = useStyles({ theme });\r\n\r\n return (\r\n <div className={classes.skiplinkContainer}>\r\n <a href=\"#maincontent\">Skip to main content</a>\r\n </div>\r\n );\r\n}\r\n\r\nfunction PageContent(props: Props & PageContentProps) {\r\n const {\r\n pageRef,\r\n wrapperRef,\r\n dimension,\r\n title,\r\n validateSignal,\r\n onNavigation,\r\n theme: surveyTheme,\r\n questions,\r\n language,\r\n questionnaire,\r\n matrixIndex,\r\n isValid,\r\n progress,\r\n isDesktopPreviewView,\r\n } = props;\r\n\r\n const isDisplayWide = dimension.minWidth(901);\r\n const isLegacyBrowser = isIE();\r\n const enableLegacyBrowserWarning = useSelector(\r\n (state: StoreState) => state.interview.questionnaire.settings.ENABLE_LEGACY_BROWSER_WARNING,\r\n );\r\n\r\n const showLegacyBrowserWarning = enableLegacyBrowserWarning && isLegacyBrowser;\r\n\r\n Settings.defaultLocale = language;\r\n\r\n const theme: any = useTheme();\r\n const {\r\n ProgressBarType,\r\n ProgressBarDisplay,\r\n ProgressBarVisible,\r\n LanguageSelectorVisible,\r\n ViewResponsesButtonVisible,\r\n TopNavigationPosition,\r\n BottomNavigationPosition,\r\n } = theme;\r\n const topNavigationVisible = LanguageSelectorVisible || ViewResponsesButtonVisible;\r\n\r\n if (title) {\r\n document.title = title;\r\n }\r\n\r\n const showProgress = progress >= 0 && ProgressBarVisible;\r\n const showProgressTop =\r\n showProgress && (ProgressBarDisplay === \"topAndBottom\" || ProgressBarDisplay === \"top\");\r\n const showProgressBottom =\r\n showProgress && (ProgressBarDisplay === \"topAndBottom\" || ProgressBarDisplay === \"bottom\");\r\n\r\n const isProgressFloating = ProgressBarType === \"floating\";\r\n\r\n // Enable backlink for newly created surveys that don't yet have SettingsJson\r\n let enableBacklink = true;\r\n if (!isEmpty(surveyTheme.settings)) {\r\n enableBacklink = surveyTheme.settings.EnableBacklink;\r\n }\r\n\r\n return (\r\n <PageWrapperDimensionsContext.Provider value={dimension}>\r\n <Page pageRef={pageRef}>\r\n {showLegacyBrowserWarning && isDisplayWide && (\r\n <LegacyBrowserWarning\r\n isDisplayWide={isDisplayWide}\r\n questionnaire={questionnaire}\r\n language={language}\r\n />\r\n )}\r\n {topNavigationVisible && TopNavigationPosition === \"floating\" && (\r\n <TopNavigation theme={surveyTheme} />\r\n )}\r\n <PageWrapper wrapperRef={wrapperRef} dimension={dimension}>\r\n {showLegacyBrowserWarning && !isDisplayWide && (\r\n <LegacyBrowserWarning\r\n isDisplayWide={isDisplayWide}\r\n questionnaire={questionnaire}\r\n language={language}\r\n />\r\n )}\r\n {topNavigationVisible && TopNavigationPosition === \"wrapper\" && (\r\n <TopNavigation theme={surveyTheme} />\r\n )}\r\n <PageHeader {...props} />\r\n <ValidationSummary\r\n language={language}\r\n questionnaire={questionnaire}\r\n isValid={isValid}\r\n />\r\n {showProgressTop && <Progress value={progress} position=\"top\" />}\r\n {(!showProgress || !showProgressTop || isProgressFloating) && <hr />}\r\n {BottomNavigationPosition === \"wrapper\" && (\r\n <NavigationContainer position=\"top\" onNavigation={onNavigation} />\r\n )}\r\n <QuestionListContainer\r\n questions={questions}\r\n questionnaire={questionnaire}\r\n matrixIndex={matrixIndex}\r\n language={language}\r\n validateSignal={validateSignal}\r\n onNavigation={onNavigation}\r\n theme={surveyTheme}\r\n isDesktopPreviewView={isDesktopPreviewView}\r\n />\r\n <hr />\r\n {BottomNavigationPosition === \"wrapper\" && (\r\n <NavigationContainer position=\"bottom\" onNavigation={onNavigation} />\r\n )}\r\n {showProgressBottom && <Progress value={progress} position=\"bottom\" />}\r\n <PageFooter {...props} />\r\n </PageWrapper>\r\n {BottomNavigationPosition === \"floating\" && (\r\n <NavigationContainer position=\"bottom\" onNavigation={onNavigation} />\r\n )}\r\n {enableBacklink && !checkIfS2LoadedInsideAgent() && <Backlink />}\r\n </Page>\r\n </PageWrapperDimensionsContext.Provider>\r\n );\r\n}\r\n\r\nexport default function PageRenderer(props: Props) {\r\n const { message } = props;\r\n const pageRef = React.useRef(null);\r\n const { ref: wrapperRef, dimensions: dimension } = useElementDimensions<HTMLDivElement>();\r\n\r\n if (message) {\r\n return <PageMessage {...{ ...props, pageRef, wrapperRef, dimension }} />;\r\n }\r\n\r\n return <PageContent {...{ ...props, pageRef, wrapperRef, dimension }} />;\r\n}\r\n","import { DispositionCode } from \"../../models/enums/DispositionCode\";\r\nimport { StoreState } from \"../../models/states/StoreState\";\r\nimport { navigationQuit } from \"../actions\";\r\nimport { ThunkActionType } from \"../actions/types\";\r\n\r\nexport const exitSurvey = (): ThunkActionType<void> => {\r\n const selectRespondentDispositionCode = (state: StoreState) =>\r\n state.interview.respondent.dispositionCode;\r\n\r\n return (dispatch, getState) => {\r\n let dispositionCode = selectRespondentDispositionCode(getState());\r\n if (dispositionCode !== DispositionCode.Completed) {\r\n dispositionCode = DispositionCode.Interrupted;\r\n }\r\n dispatch(navigationQuit(dispositionCode, { forcedQuit: true }));\r\n };\r\n};\r\n","import React from \"react\";\r\nimport { NavigationType } from \"../../models/enums/NavigationType\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\nimport { ThemeModel } from \"../../models/ThemeModel\";\r\nimport { getSettingString, getSettingEnum } from \"../../models/utilities/settingUtilities\";\r\nimport { Signal } from \"../../signals/index\";\r\nimport { Voxco } from \"../../public\";\r\nimport { ValidationEvent } from \"../../public/events\";\r\nimport { ValidationOptionsModel } from \"../../models/ValidationOptionsModel\";\r\nimport { QuitButtonAction } from \"../../models/enums/QuitButtonAction\";\r\nimport { QuestionnaireModel } from \"../../models/QuestionnaireModel\";\r\nimport { ValidationBuilder } from \"../../models/builders/ValidationBuilder\";\r\nimport PageRenderer from \"../renderers/v2/PageRenderer\";\r\nimport { ThunkDispatchProp } from \"../../models/actions/ThunkDispatchProp\";\r\nimport {\r\n validationClear,\r\n validationSetResult,\r\n navigationPreviousPage,\r\n navigationBranchTo,\r\n navigationNextPage,\r\n} from \"../../redux/actions\";\r\nimport {\r\n validate,\r\n getVisibleQuestions,\r\n validateAndNavigateToNextPage,\r\n} from \"../../redux/thunks/validation\";\r\nimport { isValid } from \"../../models/utilities/validationUtilities\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { exitSurvey } from \"../../redux/thunks/exitSurvey\";\r\n\r\ninterface Props extends ThunkDispatchProp {\r\n isValid: boolean;\r\n questions: QuestionModel[];\r\n message: string | Error;\r\n language: string;\r\n validation: ValidationResultModel;\r\n questionnaire: QuestionnaireModel;\r\n matrixIndex: number;\r\n isNavigationDisabled: boolean;\r\n progress: number;\r\n title: string;\r\n theme: ThemeModel;\r\n useClientValidation: boolean;\r\n isDesktopPreviewView?: boolean;\r\n}\r\n\r\n// Set this callback to the current page's validation function.\r\nlet validationCallback: (ev?: ValidationEvent) => ValidationResultModel;\r\n\r\n// Set up page validation event.\r\nVoxco.on(\"validatePage\", (ev) => (validationCallback ? validationCallback(ev) : ev));\r\n\r\nexport class Page extends React.PureComponent<Props> {\r\n validateSignal = new Signal<ValidationOptionsModel, ValidationResultModel>();\r\n\r\n componentDidMount() {\r\n validationCallback = this.onValidate;\r\n this.resizeImages();\r\n this.setViewportContent();\r\n window.onresize = () => this.resizeImages();\r\n }\r\n\r\n onValidate = (ev: ValidationEvent): ValidationResultModel => {\r\n // Prevent default behavior.\r\n if (ev.defaultPrevented) {\r\n return new ValidationBuilder().build();\r\n }\r\n const results = this.validateSignal.dispatch(ev.options);\r\n const result = results.reduce(\r\n (a, b) => ({\r\n isValid: a.isValid && isValid(b),\r\n errorsByVariableName: { ...a.errorsByVariableName, ...b.errorsByVariableName },\r\n }),\r\n { isValid: true, errorsByVariableName: {} },\r\n );\r\n // Set the current state if the validation is not silent.\r\n if (!ev.options || !ev.options.silent) {\r\n const { dispatch } = this.props;\r\n dispatch(validationClear(false, true));\r\n dispatch(validationSetResult(result));\r\n }\r\n return result;\r\n };\r\n\r\n onNavigation = (type: NavigationType) => {\r\n const { questionnaire, isNavigationDisabled, useClientValidation, dispatch } = this.props;\r\n switch (type) {\r\n case NavigationType.Next:\r\n case NavigationType.Submit:\r\n if (isNavigationDisabled) {\r\n break;\r\n }\r\n if (!useClientValidation) {\r\n Voxco.validatePage({ silent: true });\r\n dispatch(navigationNextPage());\r\n break;\r\n }\r\n if (\r\n process.env.DISABLE_CLIENT_VALIDATION !== \"true\" &&\r\n !Voxco.trigger(\"validatePage\").isValid\r\n ) {\r\n const questions = dispatch(getVisibleQuestions());\r\n dispatch(validate(questions));\r\n break;\r\n }\r\n dispatch(validateAndNavigateToNextPage());\r\n break;\r\n case NavigationType.Back:\r\n if (isNavigationDisabled) {\r\n break;\r\n }\r\n dispatch(navigationPreviousPage());\r\n break;\r\n case NavigationType.Quit: {\r\n const action = getSettingEnum(\r\n questionnaire,\r\n QuitButtonAction,\r\n \"QUIT_BUTTON_ACTION\",\r\n );\r\n const destination = getSettingString(\r\n questionnaire,\r\n \"QUIT_BUTTON_BRANCH_TO_QUESTION\",\r\n );\r\n if (destination && action === QuitButtonAction.BranchTo) {\r\n dispatch(navigationBranchTo({ destination, isQuitButton: true }));\r\n } else {\r\n dispatch(exitSurvey());\r\n }\r\n break;\r\n }\r\n default:\r\n break;\r\n }\r\n };\r\n\r\n setViewportContent() {\r\n if (window.navigator.appVersion.includes(\"iPhone\")) {\r\n const viewport = document.getElementsByName(\"viewport\")[0];\r\n const content = viewport.getAttribute(\"content\");\r\n viewport.setAttribute(\"content\", `${content}, maximum-scale=1`);\r\n }\r\n }\r\n\r\n resizeImages() {\r\n [\"pageHeader\", \"pageFooter\"].forEach((c) => {\r\n Array.from(document.getElementsByClassName(c)).forEach((element: HTMLElement) => {\r\n Array.from(element.getElementsByTagName(\"img\")).forEach((imgElement) => {\r\n const maxHeightPercent = 25;\r\n const currentHeightPercent = (imgElement.height / window.innerHeight) * 100;\r\n if (currentHeightPercent !== maxHeightPercent) {\r\n imgElement.style.maxHeight = `${\r\n (window.innerHeight * maxHeightPercent) / 100\r\n }px`;\r\n imgElement.style.maxWidth = \"100%\";\r\n imgElement.style.height = imgElement.style.height || \"auto\";\r\n imgElement.style.width = imgElement.style.width || \"auto\";\r\n }\r\n });\r\n });\r\n });\r\n }\r\n\r\n render() {\r\n return (\r\n <PageRenderer\r\n onNavigation={this.onNavigation}\r\n validateSignal={this.validateSignal}\r\n {...this.props}\r\n />\r\n );\r\n }\r\n}\r\n","import React from \"react\";\r\nimport { connect, DispatchProp } from \"react-redux\";\r\nimport { Page } from \"../../components/page/Page\";\r\nimport { PageModel } from \"../../models/PageModel\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { StoreState } from \"../../models/states/StoreState\";\r\nimport { Voxco } from \"../../public\";\r\nimport { ThemeModel } from \"../../models/ThemeModel\";\r\nimport { QuestionnaireModel } from \"../../models/QuestionnaireModel\";\r\nimport { translate } from \"../../models/utilities/translationUtilities\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\nimport { getContainerDiv } from \"../../utils\";\r\nimport {\r\n selectNavigationDisabled,\r\n selectNavigationMessage,\r\n} from \"../../redux/selectors/interview/navigation\";\r\n\r\ninterface OwnProps {\r\n isDesktopPreviewView?: boolean;\r\n}\r\n\r\ninterface StateProps {\r\n isValid: boolean;\r\n message: string | Error;\r\n validation: ValidationResultModel;\r\n questionnaire: QuestionnaireModel;\r\n isNavigationDisabled: boolean;\r\n page?: PageModel;\r\n questions: QuestionModel[];\r\n language: string;\r\n title: string;\r\n theme: ThemeModel;\r\n useClientValidation: boolean;\r\n}\r\n\r\ntype Props = OwnProps & StateProps;\r\n\r\nclass PageContainerImpl extends React.PureComponent<Props & DispatchProp> {\r\n componentDidMount() {\r\n const { page } = this.props;\r\n if (page !== undefined && page.isReady) {\r\n this.onPageReady(page);\r\n }\r\n }\r\n\r\n UNSAFE_componentWillReceiveProps(nextProps: StateProps) {\r\n const { page } = this.props;\r\n if (page !== nextProps.page) {\r\n const surveyEngine = getContainerDiv();\r\n if (surveyEngine !== undefined) surveyEngine.scrollTop = 0;\r\n }\r\n }\r\n\r\n componentDidUpdate(prevProps: Props) {\r\n const { page: prevPage } = prevProps;\r\n const { page } = this.props;\r\n if (page !== prevPage && page !== undefined && page.isReady) {\r\n this.onPageReady(page);\r\n }\r\n }\r\n\r\n onPageReady(page: PageModel) {\r\n Voxco.trigger(\"pageReady\", page);\r\n }\r\n\r\n render() {\r\n const { message, page } = this.props;\r\n return (\r\n <div role=\"region\" aria-live=\"polite\" className=\"pageContainer\">\r\n {(message || page?.isReady) && (\r\n <Page\r\n {...this.props}\r\n matrixIndex={page?.loopIndex ?? 1}\r\n progress={page?.progress ?? 0}\r\n />\r\n )}\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nconst mapStateToProps = (state: StoreState, ownProps: OwnProps): Props => {\r\n const { navigation, questionnaire, validation, language, theme } = state.interview;\r\n const { currentPage } = navigation ?? {};\r\n return {\r\n message: selectNavigationMessage(state),\r\n questionnaire,\r\n validation,\r\n isNavigationDisabled: selectNavigationDisabled(state),\r\n isValid: validation.isValid,\r\n page: currentPage,\r\n questions: currentPage?.questions ?? [],\r\n language,\r\n theme,\r\n title: translate(theme, \"SurveyTitle\", language),\r\n useClientValidation: state.interview.useClientValidation,\r\n isDesktopPreviewView: ownProps.isDesktopPreviewView,\r\n };\r\n};\r\n\r\nexport const PageContainer = connect(mapStateToProps)(PageContainerImpl);\r\n","import { TRUE } from \"../grammar/utils/consts\";\r\nimport { round } from \"../utils/Number\";\r\n\r\nexport class EvaluationResult {\r\n private result: string;\r\n\r\n constructor(result: string) {\r\n this.result = result;\r\n }\r\n\r\n asBoolean() {\r\n if (typeof this.result === \"string\") {\r\n if (/^-?[0-9]+(\\.[0-9]+)?$/.test(this.result)) return parseFloat(this.result) > 0;\r\n return this.result === TRUE;\r\n }\r\n if (typeof this.result === \"number\") return this.result > 0;\r\n if (typeof this.result === \"boolean\") return this.result;\r\n return false;\r\n }\r\n\r\n asNumber() {\r\n if (typeof this.result === \"string\" && /^-?[0-9]+(\\.[0-9]+)?$/.test(this.result))\r\n return round(parseFloat(this.result));\r\n if (typeof this.result === \"number\" && !isNaN(this.result)) return round(this.result);\r\n if (typeof this.result === \"boolean\" && this.result) return 1;\r\n return 0;\r\n }\r\n\r\n asString() {\r\n return String(this.asAny());\r\n }\r\n\r\n asAny() {\r\n if (typeof this.result === \"number\") {\r\n if (isNaN(this.result)) return 0;\r\n return round(this.result);\r\n }\r\n return this.result;\r\n }\r\n}\r\n","import { Parser, Grammar } from \"nearley\";\r\nimport { uniq, flatten, pickBy, some, zipObject, map, values } from \"../utils/lodash\";\r\nimport { InterviewState } from \"../models/states/InterviewState\";\r\nimport { LogicModel } from \"../models/LogicModel\";\r\nimport { QuestionModel } from \"../models/QuestionModel\";\r\nimport { BlockModel } from \"../models/BlockModel\";\r\nimport { INVALID } from \"../grammar/utils/consts\";\r\nimport { Piping } from \"../piping\";\r\nimport { RecallType } from \"../piping/RecallType\";\r\nimport { LogicType } from \"../models/enums/LogicType\";\r\nimport { ParserState } from \"../grammar/utils/ParserState\";\r\nimport { EvaluationResult } from \"./EvaluationResult\";\r\nimport { getSettingBoolean, hasSetting } from \"../models/utilities/settingUtilities\";\r\n// @ts-ignore\r\nimport * as grammar from \"../grammar/expressions.ne\";\r\nimport { ActionTypes } from \"../redux/actions/types\";\r\nimport { invalidateClientVariables } from \"../redux/actions\";\r\nimport { getKeywords } from \"../grammar/utils/consts\";\r\n\r\n// Compile grammar for basic and advanced expressions.\r\nconst advCompiled: any = Grammar.fromCompiled(grammar);\r\ngrammar.ParserStart = \"basic_expression\";\r\nconst basicCompiled: any = Grammar.fromCompiled(grammar);\r\n\r\n// TODO: This cache needs to be stored in redux.\r\n/**\r\n * Clears the expressions cache.\r\n */\r\nexport const clearCache = () => {\r\n cache = INITIAL_CACHE_STATE;\r\n};\r\n\r\n// Keep a cache of expression evaluations.\r\nconst INITIAL_CACHE_STATE = {\r\n resultById: {},\r\n resultIdsByVariableName: {},\r\n resultIdByKey: {},\r\n};\r\nlet cache = INITIAL_CACHE_STATE;\r\nlet _id = 0;\r\nconst newId = () => _id++;\r\nconst keyForExpression = (expression: string, simple?: boolean) =>\r\n simple ? `simple:${expression}` : expression;\r\n\r\n/**\r\n * Invalidates the cache for variables of an expression.\r\n */\r\nexport const invalidateCache = (...variables: string[]): any => {\r\n const a = variables.map((v) => cache.resultIdsByVariableName[v.toUpperCase()] || []);\r\n const b = flatten(a);\r\n const ids = uniq(b) as number[];\r\n if (ids.length === 0) return;\r\n cache = {\r\n resultById: pickBy(cache.resultById, (value, key) => ids.indexOf(parseInt(key)) === -1),\r\n resultIdByKey: pickBy(\r\n cache.resultIdByKey,\r\n (value: number, key) => ids.indexOf(value) === -1,\r\n ),\r\n resultIdsByVariableName: pickBy(\r\n cache.resultIdsByVariableName,\r\n (value, key) => !some(variables, (v) => v.toUpperCase() === key.toUpperCase()),\r\n ),\r\n };\r\n};\r\n\r\nexport function cacheEvaluation(key: string, result: string, variableDependencies: string[]) {\r\n const resultId = newId();\r\n cache = {\r\n resultById: {\r\n ...cache.resultById,\r\n [resultId]: result,\r\n },\r\n resultIdByKey: {\r\n ...cache.resultIdByKey,\r\n [key]: resultId,\r\n },\r\n resultIdsByVariableName: {\r\n ...cache.resultIdsByVariableName,\r\n ...zipObject(\r\n variableDependencies,\r\n map(variableDependencies, (v) => [\r\n ...(cache.resultIdsByVariableName[v] || []),\r\n resultId,\r\n ]),\r\n ),\r\n },\r\n };\r\n return resultId;\r\n}\r\n\r\nexport function findCachedEvaluation(key: string) {\r\n return cache.resultById[cache.resultIdByKey[key]];\r\n}\r\n\r\n/**\r\n * Parses an expression, returning a result.\r\n */\r\nexport const parse = (\r\n expression: string,\r\n parserState: ParserState,\r\n type: LogicType = LogicType.Advanced,\r\n) => {\r\n try {\r\n const simple = type === LogicType.Simple;\r\n // Parse piping for simple expressions.\r\n if (simple)\r\n expression = Piping.evaluateRecalls(parserState.interview, expression, RecallType.Code);\r\n // Remove leading and trailing spaces.\r\n expression = expression.trim();\r\n // Try to close all brackets.\r\n const openingBrackets = (expression.match(/\\(/g) || []).length;\r\n const closingBrackets = (expression.match(/\\)/g) || []).length;\r\n if (openingBrackets > closingBrackets)\r\n expression += \")\".repeat(openingBrackets - closingBrackets);\r\n else if (closingBrackets > openingBrackets) {\r\n for (let i = closingBrackets; i > openingBrackets; i--) {\r\n const index = expression.lastIndexOf(\")\");\r\n if (index > -1)\r\n expression = expression.slice(0, index) + expression.slice(index + 1);\r\n }\r\n }\r\n // Select compiled expression parser.\r\n const compiled = simple ? basicCompiled : advCompiled;\r\n const parser = new Parser(compiled);\r\n // Feed expression.\r\n parser.feed(expression.toLowerCase());\r\n // Return results.\r\n if (parser.results[0] == null) return INVALID;\r\n if (parser.results.length > 1)\r\n // eslint-disable-next-line no-console\r\n console.warn(\r\n `Evaluator: grammar for ${expression} was ambiguous; found ${parser.results.length} results.`,\r\n );\r\n // Evaluate by passing state if we receive a function.\r\n if (typeof parser.results[0] === \"function\") return parser.results[0](parserState);\r\n return parser.results[0];\r\n } catch (ex) {\r\n // eslint-disable-next-line no-console\r\n console.warn(`${expression}: ${ex}`);\r\n return INVALID;\r\n }\r\n};\r\n\r\n/**\r\n * Evaluates an expression in an unsafe way, returning a value in string or number.\r\n * Unsafe means that the evaluation will yield side-effects.\r\n * Side-effects will be dispatched using the dispatch function passed as a parameter.\r\n * For example, MVC will set variables.\r\n * @deprecated Use thunk instead.\r\n */\r\nexport function __evaluateUnsafe__(\r\n getInterview: () => InterviewState,\r\n dispatch: (action: ActionTypes) => ActionTypes,\r\n logic: LogicModel,\r\n): EvaluationResult;\r\nexport function __evaluateUnsafe__(\r\n getInterview: () => InterviewState,\r\n dispatch: (action: ActionTypes) => ActionTypes,\r\n logic: string,\r\n simple?: boolean,\r\n): EvaluationResult;\r\nexport function __evaluateUnsafe__(\r\n getInterview: () => InterviewState,\r\n dispatch: (action: ActionTypes) => ActionTypes,\r\n logic: LogicModel | string,\r\n simple?: boolean,\r\n) {\r\n simple = simple || false;\r\n if (typeof logic === \"object\") {\r\n simple = logic.type === LogicType.Simple;\r\n logic = logic.expression;\r\n }\r\n // Try to find the result in cache.\r\n const key = keyForExpression(logic, simple);\r\n let resultId = cache.resultIdByKey[key];\r\n if (resultId != null) return new EvaluationResult(cache.resultById[resultId]);\r\n // Evaluate the expression.\r\n const variables = [];\r\n let invalidateCache = false;\r\n const state: ParserState = {\r\n interview: getInterview(),\r\n didParseVariable: (variable: string) => {\r\n variables.push(variable.toUpperCase());\r\n },\r\n invalidateCache: () => {\r\n invalidateCache = true;\r\n dispatch(invalidateClientVariables());\r\n },\r\n dispatch: (action: ActionTypes) => {\r\n dispatch(action);\r\n state.interview = getInterview();\r\n },\r\n };\r\n const result = parse(logic, state, simple ? LogicType.Simple : LogicType.Advanced);\r\n // The evaluated result is not cacheable.\r\n if (invalidateCache) return new EvaluationResult(result);\r\n // Save in cache.\r\n cacheEvaluation(key, result, variables);\r\n return new EvaluationResult(result);\r\n}\r\n\r\n/**\r\n * Evaluates logic in a safe way. This eliminates all side-effects from the evaluated logic.\r\n * For example, MVC will not set variables.\r\n * Use this in display logic or other logic which should not have any side-effects.\r\n * @deprecated Use thunk instead.\r\n */\r\nexport function __evaluateSafe__(interview: InterviewState, logic: LogicModel): EvaluationResult;\r\nexport function __evaluateSafe__(\r\n interview: InterviewState,\r\n logic: string,\r\n simple?: boolean,\r\n): EvaluationResult;\r\nexport function __evaluateSafe__(\r\n interview: InterviewState,\r\n logic: LogicModel | string,\r\n simple?: boolean,\r\n) {\r\n simple = simple || false;\r\n if (typeof logic === \"object\") {\r\n simple = logic.type === LogicType.Simple;\r\n logic = logic.expression;\r\n }\r\n return __evaluateUnsafe__(\r\n () => interview,\r\n (a) => null,\r\n logic,\r\n simple,\r\n );\r\n}\r\n\r\n/**\r\n * Finds all variables in an expression.\r\n * You can optionally include system variables with inclSystem.\r\n */\r\nexport const findVariables = (expression: string | LogicModel): string[] => {\r\n if (!expression) return [];\r\n if (typeof expression !== \"string\") {\r\n expression = expression.expression;\r\n }\r\n const keywords = values(getKeywords());\r\n const variables = uniq(\r\n expression.match(/\\b[a-zA-Z]\\w*\\b/g)?.map((v) => v.toUpperCase()),\r\n ).filter((v) => !keywords.some((k) => k.toUpperCase() === v));\r\n return variables;\r\n};\r\n\r\n/**\r\n * @deprecated Use thunk instead.\r\n */\r\nexport const __isQuestionVisible__ = (question: QuestionModel, interview: InterviewState) => {\r\n if (\r\n interview.navigation.currentPage &&\r\n interview.navigation.currentPage.previewQuestion === question.name\r\n ) {\r\n return true;\r\n }\r\n\r\n if (hasSetting(question, \"Active\") && !getSettingBoolean(question, \"Active\")) {\r\n return false;\r\n }\r\n\r\n if (\r\n interview.navigation.currentPageOnServer?.questions?.some((q) => q.name === question.name)\r\n ) {\r\n return true;\r\n }\r\n\r\n const displayLogicEvaluation =\r\n question.displayLogic === undefined ||\r\n __evaluateSafe__(interview, question.displayLogic).asBoolean();\r\n\r\n const skipLogicEvaluation =\r\n question.skipLogic === undefined ||\r\n !__evaluateSafe__(interview, question.skipLogic).asBoolean();\r\n\r\n return displayLogicEvaluation && skipLogicEvaluation;\r\n};\r\n\r\n/**\r\n * @deprecated Use thunk instead.\r\n */\r\nexport const __isBlockVisible__ = (block: BlockModel, interview: InterviewState) =>\r\n block.questions.length > 0 &&\r\n (block.displayLogic === undefined ||\r\n __evaluateSafe__(interview, block.displayLogic).asBoolean()) &&\r\n (block.skipLogic === undefined || !__evaluateSafe__(interview, block.skipLogic).asBoolean());\r\n","/* eslint-disable @typescript-eslint/camelcase */\r\nexport const TRUE = \"1\";\r\nexport const FALSE = \"0\";\r\nexport const INVALID = -9999999;\r\n\r\nexport const getKeywords = () => ({\r\n // Function names.\r\n fn_min: \"min\",\r\n fn_max: \"max\",\r\n fn_som: \"som\",\r\n fn_sum: \"sum\",\r\n fn_smr: \"smr\",\r\n fn_sm2: \"sm2\",\r\n fn_ind: \"ind\",\r\n fn_prj: \"prj\",\r\n fn_if: \"if\",\r\n fn_si: \"si\",\r\n fn_v01: \"v01\",\r\n fn_nbr: \"nbr\",\r\n fn_sgn: \"sgn\",\r\n fn_cmp: \"cmp\",\r\n fn_cmr: \"cmr\",\r\n fn_meq: \"meq\",\r\n fn_mnb: \"mnb\",\r\n fn_rng: \"rng\",\r\n fn_rnk: \"rnk\",\r\n fn_sqr: \"sqr\",\r\n fn_ln: \"ln\",\r\n fn_log: \"log\",\r\n fn_abs: \"abs\",\r\n fn_trc: \"trc\",\r\n fn_ran: \"ran\",\r\n fn_mod: \"mod\",\r\n fn_exp: \"exp\",\r\n fn_jul: \"jul\",\r\n fn_yea: \"yea\",\r\n fn_mon: \"mon\",\r\n fn_day: \"day\",\r\n fn_wkd: \"wkd\",\r\n fn_qta: \"qta\",\r\n fn_qtf: \"qtf\",\r\n fn_qtc: \"qtc\",\r\n fn_str: \"str\",\r\n fn_nbc: \"nbc\",\r\n fn_qtisavail: \"qtisavail\",\r\n fn_qtareavail: \"qtareavail\",\r\n fn_getavailqt: \"getavailqt\",\r\n fn_selrandqt: \"selrandqt\",\r\n fn_qtisavailresp: \"qtisavailresp\",\r\n fn_qtareavailresp: \"qtareavailresp\",\r\n fn_getavailqtresp: \"getavailqtresp\",\r\n fn_selrandqtresp: \"selrandqtresp\",\r\n fn_rnb: \"rnb\",\r\n fn_rxy: \"rxy\",\r\n fn_nbl: \"nbl\",\r\n fn_csm: \"csm\",\r\n fn_cmx: \"cmx\",\r\n fn_cmn: \"cmn\",\r\n fn_cor: \"cor\",\r\n fn_can: \"can\",\r\n fn_cin: \"cin\",\r\n fn_mov: \"mov\",\r\n fn_mlb: \"mlb\",\r\n fn_mst: \"mst\",\r\n fn_mvc: \"mvc\",\r\n fn_fsr: \"fsr\",\r\n // Boolean keywords.\r\n not: \"not\",\r\n true: \"true\",\r\n false: \"false\",\r\n and: \"and\",\r\n or: \"or\",\r\n contains: \"contains\",\r\n non: \"non\",\r\n ou: \"ou\",\r\n et: \"et\",\r\n});\r\n","/* eslint-disable @typescript-eslint/camelcase */\r\nimport { DateTime } from \"luxon\";\r\nimport { isString, each, some, range, forEach } from \"../../utils/lodash\";\r\nimport * as as from \"./symbols\";\r\nimport { isEmptyOrNaN, isNullOrEmpty, isNullOrNaN } from \"../../utils\";\r\nimport { INVALID } from \"./consts\";\r\nimport { ParserState } from \"./ParserState\";\r\nimport { EPOCH } from \"../../utils/time\";\r\nimport { getMaxLoopSize } from \"../../models/utilities/blockUtilities\";\r\nimport { getVariableWithName } from \"../../models/utilities/questionnaireUtilities\";\r\nimport { round } from \"../../utils/Number\";\r\nimport { QuotaStatus } from \"../../models/enums/QuotaStatus\";\r\nimport { parse } from \"../../expressions/parser\";\r\nimport { EvaluationResult } from \"../../expressions/EvaluationResult\";\r\nimport { setVariableMentions, setLoopRow } from \"../../redux/actions\";\r\nimport { getMentionsCount, getMentions } from \"../../redux/reducers/interview/variablesUtilities\";\r\n\r\n/**\r\n * Validate functions input\r\n */\r\nexport function validateInput(s: ParserState, op: any, a: any, b?: any) {\r\n let v = [];\r\n v.push(as.number(s, a));\r\n if (b) v.push(as.number(s, b));\r\n if (v.some((x) => x === INVALID || (isNaN(x) && isString(x)))) return INVALID;\r\n if (v.some(Number.isNaN)) return NaN;\r\n v = v.map((x) => (x === undefined ? NaN : x));\r\n return v[1] !== undefined ? op(v[0], v[1]) : op(v[0]);\r\n}\r\n\r\nfunction setVariablesValues(s: ParserState, values: any[], variables: any[]) {\r\n // Iterate all variables.\r\n each(variables, (variable) => {\r\n // Get the variable object.\r\n const v = as.val(s, variable);\r\n if (v) {\r\n // Set mentions for the variable.\r\n s.dispatch(\r\n setVariableMentions(v.name, (mentions) => {\r\n // Clear and add all mentions.\r\n mentions.clear();\r\n each(values, (value) => mentions.add(value));\r\n return mentions;\r\n }),\r\n );\r\n }\r\n });\r\n}\r\n\r\nfunction getValidNumber(v: any) {\r\n return !v || v === \"\" ? 0 : v;\r\n}\r\n\r\nfunction isInvalid(v: any) {\r\n return isNullOrNaN(v) || v === INVALID;\r\n}\r\n\r\n/**\r\n * Validate functions output\r\n */\r\nexport function validateOutput(v: number) {\r\n if (isInvalid(v)) return INVALID;\r\n return isFinite(v) ? v : 0;\r\n}\r\n\r\n/**\r\n * Performs a test of set membership between variables and values.\r\n */\r\nexport function eq(s: ParserState, variable: any, input: any) {\r\n variable = as.val(s, variable);\r\n input = as.val(s, input);\r\n return variable.equals(input) ? 1 : 0;\r\n}\r\n\r\n/**\r\n * Verifies that an input number or string literal corresponds to a variable or value.\r\n */\r\nexport function eq_algebraic(s: ParserState, a: any, b: any) {\r\n const f = (v1: any, v2: any) => v1 === v2;\r\n return algebraic(s, a, b, f);\r\n}\r\n\r\n/**\r\n * Verifies that an input number or string literal is greater than a variable or value.\r\n */\r\nexport function gt(s: ParserState, a: any, b: any) {\r\n const f = (v1: any, v2: any) => (v1 || 0) > (v2 || 0);\r\n return algebraic(s, a, b, f);\r\n}\r\n\r\n/**\r\n * Verifies that an input number or string literal is less than a variable or value.\r\n */\r\nexport function lt(s: ParserState, a: any, b: any) {\r\n const f = (v1: any, v2: any) => (v1 || 0) < (v2 || 0);\r\n return algebraic(s, a, b, f);\r\n}\r\n\r\n/**\r\n * Algebraic comparison.\r\n */\r\nexport function algebraic(s: ParserState, a: any, b: any, op: any) {\r\n a = as.number(s, a);\r\n if (isEmptyOrNaN(a)) a = 0;\r\n b = as.number(s, b);\r\n if (isEmptyOrNaN(b)) b = 0;\r\n if ([a, b].some((v) => v === INVALID || (isNaN(v) && isString(v)))) return INVALID;\r\n return op(a, b);\r\n}\r\n\r\n/**\r\n * Compares every mention of a variable with a value, returning 1 if the value is greater,\r\n * -1 if it is less than and 0 if it is equal.\r\n */\r\nexport function compare(s: ParserState, variable: any, value: any) {\r\n variable = as.val(s, variable);\r\n value = as.val(s, value);\r\n return variable.compare(value);\r\n}\r\n\r\n/**\r\n * Returns true if the variable does not have any mentions or all mentions are empty.\r\n */\r\nexport function empty(s: ParserState, variable: any) {\r\n variable = as.val(s, variable);\r\n const values = variable.values();\r\n if (values.length === 0) return true;\r\n return values.every(isNullOrEmpty);\r\n}\r\n\r\n/**\r\n * Returns true if any mention of the variable matches the value.\r\n */\r\nexport function strfind(s: ParserState, variable: any, input: any) {\r\n variable = as.val(s, variable);\r\n input = as.string(s, input);\r\n return variable.values().some((v: string) => v.toLowerCase().indexOf(input.toLowerCase()) > -1);\r\n}\r\n\r\n/**\r\n * Performs a vector operation on values.\r\n */\r\nexport function vec(s: ParserState, values: any[], op: (v: number[]) => number) {\r\n values = as.val(s, values);\r\n if (values.length < 2) return NaN;\r\n const numbers = values.map((v) => as.number(s, v));\r\n return op(numbers);\r\n}\r\n\r\n/**\r\n * Performs a boolean operation, returning v1 if true or v2 if false.\r\n */\r\nexport function bool(s: ParserState, ex: any, v1?: any, v2?: any) {\r\n ex = as.val(s, ex);\r\n if (v1 === undefined) v1 = true;\r\n if (v2 === undefined) v2 = false;\r\n if (ex === INVALID) return !isInvalid(v2) ? v2 : INVALID;\r\n if (isEmptyOrNaN(v1)) v1 = 0;\r\n if (isEmptyOrNaN(v2)) v2 = 0;\r\n const result = (ex ? v1 : v2) || 0;\r\n return !isInvalid(result) ? result : INVALID;\r\n}\r\n\r\n/**\r\n * Counts mentions for multiple mentions and returns the sum.\r\n */\r\nexport function nbr(s: ParserState, ...vars: any[]) {\r\n return vars\r\n .map(\r\n (v) =>\r\n as\r\n .val(s, v)\r\n .values()\r\n .filter((v: string) => !isNullOrEmpty(v)).length,\r\n )\r\n .reduce((a, b) => a + b);\r\n}\r\n\r\n/**\r\n * Compares two values. Returns v1 if a<b; v2 if a=b, v3 if a>b.\r\n */\r\nexport function cmp(s: ParserState, a: any, b: any = 0, v1: any = -1, v2: any = 0, v3: any = 1) {\r\n a = as.number(s, a);\r\n if (isEmptyOrNaN(a)) a = 0;\r\n b = as.number(s, b);\r\n if (isEmptyOrNaN(b)) b = 0;\r\n v1 = as.number(s, v1);\r\n v2 = as.number(s, v2);\r\n v3 = as.number(s, v3);\r\n if (some([a, b], isInvalid)) return INVALID;\r\n if (a === b) return v2;\r\n return a > b ? v3 : v1;\r\n}\r\n\r\n/**\r\n * Compares two values. Returns -1 if a<0; 0 if a=0, 1 if a>0.\r\n */\r\nexport function sgn(s: ParserState, a: any) {\r\n a = as.number(s, a);\r\n if (isInvalid(a)) a = INVALID;\r\n if (a === 0) return 0;\r\n return a > 0 ? 1 : -1;\r\n}\r\n\r\n/**\r\n * Compares a variable with other variables, returning how many mentions are found in all other variables listed.\r\n */\r\nexport function cmr(s: ParserState, v1: any, ...vn: any[]) {\r\n v1 = as.val(s, v1);\r\n vn = vn.map((v) => as.val(s, v));\r\n return v1.values().filter((m: string) => {\r\n if (isNullOrEmpty(m)) return false;\r\n // Return true if all vn have this mention in common.\r\n return vn.every((v) => v.values().includes(m));\r\n }).length;\r\n}\r\n\r\n/**\r\n * Returns 1 if the code present in the specified mention of a variable equals the specified code.\r\n */\r\nexport function meq(s: ParserState, variable: any, i: any, code: any) {\r\n variable = as.val(s, variable);\r\n const mention = getMentions(s.interview.variables, variable.name)[i - 1];\r\n if (!mention) return 0;\r\n let value: any = mention.value;\r\n if (typeof code === \"number\") value = parseFloat(mention.value);\r\n return value === code ? 1 : 0;\r\n}\r\n\r\n/**\r\n * Compares a variable with other variables, returning how many mentions are found in all other variables listed.\r\n */\r\nexport function mnb(s: ParserState, variable: any, code: any) {\r\n variable = as.val(s, variable);\r\n code = as.string(s, code);\r\n return (\r\n variable.values().findIndex((m: string) => {\r\n // If the mention is a number, use number comparison.\r\n if (/^-?[0-9]+(\\.[0-9]+)?$/.test(m)) return as.number(s, code) === as.number(s, m);\r\n return code === m;\r\n }) + 1\r\n );\r\n}\r\n\r\n/**\r\n * Returns the index of the last vn that is less than or equal to v1.\r\n */\r\nexport function rng(s: ParserState, v1: any, ...vn: any[]) {\r\n v1 = as.number(s, v1);\r\n vn = vn.map((v) => as.number(s, v));\r\n return vn.filter((v) => v <= v1).length;\r\n}\r\n\r\n/**\r\n * RNK (A, VAL1, VAL2, VAL3..)\r\n * Returns the number of items in list VAL1, VAL2, VAL3.. Each value is less than or equal to A\r\n */\r\nexport function rnk(s: ParserState, v1: any, ...vn: any[]) {\r\n v1 = as.number(s, v1);\r\n if (v1 === null) v1 = 0;\r\n vn = vn.map((v) => {\r\n const num = as.number(s, v);\r\n return num === null ? 0 : num;\r\n });\r\n if ([...vn, v1].some(isInvalid)) return INVALID;\r\n return vn.filter((v) => v <= v1).length;\r\n}\r\n\r\n/**\r\n * Returns the index of the last vn that is greater than or equal to v1.\r\n */\r\nexport function ran(s: ParserState, lower: any, upper: any) {\r\n lower = as.number(s, lower);\r\n upper = as.number(s, upper);\r\n if ([upper, lower].some((v) => v === null) || upper === lower) return INVALID;\r\n const result = Math.random() * (upper - lower) + lower;\r\n if (s.invalidateCache) s.invalidateCache();\r\n return validateOutput(result);\r\n}\r\n\r\n/**\r\n * MOD (A,B) = A modulo B Remainder of division of A by B.\r\n */\r\nexport function mod(s: ParserState, dividend: any, divisor: any) {\r\n const f = (v1: any, v2: any) => {\r\n return round(Math.trunc(v1 || 0) % Math.trunc(v2 || 0));\r\n };\r\n return validate(s, f, dividend, divisor);\r\n}\r\n\r\n/**\r\n * Square root.\r\n */\r\nexport function sqr(s: ParserState, v: any) {\r\n v = as.number(s, v);\r\n if (isEmptyOrNaN(v)) return 0;\r\n if (v === INVALID || isNaN(v)) return INVALID;\r\n const result = validateInput(s, Math.sqrt, v);\r\n return validateOutput(result);\r\n}\r\n\r\n/**\r\n * Natural logarithm.\r\n */\r\nexport function ln(s: ParserState, v: any) {\r\n const result = validate(s, Math.log2, v);\r\n return result !== INVALID ? result : 0;\r\n}\r\n\r\n/**\r\n * Logarithm (base 10).\r\n */\r\nexport function log(s: ParserState, v: any) {\r\n const result = validate(s, Math.log10, v);\r\n return result !== INVALID ? result : 0;\r\n}\r\n\r\n/**\r\n * Absolute value.\r\n */\r\nexport function abs(s: ParserState, v: any) {\r\n return validateInput(s, Math.abs, v);\r\n}\r\n\r\n/**\r\n * Integer part (Truncation).\r\n */\r\nexport function trc(s: ParserState, v: any) {\r\n return validate(s, Math.trunc, v);\r\n}\r\n\r\n/**\r\n * Exponential (e ** A)\r\n */\r\nexport function exp(s: ParserState, v: any) {\r\n return validate(s, Math.exp, v);\r\n}\r\n\r\n/**\r\n * Validate function values\r\n */\r\nexport function validate(s: ParserState, op: any, v1: any, v2?: any) {\r\n const result = validateInput(s, op, v1, v2);\r\n return validateOutput(result);\r\n}\r\n\r\n/**\r\n * Julian (YEAR, MONTH, DAY).\r\n * Returns the absolute day from January 1, 1980, allowing to compute the number of days between two dates.\r\n * For example: $D – JUL (1992, MONTH, DAY).\r\n */\r\nexport function jul(s: ParserState, year: any, month: any, day: any) {\r\n year = as.number(s, year);\r\n month = as.number(s, month);\r\n day = as.number(s, day);\r\n const date = DateTime.fromFormat(`${year}-${month}-${day}`, \"yyyy-M-d\");\r\n return date.diff(EPOCH, \"days\").days;\r\n}\r\n\r\n/**\r\n * Returns the year of a Julian date.\r\n */\r\nexport const yea = (s: ParserState, jul: any) => as.epoch(s, jul).year;\r\n\r\n/**\r\n * Returns the month of a Julian date.\r\n */\r\nexport const mon = (s: ParserState, jul: any) => as.epoch(s, jul).month;\r\n\r\n/**\r\n * Returns the day of a Julian date.\r\n */\r\nexport const day = (s: ParserState, jul: any) => as.epoch(s, jul).day;\r\n\r\n/**\r\n * Returns the day of the week of a Julian date (Sun=1).\r\n */\r\nexport const wkd = (s: ParserState, jul: any) => {\r\n const { weekday } = as.epoch(s, jul);\r\n switch (weekday) {\r\n case 7:\r\n return 1;\r\n default:\r\n return weekday + 1;\r\n }\r\n};\r\n\r\nfunction getQuota(s: ParserState, value: any) {\r\n return s.interview.quotas.input.find((i) => i.stratumId === value);\r\n}\r\n\r\n/**\r\n * Returns the number of choices in a question.\r\n */\r\nexport function nbc(s: ParserState, variable: any) {\r\n variable = as.val(s, variable);\r\n return getVariableWithName(s.interview.questionnaire, variable.name).choiceList.length;\r\n}\r\n\r\n/**\r\n * Returns the quota for a given quota stratum. Reference to a stratum is made by its Stratum ID. No.\r\n */\r\nexport function qta(s: ParserState, value: any) {\r\n value = as.val(s, value);\r\n const quota = getQuota(s, value);\r\n if (quota) return quota.objective;\r\n return 0;\r\n}\r\n\r\n/**\r\n * \tReturns the current frequency for a given stratum (quota cell).\r\n */\r\nexport function qtf(s: ParserState, value: any) {\r\n value = as.val(s, value);\r\n const quota = getQuota(s, value);\r\n if (quota) return quota.frequency;\r\n return 0;\r\n}\r\n\r\n/**\r\n * \tReturns the number of current interviews for a given stratum (quota cell).\r\n */\r\nexport function qtc(s: ParserState, value: any) {\r\n value = as.val(s, value);\r\n const quota = getQuota(s, value);\r\n if (quota) return quota.online;\r\n return 0;\r\n}\r\n\r\nfunction isStratumAvailable(s: ParserState, useOnlines: boolean, stratumId: number) {\r\n const stratum = getQuota(s, stratumId);\r\n if (stratum && stratum.status !== QuotaStatus.Closed) {\r\n const completes = useOnlines ? stratum.frequency + stratum.online : stratum.frequency;\r\n return stratum.objective <= 0 || completes < stratum.objective;\r\n }\r\n return false;\r\n}\r\n\r\nfunction getAvailableStratum(s: ParserState, useOnlines: boolean, strata: number[]) {\r\n let missingCompletes = 0;\r\n let lastMissingCompletes = 0;\r\n let result = 0;\r\n strata.every((stratumId) => {\r\n if (isStratumAvailable(s, useOnlines, stratumId)) {\r\n const stratum = getQuota(s, stratumId);\r\n missingCompletes = stratum.objective <= 0 ? 0 : stratum.objective - stratum.online;\r\n\r\n if (useOnlines && stratum.objective > 0) missingCompletes -= stratum.online;\r\n\r\n if (missingCompletes > lastMissingCompletes) {\r\n lastMissingCompletes = missingCompletes;\r\n result = stratum.id;\r\n }\r\n }\r\n return true;\r\n });\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * Returns 1 if any of the specified strata are not closed or completed.\r\n * If UseOnlines = 1, online respondents count as completes.\r\n */\r\nexport function qtisavail(s: ParserState, useOnlines: number, ...strata: number[]) {\r\n const online = as.bool(s, useOnlines);\r\n const hasAvailableStratum = strata.some((stratum) => {\r\n return isStratumAvailable(s, online, stratum);\r\n });\r\n return hasAvailableStratum ? 1 : 0;\r\n}\r\n\r\n/**\r\n * Returns 1 if all the specified strata are not closed or completed.\r\n * If UseOnlines = 1, online respondents count as completes.\r\n */\r\nexport function qtareavail(s: ParserState, useOnlines: number, ...strata: number[]) {\r\n const online = as.bool(s, useOnlines);\r\n const allStrataAvailable =\r\n strata.length > 0 &&\r\n strata.every((stratum) => {\r\n return isStratumAvailable(s, online, stratum);\r\n });\r\n return allStrataAvailable ? 1 : 0;\r\n}\r\n\r\n/**\r\n * Returns the stratum ID in the specified list that is opened and missing the most completes.\r\n * If UseOnlines = 1, online respondents count as completes.\r\n */\r\nexport function getavailqt(s: ParserState, useOnlines: number, ...strata: number[]) {\r\n const online = as.bool(s, useOnlines);\r\n return getAvailableStratum(s, online, strata);\r\n}\r\n\r\n/**\r\n * Returns the stratum ID randomly selected among the list of specified strata opened but not completed.\r\n * If UseOnlines = 1, online respondents count as completes.\r\n */\r\nexport function selrandqt(s: ParserState, useOnlines: number, ...strata: number[]) {\r\n const online = as.bool(s, useOnlines);\r\n const availStrata = strata.filter((stratum) => isStratumAvailable(s, online, stratum));\r\n\r\n if (availStrata.length > 0) {\r\n return availStrata[Math.floor(Math.random() * availStrata.length)];\r\n }\r\n return 0;\r\n}\r\n\r\nfunction getRespondentStrata(s: ParserState, strata: number[]) {\r\n return strata.filter((stratumId) => {\r\n const stratum = getQuota(s, stratumId);\r\n if (stratum) {\r\n const result = parse(stratum.condition, s);\r\n return new EvaluationResult(result).asBoolean();\r\n }\r\n\r\n return false;\r\n });\r\n}\r\n\r\n/**\r\n * Returns 1 if any of the specified strata are not closed or completed.\r\n * If UseOnlines = 1, online respondents count as completes.\r\n */\r\nexport function qtisavailresp(s: ParserState, useOnlines: number, ...strata: number[]) {\r\n const respondentStrata = getRespondentStrata(s, strata);\r\n return qtisavail(s, useOnlines, ...respondentStrata);\r\n}\r\n\r\n/**\r\n * Returns 1 if all the specified strata are not closed or completed.\r\n */\r\nexport function qtareavailresp(s: ParserState, useOnlines: number, ...strata: number[]) {\r\n const respondentStrata = getRespondentStrata(s, strata);\r\n return qtareavail(s, useOnlines, ...respondentStrata);\r\n}\r\n\r\n/**\r\n * Returns the ID of the first stratum to which the respondent belongs that is opened and missing the most completes.\r\n */\r\nexport function getavailqtresp(s: ParserState, useOnlines: number, ...strata: number[]) {\r\n const respondentStrata = getRespondentStrata(s, strata);\r\n return getavailqt(s, useOnlines, ...respondentStrata);\r\n}\r\n\r\n/**\r\n * Returns the ID of a stratum randomly selected among the list of strata to which the respondent belongs that are opened but not completed.\r\n */\r\nexport function selrandqtresp(s: ParserState, useOnlines: number, ...strata: number[]) {\r\n const respondentStrata = getRespondentStrata(s, strata);\r\n return selrandqt(s, useOnlines, ...respondentStrata);\r\n}\r\n\r\n/**\r\n * Computes a value from a specific loop.\r\n */\r\nexport function rxy(s: ParserState, loop: any, value: any) {\r\n loop = as.val(s, loop);\r\n s = { ...s, matrix: loop };\r\n return as.val(s, value);\r\n}\r\n\r\n/**\r\n * Number of loops with data in at least one variable.\r\n */\r\nexport function nbl(s: ParserState, variable: any) {\r\n variable = as.val(s, variable);\r\n return getMentionsCount(s.interview.variables, variable.name);\r\n}\r\n\r\n/**\r\n * Get a value over the loops.\r\n */\r\nexport function loop(s: ParserState, val: any) {\r\n // Store variable names.\r\n const variables: string[] = [];\r\n as.val(\r\n {\r\n ...s,\r\n didParseVariable: (v) => {\r\n // Hook didParseVariable to get the list of variables.\r\n if (s.didParseVariable) s.didParseVariable(v);\r\n variables.push(v);\r\n },\r\n },\r\n val,\r\n );\r\n // If no variables were found in the expression, return.\r\n if (!variables.length) return val;\r\n // Get the max loop for the variables.\r\n const maxLoop = getMentionsCount(s.interview.variables, variables[0]);\r\n // Return the results for all loops.\r\n return range(1, maxLoop + 1).map((l) => as.val({ ...s, matrix: l }, val));\r\n}\r\n\r\n/**\r\n * Assigns mentions of source to first mention of destination in corresponding row.\r\n */\r\nexport function fsr(s: ParserState, src: any, dst: any) {\r\n const srcVar = as.val(s, src);\r\n const dstVar = as.val(s, dst);\r\n const srcMentions = getMentions(s.interview.variables, srcVar.name, 1);\r\n const maxLoopSize = getMaxLoopSize(dstVar.block);\r\n for (let i = 0; i < maxLoopSize; i++) {\r\n const currentLoop = i + 1;\r\n const srcMention = srcMentions.find(({ value }) => parseInt(value) === currentLoop);\r\n s.dispatch(\r\n setVariableMentions(\r\n dstVar.name,\r\n (mentions) =>\r\n srcMention\r\n ? mentions.set(srcMention.value, srcMention.openEnd)\r\n : mentions.clear(),\r\n currentLoop,\r\n ),\r\n );\r\n }\r\n return 1;\r\n}\r\n\r\n/**\r\n * Selects a specified loop in a block.\r\n */\r\nexport function rnb(s: ParserState, loop: any, ...vn: any[]) {\r\n loop = as.val(s, loop);\r\n if (!loop) return null;\r\n loop = as.number(s, loop);\r\n forEach(vn, (v) => {\r\n const { name } = v.block;\r\n s.dispatch(setLoopRow(name, loop));\r\n });\r\n return loop;\r\n}\r\n\r\n/**\r\n * Copy a variable label to all listed variables and returns its value.\r\n */\r\nexport function mst(s: ParserState, v1: any, ...vn: any[]) {\r\n v1 = as.val(s, v1);\r\n if (!v1) return null;\r\n const values = typeof v1 === \"string\" ? [v1] : v1.labels();\r\n setVariablesValues(s, values, vn);\r\n return as.number(s, as.number(s, v1));\r\n}\r\n\r\n/**\r\n * Copy a variable value to all listed variables and returns its value.\r\n */\r\nexport function mov(s: ParserState, v1: any, ...vn: any[]) {\r\n v1 = as.string(s, v1);\r\n setVariablesValues(s, v1, vn);\r\n return v1;\r\n}\r\n\r\n/**\r\n * Return the number with the lowest value.\r\n */\r\nexport function min(s: ParserState, ...vn: any[]) {\r\n const f = (v: any) =>\r\n Math.min(...v.map(getValidNumber).map((x) => (isNaN(x) ? INVALID : x || 0)));\r\n return vec(s, vn, f);\r\n}\r\n\r\n/**\r\n * Maximum of arguments.\r\n */\r\nexport function max(s: ParserState, ...vn: any[]) {\r\n const f = (v: any) =>\r\n Math.max(...v.map(getValidNumber).map((x) => (isNaN(x) ? INVALID : x || 0)));\r\n return vec(s, vn, f);\r\n}\r\n\r\n/**\r\n * Sum of arguments.\r\n */\r\nexport function sum(s: ParserState, vn: any[]) {\r\n return validateOutput(vec(s, vn, (v) => v.map(getValidNumber).reduce((a, b) => a + b)));\r\n}\r\n\r\n/**\r\n * Sum with replacement of missing values. SMR(R,VAL1, VAL2, VAL3..) Sums VAL1 – VALn replacing missing values with R.\r\n */\r\nexport function smr(s: ParserState, v1: any, vn: any[]) {\r\n v1 = as.val(s, v1);\r\n v1 = as.number(s, v1);\r\n if (v1 === \"\" || v1 === null) return INVALID;\r\n const f = (v: number[]) => v.map((x) => (isInvalid(x) ? v1 : x)).reduce((a, b) => a + b);\r\n return validateOutput(vec(s, vn, f));\r\n}\r\n\r\n/**\r\n * Sum of square of arguments.\r\n */\r\nexport function sm2(s: ParserState, vn: any[]) {\r\n const f = (v: number[]) =>\r\n v\r\n .map(getValidNumber)\r\n .map((x) => x * x)\r\n .reduce((a, b) => a + b);\r\n return validateOutput(vec(s, vn, f));\r\n}\r\n\r\n/**\r\n * Returns the argument of rank P0. For example: PRJ(Q1,A,B,C) returns B (if value of Q1 is 2).\r\n */\r\nexport function prj(s: ParserState, vn: any[]) {\r\n vn = as.val(s, vn);\r\n if (vn.length < 2) return NaN;\r\n const v = vn.map((v) => as.number(s, v));\r\n if (v[0] <= 0) return INVALID;\r\n if (v.length > v[0]) {\r\n const value = getValidNumber(v[v[0]]);\r\n if (!isInvalid(value)) return value;\r\n }\r\n return INVALID;\r\n}\r\n\r\n/**\r\n * Returns the first i such that VALi equals A; returns 0 if the value A is not found in the list of VALi.\r\n */\r\nexport function ind(s: ParserState, vn: any[]) {\r\n const f = (v: any) => {\r\n const values = v.map((x: any) => (isNaN(x) ? null : x));\r\n return values.slice(1).indexOf(values[0]) + 1;\r\n };\r\n return vec(s, vn, f);\r\n}\r\n\r\n/**\r\n * A multiplication between numeric values.\r\n */\r\nexport function mul(s: ParserState, a: any, b: any) {\r\n const f = (v1: any, v2: any) => (v1 || 0) * (v2 || 0);\r\n return validateInput(s, f, a, b);\r\n}\r\n\r\n/**\r\n * An exponentiation is an exponentiation operation between numeric values.\r\n */\r\nexport function pow(s: ParserState, a: any, b: any) {\r\n const f = (v1: any, v2: any) => (v2 === NaN ? 1 : Math.pow(v1 || 0, v2 || 0));\r\n return validateInput(s, f, a, b);\r\n}\r\n\r\n/**\r\n * A division between numeric values.\r\n */\r\nexport function div(s: ParserState, a: any, b: any) {\r\n a = as.number(s, a);\r\n if (isEmptyOrNaN(a)) a = 0;\r\n b = as.number(s, b);\r\n if (isEmptyOrNaN(b) || b === 0) b = INVALID;\r\n\r\n if ([a, b].some((v) => v === INVALID || isNaN(v))) return INVALID;\r\n return validateOutput(a / b);\r\n}\r\n\r\n/**\r\n * An addition between numeric values.\r\n */\r\nexport function add(s: ParserState, a: any, b: any) {\r\n const f = (v1: any, v2: any) => {\r\n if (v1 === null) v1 = 0;\r\n if (v2 === null) v2 = 0;\r\n if ([v1, v2].some((v) => [undefined, NaN].includes(v))) return NaN;\r\n return v1 + v2;\r\n };\r\n return validateInput(s, f, a, b);\r\n}\r\n\r\n/**\r\n * A subtraction between numeric values.\r\n */\r\nexport function sub(s: ParserState, a: any, b: any) {\r\n const f = (v1: any, v2: any) => {\r\n if (v1 === null) v1 = 0;\r\n if (v2 === null) v2 = 0;\r\n if ([v1, v2].some((v) => [undefined, NaN].includes(v))) return NaN;\r\n return v1 - v2;\r\n };\r\n return validateInput(s, f, a, b);\r\n}\r\n","import { getKeywords } from \"./consts\";\r\n\r\nconst moo = require(\"moo\");\r\n// Keywords could be ambiguously parsed as part of an identifier so we define them here.\r\nconst keywords = getKeywords();\r\n// The lexer contains all our rules.\r\nexport const lexer = moo.compile([\r\n // Symbols\r\n { name: \"ws\", match: /[ \\t]+/ },\r\n { name: \"@\", match: \"@\" },\r\n { name: \"#\", match: \"#\" },\r\n // Grouping\r\n { name: \"(\", match: \"(\" },\r\n { name: \")\", match: \")\" },\r\n { name: \"[\", match: \"[\" },\r\n { name: \"]\", match: \"]\" },\r\n { name: \",\", match: \",\" },\r\n // Boolean operators\r\n { name: \"&\", match: \"&\" },\r\n { name: \"|\", match: \"|\" },\r\n { name: \"^\", match: \"^\" },\r\n // Math operators\r\n { name: \"add\", match: \"+\" },\r\n { name: \"sub\", match: \"-\" },\r\n { name: \"div\", match: \"/\" },\r\n { name: \"mul\", match: \"*\" },\r\n // Comparison operators\r\n { name: \"not_eq\", match: /<>|!=/ },\r\n { name: \"lte\", match: \"<=\" },\r\n { name: \"gte\", match: \">=\" },\r\n { name: \"lt\", match: \"<\" },\r\n { name: \"gt\", match: \">\" },\r\n { name: \"eq_algebraic\", match: \"==\" },\r\n { name: \"eq\", match: \"=\" },\r\n // Empty & Contains\r\n { name: \"is_empty\", match: \"is empty\" },\r\n { name: \"is_not_empty\", match: \"is not empty\" },\r\n { name: \"does_not_contain\", match: \"does not contain\" },\r\n // Identifiers and keywords\r\n {\r\n name: \"identifier\",\r\n match: /\\$?[a-z_][@.a-z0-9_]*/,\r\n /**\r\n * We define the keywords here so that if they match the full identifier,\r\n * it will be parsed with the correct type instead of \"identifier\".\r\n *\r\n * Not using this parameter would break names containing keywords.\r\n *\r\n * For example the term COLOR should parse as (identifier: \"COLOR\")\r\n * instead of (identifier: \"COL\", or: \"OR\").\r\n */\r\n keywords,\r\n },\r\n ...Object.keys(keywords).map((name) => ({ name, match: keywords[name] })),\r\n // Numbers\r\n { name: \"float\", match: /[0-9]+\\.[0-9]+/ },\r\n { name: \"uint\", match: /[0-9]+(?!\\w)/ },\r\n { name: \"word\", match: /[0-9][a-z0-9_]+/ },\r\n // New line\r\n { name: \"nl\", match: /(?:\\r\\n?|\\n)+/, lineBreaks: true },\r\n]);\r\n","import { DateTime } from \"luxon\";\r\nimport { isEmpty } from \"../../utils/lodash\";\r\nimport { INVALID, TRUE } from \"./consts\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { ParserState } from \"./ParserState\";\r\nimport { getSettingString } from \"../../models/utilities/settingUtilities\";\r\nimport { cDateFormatToLuxon, EPOCH } from \"../../utils/time\";\r\nimport { getVariableRow } from \"../../redux/reducers/interview/navigationUtilities\";\r\nimport { QuestionType } from \"../../models/enums/QuestionType\";\r\nimport { translate } from \"../../models/utilities/translationUtilities\";\r\nimport {\r\n getQuestionWithVariable,\r\n getVariableRange,\r\n} from \"../../models/utilities/questionnaireUtilities\";\r\nimport { round, getNumeral } from \"../../utils/Number\";\r\nimport { getChoice } from \"../../models/utilities/variableUtilities\";\r\nimport { getMentions } from \"../../redux/reducers/interview/variablesUtilities\";\r\nimport { ChoiceModel } from \"../../models/ChoiceModel\";\r\nimport { VariableType } from \"../../models/enums/VariableType\";\r\n\r\n/**\r\n * Returns the value of an input evaluating it if it is a function.\r\n * @param state\r\n * @param input\r\n */\r\nexport function val(s: ParserState, input: any) {\r\n if (typeof input === \"function\") return input(s);\r\n return input;\r\n}\r\n\r\n/**\r\n * Returns the numeric value of input.\r\n * @param state\r\n * @param input\r\n */\r\nexport function number(s: ParserState, input: any) {\r\n input = val(s, input);\r\n if (input?.type === \"choice\") return input.index;\r\n if (input?.type === \"variable\") input = input.value();\r\n if (typeof input === \"string\") {\r\n if (isEmpty(input)) return null;\r\n if (/^-?\\d+\\.?\\d*$/g.test(input)) return parseFloat(input.replace(/[^0-9.-]/g, \"\"));\r\n if (/^[-0-9 .,]+$/g.test(input)) return getNumeral(input, s.interview.language).value();\r\n }\r\n if (typeof input === \"boolean\") return input ? 1 : 0;\r\n if (typeof input === \"number\" && !isNaN(input)) return round(input || 0);\r\n return input;\r\n}\r\n\r\n/**\r\n * Returns the string value of input.\r\n * @param state\r\n * @param input\r\n */\r\nexport function string(s: ParserState, input: any) {\r\n input = val(s, input);\r\n if (!input) return \"\";\r\n if (input.type === \"choice\") return input.code;\r\n if (input.type === \"variable\") return input.value();\r\n if (typeof input === \"number\") return Number.isNaN(input) ? \"\" : String(input);\r\n return input;\r\n}\r\n\r\n/**\r\n * Returns a date value from epoch date or time.\r\n * @param s\r\n * @param input\r\n */\r\nexport function epoch(s: ParserState, input: any) {\r\n const value = Math.round(number(s, input));\r\n if (value >= 372300)\r\n // Year 3000 in JUL.\r\n return EPOCH.plus({ seconds: value });\r\n const date = EPOCH.plus({ days: value });\r\n return date;\r\n}\r\n\r\n/**\r\n * Returns the boolean value of input.\r\n * @param state\r\n * @param input\r\n */\r\nexport function bool(s: ParserState, input: any) {\r\n input = val(s, input);\r\n if (typeof input === \"string\") {\r\n if (/^-?[0-9]+(\\.[0-9]+)?$/.test(input)) return parseFloat(input) > 0;\r\n return input === TRUE;\r\n }\r\n if (typeof input === \"boolean\") return input;\r\n if (typeof input === \"number\") return input > 0;\r\n return false;\r\n}\r\n\r\n/**\r\n * A variable selector takes an operator (either \"and\" or \"or\") and a list of variables and exposes equals().\r\n * @param state\r\n * @param operator\r\n * @param variable\r\n */\r\nexport function variableSelect(s: ParserState, operator: string, variables: any) {\r\n // Evaluate all variables.\r\n variables = val(s, variables);\r\n /**\r\n * Returns true if one or all of the variable contains an input.\r\n */\r\n function equals(input: any) {\r\n // Select the right method depending on \"and\" or \"or\" operator\r\n return operator === \"and\"\r\n ? variables.every((v: any) => v.equals(input))\r\n : variables.some((v: any) => v.equals(input));\r\n }\r\n return {\r\n type: \"variable-select\",\r\n variables,\r\n equals,\r\n };\r\n}\r\n\r\n/**\r\n * A variable list can have variables with exploded variable ranges and can skip variables.\r\n * @param s\r\n * @param skip\r\n * @param variables\r\n */\r\nexport function variableList(s: ParserState, skip: number, variables: any[]) {\r\n // Explode all variable ranges.\r\n variables = variables.reduce((a: any, b: any) => {\r\n b = val(s, b);\r\n if (b.type === \"variable-range\") b = b.explode();\r\n return a.concat(b);\r\n }, []);\r\n // Filter skipped variables.\r\n if (skip > 0) return variables.filter((v, i) => i % skip === 0);\r\n return variables;\r\n}\r\n\r\n/**\r\n * A variable has a name and exposes value() and equals().\r\n * @param state\r\n * @param variableName\r\n */\r\nexport function variable(s: ParserState, variableName: any) {\r\n // Try to find the question associated with this variable.\r\n const question = getQuestionWithVariable(s.interview.questionnaire, variableName);\r\n const block = question ? s.interview.questionnaire.blocks[question.blockIndex] : undefined;\r\n\r\n // Add the variable to the state.\r\n if (s.didParseVariable) s.didParseVariable(variableName);\r\n\r\n /**\r\n * Returns the value of the first mention of the variable.\r\n */\r\n function value() {\r\n const v = values()?.[0];\r\n return v === undefined && question ? null : v;\r\n }\r\n\r\n /**\r\n * Returns the label for the first mention of the variable.\r\n */\r\n function label() {\r\n return labels()[0];\r\n }\r\n\r\n /**\r\n * Returns the labels for every mention of the variable.\r\n */\r\n function labels() {\r\n if (!question) return [];\r\n const mentions = getMentions(s.interview.variables, variableName, getRow());\r\n if (!mentions) return [];\r\n return mentions.map((m) => {\r\n const answer = getChoice(question.variables[0], m.value);\r\n const { language } = s.interview.respondent;\r\n if (answer) return translate(answer, \"TEXT\", language);\r\n return mentions[0].value;\r\n });\r\n }\r\n\r\n /**\r\n * Returns true if the variable is a date.\r\n */\r\n function isDateType() {\r\n const v = question?.variables?.find(\r\n (x) => x.name.toUpperCase() === variableName.toUpperCase(),\r\n );\r\n return question?.type === QuestionType.DateTimeAnswer && v?.type !== VariableType.Computed;\r\n }\r\n\r\n /**\r\n * Returns the date format of the question.\r\n */\r\n function getDateFormat() {\r\n if (!question) return null;\r\n let dateFormat: string;\r\n if (getSettingString(question, \"Type\") === \"Date\")\r\n dateFormat = getSettingString(question, \"DateFormat\", \"yyyy-MM-dd\");\r\n else if (getSettingString(question, \"Type\") === \"DateTime\")\r\n dateFormat = `${getSettingString(\r\n question,\r\n \"DateFormat\",\r\n \"yyyy-MM-dd\",\r\n )} ${getSettingString(question, \"TimeFormat\", \"HH:mm\")}`;\r\n else if (getSettingString(question, \"Type\") === \"Time\")\r\n dateFormat = getSettingString(question, \"DateFormat\", \"HH:mm\");\r\n return dateFormat ? cDateFormatToLuxon(dateFormat) : null;\r\n }\r\n\r\n /**\r\n * Returns the values of all mentions of the variable.\r\n */\r\n function values() {\r\n if (variableName.startsWith(\"$\")) {\r\n return [s.interview.variables.system[variableName.toUpperCase()].code];\r\n }\r\n const mentions = getMentions(s.interview.variables, variableName, getRow());\r\n if (isDateType() && mentions.length > 0) {\r\n const date = DateTime.fromFormat(mentions[0].value, getDateFormat());\r\n const type = getSettingString(question, \"Type\");\r\n if (type === \"Date\") return [String(date.diff(EPOCH, \"days\"))];\r\n if (type === \"DateTime\" || type === \"Time\")\r\n return [String(date.diff(EPOCH, \"seconds\"))];\r\n }\r\n return mentions.map((m) => m.value);\r\n }\r\n\r\n function hasMentions(varName: any) {\r\n if (typeof varName === \"string\") {\r\n const v = getMentions(s.interview.variables, varName, getRow());\r\n return v && v.length > 0;\r\n }\r\n return false;\r\n }\r\n\r\n function getRow() {\r\n return (\r\n s.matrix ||\r\n getVariableRow(s.interview.navigation, s.interview.questionnaire, variableName)\r\n );\r\n }\r\n /**\r\n * Compares the value of the variable with choices, a string or a number.\r\n * @param value\r\n */\r\n function equals(input: any, useVarName: boolean = true) {\r\n input = val(s, input);\r\n // Find the question of the variable.\r\n const question = getQuestionWithVariable(s.interview.questionnaire, variableName);\r\n // If the input is a choice range, call equals for all choices.\r\n if (question && input.type === \"choice-range\") input = input.explode(question);\r\n // If the input is an array, return true if any of the inputs equals.\r\n if (typeof input === \"object\" && input.length)\r\n return input.some((v: any) => equals(v, true));\r\n // If input is a variable, use its mentions to compare\r\n if (useVarName && hasMentions(input)) {\r\n return variable(s, input)\r\n .values()\r\n .some((v) => equals(v.toLowerCase(), false));\r\n }\r\n // Find the first variable with a choicelist\r\n let choiceList: ChoiceModel[];\r\n if (question) {\r\n const firstVariableWithChoices =\r\n question.variables.find((v) => v.choiceList && v.choiceList.length) ||\r\n question.variables[0];\r\n if (firstVariableWithChoices) choiceList = firstVariableWithChoices.choiceList;\r\n }\r\n // Returns true if any mention equals the input value\r\n return values().some((mention: any) => {\r\n if (choiceList && input.type === \"choice\") {\r\n if (input.index === -1)\r\n // Choice #0 signifies “without choice response” with code WR.\r\n return mention === \"WR\";\r\n if (input.code !== undefined) return mention === input.code;\r\n return input.index < choiceList.length && mention === choiceList[input.index].value;\r\n }\r\n if (typeof input === \"number\" || /^-?[0-9]+(\\.[0-9]+)?$/.test(input)) {\r\n input = number(s, input);\r\n const v = number(s, mention);\r\n return v === input;\r\n }\r\n input = string(s, input);\r\n mention = mention.toLowerCase();\r\n return mention === input;\r\n });\r\n }\r\n /**\r\n * Compares every mention with a variable as a number returning 1 if the value is greater,\r\n * -1 if it is less than and 0 if it is equal.\r\n * @param value\r\n */\r\n function compare(input: any) {\r\n input = val(s, input);\r\n return values().map((v) => {\r\n const numeric = number(s, v) || 0;\r\n if (numeric === INVALID || input === INVALID) return INVALID;\r\n if (numeric > input) return 1;\r\n if (numeric < input) return -1;\r\n return 0;\r\n });\r\n }\r\n return {\r\n type: \"variable\",\r\n name: variableName,\r\n value,\r\n values,\r\n label,\r\n labels,\r\n equals,\r\n compare,\r\n question,\r\n block,\r\n };\r\n}\r\n\r\n/**\r\n * A variable range has a start, an end and exposes explode().\r\n */\r\nexport function variableRange(s: ParserState, start: any, end: any) {\r\n start = val(s, start);\r\n end = val(s, end);\r\n /**\r\n * Explodes the range into a list of variables.\r\n */\r\n function explode() {\r\n const range = getVariableRange(s.interview.questionnaire, start.name, end.name);\r\n return range.map((v) => variable(s, v.name));\r\n }\r\n return {\r\n type: \"variable-range\",\r\n start,\r\n end,\r\n explode,\r\n };\r\n}\r\n\r\n/**\r\n * A choice range has a start, an end and exposes explode().\r\n * @param state\r\n * @param start\r\n * @param end\r\n */\r\nexport function choiceRange(s: ParserState, start: any, end: any) {\r\n start = val(s, start);\r\n end = val(s, end);\r\n /**\r\n * Explodes the range into a list of choices from the question.\r\n * @param question\r\n */\r\n function explode(question: QuestionModel) {\r\n const range = [];\r\n if (\r\n (start.index != null && start.index === end.index) ||\r\n (start.code != null && start.code === end.code)\r\n )\r\n return [start];\r\n for (const choice of question.variables[0].choiceList) {\r\n const symbol = {\r\n type: \"choice\",\r\n index: choice.index,\r\n code: choice.value,\r\n };\r\n // Find the start of the range and push it.\r\n if (start.index === symbol.index || start.code === symbol.code) {\r\n range.push(symbol);\r\n continue;\r\n }\r\n // If the start of the range was not added, we need to keep searching.\r\n if (!range.length) continue;\r\n // Push all choices until the end of the range.\r\n range.push(symbol);\r\n // When we find the end, return the range.\r\n if (end.index === symbol.index || end.code === symbol.code) return range;\r\n }\r\n // If the end or the start was not found, return only the two known choices.\r\n return [start, end];\r\n }\r\n return {\r\n type: \"choice-range\",\r\n start,\r\n end,\r\n explode,\r\n };\r\n}\r\n\r\nexport function choice(s: ParserState, choice: any) {\r\n if (typeof choice === \"number\") return { type: \"choice\", index: choice - 1 };\r\n return { type: \"choice\", code: choice };\r\n}\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { StoreState } from \"../models/states/StoreState\";\r\nimport { changeLanguage } from \"../redux/actions\";\r\n\r\nexport function useLanguage(): [string, (code: string) => void] {\r\n const language = useSelector((state: StoreState) => state.interview.language);\r\n const dispatch = useDispatch();\r\n\r\n function setLanguage(code: string) {\r\n dispatch(changeLanguage(code));\r\n }\r\n\r\n return [language, setLanguage];\r\n}\r\n","import { includes, keys, pickBy, some } from \"lodash\";\r\nimport { cacheRecall } from \"../actions\";\r\nimport { ThunkActionType } from \"../actions/types\";\r\nimport { StoreState } from \"../../models/states/StoreState\";\r\nimport { Piping } from \"../../piping\";\r\nimport { RecallType } from \"../../piping/RecallType\";\r\nimport { cacheKey, getRecall } from \"../reducers/recallReducer\";\r\n\r\nexport const evaluateRecalls = (\r\n expression: string,\r\n mode: RecallType,\r\n dependencies: string[] = [],\r\n evaluationStack: string[] = [],\r\n): ThunkActionType<string> => {\r\n const selectRecall = (state: StoreState) => state.recall;\r\n const selectInterview = (state: StoreState) => state.interview;\r\n\r\n return (dispatch, getState) => {\r\n const state = selectRecall(getState());\r\n const key = cacheKey(expression, mode);\r\n // Recall is already in the cache.\r\n const recalledTextId = state.recalledTextIdByKey[key];\r\n if (recalledTextId !== undefined) {\r\n // Add variable dependencies for recall in the cache.\r\n const recalledTextVariables = keys(\r\n pickBy(state.recalledTextIdsByVariableName, (ids) => ids.includes(recalledTextId)),\r\n );\r\n\r\n recalledTextVariables\r\n .filter((v) => !dependencies.includes(v))\r\n .forEach((v) => dependencies.push(v));\r\n\r\n return getRecall(state, expression, mode);\r\n }\r\n // Add variable dependencies.\r\n const pipingVariables = Piping.identifyVariables(expression);\r\n pipingVariables\r\n .filter((v) => !dependencies.includes(v))\r\n .forEach((v) => dependencies.push(v));\r\n let result = expression;\r\n\r\n // Evaluate single recall until it finds matched string(without brackets)\r\n while (/^\\[([^\\]]+)\\]$/.test(result)) {\r\n if (evaluationStack.includes(result)) {\r\n dispatch(cacheRecall(expression, mode, result, dependencies));\r\n return result;\r\n }\r\n evaluationStack.push(result);\r\n\r\n // Evaluate the recall.\r\n result = Piping.evaluateRecalls(selectInterview(getState()), result, mode);\r\n\r\n // Return an error if the result is the same as the input.\r\n if (result === expression) {\r\n dispatch(cacheRecall(expression, mode, result, dependencies));\r\n return result;\r\n }\r\n }\r\n\r\n // Evaluate the expression until every single recall are evaluated\r\n const pipingRegex = /\\[[^[\\]]+\\]/g;\r\n while (some(result.match(pipingRegex), (m) => !includes(evaluationStack, m))) {\r\n // Replace each remaining recall recursively.\r\n result = result.replace(pipingRegex, (recall) => {\r\n const recallResult = dispatch(\r\n evaluateRecalls(recall, mode, dependencies, evaluationStack),\r\n );\r\n if (!includes(evaluationStack, recall)) evaluationStack.push(recall);\r\n return recallResult;\r\n });\r\n }\r\n dispatch(cacheRecall(expression, mode, result, dependencies));\r\n return result;\r\n };\r\n};\r\n","import { useDispatch, useSelector, shallowEqual } from \"react-redux\";\r\nimport { StoreState } from \"../models/states/StoreState\";\r\nimport { RecallType } from \"../piping/RecallType\";\r\nimport { getRecall } from \"../redux/reducers/recallReducer\";\r\nimport { evaluateRecalls } from \"../redux/thunks/recall\";\r\n\r\nexport default function useRecall<T extends string | ReadonlyArray<string>>(\r\n text: T,\r\n type: RecallType = RecallType.Text,\r\n): T {\r\n const dispatch = useDispatch();\r\n const recalled = useSelector((state: StoreState) => {\r\n if (text == null) return text;\r\n if (typeof text === \"string\") return getRecall(state.recall, text, type);\r\n return (text as ReadonlyArray<string>).map((t) => getRecall(state.recall, t, type));\r\n }, shallowEqual);\r\n\r\n let recalledText = recalled;\r\n if (typeof text === \"string\" && recalled === undefined && text && type) {\r\n recalledText = dispatch(evaluateRecalls(text, type));\r\n }\r\n if (typeof text === \"object\" && recalled === undefined && text && type) {\r\n recalledText = (text as ReadonlyArray<string>).map((t) =>\r\n dispatch(evaluateRecalls(t, type)),\r\n );\r\n }\r\n return recalledText;\r\n}\r\n","import * as React from \"react\";\r\n\r\nexport interface ReservedBounds {\r\n top?: number;\r\n right?: number;\r\n bottom?: number;\r\n left?: number;\r\n}\r\n\r\nexport interface Identifiable<T> {\r\n id: number;\r\n value: T;\r\n}\r\n\r\nexport interface ReservedBoundsContextModel {\r\n reserveBounds(bounds: ReservedBounds): number;\r\n releaseBounds(id: number): void;\r\n}\r\n\r\nconst ReservedBoundsContext = React.createContext<ReservedBoundsContextModel>(undefined);\r\n\r\nexport function ReservedBoundsContextProvider({ children }) {\r\n const idRef = React.useRef(0);\r\n const newId = () => idRef.current++;\r\n\r\n const [reservedBounds, setReservedBounds] = React.useState<Identifiable<ReservedBounds>[]>([]);\r\n\r\n const maxReservedBounds = React.useMemo<ReservedBounds>(\r\n () =>\r\n reservedBounds\r\n .map(({ value }) => value)\r\n .reduce(\r\n (a, b) => ({\r\n top: Math.max(a.top || 0, b.top || 0),\r\n right: Math.max(a.right || 0, b.right || 0),\r\n bottom: Math.max(a.bottom || 0, b.bottom || 0),\r\n left: Math.max(a.left || 0, b.left || 0),\r\n }),\r\n { top: 0, right: 0, bottom: 0, left: 0 },\r\n ),\r\n [reservedBounds],\r\n );\r\n\r\n const contextValue = React.useRef({\r\n reserveBounds: (bounds: ReservedBounds) => {\r\n const id = newId();\r\n setReservedBounds((state) => [...state, { id, value: bounds }]);\r\n return id;\r\n },\r\n releaseBounds: (id: number) => {\r\n setReservedBounds((state) => [...state.filter((b) => b.id !== id)]);\r\n },\r\n });\r\n\r\n return (\r\n <ReservedBoundsContext.Provider value={contextValue.current}>\r\n {children(maxReservedBounds)}\r\n </ReservedBoundsContext.Provider>\r\n );\r\n}\r\n\r\nexport default function useReservedBounds(bounds: ReservedBounds, deps: any[]) {\r\n const { reserveBounds, releaseBounds } = React.useContext(ReservedBoundsContext);\r\n React.useEffect(() => {\r\n const id = reserveBounds(bounds);\r\n return () => {\r\n releaseBounds(id);\r\n };\r\n }, deps);\r\n}\r\n","import React from \"react\";\r\nimport { Translatable } from \"../models/Translatable\";\r\nimport { translate } from \"../models/utilities/translationUtilities\";\r\nimport { useLanguage } from \"./useLanguage\";\r\nimport useRecall from \"./useRecall\";\r\n\r\nexport default function useTranslatable(translatable: Translatable, key: string): string {\r\n const [language] = useLanguage();\r\n const translated = React.useMemo(() => translate(translatable, key, language), [\r\n key,\r\n translatable,\r\n language,\r\n ]);\r\n return useRecall(translated);\r\n}\r\n","export enum BorderStyle {\r\n All = \"all\",\r\n None = \"none\",\r\n Horizontal = \"center-h\",\r\n Vertical = \"center-v\",\r\n Outside = \"outer\",\r\n}\r\n\r\nexport enum BorderThickness {\r\n // if you change anything here then make sure to add the same in the db changes\r\n // for example light-solid is used in the db\r\n LightSolid = \"light-solid\",\r\n BoldSolid = \"bold-solid\",\r\n}\r\n\r\nexport enum TabBackground {\r\n // if you change anything here then make sure to add the same in the db changes\r\n // for example duoChrome is used in the db\r\n DuoChrome = \"duoChrome\",\r\n MonoChrome = \"monoChrome\",\r\n}\r\n\r\nexport enum DefaultColorsKeys {\r\n PrimaryColor = \"PrimaryColor\",\r\n SecondaryColor = \"SecondaryColor\",\r\n ErrorColor = \"ErrorColor\",\r\n NeutralDarkColor = \"NeutralDarkColor\",\r\n NeutralLightColor = \"NeutralLightColor\",\r\n BlackColor = \"BlackColor\",\r\n WhiteColor = \"WhiteColor\",\r\n NoColor = \"NoColor\",\r\n}\r\n\r\nexport interface DynamicCssModel {\r\n HasGridChanges: boolean;\r\n\r\n LightSolidBorder: BorderThickness;\r\n BoldSolidBorder: BorderThickness;\r\n\r\n TableRowDefaultTabBackground: TabBackground;\r\n TableRowActiveTab: \"tab-default\";\r\n TableRowDefaultTabFillPrimaryColor: DefaultColorsKeys;\r\n TableRowDefaultTabFillPrimaryColorPercent: string;\r\n TableRowDefaultTabFillSecondaryColor: DefaultColorsKeys;\r\n TableRowDefaultTabFillSecondaryColorPercent: string;\r\n TableRowBorderStyle: BorderStyle;\r\n TableRowBorderThickness: BorderThickness;\r\n TableRowBorderColor: DefaultColorsKeys;\r\n TableRowBorderColorPercent: string;\r\n\r\n TableRowHoverTabColor: DefaultColorsKeys;\r\n TableRowHoverTabColorPercent: string;\r\n\r\n TableRowSelectedTabColor: DefaultColorsKeys;\r\n TableRowSelectedTabColorPercent: string;\r\n\r\n TableHeaderBorderStyle: BorderStyle;\r\n TableHeaderBorderThickness: BorderThickness;\r\n TableHeaderBorderColor: DefaultColorsKeys;\r\n TableHeaderBorderColorPercent: string;\r\n TableHeaderFillColor: string;\r\n TableHeaderFillColorPercent: string;\r\n}\r\n","export class SystemVariableModel {\r\n text: string;\r\n code: string;\r\n\r\n constructor(text: string, code?: string) {\r\n this.text = text;\r\n this.code = code !== undefined ? code : text;\r\n }\r\n}\r\n","import { remove } from \"../../utils/lodash\";\r\n\r\n/**\r\n * Builds a new mention set from existing mentions.\r\n */\r\nexport type MentionBuilderDelegate = (mentions: MentionBuilder) => MentionBuilder;\r\n\r\nexport interface SetMention {\r\n value: string;\r\n openEnd?: string;\r\n customChoiceIndex?: string;\r\n}\r\n\r\nexport class MentionBuilder {\r\n private _result: SetMention[] = [];\r\n\r\n constructor(mentions: SetMention[] = []) {\r\n if (mentions !== undefined) this._result = [...mentions];\r\n }\r\n\r\n /**\r\n * Returns an array of mentions to set.\r\n */\r\n build(): SetMention[] {\r\n return this._result.filter((m) => m !== undefined);\r\n }\r\n\r\n /**\r\n * Set a single mention, clearing all other mentions for the variable.\r\n */\r\n set(value: string, openEnd?: string): MentionBuilder {\r\n return this.clear().add(value, openEnd);\r\n }\r\n\r\n /**\r\n * Adding values from custom questions open-ends to the existing mentions\r\n **/\r\n addOpenEndValueByCustomChoiceIndex(idx: string, openEnd?: string): MentionBuilder {\r\n const itemIndex = this._result.findIndex(\r\n ({ customChoiceIndex, value }) => customChoiceIndex === idx || value === idx,\r\n );\r\n const item = this._result[itemIndex];\r\n if (item) item.openEnd = openEnd;\r\n this._result = [\r\n ...this._result.slice(0, itemIndex),\r\n item,\r\n ...this._result.slice(itemIndex + 1),\r\n ];\r\n return this;\r\n }\r\n\r\n /**\r\n * Adding values from text highlight questions open-ends to the existing mentions\r\n **/\r\n addOpenEndValueByChoiceIndex(idx: string, openEnd?: string): MentionBuilder {\r\n const itemIndex = this._result.findIndex(({ value }) => value === idx);\r\n const item = this._result[itemIndex];\r\n item.openEnd = openEnd;\r\n this._result = [\r\n ...this._result.slice(0, itemIndex),\r\n item,\r\n ...this._result.slice(itemIndex + 1),\r\n ];\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets a mention at the specific index.\r\n */\r\n replace(index: number, value: string, openEnd?: string): MentionBuilder {\r\n return this.splice(index, 1).insert(index, value, openEnd);\r\n }\r\n\r\n /**\r\n * Removes mentions for which predicate returns truthy.\r\n */\r\n remove(predicate: (value: string, index: number, openEnd?: string) => boolean): MentionBuilder {\r\n this._result = this._result.filter((v, i) => !predicate(v.value, i, v.openEnd));\r\n return this;\r\n }\r\n\r\n /**\r\n * Removes given value from mentions.\r\n */\r\n pull(value: string): MentionBuilder {\r\n this._result = this._result.filter((v) => v.value !== value);\r\n return this;\r\n }\r\n\r\n /**\r\n * Transforms mention values using an iterator.\r\n */\r\n mapValues(\r\n iterator: (value: string, index: number, openEnd?: string) => string,\r\n ): MentionBuilder {\r\n this._result = this._result.map((v, i) => ({\r\n ...v,\r\n value: iterator(v.value, i, v.openEnd),\r\n }));\r\n return this;\r\n }\r\n\r\n /**\r\n * Transforms mention open-ends using an iterator.\r\n */\r\n mapOpenEnds(\r\n iterator: (value: string, index: number, openEnd?: string) => string,\r\n ): MentionBuilder {\r\n this._result = this._result.map((v, i) => ({\r\n ...v,\r\n openEnd: iterator(v.value, i, v.openEnd),\r\n }));\r\n return this;\r\n }\r\n\r\n /**\r\n * Insert a mention at the specified index.\r\n */\r\n insert(index: number, value: string, openEnd?: string): MentionBuilder {\r\n this._result.splice(index, 0, {\r\n value: value,\r\n openEnd: openEnd,\r\n });\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds multiple mentions.\r\n */\r\n add(mentions: SetMention[]): MentionBuilder;\r\n\r\n /**\r\n * Add a mention to the variable.\r\n */\r\n add(value: string, openEnd?: string, customChoiceIndex?: string): MentionBuilder;\r\n add(value?: string | SetMention[], openEnd?: string, customChoiceIndex?: string) {\r\n if (value == null || typeof value === \"string\")\r\n this._result.push({\r\n value: value as string,\r\n openEnd: openEnd,\r\n customChoiceIndex: customChoiceIndex,\r\n });\r\n else value.forEach((m) => this.add(m.value, m.openEnd, customChoiceIndex));\r\n return this;\r\n }\r\n\r\n /**\r\n * Toggles a mention of the variable, adding it if the value does not exist or removing it if the value exists.\r\n */\r\n toggle(value: string, openEnd?: string): MentionBuilder {\r\n return this._result.some((m) => m.value === value)\r\n ? this.removeValue(value)\r\n : this.add(value, openEnd);\r\n }\r\n\r\n /**\r\n * Remove all mentions with the specified value.\r\n */\r\n removeValue(value: string): MentionBuilder {\r\n remove(this._result, (m) => m.value === value);\r\n return this;\r\n }\r\n\r\n /**\r\n * Clear all mentions of the variable.\r\n */\r\n clear(): MentionBuilder {\r\n this._result = [];\r\n return this;\r\n }\r\n\r\n /**\r\n * Removes mentions starting at the specified index.\r\n */\r\n splice(start: number, count?: number): MentionBuilder {\r\n if (count === undefined) this._result.splice(start);\r\n else this._result.splice(start, count);\r\n return this;\r\n }\r\n}\r\n","export enum AxisType {\r\n Row,\r\n Column,\r\n}\r\n","export enum ChoiceListDisplayType {\r\n Vertical,\r\n Horizontal,\r\n VerticalColumns,\r\n HorizontalColumns,\r\n}\r\n","export enum ColumnType {\r\n Unknown = 0,\r\n Text = 1,\r\n CheckBox = 2,\r\n DropDownList = 3,\r\n RadioButton = 4,\r\n ImageSelector = 5,\r\n Slider = 6,\r\n NumericAnswer = 7,\r\n StarRating = 8,\r\n}\r\n","export enum DispositionCode {\r\n Empty,\r\n Completed,\r\n Dropped,\r\n ScreenedOut,\r\n Interrupted,\r\n OutOfQuota,\r\n Reset,\r\n}\r\n","export enum LogicType {\r\n Simple,\r\n Advanced,\r\n}\r\n","export enum PropertyType {\r\n Status,\r\n ExitUrl,\r\n Relative,\r\n Question,\r\n AutoClean,\r\n CalculatedVariableName,\r\n Variable,\r\n ValueType,\r\n Value,\r\n Block,\r\n MatrixIndex,\r\n Mode,\r\n // Selection\r\n InclusionFormula,\r\n ScoreFormula,\r\n Priority,\r\n AffectedRow,\r\n Mention,\r\n SelectionCount,\r\n // Email\r\n From,\r\n To,\r\n ReplyTo,\r\n Subject,\r\n Body,\r\n // Slider\r\n CursorColor,\r\n CursorURL,\r\n SliderBarColor,\r\n SliderBarTrailingColor,\r\n SliderBarURL,\r\n LeftAnchorURL,\r\n RightAnchorURL,\r\n}\r\n","export enum QuestionActionType {\r\n BranchTo = 0,\r\n ComputeVariable = 1,\r\n ExitSurvey = 2,\r\n SendEmail = 3,\r\n SetLoopRow = 4,\r\n SetVariableValue = 5,\r\n Selection = 6,\r\n SetPanelistData = 7,\r\n ExecuteSQL = 8,\r\n PanelistReward = 9,\r\n ResumeLastSession = 10,\r\n CreatePanelist = 11,\r\n MobileAudioRecording = 12,\r\n}\r\n","export enum QuestionType {\r\n None = 0,\r\n RadioButton = 1,\r\n DropDownList = 2,\r\n CheckBox = 3,\r\n Slider = 4,\r\n ImageSelector = 5,\r\n TextAnswer = 6,\r\n NumericAnswer = 7,\r\n EmailAddressAnswer = 8,\r\n DateTimeAnswer = 9,\r\n OpenEndAnswer = 10,\r\n CardSort = 11,\r\n DragDropRanking = 12,\r\n CustomQuestion = 13,\r\n HybridGrid = 14,\r\n RunningTotal = 15,\r\n ChoiceGrid = 16,\r\n ImageChoiceGrid = 17,\r\n RespondentLanguage = 18,\r\n RespondentTimeZone = 19,\r\n RespondentEmail = 20,\r\n Description = 21,\r\n ImageAreaEvaluator = 22,\r\n DrillDown = 23,\r\n RespondentMetaData = 24,\r\n ImageAreaSelector = 25,\r\n StarRatingGrid = 26,\r\n AutoComplete = 27,\r\n LookupTable = 28,\r\n FileUpload = 29,\r\n NetPromoter = 30,\r\n RespondentPhone = 31,\r\n Timer = 32,\r\n NumericRanking = 33,\r\n Signature = 34,\r\n TextHighlighter = 35,\r\n SecuredTemporaryVariable = 36,\r\n HeatMap = 37,\r\n Carrousel = 38,\r\n}\r\n\r\nexport function isGrid(type: QuestionType) {\r\n switch (type) {\r\n case QuestionType.HybridGrid:\r\n case QuestionType.RunningTotal:\r\n case QuestionType.ChoiceGrid:\r\n case QuestionType.ImageChoiceGrid:\r\n case QuestionType.StarRatingGrid:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\nexport function isChoiceList(type: QuestionType) {\r\n switch (type) {\r\n case QuestionType.RadioButton:\r\n case QuestionType.CheckBox:\r\n case QuestionType.ImageSelector:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\nexport function isImage(type: QuestionType) {\r\n switch (type) {\r\n case QuestionType.ImageAreaEvaluator:\r\n case QuestionType.ImageAreaSelector:\r\n case QuestionType.ImageChoiceGrid:\r\n case QuestionType.ImageSelector:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n","export enum QuotaStatus {\r\n Open,\r\n HalfOpen,\r\n Closed,\r\n}\r\n","export enum RandomizationPattern {\r\n None,\r\n Permutation,\r\n Rotation,\r\n ReverseOrder,\r\n Synchronized,\r\n SortByCode,\r\n SortByLabel,\r\n RandomReverse,\r\n}\r\n","export enum RowType {\r\n Unknown,\r\n Title,\r\n Variable,\r\n Text,\r\n}\r\n","export enum ShortcutExitToType {\r\n CallingQuestion = 0,\r\n NextQuestion = 1,\r\n}\r\n","export enum SoftPromptChoiceType {\r\n Invisible,\r\n Visible,\r\n VisibleDefault,\r\n}\r\n","export enum SurveyMode {\r\n Test = 0,\r\n Preview = 1,\r\n Normal = 2,\r\n Simulation = 3,\r\n}\r\n\r\nexport function convertToSurveyMode(mode: string): SurveyMode {\r\n switch (mode) {\r\n case \"test\":\r\n return SurveyMode.Test;\r\n case \"normal\":\r\n return SurveyMode.Normal;\r\n case \"simulation\":\r\n return SurveyMode.Simulation;\r\n default:\r\n return SurveyMode.Preview;\r\n }\r\n}\r\n","export enum SurveyQuestionnaireModality {\r\n Master = 0,\r\n Online = 1,\r\n Phone = 2,\r\n}\r\n","export enum TerminationAction {\r\n None,\r\n DisplayMessage,\r\n RedirectToUrl,\r\n}\r\n","export enum VariableType {\r\n Discrete = 0,\r\n Continuous = 1,\r\n Computed = 2,\r\n System = 3,\r\n}\r\n","import { mapKeys, fromPairs, toPairs, sortBy } from \"../../utils/lodash\";\r\nimport { ElementWithProperties } from \"../ElementWithProperties\";\r\nimport { ElementWithSettings } from \"../ElementWithSettings\";\r\nimport { Skippable } from \"../Skippable\";\r\nimport { createLogic } from \"./logicFactory\";\r\nimport { Translatable } from \"../Translatable\";\r\n\r\nexport function createElementWithProperties(el?: any): ElementWithProperties {\r\n if (el == null) return;\r\n const pairs = toPairs(el.properties);\r\n const props = sortBy(pairs, 0);\r\n return {\r\n name: el.name,\r\n properties: fromPairs(props),\r\n };\r\n}\r\n\r\nexport function createElementWithSettings(el?: any): ElementWithSettings {\r\n if (el == null) return;\r\n const pairs = toPairs(el.settings);\r\n const sets = sortBy(pairs, 0);\r\n return {\r\n name: el.name,\r\n settings: fromPairs(sets),\r\n };\r\n}\r\n\r\nexport function createSkippable(el?: any, displayLogic?: any): Skippable {\r\n if (el == null) return;\r\n return {\r\n skipLogic: createLogic(el.skipLogic),\r\n displayLogic: createLogic(displayLogic ?? el.displayLogic),\r\n };\r\n}\r\n\r\nexport function createTranslatable(el?: any): Translatable {\r\n if (el == null) return;\r\n return {\r\n translatedTexts: mapKeys(el.translatedTexts, (_v, k: string) => k.toLowerCase()),\r\n };\r\n}\r\n","import { LogicModel } from \"../LogicModel\";\r\nimport { isNullOrEmpty } from \"../../utils\";\r\nimport { LogicType } from \"../enums/LogicType\";\r\n\r\nexport function createLogic(el?: string): LogicModel {\r\n if (el == null || isNullOrEmpty(el)) return undefined;\r\n return {\r\n type: el.startsWith(\"logic:adv\") ? LogicType.Advanced : LogicType.Simple,\r\n expression: el.substr(el.indexOf(\";\") + 1),\r\n };\r\n}\r\n","export enum OperatorType {\r\n Contains,\r\n Equals,\r\n DifferentThan,\r\n LessThan,\r\n MoreThan,\r\n LessThanOrEqual,\r\n MoreThanOrEqual,\r\n DoesNotContain,\r\n Empty,\r\n NotEmpty,\r\n In,\r\n NotIn,\r\n}\r\n","import { map } from \"../../utils/lodash\";\r\nimport { OperatorType } from \"../enums/OperatorType\";\r\nimport { VariableModel } from \"../VariableModel\";\r\nimport { createLogic } from \"./logicFactory\";\r\nimport { getSettingString } from \"../utilities/settingUtilities\";\r\n\r\nexport function createLookupTableFilter(filter: any, variables: VariableModel[]) {\r\n if (filter == null || filter.conditions == null) {\r\n return undefined;\r\n }\r\n let expression: string = removeUnsupportedOperators(filter.syntax);\r\n for (let i = filter.conditions.length; i >= 1; i--) {\r\n const condition = parseCondition(filter.conditions[i - 1], variables);\r\n // If it has a custom condition grouping then use provided syntax.\r\n if (filter.syntax) {\r\n // Insert the condition in its correct index in the expression.\r\n expression = expression.replace(i.toString(), formatCondition(condition));\r\n } else {\r\n if (expression !== \"\") expression += ` ${filter.operator} `;\r\n expression += formatCondition(condition);\r\n }\r\n }\r\n return createLogic(`logic:basic;${expression}`);\r\n}\r\n\r\nfunction parseCondition(condition: any, variables: VariableModel[]) {\r\n // For IN and NOT IN operators\r\n let isList = false;\r\n switch (OperatorType[condition.operator as string]) {\r\n case OperatorType.Contains:\r\n condition.operator = \"LIKE\";\r\n condition.value = `%${condition.value}%`;\r\n break;\r\n case OperatorType.Equals:\r\n condition.operator = \"=\";\r\n break;\r\n case OperatorType.DifferentThan:\r\n condition.operator = \"!=\";\r\n break;\r\n case OperatorType.LessThan:\r\n condition.operator = \"<\";\r\n break;\r\n case OperatorType.MoreThan:\r\n condition.operator = \">\";\r\n break;\r\n case OperatorType.LessThanOrEqual:\r\n condition.operator = \"<=\";\r\n break;\r\n case OperatorType.MoreThanOrEqual:\r\n condition.operator = \">=\";\r\n break;\r\n case OperatorType.DoesNotContain:\r\n condition.operator = \"NOT LIKE\";\r\n condition.value = `%${condition.value}%`;\r\n break;\r\n case OperatorType.Empty:\r\n condition.operator = \"=\";\r\n condition.value = \"\";\r\n break;\r\n case OperatorType.NotEmpty:\r\n condition.operator = \"!=\";\r\n condition.value = \"\";\r\n break;\r\n case OperatorType.In:\r\n condition.value = formatValueList(condition.value);\r\n isList = true;\r\n break;\r\n case OperatorType.NotIn:\r\n condition.operator = \"NOT IN\";\r\n condition.value = formatValueList(condition.value);\r\n isList = true;\r\n break;\r\n }\r\n if (!isList && !condition.value.match(\"^[0-9]+$\")) {\r\n condition.value = `'${condition.value}'`;\r\n }\r\n condition.variableName = getColumnName(condition.variableName, variables);\r\n return condition;\r\n}\r\n\r\nfunction removeUnsupportedOperators(syntax: string) {\r\n if (syntax) return syntax.toUpperCase().replace(/[^(\\(|\\)|OR|AND|\\s|\\d)]/g, \"\");\r\n return \"\";\r\n}\r\n\r\nfunction formatCondition(condition: any) {\r\n return `${condition.variableName} ${condition.operator} ${condition.value}`;\r\n}\r\n\r\nfunction getColumnName(variableName: string, variables: VariableModel[]): string {\r\n const variable = variables.find((v) => v.name === variableName);\r\n if (variable) return getSettingString(variable, \"ColumnName\", variableName);\r\n return variableName;\r\n}\r\n\r\nfunction formatValueList(value: string) {\r\n return `(${map(value.split(\",\"), (v) => `'${v.trim()}'`).join(\",\")})`;\r\n}\r\n","import { map, filter, flatMap, uniq, pickBy, values } from \"../../utils/lodash\";\r\nimport {\r\n createElementWithSettings,\r\n createElementWithProperties,\r\n createSkippable,\r\n createTranslatable,\r\n} from \"./elementFactory\";\r\nimport { QuestionModel } from \"../QuestionModel\";\r\nimport { QuestionType } from \"../enums/QuestionType\";\r\nimport { ActionModel } from \"../ActionModel\";\r\nimport { QuestionActionType } from \"../enums/QuestionActionType\";\r\nimport { createLogic } from \"./logicFactory\";\r\nimport { ChoiceModel } from \"../ChoiceModel\";\r\nimport { getSettingBoolean, getSettingString } from \"../utilities/settingUtilities\";\r\nimport { PropertyType } from \"../enums/PropertyType\";\r\nimport { VariableModel } from \"../VariableModel\";\r\nimport { findVariables } from \"../../expressions/parser\";\r\nimport { SelectionModel } from \"../SelectionModel\";\r\nimport { AxisModel } from \"../AxisModel\";\r\nimport { createRandomization } from \"./randomizationFactory\";\r\nimport { ColumnType } from \"../enums/ColumnType\";\r\nimport { RowType } from \"../enums/RowType\";\r\nimport { createLookupTableFilter } from \"./lookupTableFilterFactory\";\r\nimport { ElementWithSettings } from \"../ElementWithSettings\";\r\nimport { VariableType } from \"../enums/VariableType\";\r\nimport { VariableDataType } from \"../enums/VariableDataType\";\r\n\r\nfunction questionId(question) {\r\n return `Q_${question.name.toUpperCase()}`;\r\n}\r\n\r\nfunction variableId(variable) {\r\n return `V_${variable.name}`;\r\n}\r\n\r\nfunction choiceId(variable, choice) {\r\n return choice.value\r\n ? `V_${variable.name}_C_${choice.value.replace(/\\s/g, \"_\").toUpperCase()}`\r\n : `V_${variable.name}_H_${choice.index}`;\r\n}\r\n\r\nfunction createVariable(\r\n index: number,\r\n v: any,\r\n choiceLists: { [key: number]: ChoiceModel[] },\r\n el?: any,\r\n): VariableModel {\r\n const choices = (choiceLists[v.choiceListId] || []).map((item) => ({\r\n ...item,\r\n elementId: choiceId(v, item),\r\n }));\r\n const rowOpenEndDisplayLogic = el?.rows?.find(\r\n (r: AxisModel) =>\r\n getSettingString(r, \"OpenEndVariable\") === v.name &&\r\n !getSettingBoolean(r, \"DisplayIfDisableInstead\"),\r\n )?.openEndDisplayIf;\r\n return {\r\n ...createElementWithSettings(v),\r\n ...createSkippable(v, rowOpenEndDisplayLogic),\r\n ...createTranslatable(v),\r\n index,\r\n id: v.id,\r\n elementId: variableId(v),\r\n choiceListRandomization: createRandomization(v.choiceListRandomization),\r\n choiceList: choices,\r\n maxMention: v.maxMention,\r\n type: v.type ?? VariableType.Discrete,\r\n dataType: v.dataType as VariableDataType,\r\n };\r\n}\r\n\r\nfunction createColumn(\r\n index: number,\r\n variables: VariableModel[],\r\n rows: AxisModel[],\r\n el?: any,\r\n): AxisModel {\r\n const a = map(rows, (r) => r.variables[index]);\r\n const b = filter(a, (v) => !!v);\r\n return {\r\n ...createElementWithSettings(el),\r\n ...createSkippable(el),\r\n ...createTranslatable(el),\r\n index,\r\n type: ColumnType[el.type as string],\r\n variables: uniq(b),\r\n };\r\n}\r\n\r\nfunction createRow(index: number, variables: VariableModel[], el?: any): AxisModel {\r\n return {\r\n ...createElementWithSettings(el),\r\n ...createSkippable(el),\r\n ...createTranslatable(el),\r\n index,\r\n type: RowType[el.type as string],\r\n openEndDisplayIf: createLogic(el.openEndDisplayIf),\r\n variables: map(el.variableIds, (e: number) => variables[e]),\r\n };\r\n}\r\n\r\nfunction createSelection(el?: any): SelectionModel {\r\n return {\r\n ...createElementWithProperties(el),\r\n value: el.value,\r\n condition: createLogic(el.condition),\r\n priority: el.priority,\r\n score: createLogic(el.score),\r\n };\r\n}\r\n\r\nfunction createAction(\r\n questionName: string,\r\n isPreload: boolean,\r\n index: number,\r\n el?: any,\r\n): ActionModel {\r\n return {\r\n ...createElementWithProperties(el),\r\n type: QuestionActionType[el.type as string] || QuestionActionType.BranchTo,\r\n questionName,\r\n isPreload,\r\n condition: createLogic(el.condition),\r\n selections: map(el.selections, createSelection),\r\n selectionVariables: map(el.selectionVariables, createElementWithProperties),\r\n };\r\n}\r\n\r\nfunction getSettingVariables(settings: any) {\r\n const a = pickBy(settings, (value, key) => key.endsWith(\"VariableName\"));\r\n return values(a);\r\n}\r\n\r\nfunction getActionVariables(actions: any[]) {\r\n return filter(\r\n actions,\r\n (a: any) => QuestionActionType[a.type as string] === QuestionActionType.ComputeVariable,\r\n ).map((a) => a.properties[PropertyType[PropertyType.CalculatedVariableName]]);\r\n}\r\n\r\nexport function getAllDisplayLogicVariables(variables: VariableModel[]) {\r\n return flatMap(variables, (variable) => [\r\n ...findVariables(variable.displayLogic),\r\n ...findVariables(variable.skipLogic),\r\n ...flatMap(variable.choiceList, (choice) => [\r\n ...findVariables(choice.displayLogic),\r\n ...findVariables(choice.skipLogic),\r\n ]),\r\n ]);\r\n}\r\n\r\nfunction getVariableNames(q: any): string[] {\r\n // Populate variable names.\r\n const a = [\r\n ...getActionVariables(q.preLoadActions),\r\n ...getSettingVariables(q.settings),\r\n ...map(q.variables, (v: any) => v.name),\r\n ...flatMap(q.rows, (r: any) => map(r.variables, (v: VariableModel) => v.name)),\r\n ...map(q.cards, (c: any) => c.name),\r\n ...map(q.dropdowns, (c: any) => c.name),\r\n ...map(q.areas, (c: any) => c.name),\r\n ...map(q.lookupColumns, (c: any) => c.name),\r\n ...flatMap(q.variables, (c: VariableModel) =>\r\n map(c.choiceList, (a: ChoiceModel) => getSettingString(a, \"OpenEndVariable\")),\r\n ),\r\n ...map(q.rows, (r: AxisModel) => getSettingString(r, \"OpenEndVariable\")),\r\n ...getActionVariables(q.postAnswerActions),\r\n ];\r\n const b = filter(a, (v) => !!v);\r\n return uniq(b);\r\n}\r\n\r\nfunction getVariableDependencies(question: QuestionModel): string[] {\r\n const { columns = [] } = question;\r\n const elements: ElementWithSettings[] = [question, ...columns, ...question.variables];\r\n const eliminateChoiceVariables = elements\r\n .map((element) => [\r\n ...getSettingString(element, \"EliminateChoicesIfVariablesAnswered\", \"\").split(\",\"),\r\n ...getSettingString(element, \"EliminateChoicesIfVariablesNotAnswered\", \"\").split(\",\"),\r\n ])\r\n .reduce((acc, value) => [...acc, ...value], []);\r\n\r\n // Populate variable dependencies.\r\n const a = [\r\n ...eliminateChoiceVariables,\r\n ...getSettingString(question, \"RowEliminationIfVariablesAnswered\", \"\").split(\",\"),\r\n ...getSettingString(question, \"RowEliminationIfVariablesNotAnswered\", \"\").split(\",\"),\r\n ...getSettingString(question, \"ColumnEliminationIfVariablesAnswered\", \"\").split(\",\"),\r\n ...getSettingString(question, \"ColumnEliminationIfVariablesNotAnswered\", \"\").split(\",\"),\r\n // Get all variables used in display logic.\r\n ...getAllDisplayLogicVariables(question.variables),\r\n ...flatMap(question.rows, (row) => [\r\n ...findVariables(row.displayLogic),\r\n ...findVariables(row.skipLogic),\r\n ...(row.openEndDisplayIf ? findVariables(row.openEndDisplayIf) : []),\r\n ]),\r\n ...flatMap(question.columns, (column) => [\r\n ...findVariables(column.displayLogic),\r\n ...findVariables(column.skipLogic),\r\n ...getAllDisplayLogicVariables(column.variables),\r\n ]),\r\n ...findVariables(question.displayLogic),\r\n ...findVariables(question.skipLogic),\r\n ];\r\n const b = filter(a, (v) => !!v);\r\n return uniq(b);\r\n}\r\n\r\nexport function createQuestion(\r\n index: number,\r\n blockIndex: number,\r\n choiceLists: ChoiceModel[][],\r\n el?: any,\r\n): QuestionModel {\r\n const elementName = el.name.toUpperCase();\r\n const variables = map(el.variables, (v: any, i: number) =>\r\n createVariable(i, v, choiceLists, el),\r\n );\r\n const rows = map(el.rows, (r: any, i: number) => createRow(i, variables, r));\r\n const question: QuestionModel = {\r\n ...createElementWithSettings(el),\r\n ...createSkippable(el),\r\n ...createTranslatable(el),\r\n index,\r\n id: el.id,\r\n elementId: questionId(el),\r\n name: elementName,\r\n type: QuestionType[el.type as string],\r\n blockIndex,\r\n isPageBreak: el.isPageBreak,\r\n preLoadActions: map(el.preLoadActions, (a, i: number) =>\r\n createAction(elementName, true, i, a),\r\n ),\r\n postAnswerActions: map(el.postAnswerActions, (a, i: number) =>\r\n createAction(elementName, false, i, a),\r\n ),\r\n variableRandomization: createRandomization(el.variableRandomization),\r\n choiceListRandomization: createRandomization(el.choiceListRandomization),\r\n rowRandomization: createRandomization(el.rowRandomization),\r\n columnRandomization: createRandomization(el.columnRandomization),\r\n rows,\r\n columns: map(el.columns, (c: any, i: number) => createColumn(i, variables, rows, c)),\r\n lookupFilter: createLookupTableFilter(el.lookupFilter, variables),\r\n variables,\r\n variableNames: [],\r\n variableDependencies: [],\r\n };\r\n question.variableNames = getVariableNames(question);\r\n question.variableDependencies = getVariableDependencies(question);\r\n return question;\r\n}\r\n","import { map } from \"../../utils/lodash\";\r\nimport { BlockModel } from \"../BlockModel\";\r\nimport { QuestionnaireModel } from \"../QuestionnaireModel\";\r\nimport { ShortcutModel } from \"../ShortcutModel\";\r\nimport { ThemeModel } from \"../ThemeModel\";\r\nimport { createElementWithSettings, createSkippable, createTranslatable } from \"./elementFactory\";\r\nimport { createQuestion } from \"./questionFactory\";\r\nimport { createLogic } from \"./logicFactory\";\r\nimport { ChoiceModel } from \"../ChoiceModel\";\r\nimport { createRandomization } from \"./randomizationFactory\";\r\nimport { ShortcutExitToType } from \"../enums/ShortcutExitToType\";\r\nimport { SurveyQuestionnaireModality } from \"../enums/SurveyQuestionnaireModality\";\r\n\r\nexport function createQuestionnaire(el?: any): QuestionnaireModel {\r\n if (el == null) return null;\r\n const choiceLists = map(el.choiceLists, (cl) =>\r\n (cl as any[]).map((c, i) => createChoice(i, c)),\r\n );\r\n return {\r\n ...createElementWithSettings(el),\r\n ...createTranslatable(el),\r\n _v: el._v,\r\n _d: el._d,\r\n id: el.id,\r\n name: el.name,\r\n // eslint-disable-next-line no-undef\r\n modality: el.modality || SurveyQuestionnaireModality.Master,\r\n version: el.version || 0,\r\n blocks: map(el.blocks, (b, i: number) => createBlock(i, choiceLists, b)),\r\n theme: createTheme({ ...el.theme, isDefault: true }),\r\n defaultLanguage: el.defaultLanguage,\r\n languages: el.languages,\r\n shortcuts: map(el.shortcuts, createShortcut),\r\n randomizations: map(el.randomizations, createRandomization),\r\n columns: el.columns,\r\n surveyProperties: el.surveyProperties,\r\n };\r\n}\r\n\r\nexport function blockIdByName(questionnaire: QuestionnaireModel) {\r\n const result: { [name: string]: number } = {};\r\n for (const block of questionnaire.blocks) result[block.name.toUpperCase()] = block.index;\r\n return result;\r\n}\r\n\r\nexport function questionIdByName(questionnaire: QuestionnaireModel) {\r\n const result: { [name: string]: number[] } = {};\r\n for (const block of questionnaire.blocks) {\r\n for (const question of block.questions) {\r\n result[question.name.toUpperCase()] = [question.blockIndex, question.index];\r\n }\r\n }\r\n return result;\r\n}\r\n\r\nexport function questionIdByVariable(questionnaire: QuestionnaireModel) {\r\n const result: { [name: string]: number[] } = {};\r\n for (const block of questionnaire.blocks) {\r\n for (const question of block.questions) {\r\n for (const variable of question.variableNames) {\r\n result[variable.toUpperCase()] = [question.blockIndex, question.index];\r\n }\r\n }\r\n }\r\n return result;\r\n}\r\n\r\nfunction createChoice(index: number, el?: any): ChoiceModel {\r\n if (el == null) return undefined;\r\n return {\r\n ...createElementWithSettings(el),\r\n ...createSkippable(el),\r\n ...createTranslatable(el),\r\n elementId: \"\",\r\n index,\r\n value: el.value,\r\n name: `CHOICE_${index}`,\r\n parentValue: el.parentValue,\r\n openEndDisplayLogic: createLogic(el.openEndDisplayLogic),\r\n position: el.position,\r\n };\r\n}\r\n\r\nfunction createShortcut(el?: any): ShortcutModel {\r\n if (el == null) return;\r\n return {\r\n ...createTranslatable(el),\r\n blockName: el.blockName,\r\n type: ShortcutExitToType[String(el.type)],\r\n };\r\n}\r\n\r\nexport function createTheme(el?: any): ThemeModel {\r\n if (el == null) return;\r\n return {\r\n ...createElementWithSettings(el),\r\n ...createTranslatable(el),\r\n id: el.id,\r\n isDefault: el.isDefault,\r\n isPreview: el.isPreview,\r\n css: el.css,\r\n javascript: el.javascript,\r\n head: el.head,\r\n };\r\n}\r\n\r\nfunction createBlock(index: number, choiceLists: ChoiceModel[][], el?: any): BlockModel {\r\n if (el == null) return;\r\n return {\r\n ...createElementWithSettings(el),\r\n id: el.id,\r\n index,\r\n questions: map(el.questions, (q, i: number) => createQuestion(i, index, choiceLists, q)),\r\n randomizations: el.randomizations.map(createRandomization),\r\n theme: createTheme(el.theme),\r\n skipLogic: createLogic(el.skipLogic),\r\n displayLogic: createLogic(el.displayLogic),\r\n };\r\n}\r\n","import { isNullOrEmpty } from \"../../utils\";\r\nimport { isEmpty } from \"../../utils/lodash\";\r\nimport { RandomizationBounds } from \"../RandomizationBounds\";\r\nimport { RandomizationModel } from \"../RandomizationModel\";\r\nimport { RandomizationPattern } from \"../enums/RandomizationPattern\";\r\n\r\nexport function createRandomization(el?: any): RandomizationModel {\r\n if (isEmpty(el)) return undefined;\r\n return {\r\n id: el.id,\r\n pattern: RandomizationPattern[el.pattern as string],\r\n bounds: createRandomizationBounds(el),\r\n seedAdjust: el.seedAdjust || el.id,\r\n groupCount: el.groupCount,\r\n synchronizedQuestion: el.synchronizedQuestion,\r\n synchronizedWithId: el.synchronizedWithId,\r\n };\r\n}\r\n\r\nfunction createRandomizationBounds(el: any): RandomizationBounds {\r\n if (el.bounds || (el.start && el.end)) {\r\n const names = !isNullOrEmpty(el.bounds) ? el.bounds.split(\"-\") : undefined;\r\n const hasNames = names && names.length === 2;\r\n let startName = hasNames ? names[0] : undefined;\r\n let endName = hasNames ? names[1] : undefined;\r\n\r\n if (!isNullOrEmpty(el.start)) {\r\n startName = el.start;\r\n }\r\n\r\n if (!isNullOrEmpty(el.end)) {\r\n endName = el.end;\r\n }\r\n\r\n return {\r\n startName,\r\n endName,\r\n };\r\n }\r\n return undefined;\r\n}\r\n","import { RespondentModel } from \"../RespondentModel\";\r\nimport { DispositionCode } from \"../enums/DispositionCode\";\r\n\r\nexport function createRespondent(el?: any): RespondentModel {\r\n if (el == null) return undefined;\r\n return {\r\n id: el.id,\r\n respondentId: el.respondentId,\r\n simulated: el.simulated,\r\n isNew: el.isNew !== undefined ? el.isNew : el.respondentId === 0,\r\n seed: el.seed,\r\n email: el.email,\r\n phone: el.phone,\r\n timeZone: el.timeZone,\r\n pin: el.pin,\r\n language: el.language,\r\n ignoreForcedQuit: Boolean(el.ignoreForcedQuit),\r\n sessionStartTime: el.sessionStartTime,\r\n dispositionCode: (DispositionCode as any)[el.dispositionCode],\r\n prevSessionFirstAnsweredQuestion: el.firstAnsweredQuestion,\r\n prevSessionLastAnsweredQuestion: el.lastAnsweredQuestion,\r\n firstAnsweredQuestion: undefined,\r\n lastAnsweredQuestion: undefined,\r\n appointmentDate: el.appointmentDate,\r\n offlineUserId: el.offlineUserId,\r\n offlineUserName: el.offlineUserName,\r\n ipAddress: el.ipAddress,\r\n panelistId: el.panelistId,\r\n sampleId: el.sampleId,\r\n panelistPoints: el.panelistPoints,\r\n accessCount: el.accessCount,\r\n inputAccess: el.inputAccess\r\n };\r\n}\r\n","import { getPropertyEnum, getPropertyString } from \"./propertyUtilities\";\r\nimport { ActionModel } from \"../ActionModel\";\r\nimport { DispositionCode } from \"../enums/DispositionCode\";\r\nimport { PropertyType } from \"../enums/PropertyType\";\r\nimport { Piping } from \"../../piping\";\r\nimport { InterviewState } from \"../states/InterviewState\";\r\n\r\nexport const getDispositionCode = (action: ActionModel) =>\r\n getPropertyEnum(action, DispositionCode, PropertyType.Status);\r\n\r\nexport const getExitUrl = (action: ActionModel, interview: InterviewState) => {\r\n const redirectUrl = getPropertyString(action, PropertyType.ExitUrl);\r\n return Piping.evaluateRecalls(interview, redirectUrl);\r\n};\r\n","import { each, last } from \"../../utils/lodash\";\r\nimport { BlockModel } from \"../BlockModel\";\r\nimport { QuestionModel } from \"../QuestionModel\";\r\nimport { getSettingBoolean, getSettingNumber } from \"./settingUtilities\";\r\n\r\nexport const isAutoPageBreak = (block: BlockModel) => getSettingBoolean(block, \"AutoPageBreak\");\r\n\r\nexport const getMaxLoopSize = (block: BlockModel) => getSettingNumber(block, \"MaxLoopSize\", 1);\r\n\r\nexport const getAllCurrentPageQuestions = (currentBlock: BlockModel, questionIndex: number) => {\r\n let questions: QuestionModel[] = [];\r\n let foundPage = false;\r\n\r\n if (isAutoPageBreak(currentBlock)) {\r\n return currentBlock.questions.filter((q) => q.index === questionIndex);\r\n }\r\n\r\n each(currentBlock.questions, (q) => {\r\n questions.push(q);\r\n if (q.index === questionIndex) {\r\n foundPage = true;\r\n }\r\n if (q.isPageBreak || q.index === last(currentBlock.questions).index) {\r\n if (foundPage) {\r\n return false;\r\n }\r\n questions = [];\r\n }\r\n return undefined;\r\n });\r\n return questions;\r\n};\r\n","import { find, isEmpty } from \"../../utils/lodash\";\r\nimport { hasSetting, getSettingBoolean } from \"./settingUtilities\";\r\nimport { ChoiceModel } from \"../ChoiceModel\";\r\nimport { NumericRankingModel } from \"../NumericRankingModel\";\r\nimport { SoftPromptChoiceType } from \"../enums/SoftPromptChoiceType\";\r\nimport { isGrid } from \"../enums/QuestionType\";\r\nimport { NavigationResultChoiceModel } from \"../NavigationResultChoiceModel\";\r\nimport { QuestionModel } from \"../QuestionModel\";\r\n\r\nexport function hasOpenEnd(choice: ChoiceModel) {\r\n return hasSetting(choice, \"OpenEndType\") && !getSettingBoolean(choice, \"OpenEndType\", \"None\");\r\n}\r\n\r\nexport function getChoiceRanking(choice: ChoiceModel, rankings: NumericRankingModel[]) {\r\n const ranking = find(rankings, (r) => r.choiceValue === choice.value);\r\n if (ranking) {\r\n return ranking.rankingValue;\r\n }\r\n return \"\";\r\n}\r\n\r\nexport function isHeader(choice: ChoiceModel) {\r\n return isEmpty(choice.value);\r\n}\r\n\r\nexport function isVisible(choice: ChoiceModel) {\r\n return !hasSetting(choice, \"Visible\") || getSettingBoolean(choice, \"Visible\");\r\n}\r\n\r\nexport function isDefault(choice: ChoiceModel) {\r\n return getSettingBoolean(choice, \"Default\");\r\n}\r\n\r\nexport const shouldSetSoftPrompt = (choice: ChoiceModel, softPromptType: SoftPromptChoiceType) => {\r\n switch (softPromptType) {\r\n case SoftPromptChoiceType.Invisible:\r\n return !isVisible(choice);\r\n case SoftPromptChoiceType.VisibleDefault:\r\n return isDefault(choice) && isVisible(choice);\r\n case SoftPromptChoiceType.Visible:\r\n default:\r\n return false;\r\n }\r\n};\r\n\r\nexport function compareChoices(\r\n choice: ChoiceModel,\r\n navigationResultChoice: NavigationResultChoiceModel,\r\n question: QuestionModel,\r\n): boolean {\r\n if (choice.position !== undefined) {\r\n return choice.position === navigationResultChoice.position;\r\n }\r\n\r\n const { type, parent } = question;\r\n const isGridOrInGrid = isGrid(type) || (parent && isGrid(parent.type));\r\n\r\n // Older versions of questionnaires don't have the field position.\r\n // Position starts on 1 for choice list, so we decrement to have the index.\r\n // For grids the position is already the index.\r\n const indexAdjust = isGridOrInGrid ? 0 : 1;\r\n const navigationResultChoiceIndex = navigationResultChoice.position - indexAdjust;\r\n\r\n return choice.index === navigationResultChoiceIndex;\r\n}\r\n","import { add, flatMap, map, memoize, omitBy, reduce, pick, values } from \"../../utils/lodash\";\r\nimport { ColumnType } from \"../enums/ColumnType\";\r\nimport { RowType } from \"../enums/RowType\";\r\nimport {\r\n getSettingBoolean,\r\n getSettingString,\r\n getSettingNumber,\r\n hasSetting,\r\n} from \"./settingUtilities\";\r\nimport { translate } from \"./translationUtilities\";\r\nimport { ChoiceModel } from \"../ChoiceModel\";\r\nimport { QuestionModel } from \"../QuestionModel\";\r\nimport { QuestionType } from \"../enums/QuestionType\";\r\nimport { AxisModel } from \"../AxisModel\";\r\nimport { ValidationResultModel } from \"../ValidationResultModel\";\r\nimport { findVariables } from \"../../expressions/parser\";\r\nimport { getAllDisplayLogicVariables } from \"../factories/questionFactory\";\r\nimport { Translatable } from \"../Translatable\";\r\nimport { isNullOrEmpty } from \"../../utils\";\r\nimport { ControlProps } from \"../../components/controls/BaseControl\";\r\n\r\nexport const isRowMergeCells = (row: AxisModel) => getSettingBoolean(row, \"MergeCells\");\r\nexport const isRowMergeLeftLabel = (row: AxisModel) => getSettingBoolean(row, \"MergeLeftLabel\");\r\nexport const isRowMergeRightLabel = (row: AxisModel) => getSettingBoolean(row, \"MergeRightLabel\");\r\nexport const isHeaderRow = (row: AxisModel) =>\r\n [RowType.Text, RowType.Title].includes(row.type as RowType);\r\nexport const getUseChoiceTexts = (row: AxisModel) => getSettingBoolean(row, \"UseChoiceTexts\");\r\nexport const shouldShowRowLeftLabel = (row: AxisModel) => !isRowMergeLeftLabel(row);\r\nexport const shouldShowRowRightLabel = (row: AxisModel) => !isRowMergeRightLabel(row);\r\nexport const isSplitColumn = (column: AxisModel) =>\r\n [ColumnType.CheckBox, ColumnType.RadioButton, ColumnType.ImageSelector].includes(\r\n column.type as ColumnType,\r\n );\r\nexport const variableForCell = (row: AxisModel, column: AxisModel) => row.variables[column.index];\r\nexport const hasOpenEnd = (row: AxisModel | ChoiceModel) => hasSetting(row, \"OpenEndVariable\");\r\nexport const openEndVariableName = (row: AxisModel | ChoiceModel) =>\r\n getSettingString(row, \"OpenEndVariable\");\r\nexport const getColumnCount = (columns: AxisModel[]) => {\r\n const columnCount = map(columns, (c) =>\r\n isSplitColumn(c)\r\n ? c.variables.find((v) => v.choiceList?.length > 0)?.choiceList?.length\r\n : 1,\r\n );\r\n return reduce(columnCount, add);\r\n};\r\nexport const getVariablesCount = (question: QuestionModel) =>\r\n flatMap(question.rows, (r) => map(r.variables, (v) => v.name)).length;\r\n\r\nexport const isSingleChoice = (question: QuestionModel) =>\r\n getSettingNumber(question, \"MaxAllowedAnswers\") === 1 ||\r\n (question.type !== QuestionType.HybridGrid &&\r\n question.columns.some((c) => c.type === ColumnType.RadioButton));\r\n\r\nexport const autoAdvanceCarouselQuestion = (question: QuestionModel, props: ControlProps) => {\r\n const { mentions, sequencedVariables } = props;\r\n\r\n const carouselIsCheckBoxType =\r\n getSettingString(question, \"CarrouselChoiceListAnswerType\") ===\r\n QuestionType[QuestionType.CheckBox];\r\n\r\n const hasMaxAllowedAnswers =\r\n hasSetting(question, \"MaxAllowedAnswers\") &&\r\n getSettingNumber(question, \"MaxAllowedAnswers\") === 1;\r\n\r\n const answerRequired =\r\n !hasSetting(question, \"AnswerRequired\") || getSettingBoolean(question, \"AnswerRequired\");\r\n\r\n return answerRequired && (!carouselIsCheckBoxType || hasMaxAllowedAnswers)\r\n ? sequencedVariables.length === flatMap(mentions, (mention) => mention).length &&\r\n flatMap(mentions, (mention) => mention.length > 0).indexOf(false) <= 0\r\n : false;\r\n};\r\n\r\nexport const hasRightLabels = (entitiesWithLabels: Translatable[], language: string) =>\r\n entitiesWithLabels.some((entity) => !isNullOrEmpty(translate(entity, \"RightLabel\", language)));\r\n\r\nexport const hasLeftLabels = (entitiesWithLabels: Translatable[], language: string) =>\r\n entitiesWithLabels.some(\r\n (entity) =>\r\n !isNullOrEmpty(translate(entity, \"LeftLabel\", language)) ||\r\n !isNullOrEmpty(translate(entity, \"TotalRowLabel\", language)),\r\n );\r\n\r\nconst choiceNameForCell = (row: AxisModel, column: AxisModel, choice: ChoiceModel) =>\r\n `${variableForCell(row, column)}_${choice.index + 1}`;\r\n\r\nexport const choiceForCell = memoize(\r\n (row: AxisModel, column: AxisModel, choice: ChoiceModel): ChoiceModel => ({\r\n ...choice,\r\n name: choiceNameForCell(row, column, choice),\r\n settings: omitBy(choice.settings, (value, key) => key.startsWith(\"OpenEnd\")),\r\n }),\r\n choiceNameForCell,\r\n);\r\n\r\nconst controlTypes: any = {\r\n [ColumnType.CheckBox]: QuestionType.CheckBox,\r\n [ColumnType.RadioButton]: QuestionType.RadioButton,\r\n [ColumnType.ImageSelector]: QuestionType.ImageSelector,\r\n [ColumnType.DropDownList]: QuestionType.DropDownList,\r\n [ColumnType.StarRating]: QuestionType.StarRatingGrid,\r\n [ColumnType.NumericAnswer]: QuestionType.NumericAnswer,\r\n [ColumnType.Slider]: QuestionType.Slider,\r\n};\r\n\r\nexport function questionTypeForColumn(column: AxisModel) {\r\n return controlTypes[column.type] || QuestionType.TextAnswer;\r\n}\r\n\r\nfunction getRowVariableDependencies(row: AxisModel) {\r\n return [\r\n ...findVariables(row.displayLogic),\r\n ...findVariables(row.skipLogic),\r\n ...(row.openEndDisplayIf ? findVariables(row.openEndDisplayIf) : []),\r\n ];\r\n}\r\n\r\nfunction getColumnVariableDependencies(column: AxisModel) {\r\n return [\r\n ...findVariables(column.displayLogic),\r\n ...findVariables(column.skipLogic),\r\n ...getAllDisplayLogicVariables(column.variables),\r\n ];\r\n}\r\n\r\nfunction getCellVariableDependencies(row: AxisModel, column: AxisModel) {\r\n return [...getRowVariableDependencies(row), ...getColumnVariableDependencies(column)];\r\n}\r\n\r\nexport const questionForCell = (\r\n question: QuestionModel,\r\n row: AxisModel,\r\n column: AxisModel,\r\n): QuestionModel => {\r\n const variables = getCellVariables(row, column, question);\r\n return {\r\n id: 0,\r\n parent: question,\r\n name: variableForCell(row, column).name,\r\n settings: {\r\n ...column.settings,\r\n MaxAllowedAnswers:\r\n column.settings[\"MaxAllowedAnswers\"] ||\r\n (question.settings && question.settings[\"MaxAllowedAnswers\"]),\r\n AnswerRequired: !(\r\n (hasSetting(row, \"AnswerRequired\") && !getSettingBoolean(row, \"AnswerRequired\")) ||\r\n (hasSetting(column, \"AnswerRequired\") &&\r\n !getSettingBoolean(column, \"AnswerRequired\"))\r\n ),\r\n },\r\n translatedTexts: column.translatedTexts,\r\n type: questionTypeForColumn(column),\r\n elementId: variableForCell(row, column).name,\r\n index: column.index,\r\n blockIndex: question.blockIndex,\r\n variables,\r\n skipLogic: column.skipLogic,\r\n displayLogic: column.displayLogic,\r\n isPageBreak: false,\r\n variableNames: variables.map((v) => v?.name),\r\n variableDependencies: getCellVariableDependencies(row, column),\r\n };\r\n};\r\n\r\nconst getCellVariables = (row: AxisModel, column: AxisModel, question: QuestionModel) => {\r\n const variables = [variableForCell(row, column)];\r\n const openEndVarName = openEndVariableName(row);\r\n if (openEndVarName) {\r\n const openEndVar = getQuestionVariableWithName(question, openEndVarName);\r\n variables.push(openEndVar);\r\n }\r\n return variables;\r\n};\r\n\r\nconst getQuestionVariableWithName = (question: QuestionModel, variableName: string) =>\r\n question.variables?.find((v) => v.name === variableName);\r\n\r\nexport const rowHasError = (\r\n row: AxisModel,\r\n columns: AxisModel[],\r\n validationResult: ValidationResultModel,\r\n) => {\r\n if (!row || row.type !== RowType.Variable || !validationResult) return false;\r\n\r\n const rowVariables = columns.map((column) => variableForCell(row, column));\r\n const errors = pick(\r\n validationResult.errorsByVariableName,\r\n rowVariables.map((v) => v.name),\r\n );\r\n return values(errors).length > 0;\r\n};\r\n\r\nexport const cellHasError = (\r\n row: AxisModel,\r\n column: AxisModel,\r\n validationResult: ValidationResultModel,\r\n) => {\r\n if (!row || row.type !== RowType.Variable || !validationResult || !column) return false;\r\n\r\n const variable = variableForCell(row, column);\r\n const errors = validationResult.errorsByVariableName[variable.name] || [];\r\n return errors && errors.length > 0;\r\n};\r\n","import { ElementWithProperties } from \"../ElementWithProperties\";\r\nimport { PropertyType } from \"../enums/PropertyType\";\r\n\r\nexport const hasProperty = (element: ElementWithProperties, key: PropertyType) => {\r\n if (!element || !element.properties) return false;\r\n return element.properties[PropertyType[key]] !== undefined;\r\n};\r\n\r\nexport const getPropertyString = (\r\n element: ElementWithProperties,\r\n key: PropertyType,\r\n defaultValue?: string,\r\n) => (hasProperty(element, key) ? element.properties[PropertyType[key]] : defaultValue);\r\n\r\nexport const getPropertyNumber = (\r\n element: ElementWithProperties,\r\n key: PropertyType,\r\n defaultValue?: number,\r\n) => Number(element.properties[PropertyType[key]]) || defaultValue;\r\n\r\nexport const getPropertyBoolean = (\r\n element: ElementWithProperties,\r\n key: PropertyType,\r\n trueValue?: string,\r\n): boolean => {\r\n if (trueValue === undefined)\r\n return getPropertyBoolean(element, key, \"Yes\") || getPropertyBoolean(element, key, \"True\");\r\n return String(element.properties[PropertyType[key]]).toUpperCase() === trueValue.toUpperCase();\r\n};\r\n\r\nexport const getPropertyEnum = (element: ElementWithProperties, e: any, key: PropertyType) =>\r\n e[String(element.properties[PropertyType[key]])];\r\n","import { DateTime } from \"luxon\";\r\nimport { ChoiceModel } from \"../ChoiceModel\";\r\nimport { QuestionModel } from \"../QuestionModel\";\r\nimport {\r\n getSettingBoolean,\r\n getSettingString,\r\n hasSetting,\r\n getSettingNumber,\r\n} from \"./settingUtilities\";\r\nimport { cDateFormatToLuxon } from \"../../utils/time\";\r\nimport { isNullOrEmpty } from \"../../utils/index\";\r\nimport { QuestionType } from \"../enums/QuestionType\";\r\nimport { isSingleChoice, getVariablesCount, autoAdvanceCarouselQuestion } from \"./gridUtilities\";\r\nimport { ChoiceListDisplayType } from \"../enums/ChoiceListDisplayType\";\r\nimport { ControlProps } from \"../../components/controls/BaseControl\";\r\n\r\nexport function isImageAreaEvaluator(questionType: QuestionType) {\r\n return questionType === QuestionType.ImageAreaEvaluator;\r\n}\r\n\r\nexport function shouldSetSoftPromptCode(question: QuestionModel) {\r\n return !isImageAreaEvaluator(question.type);\r\n}\r\n\r\nexport function shouldSetDefaultChoice(question: QuestionModel) {\r\n return !isImageAreaEvaluator(question.type);\r\n}\r\n\r\nexport function isQuestionSoftPrompt(question: QuestionModel) {\r\n return getSettingBoolean(question, \"AnswerRequired\", \"SoftPrompt\");\r\n}\r\n\r\nexport function isAutoAdvanceCompatible(question: QuestionModel, props: ControlProps) {\r\n switch (question.type) {\r\n case QuestionType.AutoComplete:\r\n case QuestionType.DropDownList:\r\n case QuestionType.RadioButton:\r\n case QuestionType.RespondentLanguage:\r\n case QuestionType.RespondentTimeZone:\r\n return true;\r\n case QuestionType.ImageAreaSelector:\r\n case QuestionType.ImageSelector:\r\n case QuestionType.CheckBox:\r\n return isSingleChoice(question);\r\n case QuestionType.StarRatingGrid:\r\n return getVariablesCount(question) === 1;\r\n case QuestionType.NetPromoter:\r\n case QuestionType.ImageChoiceGrid:\r\n case QuestionType.ChoiceGrid:\r\n return isSingleChoice(question) && getVariablesCount(question) === 1;\r\n case QuestionType.Carrousel:\r\n return autoAdvanceCarouselQuestion(question, props);\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\nexport function isAutoAdvanceExcluded(question: QuestionModel) {\r\n switch (question.type) {\r\n case QuestionType.Description:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\nexport function dateFormat(question: QuestionModel, includeTime = true) {\r\n const format = cDateFormatToLuxon(getSettingString(question, \"DateFormat\") || \"yyyy-MM-dd\");\r\n if (includeTime) {\r\n const timeFormat = cDateFormatToLuxon(getSettingString(question, \"TimeFormat\") || \"HH:mm\");\r\n if (getSettingBoolean(question, \"Type\", \"Time\")) {\r\n return timeFormat;\r\n }\r\n if (getSettingBoolean(question, \"Type\", \"DateTime\")) {\r\n return `${format} ${timeFormat}`;\r\n }\r\n }\r\n return format;\r\n}\r\n\r\nexport function dateFromValue(question: QuestionModel, value: string, includeTime = true) {\r\n if (isNullOrEmpty(value)) {\r\n return undefined;\r\n }\r\n const dateTimeFormat = dateFormat(question, includeTime);\r\n\r\n let date = DateTime.fromFormat(value, dateTimeFormat);\r\n if (date.isValid) return date;\r\n\r\n // 'hh:mm a' and 'hh-mm a' formats have issues with AM/PM in different languages ==> set locale to English\r\n if (dateTimeFormat.indexOf(\"hh:mm a\") > -1 || dateTimeFormat.indexOf(\"hh-mm a\") > -1) {\r\n date = DateTime.fromFormat(value, dateTimeFormat, { locale: \"en\" });\r\n if (date.isValid) return date;\r\n }\r\n\r\n // Arabic date formats need Arabic normalization\r\n const newValue = normalizeArabicToLatin(value);\r\n date = DateTime.fromFormat(newValue, dateTimeFormat);\r\n if (date.isValid) return date;\r\n\r\n // This is used for piped dates.\r\n return DateTime.fromFormat(value, cDateFormatToLuxon(\"dddd, MMMM D, YYYY\"));\r\n}\r\n\r\n// Function to normalize Arabic numerals to Latin numerals\r\nfunction normalizeArabicToLatin(arabicDateTime) {\r\n return arabicDateTime\r\n .replace(/[\\u0660-\\u0669]/g, (c) => {\r\n return c.charCodeAt(0) - 0x0660;\r\n })\r\n .replace(/[\\u06f0-\\u06f9]/g, (c) => {\r\n return c.charCodeAt(0) - 0x06f0;\r\n });\r\n}\r\n\r\nexport function findVariablesInHtmlContent(content: string) {\r\n const variables: string[] = [];\r\n const regex = /<(input.*?type\\s*=\\s*(?:[\"']([^\"']*?)[\"']|(\\S+))|textarea|option).*?%(\\w+):?(\\w*):?(\\w*)%/gi;\r\n let matches = null;\r\n while ((matches = regex.exec(content))) {\r\n if (matches === undefined) {\r\n continue;\r\n }\r\n const variable = matches[4].toUpperCase();\r\n variables.push(variable);\r\n }\r\n return variables;\r\n}\r\n\r\nexport function getChoiceWithPredicate(\r\n question: QuestionModel,\r\n predicate: (choice: ChoiceModel) => boolean,\r\n): ChoiceModel {\r\n const { variables = [] } = question;\r\n const choice = variables.map((variable) => variable.choiceList.find(predicate)).find(Boolean);\r\n return choice;\r\n}\r\n\r\nexport function getChoiceWithValue(question: QuestionModel, value: string): ChoiceModel {\r\n return getChoiceWithPredicate(question, (c) => c.value.toUpperCase() === value.toUpperCase());\r\n}\r\n\r\nexport function getChoiceWithName(question: QuestionModel, name: string): ChoiceModel {\r\n return getChoiceWithPredicate(question, (c) => c.name.toUpperCase() === name.toUpperCase());\r\n}\r\n\r\nexport function getChoiceWithIndex(question: QuestionModel, index: number): ChoiceModel {\r\n return getChoiceWithPredicate(question, (c) => c.index === index);\r\n}\r\n\r\nexport function getDefaultChoice(question: QuestionModel): ChoiceModel {\r\n return getChoiceWithPredicate(question, (c) => getSettingBoolean(c, \"Default\"));\r\n}\r\n\r\nexport function shouldAutoFormat(question: QuestionModel) {\r\n return !hasSetting(question, \"AutoFormatting\") || getSettingBoolean(question, \"AutoFormatting\");\r\n}\r\n\r\nexport function decimalPlaces(value: string): number {\r\n /* eslint-disable-next-line prefer-template */\r\n const match = (\"\" + value).match(/(?:\\.(\\d+))?(?:[eE]([+-]?\\d+))?$/);\r\n if (!match) {\r\n return 0;\r\n }\r\n return Math.max(0, (match[1] ? match[1].length : 0) - (match[2] ? +match[2] : 0));\r\n}\r\n\r\nexport function defaultSize(question: QuestionModel) {\r\n const numericQuestionTypes = [QuestionType.NumericAnswer, QuestionType.RunningTotal];\r\n if (numericQuestionTypes.includes(question.type)) {\r\n return \"Small\";\r\n }\r\n return \"Medium\";\r\n}\r\n\r\nexport function size(question: QuestionModel) {\r\n return getSettingString(question, \"Size\", defaultSize(question));\r\n}\r\n\r\nexport function getActiveQuesions(questions: QuestionModel[]) {\r\n return questions.filter((q) => !hasSetting(q, \"Active\") || getSettingBoolean(q, \"Active\"));\r\n}\r\n\r\nexport function getSoftPromptCode(question: QuestionModel) {\r\n return getSettingString(question, \"SoftPromptChoiceCode\");\r\n}\r\n\r\nexport function isSoftPromptVisible(question: QuestionModel, sequencedChoices: ChoiceModel[]) {\r\n return sequencedChoices.some((c) => c.value === getSoftPromptCode(question));\r\n}\r\n\r\nexport function getChoiceListDisplayType(question: QuestionModel): ChoiceListDisplayType {\r\n const displayOrder = getSettingString(question, \"DisplayOrder\");\r\n const numberOfColumns = getSettingNumber(question, \"NumberOfColumns\");\r\n if (displayOrder === \"Horizontal\" && numberOfColumns > 1) {\r\n return ChoiceListDisplayType.HorizontalColumns;\r\n }\r\n if (displayOrder === \"Horizontal\" && (!numberOfColumns || numberOfColumns <= 1)) {\r\n return ChoiceListDisplayType.Horizontal;\r\n }\r\n if (displayOrder !== \"Horizontal\" && numberOfColumns > 1) {\r\n return ChoiceListDisplayType.VerticalColumns;\r\n }\r\n return ChoiceListDisplayType.Vertical;\r\n}\r\n","export enum AutoAdvanceMode {\r\n ByBlock,\r\n Enabled,\r\n Disabled,\r\n}\r\n","import { DateTime } from \"luxon\";\r\nimport { add, flatMap, map, uniq, takeWhile, takeRightWhile, pull, find } from \"../../utils/lodash\";\r\nimport { QuestionModel } from \"../QuestionModel\";\r\nimport { QuestionnaireModel } from \"../QuestionnaireModel\";\r\nimport { getSettingString, getSettingEnum, getSettingBoolean } from \"./settingUtilities\";\r\nimport { DispositionCode } from \"../enums/DispositionCode\";\r\nimport { TerminationAction } from \"../enums/TerminationAction\";\r\nimport { isNullOrEmpty } from \"../../utils\";\r\nimport { BlockModel } from \"../BlockModel\";\r\nimport { AutoAdvanceMode } from \"../enums/AutoAdvanceMode\";\r\nimport { translate } from \"./translationUtilities\";\r\nimport { TerminationOptionsModel } from \"../TerminationOptionsModel\";\r\nimport { QuestionType } from \"../enums/QuestionType\";\r\n\r\nexport function getDefaultLanguage(questionnaire: QuestionnaireModel) {\r\n return questionnaire.defaultLanguage;\r\n}\r\n\r\nexport const shouldExecuteResumeActions = (questionnaire: QuestionnaireModel) =>\r\n getSettingBoolean(questionnaire, \"EXECUTE_ADVANCED_ACTIONS_ON_RESUME\");\r\n\r\nexport function isAutoAdvanceEnabled(questionnaire: QuestionnaireModel, block: BlockModel) {\r\n const autoAdvanceMode = getSettingEnum(questionnaire, AutoAdvanceMode, \"AUTO_ADVANCE_MODE\");\r\n if (autoAdvanceMode === AutoAdvanceMode.ByBlock) {\r\n return getSettingBoolean(block, \"AutoAdvance\");\r\n }\r\n return autoAdvanceMode === AutoAdvanceMode.Enabled;\r\n}\r\n\r\nexport function isExpired(questionnaire: QuestionnaireModel) {\r\n const startDateString = getSettingString(questionnaire, \"SURVEY_START_DATE\");\r\n const endDateString = getSettingString(questionnaire, \"SURVEY_END_DATE\");\r\n const dateFormat = \"MM/DD/YYYY\";\r\n if (startDateString) {\r\n const startDate = DateTime.fromFormat(startDateString, dateFormat).toUTC();\r\n if (startDate && DateTime.utc() < startDate) {\r\n return true;\r\n }\r\n }\r\n if (endDateString) {\r\n const endDate = DateTime.fromFormat(endDateString, dateFormat).toUTC();\r\n if (endDate && DateTime.utc() < endDate) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}\r\n\r\nexport const getTerminationOptions = (\r\n questionnaire: QuestionnaireModel,\r\n language: string,\r\n status?: DispositionCode,\r\n): TerminationOptionsModel => {\r\n if (DispositionCode[status]) {\r\n let terminationType = DispositionCode[status];\r\n let terminationAction = getSettingEnum(\r\n questionnaire,\r\n TerminationAction,\r\n `${terminationType.toUpperCase()}_ACTION`,\r\n );\r\n while (true) {\r\n if (terminationAction === TerminationAction.RedirectToUrl) {\r\n const url = getSettingString(\r\n questionnaire,\r\n `${terminationType.toUpperCase() || \"TERMINATION\"}_ACTION_REDIRECT_URL`,\r\n );\r\n if (!isNullOrEmpty(url)) {\r\n return { redirectUrl: url };\r\n }\r\n return {};\r\n }\r\n if (terminationAction === TerminationAction.DisplayMessage) {\r\n const message = translate(\r\n questionnaire,\r\n `${terminationType}TerminationMessage`,\r\n language,\r\n );\r\n if (!isNullOrEmpty(message)) {\r\n return { message: message };\r\n }\r\n return {};\r\n }\r\n if (terminationType === \"\") {\r\n return {};\r\n }\r\n terminationType = \"\";\r\n terminationAction = getSettingEnum(\r\n questionnaire,\r\n TerminationAction,\r\n \"TERMINATION_ACTION\",\r\n );\r\n }\r\n }\r\n return {};\r\n};\r\nexport const getTotalQuestions = (questionnaire: QuestionnaireModel) =>\r\n questionnaire.blocks.map((b) => b.questions.length).reduce(add);\r\n\r\nexport const getBlock = (questionnaire: QuestionnaireModel, name: string) =>\r\n questionnaire.blocks.find((b) => b.name.toUpperCase() === name.toUpperCase());\r\n\r\nexport const getBlockWithVariable = (questionnaire: QuestionnaireModel, variable: string) => {\r\n const question = getQuestionWithVariable(questionnaire, variable);\r\n if (question == null) {\r\n return undefined;\r\n }\r\n return questionnaire.blocks[question.blockIndex];\r\n};\r\n\r\nexport const getBlockWithQuestion = (questionnaire: QuestionnaireModel, questionName: string) => {\r\n const question = getQuestionWithName(questionnaire, questionName);\r\n if (question == null) {\r\n return undefined;\r\n }\r\n return questionnaire.blocks[question.blockIndex];\r\n};\r\n\r\nexport const getQuestionWithName = (questionnaire: QuestionnaireModel, name: string) => {\r\n if (questionnaire == null || isNullOrEmpty(name)) {\r\n return undefined;\r\n }\r\n\r\n const questionName = name.toUpperCase();\r\n return questionnaire.blocks\r\n .flatMap((block) => block.questions)\r\n .find((question) => question.name.toUpperCase() === questionName);\r\n};\r\n\r\nexport const getQuestionWithId = (questionnaire: QuestionnaireModel, id: number) => {\r\n if (questionnaire == null || !id) {\r\n return undefined;\r\n }\r\n\r\n return questionnaire.blocks\r\n .flatMap((block) => block.questions)\r\n .find((question) => question.id === id);\r\n};\r\n\r\nexport const getVariableWithName = (questionnaire: QuestionnaireModel, name: string) => {\r\n if (questionnaire == null || isNullOrEmpty(name)) {\r\n return undefined;\r\n }\r\n const variableName = name.toUpperCase();\r\n return questionnaire.blocks\r\n .flatMap((b) => b.questions.flatMap((q) => q.variables))\r\n .find((v) => v.name.toUpperCase() === variableName);\r\n};\r\n\r\nexport const getQuestionTypeByVariableName = (\r\n questionnaire: QuestionnaireModel,\r\n name: string,\r\n): QuestionType => {\r\n if (questionnaire == null || isNullOrEmpty(name)) {\r\n return undefined;\r\n }\r\n return getQuestionWithVariable(questionnaire, name)?.type;\r\n};\r\n\r\nexport const getQuestionWithVariable = (\r\n questionnaire: QuestionnaireModel,\r\n name: string,\r\n): QuestionModel | undefined => {\r\n if (questionnaire == null || isNullOrEmpty(name)) {\r\n return undefined;\r\n }\r\n const variableName = name.toUpperCase();\r\n return questionnaire.blocks\r\n .flatMap((b) => b.questions)\r\n .find((q) => q.variables.find((v) => v.name.toUpperCase() === variableName));\r\n};\r\n\r\nexport const getVariableRange = (\r\n questionnaire: QuestionnaireModel,\r\n start: string,\r\n end: string,\r\n includeFirst = true,\r\n) => {\r\n if (questionnaire == null) {\r\n return undefined;\r\n }\r\n const allQuestions = flatMap(questionnaire.blocks, (b) => map(b.questions, (q) => q));\r\n if (end.startsWith(\"+\")) {\r\n const startQuestion = allQuestions.find((q) => q.name === start);\r\n const endQuestionIndex = allQuestions.indexOf(startQuestion) + Number(end) - 1;\r\n end = allQuestions[endQuestionIndex].name;\r\n }\r\n const questionsAndVariablesNames = uniq(\r\n flatMap(allQuestions, (q) => [q.name, ...q.variableNames]),\r\n );\r\n // Get variables to remove\r\n const left = takeWhile(\r\n questionsAndVariablesNames,\r\n (v) => v.toUpperCase() !== start.toUpperCase(),\r\n );\r\n const right = takeRightWhile(\r\n questionsAndVariablesNames,\r\n (v) => v.toUpperCase() !== end.toUpperCase(),\r\n );\r\n // Remove variables outside of the range\r\n pull(questionsAndVariablesNames, ...left, ...right);\r\n\r\n // Remove first element\r\n if (!includeFirst) {\r\n const first = questionsAndVariablesNames.shift();\r\n const question = allQuestions.find((q) => q.name === first);\r\n\r\n // If it is a question removes its variables too\r\n if (question) {\r\n pull(questionsAndVariablesNames, ...question.variableNames);\r\n }\r\n }\r\n\r\n const allVariables = flatMap(allQuestions, (q) => q.variables);\r\n return uniq(\r\n flatMap(questionsAndVariablesNames, (name) => {\r\n // Return the variable or all the question variables depending on the case\r\n return (\r\n find(allVariables, (v) => v.name === name) ||\r\n find(allQuestions, (q) => q.name === name).variables\r\n );\r\n }),\r\n );\r\n};\r\n\r\nexport const getCompletionQuestion = (questionnaire: QuestionnaireModel) => {\r\n const questionName = getSettingString(questionnaire, \"COMPLETION_QUESTION\");\r\n if (isNullOrEmpty(questionName)) {\r\n return null;\r\n }\r\n return getQuestionWithName(questionnaire, questionName);\r\n};\r\n\r\nexport const isInputRequired = (questionnaire: QuestionnaireModel) =>\r\n getSettingBoolean(questionnaire, \"INPUT_REQUIRED\");\r\n","import { RespondentModel } from \"../RespondentModel\";\r\n\r\nexport const getCoordinates = (respondent: RespondentModel): string => {\r\n return (\r\n (respondent?.latitude &&\r\n respondent?.longitude &&\r\n `${respondent.latitude}, ${respondent.longitude}`) ||\r\n \"\"\r\n );\r\n};\r\n","import { ElementWithSettings } from \"../ElementWithSettings\";\r\n\r\nexport const hasSetting = (element: ElementWithSettings, key: string) => {\r\n if (!element || !element.settings) return false;\r\n return element.settings[key] !== undefined;\r\n};\r\n\r\nexport const getSettingString = (\r\n element: ElementWithSettings,\r\n key: string,\r\n defaultValue?: string,\r\n) => (hasSetting(element, key) ? String(element.settings[key]) : defaultValue);\r\n\r\nexport const getSettingNumber = (\r\n element: ElementWithSettings,\r\n key: string,\r\n defaultValue?: number,\r\n) => {\r\n if (!element || !element.settings) return defaultValue;\r\n if (typeof element.settings[key] === \"number\") return element.settings[key];\r\n return Number(element.settings[key]) || defaultValue;\r\n};\r\n\r\nexport const getSettingBoolean = (\r\n element: ElementWithSettings,\r\n key: string,\r\n ...trueValues: string[]\r\n): boolean => {\r\n if (!element || !element.settings) return false;\r\n if (trueValues == null || trueValues.length === 0) {\r\n if (typeof element.settings[key] === \"boolean\") {\r\n return element.settings[key];\r\n }\r\n return getSettingBoolean(element, key, \"Yes\", \"True\");\r\n }\r\n return trueValues.some((t) => t.toUpperCase() === String(element.settings[key]).toUpperCase());\r\n};\r\n\r\nexport const getSettingEnum = (element: ElementWithSettings, e: any, key: string) => {\r\n if (typeof element.settings[key] === \"number\") return element.settings[key];\r\n return e[String(element.settings[key] || 0)];\r\n};\r\n","import { Translatable } from \"../Translatable\";\r\n\r\nlet defaultLanguage = \"en\";\r\nexport function setDefaultLanguage(language) {\r\n defaultLanguage = language;\r\n}\r\n\r\nexport function translate(\r\n translatable: Translatable,\r\n key: string,\r\n language: string,\r\n defaultText?: string,\r\n): string {\r\n if (translatable == null || translatable.translatedTexts == null) {\r\n return null;\r\n }\r\n const translatedText = translatable.translatedTexts[key.toLowerCase()];\r\n if (!translatedText) {\r\n return defaultText || \"\";\r\n }\r\n return translatedText[language] || defaultText || translatedText[defaultLanguage] || \"\";\r\n}\r\n","import { every, isEmpty } from \"../../utils/lodash\";\r\nimport { QuestionType } from \"../enums/QuestionType\";\r\nimport { NavigationResultErrorModel } from \"../NavigationResultErrorModel\";\r\nimport { NavigationState } from \"../states/NavigationState\";\r\nimport { ValidationErrorModel } from \"../ValidationErrorModel\";\r\nimport { ValidationResultModel } from \"../ValidationResultModel\";\r\n\r\nconst serverSideValidatedQuestions = (): QuestionType[] => [\r\n QuestionType.CheckBox,\r\n QuestionType.ImageSelector,\r\n QuestionType.RadioButton,\r\n QuestionType.DropDownList,\r\n QuestionType.AutoComplete,\r\n QuestionType.Slider,\r\n QuestionType.NetPromoter,\r\n QuestionType.RespondentLanguage,\r\n QuestionType.RespondentTimeZone,\r\n QuestionType.NumericAnswer,\r\n QuestionType.CardSort,\r\n QuestionType.ImageAreaSelector,\r\n QuestionType.ImageAreaEvaluator,\r\n QuestionType.DateTimeAnswer,\r\n QuestionType.NumericRanking,\r\n QuestionType.ChoiceGrid,\r\n QuestionType.ImageChoiceGrid,\r\n QuestionType.StarRatingGrid,\r\n QuestionType.DragDropRanking,\r\n QuestionType.DrillDown,\r\n QuestionType.RunningTotal,\r\n QuestionType.HybridGrid,\r\n QuestionType.FileUpload,\r\n QuestionType.LookupTable,\r\n QuestionType.EmailAddressAnswer,\r\n QuestionType.RespondentEmail,\r\n QuestionType.RespondentPhone,\r\n QuestionType.TextAnswer,\r\n QuestionType.Signature,\r\n QuestionType.OpenEndAnswer,\r\n QuestionType.Carrousel,\r\n];\r\n\r\nexport function isQuestionValidatedServerSide(\r\n questionType: QuestionType,\r\n useClientValidation: boolean,\r\n): boolean {\r\n return !useClientValidation && serverSideValidatedQuestions().includes(questionType);\r\n}\r\n\r\nexport function validationErrorConverter(\r\n navigationErrorResult: NavigationResultErrorModel[],\r\n): ValidationResultModel {\r\n return {\r\n isValid: false,\r\n errorsByVariableName: navigationErrorResult.reduce(\r\n (obj, { variableName, message, softPrompt }) => {\r\n const key = variableName.split(\"$\")[0];\r\n const varInfo = variableName.split(\"$\")[1];\r\n if (!obj[key]) obj[key] = []; // eslint-disable-line no-param-reassign\r\n obj[key].push({ message, softPrompt, varInfo });\r\n return obj;\r\n },\r\n {},\r\n ),\r\n };\r\n}\r\n\r\nexport function isValid(validationResult: ValidationResultModel): boolean {\r\n return (\r\n isEmpty(validationResult.errorsByVariableName) ||\r\n every(validationResult.errorsByVariableName, (errors) =>\r\n shouldIgnoreValidationErrors(errors),\r\n )\r\n );\r\n}\r\n\r\n// If all remaining errors are soft prompt that are already being prompted to the user\r\n// Then the page is valid\r\nexport function shouldIgnoreValidationErrors(validationErrors: ValidationErrorModel[]) {\r\n return validationErrors.every((error) => error.softPrompt && !error.isErrorNew);\r\n}\r\n\r\nexport const isVariableValidatedServerSide = (\r\n variableName: string,\r\n navigation: NavigationState,\r\n useClientValidation: boolean,\r\n) => {\r\n const currentPageServerSideValidatedQuestions = navigation.currentPage?.questions?.filter((q) =>\r\n isQuestionValidatedServerSide(q.type, useClientValidation),\r\n );\r\n return currentPageServerSideValidatedQuestions?.some((q) =>\r\n [q.name, ...q.variableNames].some((v) => v.toUpperCase() === variableName.toUpperCase()),\r\n );\r\n};\r\n","import { VariableModel } from \"../VariableModel\";\r\nimport { getSettingBoolean } from \"./settingUtilities\";\r\n\r\nexport const getDefaultChoices = (variable: VariableModel) => {\r\n return variable.choiceList.filter((c) => getSettingBoolean(c, \"Default\"));\r\n};\r\n\r\nexport const getChoice = (variable: VariableModel, choiceCode: string) => {\r\n return variable.choiceList.find(\r\n (c) => (c.value || \"\").toLowerCase() === (choiceCode || \"\").toLowerCase(),\r\n );\r\n};\r\n","export enum RecallType {\r\n Code,\r\n Text,\r\n}\r\n","import { RecallType } from \"./RecallType\";\r\n\r\nexport abstract class RecalledValue {\r\n abstract evaluateProperty(\r\n mode: RecallType,\r\n property: string,\r\n parameters: string[],\r\n ): string | RecalledValue;\r\n abstract toCode(): string;\r\n abstract toText(): string;\r\n\r\n toString(mode: RecallType) {\r\n return mode === RecallType.Code ? this.toCode() : this.toText();\r\n }\r\n}\r\n","import { RecalledValue } from \"./RecalledValue\";\r\nimport { RecallType } from \"./RecallType\";\r\nimport { MentionModel } from \"../models/MentionModel\";\r\nimport { QuestionModel } from \"../models/QuestionModel\";\r\nimport { ChoiceModel } from \"../models/ChoiceModel\";\r\nimport { QuestionnaireModel } from \"../models/QuestionnaireModel\";\r\nimport { translate } from \"../models/utilities/translationUtilities\";\r\n\r\nexport class ChoiceRecalledValue extends RecalledValue {\r\n choice: ChoiceModel;\r\n language: string;\r\n questionnaire: QuestionnaireModel;\r\n question: QuestionModel;\r\n mention: MentionModel;\r\n\r\n constructor(\r\n question: QuestionModel,\r\n language: string,\r\n questionnaire: QuestionnaireModel,\r\n choice: ChoiceModel,\r\n mention: MentionModel,\r\n ) {\r\n super();\r\n this.question = question;\r\n this.language = language;\r\n this.questionnaire = questionnaire;\r\n this.choice = choice;\r\n this.mention = mention;\r\n }\r\n\r\n evaluateProperty(\r\n mode: RecallType,\r\n property: string,\r\n parameters: string[],\r\n ): string | RecalledValue {\r\n switch (property) {\r\n case \"openend\":\r\n return this.mention != null ? this.mention.openEnd : \"\";\r\n case \"code\":\r\n return this.toCode();\r\n case \"text\":\r\n return this.toText();\r\n case \"image\":\r\n return this.toImage();\r\n }\r\n return this;\r\n }\r\n\r\n toImage(): string {\r\n return `<img src=\"${translate(this.choice, \"ImageUrl\", this.language)}\" />`;\r\n }\r\n\r\n toCode(mentionId = 0): string {\r\n return this.choice.value;\r\n }\r\n\r\n toText(): string {\r\n if (this.choice) return translate(this.choice, \"TEXT\", this.language);\r\n }\r\n}\r\n","import { RecalledValue } from \"./RecalledValue\";\r\nimport { RecallType } from \"./RecallType\";\r\nimport { MentionModel } from \"../models/MentionModel\";\r\nimport { isNullOrEmpty, isNullOrNaN } from \"../utils\";\r\nimport { QuestionType, isImage } from \"../models/enums/QuestionType\";\r\nimport { QuestionModel } from \"../models/QuestionModel\";\r\nimport { ChoiceRecalledValue } from \"./ChoiceRecalledValue\";\r\nimport { VariableModel } from \"../models/VariableModel\";\r\nimport { QuestionnaireModel } from \"../models/QuestionnaireModel\";\r\nimport {\r\n getVariableWithName,\r\n getQuestionWithVariable,\r\n} from \"../models/utilities/questionnaireUtilities\";\r\nimport { translate } from \"../models/utilities/translationUtilities\";\r\nimport { getNumeral, formatNumeric } from \"../utils/Number\";\r\nimport { getSettingNumber } from \"../models/utilities/settingUtilities\";\r\nimport { shouldAutoFormat } from \"../models/utilities/questionUtilities\";\r\nimport { getChoice } from \"../models/utilities/variableUtilities\";\r\n\r\nexport class AnswerRecalledValue extends RecalledValue {\r\n mentions: MentionModel[];\r\n language: string;\r\n questionnaire: QuestionnaireModel;\r\n question: QuestionModel;\r\n variable: VariableModel;\r\n\r\n constructor(\r\n mentions: MentionModel[],\r\n language: string,\r\n questionnaire: QuestionnaireModel,\r\n variableName: string,\r\n ) {\r\n super();\r\n this.mentions = mentions;\r\n this.language = language;\r\n this.questionnaire = questionnaire;\r\n this.question = getQuestionWithVariable(questionnaire, variableName);\r\n this.variable = getVariableWithName(questionnaire, variableName);\r\n }\r\n\r\n evaluateProperty(\r\n mode: RecallType,\r\n property: string,\r\n parameters: string[],\r\n ): string | RecalledValue {\r\n switch (property) {\r\n case \"image\":\r\n if (this.question != null && isImage(this.question.type)) return this.toImage();\r\n return \"\";\r\n case \"answer\":\r\n case \"answers\": {\r\n if (parameters != null && parameters.length > 0) {\r\n const mention = this.mentions[Number.parseInt(parameters[0], 10) - 1];\r\n this.mentions = [mention];\r\n }\r\n return this;\r\n }\r\n case \"choice\":\r\n case \"choices\":\r\n if (parameters.length > 0 && this.variable && this.variable.choiceList) {\r\n const choice = getChoice(this.variable, parameters[0]);\r\n if (choice)\r\n return new ChoiceRecalledValue(\r\n this.question,\r\n this.language,\r\n this.questionnaire,\r\n choice,\r\n this.mentions.find((m) => m.value === choice.value),\r\n );\r\n }\r\n return \"\";\r\n case \"choicebyindex\":\r\n {\r\n let cIndex;\r\n if (\r\n parameters.length > 0 &&\r\n this.variable &&\r\n this.variable.choiceList &&\r\n !isNaN((cIndex = Number(parameters[0]))) &&\r\n cIndex > 0 &&\r\n this.variable.choiceList.length >= cIndex\r\n ) {\r\n const choice = this.variable.choiceList[cIndex - 1];\r\n return translate(choice, \"TEXT\", this.language);\r\n }\r\n }\r\n break;\r\n case \"count\":\r\n return this.mentions.length.toString();\r\n case \"openend\": {\r\n const mention = this.mentions.find((m) => !isNullOrEmpty(m.openEnd));\r\n if (mention != null) return mention.openEnd;\r\n return \"\";\r\n }\r\n case \"code\":\r\n return this.toCode();\r\n case \"text\":\r\n return this.toText();\r\n case \"textlabel\":\r\n if (this.question?.translatedTexts?.text) {\r\n return translate(this.question, \"TEXT\", this.language);\r\n }\r\n default:\r\n return this;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n toImage(): string {\r\n const mention = this.mentions[0];\r\n if (mention == null) return \"\";\r\n if (this.question == null) return mention.value;\r\n const answer = getChoice(this.variable, mention.value);\r\n return `<img src=\"${translate(answer, \"ImageUrl\", this.language)}\" />`;\r\n }\r\n\r\n toCode(mentionId = 0): string {\r\n const mention = this.mentions[mentionId];\r\n return mention === undefined || isNullOrEmpty(mention.value) ? \"0\" : mention.value;\r\n }\r\n\r\n toText(): string {\r\n const { question, mentions, variable } = this;\r\n const mention = mentions[0];\r\n if (!mention) return \"\";\r\n if (question && question.type === QuestionType.OpenEndAnswer) {\r\n const openEndMention = mentions.find((m) => m.openEnd !== undefined);\r\n if (openEndMention) return openEndMention.openEnd;\r\n }\r\n if (!isNullOrEmpty(mention.value)) {\r\n if (\r\n variable &&\r\n ![\r\n QuestionType.Carrousel,\r\n QuestionType.DrillDown,\r\n QuestionType.CardSort,\r\n QuestionType.ImageAreaEvaluator,\r\n QuestionType.HeatMap,\r\n QuestionType.TextHighlighter,\r\n ].includes(question.type)\r\n ) {\r\n const choice = getChoice(variable, mention.value);\r\n if (choice) return translate(choice, \"TEXT\", this.language);\r\n }\r\n if (question && question.type === QuestionType.NumericAnswer) {\r\n const num = getNumeral(mention.value).value();\r\n if (!isNullOrNaN(num))\r\n return formatNumeric(\r\n num,\r\n getSettingNumber(question, \"NumberOfDecimals\"),\r\n this.language,\r\n false,\r\n shouldAutoFormat(question),\r\n );\r\n }\r\n }\r\n return mention.value;\r\n }\r\n}\r\n","import { RecalledValue } from \"./RecalledValue\";\r\nimport { RecallType } from \"./RecallType\";\r\nimport { VariablesState } from \"../models/states/VariablesState\";\r\n\r\nexport class SystemRecalledValue extends RecalledValue {\r\n variableName: string;\r\n variables: VariablesState;\r\n\r\n constructor(variableName: string, variables: VariablesState) {\r\n super();\r\n this.variableName = variableName;\r\n this.variables = variables;\r\n }\r\n\r\n evaluateProperty(\r\n mode: RecallType,\r\n property: string,\r\n parameters: string[],\r\n ): string | RecalledValue {\r\n switch (property) {\r\n case \"code\":\r\n return this.toCode();\r\n case \"text\":\r\n return this.toText();\r\n }\r\n return this;\r\n }\r\n\r\n toCode(): string {\r\n const variable = this.variables.system[this.variableName];\r\n return variable === undefined ? \"0\" : variable.code;\r\n }\r\n\r\n toText(): string {\r\n const variable = this.variables.system[this.variableName];\r\n return variable === undefined ? \"\" : variable.text;\r\n }\r\n}\r\n","import { DateTime } from \"luxon\";\r\nimport { first } from \"../utils/lodash\";\r\nimport { RecalledValue } from \"./RecalledValue\";\r\nimport { RecallType } from \"./RecallType\";\r\nimport { cDateFormatToLuxon, EPOCH } from \"../utils/time\";\r\nimport { RespondentModel } from \"../models/RespondentModel\";\r\n\r\nexport class DateRecalledValue extends RecalledValue {\r\n time: DateTime;\r\n respondent: RespondentModel;\r\n\r\n constructor(time: DateTime) {\r\n super();\r\n this.time = time;\r\n }\r\n\r\n evaluateProperty(\r\n mode: RecallType,\r\n property: string,\r\n parameters: string[],\r\n ): string | RecalledValue {\r\n switch (property) {\r\n case \"code\":\r\n return this.toCode();\r\n case \"text\":\r\n return this.toText();\r\n case \"year\":\r\n if (this.time == null) return \"\";\r\n return this.time.year.toString();\r\n case \"month\":\r\n if (this.time == null) return \"\";\r\n return this.time.toFormat(\"MMMM\");\r\n case \"day\":\r\n if (this.time == null) return \"\";\r\n return this.time.day.toString();\r\n case \"value\":\r\n if (this.time == null) return \"\";\r\n return this.time.toFormat(\"D\");\r\n case \"format\":\r\n if (this.time == null) return \"\";\r\n let format: any = parameters;\r\n while (Array.isArray(format)) format = first(format) || \"\";\r\n return this.time.toFormat(cDateFormatToLuxon(format));\r\n case \"answer\":\r\n return this.time.toString();\r\n default:\r\n return null;\r\n }\r\n }\r\n\r\n toCode(): string {\r\n if (this.time == null) return \"\";\r\n return this.time.diff(EPOCH, \"days\").toString();\r\n }\r\n\r\n toText(): string {\r\n if (this.time == null) return \"\";\r\n return this.time.toFormat(\"DDDD\");\r\n }\r\n}\r\n","import { DateTime } from \"luxon\";\r\nimport { RecalledValue } from \"./RecalledValue\";\r\nimport { RecallType } from \"./RecallType\";\r\nimport { cDateFormatToLuxon } from \"../utils/time\";\r\n\r\nexport class TimeRecalledValue extends RecalledValue {\r\n time: DateTime;\r\n\r\n constructor(time: DateTime) {\r\n super();\r\n this.time = time;\r\n }\r\n\r\n evaluateProperty(\r\n mode: RecallType,\r\n property: string,\r\n parameters: string[],\r\n ): string | RecalledValue {\r\n if (!this.time) {\r\n return \"\";\r\n }\r\n\r\n switch (property) {\r\n case \"code\":\r\n return this.toCode();\r\n case \"text\":\r\n return this.toText();\r\n case \"hour\":\r\n return this.time.toFormat(\"H\");\r\n case \"minute\":\r\n return this.time.toFormat(\"m\");\r\n case \"second\":\r\n return this.time.toFormat(\"s\");\r\n case \"value\":\r\n return this.time.toFormat(\"tt\");\r\n case \"format\":\r\n // Flatten because time format is already given as array, but piping/index.ts nests params into an array\r\n return this.time.toFormat(cDateFormatToLuxon(parameters.flat()[0]));\r\n default:\r\n return this;\r\n }\r\n }\r\n\r\n toCode(): string {\r\n return this.time.toFormat(\"X\");\r\n }\r\n\r\n toText(): string {\r\n return this.time.toFormat(\"t\");\r\n }\r\n}\r\n","import { DateTime, Duration } from \"luxon\";\r\nimport { RecalledValue } from \"./RecalledValue\";\r\nimport { RecallType } from \"./RecallType\";\r\n\r\nexport class TimeSpanRecalledValue extends RecalledValue {\r\n startTime: DateTime;\r\n\r\n constructor(startTime: DateTime = DateTime.utc()) {\r\n super();\r\n this.startTime = startTime;\r\n }\r\n\r\n evaluateProperty(\r\n mode: RecallType,\r\n property: string,\r\n parameters: string[],\r\n ): string | RecalledValue {\r\n switch (property) {\r\n case \"code\":\r\n return this.toCode();\r\n case \"text\":\r\n return this.toText();\r\n case \"hours\":\r\n case \"hour\":\r\n return this.getDuration().hours.toString();\r\n case \"minutes\":\r\n case \"minute\":\r\n return this.getDuration().minutes.toString();\r\n case \"seconds\":\r\n case \"second\":\r\n return this.getDuration().seconds.toString();\r\n default:\r\n return this;\r\n }\r\n }\r\n\r\n private getDuration(): Duration {\r\n const now = DateTime.utc();\r\n const duration = now.diff(this.startTime);\r\n return duration;\r\n }\r\n\r\n toCode(): string {\r\n return this.getDuration().seconds.toFixed(0);\r\n }\r\n\r\n toText(): string {\r\n const duration = this.getDuration();\r\n const { hours } = duration;\r\n const minutes = duration.minutes.toString().padStart(2, \"0\");\r\n const seconds = duration.seconds.toString().padStart(2, \"0\");\r\n return `${hours}:${minutes}:${seconds}`;\r\n }\r\n}\r\n","import { DateTime } from \"luxon\";\r\nimport { RecalledValue } from \"./RecalledValue\";\r\nimport { RecallType } from \"./RecallType\";\r\nimport { cDateFormatToLuxon, EPOCH } from \"../utils/time\";\r\n\r\nexport class DateTimeRecalledValue extends RecalledValue {\r\n time: DateTime;\r\n\r\n constructor(date: DateTime) {\r\n super();\r\n this.time = date;\r\n }\r\n\r\n evaluateProperty(\r\n mode: RecallType,\r\n property: string,\r\n parameters: string[],\r\n ): string | RecalledValue {\r\n switch (property) {\r\n case \"code\":\r\n return this.toCode();\r\n case \"text\":\r\n return this.toText();\r\n case \"year\":\r\n if (this.time == null) return \"\";\r\n return this.time.toFormat(\"y\");\r\n case \"month\":\r\n if (this.time == null) return \"\";\r\n return this.time.toFormat(\"MMMM\");\r\n case \"day\":\r\n if (this.time == null) return \"\";\r\n return this.time.day.toString();\r\n case \"hour\":\r\n if (this.time == null) return \"\";\r\n return this.time.toFormat(\"H\");\r\n case \"minute\":\r\n if (this.time == null) return \"\";\r\n return this.time.toFormat(\"m\");\r\n case \"second\":\r\n if (this.time == null) return \"\";\r\n return this.time.toFormat(\"s\");\r\n case \"value\":\r\n if (this.time == null) return \"\";\r\n return this.time.toFormat(\"FFF\");\r\n case \"format\":\r\n if (this.time == null) return \"\";\r\n return this.time.toFormat(cDateFormatToLuxon(parameters[0]));\r\n case \"answer\":\r\n return this.time.toString();\r\n default:\r\n return this;\r\n }\r\n }\r\n\r\n toCode(): string {\r\n if (this.time == null) return \"\";\r\n return this.time.diff(EPOCH, \"seconds\").toString();\r\n }\r\n\r\n toText(): string {\r\n if (this.time == null) return \"\";\r\n return this.time.toFormat(\"FFF\");\r\n }\r\n}\r\n","import { DateTime } from \"luxon\";\r\nimport { RecalledValue } from \"./RecalledValue\";\r\nimport { RecallType } from \"./RecallType\";\r\n\r\nexport class DayRecalledValue extends RecalledValue {\r\n time: DateTime;\r\n\r\n constructor(time: DateTime) {\r\n super();\r\n this.time = time;\r\n }\r\n\r\n evaluateProperty(\r\n mode: RecallType,\r\n property: string,\r\n parameters: string[],\r\n ): string | RecalledValue {\r\n switch (property) {\r\n case \"code\":\r\n return this.toCode();\r\n case \"text\":\r\n return this.toText();\r\n default:\r\n return this;\r\n }\r\n }\r\n\r\n toCode(): string {\r\n if (this.time == null) return \"\";\r\n return this.time.day.toString();\r\n }\r\n\r\n toText(): string {\r\n if (this.time == null) return \"\";\r\n return this.time.toFormat(\"ccccc\");\r\n }\r\n}\r\n","import XRegExp from \"xregexp\";\r\nimport { DateTime, Settings } from \"luxon\";\r\nimport { isEmpty, some, memoize, toUpper, uniq, map } from \"../utils/lodash\";\r\nimport { AnswerRecalledValue } from \"./AnswerRecalledValue\";\r\nimport { RecallType } from \"./RecallType\";\r\nimport { RecalledValue } from \"./RecalledValue\";\r\nimport { SystemRecalledValue } from \"./SystemRecalledValue\";\r\nimport { DateRecalledValue } from \"./DateRecalledValue\";\r\nimport { TimeRecalledValue } from \"./TimeRecalledValue\";\r\nimport { TimeSpanRecalledValue } from \"./TimeSpanRecalledValue\";\r\nimport { VariablesState } from \"../models/states/VariablesState\";\r\nimport { InterviewState } from \"../models/states/InterviewState\";\r\nimport { Log } from \"../utils/logging\";\r\nimport { QuestionType } from \"../models/enums/QuestionType\";\r\nimport { getSettingBoolean, getSettingString } from \"../models/utilities/settingUtilities\";\r\nimport { DateTimeRecalledValue } from \"./DateTimeRecalledValue\";\r\nimport { RespondentModel } from \"../models/RespondentModel\";\r\nimport { isNullOrEmpty } from \"../utils\";\r\nimport { getVariableRow } from \"../redux/reducers/interview/navigationUtilities\";\r\nimport { NavigationState } from \"../models/states/NavigationState\";\r\nimport {\r\n getQuestionWithVariable,\r\n getVariableWithName,\r\n} from \"../models/utilities/questionnaireUtilities\";\r\nimport { QuestionnaireModel } from \"../models/QuestionnaireModel\";\r\nimport { dateFormat } from \"../models/utilities/questionUtilities\";\r\nimport { cDateFormatToLuxon } from \"../utils/time\";\r\nimport { getMentions } from \"../redux/reducers/interview/variablesUtilities\";\r\nimport { DayRecalledValue } from \"./DayRecalledValue\";\r\nimport { getCoordinates } from \"../models/utilities/respondentUtilities\";\r\n\r\nconst TAG = \"piping\";\r\n\r\nconst QUESTION_VARIABLE_NAME_REGEX_VALUE = \"(?<name>[a-z0-9_]+)\";\r\nconst SYSTEM_VARIABLE_NAME_REGEX_VALUE = \"(?<name>\\\\$[a-z0-9]+)\";\r\n\r\nconst MENTION_REGEX_VALUE = \"(\\\\(|%28)(?<mention>[a-z0-9-]+)(\\\\)|%29)\";\r\nconst MATRIX_REGEX_VALUE = \"(\\\\.Row)(\\\\(|%28)(?<matrix>[a-z0-9\\\\-]+)(\\\\)|%29)\";\r\nconst FORMAT_REGEX_VALUE = \"(\\\\.Format)(\\\\(|%28)(?<format>[a-zA-Z \\\\,\\\\:\\\\-\\\\/]+)(\\\\)|%29)\";\r\n\r\nconst VARIABLE_PROPERTY = \"\\\\.(?<property>[a-z]+)((\\\\(|%28)(?<param>[a-z0-9/:\\\\-]+)(\\\\)|%29))?\";\r\n\r\nconst QUESTION_VARIABLE = XRegExp(\r\n `\\\\[${QUESTION_VARIABLE_NAME_REGEX_VALUE}(${MATRIX_REGEX_VALUE})?(${FORMAT_REGEX_VALUE})?(${MENTION_REGEX_VALUE})?(?<properties>(${VARIABLE_PROPERTY})*)\\\\]`,\r\n \"in\",\r\n);\r\nconst SYSTEM_VARIABLE = XRegExp(\r\n `\\\\[${SYSTEM_VARIABLE_NAME_REGEX_VALUE}(${FORMAT_REGEX_VALUE})?(?<properties>(${VARIABLE_PROPERTY})*)\\\\]`,\r\n \"in\",\r\n);\r\n\r\nexport class Piping {\r\n private static getProperties(match: any) {\r\n const matches: any[] = [];\r\n XRegExp.forEach(match.properties, XRegExp(VARIABLE_PROPERTY, \"gi\"), (match) =>\r\n matches.push(match),\r\n );\r\n if (match.mention != null) matches.unshift({ property: \"answer\", param: [match.mention] });\r\n if (match.format != null) matches.unshift({ property: \"format\", param: [match.format] });\r\n if (matches.length === 0) matches.unshift({ property: \"answer\" });\r\n return matches;\r\n }\r\n\r\n private static getDefaultValue(match: any, mode: RecallType) {\r\n if (!isNullOrEmpty(match.property))\r\n return match.property.toLowerCase() === \"code\" ? \"0\" : \"\";\r\n return mode === RecallType.Code ? \"0\" : \"\";\r\n }\r\n\r\n private static recallSystemMatch(\r\n match: any,\r\n variables: VariablesState,\r\n respondent?: RespondentModel,\r\n ): string | RecalledValue {\r\n let variableName = match.name.toUpperCase();\r\n if (!variableName.startsWith(\"$\")) variableName = `$${variableName}`;\r\n Settings.defaultLocale = respondent.language;\r\n const t = DateTime.utc();\r\n const tz = DateTime.local();\r\n switch (variableName) {\r\n case \"$D\":\r\n return new DateRecalledValue(tz);\r\n case \"$H\":\r\n return new TimeRecalledValue(tz);\r\n case \"$UTCDATE\":\r\n return new DateRecalledValue(t);\r\n case \"$UTCTIME\":\r\n return new TimeRecalledValue(t);\r\n case \"$T\":\r\n return new TimeSpanRecalledValue(respondent?.sessionStartTime);\r\n case \"$J\":\r\n return new DayRecalledValue(tz);\r\n case \"$R\":\r\n return respondent && respondent.dispositionCode\r\n ? String(respondent.dispositionCode)\r\n : \"\";\r\n case \"$PHONE\":\r\n return respondent ? respondent.phone || \"\" : \"\";\r\n case \"$EMAIL\":\r\n return respondent ? respondent.email || \"\" : \"\";\r\n case \"$GEOLOCATION\":\r\n return getCoordinates(respondent);\r\n default:\r\n return new SystemRecalledValue(variableName, variables);\r\n }\r\n }\r\n\r\n private static recallQuestionMatch(\r\n match: any,\r\n variables: VariablesState,\r\n navigation: NavigationState,\r\n questionnaire: QuestionnaireModel,\r\n respondent?: RespondentModel,\r\n language?: string,\r\n mode?: RecallType,\r\n ): string | RecalledValue {\r\n const variableName = match.name.toUpperCase();\r\n if (mode === RecallType.Text && isEmpty(getVariableWithName(questionnaire, variableName)))\r\n return match.toString();\r\n const matrixIndex =\r\n match.matrix === undefined\r\n ? getVariableRow(navigation, questionnaire, variableName)\r\n : Number(match.matrix);\r\n const mentionIndex = !match.mention ? 0 : Number(match.mention) - 1;\r\n // Get mentions from state.\r\n const mentions = getMentions(variables, variableName, matrixIndex);\r\n if (mentions === undefined || mentionIndex >= mentions.length || mentionIndex < 0)\r\n return null;\r\n // Check if the question is a date.\r\n const question = getQuestionWithVariable(questionnaire, variableName);\r\n\r\n if (question != null && mentions.length > 0) {\r\n switch (question.type) {\r\n case QuestionType.DateTimeAnswer: {\r\n Settings.defaultLocale = respondent.language;\r\n // If value is an integer, then it has already been evaluated.\r\n if (/^-?\\d+$/.test(mentions[0].value)) {\r\n return mentions[0].value;\r\n }\r\n if (getSettingBoolean(question, \"Type\", \"DateTime\"))\r\n return new DateTimeRecalledValue(\r\n DateTime.fromFormat(mentions[0].value, dateFormat(question)),\r\n );\r\n if (getSettingBoolean(question, \"Type\", \"Time\")) {\r\n const timeFormat = getSettingString(question, \"TimeFormat\", \"HH:mm\");\r\n return new TimeRecalledValue(\r\n DateTime.fromFormat(mentions[0].value, cDateFormatToLuxon(timeFormat)),\r\n );\r\n }\r\n return new DateRecalledValue(\r\n DateTime.fromFormat(mentions[0].value, dateFormat(question)),\r\n );\r\n }\r\n case QuestionType.FileUpload: {\r\n const file = JSON.parse(mentions[0].value);\r\n return file ? file.fileName : \"\";\r\n }\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n return new AnswerRecalledValue(\r\n mentions,\r\n respondent.language || language,\r\n questionnaire,\r\n variableName,\r\n );\r\n }\r\n\r\n private static evaluateRecalledValue(\r\n match: any,\r\n recall: () => string | RecalledValue,\r\n mode: RecallType = RecallType.Code,\r\n ): string {\r\n try {\r\n let value: string | RecalledValue = recall();\r\n // If mention does not exist, an empty string is returned in text mode (0 in code mode)\r\n if (!value) return this.getDefaultValue(match, mode);\r\n const properties = this.getProperties(match);\r\n if (some(properties, (p) => p.property.toLowerCase() === \"text\"))\r\n mode = RecallType.Text;\r\n while (value instanceof RecalledValue) {\r\n // Evaluate all properties until a string is returned.\r\n if (properties.length > 0) {\r\n const property = properties.shift();\r\n const params = property.param !== undefined ? [property.param] : undefined;\r\n value = value.evaluateProperty(mode, property.property.toLowerCase(), params);\r\n continue;\r\n }\r\n // If the value is still recalled, evaluate it to a string.\r\n value = value.toString(mode);\r\n }\r\n return value === undefined ? \"\" : value;\r\n } catch (ex) {\r\n Log.e(TAG, \"RECALL_ERROR\", `An error occurred while evaluating \"${match}\"`, ex);\r\n return \"\";\r\n }\r\n }\r\n\r\n static identifyVariables = memoize((value: string) => {\r\n const variables: string[] = [];\r\n value = XRegExp.replace(\r\n value,\r\n SYSTEM_VARIABLE,\r\n (match: any) => {\r\n variables.push(match.name);\r\n return match.name;\r\n },\r\n \"all\",\r\n );\r\n value = XRegExp.replace(\r\n value,\r\n QUESTION_VARIABLE,\r\n (match: any) => {\r\n variables.push(match.name);\r\n return match.name;\r\n },\r\n \"all\",\r\n );\r\n const uniqueVariables = uniq(variables);\r\n return map(uniqueVariables, toUpper);\r\n });\r\n\r\n static evaluateVariable(\r\n interview: InterviewState,\r\n name: string,\r\n mode: RecallType = RecallType.Code,\r\n ): string {\r\n const match = { name };\r\n return this.evaluateRecalledValue(\r\n match,\r\n () =>\r\n this.recallQuestionMatch(\r\n match,\r\n interview.variables,\r\n interview.navigation,\r\n interview.questionnaire,\r\n interview.respondent,\r\n interview.language,\r\n mode,\r\n ),\r\n mode,\r\n );\r\n }\r\n\r\n static evaluateRecalls(\r\n interview: InterviewState,\r\n value: string,\r\n mode: RecallType = RecallType.Code,\r\n ): string {\r\n if (value === null || value === undefined) return value;\r\n value = XRegExp.replace(\r\n value,\r\n SYSTEM_VARIABLE,\r\n (match: any) =>\r\n this.evaluateRecalledValue(\r\n match,\r\n () => this.recallSystemMatch(match, interview.variables, interview.respondent),\r\n mode,\r\n ),\r\n \"all\",\r\n );\r\n value = XRegExp.replace(\r\n value,\r\n QUESTION_VARIABLE,\r\n (match: any) =>\r\n this.evaluateRecalledValue(\r\n match,\r\n () =>\r\n this.recallQuestionMatch(\r\n match,\r\n interview.variables,\r\n interview.navigation,\r\n interview.questionnaire,\r\n interview.respondent,\r\n interview.language,\r\n mode,\r\n ),\r\n mode,\r\n ),\r\n \"all\",\r\n );\r\n return value;\r\n }\r\n}\r\n","import { VoxcoEventTypes, VoxcoEvent } from \"./events\";\r\nimport { StoreState } from \"../models/states/StoreState\";\r\nimport { __evaluateSafe__ } from \"../expressions/parser\";\r\nimport { Log } from \"../utils/logging\";\r\nimport { ValidationOptionsModel } from \"../models/ValidationOptionsModel\";\r\nimport { MentionBuilderDelegate } from \"../models/builders/MentionBuilder\";\r\nimport { DispositionCode } from \"../models/enums/DispositionCode\";\r\nimport { Piping } from \"../piping\";\r\nimport * as ACTIONS from \"../redux/actions\";\r\nimport { createRespondent } from \"../models/factories/respondentFactory\";\r\nimport { createQuestionnaire, createTheme } from \"../models/factories/questionnaireFactory\";\r\nimport { ThemeModel } from \"../models/ThemeModel\";\r\nimport { DispatchType, StoreType } from \"../redux/actions/types\";\r\nimport { BranchToOptions } from \"../models/BranchToOptions\";\r\nimport { convertToSurveyMode } from \"../models/enums/SurveyMode\";\r\nimport { getRandomInt } from \"../randomization/Randomizer\";\r\nimport { applyCSS, generateCSS } from \"../utils/dynamic-css/coreDynamicCss\";\r\nimport { addVoxcoAgentListener } from \"../utils/voxcoAgentHelper\";\r\n\r\n/** @hidden */\r\nexport type VoxcoEventListener<E extends VoxcoEvent> = (this: PublicApi, ev: E) => void;\r\n\r\n/** @hidden */\r\nexport interface VoxcoEventListeners {\r\n [event: string]: VoxcoEventListener<any>[];\r\n}\r\n\r\n/** @hidden */\r\nexport interface VoxcoConfig {\r\n debug: boolean;\r\n mode: \"test\" | \"preview\" | \"normal\" | \"simulation\";\r\n displayInThemeEditor: boolean;\r\n messages: boolean;\r\n mobileMode: boolean;\r\n apiUrl?: string;\r\n survey?: any;\r\n containerHost?: string;\r\n previewQuestionId?: number;\r\n hideAccessibilityPanel: boolean;\r\n}\r\n\r\nconst tricklingListeners: VoxcoEventListeners = {};\r\nconst capturingListeners: VoxcoEventListeners = {};\r\n\r\nconst configDefaults: VoxcoConfig = {\r\n debug: false,\r\n mode: \"normal\",\r\n messages: false,\r\n mobileMode: false,\r\n displayInThemeEditor: false,\r\n hideAccessibilityPanel: false,\r\n};\r\n\r\nconst simulatedRespondent = createRespondent({\r\n respondentId: 0,\r\n simulated: true,\r\n isNew: true,\r\n seed: getRandomInt(),\r\n sessionStartTime: 0,\r\n offlineUserId: 0,\r\n offlineUserName: \"\",\r\n});\r\n\r\nconst simulatedDevice = {\r\n model: \"simulated\",\r\n browser: \"simulated\",\r\n os: \"simulated\",\r\n version: \"simulated\",\r\n type: \"simulated\",\r\n};\r\n\r\nfunction getListeners<K extends keyof VoxcoEventTypes>(\r\n event: K,\r\n capture?: boolean,\r\n): VoxcoEventListener<any>[] {\r\n const listeners = capture ? capturingListeners : tricklingListeners;\r\n if (!listeners[event]) {\r\n listeners[event] = [];\r\n }\r\n return listeners[event];\r\n}\r\n\r\nfunction createVoxcoEvent(store: StoreType, e: VoxcoEvent): VoxcoEvent {\r\n const result = {\r\n ...e,\r\n interview: store.getState().interview,\r\n defaultPrevented: false,\r\n stoppedPropagation: false,\r\n stoppedImmediatePropagation: false,\r\n };\r\n result.preventDefault = () => {\r\n result.defaultPrevented = true;\r\n };\r\n result.stopPropagation = () => {\r\n result.stoppedPropagation = true;\r\n };\r\n result.stopImmediatePropagation = () => {\r\n result.stoppedImmediatePropagation = true;\r\n };\r\n return result;\r\n}\r\n\r\nexport class PublicApi {\r\n /** @hidden */\r\n static TAG = \"publicApi\";\r\n\r\n /** @hidden */\r\n version = require(\"../../package.json\").version;\r\n /** @hidden */\r\n lib = process.env.LIB_NAME;\r\n /** @hidden */\r\n store: StoreType = undefined;\r\n /** @hidden */\r\n dispatch: DispatchType = undefined;\r\n\r\n /** @hidden */\r\n // eslint-disable-next-line no-useless-constructor, @typescript-eslint/no-empty-function\r\n constructor() {}\r\n\r\n /** @hidden */\r\n async init(config: VoxcoConfig = configDefaults) {\r\n const {\r\n mode,\r\n debug,\r\n messages,\r\n apiUrl,\r\n survey,\r\n containerHost,\r\n previewQuestionId,\r\n hideAccessibilityPanel,\r\n } = config;\r\n this.dispatch(ACTIONS.setPageMessagesEnabled(messages));\r\n if (debug) {\r\n this.dispatch(ACTIONS.debugEnabled());\r\n }\r\n\r\n this.dispatch(ACTIONS.setHideAccessibilityPanel(hideAccessibilityPanel));\r\n this.dispatch(ACTIONS.setSurveyMode(convertToSurveyMode(mode)));\r\n\r\n // Convert the displayInThemeEditor flag to boolean before setting it\r\n // This is because the parameter sent from the backend would always get stored as string\r\n const displayInThemeEditor =\r\n config.displayInThemeEditor &&\r\n config.displayInThemeEditor.toString().toLowerCase() === \"true\";\r\n this.dispatch(ACTIONS.setDisplayInThemeEditor(displayInThemeEditor));\r\n\r\n if (apiUrl !== undefined) {\r\n this.dispatch(ACTIONS.connectionStart(apiUrl));\r\n } else if (survey !== undefined) {\r\n this.dispatch(ACTIONS.respondentChanged(simulatedRespondent));\r\n this.dispatch(ACTIONS.deviceChanged(simulatedDevice));\r\n this.dispatch(ACTIONS.questionnaireChanged(createQuestionnaire(survey)));\r\n this.dispatch(ACTIONS.connectionConnected(\"simulated\"));\r\n }\r\n\r\n if (previewQuestionId && previewQuestionId > -1) {\r\n Voxco.once(\"pageReady\", () =>\r\n this.dispatch(ACTIONS.navigationPreviewQuestion(previewQuestionId)),\r\n );\r\n }\r\n\r\n // Alert host window when we are ready or quitting.\r\n if (containerHost && window.parent) {\r\n window.parent.postMessage({ type: \"ready\" }, containerHost);\r\n\r\n Voxco.on(\"quit\", ({ dispositionCode, options }) => {\r\n window.parent.postMessage(\r\n {\r\n type: \"quit\",\r\n dispositionCode,\r\n options,\r\n },\r\n containerHost,\r\n );\r\n });\r\n }\r\n\r\n // Listen for page messages.\r\n window.addEventListener(\"message\", (event) => {\r\n const { origin, data } = event;\r\n if (containerHost !== origin) {\r\n return;\r\n }\r\n switch (data.type) {\r\n case \"previewTheme\": {\r\n const theme = createTheme(data.theme);\r\n if (data.isDynamicCssChanged && theme.settings?.DynamicCss) {\r\n const css = generateCSS(theme.settings, theme.settings.DynamicCss);\r\n applyCSS(css);\r\n } else {\r\n this.previewTheme(theme);\r\n }\r\n break;\r\n }\r\n default:\r\n break;\r\n }\r\n });\r\n\r\n addVoxcoAgentListener();\r\n }\r\n\r\n /**\r\n * @hidden\r\n */\r\n log = (message?: any) => Log.d(PublicApi.TAG, \"LOG\", message);\r\n\r\n /**\r\n * @hidden\r\n */\r\n error = (error?: any) =>\r\n Log.e(PublicApi.TAG, \"ERROR\", \"An error has occurred in custom.js.\", error);\r\n\r\n /**\r\n * Used to attach your custom script to an event.\r\n * #### Example\r\n * ```typescript\r\n * Voxco.on(\"pageReady\", function(ev) {\r\n * alert(\"Hello world!\")\r\n * return ev;\r\n * })\r\n * ```\r\n * #### See Also\r\n * {@link off}\r\n * {@link once}\r\n * @param event See [events](../interfaces/events.VoxcoEventTypes.html).\r\n * @param listener Called on event.\r\n * @param capture\r\n */\r\n on<K extends keyof VoxcoEventTypes>(\r\n event: K,\r\n listener: VoxcoEventListener<VoxcoEventTypes[K]>,\r\n capture?: boolean,\r\n ) {\r\n const listeners = getListeners(event, capture);\r\n listeners.push(listener);\r\n if (event === \"pageReady\") {\r\n // If the page is ready, call right away.\r\n const store: StoreState = this.store.getState();\r\n if (\r\n store.interview.navigation.currentPage !== undefined &&\r\n store.interview.navigation.currentPage.isReady\r\n ) {\r\n listener.apply(this, [store.interview.navigation.currentPage]);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Used to unattach your custom script from an event.\r\n * #### Example\r\n * ```typescript\r\n * //\r\n * function listener(ev) {\r\n * alert(\"Hello world!\");\r\n * }\r\n * Voxco.on(\"pageReady\", listener);\r\n * // ...\r\n * Voxco.off(\"pageReady\", listener);\r\n * ```\r\n * #### See Also\r\n * {@link on}\r\n * {@link once}\r\n * @param event See [events](../interfaces/events.VoxcoEventTypes.html).\r\n * @param listener Script to unattach.\r\n * @param capture\r\n */\r\n off<K extends keyof VoxcoEventTypes>(\r\n event: K,\r\n listener: VoxcoEventListener<VoxcoEventTypes[K]>,\r\n capture?: boolean,\r\n ) {\r\n const listeners = getListeners(event, capture);\r\n const index = listeners.indexOf(listener);\r\n if (index > -1) listeners.splice(index, 1);\r\n }\r\n\r\n /**\r\n * Attach your custom script for to a single instance of an event.\r\n * #### Example\r\n * ```typescript\r\n * Voxco.once(\"pageReady\", function(ev) {\r\n * alert(\"Hello world!\")\r\n * return ev;\r\n * })\r\n * ```\r\n * #### See Also\r\n * {@link on}\r\n * {@link off}\r\n * @param event See [events](../interfaces/events.VoxcoEventTypes.html).\r\n * @param listener Called on event.\r\n * @param capture\r\n */\r\n once<K extends keyof VoxcoEventTypes>(\r\n event: K,\r\n listener: VoxcoEventListener<VoxcoEventTypes[K]>,\r\n capture?: boolean,\r\n ) {\r\n const api = this;\r\n let done = false;\r\n const listenerWrapper = (ev: VoxcoEventTypes[K]) => {\r\n if (done) return;\r\n done = true;\r\n const result = listener.apply(api, [ev]);\r\n this.off(event, listenerWrapper, capture);\r\n return result;\r\n };\r\n this.on(event, listenerWrapper, capture);\r\n }\r\n\r\n /**\r\n * Set a variable's value.\r\n * #### Example\r\n * ```typescript\r\n * // String mention example\r\n * Voxco.setVariableMentions(\"NewValue\", \"Q1\", 1)\r\n * // String[] mention example\r\n * Voxco.setVariableMentions([\"First mention value\", \"Second mention value\"], \"Q1\", 1)\r\n * // Mention builder example\r\n * Voxco.setVariableMentions((mentions) => mentions.clear().add(\"New value\"), \"Q1\", 1)\r\n * ```\r\n * #### See Also\r\n * None\r\n * @param mentions New variable value.\r\n * @param variableName Variable being modified.\r\n * @param matrixIndex Uses the current matrix index if not set.\r\n *\r\n */\r\n setVariableMentions = (\r\n mentions: MentionBuilderDelegate | string | string[],\r\n variableName: string,\r\n matrixIndex?: number,\r\n ) => {\r\n if (typeof mentions === \"function\")\r\n return this.trigger(\"setVariableMentions\", {\r\n builder: mentions,\r\n variableName,\r\n matrixIndex,\r\n });\r\n return this.trigger(\"setVariableMentions\", {\r\n builder: (m) => m.clear().add(mentions as any),\r\n variableName,\r\n matrixIndex,\r\n });\r\n };\r\n\r\n /** @hidden */\r\n trigger<K extends keyof VoxcoEventTypes>(event: K, data?: VoxcoEventTypes[K]): any {\r\n let evt = createVoxcoEvent(this.store, data);\r\n\r\n const capturingListeners = getListeners(event, true);\r\n for (const listener of capturingListeners) {\r\n try {\r\n evt = listener.apply(this, [evt]) || evt;\r\n } catch (ex) {\r\n this.error(ex);\r\n }\r\n if (evt.stoppedPropagation) {\r\n return evt;\r\n }\r\n if (evt.stoppedImmediatePropagation) {\r\n break;\r\n }\r\n evt = { ...evt, stoppedImmediatePropagation: false };\r\n }\r\n\r\n const listeners = [...getListeners(event)];\r\n\r\n let listener;\r\n for (let i = 0; i < listeners.length; i++) {\r\n listener = listeners[i];\r\n try {\r\n evt = listener.apply(this, [evt]) || evt;\r\n if (event === \"questionReady\") {\r\n this.off(event, listener);\r\n }\r\n } catch (ex) {\r\n this.error(ex);\r\n }\r\n if (evt.stoppedPropagation) {\r\n return evt;\r\n }\r\n if (evt.stoppedImmediatePropagation) {\r\n break;\r\n }\r\n evt = { ...evt, stoppedImmediatePropagation: false };\r\n }\r\n\r\n return evt;\r\n }\r\n\r\n /** @hidden */\r\n previewTheme(theme: ThemeModel) {\r\n this.dispatch(\r\n ACTIONS.previewTheme({\r\n ...theme,\r\n settings: {\r\n ...theme.settings,\r\n CustomJavascript: undefined,\r\n },\r\n }),\r\n );\r\n }\r\n\r\n /**\r\n * Evaluate an advanced expression.\r\n * #### Example\r\n * ```typescript\r\n * Voxco.setVariableMentions(\"1\", \"Q1\")\r\n * Voxco.evaluate(\"Q1=1\").asBoolean()\r\n * // returns true\r\n * ```\r\n * #### See Also\r\n * None\r\n * @param expression See {@link https://help.voxco.com/voxco-online-v70-en/Default.htm#voxco-online/surveys/edit/questionnaire/questionnaire-logic/advanced-expressions.htm | Advanced expression}.\r\n * @param simple Is the expression simple, otherwise advanced.\r\n * @returns The expression's value.\r\n */\r\n evaluate = (expression: string, simple?: boolean) =>\r\n __evaluateSafe__(this.store.getState().interview, expression, simple);\r\n\r\n /**\r\n * Recalls a variable using {@link https://help.voxco.com/voxco-online-v70-en/Default.htm#voxco-online/surveys/edit/questionnaire/questionnaire-logic/piping.htm | piping}.\r\n * #### Example\r\n * ```typescript\r\n * Voxco.setVariableMentions(\"1\", \"Q1\")\r\n * Voxco.recall(\"[Q1]\")\r\n * // returns \"1\"\r\n * ```\r\n * #### See Also\r\n * None\r\n * @param text Variable to recall.\r\n * @returns The variable's value\r\n */\r\n recall = (text: string) => Piping.evaluateRecalls(this.store.getState().interview, text);\r\n\r\n /** @hidden */\r\n showDebugInfo = () => this.dispatch(ACTIONS.debugInfoEnabled());\r\n\r\n /**\r\n * Validates the page.\r\n * #### Example\r\n * ```typescript\r\n * var options = new ValidationOptionsModel();\r\n * options.silent = true;\r\n * Voxco.validatePage(options);\r\n * ```\r\n * #### See Also\r\n * None\r\n * @param options Set the silent variable to hide the errors on the page.\r\n */\r\n validatePage = (options?: ValidationOptionsModel) => this.trigger(\"validatePage\", { options });\r\n\r\n /**\r\n * Move to a question.\r\n * #### Example\r\n * ```typescript\r\n * var options = new BranchToOptions();\r\n * options.destination = \"Q2\";\r\n * Voxco.branchTo(options);\r\n * ```\r\n * #### See Also\r\n * None\r\n * @param options Set the destination.\r\n */\r\n branchTo = (options?: BranchToOptions) => this.trigger(\"branchTo\", options);\r\n\r\n /**\r\n * Display a termination message.\r\n * #### Example\r\n * ```typescript\r\n * Voxco.displayMessage(\"Termination message\");\r\n * ```\r\n * #### See Also\r\n * None\r\n */\r\n displayMessage = (message: string) => this.trigger(\"displayMessage\", { message });\r\n\r\n /**\r\n * Navigates to the next page.\r\n * #### Example\r\n * ```typescript\r\n * Voxco.nextPage();\r\n * ```\r\n * #### See Also\r\n * {@link previousPage}\r\n * {@link quit}\r\n */\r\n nextPage = () => this.trigger(\"nextPage\");\r\n\r\n /**\r\n * Navigates to the previous page.\r\n * #### Example\r\n * ```typescript\r\n * Voxco.previousPage();\r\n * ```\r\n * #### See Also\r\n * {@link nextPage} {@link quit}\r\n */\r\n previousPage = () => this.trigger(\"previousPage\");\r\n\r\n /**\r\n * Quits the survey and closes the respondent session.\r\n * #### Example\r\n * ```typescript\r\n * Voxco.quit();\r\n * ```\r\n * #### See Also\r\n * {@link nextPage} {@link previousPage}\r\n */\r\n quit = (\r\n dispositionCode?: DispositionCode,\r\n options?: {\r\n message?: string;\r\n closedStrata?: boolean;\r\n redirectUrl?: string;\r\n },\r\n ) => this.trigger(\"quit\", { dispositionCode, options });\r\n\r\n /**\r\n * #### See Also\r\n * {@link on}\r\n */\r\n onPageReady = (listener: VoxcoEventListener<VoxcoEventTypes[\"pageReady\"]>) =>\r\n this.on(\"pageReady\", listener);\r\n\r\n /**\r\n * #### See Also\r\n * {@link on}\r\n */\r\n onQuestionReady = (listener: VoxcoEventListener<VoxcoEventTypes[\"questionReady\"]>) => {\r\n this.on(\"questionReady\", listener);\r\n };\r\n\r\n /**\r\n * #### See Also\r\n * {@link on}\r\n */\r\n onValidatePage = (listener: VoxcoEventListener<VoxcoEventTypes[\"validatePage\"]>) =>\r\n this.on(\"validatePage\", listener);\r\n\r\n /**\r\n * #### See Also\r\n * {@link on}\r\n */\r\n onSetVariableMentions = (\r\n listener: VoxcoEventListener<VoxcoEventTypes[\"setVariableMentions\"]>,\r\n ) => this.on(\"setVariableMentions\", listener);\r\n\r\n /**\r\n * #### See Also\r\n * {@link on}\r\n */\r\n onBranchTo = (listener: VoxcoEventListener<VoxcoEventTypes[\"branchTo\"]>) =>\r\n this.on(\"branchTo\", listener);\r\n\r\n /**\r\n * #### See Also\r\n * {@link on}\r\n */\r\n onNextPage = (listener: VoxcoEventListener<VoxcoEventTypes[\"nextPage\"]>) =>\r\n this.on(\"nextPage\", listener);\r\n\r\n /**\r\n * #### See Also\r\n * {@link on}\r\n */\r\n onPreviousPage = (listener: VoxcoEventListener<VoxcoEventTypes[\"previousPage\"]>) =>\r\n this.on(\"previousPage\", listener);\r\n\r\n /**\r\n * #### See Also\r\n * {@link on}\r\n */\r\n onQuit = (listener: VoxcoEventListener<VoxcoEventTypes[\"quit\"]>) => this.on(\"quit\", listener);\r\n\r\n /**\r\n * Set the respondent's appointment date.\r\n * #### Example\r\n * ```typescript\r\n * var nextDate = new Date();\r\n * nextDate.setDate(nextDate.getDate() + 1);\r\n * Voxco.setAppointment(nextDate);\r\n * ```\r\n * #### See Also\r\n * {@link setEmail} {@link setPhone} {@link setTimeZone} {@link setLoopRow}\r\n */\r\n setAppointment = (appointment: Date) => this.trigger(\"setAppointment\", { appointment });\r\n\r\n /**\r\n * Set the respondent's email.\r\n * #### Example\r\n * ```typescript\r\n * Voxco.setEmail(\"test@abc.com\");\r\n * ```\r\n * #### See Also\r\n * {@link setAppointment} {@link setPhone} {@link setTimeZone} {@link setLoopRow}\r\n */\r\n setEmail = (email: string) => this.trigger(\"setEmail\", { email });\r\n\r\n /**\r\n * Set the respondent's phone number.\r\n * #### Example\r\n * ```typescript\r\n * Voxco.setPhone(\"5555551234\");\r\n * ```\r\n * #### See Also\r\n * {@link setAppointment} {@link setEmail} {@link setTimeZone} {@link setLoopRow}\r\n */\r\n setPhone = (phone: string) => this.trigger(\"setPhone\", { phone });\r\n\r\n /**\r\n * Set the respondent's time zone.\r\n * #### Example\r\n * ```typescript\r\n * Voxco.setTimeZone(\"1\");\r\n * ```\r\n * #### See Also\r\n * {@link setAppointment} {@link setEmail} {@link setPhone} {@link setLoopRow}\r\n * @param timeZone UTC time.\r\n */\r\n setTimeZone = (timeZone: string) => this.trigger(\"setTimeZone\", { timeZone });\r\n\r\n /**\r\n * Set the current matrix index for the given block.\r\n * #### Example\r\n * ```typescript\r\n * Voxco.setLoopRow(\"block1\", 2);\r\n * ```\r\n * #### See Also\r\n * {@link setAppointment} {@link setEmail} {@link setPhone} {@link setTimeZone}\r\n * @param blockName\r\n * @param row Matrix index.\r\n */\r\n setLoopRow = (blockName: string, row: number) => this.trigger(\"setLoopRow\", { blockName, row });\r\n}\r\n\r\n/** Exposed API used by your custom script */\r\nexport const Voxco = new PublicApi();\r\n","import { findIndex, sortBy, reverse, filter, map, chunk, flatten } from \"../utils/lodash\";\r\nimport { RandomizationModel } from \"../models/RandomizationModel\";\r\nimport { ChoiceModel } from \"../models/ChoiceModel\";\r\nimport { RandomizationPattern } from \"../models/enums/RandomizationPattern\";\r\nimport { QuestionModel } from \"../models/QuestionModel\";\r\nimport { Indexed } from \"../models/Indexed\";\r\nimport { BlockModel } from \"../models/BlockModel\";\r\nimport { getSettingBoolean } from \"../models/utilities/settingUtilities\";\r\nimport { VariableModel } from \"../models/VariableModel\";\r\nimport { AxisModel } from \"../models/AxisModel\";\r\nimport { getQuestionWithName } from \"../models/utilities/questionnaireUtilities\";\r\nimport { translate } from \"../models/utilities/translationUtilities\";\r\nimport { QuestionnaireModel } from \"../models/QuestionnaireModel\";\r\nimport { isNullOrEmpty } from \"../utils\";\r\nimport { LogicModel } from \"../models/LogicModel\";\r\nimport { RespondentModel } from \"../models/RespondentModel\";\r\nimport { Randomizer } from \"./Randomizer\";\r\nimport { NavigationResultPageModel } from \"../models/NavigationResultPageModel\";\r\nimport { NavigationResultQuestionModel } from \"../models/NavigationResultQuestionModel\";\r\nimport { QuestionType } from \"../models/enums/QuestionType\";\r\nimport { compareChoices } from \"../models/utilities/choiceUtilities\";\r\nimport { AxisType } from \"../models/enums/AxisType\";\r\nimport { RandomizationBounds } from \"../models/RandomizationBounds\";\r\n\r\nexport type LogicEvaluator = (logic: LogicModel) => boolean;\r\n\r\nconst RandFlags = {\r\n NONE: 0,\r\n ROW: 1 << 1,\r\n};\r\n\r\nconst applyRandomization = (\r\n respondent: RespondentModel,\r\n randomization: RandomizationModel,\r\n elements: Indexed[],\r\n language: string,\r\n baseSeed?: number,\r\n flags?: number,\r\n): Indexed[] => {\r\n if (baseSeed === undefined) baseSeed = 0;\r\n\r\n // Create the seed from various variables.\r\n const seed = (randomization.seedAdjust || baseSeed) + (respondent.seed || 0) + (flags || 0);\r\n const randomizer = new Randomizer(seed);\r\n\r\n // Apply the randomization recursively on the bounds.\r\n if (randomization.bounds) {\r\n const { startName, endName } = randomization.bounds;\r\n if (isNullOrEmpty(startName) || isNullOrEmpty(endName)) {\r\n return elements;\r\n }\r\n const startIndex = findIndex(\r\n elements,\r\n (e) => e.name.toUpperCase() === startName.toUpperCase(),\r\n );\r\n const endIndex =\r\n findIndex(elements, (e) => e.name.toUpperCase() === endName.toUpperCase()) + 1;\r\n const randomizedRange = elements.slice(startIndex, endIndex);\r\n return [\r\n ...elements.slice(0, startIndex),\r\n ...applyRandomization(\r\n respondent,\r\n { ...randomization, bounds: undefined },\r\n randomizedRange,\r\n language,\r\n baseSeed,\r\n flags,\r\n ),\r\n ...elements.slice(endIndex),\r\n ] as Indexed[];\r\n }\r\n\r\n // Randomize according to different patterns.\r\n switch (randomization.pattern) {\r\n case RandomizationPattern.Permutation:\r\n // Chunk by counts of 3.\r\n if (randomization.groupCount) {\r\n const a = chunk(elements, randomization.groupCount);\r\n const b = sortBy(a, () => randomizer.next());\r\n return flatten(b) as Indexed[];\r\n }\r\n return sortBy(elements, () => randomizer.next());\r\n case RandomizationPattern.ReverseOrder:\r\n return reverse(elements);\r\n case RandomizationPattern.Rotation: {\r\n // If specified elements per group is less than 1, then make groups of 1\r\n const groupSize =\r\n randomization.groupCount && randomization.groupCount > 0\r\n ? randomization.groupCount\r\n : 1;\r\n\r\n const groups = chunk(elements, groupSize);\r\n const startingGroupIndex = randomizer.next({\r\n minValue: 0,\r\n maxValue: groups.length,\r\n });\r\n\r\n // Elements are grouped in order, so rotating elements is the same as rotating groups\r\n // with the first element of the starting group as the starting point\r\n const startingGroup = groups[startingGroupIndex] ?? [];\r\n const [startingElement] = startingGroup;\r\n const startingElementIndex = startingElement?.index ?? 0;\r\n return sortBy(elements, (element) => element.index < startingElementIndex);\r\n }\r\n case RandomizationPattern.SortByCode:\r\n return sortBy(elements, \"value\");\r\n case RandomizationPattern.SortByLabel: {\r\n const key = (flags & RandFlags.ROW) === RandFlags.ROW ? \"LeftLabel\" : \"TEXT\";\r\n return sortBy(elements, (element) => translate(element as any, key, language));\r\n }\r\n case RandomizationPattern.RandomReverse: {\r\n const rand = randomizer.next({ minValue: 1, maxValue: 10 });\r\n return rand % 2 === 0 ? reverse(elements) : elements;\r\n }\r\n default:\r\n return elements;\r\n }\r\n};\r\n\r\nexport const getRandomization = (\r\n randomizations: RandomizationModel[],\r\n index: number,\r\n bounds?: RandomizationBounds,\r\n) => {\r\n const r = randomizations[index];\r\n const b = bounds ?? r.bounds;\r\n if (r && r.pattern === RandomizationPattern.Synchronized) {\r\n const synchronizedWithIndex = randomizations.findIndex(\r\n (rand) => rand.id === r.synchronizedWithId,\r\n );\r\n if (synchronizedWithIndex > -1)\r\n return getRandomization(randomizations, synchronizedWithIndex, b);\r\n }\r\n return { ...r, b };\r\n};\r\n\r\nexport const randomizeQuestions = (\r\n respondent: RespondentModel,\r\n block: BlockModel,\r\n language: string,\r\n): QuestionModel[] => {\r\n let questions = block.questions || [];\r\n const filteredQuestions = filter(block.questions, \"isPageBreak\");\r\n const pageBreakIndices = map(filteredQuestions, \"index\");\r\n // Apply randomizations to questions.\r\n if (block.randomizations) {\r\n block.randomizations.forEach((randomization, i) => {\r\n randomization = getRandomization(block.randomizations, i);\r\n questions = applyRandomization(\r\n respondent,\r\n randomization,\r\n questions,\r\n language,\r\n randomization.id,\r\n ) as QuestionModel[];\r\n });\r\n }\r\n // Recount question index.\r\n return questions.map((question, index) => ({\r\n ...question,\r\n isPageBreak: pageBreakIndices.includes(index),\r\n index,\r\n }));\r\n};\r\n\r\nexport const getRandomizedBlocks = (\r\n respondent: RespondentModel,\r\n questionnaire: QuestionnaireModel,\r\n language: string,\r\n): BlockModel[] => {\r\n let blocks = questionnaire.blocks || [];\r\n // Apply randomizations to blocks.\r\n if (questionnaire.randomizations) {\r\n questionnaire.randomizations.forEach((randomization, i) => {\r\n randomization = getRandomization(questionnaire.randomizations, i);\r\n blocks = applyRandomization(\r\n respondent,\r\n randomization,\r\n blocks,\r\n language,\r\n questionnaire.id,\r\n ) as BlockModel[];\r\n });\r\n }\r\n // Apply randomized questions to blocks and reassign indices.\r\n return blocks.map((block, index) => ({\r\n ...block,\r\n index,\r\n questions: randomizeQuestions(respondent, block, language).map((question) => ({\r\n ...question,\r\n blockIndex: index,\r\n })),\r\n }));\r\n};\r\n\r\nexport function getRandomizedQuestionIdByName(randomizedBlocks: BlockModel[]) {\r\n const result: { [name: string]: number[] } = {};\r\n for (const block of randomizedBlocks) {\r\n for (const question of block.questions) {\r\n result[question.name.toUpperCase()] = [question.blockIndex, question.index];\r\n }\r\n }\r\n return result;\r\n}\r\n\r\nexport function getRandomizedQuestionIdByVariable(randomizedBlocks: BlockModel[]) {\r\n const result: { [name: string]: number[] } = {};\r\n for (const block of randomizedBlocks) {\r\n for (const question of block.questions) {\r\n for (const variable of question.variableNames) {\r\n result[variable.toUpperCase()] = [question.blockIndex, question.index];\r\n }\r\n }\r\n }\r\n return result;\r\n}\r\n\r\nconst getSynchronizedRandomization = (\r\n questionnaire: QuestionnaireModel,\r\n question: QuestionModel,\r\n randomizationSelector: (el: any) => RandomizationModel,\r\n variable?: VariableModel,\r\n): RandomizationModel => {\r\n const randomization =\r\n (variable ? randomizationSelector(variable) : null) || randomizationSelector(question);\r\n if (!randomization) return undefined;\r\n if (randomization.pattern === RandomizationPattern.Synchronized) {\r\n const synchronizedQuestion = getQuestionWithName(\r\n questionnaire,\r\n randomization.synchronizedQuestion,\r\n );\r\n if (synchronizedQuestion === undefined) return undefined;\r\n return getSynchronizedRandomization(\r\n questionnaire,\r\n synchronizedQuestion,\r\n (el) => randomizationSelector(el) || el.choiceListRandomization || el.rowRandomization,\r\n );\r\n }\r\n return { ...randomization, questionId: question.elementId };\r\n};\r\n\r\nexport const getVariableRandomization = (\r\n questionnaire: QuestionnaireModel,\r\n question: QuestionModel,\r\n) => getSynchronizedRandomization(questionnaire, question, (q) => q.variableRandomization);\r\n\r\nexport const getListRandomization = (\r\n questionnaire: QuestionnaireModel,\r\n question: QuestionModel,\r\n variable?: VariableModel,\r\n) =>\r\n getSynchronizedRandomization(\r\n questionnaire,\r\n question,\r\n (q) => q.choiceListRandomization,\r\n variable,\r\n );\r\n\r\nexport const getRowRandomization = (questionnaire: QuestionnaireModel, question: QuestionModel) =>\r\n getSynchronizedRandomization(questionnaire, question, (q) => q.rowRandomization);\r\n\r\nexport const getColumnRandomization = (\r\n questionnaire: QuestionnaireModel,\r\n question: QuestionModel,\r\n) => getSynchronizedRandomization(questionnaire, question, (q) => q.columnRandomization);\r\n\r\nexport const randomizeChoiceList = (\r\n respondent: RespondentModel,\r\n questionnaire: QuestionnaireModel,\r\n question: QuestionModel,\r\n variable: VariableModel,\r\n language: string,\r\n serverPage: NavigationResultPageModel,\r\n): ChoiceModel[] => {\r\n if (serverPage && variable.choiceList) {\r\n const serverQuestion: NavigationResultQuestionModel = serverPage.questions.find(\r\n (q: NavigationResultQuestionModel) => q.name === question.name,\r\n );\r\n const serverVariable = serverQuestion?.variables?.find((v) => v.name === variable.name);\r\n if (serverVariable && serverVariable.choices) {\r\n return sortBy(variable.choiceList, (c1) =>\r\n findIndex(serverVariable.choices, (c2) => compareChoices(c1, c2, question)),\r\n );\r\n }\r\n }\r\n let choices = variable.choiceList || [];\r\n const randomization = getListRandomization(questionnaire, question, variable);\r\n if (randomization != null) {\r\n const fixedChoices = variable.choiceList.filter((a) => getSettingBoolean(a, \"Fixed\"));\r\n // Exclude fixed choices from randomization\r\n choices = choices.filter((a) => !getSettingBoolean(a, \"Fixed\"));\r\n choices = applyRandomization(\r\n respondent,\r\n randomization,\r\n choices,\r\n language,\r\n question.id,\r\n ) as ChoiceModel[];\r\n for (const choice of fixedChoices) {\r\n // Re-add the fixed choices.\r\n choices.splice(choice.index, 0, choice);\r\n }\r\n }\r\n return choices;\r\n};\r\n\r\nconst hasOneVariablePerCell = (question: QuestionModel) =>\r\n [QuestionType.HybridGrid, QuestionType.RunningTotal].includes(question.type);\r\n\r\nexport const randomizeVariables = (\r\n respondent: RespondentModel,\r\n questionnaire: QuestionnaireModel,\r\n question: QuestionModel,\r\n variables: VariableModel[],\r\n language: string,\r\n serverPage: NavigationResultPageModel,\r\n): VariableModel[] => {\r\n if (serverPage && hasOneVariablePerCell(question)) {\r\n // No need to randomize one variable\r\n return variables;\r\n }\r\n let randomized: VariableModel[];\r\n if (serverPage && variables) {\r\n const serverQuestion: NavigationResultQuestionModel = serverPage.questions.find(\r\n (q: NavigationResultQuestionModel) => q.name === question.name,\r\n );\r\n randomized = sortBy(variables, (v1) =>\r\n findIndex(\r\n serverQuestion?.variables,\r\n (v2) => v2.name?.toUpperCase() === v1.name.toUpperCase(),\r\n ),\r\n );\r\n }\r\n if (!randomized) {\r\n randomized = variables || [];\r\n const randomization = getVariableRandomization(questionnaire, question);\r\n if (randomization != null)\r\n randomized = applyRandomization(\r\n respondent,\r\n randomization,\r\n randomized,\r\n language,\r\n question.id,\r\n ) as VariableModel[];\r\n }\r\n randomized = randomized.map((variable) => ({\r\n ...variable,\r\n choiceList: randomizeChoiceList(\r\n respondent,\r\n questionnaire,\r\n question,\r\n variable,\r\n language,\r\n serverPage,\r\n ),\r\n }));\r\n return randomized;\r\n};\r\n\r\nconst serverRandomizedAxis = (\r\n questionName: string,\r\n serverPage: NavigationResultPageModel,\r\n elements: AxisModel[],\r\n type: AxisType,\r\n) => {\r\n if (serverPage && elements?.length > 0) {\r\n const question: NavigationResultQuestionModel = serverPage.questions.find(\r\n (q) => q.name.toUpperCase() === questionName.toUpperCase(),\r\n );\r\n if (question) {\r\n const positions =\r\n type === AxisType.Row ? question?.rowsPositions : question?.columnsPositions;\r\n if (positions) {\r\n return sortBy(elements, (r) => positions.indexOf(r.index));\r\n }\r\n }\r\n }\r\n return null;\r\n};\r\n\r\nexport const randomizeColumns = (\r\n respondent: RespondentModel,\r\n questionnaire: QuestionnaireModel,\r\n question: QuestionModel,\r\n language: string,\r\n serverPage: NavigationResultPageModel,\r\n): AxisModel[] => {\r\n // Get randomization from API\r\n let columns = serverRandomizedAxis(\r\n question.name,\r\n serverPage,\r\n question.columns,\r\n AxisType.Column,\r\n );\r\n if (columns === null) {\r\n // Use client side randomization in case we don't have API information (VMO)\r\n columns = question.columns || [];\r\n const randomization = getColumnRandomization(questionnaire, question);\r\n if (randomization != null)\r\n columns = applyRandomization(\r\n respondent,\r\n randomization,\r\n columns,\r\n language,\r\n question.id,\r\n ) as AxisModel[];\r\n }\r\n // Randomize variables.\r\n columns = columns.map((column) => ({\r\n ...column,\r\n variables: randomizeVariables(\r\n respondent,\r\n questionnaire,\r\n question,\r\n column.variables,\r\n language,\r\n serverPage,\r\n ),\r\n }));\r\n return columns;\r\n};\r\n\r\nexport const randomizeRows = (\r\n respondent: RespondentModel,\r\n questionnaire: QuestionnaireModel,\r\n question: QuestionModel,\r\n language: string,\r\n serverPage: NavigationResultPageModel,\r\n): AxisModel[] => {\r\n // Get randomization from API\r\n let rows = serverRandomizedAxis(question.name, serverPage, question.rows, AxisType.Row);\r\n if (rows === null) {\r\n // Use client side randomization in case we don't have API information (VMO)\r\n rows = question.rows || [];\r\n const randomization = getRowRandomization(questionnaire, question);\r\n if (randomization != null) {\r\n const fixedRows = rows.filter((r) => getSettingBoolean(r, \"Fixed\"));\r\n // Exclude fixed rows from randomization\r\n rows = rows.filter((a) => !getSettingBoolean(a, \"Fixed\"));\r\n rows = applyRandomization(\r\n respondent,\r\n randomization,\r\n rows,\r\n language,\r\n question.id,\r\n RandFlags.ROW,\r\n ) as AxisModel[];\r\n for (const row of fixedRows) {\r\n // Re-add the fixed rows.\r\n rows.splice(row.index, 0, row);\r\n }\r\n }\r\n }\r\n // Randomize variables.\r\n return rows.map((row) => ({\r\n ...row,\r\n variables: randomizeVariables(\r\n respondent,\r\n questionnaire,\r\n question,\r\n row.variables,\r\n language,\r\n serverPage,\r\n ),\r\n }));\r\n};\r\n","/**\r\n * This randomizer is meant to work the same way as the one from .Net Framework\r\n * https://referencesource.microsoft.com/#mscorlib/system/random.cs\r\n */\r\n\r\n// Int32 bounds\r\nconst MAX_VALUE = 2 ** 31 - 1;\r\nconst MIN_VALUE = 2 ** 31 * -1;\r\n\r\ninterface Next {\r\n minValue?: number;\r\n maxValue?: number;\r\n}\r\n\r\nexport function getRandomInt() {\r\n return Math.floor(Math.random() * Math.floor(MAX_VALUE));\r\n}\r\n\r\nexport class Randomizer {\r\n mSeed = 161803398;\r\n\r\n inext: number;\r\n inextp: number;\r\n seedArray: number[] = [];\r\n\r\n constructor(baseSeed?: number) {\r\n let ii: number;\r\n let mj: number;\r\n let mk: number;\r\n\r\n const seed = baseSeed || getRandomInt();\r\n\r\n // Initialize our Seed array.\r\n // This algorithm comes from Numerical Recipes in C (2nd Ed.)\r\n const subtraction = seed === MIN_VALUE ? MAX_VALUE : Math.abs(seed);\r\n mj = this.mSeed - subtraction;\r\n this.seedArray[55] = mj;\r\n mk = 1;\r\n for (let i = 1; i < 55; i++) {\r\n // Apparently the range [1..55] is special (Knuth) and so we're wasting the 0'th position.\r\n ii = (21 * i) % 55;\r\n this.seedArray[ii] = mk;\r\n mk = mj - mk;\r\n if (mk < 0) mk += MAX_VALUE;\r\n mj = this.seedArray[ii];\r\n }\r\n for (let k = 1; k < 5; k++) {\r\n for (let i = 1; i < 56; i++) {\r\n this.seedArray[i] -= this.seedArray[1 + ((i + 30) % 55)];\r\n if (this.seedArray[i] < 0) this.seedArray[i] += MAX_VALUE;\r\n }\r\n }\r\n this.inext = 0;\r\n this.inextp = 21;\r\n }\r\n\r\n sample() {\r\n return this.internalSample() * (1.0 / MAX_VALUE);\r\n }\r\n\r\n internalSample() {\r\n let retVal: number;\r\n let locINext = this.inext;\r\n let locINextp = this.inextp;\r\n\r\n locINext += 1;\r\n if (locINext >= 56) locINext = 1;\r\n locINextp += 1;\r\n if (locINextp >= 56) locINextp = 1;\r\n\r\n retVal = this.seedArray[locINext] - this.seedArray[locINextp];\r\n\r\n if (retVal === MAX_VALUE) retVal -= 1;\r\n if (retVal < 0) retVal += MAX_VALUE;\r\n\r\n this.seedArray[locINext] = retVal;\r\n\r\n this.inext = locINext;\r\n this.inextp = locINextp;\r\n\r\n return retVal;\r\n }\r\n\r\n getSampleForLargeRange() {\r\n // The distribution of double value returned by Sample\r\n // is not distributed well enough for a large range.\r\n // If we use Sample for a range [Int32.MinValue..Int32.MaxValue)\r\n // We will end up getting even numbers only.\r\n\r\n let result = this.internalSample();\r\n // Note we can't use addition here. The distribution will be bad if we do that.\r\n let negative = this.internalSample() % 2 == 0; // decide the sign based on second sample\r\n if (negative) {\r\n result = -result;\r\n }\r\n let d = result;\r\n d += MAX_VALUE - 1; // get a number in range [0 .. 2 * Int32MaxValue - 1)\r\n d /= 2 * MAX_VALUE - 1;\r\n return d;\r\n }\r\n\r\n next(props?: Next): number {\r\n let { minValue = 0, maxValue } = props || {};\r\n\r\n // .Net version of Next() uses int for min & max, so we truncate them to keep only the integer part\r\n minValue = Math.trunc(minValue);\r\n if (maxValue) {\r\n maxValue = Math.trunc(maxValue);\r\n }\r\n\r\n if (maxValue != null && maxValue >= minValue) {\r\n const range = maxValue - minValue;\r\n if (range <= MAX_VALUE) {\r\n return Math.trunc(this.sample() * range) + minValue;\r\n }\r\n return Math.trunc(this.getSampleForLargeRange() * range + minValue);\r\n }\r\n return this.internalSample();\r\n }\r\n}\r\n","import { ErrorInfo } from \"react\";\r\nimport { DeviceModel } from \"../../models/DeviceModel\";\r\nimport { DispositionCode } from \"../../models/enums/DispositionCode\";\r\nimport { MentionBuilderDelegate } from \"../../models/builders/MentionBuilder\";\r\nimport { RecallType } from \"../../piping/RecallType\";\r\nimport { RespondentModel } from \"../../models/RespondentModel\";\r\nimport { LookupTableParams } from \"../../models/LookupTableParams\";\r\nimport { LookupTablePage } from \"../../models/LookupTablePage\";\r\nimport { QuotaModel } from \"../../models/QuotaModel\";\r\nimport { QuestionnaireModel } from \"../../models/QuestionnaireModel\";\r\nimport { ValidationResultModel } from \"../../models/ValidationResultModel\";\r\nimport { ThemeModel } from \"../../models/ThemeModel\";\r\nimport { MentionModel } from \"../../models/MentionModel\";\r\nimport { ActionTypes } from \"./types\";\r\nimport { RecallMode } from \"../../models/enums/RecallMode\";\r\nimport { BranchToOptions } from \"../../models/BranchToOptions\";\r\nimport { SurveyMode } from \"../../models/enums/SurveyMode\";\r\nimport { NavigationResultPageModel } from \"../../models/NavigationResultPageModel\";\r\nimport { AnswerModel } from \"../../models/AnswerModel\";\r\nimport { CancellationTokenSource } from \"../../models/CancellationTokenSource\";\r\nimport { DefaultFocusStatus } from \"../../models/states/DefaultFocusStatus\";\r\n\r\nexport const AUDIO_RECORDING_START = \"AUDIO_RECORDING_START\";\r\nexport const AUDIO_RECORDING_STOP = \"AUDIO_RECORDING_STOP\";\r\nexport const CHANGE_LANGUAGE = \"CHANGE_LANGUAGE\";\r\nexport const CACHE_RECALL = \"CACHE_RECALL\";\r\nexport const CONNECTION_CONNECTED = \"CONNECTION_CONNECTED\";\r\nexport const CONNECTION_DISCONNECTED = \"CONNECTION_DISCONNECTED\";\r\nexport const CONNECTION_ERROR = \"CONNECTION_ERROR\";\r\nexport const CONNECTION_PROGRESS = \"CONNECTION_PROGRESS\";\r\nexport const CONNECTION_START = \"CONNECTION_START\";\r\nexport const DEBUG_DISABLED = \"DEBUG_DISABLED\";\r\nexport const DEBUG_ENABLED = \"DEBUG_ENABLED\";\r\nexport const DEBUG_INFO_ENABLED = \"DEBUG_INFO_ENABLED\";\r\nexport const DEBUG_INFO_DISABLED = \"DEBUG_INFO_DISABLED\";\r\nexport const DEVICE_CHANGED = \"DEVICE_CHANGED\";\r\nexport const ENABLE_LEGACY_BROWSER_WARNING = \"ENABLE_LEGACY_BROWSER_WARNING\";\r\nexport const FILE_UPLOAD_CLEARED = \"FILE_UPLOAD_CLEARED\";\r\nexport const FILE_UPLOAD_COMPLETED = \"FILE_UPLOAD_COMPLETED\";\r\nexport const FILE_UPLOAD_FAILED = \"FILE_UPLOAD_FAILED\";\r\nexport const FILE_UPLOAD_PROGRESS = \"FILE_UPLOAD_PROGRESS\";\r\nexport const FILE_UPLOAD_STARTED = \"FILE_UPLOAD_STARTED\";\r\nexport const GET_FILE_FAILED = \"GET_FILE_FAILED\";\r\nexport const LOG_ERROR = \"LOG_ERROR\";\r\nexport const LOOKUP_TABLE_FETCH = \"LOOKUP_TABLE_FETCH\";\r\nexport const LOOKUP_TABLE_ADD_CHOICE_ITEM_FAILED = \"LOOKUP_TABLE_ADD_CHOICE_ITEM_FAILED\";\r\nexport const LOOKUP_TABLE_RECEIVE = \"LOOKUP_TABLE_RECEIVE\";\r\nexport const MOBILE_PREVIEW_DISABLED = \"MOBILE_PREVIEW_DISABLED\";\r\nexport const MOBILE_PREVIEW_ENABLED = \"MOBILE_PREVIEW_ENABLED\";\r\nexport const MOBILE_PREVIEW_TOGGLE = \"MOBILE_PREVIEW_TOGGLE\";\r\nexport const NAVIGATION_BRANCH_TO = \"NAVIGATION_BRANCH_TO\";\r\nexport const NAVIGATION_COMPLETION_QUESTION_REACHED = \"NAVIGATION_COMPLETION_QUESTION_REACHED\";\r\nexport const NAVIGATION_DISPLAY_ERROR = \"NAVIGATION_DISPLAY_ERROR\";\r\nexport const NAVIGATION_DISPLAY_MESSAGE = \"NAVIGATION_DISPLAY_MESSAGE\";\r\nexport const NAVIGATION_PAGE_CHANGED = \"NAVIGATION_PAGE_CHANGED\";\r\nexport const NAVIGATION_PAGE_READY = \"NAVIGATION_PAGE_READY\";\r\nexport const NAVIGATION_NEXT_PAGE = \"NAVIGATION_NEXT_PAGE\";\r\nexport const NAVIGATION_PREVIOUS_PAGE = \"NAVIGATION_PREVIOUS_PAGE\";\r\nexport const NAVIGATION_PREVIEW_QUESTION = \"NAVIGATION_PREVIEW_QUESTION\";\r\nexport const NAVIGATION_PUSH_HISTORY = \"NAVIGATION_PUSH_HISTORY\";\r\nexport const NAVIGATION_QUIT = \"NAVIGATION_QUIT\";\r\nexport const NAVIGATION_RESET = \"NAVIGATION_RESET\";\r\nexport const NAVIGATION_SHORTCUT = \"NAVIGATION_SHORTCUT\";\r\nexport const OPEN_UPLOADED_FILE = \"OPEN_UPLOADED_FILE\";\r\nexport const PREVIEW_THEME = \"PREVIEW_THEME\";\r\nexport const QUESTIONNAIRE_CHANGED = \"QUESTIONNAIRE_CHANGED\";\r\nexport const QUOTAS_CHANGED = \"QUOTAS_CHANGED\";\r\nexport const QUOTAS_CLOSE_STRATUM = \"QUOTAS_CLOSE_STRATUM\";\r\nexport const QUOTAS_CLOSE_USER_STRATUM = \"QUOTAS_CLOSE_USER_STRATUM\";\r\nexport const RESPONDENT_CHANGED = \"RESPONDENT_CHANGED\";\r\nexport const RESPONDENT_SET_APPOINTMENT = \"RESPONDENT_SET_APPOINTMENT\";\r\nexport const RESPONDENT_SET_EMAIL = \"RESPONDENT_SET_EMAIL\";\r\nexport const RESPONDENT_SET_PHONE = \"RESPONDENT_SET_PHONE\";\r\nexport const RESPONDENT_SET_TIMEZONE = \"RESPONDENT_SET_TIMEZONE\";\r\nexport const RESPONDENT_SET_DISPOSITIONCODE = \"RESPONDENT_SET_DISPOSITIONCODE\";\r\nexport const SET_DISPLAY_IN_THEME_EDITOR = \"SET_DISPLAY_IN_THEME_EDITOR\";\r\nexport const SET_LOOP_ROW = \"SET_LOOP_ROW\";\r\nexport const SET_NAVIGATION_ENABLED = \"SET_NAVIGATION_ENABLED\";\r\nexport const SET_PAGE_MESSAGES_ENABLED = \"SET_PAGE_MESSAGES_ENABLED\";\r\nexport const SET_RECALL_MODE = \"SET_RECALL_MODE\";\r\nexport const SET_SURVEY_MODE = \"SET_SURVEY_MODE\";\r\nexport const SET_VARIABLE_MENTIONS = \"SET_VARIABLE_MENTIONS\";\r\nexport const SET_MULTIPLE_VARIABLES_MENTIONS = \"SET_MULTIPLE_VARIABLES_MENTIONS\";\r\nexport const VALIDATION_CLEAR = \"VALIDATION_CLEAR\";\r\nexport const VALIDATION_SET_RESULT = \"VALIDATION_SET_RESULT\";\r\nexport const VALIDATION_SET_RESULT_NEXT = \"VALIDATION_SET_RESULT_NEXT\";\r\nexport const RESET_MENTIONS = \"RESET_MENTIONS\";\r\nexport const SERVER_PAGE_CHANGED = \"SERVER_PAGE_CHANGED\";\r\nexport const SET_SERVER_TRACKED_ANSWERS = \"SET_SERVER_TRACKED_ANSWERS\";\r\nexport const INVALIDATE_CLIENT_VARIABLES = \"INVALIDATE_CLIENT_VARIABLES\";\r\nexport const USE_CLIENT_VALIDATION = \"USE_CLIENT_VALIDATION\";\r\nexport const LOAD_ANSWERS_DTO = \"LOAD_ANSWERS_DTO\";\r\nexport const REFRESH_CURRENT_PAGE_QUESTIONS = \"REFRESH_CURRENT_PAGE_QUESTIONS\";\r\nexport const SET_SOFT_PROMPT_VISIBLE = \"SET_SOFT_PROMPT_VISIBLE\";\r\nexport const SET_IS_INPUT_FOCUSED = \"SET_IS_INPUT_FOCUSED\";\r\nexport const VALIDATE_PAGE_ON_SERVER = \"VALIDATE_PAGE_ON_SERVER\";\r\nexport const SET_COORDINATES = \"SET_COORDINATES\";\r\nexport const HIDE_ACCESSIBILITY_PANEL = \"HIDE_ACCESSIBILITY_PANEL\";\r\nexport const UPDATE_CARROUSEL_ACTIVE_VARIABLE = \"UPDATE_CARROUSEL_ACTIVE_VARIABLE\";\r\nexport const UPDATE_QUESTION_FIELD_STATUS = \"UPDATE_QUESTION_FIELD_STATUS\";\r\nexport const DEFAULT_FOCUS_STATUS = \"DEFAULT_FOCUS_STATUS\";\r\nexport const ENABLE_MAPPED_VARIABLE_FIELD_STATUS = \"ENABLE_MAPPED_VARIABLE_FIELD_STATUS\";\r\n\r\nexport const audioRecordingStart = (questionName: string, matrix: number): ActionTypes => ({\r\n type: AUDIO_RECORDING_START,\r\n questionName,\r\n matrix,\r\n});\r\nexport const audioRecordingStop = (): ActionTypes => ({ type: AUDIO_RECORDING_STOP });\r\nexport const cacheRecall = (\r\n expression: string,\r\n mode: RecallType,\r\n result: string,\r\n variables: string[],\r\n): ActionTypes => ({\r\n type: CACHE_RECALL,\r\n expression,\r\n mode,\r\n result,\r\n variables,\r\n});\r\nexport const changeLanguage = (code: string): ActionTypes => ({ type: CHANGE_LANGUAGE, code });\r\nexport const connectionStart = (url: string): ActionTypes => ({ type: CONNECTION_START, url });\r\nexport const connectionConnected = (url: string): ActionTypes => ({\r\n type: CONNECTION_CONNECTED,\r\n url,\r\n connected: true,\r\n});\r\nexport const connectionProgress = (progress: number): ActionTypes => ({\r\n type: CONNECTION_PROGRESS,\r\n progress,\r\n});\r\nexport const connectionDisconnected = (reason?: string): ActionTypes => ({\r\n type: CONNECTION_DISCONNECTED,\r\n reason,\r\n connected: false,\r\n});\r\nexport const connectionError = (url: string, reason?: string, error?: Error): ActionTypes => ({\r\n type: CONNECTION_ERROR,\r\n url,\r\n reason,\r\n error,\r\n connected: false,\r\n});\r\nexport const debugDisabled = (): ActionTypes => ({ type: DEBUG_DISABLED });\r\nexport const debugEnabled = (): ActionTypes => ({ type: DEBUG_ENABLED });\r\nexport const debugInfoDisabled = (): ActionTypes => ({ type: DEBUG_INFO_DISABLED });\r\nexport const debugInfoEnabled = (): ActionTypes => ({ type: DEBUG_INFO_ENABLED });\r\nexport const setDisplayInThemeEditor = (displayInThemeEditor: boolean): ActionTypes => ({\r\n type: SET_DISPLAY_IN_THEME_EDITOR,\r\n displayInThemeEditor,\r\n});\r\nexport const setSurveyMode = (mode: SurveyMode): ActionTypes => ({\r\n type: SET_SURVEY_MODE,\r\n mode,\r\n});\r\nexport const deviceChanged = (device: DeviceModel): ActionTypes => ({\r\n type: DEVICE_CHANGED,\r\n device,\r\n});\r\nexport const fileUploadStarted = (\r\n variableName: string,\r\n matrix: number,\r\n fileName: string,\r\n size: number,\r\n cancellationTokenSource: CancellationTokenSource,\r\n): ActionTypes => ({\r\n type: FILE_UPLOAD_STARTED,\r\n variableName,\r\n matrix,\r\n fileName,\r\n size,\r\n cancellationTokenSource,\r\n});\r\nexport const fileUploadCleared = (variableName: string, matrix: number): ActionTypes => ({\r\n type: FILE_UPLOAD_CLEARED,\r\n variableName,\r\n matrix,\r\n});\r\nexport const fileUploadCompleted = (variableName: string, matrix: number): ActionTypes => ({\r\n type: FILE_UPLOAD_COMPLETED,\r\n variableName,\r\n matrix,\r\n});\r\nexport const fileUploadProgress = (\r\n variableName: string,\r\n matrix: number,\r\n progress: number,\r\n): ActionTypes => ({\r\n type: FILE_UPLOAD_PROGRESS,\r\n variableName,\r\n matrix,\r\n progress,\r\n});\r\nexport const fileUploadFailed = (\r\n variableName: string,\r\n matrix: number,\r\n fileName: string,\r\n error: Error,\r\n): ActionTypes => ({\r\n type: FILE_UPLOAD_FAILED,\r\n variableName,\r\n matrix,\r\n fileName,\r\n error,\r\n});\r\nexport const getFileFailed = (\r\n variableName: string,\r\n fileName: string,\r\n error: Error,\r\n): ActionTypes => ({\r\n type: GET_FILE_FAILED,\r\n variableName,\r\n fileName,\r\n error,\r\n});\r\nexport const logError = (error: Error, info?: ErrorInfo): ActionTypes => ({\r\n type: LOG_ERROR,\r\n error,\r\n info,\r\n});\r\nexport const lookupTableFetch = (\r\n tableId: string,\r\n params: LookupTableParams,\r\n questionName: string,\r\n): ActionTypes => ({\r\n type: LOOKUP_TABLE_FETCH,\r\n tableId,\r\n params,\r\n questionName,\r\n});\r\nexport const addChoiceItemFailed = (\r\n questionName: string,\r\n tableName: string,\r\n params: Record<string, string>,\r\n error: any,\r\n): ActionTypes => ({\r\n type: LOOKUP_TABLE_ADD_CHOICE_ITEM_FAILED,\r\n questionName,\r\n tableName,\r\n params,\r\n error,\r\n});\r\nexport const lookupTableReceive = (\r\n tableName: string,\r\n requestId: string,\r\n page: LookupTablePage,\r\n questionName: string,\r\n): ActionTypes => ({ type: LOOKUP_TABLE_RECEIVE, tableName, requestId, page, questionName });\r\nexport const mobilePreviewEnabled = (): ActionTypes => ({ type: MOBILE_PREVIEW_ENABLED });\r\nexport const mobilePreviewDisabled = (): ActionTypes => ({ type: MOBILE_PREVIEW_DISABLED });\r\nexport const mobilePreviewToggle = (): ActionTypes => ({ type: MOBILE_PREVIEW_TOGGLE });\r\nexport const navigationCompletionQuestionReached = (): ActionTypes => ({\r\n type: NAVIGATION_COMPLETION_QUESTION_REACHED,\r\n});\r\nexport const navigationBranchTo = (options: BranchToOptions): ActionTypes => ({\r\n type: NAVIGATION_BRANCH_TO,\r\n options,\r\n});\r\nexport const navigationNextPage = (): ActionTypes => ({ type: NAVIGATION_NEXT_PAGE });\r\nexport const navigationPreviousPage = (): ActionTypes => ({ type: NAVIGATION_PREVIOUS_PAGE });\r\nexport const navigationPageReady = (): ActionTypes => ({ type: NAVIGATION_PAGE_READY });\r\nexport const navigationPreviewQuestion = (questionId: number): ActionTypes => ({\r\n type: NAVIGATION_PREVIEW_QUESTION,\r\n questionId,\r\n});\r\nexport const navigationDisplayError = (error: Error): ActionTypes => ({\r\n type: NAVIGATION_DISPLAY_ERROR,\r\n error,\r\n});\r\nexport const navigationDisplayMessage = (message: string): ActionTypes => ({\r\n type: NAVIGATION_DISPLAY_MESSAGE,\r\n message,\r\n});\r\nexport const navigationQuit = (\r\n dispositionCode?: DispositionCode,\r\n options?: {\r\n message?: string;\r\n closedStrata?: boolean;\r\n redirectUrl?: string;\r\n forcedQuit?: boolean;\r\n discard?: boolean;\r\n questionId?: number;\r\n terminationSurveyAction?: number;\r\n },\r\n): ActionTypes => ({\r\n type: NAVIGATION_QUIT,\r\n dispositionCode,\r\n options,\r\n});\r\nexport const navigationReset = (clearAnswers?: boolean): ActionTypes => ({\r\n type: NAVIGATION_RESET,\r\n clearAnswers,\r\n});\r\nexport const navigationShortcut = (\r\n blockName: string,\r\n exitToNextQuestion: boolean,\r\n): ActionTypes => ({\r\n type: NAVIGATION_SHORTCUT,\r\n blockName,\r\n exitToNextQuestion,\r\n});\r\nexport const openUploadedFile = (variableName: string, matrix: number): ActionTypes => ({\r\n type: OPEN_UPLOADED_FILE,\r\n variableName,\r\n matrix,\r\n});\r\nexport const quotasChanged = (quotas: QuotaModel[]): ActionTypes => ({\r\n type: QUOTAS_CHANGED,\r\n quotas,\r\n});\r\nexport const quotasCloseStratum = (stratumId: number): ActionTypes => ({\r\n type: QUOTAS_CLOSE_STRATUM,\r\n stratumId,\r\n});\r\nexport const quotasCloseUserStratum = (stratumId: number): ActionTypes => ({\r\n type: QUOTAS_CLOSE_USER_STRATUM,\r\n stratumId,\r\n});\r\nexport const setNavigationEnabled = (enabled: boolean): ActionTypes => ({\r\n type: SET_NAVIGATION_ENABLED,\r\n enabled,\r\n});\r\nexport const respondentChanged = (respondent: RespondentModel): ActionTypes => ({\r\n type: RESPONDENT_CHANGED,\r\n respondent,\r\n});\r\nexport const serverPageChanged = (page: NavigationResultPageModel): ActionTypes => ({\r\n type: SERVER_PAGE_CHANGED,\r\n page,\r\n});\r\nexport const respondentSetAppointment = (appointment: Date): ActionTypes => ({\r\n type: RESPONDENT_SET_APPOINTMENT,\r\n appointment,\r\n});\r\nexport const respondentSetEmail = (email: string): ActionTypes => ({\r\n type: RESPONDENT_SET_EMAIL,\r\n email,\r\n});\r\nexport const respondentSetPhone = (phone: string): ActionTypes => ({\r\n type: RESPONDENT_SET_PHONE,\r\n phone,\r\n});\r\nexport const respondentSetTimeZone = (timeZone: string): ActionTypes => ({\r\n type: RESPONDENT_SET_TIMEZONE,\r\n timeZone,\r\n});\r\nexport const respondentSetDispositionCode = (dispositionCode: DispositionCode): ActionTypes => ({\r\n type: RESPONDENT_SET_DISPOSITIONCODE,\r\n dispositionCode,\r\n});\r\nexport const setLoopRow = (blockName: string, row: number): ActionTypes => ({\r\n type: SET_LOOP_ROW,\r\n blockName,\r\n row,\r\n});\r\nexport const setVariableMentions = (\r\n variableName: string,\r\n builder: MentionBuilderDelegate,\r\n matrixIndex?: number,\r\n): ActionTypes => ({\r\n type: SET_VARIABLE_MENTIONS,\r\n variableName: variableName.toUpperCase(),\r\n matrixIndex,\r\n builder,\r\n});\r\nexport const setMultipleVariablesMentions = (mentionsByVariable: {\r\n [variableName: string]: MentionBuilderDelegate;\r\n}): ActionTypes => ({\r\n type: SET_MULTIPLE_VARIABLES_MENTIONS,\r\n mentionsByVariable,\r\n});\r\nexport const questionnaireChanged = (questionnaire: QuestionnaireModel): ActionTypes => ({\r\n type: QUESTIONNAIRE_CHANGED,\r\n questionnaire,\r\n});\r\nexport const previewTheme = (theme: ThemeModel): ActionTypes => ({ type: PREVIEW_THEME, theme });\r\nexport const setRecallMode = (mode: RecallMode): ActionTypes => ({ type: SET_RECALL_MODE, mode });\r\nexport const setPageMessagesEnabled = (isPageMessageEnabled: boolean): ActionTypes => ({\r\n type: SET_PAGE_MESSAGES_ENABLED,\r\n isPageMessageEnabled,\r\n});\r\nexport const validationClear = (\r\n includeNewValidationResults = true,\r\n keepSoftPromptError = false,\r\n removeValidationForVariables = null,\r\n): ActionTypes => ({\r\n type: VALIDATION_CLEAR,\r\n includeNewValidationResults,\r\n keepSoftPromptError,\r\n removeValidationForVariables,\r\n});\r\n\r\nexport const validationSetResult = (result: ValidationResultModel): ActionTypes => ({\r\n type: VALIDATION_SET_RESULT,\r\n result,\r\n});\r\n\r\nexport const validationSetResultNext = (result: ValidationResultModel): ActionTypes => ({\r\n type: VALIDATION_SET_RESULT_NEXT,\r\n result,\r\n});\r\nexport const resetMentions = (mentions: {\r\n [variableName: string]: MentionModel[];\r\n}): ActionTypes => ({\r\n type: RESET_MENTIONS,\r\n mentions,\r\n});\r\nexport const setEnableLegacyBrowserWarning = (enableWarning: boolean): ActionTypes => ({\r\n type: ENABLE_LEGACY_BROWSER_WARNING,\r\n enableWarning,\r\n});\r\nexport const setServerTrackedAnswers = (answers: AnswerModel[]): ActionTypes => ({\r\n type: SET_SERVER_TRACKED_ANSWERS,\r\n answers,\r\n});\r\nexport const invalidateClientVariables = (): ActionTypes => ({\r\n type: INVALIDATE_CLIENT_VARIABLES,\r\n});\r\nexport const useClientValidation = (useValidation: boolean): ActionTypes => ({\r\n type: USE_CLIENT_VALIDATION,\r\n useValidation,\r\n});\r\n\r\nexport const loadAnswersDto = (answers: AnswerModel[]): ActionTypes => ({\r\n type: LOAD_ANSWERS_DTO,\r\n answers,\r\n});\r\n\r\nexport const refreshCurrentPageQuestions = (page: NavigationResultPageModel): ActionTypes => ({\r\n type: REFRESH_CURRENT_PAGE_QUESTIONS,\r\n page,\r\n});\r\n\r\nexport const setIsFormFocused = (isInputFocused: boolean): ActionTypes => ({\r\n type: SET_IS_INPUT_FOCUSED,\r\n isInputFocused,\r\n});\r\n\r\nexport const setCoordinates = (latitude: number, longitude: number): ActionTypes => ({\r\n type: SET_COORDINATES,\r\n latitude,\r\n longitude,\r\n});\r\n\r\nexport const setHideAccessibilityPanel = (hideAccessibilityPanel: boolean): ActionTypes => ({\r\n type: HIDE_ACCESSIBILITY_PANEL,\r\n hideAccessibilityPanel,\r\n});\r\n\r\nexport const setCarrouselActiveVariableIndex = (\r\n instanceId: string,\r\n activeVariableIndex: number,\r\n isPrevBtnActive: boolean,\r\n isNextBtnActive: boolean,\r\n): ActionTypes => ({\r\n type: UPDATE_CARROUSEL_ACTIVE_VARIABLE,\r\n instanceId,\r\n activeVariableIndex,\r\n isPrevBtnActive,\r\n isNextBtnActive,\r\n});\r\n\r\nexport const setQuestionFieldStatus = (\r\n fieldIdentifiers: [string],\r\n isDisabled: boolean,\r\n checkAndSetToState: boolean,\r\n): ActionTypes => ({\r\n type: UPDATE_QUESTION_FIELD_STATUS,\r\n fieldIdentifiers,\r\n isDisabled,\r\n checkAndSetToState,\r\n});\r\n\r\nexport const setDefaultFocusStatus = (defaultFocusStatus: DefaultFocusStatus): ActionTypes => ({\r\n type: DEFAULT_FOCUS_STATUS,\r\n defaultFocusStatus,\r\n});\r\n\r\nexport const enableAllMappedVariablesFieldStatus = (\r\n variableName: string,\r\n mentions: MentionModel[],\r\n): ActionTypes => ({\r\n type: ENABLE_MAPPED_VARIABLE_FIELD_STATUS,\r\n variableName,\r\n mentions,\r\n});\r\n","import { QuotaModel } from \"../QuotaModel\";\r\nimport { QuotaStatus } from \"../enums/QuotaStatus\";\r\n\r\nexport function createQuota(el?: any): QuotaModel {\r\n if (el == null) return undefined;\r\n return {\r\n id: el.id,\r\n stratumId: el.stratumId,\r\n condition: el.condition,\r\n description: el.description,\r\n variables: el.variables,\r\n status: QuotaStatus[el.status as string] || QuotaStatus.Open,\r\n userStatus: QuotaStatus[el.userStatus as string] || QuotaStatus.Open,\r\n todo: el.todo,\r\n objective: el.objective,\r\n frequency: el.frequency,\r\n online: el.online,\r\n userObjective: el.userObjective,\r\n userFrequency: el.userFrequency,\r\n };\r\n}\r\n","export enum QuotaMetOrCloseActions {\r\n DoNothing = 0,\r\n DisplayMessageAndExit,\r\n RedirectToUrl,\r\n}\r\n","export const trackEvent = (name: string, duration: number) => {\r\n // eslint-disable-next-line prefer-destructuring\r\n const rg4js = (window as any).rg4js;\r\n if (rg4js) {\r\n rg4js(\"trackEvent\", {\r\n type: \"customTiming\",\r\n name,\r\n duration,\r\n });\r\n }\r\n};\r\n","import { DateTime } from \"luxon\";\r\nimport { map, groupBy, forOwn, pickBy } from \"../../utils/lodash\";\r\nimport { Log } from \"../../utils/logging\";\r\nimport { isNullOrEmpty } from \"../../utils\";\r\nimport { InterviewState } from \"../../models/states/InterviewState\";\r\nimport { DispositionCode } from \"../../models/enums/DispositionCode\";\r\nimport { LookupTableParams } from \"../../models/LookupTableParams\";\r\nimport { createRespondent } from \"../../models/factories/respondentFactory\";\r\nimport {\r\n getSettingString,\r\n getSettingBoolean,\r\n getSettingEnum,\r\n} from \"../../models/utilities/settingUtilities\";\r\nimport {\r\n __isBlockVisible__,\r\n __isQuestionVisible__,\r\n __evaluateSafe__,\r\n} from \"../../expressions/parser\";\r\nimport { QuotaModel } from \"../../models/QuotaModel\";\r\nimport { QuotaStatus } from \"../../models/enums/QuotaStatus\";\r\nimport { createQuota } from \"../../models/factories/quotaFactory\";\r\nimport { quotasReducer } from \"../reducers/interview/quotasReducer\";\r\nimport { QuotaMetOrCloseActions } from \"../../models/enums/QuotaMetOrCloseAction\";\r\nimport {\r\n isExpired,\r\n getCompletionQuestion,\r\n getQuestionWithVariable,\r\n getTerminationOptions,\r\n getQuestionWithId,\r\n} from \"../../models/utilities/questionnaireUtilities\";\r\nimport { createQuestionnaire } from \"../../models/factories/questionnaireFactory\";\r\nimport { translate } from \"../../models/utilities/translationUtilities\";\r\nimport { NavigationResultModel } from \"../../models/NavigationResultModel\";\r\nimport {\r\n MiddlewareType,\r\n DispatchType,\r\n StoreType,\r\n NavigationShortcutType,\r\n SetVariableMentionsType,\r\n} from \"../actions/types\";\r\nimport {\r\n CONNECTION_START,\r\n AUDIO_RECORDING_START,\r\n AUDIO_RECORDING_STOP,\r\n LOOKUP_TABLE_FETCH,\r\n NAVIGATION_SHORTCUT,\r\n NAVIGATION_PREVIOUS_PAGE,\r\n NAVIGATION_NEXT_PAGE,\r\n NAVIGATION_QUIT,\r\n setNavigationEnabled,\r\n lookupTableReceive,\r\n deviceChanged,\r\n respondentChanged,\r\n quotasChanged,\r\n questionnaireChanged,\r\n setLoopRow,\r\n navigationQuit,\r\n changeLanguage,\r\n connectionConnected,\r\n navigationNextPage,\r\n quotasCloseStratum,\r\n quotasCloseUserStratum,\r\n navigationDisplayMessage,\r\n validationSetResult,\r\n serverPageChanged,\r\n setServerTrackedAnswers,\r\n NAVIGATION_PREVIEW_QUESTION,\r\n NAVIGATION_BRANCH_TO,\r\n SET_VARIABLE_MENTIONS,\r\n loadAnswersDto,\r\n VALIDATE_PAGE_ON_SERVER,\r\n refreshCurrentPageQuestions,\r\n validationClear,\r\n setCoordinates,\r\n setDefaultFocusStatus,\r\n resetMentions,\r\n respondentSetDispositionCode,\r\n} from \"../actions\";\r\nimport { BranchToOptions } from \"../../models/BranchToOptions\";\r\nimport {\r\n clearCurrentPageMentions,\r\n setVariableMention,\r\n} from \"../reducers/interview/variablesUtilities\";\r\nimport { VariablesState } from \"../../models/states/VariablesState\";\r\nimport { NavigationState } from \"../../models/states/NavigationState\";\r\nimport { SurveyMode } from \"../../models/enums/SurveyMode\";\r\nimport { StoreState } from \"../../models/states/StoreState\";\r\nimport {\r\n isVariableValidatedServerSide,\r\n validationErrorConverter,\r\n} from \"../../models/utilities/validationUtilities\";\r\nimport { trackEvent } from \"../../utils/Raygun\";\r\nimport { currentPageVariableDependencies } from \"../reducers/interview/navigationUtilities\";\r\nimport { TerminationAction } from \"../../models/enums/TerminationAction\";\r\nimport { pageReady } from \"./flowController\";\r\nimport { QueryParameters } from \"../../consts\";\r\nimport { applyCSS, generateCSS } from \"../../utils/dynamic-css/coreDynamicCss\";\r\nimport { selectNavigationDisabled } from \"../selectors/interview/navigation\";\r\nimport { createDispositionCode } from \"../../models/factories/dispositionCodeFactory\";\r\n\r\n/**\r\n * DEPRECATED: Please refer to thunks.ts as middlewares are not a good practice for connecting to an api.\r\n */\r\n\r\nconst TAG = \"apiConnector\";\r\nconst RECONNECTION_TIMEOUT = 600;\r\n\r\nlet apiUrl: string = null;\r\nlet psid: string = null;\r\nlet skey: string = null;\r\nlet lastScriptNodeIndex = -1;\r\n\r\nexport type DoneCallback = (result: any, code: number, time: number) => void;\r\n\r\ninterface SendOptions {\r\n data?: any;\r\n onDone?: DoneCallback;\r\n retry?: boolean;\r\n disableNavigation?: boolean;\r\n}\r\n\r\nfunction makeApiInterface(store: StoreType) {\r\n const send = (method: string, path: string, options: SendOptions = {}) => {\r\n const { data, onDone, retry, disableNavigation = true } = options;\r\n if (!path.startsWith(\"/\")) path = `/${path}`;\r\n const startTime = new Date().getTime();\r\n if (!apiUrl) return;\r\n const url = apiUrl + path + (psid ? `&${QueryParameters.PAGE_SESSION_ID}=${psid}` : \"\");\r\n Log.d(TAG, `${method} ${url}`, \"...\");\r\n if (disableNavigation) {\r\n store.dispatch(setNavigationEnabled(false));\r\n }\r\n (function performRequest() {\r\n const xhr = new XMLHttpRequest();\r\n xhr.open(method, url, true);\r\n xhr.addEventListener(\"load\", () => {\r\n const time = new Date().getTime() - startTime;\r\n trackEvent(url, time);\r\n if (xhr.readyState === 4) {\r\n Log.d(TAG, `${method} ${url}`, `${xhr.status} (${time}ms)`);\r\n let result: string | any = xhr.responseText;\r\n if (!isNullOrEmpty(xhr.responseText)) {\r\n try {\r\n result = JSON.parse(result);\r\n } catch (e) {\r\n Log.e(TAG, \"XHR_ERROR\", undefined, e);\r\n }\r\n }\r\n if (result && result.isLoading) {\r\n setTimeout(performRequest, RECONNECTION_TIMEOUT);\r\n return;\r\n }\r\n if (onDone) {\r\n onDone(result, xhr.status, time);\r\n }\r\n if (disableNavigation) {\r\n store.dispatch(setNavigationEnabled(true));\r\n }\r\n }\r\n });\r\n xhr.addEventListener(\"error\", (e) => {\r\n const time = new Date().getTime() - startTime;\r\n trackEvent(url, time);\r\n if (retry) {\r\n setTimeout(performRequest, RECONNECTION_TIMEOUT);\r\n return;\r\n }\r\n Log.e(TAG, `${method} ${url}`, `(${time}ms)`, e);\r\n if (onDone) onDone(xhr.statusText, 0, time);\r\n store.dispatch(setNavigationEnabled(true));\r\n });\r\n const tokenElement = document.getElementsByName(\r\n \"__RequestVerificationToken\",\r\n )[0] as HTMLInputElement;\r\n const token = tokenElement?.value || \"\";\r\n xhr.setRequestHeader(\"X-CSRF-TOKEN\", token);\r\n if (data != null) {\r\n const json = JSON.stringify(data);\r\n xhr.setRequestHeader(\"Content-Type\", \"application/json\");\r\n xhr.send(json);\r\n } else {\r\n xhr.send();\r\n }\r\n })();\r\n };\r\n\r\n const get = (path: string, options?: SendOptions) => send(\"GET\", path, options);\r\n const post = (path: string, options?: SendOptions) => send(\"POST\", path, options);\r\n const del = (path: string, options?: SendOptions) => send(\"DELETE\", path, options);\r\n const put = (path: string, options?: SendOptions) => send(\"PUT\", path, options);\r\n\r\n return { get, post, put, del };\r\n}\r\n\r\n// Converts quotas state to quotas DTO.\r\nconst quotasDto = (quotas: QuotaModel[]): any[] =>\r\n map(quotas, (quota) => ({\r\n ...quota,\r\n status: QuotaStatus[quota.status],\r\n userStatus: QuotaStatus[quota.userStatus],\r\n }));\r\n\r\n// Converts answer state to answers DTO for sending to A4S.\r\nconst answersDto = (\r\n state: StoreState,\r\n interviewVariables: VariablesState = state.interview.variables,\r\n) => {\r\n const { navigation, questionnaire } = state.interview;\r\n let { mentionsByVariableName } = interviewVariables;\r\n\r\n if (state.application.mode === SurveyMode.Normal) {\r\n mentionsByVariableName = getCurrentPageMentions(navigation, interviewVariables);\r\n }\r\n\r\n return map(mentionsByVariableName, (mentions, variableName) => ({\r\n variableName,\r\n questionType: getQuestionWithVariable(questionnaire, variableName)?.type,\r\n matrices: map(groupBy(mentions, \"matrix\"), (m, matrixIndex) => ({\r\n index: matrixIndex,\r\n mentions: m.map((mention) => ({\r\n index: mention.index,\r\n value: mention.value,\r\n openEnd: mention.openEnd,\r\n })),\r\n })),\r\n }));\r\n};\r\n\r\nconst getCurrentPageMentions = (\r\n navigation: NavigationState,\r\n interviewVariables: VariablesState,\r\n) => {\r\n const currentPageVariables = getPageVariables(navigation);\r\n return pickBy(interviewVariables.mentionsByVariableName, (_m, variableName) =>\r\n currentPageVariables?.some(\r\n (pageVariable) => pageVariable.toLocaleLowerCase() === variableName.toLocaleLowerCase(),\r\n ),\r\n );\r\n};\r\n\r\nexport const ApiBroadcaster = (store: StoreType) => {\r\n const { get, post, del } = makeApiInterface(store);\r\n\r\n return {\r\n audioRecordingStart(questionName: string, matrix: number) {\r\n get(`r/audiorecording/start?questionName=${questionName}&matrix=${matrix}`);\r\n },\r\n audioRecordingStop() {\r\n get(\"r/audiorecording/stop?\");\r\n },\r\n clearFile(variableName: string, matrix: number) {\r\n del(`r/clear?variableName=${variableName}&matrix=${matrix}`);\r\n },\r\n uploadFile(variableName: string, file: File) {\r\n if (file) {\r\n const xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", `/Upload?${QueryParameters.PAGE_SESSION_ID}=${psid}`, true);\r\n // xhr.setRequestHeader(\"Content-type\", \"file\");\r\n const data = new FormData();\r\n data.append(\"file\", file);\r\n xhr.send(data);\r\n }\r\n },\r\n fileUploadOpen(variableName: string, mimeType: string, matrix: number) {\r\n get(\r\n `r/filedialog/open?variableName=${variableName}&mimeType=${mimeType}&matrix=${matrix}`,\r\n );\r\n },\r\n openUploadedFile(variableName: string, matrix: number) {\r\n get(`r/openUploadedFile?variableName=${variableName}&matrix=${matrix}`);\r\n },\r\n lookupTableFetch(\r\n tableName: string,\r\n requestId: string,\r\n params: LookupTableParams,\r\n questionName: string,\r\n ) {\r\n const { interview } = store.getState();\r\n const language = interview.respondent.language || interview.language;\r\n get(\r\n encodeURI(\r\n `s/lookuptable?pageStart=${params.pageStart}&${QueryParameters.LANGUAGE}=${language}&pageLength=${params.pageLength}` +\r\n `&search=${params.search}&sortColumn=${params.sortColumn}&sqlFilter=${params.sqlFilter}&sortAsc=${params.sortAsc}` +\r\n `&selected=${params.selected.join(\r\n \",\",\r\n )}&questionName=${questionName}&tableName=${tableName}&requestId=${requestId}&columnFilters=${JSON.stringify(\r\n params.columnFilters,\r\n )}&includeSelected=${params.includeSelected}&excludeSelected=${\r\n params.excludeSelected\r\n }`,\r\n ),\r\n {\r\n onDone: (resume, code) => {\r\n if (code !== 200) {\r\n Log.e(\r\n TAG,\r\n \"LOOKUP_TABLE_ERROR\",\r\n \"An error occurred fetching the table.\",\r\n );\r\n return;\r\n }\r\n const page = resume && resume.hasOwnProperty(\"page\") ? resume.page : null;\r\n if (page)\r\n store.dispatch(\r\n lookupTableReceive(tableName, requestId, page, questionName),\r\n );\r\n },\r\n },\r\n );\r\n },\r\n quit(\r\n interview: InterviewState,\r\n disposition?: DispositionCode,\r\n options?: {\r\n message?: string;\r\n closedStrata?: boolean;\r\n redirectUrl?: string;\r\n forcedQuit?: boolean;\r\n discard?: boolean;\r\n questionId?: number;\r\n },\r\n onDone?: DoneCallback,\r\n ) {\r\n const params: { [key: string]: string | boolean | number | DateTime } = {};\r\n if (options && options.closedStrata) params.closedStrata = true;\r\n if (options && options.redirectUrl) params.redirectUrl = options.redirectUrl;\r\n if (options && options.message) params.message = options.message;\r\n if (options && options.forcedQuit) params.forcedQuit = true;\r\n if (options && options.discard) params.discard = true;\r\n if (options && options.questionId) params.questionId = options.questionId;\r\n if (disposition) params.disposition = disposition;\r\n\r\n params.language = interview.language;\r\n if (params.forcedQuit)\r\n get(\r\n `r/quit?${map(\r\n params,\r\n (value, key) => `${key}=${encodeURIComponent(value.toString())}`,\r\n ).join(\"&\")}`,\r\n { onDone },\r\n );\r\n },\r\n back(onDone?: DoneCallback) {\r\n // Clear all mentions in current page when click previous page if current page contains variables in errorsByVariableName\r\n const state = store.getState();\r\n const { interview } = state;\r\n Log.d(TAG, \"Clear Current Page Mentions if contains any error variables...\");\r\n const variablesWithErrors = Object.keys(interview.validation.errorsByVariableName);\r\n const currentPageVariables = getPageVariables(interview.navigation);\r\n const containsErrorVariable = currentPageVariables.some((variable) =>\r\n variablesWithErrors.includes(variable),\r\n );\r\n if (containsErrorVariable) {\r\n const currentPageMatrixIndex = interview.navigation.currentPage.loopIndex;\r\n const newVariableState = clearCurrentPageMentions(\r\n interview.variables,\r\n currentPageVariables,\r\n currentPageMatrixIndex,\r\n );\r\n store.dispatch(resetMentions(newVariableState.mentionsByVariableName));\r\n }\r\n const { mode } = state.application;\r\n const answers =\r\n mode === SurveyMode.Preview || mode === SurveyMode.Test ? answersDto(state) : null;\r\n post(\"r/back?\", {\r\n onDone,\r\n data: {\r\n answers,\r\n },\r\n });\r\n },\r\n shortcut(shortcut: NavigationShortcutType, onDone?: DoneCallback) {\r\n post(\"r/shortcut?\", { data: shortcut, onDone });\r\n },\r\n navigateTo(branchOptions: BranchToOptions, onDone?: DoneCallback) {\r\n const state = store.getState();\r\n const { mode } = state.application;\r\n const answers =\r\n mode === SurveyMode.Preview || mode === SurveyMode.Test ? answersDto(state) : null;\r\n\r\n post(\"r/navigateTo?\", {\r\n data: {\r\n destination: branchOptions.destination,\r\n isQuitButton: branchOptions.isQuitButton,\r\n isPreviewNavigation: branchOptions.isPreviewNavigation,\r\n answers,\r\n },\r\n onDone,\r\n });\r\n },\r\n next(onDone?: DoneCallback) {\r\n const { interview } = store.getState();\r\n Log.d(TAG, \"Saving interview state...\");\r\n const completionQuestion = getCompletionQuestion(interview.questionnaire);\r\n const hasCompletionQuestion =\r\n completionQuestion &&\r\n __isBlockVisible__(\r\n interview.questionnaire.blocks[completionQuestion.blockIndex],\r\n interview,\r\n ) &&\r\n __isQuestionVisible__(completionQuestion, interview);\r\n post(\"r/next?\", {\r\n data: {\r\n quotas: quotasDto(interview.quotas.output),\r\n answers: answersDto(store.getState()),\r\n hasCompletionQuestion,\r\n completionQuestionReached: interview.navigation.completionQuestionReached,\r\n respondent: interview.respondent,\r\n matrixByBlockName: interview.navigation.loopByBlockName,\r\n },\r\n onDone,\r\n });\r\n },\r\n setMentions(action: SetVariableMentionsType, onDone?: DoneCallback) {\r\n const { interview } = store.getState();\r\n Log.d(TAG, \"Saving variable mentions...\");\r\n const newVariableState = setVariableMention(\r\n interview.variables,\r\n interview.navigation,\r\n interview.questionnaire,\r\n action.variableName,\r\n action.matrixIndex,\r\n action.builder,\r\n );\r\n const variableDependencies = currentPageVariableDependencies(interview.navigation);\r\n if (variableDependencies.includes(action.variableName)) {\r\n post(\"r/setMentions?\", {\r\n disableNavigation: false,\r\n data: answersDto(store.getState(), newVariableState),\r\n onDone,\r\n });\r\n }\r\n },\r\n validatePage(onDone?: DoneCallback) {\r\n const { interview } = store.getState();\r\n Log.d(TAG, \"Validating page on server\");\r\n post(\"r/validatePage?\", {\r\n disableNavigation: false,\r\n data: {\r\n answers: answersDto(store.getState()),\r\n respondent: interview.respondent,\r\n matrixByBlockName: interview.navigation.loopByBlockName,\r\n },\r\n onDone,\r\n });\r\n },\r\n };\r\n};\r\n\r\nexport const getPageVariables = (navigation: NavigationState): string[] =>\r\n navigation?.currentPageOnServer?.questions?.flatMap((q) => q?.variables.flatMap((v) => v.name));\r\n\r\nconst executeActionForResult = (\r\n next: DispatchType,\r\n result: NavigationResultModel,\r\n action?: any,\r\n) => {\r\n if (result && result.answers) {\r\n next(loadAnswersDto(result.answers));\r\n }\r\n if (result.currentPage) {\r\n next(serverPageChanged(result.currentPage));\r\n }\r\n if (result.respondent) {\r\n next(\r\n respondentSetDispositionCode(createDispositionCode(result.respondent.dispositionCode)),\r\n );\r\n if (result.respondent.language) {\r\n next(changeLanguage(result.respondent.language));\r\n }\r\n }\r\n if (result.termination) {\r\n const options = {\r\n terminationSurveyAction: result.termination.action,\r\n redirectUrl: result.termination.value,\r\n message: result.termination.value,\r\n };\r\n next(navigationQuit(result.termination.dispositionCode, options));\r\n if (action && action.type === NAVIGATION_QUIT) {\r\n return;\r\n }\r\n }\r\n if (action) next(action);\r\n};\r\n\r\n// Connects to an api.\r\nconst start = (url: string, next: DispatchType, store: StoreType) => {\r\n const { get } = makeApiInterface(store);\r\n apiUrl = url;\r\n if (apiUrl.endsWith(\"/\")) apiUrl = apiUrl.slice(0, -1);\r\n psid = document.querySelector<HTMLInputElement>(\"#S2_SessionId\")?.value;\r\n skey = document.querySelector<HTMLInputElement>(\"#S2_SessionId_Skey\")?.value;\r\n url = getReloadSurveyUrl();\r\n history.replaceState({}, \"\", url);\r\n const date = DateTime.now();\r\n get(`preflight?=${new Date().getTime()}&dtoffset=${date.offset}`, {\r\n onDone: async (ready, code) => {\r\n if (code !== 200) {\r\n Log.e(TAG, \"PREFLIGHT_ERROR\", \"An error occurred executing preflight.\");\r\n return;\r\n }\r\n\r\n if (ready && ready.termination) {\r\n const { action: terminationAction, value } = ready.termination;\r\n switch (terminationAction) {\r\n case TerminationAction.DisplayMessage:\r\n store.dispatch(navigationDisplayMessage(value));\r\n break;\r\n case TerminationAction.RedirectToUrl: {\r\n const redirectUrl = value.indexOf(\"://\") === -1 ? `http://${value}` : value;\r\n window.location.href = redirectUrl;\r\n break;\r\n }\r\n default:\r\n store.dispatch(navigationDisplayMessage(value));\r\n break;\r\n }\r\n return;\r\n }\r\n\r\n store.dispatch(deviceChanged(ready.device));\r\n store.dispatch(respondentChanged(createRespondent(ready.respondent)));\r\n store.dispatch(quotasChanged(ready.strata));\r\n const isSimulated = ready.respondent.simulated;\r\n let invalidateCacheArg = \"\"; // invalidate caching of survey for preview\r\n if (ready.respondent.surveyVersion === 0) {\r\n invalidateCacheArg = `=${new Date().getTime()}`;\r\n }\r\n if (ready.surveyTitle) {\r\n document.title = ready.surveyTitle;\r\n }\r\n if (ready.preventIndexing) {\r\n const noindex = document.createElement(\"meta\");\r\n noindex.name = \"robots\";\r\n noindex.content = \"noindex\";\r\n document.head.appendChild(noindex);\r\n\r\n const nofollow = document.createElement(\"meta\");\r\n nofollow.name = \"robots\";\r\n nofollow.content = \"nofollow\";\r\n document.head.appendChild(nofollow);\r\n }\r\n\r\n if (!isNullOrEmpty(ready.customHead)) {\r\n await new Promise<void>((resolve) => {\r\n document.head.innerHTML += ready.customHead;\r\n nodeScriptReplace(document.head);\r\n if (lastScriptNodeIndex > -1) {\r\n (document.head.childNodes[\r\n lastScriptNodeIndex\r\n ] as HTMLScriptElement).onload = () => resolve();\r\n } else {\r\n resolve();\r\n }\r\n });\r\n }\r\n getNewSurveyFromApi(get, ready, invalidateCacheArg, store, isSimulated, next, date);\r\n },\r\n retry: true,\r\n });\r\n};\r\n\r\n/**\r\n * Closes half-open or open strata which have passed their objective.\r\n * Returns true if a stratum has been closed.\r\n */\r\nconst closeStrata = (store: StoreType) => {\r\n const { interview } = store.getState();\r\n // Simulate quotas without going through all reducers.\r\n const state = quotasReducer(interview.quotas, interview, navigationNextPage());\r\n // Close all stratas before returning.\r\n const closedStrata = [];\r\n for (const quota of state.output) {\r\n // Never consider stratum 0 as it is managed by container.\r\n if (quota.stratumId === 0) continue;\r\n // Evaluate condition lazily in case we have to evaluate twice.\r\n let evaluated: boolean;\r\n const evaluateLazy = () => {\r\n if (!evaluated) evaluated = __evaluateSafe__(interview, quota.condition).asBoolean();\r\n return evaluated;\r\n };\r\n // If the stratum has to be closed\r\n const objectiveSurpassed =\r\n quota.status === QuotaStatus.Closed || quota.frequency > quota.objective;\r\n const halfOpen = quota.status === QuotaStatus.HalfOpen;\r\n const userObjectiveSurpassed =\r\n quota.userStatus === QuotaStatus.Closed ||\r\n (quota.userObjective > 0 && quota.userFrequency > quota.userObjective);\r\n const userHalfOpen = quota.userStatus === QuotaStatus.HalfOpen;\r\n if ((objectiveSurpassed || halfOpen) && evaluateLazy()) {\r\n store.dispatch(quotasCloseStratum(quota.stratumId));\r\n closedStrata.push(quota);\r\n } else if ((userObjectiveSurpassed || userHalfOpen) && evaluateLazy()) {\r\n store.dispatch(quotasCloseUserStratum(quota.stratumId));\r\n closedStrata.push(quota);\r\n }\r\n }\r\n // Return true if any stratum is closed.\r\n return closedStrata.length > 0;\r\n};\r\n\r\n/**\r\n * Connects to a websocket server.\r\n */\r\nexport const apiConnector: MiddlewareType = (store) => (next) => (action) => {\r\n switch (action.type) {\r\n case CONNECTION_START:\r\n // Start the connection.\r\n start(action.url, next, store);\r\n break;\r\n case AUDIO_RECORDING_START:\r\n ApiBroadcaster(store).audioRecordingStart(action.questionName, action.matrix);\r\n break;\r\n case AUDIO_RECORDING_STOP:\r\n ApiBroadcaster(store).audioRecordingStop();\r\n break;\r\n case LOOKUP_TABLE_FETCH: {\r\n const result = next(action);\r\n const requestId = store.getState().lookupTable.requestId[action.questionName];\r\n ApiBroadcaster(store).lookupTableFetch(\r\n action.tableId,\r\n requestId,\r\n action.params,\r\n action.questionName,\r\n );\r\n return result;\r\n }\r\n case NAVIGATION_SHORTCUT: {\r\n ApiBroadcaster(store).shortcut(action, (result: NavigationResultModel) =>\r\n executeActionForResult(next, result, action),\r\n );\r\n return null;\r\n }\r\n case NAVIGATION_PREVIOUS_PAGE: {\r\n ApiBroadcaster(store).back((result: NavigationResultModel) => {\r\n if (result && result.strata) {\r\n store.dispatch(quotasChanged(result.strata));\r\n }\r\n executeActionForResult(next, result, action);\r\n });\r\n return null;\r\n }\r\n case NAVIGATION_NEXT_PAGE: {\r\n const { interview } = store.getState();\r\n // Iterate over quotas to exit out of quota surveys.\r\n if (\r\n closeStrata(store) &&\r\n getSettingBoolean(\r\n interview.questionnaire,\r\n \"CLOSED_STRATA_RULE\",\r\n \"BlockAllowInterviews\",\r\n )\r\n ) {\r\n // Exit with closedStrata: true so a warning can be displayed depending on survey rules.\r\n const closeAction = getSettingEnum(\r\n interview.questionnaire,\r\n QuotaMetOrCloseActions,\r\n \"QUOTA_ACTION\",\r\n );\r\n switch (closeAction) {\r\n case QuotaMetOrCloseActions.DisplayMessageAndExit: {\r\n const message = translate(\r\n interview.questionnaire,\r\n \"QuotaMetClosedMessage\",\r\n interview.respondent.language,\r\n );\r\n store.dispatch(navigationDisplayMessage(message));\r\n break;\r\n }\r\n case QuotaMetOrCloseActions.RedirectToUrl: {\r\n const redirectUrl = getSettingString(\r\n interview.questionnaire,\r\n \"QUOTA_ACTION_REDIRECT_URL\",\r\n );\r\n window.location.href = redirectUrl;\r\n break;\r\n }\r\n default:\r\n store.dispatch(navigationQuit(DispositionCode.OutOfQuota));\r\n }\r\n // Prevent further navigation.\r\n return null;\r\n }\r\n\r\n ApiBroadcaster(store).next((result: NavigationResultModel) => {\r\n if (result && result.strata) {\r\n store.dispatch(quotasChanged(result.strata));\r\n }\r\n if (result.errors && result.errors.length) {\r\n const validationResult = validationErrorConverter(result.errors);\r\n store.dispatch(validationClear(true, true));\r\n store.dispatch(validationSetResult(validationResult));\r\n executeActionForResult(next, result);\r\n return;\r\n }\r\n\r\n // When Page changes, clear the focus status information in store\r\n const state = store.getState();\r\n const { defaultFocusStatus } = state;\r\n defaultFocusStatus.statuses = [];\r\n store.dispatch(setDefaultFocusStatus(defaultFocusStatus));\r\n\r\n if (result && result.termination) {\r\n const { action: terminationAction, value } = result.termination;\r\n switch (terminationAction) {\r\n case TerminationAction.DisplayMessage:\r\n store.dispatch(\r\n navigationQuit(\r\n result.termination.dispositionCode || DispositionCode.Completed,\r\n { message: value, terminationSurveyAction: terminationAction },\r\n ),\r\n );\r\n break;\r\n case TerminationAction.RedirectToUrl: {\r\n const url = value.indexOf(\"://\") === -1 ? `http://${value}` : value;\r\n window.location.href = url;\r\n break;\r\n }\r\n default:\r\n executeActionForResult(next, result, action);\r\n }\r\n } else {\r\n executeActionForResult(next, result, action);\r\n pageReady(store);\r\n }\r\n });\r\n\r\n return null;\r\n }\r\n case NAVIGATION_QUIT: {\r\n const { dispositionCode } = action;\r\n const state = store.getState();\r\n const options = {\r\n ...getTerminationOptions(\r\n state.interview.questionnaire,\r\n state.interview.language,\r\n dispositionCode,\r\n ),\r\n ...action.options,\r\n };\r\n ApiBroadcaster(store).quit(\r\n store.getState().interview,\r\n dispositionCode,\r\n options,\r\n (result: NavigationResultModel) => {\r\n executeActionForResult(next, result, action);\r\n },\r\n );\r\n if (!options?.forcedQuit) {\r\n return next(action);\r\n }\r\n return null;\r\n }\r\n case NAVIGATION_BRANCH_TO: {\r\n ApiBroadcaster(store).navigateTo(action.options, (result: NavigationResultModel) =>\r\n executeActionForResult(next, result, action),\r\n );\r\n break;\r\n }\r\n case NAVIGATION_PREVIEW_QUESTION: {\r\n const questionName = getQuestionWithId(\r\n store.getState().interview.questionnaire,\r\n action.questionId,\r\n )?.name;\r\n if (questionName) {\r\n ApiBroadcaster(store).navigateTo(\r\n {\r\n destination: questionName,\r\n isPreviewNavigation: true,\r\n },\r\n (result: NavigationResultModel) => executeActionForResult(next, result, action),\r\n );\r\n }\r\n\r\n break;\r\n }\r\n case SET_VARIABLE_MENTIONS: {\r\n ApiBroadcaster(store).setMentions(action, (result: NavigationResultModel) => {\r\n if (!selectNavigationDisabled(store.getState())) {\r\n next(refreshCurrentPageQuestions(result.currentPage));\r\n if (result && result.answers) {\r\n next(loadAnswersDto(result.answers));\r\n }\r\n }\r\n });\r\n break;\r\n }\r\n case VALIDATE_PAGE_ON_SERVER: {\r\n ApiBroadcaster(store).validatePage((result: NavigationResultModel) => {\r\n const { navigation, useClientValidation } = store.getState().interview;\r\n const errors = result.errors?.filter((error) =>\r\n isVariableValidatedServerSide(\r\n error.variableName.split(\"$\")[0],\r\n navigation,\r\n useClientValidation,\r\n ),\r\n );\r\n if (errors && errors.length) {\r\n const validationResult = validationErrorConverter(result.errors);\r\n store.dispatch(validationSetResult(validationResult));\r\n }\r\n });\r\n break;\r\n }\r\n default:\r\n break;\r\n }\r\n\r\n return next(action);\r\n};\r\n\r\nconst nodeScriptReplace = (node) => {\r\n const scriptTagName = \"SCRIPT\";\r\n if (node.tagName === scriptTagName) {\r\n node.parentNode.replaceChild(nodeScriptClone(node), node);\r\n } else {\r\n let i = -1;\r\n const children = node.childNodes;\r\n while (++i < children.length) {\r\n const childNode = children[i];\r\n nodeScriptReplace(childNode);\r\n if (\r\n childNode.tagName === scriptTagName &&\r\n childNode.attributes.length > 0 &&\r\n childNode.attributes.src\r\n ) {\r\n lastScriptNodeIndex = i;\r\n }\r\n }\r\n }\r\n\r\n return node;\r\n};\r\n\r\nconst nodeScriptClone = (node) => {\r\n const script = document.createElement(\"script\");\r\n script.text = node.innerHTML;\r\n\r\n let i = -1;\r\n const { attributes } = node;\r\n let attribute;\r\n while (++i < attributes.length) {\r\n script.setAttribute((attribute = attributes[i]).name, attribute.value);\r\n }\r\n script.async = false;\r\n\r\n return script;\r\n};\r\nconst getNewSurveyFromApi = (\r\n get: (path: string, options?: SendOptions) => void,\r\n { respondent, answers, quotas, currentPage }: any,\r\n invalidateCacheArg: string,\r\n store: StoreType,\r\n isSimulated: any,\r\n next: DispatchType,\r\n date: DateTime,\r\n) => {\r\n get(\r\n `s/${respondent.surveyId}/v/${respondent.surveyVersion}/survey.json?${invalidateCacheArg}`,\r\n {\r\n onDone: (data, result) => {\r\n if (result !== 200) {\r\n Log.e(TAG, \"SURVEY_ERROR\", \"An error occurred downloading the survey.\");\r\n return;\r\n }\r\n\r\n if (data.theme?.settings?.DynamicCss) {\r\n try {\r\n const css = generateCSS(\r\n data.theme.settings,\r\n data.theme.settings.DynamicCss,\r\n );\r\n\r\n applyCSS(css);\r\n } catch (e) {\r\n Log.e(TAG, \"APPLY_CSS_ERROR\", \"An error occurred applying the css.\", e);\r\n }\r\n }\r\n\r\n const questionnaire = createQuestionnaire(data);\r\n // Check if we should collect the respondent's location.\r\n const location = getSettingBoolean(\r\n questionnaire,\r\n \"COLLECT_RESPONDENT_GEO_LOCATION\",\r\n );\r\n // Change the survey.\r\n store.dispatch(questionnaireChanged(questionnaire));\r\n // Reset all block loop rows.\r\n forOwn(respondent.matrixByBlockName, (v, k) => {\r\n store.dispatch(setLoopRow(k, v));\r\n });\r\n // Check if the survey is expired.\r\n if (!isSimulated && isExpired(questionnaire)) {\r\n // Discard the respondent and close the survey.\r\n const message = translate(\r\n questionnaire,\r\n \"InactiveSurveyMessage\",\r\n store.getState().interview.language,\r\n );\r\n store.dispatch(\r\n navigationQuit(DispositionCode.Dropped, {\r\n message,\r\n discard: true,\r\n }),\r\n );\r\n return;\r\n }\r\n // If we have answers, load them.\r\n if (answers) {\r\n next(loadAnswersDto(answers));\r\n store.dispatch(setServerTrackedAnswers(answers));\r\n }\r\n // Build the current page on server\r\n store.dispatch(serverPageChanged(currentPage));\r\n // If we have quotas, load them.\r\n if (quotas) {\r\n store.dispatch(quotasChanged(quotas.map(createQuota)));\r\n }\r\n if (respondent.language) {\r\n store.dispatch(changeLanguage(respondent.language));\r\n }\r\n // Notify the connection has been established.\r\n store.dispatch(connectionConnected(apiUrl));\r\n\r\n if (location && navigator.geolocation) {\r\n navigator.geolocation.getCurrentPosition(\r\n (position) => {\r\n const { latitude, longitude } = position.coords;\r\n store.dispatch(setCoordinates(latitude, longitude));\r\n get(`/r/ready?tzid=${date.zoneName}&lat=${latitude}&lon=${longitude}`);\r\n },\r\n (error) => {\r\n get(\r\n `/r/ready?tzid=${date.zoneName}&errormessage=${encodeURIComponent(\r\n error.message,\r\n )}`,\r\n );\r\n },\r\n );\r\n } else {\r\n get(`/r/ready?tzid=${date.zoneName}`);\r\n }\r\n },\r\n },\r\n );\r\n};\r\n\r\nconst getReloadSurveyUrl = () => {\r\n const path = \"/rs\";\r\n if (!navigator.cookieEnabled)\r\n return apiUrl + path + (psid ? `?${QueryParameters.PAGE_SESSION_ID}=${psid}` : \"\");\r\n return apiUrl + path + (skey ? `?${QueryParameters.SESSION_KEY}=${skey}` : \"\");\r\n};\r\n","import { DispositionCode } from \"../enums/DispositionCode\";\r\n\r\nexport function createDispositionCode(el?: any): DispositionCode {\r\n if (el == null) return undefined;\r\n return DispositionCode[el as keyof DispositionCode];\r\n}\r\n","export enum ValueType {\r\n Absolute,\r\n Variable,\r\n Formula,\r\n}\r\n","import { isEmpty, isEqual, last } from \"../../utils/lodash\";\r\nimport { QuestionActionType } from \"../../models/enums/QuestionActionType\";\r\nimport {\r\n __isQuestionVisible__,\r\n __evaluateSafe__,\r\n __isBlockVisible__,\r\n} from \"../../expressions/parser\";\r\nimport { ActionModel as QuestionAction } from \"../../models/ActionModel\";\r\nimport {\r\n branchTo,\r\n exitSurvey,\r\n setVariableValue,\r\n mobileAudioRecording,\r\n computeVariable,\r\n computeSelections,\r\n setloopRow,\r\n resumeLastSession,\r\n} from \"../../logic/questionLogic\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { Log } from \"../../utils/logging\";\r\nimport { DispositionCode } from \"../../models/enums/DispositionCode\";\r\nimport { getSettingString } from \"../../models/utilities/settingUtilities\";\r\nimport { hasNextPage } from \"../reducers/interview/navigationUtilities\";\r\nimport { PageModel } from \"../../models/PageModel\";\r\nimport { QuestionType } from \"../../models/enums/QuestionType\";\r\nimport {\r\n shouldExecuteResumeActions,\r\n getCompletionQuestion,\r\n getQuestionWithName,\r\n} from \"../../models/utilities/questionnaireUtilities\";\r\nimport { MentionModel } from \"../../models/MentionModel\";\r\nimport { MiddlewareType, StoreType, DispatchType } from \"../actions/types\";\r\nimport {\r\n navigationNextPage,\r\n navigationCompletionQuestionReached,\r\n navigationQuit,\r\n resetMentions,\r\n respondentSetEmail,\r\n respondentSetTimeZone,\r\n changeLanguage,\r\n respondentSetPhone,\r\n setVariableMentions,\r\n navigationPageReady,\r\n navigationReset,\r\n navigationPreviousPage,\r\n navigationDisplayMessage,\r\n NAVIGATION_NEXT_PAGE,\r\n NAVIGATION_PREVIOUS_PAGE,\r\n NAVIGATION_SHORTCUT,\r\n NAVIGATION_BRANCH_TO,\r\n NAVIGATION_RESET,\r\n CONNECTION_CONNECTED,\r\n NAVIGATION_PAGE_READY,\r\n invalidateClientVariables,\r\n SERVER_PAGE_CHANGED,\r\n} from \"../actions\";\r\n\r\nconst TAG = \"flowController\";\r\n\r\nlet mentionsBackup: { [variableName: string]: MentionModel[] };\r\nlet respondentInfoBackup: any;\r\n\r\nconst getCurrentPage = (store: StoreType): PageModel =>\r\n store.getState().interview.navigation.currentPage;\r\n\r\nconst getDisplayedQuestions = (store: StoreType) =>\r\n getCurrentPage(store).questions.filter((q) =>\r\n __isQuestionVisible__(q, store.getState().interview),\r\n );\r\n\r\nconst shouldExecuteAction = (store: StoreType, action: QuestionAction): boolean => {\r\n if (action.condition === undefined) return true;\r\n const result = __evaluateSafe__(store.getState().interview, action.condition).asBoolean();\r\n Log.d(\r\n TAG,\r\n \"SHOULD_EXECUTE_ACTION\",\r\n `${QuestionActionType[action.type]}:(${action.condition.expression})=${\r\n result ? \"TRUE\" : \"FALSE\"\r\n }`,\r\n );\r\n return result;\r\n};\r\n\r\nconst nextPage = (store: StoreType, next: DispatchType) => {\r\n const prevNavState = store.getState().interview.navigation;\r\n // Navigate to the next page, keeping a reference of previous nav state.\r\n next(navigationNextPage());\r\n const navState = store.getState().interview.navigation;\r\n // Check if the completion question has been reached.\r\n if (!navState.completionQuestionReached) {\r\n const { interview } = store.getState();\r\n const completionQuestion = getCompletionQuestion(interview.questionnaire);\r\n // Check if the completion question exists.\r\n if (\r\n completionQuestion &&\r\n // Check if the current question is after the completion question.\r\n (navState.blockIndex > completionQuestion.blockIndex ||\r\n (navState.blockIndex === completionQuestion.blockIndex &&\r\n navState.questionIndex >= completionQuestion.index)) &&\r\n // Check if the block of the completion question is skipped.\r\n __isBlockVisible__(\r\n navState.randomizedBlocks[completionQuestion.blockIndex],\r\n interview,\r\n ) &&\r\n // Check if the completion question is skipped.\r\n __isQuestionVisible__(completionQuestion, interview)\r\n ) {\r\n // The completion question has been reached.\r\n store.dispatch(navigationCompletionQuestionReached());\r\n }\r\n }\r\n // If we got the same page, we have reached the end of the survey.\r\n if (prevNavState === navState) {\r\n store.dispatch(navigationQuit(DispositionCode.Completed));\r\n return false;\r\n }\r\n return true;\r\n};\r\n\r\nconst clearMentions = (store: StoreType, next: DispatchType) => {\r\n const { respondent, variables } = store.getState().interview;\r\n if (variables.mentionsByVariableName !== mentionsBackup) {\r\n next(resetMentions(mentionsBackup));\r\n }\r\n\r\n if (respondentInfoBackup) {\r\n if (respondent.email !== respondentInfoBackup.email)\r\n next(respondentSetEmail(respondentInfoBackup.email));\r\n if (respondent.timeZone !== respondentInfoBackup.timeZone)\r\n next(respondentSetTimeZone(respondentInfoBackup.timeZone));\r\n if (respondent.language !== respondentInfoBackup.language)\r\n next(changeLanguage(respondentInfoBackup.language));\r\n if (respondent.phone !== respondentInfoBackup.phone)\r\n next(respondentSetPhone(respondentInfoBackup.phone));\r\n }\r\n};\r\n\r\n/**\r\n * Finds the question the interview should begin at, which is either RESUME_COMPLETED_QUESTION,\r\n * RESUME_NOT_COMPLETED_QUESTION, the survey's START_QUESTION, the server current question, the last answered question or undefined.\r\n */\r\nconst getStartQuestion = (store: StoreType) => {\r\n const { interview } = store.getState();\r\n const { respondent, questionnaire } = interview;\r\n\r\n // Create a helper method to find a question by name and return it.\r\n let question: QuestionModel = null;\r\n const findQuestion = (name: string) => (question = getQuestionWithName(questionnaire, name));\r\n // If the respondent is resumed.\r\n if (!respondent.isNew) {\r\n // If the respondent is completed, find RESUME_COMPLETED_QUESTION.\r\n if (\r\n respondent.dispositionCode === DispositionCode.Completed &&\r\n findQuestion(getSettingString(questionnaire, \"RESUME_COMPLETED_QUESTION\"))\r\n )\r\n return question;\r\n // If the respondent is completed, find RESUME_NOT_COMPLETED_QUESTION.\r\n if (\r\n respondent.dispositionCode !== DispositionCode.Completed &&\r\n findQuestion(getSettingString(questionnaire, \"RESUME_NOT_COMPLETED_QUESTION\"))\r\n )\r\n return question;\r\n }\r\n // If there is a start question.\r\n if (findQuestion(getSettingString(questionnaire, \"START_QUESTION\"))) return question;\r\n // If all else fails, return the last answered question or undefined if it does not exist.\r\n return findQuestion(respondent.prevSessionLastAnsweredQuestion);\r\n};\r\n\r\n/**\r\n * Returns true if the respondent is resumed to the last answered question or to the START_QUESTION,\r\n * RESUME_COMPLETED_QUESTION or RESUME_NOT_COMPLETED_QUESTION.\r\n */\r\nconst isRespondentResumed = (store: StoreType) => {\r\n const respondent = store.getState().interview.respondent;\r\n const questionnaire = store.getState().interview.questionnaire;\r\n // Create a helper method to find a question by name and return if it exists.\r\n const questionExists = (name: string) => getQuestionWithName(questionnaire, name) != null;\r\n // If the respondent is resumed.\r\n if (!respondent.isNew) {\r\n // If the respondent is completed, find RESUME_COMPLETED_QUESTION.\r\n if (\r\n respondent.dispositionCode === DispositionCode.Completed &&\r\n questionExists(getSettingString(questionnaire, \"RESUME_COMPLETED_QUESTION\"))\r\n )\r\n return false;\r\n // If the respondent is completed, find RESUME_NOT_COMPLETED_QUESTION.\r\n if (\r\n respondent.dispositionCode !== DispositionCode.Completed &&\r\n questionExists(getSettingString(questionnaire, \"RESUME_NOT_COMPLETED_QUESTION\"))\r\n )\r\n return false;\r\n }\r\n // If there is a start question.\r\n if (questionExists(getSettingString(questionnaire, \"START_QUESTION\"))) return false;\r\n // If all else fails, return true.\r\n return true;\r\n};\r\n\r\n/**\r\n * Dispatch a single action from a question.\r\n * Returns true if navigation should be interrupted.\r\n */\r\nconst dispatchAction = (\r\n store: StoreType,\r\n next: DispatchType,\r\n question: QuestionModel,\r\n action: QuestionAction,\r\n) => {\r\n const transformAction: any = {\r\n [QuestionActionType.BranchTo]: () => branchTo(store, question, action),\r\n [QuestionActionType.ExitSurvey]: () => exitSurvey(store, action),\r\n [QuestionActionType.SetVariableValue]: () => setVariableValue(store, action),\r\n [QuestionActionType.MobileAudioRecording]: () => mobileAudioRecording(store, action),\r\n [QuestionActionType.ComputeVariable]: () => computeVariable(store, action),\r\n [QuestionActionType.Selection]: () => computeSelections(store, action),\r\n [QuestionActionType.SetLoopRow]: () => setloopRow(store, action),\r\n [QuestionActionType.ResumeLastSession]: () => resumeLastSession(store, question, action),\r\n [QuestionActionType.ExecuteSQL]: () => store.dispatch(invalidateClientVariables()),\r\n };\r\n if (transformAction[action.type] != null) return transformAction[action.type]();\r\n};\r\n\r\n/**\r\n * Dispatch actions from a question.\r\n *\r\n * Returns true when an action is preventing future actions from executing.\r\n * e.g. a branching action.\r\n */\r\nconst dispatchQuestionActions = (\r\n store: StoreType,\r\n next: DispatchType,\r\n question: QuestionModel,\r\n questionActions: QuestionAction[],\r\n skipAdvancedActions?: boolean,\r\n) => {\r\n for (const action of questionActions || []) {\r\n // Skip advanced actions.\r\n if (skipAdvancedActions && action.type !== QuestionActionType.BranchTo) continue;\r\n // Do not execute the action if the logic returns false.\r\n if (!shouldExecuteAction(store, action)) continue;\r\n // Dispatch the action.\r\n if (dispatchAction(store, next, question, action)) return true; // Return true to prevent future actions from executing.\r\n }\r\n};\r\n\r\n/**\r\n * Executes post answer actions for all displayed questions.\r\n *\r\n * Returns false if an action is preventing future actions from executing.\r\n * e.g. a branching action.\r\n */\r\nconst executePostAnswerActions = (\r\n store: StoreType,\r\n next: DispatchType,\r\n skipAdvancedActions?: boolean,\r\n) => {\r\n for (const question of getDisplayedQuestions(store)) {\r\n if (\r\n dispatchQuestionActions(\r\n store,\r\n next,\r\n question,\r\n question.postAnswerActions,\r\n skipAdvancedActions,\r\n )\r\n )\r\n return true;\r\n }\r\n};\r\n\r\n/**\r\n * Executes side-effects from questions in the page.\r\n *\r\n * Returns false if an action is preventing future actions from executing.\r\n * e.g. a branching action.\r\n */\r\nconst executeSideEffects = (store: StoreType, next: DispatchType) => {\r\n const metaData = getDisplayedQuestions(store).find(\r\n (question) => question.type === QuestionType.RespondentMetaData,\r\n );\r\n\r\n if (metaData) {\r\n const UAParser = require(\"ua-parser-js\");\r\n const ua = new UAParser().getResult();\r\n const browserLanguageVar = getSettingString(metaData, \"BrowserLanguageVariableName\");\r\n const ipAddressVar = getSettingString(metaData, \"IpAddressVariableName\");\r\n const javaSupportVar = getSettingString(metaData, \"JavaSupportVariableName\");\r\n const operatingSystemVar = getSettingString(metaData, \"OperatingSystemVariableName\");\r\n const refererVar = getSettingString(metaData, \"RefererVariableName\");\r\n const userAgentVar = getSettingString(metaData, \"UserAgentVariableName\");\r\n const { ipAddress } = store.getState().interview.respondent;\r\n if (!isEmpty(browserLanguageVar) && typeof window !== \"undefined\")\r\n next(\r\n setVariableMentions(browserLanguageVar, (m) => m.set(window?.navigator?.language)),\r\n );\r\n if (!isEmpty(ipAddressVar))\r\n next(setVariableMentions(ipAddressVar, (m) => m.set(ipAddress)));\r\n if (!isEmpty(javaSupportVar) && typeof window !== \"undefined\") {\r\n next(\r\n setVariableMentions(javaSupportVar, (m) =>\r\n m.set(window.navigator.javaEnabled() ? \"True\" : \"False\"),\r\n ),\r\n );\r\n }\r\n if (!isEmpty(operatingSystemVar)) {\r\n next(\r\n setVariableMentions(operatingSystemVar, (m) =>\r\n m.set(`${ua.os.name} ${ua.os.version}`),\r\n ),\r\n );\r\n }\r\n if (!isEmpty(refererVar) && typeof window !== \"undefined\")\r\n next(setVariableMentions(refererVar, (m) => m.set(window.location.href)));\r\n if (!isEmpty(userAgentVar)) {\r\n next(\r\n setVariableMentions(userAgentVar, (m) =>\r\n m.set(`${ua.browser.name} ${ua.browser.version}`),\r\n ),\r\n );\r\n }\r\n if (\r\n !getDisplayedQuestions(store).some(\r\n (question) => question.type !== QuestionType.RespondentMetaData,\r\n )\r\n ) {\r\n nextPage(store, next);\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\n/**\r\n * Executes pre-load answer actions for all displayed questions.\r\n *\r\n * Returns false if an action is preventing future actions from executing.\r\n * e.g. a branching action.\r\n */\r\nconst executePreLoadActions = (\r\n store: StoreType,\r\n next: DispatchType,\r\n skipAdvancedActions?: boolean,\r\n) => {\r\n for (const question of getDisplayedQuestions(store)) {\r\n if (\r\n dispatchQuestionActions(\r\n store,\r\n next,\r\n question,\r\n question.preLoadActions,\r\n skipAdvancedActions,\r\n )\r\n )\r\n return true;\r\n }\r\n};\r\n\r\n/**\r\n * Validates pages in a loop making sure they don't appear twice.\r\n */\r\nconst createInfiniteLoopValidator = () => {\r\n const stack = [];\r\n\r\n function pageQuestionIndices(page: PageModel) {\r\n return page.questions.map((q) => q.index);\r\n }\r\n\r\n function stackContainsPage(page: PageModel) {\r\n const questionIndices = pageQuestionIndices(page);\r\n return stack.some((p) => {\r\n if (p.blockIndex !== page.blockIndex || p.loopIndex !== page.loopIndex) return false;\r\n return isEqual(p.questionIndices, questionIndices);\r\n });\r\n }\r\n\r\n function validate(page: PageModel) {\r\n if (stackContainsPage(page)) return false;\r\n const { blockIndex, loopIndex } = page;\r\n stack.push({ blockIndex, loopIndex, questionIndices: pageQuestionIndices(page) });\r\n return true;\r\n }\r\n\r\n return validate;\r\n};\r\n\r\n/**\r\n * Evaluates preload actions and skips all empty pages until it lands on a valid page.\r\n */\r\nconst navigateToFirstValidPage = (\r\n store: StoreType,\r\n next: DispatchType,\r\n skipAdvancedActions?: boolean,\r\n) => {\r\n // Loop indefinitely.\r\n const loopValidator = createInfiniteLoopValidator();\r\n while (true) {\r\n const currentPage = getCurrentPage(store);\r\n\r\n // If the page is already valid, return.\r\n if (currentPage.isReady) {\r\n return;\r\n }\r\n\r\n // Make sure we don't go in an infinite loop by checking the stack.\r\n if (!loopValidator(currentPage)) {\r\n Log.e(TAG, \"INFINITE_LOOP_DETECTED\", `An infinite loop was detected.`);\r\n break;\r\n }\r\n\r\n // Execute question side-effects (ex. Respondent Metadata).\r\n if (!executeSideEffects(store, next)) {\r\n // A branching action changed the current page.\r\n continue;\r\n }\r\n\r\n // If the page has no visible questions, go to the next page.\r\n if (getDisplayedQuestions(store).length === 0) {\r\n Log.d(TAG, \"PAGE_EMPTY\", \"Page has no visible questions, navigating to the next page.\");\r\n if (!nextPage(store, next)) {\r\n return;\r\n }\r\n continue;\r\n }\r\n\r\n // Execute preload actions for the current page.\r\n if (executePreLoadActions(store, next, skipAdvancedActions)) {\r\n // A branching action changed the current page.\r\n if (getCurrentPage(store) !== currentPage) continue;\r\n }\r\n\r\n // The page is valid, notify the store that the page is ready to be rendered and break.\r\n store.dispatch(navigationPageReady());\r\n break;\r\n }\r\n};\r\n\r\n/**\r\n * Navigate to the start question, executing question actions along the way.\r\n */\r\nconst navigateToStartQuestion = (store: StoreType, next: DispatchType) => {\r\n // Get the start question.\r\n const startQuestion = getStartQuestion(store);\r\n const { questionnaire } = store.getState().interview;\r\n const skipAdvancedActions = !shouldExecuteResumeActions(questionnaire);\r\n\r\n // If there is no start question, just return the first page.\r\n if (!startQuestion) {\r\n next(navigationReset());\r\n navigateToFirstValidPage(store, next);\r\n return;\r\n }\r\n\r\n Log.i(TAG, \"NAVIGATE_TO_START_QUESTION\", startQuestion.name);\r\n if (skipAdvancedActions) {\r\n Log.i(TAG, \"NAVIGATE_TO_START_QUESTION\", `Skipping advanced actions.`);\r\n }\r\n\r\n // Find the start question matrix from restored state.\r\n const startBlock = store.getState().interview.questionnaire.blocks[startQuestion.blockIndex];\r\n const startMatrix =\r\n store.getState().interview.navigation.loopByBlockName[startBlock.name.toUpperCase()] || 1;\r\n\r\n // Reset navigation to the start of the survey.\r\n next(navigationReset());\r\n\r\n // Try to navigate to the start question.\r\n const loopValidator = createInfiniteLoopValidator();\r\n\r\n while (true) {\r\n const currentPage = getCurrentPage(store);\r\n\r\n // Make sure we don't go in an infinite loop by checking the stack.\r\n if (!loopValidator(currentPage)) {\r\n Log.e(\r\n TAG,\r\n \"INFINITE_LOOP_DETECTED\",\r\n `An infinite loop was detected navigating to start question \"${startQuestion.name}\".`,\r\n );\r\n break;\r\n }\r\n\r\n // Check if the page has some questions.\r\n const displayedQuestions = getDisplayedQuestions(store);\r\n if (displayedQuestions.length === 0) {\r\n Log.d(TAG, \"PAGE_EMPTY\", \"Page has no visible questions, navigating to the next page.\");\r\n // Go to the next page and restart the loop.\r\n if (!nextPage(store, next)) {\r\n return;\r\n }\r\n continue;\r\n }\r\n\r\n // Check if the current page contains the question or if we passed it already.\r\n const lastQuestion = last(displayedQuestions);\r\n const didPassLoop = currentPage.loopIndex >= startMatrix;\r\n const isCurrentBlock = currentPage.blockIndex === startQuestion.blockIndex && didPassLoop;\r\n const didPassBlock = currentPage.blockIndex > startQuestion.blockIndex;\r\n const didPassQuestion =\r\n didPassBlock || (lastQuestion.index >= startQuestion.index && isCurrentBlock);\r\n\r\n if (didPassQuestion) {\r\n // If we were navigating to the last answered question and there is a next page, go to the next page.\r\n // Otherwise the page contains the start question so we should not skip it.\r\n if (\r\n isRespondentResumed(store) &&\r\n hasNextPage(store.getState().interview.navigation) &&\r\n lastQuestion.index === startQuestion.index\r\n ) {\r\n // Notify the page is ready so it gets saved in history.\r\n store.dispatch(navigationPageReady());\r\n\r\n if (getCurrentPage(store).previewQuestion) {\r\n return;\r\n }\r\n\r\n // Execute post-answer actions for this page.\r\n if (executePostAnswerActions(store, next, skipAdvancedActions)) {\r\n // An action resulted in a page change, restart the loop.\r\n continue;\r\n }\r\n\r\n // Navigate to the next page.\r\n if (!nextPage(store, next)) {\r\n return;\r\n }\r\n\r\n // If the page is empty, go back.\r\n if (getCurrentPage(store).questions.length === 0) {\r\n next(navigationPreviousPage());\r\n }\r\n }\r\n\r\n // We have found the start page; return.\r\n navigateToFirstValidPage(store, next, skipAdvancedActions);\r\n return;\r\n }\r\n\r\n // Execute pre-load actions in the current page.\r\n if (executePreLoadActions(store, next, skipAdvancedActions)) {\r\n // An action resulted in a page change, restart the loop.\r\n continue;\r\n }\r\n\r\n // Notify the page is ready so it gets saved in history.\r\n store.dispatch(navigationPageReady());\r\n\r\n if (getCurrentPage(store).previewQuestion) {\r\n return;\r\n }\r\n\r\n // Execute post-answer actions in the current page.\r\n if (executePostAnswerActions(store, next, skipAdvancedActions)) {\r\n // An action resulted in a page change, restart the loop.\r\n continue;\r\n }\r\n\r\n // If we have reached the end of the survey, break the loop.\r\n if (!hasNextPage(store.getState().interview.navigation)) {\r\n break;\r\n }\r\n\r\n // Go to the next page and restart the loop.\r\n if (!nextPage(store, next)) {\r\n return;\r\n }\r\n }\r\n\r\n Log.w(TAG, \"NAVIGATE_TO_START_QUESTION\", `Start question \"${startQuestion.name}\" not found.`);\r\n\r\n // Reset navigation and display the first page.\r\n next(navigationReset());\r\n navigateToFirstValidPage(store, next, skipAdvancedActions);\r\n};\r\n\r\nexport const pageReady = (store: StoreType) => {\r\n const { respondent, variables } = store.getState().interview;\r\n mentionsBackup = variables.mentionsByVariableName;\r\n respondentInfoBackup = {\r\n email: respondent.email,\r\n language: respondent.language,\r\n timeZone: respondent.timeZone,\r\n phone: respondent.phone,\r\n };\r\n};\r\n\r\n/**\r\n * Execute preload and post-answer actions on page changes.\r\n */\r\nexport const flowController: MiddlewareType = (store) => (next) => (action) => {\r\n // Catch all errors regarding navigation and crash the survey.\r\n try {\r\n // If the current page on surver is unknown, use this flowController\r\n if (!store.getState().interview.navigation?.currentPageOnServer) {\r\n switch (action.type) {\r\n case NAVIGATION_NEXT_PAGE: {\r\n // If the current page was rendered, execute post answer actions before changing page.\r\n if (getCurrentPage(store).isReady && executePostAnswerActions(store, next))\r\n return action;\r\n if (nextPage(store, next)) navigateToFirstValidPage(store, next);\r\n return action;\r\n }\r\n case NAVIGATION_PREVIOUS_PAGE: {\r\n clearMentions(store, next);\r\n const result = next(action);\r\n // Page is ready to render.\r\n store.dispatch(navigationPageReady());\r\n return result;\r\n }\r\n case NAVIGATION_SHORTCUT: {\r\n const result = next(action);\r\n // Shortcuts do not evaluate block skip logic.\r\n // But they do execute pre-load actions.\r\n if (executePreLoadActions(store, next))\r\n return navigateToFirstValidPage(store, next);\r\n // Page is ready to render.\r\n store.dispatch(navigationPageReady());\r\n return result;\r\n }\r\n case NAVIGATION_BRANCH_TO:\r\n case NAVIGATION_RESET: {\r\n const result = next(action);\r\n navigateToFirstValidPage(store, next);\r\n return result;\r\n }\r\n case CONNECTION_CONNECTED: {\r\n const result = next(action);\r\n navigateToStartQuestion(store, next);\r\n return result;\r\n }\r\n case SERVER_PAGE_CHANGED:\r\n case NAVIGATION_PAGE_READY: {\r\n pageReady(store);\r\n break;\r\n }\r\n default:\r\n break;\r\n }\r\n } else {\r\n switch (action.type) {\r\n case NAVIGATION_NEXT_PAGE:\r\n pageReady(store);\r\n break;\r\n case NAVIGATION_PREVIOUS_PAGE:\r\n clearMentions(store, next);\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n } catch (ex) {\r\n store.dispatch(navigationDisplayMessage(ex));\r\n throw ex;\r\n }\r\n\r\n return next(action);\r\n};\r\n","import { MiddlewareAPI, Dispatch } from \"redux\";\r\nimport { trim, filter, orderBy, map, groupBy, forEach } from \"../utils/lodash\";\r\nimport { ActionModel as QuestionAction } from \"../models/ActionModel\";\r\nimport { StoreState } from \"../models/states/StoreState\";\r\nimport { PropertyType } from \"../models/enums/PropertyType\";\r\nimport { DispositionCode } from \"../models/enums/DispositionCode\";\r\nimport { ValueType } from \"../models/enums/ValueType\";\r\nimport { Piping } from \"../piping\";\r\nimport { QuestionModel } from \"../models/QuestionModel\";\r\nimport { Log } from \"../utils/logging\";\r\nimport {\r\n getPropertyString,\r\n getPropertyEnum,\r\n getPropertyBoolean,\r\n} from \"../models/utilities/propertyUtilities\";\r\nimport { SelectionVariableModel } from \"../models/SelectionVariableModel\";\r\nimport { RecallType } from \"../piping/RecallType\";\r\nimport { __evaluateUnsafe__, __evaluateSafe__ } from \"../expressions/parser\";\r\nimport { getExitUrl } from \"../models/utilities/actionUtilities\";\r\nimport {\r\n navigationQuit,\r\n setVariableMentions,\r\n setLoopRow,\r\n audioRecordingStart,\r\n audioRecordingStop,\r\n navigationBranchTo,\r\n navigationNextPage,\r\n} from \"../redux/actions\";\r\nimport { Randomizer } from \"../randomization/Randomizer\";\r\n\r\nconst TAG = \"logic\";\r\n\r\nexport const resumeLastSession = (\r\n store: MiddlewareAPI<Dispatch<any>, StoreState>,\r\n origin: QuestionModel,\r\n action: QuestionAction,\r\n) => {\r\n const resumeQuestion = store.getState().interview.respondent.prevSessionLastAnsweredQuestion;\r\n if (resumeQuestion && resumeQuestion !== origin.name) {\r\n store.dispatch(navigationBranchTo({ origin: origin.name, destination: resumeQuestion }));\r\n store.dispatch(navigationNextPage());\r\n return true;\r\n }\r\n};\r\n\r\nexport const branchTo = (\r\n store: MiddlewareAPI<Dispatch<any>, StoreState>,\r\n origin: QuestionModel,\r\n action: QuestionAction,\r\n) => {\r\n const destination = getPropertyString(action, PropertyType.Question);\r\n if (destination) {\r\n const autoClean = getPropertyBoolean(action, PropertyType.AutoClean);\r\n const surveyResult = getPropertyEnum(action, DispositionCode, PropertyType.Status);\r\n const redirectUrl = getExitUrl(action, store.getState().interview);\r\n store.dispatch(\r\n navigationBranchTo({\r\n exitSurvey: surveyResult !== undefined,\r\n autoClean,\r\n origin: origin.name,\r\n destination,\r\n surveyResult,\r\n redirectUrl,\r\n isPreload: action.isPreload,\r\n }),\r\n );\r\n return true;\r\n }\r\n};\r\n\r\nexport const exitSurvey = (\r\n store: MiddlewareAPI<Dispatch<any>, StoreState>,\r\n action: QuestionAction,\r\n) => {\r\n const status = getPropertyEnum(action, DispositionCode, PropertyType.Status);\r\n const redirectUrl = getExitUrl(action, store.getState().interview);\r\n store.dispatch(navigationQuit(status, { redirectUrl }));\r\n return true;\r\n};\r\n\r\nexport const setVariableValue = (\r\n store: MiddlewareAPI<Dispatch<any>, StoreState>,\r\n action: QuestionAction,\r\n) => {};\r\n\r\nexport const computeVariable = (\r\n store: MiddlewareAPI<Dispatch<any>, StoreState>,\r\n action: QuestionAction,\r\n) => {\r\n const variableName = getPropertyString(action, PropertyType.CalculatedVariableName);\r\n const valueType = getPropertyEnum(action, ValueType, PropertyType.ValueType);\r\n const value = getPropertyString(action, PropertyType.Value);\r\n let evaluated = value;\r\n if (valueType === ValueType.Formula)\r\n evaluated = __evaluateUnsafe__(\r\n () => store.getState().interview,\r\n store.dispatch,\r\n value,\r\n ).asString();\r\n else if (valueType === ValueType.Variable)\r\n evaluated = Piping.evaluateRecalls(store.getState().interview, value, RecallType.Code);\r\n // Dispatch the action.\r\n const variableValue = value === evaluated ? value : `${value} → ${evaluated}`;\r\n Log.d(TAG, \"COMPUTE_VARIABLE\", `${variableName}=${variableValue}`);\r\n store.dispatch(\r\n setVariableMentions(variableName, (mentions) => mentions.clear().add(evaluated)),\r\n );\r\n};\r\n\r\nexport const computeSelections = (\r\n store: MiddlewareAPI<Dispatch<any>, StoreState>,\r\n action: QuestionAction,\r\n) => {\r\n const { interview } = store.getState();\r\n const randomizer = new Randomizer(interview.respondent.seed);\r\n\r\n // Compute selection values.\r\n const a = filter(action.selections, (s) => {\r\n // Filter by inclusion formula.\r\n if (s.condition) return __evaluateSafe__(interview, s.condition).asBoolean();\r\n return true;\r\n });\r\n const b = orderBy(a, () => randomizer.next());\r\n const c = orderBy(b, (s) => s.score && __evaluateSafe__(interview, s.score).asNumber(), \"desc\");\r\n const d = orderBy(c, (s) => Number(s.priority) || 0, \"desc\");\r\n const selectionValues = map(d, (s) => trim(s.value));\r\n\r\n // Return set variable\r\n const groupedSelectionVariables = groupBy(action.selectionVariables, \"name\");\r\n forEach(groupedSelectionVariables, (variables: SelectionVariableModel[], name: string) => {\r\n const newMentions = variables.map(() => {\r\n const value = selectionValues.shift();\r\n return { value: value == null ? \"\" : value };\r\n });\r\n store.dispatch(setVariableMentions(name, (mentions) => mentions.clear().add(newMentions)));\r\n });\r\n};\r\n\r\nexport const setloopRow = (\r\n store: MiddlewareAPI<Dispatch<any>, StoreState>,\r\n action: QuestionAction,\r\n) => {\r\n const block = getPropertyString(action, PropertyType.Block);\r\n const valueType = getPropertyEnum(action, ValueType, PropertyType.ValueType);\r\n let value = getPropertyString(action, PropertyType.Value);\r\n if (valueType === ValueType.Variable)\r\n value = __evaluateUnsafe__(\r\n () => store.getState().interview,\r\n store.dispatch,\r\n value,\r\n ).asNumber();\r\n store.dispatch(setLoopRow(block, value));\r\n};\r\n\r\nexport const mobileAudioRecording = (\r\n store: MiddlewareAPI<Dispatch<any>, StoreState>,\r\n action: QuestionAction,\r\n) => {\r\n const { interview } = store.getState();\r\n const matrix = interview.navigation.currentPage.loopIndex;\r\n if (getPropertyBoolean(action, PropertyType.Mode, \"Start\"))\r\n store.dispatch(audioRecordingStart(action.questionName, matrix));\r\n else store.dispatch(audioRecordingStop());\r\n};\r\n","export enum RecallMode {\r\n Enabled,\r\n Disabled,\r\n}\r\n","import { ConnectionState } from \"../../models/states/ConnectionState\";\r\nimport {\r\n CONNECTION_CONNECTED,\r\n CONNECTION_DISCONNECTED,\r\n CONNECTION_ERROR,\r\n CONNECTION_PROGRESS,\r\n QUESTIONNAIRE_CHANGED,\r\n CONNECTION_START,\r\n} from \"../actions\";\r\nimport { ActionTypes } from \"../actions/types\";\r\n\r\nconst INITIAL_STATE: ConnectionState = { url: \"\", connected: false };\r\n\r\nexport const connectionReducer = (state = INITIAL_STATE, action: ActionTypes) => {\r\n switch (action.type) {\r\n case CONNECTION_CONNECTED:\r\n case CONNECTION_DISCONNECTED:\r\n case CONNECTION_ERROR:\r\n return { ...state, connected: action.connected };\r\n case CONNECTION_PROGRESS:\r\n return { ...state, progress: action.progress };\r\n case QUESTIONNAIRE_CHANGED:\r\n return { ...state, progress: undefined };\r\n case CONNECTION_START:\r\n return { url: action.url, connected: false };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { createSystemVariables, setVariableMention } from \"./variablesUtilities\";\r\nimport { VariablesState } from \"../../../models/states/VariablesState\";\r\nimport { DeviceModel } from \"../../../models/DeviceModel\";\r\nimport { RespondentModel } from \"../../../models/RespondentModel\";\r\nimport { PageModel } from \"../../../models/PageModel\";\r\nimport { MentionModel } from \"../../../models/MentionModel\";\r\nimport { getSettingBoolean } from \"../../../models/utilities/settingUtilities\";\r\nimport { NavigationState } from \"../../../models/states/NavigationState\";\r\nimport { QuestionnaireModel } from \"../../../models/QuestionnaireModel\";\r\nimport {\r\n getVariableRange,\r\n getBlockWithQuestion,\r\n getBlockWithVariable,\r\n} from \"../../../models/utilities/questionnaireUtilities\";\r\nimport { SystemVariableModel } from \"../../../models/SystemVariableModel\";\r\nimport {\r\n NAVIGATION_BRANCH_TO,\r\n QUESTIONNAIRE_CHANGED,\r\n DEVICE_CHANGED,\r\n RESPONDENT_CHANGED,\r\n RESPONDENT_SET_EMAIL,\r\n RESPONDENT_SET_PHONE,\r\n RESPONDENT_SET_TIMEZONE,\r\n CHANGE_LANGUAGE,\r\n SET_VARIABLE_MENTIONS,\r\n NAVIGATION_NEXT_PAGE,\r\n NAVIGATION_PREVIOUS_PAGE,\r\n SET_LOOP_ROW,\r\n NAVIGATION_RESET,\r\n RESET_MENTIONS,\r\n SET_SERVER_TRACKED_ANSWERS,\r\n INVALIDATE_CLIENT_VARIABLES,\r\n LOAD_ANSWERS_DTO,\r\n SET_MULTIPLE_VARIABLES_MENTIONS,\r\n RESPONDENT_SET_DISPOSITIONCODE,\r\n} from \"../../actions\";\r\nimport { ActionTypes } from \"../../actions/types\";\r\nimport { BranchToOptions } from \"../../../models/BranchToOptions\";\r\nimport { each, difference, reduce } from \"../../../utils/lodash\";\r\nimport { BlockModel } from \"../../../models/BlockModel\";\r\nimport { AnswerModel } from \"../../../models/AnswerModel\";\r\nimport { MatrixModel } from \"../../../models/MatrixModel\";\r\nimport { MentionBuilderDelegate } from \"../../../models/builders/MentionBuilder\";\r\n\r\nconst surveyChanged = (\r\n state: VariablesState,\r\n questionnaire: QuestionnaireModel,\r\n currentPage: PageModel,\r\n respondent: RespondentModel,\r\n) => ({\r\n ...state,\r\n system: {\r\n ...state.system,\r\n ...createSystemVariables(respondent, currentPage),\r\n $PNAME: new SystemVariableModel(questionnaire.name),\r\n $A: new SystemVariableModel((respondent.accessCount || 1).toString()),\r\n $X: new SystemVariableModel(questionnaire.id.toString()),\r\n $F: new SystemVariableModel(questionnaire.id.toString()),\r\n \"$SURVEY.Id\": new SystemVariableModel(questionnaire.id.toString()),\r\n \"$SURVEY.Name\": new SystemVariableModel(questionnaire.name),\r\n },\r\n mentionsByVariableName: {},\r\n currentLoopByBlockName: {},\r\n});\r\n\r\nconst deviceChanged = (state: VariablesState, device: DeviceModel) => ({\r\n ...state,\r\n system: {\r\n ...state.system,\r\n $DEVICE: new SystemVariableModel(device?.type),\r\n $DEVICEOS: new SystemVariableModel(device?.os),\r\n $DEVICEOSVERSION: new SystemVariableModel(device?.version),\r\n $DEVICEBROWSER: new SystemVariableModel(device?.browser),\r\n $DEVICEBROWSERVERSION: new SystemVariableModel(device?.version),\r\n },\r\n});\r\n\r\nconst respondentChanged = (\r\n state: VariablesState,\r\n currentPage: PageModel,\r\n respondent: RespondentModel,\r\n) => ({\r\n ...state,\r\n system: {\r\n ...state.system,\r\n ...createSystemVariables(respondent, currentPage),\r\n $Q: new SystemVariableModel(String(respondent.respondentId || 0)),\r\n $PIN: new SystemVariableModel(respondent.pin),\r\n $EMAIL: new SystemVariableModel(respondent.email !== undefined ? respondent.email : \"\"),\r\n $PHONE: new SystemVariableModel(respondent.phone !== undefined ? respondent.phone : \"\"),\r\n $L: new SystemVariableModel(respondent.language),\r\n $OFFLINEUSER: new SystemVariableModel(\r\n respondent.offlineUserName,\r\n respondent.offlineUserId.toString(),\r\n ),\r\n $PANELISTID: new SystemVariableModel(String(respondent.panelistId)),\r\n $SAMPLEID: new SystemVariableModel(String(respondent.sampleId)),\r\n $PANELISTPOINTS: new SystemVariableModel(String(respondent.panelistPoints)),\r\n },\r\n});\r\n\r\nconst respondentLanguageChanged = (state: VariablesState, respondent: RespondentModel) => ({\r\n ...state,\r\n system: {\r\n ...state.system,\r\n $L: new SystemVariableModel(respondent.language),\r\n },\r\n});\r\n\r\nconst autoClean = (\r\n state: VariablesState,\r\n previousPage: PageModel,\r\n questionnaire: QuestionnaireModel,\r\n branchTo: BranchToOptions,\r\n) => {\r\n if (!branchTo.autoClean) return state;\r\n const includeFirst =\r\n branchTo.isPreload && getSettingBoolean(questionnaire, \"CLEAN_QUESTION_PRELOAD\");\r\n const mentionsToClean = getMentionsToClean(\r\n state,\r\n questionnaire,\r\n branchTo.origin,\r\n branchTo.destination,\r\n previousPage,\r\n includeFirst,\r\n );\r\n\r\n each(mentionsToClean, (mentions, variableName) => {\r\n state = {\r\n ...state,\r\n mentionsByVariableName: {\r\n ...state.mentionsByVariableName,\r\n [variableName]: difference(state.mentionsByVariableName[variableName], mentions),\r\n },\r\n };\r\n });\r\n return state;\r\n};\r\n\r\nfunction getMentionsToClean(\r\n state: VariablesState,\r\n questionnaire: QuestionnaireModel,\r\n startQuestion: string,\r\n destinationQuestion: string,\r\n previousPage: PageModel,\r\n includeFirst: boolean,\r\n) {\r\n const variableRange = getVariableRange(\r\n questionnaire,\r\n startQuestion,\r\n destinationQuestion,\r\n includeFirst,\r\n );\r\n\r\n const startBlock = getBlockWithQuestion(questionnaire, startQuestion);\r\n const endBlock = getBlockWithQuestion(questionnaire, destinationQuestion);\r\n\r\n const isMentionOnRange = (\r\n mention: MentionModel,\r\n variableName: string,\r\n variableBlock: BlockModel,\r\n ) => {\r\n if (variableRange.map((v) => v.name).includes(variableName)) {\r\n if (variableBlock.index === startBlock.index) {\r\n if (mention.matrix >= previousPage.loopIndex) {\r\n return true;\r\n }\r\n } else if (endBlock.index > startBlock.index) {\r\n return true;\r\n }\r\n }\r\n\r\n // If we are branching to another block, be sure to add to the range variables from higher loops of this block\r\n return (\r\n endBlock?.index > startBlock.index &&\r\n variableBlock.index === startBlock.index &&\r\n mention.matrix > previousPage.loopIndex\r\n );\r\n };\r\n\r\n return reduce(\r\n state.mentionsByVariableName,\r\n (result, mentions, variableName) => {\r\n const variableBlock = getBlockWithVariable(questionnaire, variableName);\r\n return {\r\n ...result,\r\n [variableName]: mentions.filter((m) =>\r\n isMentionOnRange(m, variableName, variableBlock),\r\n ),\r\n };\r\n },\r\n {},\r\n );\r\n}\r\n\r\nconst pageChanged = (\r\n state: VariablesState,\r\n action: ActionTypes,\r\n previousPage: PageModel,\r\n navigation: NavigationState,\r\n questionnaire: QuestionnaireModel,\r\n respondent: RespondentModel,\r\n) => {\r\n let newState = { ...state };\r\n // If the page has been branched, apply auto cleaning.\r\n if (\r\n action.type === NAVIGATION_BRANCH_TO &&\r\n getSettingBoolean(questionnaire, \"AUTO_DATA_CLEANING\")\r\n )\r\n newState = autoClean(newState, previousPage, questionnaire, action.options);\r\n return {\r\n ...newState,\r\n system: {\r\n ...newState.system,\r\n ...createSystemVariables(respondent, navigation.currentPage),\r\n },\r\n };\r\n};\r\n\r\nconst navigationReset = (\r\n state: VariablesState,\r\n clearAnswers: boolean,\r\n respondent: RespondentModel,\r\n) => {\r\n if (clearAnswers) state = { ...state, mentionsByVariableName: {} };\r\n return {\r\n ...state,\r\n system: {\r\n ...state.system,\r\n ...createSystemVariables(respondent),\r\n },\r\n currentLoopByBlockName: {},\r\n };\r\n};\r\n\r\nconst loadAnswersDto = (\r\n state: VariablesState,\r\n navigation: NavigationState,\r\n questionnaire: QuestionnaireModel,\r\n answers: AnswerModel[],\r\n) => {\r\n return reduce(\r\n answers,\r\n (newState, answer) =>\r\n loadMatrices(newState, navigation, questionnaire, answer.variableName, answer.matrices),\r\n state,\r\n );\r\n};\r\n\r\nconst loadMatrices = (\r\n state: VariablesState,\r\n navigation: NavigationState,\r\n questionnaire: QuestionnaireModel,\r\n variableName: string,\r\n matrices: MatrixModel[],\r\n): VariablesState => {\r\n return reduce(\r\n matrices,\r\n (newState, matrix) =>\r\n setVariableMention(\r\n newState,\r\n navigation,\r\n questionnaire,\r\n variableName,\r\n matrix.index,\r\n (mentions) => {\r\n mentions.clear();\r\n each(matrix.mentions, (mention) =>\r\n mentions.add(mention.value, mention.openEnd),\r\n );\r\n return mentions;\r\n },\r\n ),\r\n state,\r\n );\r\n};\r\n\r\nconst setMultipleVariablesMentions = (\r\n state: VariablesState,\r\n navigation: NavigationState,\r\n questionnaire: QuestionnaireModel,\r\n mentionsByVariable: { [variableName: string]: MentionBuilderDelegate },\r\n) => {\r\n return reduce(\r\n mentionsByVariable,\r\n (newState, builder, variableName) =>\r\n setVariableMention(\r\n newState,\r\n navigation,\r\n questionnaire,\r\n variableName.split(\":\")[0],\r\n undefined,\r\n builder,\r\n ),\r\n state,\r\n );\r\n};\r\n\r\nexport const variablesSliceReducer = (\r\n state: VariablesState,\r\n action: ActionTypes,\r\n previousPage: PageModel,\r\n questionnaire: QuestionnaireModel,\r\n respondent: RespondentModel,\r\n navigation: NavigationState,\r\n): any => {\r\n switch (action.type) {\r\n case QUESTIONNAIRE_CHANGED:\r\n return surveyChanged(state, action.questionnaire, navigation.currentPage, respondent);\r\n case DEVICE_CHANGED:\r\n return deviceChanged(state, action.device);\r\n case RESPONDENT_CHANGED:\r\n case RESPONDENT_SET_EMAIL:\r\n case RESPONDENT_SET_PHONE:\r\n case RESPONDENT_SET_TIMEZONE:\r\n case RESPONDENT_SET_DISPOSITIONCODE:\r\n return respondentChanged(state, navigation.currentPage, respondent);\r\n case CHANGE_LANGUAGE:\r\n return respondentLanguageChanged(state, respondent);\r\n case SET_VARIABLE_MENTIONS:\r\n return setVariableMention(\r\n state,\r\n navigation,\r\n questionnaire,\r\n action.variableName,\r\n action.matrixIndex,\r\n action.builder,\r\n );\r\n case SET_MULTIPLE_VARIABLES_MENTIONS:\r\n return setMultipleVariablesMentions(\r\n state,\r\n navigation,\r\n questionnaire,\r\n action.mentionsByVariable,\r\n );\r\n case NAVIGATION_NEXT_PAGE:\r\n case NAVIGATION_PREVIOUS_PAGE:\r\n case NAVIGATION_BRANCH_TO:\r\n case SET_LOOP_ROW:\r\n return pageChanged(state, action, previousPage, navigation, questionnaire, respondent);\r\n case NAVIGATION_RESET:\r\n return navigationReset(state, action.clearAnswers, respondent);\r\n case RESET_MENTIONS:\r\n return {\r\n ...state,\r\n mentionsByVariableName: action.mentions,\r\n };\r\n case SET_SERVER_TRACKED_ANSWERS:\r\n return {\r\n ...state,\r\n serverSideTrackedAnswers: action.answers,\r\n };\r\n case INVALIDATE_CLIENT_VARIABLES:\r\n return {\r\n ...state,\r\n invalidateClientSideVariables: true,\r\n };\r\n case LOAD_ANSWERS_DTO:\r\n return loadAnswersDto(state, navigation, questionnaire, action.answers);\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { ActionTypes } from \"../actions/types\";\r\n\r\nconst INITIAL_STATE = {};\r\n\r\nexport const carrouselReducer = (state = INITIAL_STATE, action: ActionTypes) => {\r\n switch (action.type) {\r\n case \"UPDATE_CARROUSEL_ACTIVE_VARIABLE\":\r\n if (!state[action.instanceId]) {\r\n // Initialize the state for new instanceId\r\n return {\r\n ...state,\r\n [action.instanceId]: {\r\n activeVariableIndex: action.activeVariableIndex,\r\n isPrevBtnActive: action.isPrevBtnActive,\r\n isNextBtnActive: action.isNextBtnActive,\r\n },\r\n };\r\n }\r\n // Update the state for existing instanceId\r\n return {\r\n ...state,\r\n [action.instanceId]: {\r\n ...state[action.instanceId],\r\n activeVariableIndex: action.activeVariableIndex,\r\n isPrevBtnActive: action.isPrevBtnActive,\r\n isNextBtnActive: action.isNextBtnActive,\r\n },\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { omit } from \"../../../utils/lodash\";\r\nimport {\r\n buildPage,\r\n next,\r\n branchToRelative,\r\n branchToAbsolute,\r\n pageReady,\r\n previous,\r\n branchToBlock,\r\n setPage,\r\n getCurrentBlock,\r\n hasNextBlock,\r\n nextBlock,\r\n getCurrentLoop,\r\n updateNavigationButtons,\r\n blockWillChange,\r\n buildPageFromServer,\r\n getServerCurrentQuestions,\r\n} from \"./navigationUtilities\";\r\nimport { NavigationState } from \"../../../models/states/NavigationState\";\r\nimport { DispositionCode } from \"../../../models/enums/DispositionCode\";\r\nimport { TerminationAction } from \"../../../models/enums/TerminationAction\";\r\nimport { InterviewState } from \"../../../models/states/InterviewState\";\r\nimport {\r\n getRandomizedBlocks,\r\n getRandomizedQuestionIdByName,\r\n getRandomizedQuestionIdByVariable,\r\n} from \"../../../randomization/Randomization\";\r\nimport { __isQuestionVisible__, __isBlockVisible__ } from \"../../../expressions/parser\";\r\nimport { ApiBroadcaster } from \"../../middleware/apiConnector\";\r\nimport {\r\n getTerminationOptions,\r\n getBlock,\r\n getQuestionWithName,\r\n getQuestionWithId,\r\n} from \"../../../models/utilities/questionnaireUtilities\";\r\nimport { QuestionnaireModel } from \"../../../models/QuestionnaireModel\";\r\nimport { ActionTypes } from \"../../actions/types\";\r\nimport {\r\n NAVIGATION_PAGE_READY,\r\n NAVIGATION_COMPLETION_QUESTION_REACHED,\r\n NAVIGATION_BRANCH_TO,\r\n NAVIGATION_NEXT_PAGE,\r\n NAVIGATION_PREVIOUS_PAGE,\r\n NAVIGATION_PREVIEW_QUESTION,\r\n NAVIGATION_RESET,\r\n NAVIGATION_DISPLAY_MESSAGE,\r\n NAVIGATION_QUIT,\r\n NAVIGATION_SHORTCUT,\r\n SET_LOOP_ROW,\r\n SET_NAVIGATION_ENABLED,\r\n SERVER_PAGE_CHANGED,\r\n REFRESH_CURRENT_PAGE_QUESTIONS,\r\n} from \"../../actions\";\r\nimport { BranchToOptions } from \"../../../models/BranchToOptions\";\r\nimport { QuitOptions } from \"../../../models/QuitOptions\";\r\nimport { translate } from \"../../../models/utilities/translationUtilities\";\r\nimport { Piping } from \"../../../piping\";\r\nimport { NavigationResultPageModel } from \"../../../models/NavigationResultPageModel\";\r\nimport { isNullOrEmpty } from \"../../../utils\";\r\n\r\nconst hasQuestions = (state: NavigationState, interview: InterviewState) =>\r\n state.currentPage.questions.some((q) => __isQuestionVisible__(q, interview));\r\n\r\nconst previousPage = (state: NavigationState, interview: InterviewState) => {\r\n // Repeat until the page has visible questions.\r\n let newState = state;\r\n do {\r\n // Get the previous page.\r\n newState = previous(newState);\r\n // If we got the same page, stop looping.\r\n if (state === newState) break;\r\n } while (!hasQuestions(newState, { ...interview, navigation: newState }));\r\n if (state.exitTo != null) {\r\n while (\r\n newState.blockIndex === state.blockIndex &&\r\n getCurrentLoop(newState) === getCurrentLoop(state)\r\n ) {\r\n if (newState.questionIndex >= state.questionIndex) {\r\n const prevState = previous(newState);\r\n if (prevState === newState) break;\r\n newState = prevState;\r\n } else {\r\n newState.exitTo = state.exitTo;\r\n break;\r\n }\r\n }\r\n }\r\n // Clear current question name on server since we do not retrieve this information when navigating back\r\n return {\r\n ...newState,\r\n };\r\n};\r\n\r\nconst nextPage = (state: NavigationState, interview: InterviewState) => {\r\n // Repeat until the page has visible questions.\r\n let newState = state;\r\n do {\r\n // Get the next page.\r\n const nextState = next(newState);\r\n // If we got the same page, we have reached the end of the survey.\r\n if (newState === nextState) {\r\n if (state.exitTo != null) {\r\n return setPage(state, state.exitTo, true);\r\n }\r\n return state;\r\n }\r\n newState = nextState;\r\n if (blockWillChange(state, newState)) {\r\n // Skip blocks with logic.\r\n while (!__isBlockVisible__(getCurrentBlock(newState), interview)) {\r\n // If we have another block, skip this block.\r\n if (hasNextBlock(newState)) {\r\n newState = nextBlock(newState);\r\n continue;\r\n }\r\n if (state.exitTo != null) {\r\n return setPage(state, state.exitTo, true);\r\n }\r\n // Quit the survey since no blocks are left.\r\n return state;\r\n }\r\n }\r\n // Build the page.\r\n newState = buildPage(newState, interview, state.exitTo);\r\n } while (!hasQuestions(newState, { ...interview, navigation: newState }));\r\n\r\n if (\r\n state.exitTo != null &&\r\n (newState.blockIndex !== state.blockIndex ||\r\n getCurrentLoop(newState) !== getCurrentLoop(state))\r\n ) {\r\n return setPage(state, state.exitTo, true);\r\n }\r\n\r\n newState.exitTo = state.exitTo;\r\n return newState;\r\n};\r\n\r\nexport const completionQuestionReached = (state: NavigationState) => ({\r\n ...state,\r\n completionQuestionReached: true,\r\n});\r\n\r\nconst branchTo = (\r\n state: NavigationState,\r\n questionnaire: QuestionnaireModel,\r\n branchToOptions: BranchToOptions,\r\n interview: InterviewState,\r\n) => {\r\n // Exit the survey if exitSurvey is true.\r\n if (branchToOptions.exitSurvey) {\r\n ApiBroadcaster(null).quit(interview, DispositionCode.Completed);\r\n return state;\r\n }\r\n // Exit to the next page if exitToNextQuestion is true.\r\n const exitTo = branchToOptions.exitToNextQuestion ? state.currentPage : undefined;\r\n\r\n const { origin, destination } = branchToOptions;\r\n const isRelativeBranching =\r\n destination.startsWith(\"+\") || !Number.isNaN(parseInt(destination, 10));\r\n const isBlockBranching =\r\n destination.startsWith(\"block:\") && destination.length > \"block:\".length;\r\n\r\n // Execute the branching.\r\n let branchState = state;\r\n if (isRelativeBranching) {\r\n branchState = branchToRelative(state, questionnaire, origin, parseInt(destination, 10));\r\n // Skip blocks with logic only on relative if it is the first question of the block\r\n while (\r\n branchState.questionIndex === 0 &&\r\n !__isBlockVisible__(getCurrentBlock(branchState), interview)\r\n ) {\r\n // If we have another block, skip this block.\r\n if (hasNextBlock(branchState)) {\r\n branchState = nextBlock(branchState);\r\n continue;\r\n }\r\n if (branchState.exitTo != null) {\r\n return setPage(branchState, branchState.exitTo, true);\r\n }\r\n // Quit the survey since no blocks are left.\r\n return branchState;\r\n }\r\n } else if (isBlockBranching) {\r\n branchState = branchToBlock(state, questionnaire, destination.substr(\"block:\".length));\r\n } else {\r\n branchState = branchToAbsolute(state, questionnaire, destination);\r\n }\r\n\r\n // If the branching failed, do not build the page.\r\n if (state === branchState) {\r\n return state;\r\n }\r\n\r\n // Return the new page.\r\n return buildPage(branchState, interview, exitTo);\r\n};\r\n\r\nconst shortcut = (\r\n state: NavigationState,\r\n blockName: string,\r\n exitToNextQuestion: boolean,\r\n interview: InterviewState,\r\n) => {\r\n let exitTo = state.currentPage;\r\n if (state.exitTo != null) exitTo = state.exitTo;\r\n else if (exitToNextQuestion) {\r\n let tmpState = next(state);\r\n exitTo = null;\r\n while (!__isBlockVisible__(getCurrentBlock(tmpState), interview)) {\r\n // If we have another block, skip this block.\r\n if (hasNextBlock(tmpState)) {\r\n tmpState = nextBlock(tmpState);\r\n continue;\r\n }\r\n exitTo = state.currentPage;\r\n break;\r\n }\r\n if (exitTo == null) {\r\n tmpState = buildPage(tmpState, interview);\r\n exitTo = tmpState.currentPage;\r\n }\r\n }\r\n state = branchToBlock(state, interview.questionnaire, blockName);\r\n state = buildPage(state, interview, exitTo);\r\n state = updateNavigationButtons(state);\r\n return state;\r\n};\r\n\r\nconst setEnabled = (state: NavigationState, enabled: boolean) => ({\r\n ...state,\r\n disabled: !enabled,\r\n});\r\n\r\nconst setLoopRow = (\r\n state: NavigationState,\r\n questionnaire: QuestionnaireModel,\r\n blockName: string,\r\n row: number,\r\n) => {\r\n const block = getBlock(questionnaire, blockName);\r\n // If block is not found, do nothing.\r\n if (block === undefined) return state;\r\n // If row is invalid, do nothing.\r\n if (row < 1) return state;\r\n // If the row is 1, we don't need to store it.\r\n if (row === 1)\r\n return {\r\n ...state,\r\n loopByBlockName: omit(state.loopByBlockName, blockName),\r\n };\r\n // Else, save the current loop to the state.\r\n const { currentPage } = state;\r\n if (currentPage) currentPage.loopIndex = row;\r\n return {\r\n ...state,\r\n currentPage,\r\n loopByBlockName: {\r\n ...state.loopByBlockName,\r\n [blockName]: row,\r\n },\r\n };\r\n};\r\n\r\nconst reset = (\r\n state: NavigationState,\r\n questionnaire: QuestionnaireModel,\r\n interview: InterviewState,\r\n) => {\r\n const randomizedBlocks = getRandomizedBlocks(\r\n interview.respondent,\r\n questionnaire,\r\n interview.language,\r\n );\r\n state = {\r\n ...state,\r\n currentPage: undefined,\r\n randomizedBlocks,\r\n randomizedQuestionIdByName: getRandomizedQuestionIdByName(randomizedBlocks),\r\n randomizedQuestionIdByVariable: getRandomizedQuestionIdByVariable(randomizedBlocks),\r\n history: [],\r\n questionIndex: -1,\r\n loopByBlockName: {},\r\n disabled: false,\r\n hasNextPage: false,\r\n hasPreviousPage: false,\r\n blockIndex: 0,\r\n message: undefined,\r\n };\r\n state = nextPage(state, interview);\r\n return state;\r\n};\r\n\r\nconst displayMessage = (state: NavigationState, message: string) => ({\r\n ...state,\r\n message,\r\n});\r\n\r\nconst navigationQuit = (\r\n state: NavigationState,\r\n interview: InterviewState,\r\n questionnaire: QuestionnaireModel,\r\n dispositionCode: DispositionCode,\r\n options: QuitOptions,\r\n) => {\r\n const terminationOptions = getTerminationOptions(\r\n questionnaire,\r\n interview.language,\r\n dispositionCode,\r\n );\r\n\r\n const message = !isNullOrEmpty(options?.message)\r\n ? options?.message\r\n : terminationOptions.message;\r\n\r\n const shouldDisplayMessage =\r\n options?.terminationSurveyAction === TerminationAction.DisplayMessage ||\r\n (!isNullOrEmpty(terminationOptions.message) &&\r\n options?.terminationSurveyAction !== TerminationAction.RedirectToUrl);\r\n\r\n if (shouldDisplayMessage) {\r\n const defaultMessage = translate(questionnaire, `TerminationMessage`, interview.language);\r\n return displayMessage(state, message || defaultMessage);\r\n }\r\n\r\n const redirectUrl = !isNullOrEmpty(options?.redirectUrl)\r\n ? options?.redirectUrl\r\n : terminationOptions.redirectUrl;\r\n\r\n const shouldRedirect =\r\n options?.terminationSurveyAction === TerminationAction.RedirectToUrl ||\r\n (options?.terminationSurveyAction !== TerminationAction.DisplayMessage &&\r\n !isNullOrEmpty(terminationOptions.redirectUrl));\r\n\r\n if (shouldRedirect) {\r\n let url = Piping.evaluateRecalls(interview, redirectUrl);\r\n if (!url.match(/^[a-zA-Z]+:\\/\\//)) {\r\n url = `http://${url}`;\r\n }\r\n window.location.assign(url);\r\n }\r\n\r\n return state;\r\n};\r\n\r\nconst navigatePreviewQuestion = (\r\n state: NavigationState,\r\n questionnaire: QuestionnaireModel,\r\n interview: InterviewState,\r\n questionName: string,\r\n): NavigationState => {\r\n const dest = getQuestionWithName(questionnaire, questionName);\r\n if (\r\n dest &&\r\n state.currentPage?.questions[0].index === dest.index &&\r\n state.blockIndex === dest.blockIndex\r\n )\r\n return state;\r\n let newState = branchToAbsolute(state, questionnaire, questionName);\r\n newState = buildPage(newState, interview);\r\n newState = {\r\n ...newState,\r\n currentPage: { ...newState.currentPage, previewQuestion: questionName },\r\n };\r\n return pageReady(newState);\r\n};\r\n\r\nconst serverPageChanged = (\r\n state: NavigationState,\r\n interview: InterviewState,\r\n page: NavigationResultPageModel,\r\n): NavigationState => {\r\n const newState = buildPageFromServer(state, interview, page);\r\n return pageReady(newState);\r\n};\r\n\r\nconst updateCurrentPageQuestions = (\r\n state: NavigationState,\r\n interview: InterviewState,\r\n page: NavigationResultPageModel,\r\n): NavigationState => {\r\n const newState = state;\r\n newState.currentPage.questions = getServerCurrentQuestions(page, interview.questionnaire);\r\n newState.currentPageOnServer = page;\r\n return newState;\r\n};\r\n\r\nexport const navigationReducer = (\r\n state: NavigationState,\r\n action: ActionTypes,\r\n questionnaire: QuestionnaireModel,\r\n interview: InterviewState,\r\n) => {\r\n switch (action.type) {\r\n case NAVIGATION_QUIT:\r\n return navigationQuit(\r\n state,\r\n interview,\r\n questionnaire,\r\n action.dispositionCode,\r\n action.options,\r\n );\r\n case NAVIGATION_DISPLAY_MESSAGE:\r\n return displayMessage(state, action.message);\r\n case SERVER_PAGE_CHANGED:\r\n return serverPageChanged(state, interview, action.page);\r\n case REFRESH_CURRENT_PAGE_QUESTIONS:\r\n return updateCurrentPageQuestions(state, interview, action.page);\r\n case SET_NAVIGATION_ENABLED:\r\n return setEnabled(state, action.enabled);\r\n default:\r\n break;\r\n }\r\n // If the current page on surver is unknown, use this reducer to determine the current page\r\n if (!state.currentPageOnServer) {\r\n switch (action.type) {\r\n case NAVIGATION_PAGE_READY:\r\n return pageReady(state);\r\n case NAVIGATION_COMPLETION_QUESTION_REACHED:\r\n return completionQuestionReached(state);\r\n case NAVIGATION_BRANCH_TO:\r\n return branchTo(state, questionnaire, action.options, interview);\r\n case NAVIGATION_NEXT_PAGE:\r\n return nextPage(state, interview);\r\n case NAVIGATION_PREVIOUS_PAGE:\r\n return previousPage(state, interview);\r\n case NAVIGATION_PREVIEW_QUESTION: {\r\n const question = getQuestionWithId(questionnaire, action.questionId);\r\n if (question) {\r\n return navigatePreviewQuestion(state, questionnaire, interview, question.name);\r\n }\r\n break;\r\n }\r\n case NAVIGATION_RESET:\r\n return reset(state, questionnaire, interview);\r\n case NAVIGATION_SHORTCUT:\r\n return shortcut(state, action.blockName, action.exitToNextQuestion, interview);\r\n case SET_LOOP_ROW: {\r\n return setLoopRow(state, questionnaire, action.blockName.toUpperCase(), action.row);\r\n }\r\n default:\r\n break;\r\n }\r\n }\r\n return state;\r\n};\r\n","import { InterviewState } from \"../../../models/states/InterviewState\";\r\nimport { questionnaireSliceReducer } from \"./questionnaireSliceReducer\";\r\nimport { deviceSliceReducer } from \"./deviceSliceReducer\";\r\nimport { variablesSliceReducer } from \"./variablesSliceReducer\";\r\nimport { respondentSliceReducer } from \"./respondentSliceReducer\";\r\nimport { languageSliceReducer } from \"./languageSliceReducer\";\r\nimport { quotasReducer } from \"./quotasReducer\";\r\nimport { themeSliceReducer } from \"./themeSliceReducer\";\r\nimport { validationSliceReducer } from \"./validationSliceReducer\";\r\nimport { carrouselReducer } from \"../carrouselReducer\";\r\nimport { ActionTypes } from \"../../actions/types\";\r\nimport { CONNECTION_DISCONNECTED, USE_CLIENT_VALIDATION } from \"../../actions\";\r\nimport { navigationReducer } from \"./navigationReducer\";\r\nimport { questionFieldStatusReducer } from \"../questionFieldStatusReducer\";\r\n\r\nexport const INITIAL_STATE: InterviewState = {\r\n variables: {\r\n system: {},\r\n mentionsByVariableName: {},\r\n },\r\n navigation: {\r\n history: [],\r\n randomizedBlocks: [],\r\n randomizedQuestionIdByName: {},\r\n randomizedQuestionIdByVariable: {},\r\n questionIndex: 0,\r\n loopByBlockName: {},\r\n disabled: false,\r\n hasNextPage: false,\r\n hasPreviousPage: false,\r\n blockIndex: 0,\r\n },\r\n validation: {\r\n isValid: true,\r\n errorsByVariableName: {},\r\n },\r\n language: \"en\",\r\n};\r\n\r\nexport const interviewReducer = (state = INITIAL_STATE, action: ActionTypes): InterviewState => {\r\n switch (action.type) {\r\n case CONNECTION_DISCONNECTED:\r\n return INITIAL_STATE;\r\n case USE_CLIENT_VALIDATION:\r\n return {\r\n ...state,\r\n useClientValidation: action.useValidation,\r\n };\r\n default:\r\n break;\r\n }\r\n const previousPage = state.navigation.currentPage;\r\n const questionnaire = questionnaireSliceReducer(state.questionnaire, action);\r\n state = {\r\n ...state,\r\n quotas: quotasReducer(state.quotas, state, action),\r\n };\r\n const navigation = navigationReducer(state.navigation, action, questionnaire, state);\r\n const respondent = respondentSliceReducer(state.respondent, action, navigation, previousPage);\r\n const device = deviceSliceReducer(state.device, action);\r\n // Old and new mentions are required for comparison in reseting/disabling states\r\n const oldMentionsByVariableName = { ...state.variables.mentionsByVariableName };\r\n const variables = variablesSliceReducer(\r\n state.variables,\r\n action,\r\n previousPage,\r\n questionnaire,\r\n respondent,\r\n navigation,\r\n );\r\n const newMentionsByVariableName = { ...variables.mentionsByVariableName };\r\n const questionFieldStatus = questionFieldStatusReducer(\r\n state.questionFieldStatus,\r\n action,\r\n questionnaire,\r\n oldMentionsByVariableName,\r\n newMentionsByVariableName,\r\n );\r\n\r\n const validation = validationSliceReducer(state.validation, action, questionnaire, variables);\r\n const language = languageSliceReducer(state.language, action, questionnaire);\r\n const theme = themeSliceReducer(state.theme, navigation, action, questionnaire);\r\n const carrousel = carrouselReducer(state.carrousel, action);\r\n\r\n return {\r\n ...state,\r\n questionnaire,\r\n quotas: state.quotas,\r\n navigation,\r\n respondent,\r\n validation,\r\n device,\r\n variables,\r\n language,\r\n theme,\r\n carrousel,\r\n questionFieldStatus,\r\n };\r\n};\r\n","import { QuestionnaireModel } from \"../../../models/QuestionnaireModel\";\r\nimport { setDefaultLanguage } from \"../../../models/utilities/translationUtilities\";\r\nimport { ActionTypes } from \"../../actions/types\";\r\nimport { ENABLE_LEGACY_BROWSER_WARNING, QUESTIONNAIRE_CHANGED } from \"../../actions\";\r\n\r\nexport const questionnaireSliceReducer = (\r\n state: QuestionnaireModel,\r\n action: ActionTypes,\r\n): QuestionnaireModel => {\r\n switch (action.type) {\r\n case QUESTIONNAIRE_CHANGED:\r\n setDefaultLanguage(action.questionnaire.defaultLanguage);\r\n return action.questionnaire;\r\n case ENABLE_LEGACY_BROWSER_WARNING:\r\n return {\r\n ...state,\r\n settings: {\r\n ...state.settings,\r\n ENABLE_LEGACY_BROWSER_WARNING: action.enableWarning,\r\n },\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { DateTime } from \"luxon\";\r\nimport { RespondentModel } from \"../../../models/RespondentModel\";\r\nimport { NavigationState } from \"../../../models/states/NavigationState\";\r\nimport { PageModel } from \"../../../models/PageModel\";\r\nimport {\r\n RESPONDENT_CHANGED,\r\n RESPONDENT_SET_APPOINTMENT,\r\n RESPONDENT_SET_EMAIL,\r\n RESPONDENT_SET_PHONE,\r\n RESPONDENT_SET_TIMEZONE,\r\n CHANGE_LANGUAGE,\r\n NAVIGATION_PAGE_READY,\r\n NAVIGATION_NEXT_PAGE,\r\n SET_COORDINATES,\r\n RESPONDENT_SET_DISPOSITIONCODE,\r\n} from \"../../actions\";\r\nimport { ActionTypes } from \"../../actions/types\";\r\n\r\nexport const respondentSliceReducer = (\r\n state: RespondentModel,\r\n action: ActionTypes,\r\n navigation: NavigationState,\r\n previousPage: PageModel,\r\n): RespondentModel => {\r\n switch (action.type) {\r\n case RESPONDENT_CHANGED:\r\n return action.respondent;\r\n case RESPONDENT_SET_APPOINTMENT:\r\n return { ...state, appointmentDate: action.appointment };\r\n case RESPONDENT_SET_EMAIL:\r\n return { ...state, email: action.email };\r\n case RESPONDENT_SET_PHONE:\r\n return { ...state, phone: action.phone };\r\n case RESPONDENT_SET_TIMEZONE:\r\n return { ...state, timeZone: action.timeZone };\r\n case RESPONDENT_SET_DISPOSITIONCODE:\r\n return { ...state, dispositionCode: action.dispositionCode };\r\n case CHANGE_LANGUAGE:\r\n return { ...state, language: action.code };\r\n case NAVIGATION_PAGE_READY:\r\n if (!navigation.history && !state.sessionStartTime)\r\n return {\r\n ...state,\r\n firstAnsweredQuestion: navigation.currentPage.questions[0].name,\r\n sessionStartTime: DateTime.utc(),\r\n };\r\n return state;\r\n case NAVIGATION_NEXT_PAGE:\r\n if (previousPage && !previousPage.isShortcut)\r\n return { ...state, lastAnsweredQuestion: previousPage.questions.slice(-1)[0].name };\r\n return state;\r\n case SET_COORDINATES:\r\n return {\r\n ...state,\r\n latitude: action.latitude,\r\n longitude: action.longitude,\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { DeviceModel } from \"../../../models/DeviceModel\";\r\nimport { DEVICE_CHANGED } from \"../../actions\";\r\nimport { ActionTypes } from \"../../actions/types\";\r\n\r\nexport const deviceSliceReducer = (state: DeviceModel, action: ActionTypes) => {\r\n switch (action.type) {\r\n case DEVICE_CHANGED:\r\n return action.device;\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { ValidationResultModel } from \"../../../models/ValidationResultModel\";\r\nimport {\r\n QUESTIONNAIRE_CHANGED,\r\n NAVIGATION_NEXT_PAGE,\r\n NAVIGATION_PREVIOUS_PAGE,\r\n NAVIGATION_BRANCH_TO,\r\n VALIDATION_CLEAR,\r\n VALIDATION_SET_RESULT,\r\n VALIDATION_SET_RESULT_NEXT,\r\n} from \"../../actions\";\r\nimport { ActionTypes } from \"../../actions/types\";\r\nimport { omit, isEmpty, pickBy, without } from \"../../../utils/lodash\";\r\nimport { getQuestionTypeByVariableName } from \"../../../models/utilities/questionnaireUtilities\";\r\nimport { newValidationQuestionTypes } from \"../../../validation/validators\";\r\nimport { QuestionnaireModel } from \"../../../models/QuestionnaireModel\";\r\nimport { getMentionsCount } from \"./variablesUtilities\";\r\nimport { VariablesState } from \"../../../models/states/VariablesState\";\r\n\r\nexport const validationSliceReducer = (\r\n state: ValidationResultModel,\r\n action: ActionTypes,\r\n questionnaire: QuestionnaireModel,\r\n variablesState: VariablesState,\r\n): ValidationResultModel => {\r\n switch (action.type) {\r\n case QUESTIONNAIRE_CHANGED:\r\n case NAVIGATION_NEXT_PAGE:\r\n case NAVIGATION_PREVIOUS_PAGE:\r\n case NAVIGATION_BRANCH_TO:\r\n return { isValid: true, errorsByVariableName: {} };\r\n case VALIDATION_CLEAR: {\r\n const omitVariablesErrors = (variables: string[]): ValidationResultModel => {\r\n const errorsByVariableName = omit(state.errorsByVariableName, variables);\r\n if (!isEmpty(errorsByVariableName)) {\r\n return { isValid: false, errorsByVariableName };\r\n }\r\n return { isValid: true, errorsByVariableName: {} };\r\n };\r\n if (action.keepSoftPromptError) {\r\n const variablesWithSoftPromptError = Object.keys(\r\n pickBy(\r\n state.errorsByVariableName,\r\n (errors, variableName) =>\r\n getMentionsCount(variablesState, variableName) === 0 &&\r\n errors.every((error) => error.softPrompt),\r\n ),\r\n );\r\n const allVariables = Object.keys(state.errorsByVariableName);\r\n return omitVariablesErrors(without(allVariables, ...variablesWithSoftPromptError));\r\n }\r\n if (!action.includeNewValidationResults) {\r\n const newValidationVariables = Object.keys(state.errorsByVariableName).filter(\r\n (variableName) =>\r\n !newValidationQuestionTypes().includes(\r\n getQuestionTypeByVariableName(questionnaire, variableName),\r\n ),\r\n );\r\n return omitVariablesErrors(newValidationVariables);\r\n }\r\n if (\r\n action.removeValidationForVariables &&\r\n action.removeValidationForVariables.length > 0\r\n ) {\r\n return omitVariablesErrors(action.removeValidationForVariables);\r\n }\r\n return { isValid: true, errorsByVariableName: {} };\r\n }\r\n case VALIDATION_SET_RESULT:\r\n case VALIDATION_SET_RESULT_NEXT:\r\n return {\r\n isValid: state.isValid && action.result.isValid,\r\n errorsByVariableName: {\r\n ...state.errorsByVariableName,\r\n ...action.result.errorsByVariableName,\r\n },\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { QuestionnaireModel } from \"../../../models/QuestionnaireModel\";\r\nimport { getDefaultLanguage } from \"../../../models/utilities/questionnaireUtilities\";\r\nimport { ActionTypes } from \"../../actions/types\";\r\nimport { CHANGE_LANGUAGE, QUESTIONNAIRE_CHANGED, RESPONDENT_CHANGED } from \"../../actions\";\r\n\r\nexport const languageSliceReducer = (\r\n state: string,\r\n action: ActionTypes,\r\n questionnaire: QuestionnaireModel,\r\n) => {\r\n switch (action.type) {\r\n case CHANGE_LANGUAGE: {\r\n const lang = questionnaire.languages.some((l) => l === action.code)\r\n ? action.code\r\n : getDefaultLanguage(questionnaire);\r\n document.documentElement.lang = lang;\r\n return lang;\r\n }\r\n case QUESTIONNAIRE_CHANGED:\r\n return questionnaire.defaultLanguage;\r\n case RESPONDENT_CHANGED:\r\n if (action.respondent.language) return action.respondent.language;\r\n return state;\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { ThemeModel } from \"../../../models/ThemeModel\";\r\nimport { QuestionnaireModel } from \"../../../models/QuestionnaireModel\";\r\nimport { getCurrentBlock } from \"./navigationUtilities\";\r\nimport { NavigationState } from \"../../../models/states/NavigationState\";\r\nimport { ActionTypes } from \"../../actions/types\";\r\nimport {\r\n QUESTIONNAIRE_CHANGED,\r\n PREVIEW_THEME,\r\n NAVIGATION_PREVIOUS_PAGE,\r\n NAVIGATION_PAGE_READY,\r\n NAVIGATION_PREVIEW_QUESTION,\r\n NAVIGATION_NEXT_PAGE,\r\n CHANGE_LANGUAGE,\r\n SERVER_PAGE_CHANGED,\r\n} from \"../../actions\";\r\n\r\nexport const themeSliceReducer = (\r\n state: ThemeModel,\r\n navigationState: NavigationState,\r\n action: ActionTypes,\r\n questionnaire: QuestionnaireModel,\r\n): ThemeModel => {\r\n switch (action.type) {\r\n case QUESTIONNAIRE_CHANGED:\r\n if (state && state.isPreview) return state;\r\n return questionnaire.theme;\r\n case PREVIEW_THEME:\r\n return {\r\n ...action.theme,\r\n isPreview: true,\r\n };\r\n case CHANGE_LANGUAGE:\r\n case NAVIGATION_NEXT_PAGE:\r\n case NAVIGATION_PREVIEW_QUESTION:\r\n case NAVIGATION_PREVIOUS_PAGE:\r\n case SERVER_PAGE_CHANGED:\r\n case NAVIGATION_PAGE_READY: {\r\n const block = getCurrentBlock(navigationState);\r\n const newTheme = block && block.theme ? block.theme : questionnaire.theme;\r\n if (state && state.isPreview) return state;\r\n return newTheme;\r\n }\r\n default:\r\n return state;\r\n }\r\n};\r\n","import {\r\n DEBUG_ENABLED,\r\n DEBUG_DISABLED,\r\n DEBUG_INFO_ENABLED,\r\n DEBUG_INFO_DISABLED,\r\n SET_SURVEY_MODE,\r\n SET_DISPLAY_IN_THEME_EDITOR,\r\n HIDE_ACCESSIBILITY_PANEL,\r\n} from \"../actions\";\r\nimport { ApplicationState } from \"../../models/states/ApplicationState\";\r\nimport { SurveyMode } from \"../../models/enums/SurveyMode\";\r\nimport { ActionTypes } from \"../actions/types\";\r\n\r\nconst INITIAL_STATE: ApplicationState = {\r\n debug: false,\r\n mode: SurveyMode.Normal,\r\n debugInfo: false,\r\n displayInThemeEditor: false,\r\n hideAccessibilityPanel: true,\r\n};\r\n\r\nexport const applicationReducer = (state = INITIAL_STATE, action: ActionTypes) => {\r\n switch (action.type) {\r\n case DEBUG_ENABLED:\r\n return { ...state, debug: true };\r\n case DEBUG_DISABLED:\r\n return { ...state, debug: false };\r\n case SET_SURVEY_MODE:\r\n return { ...state, mode: action.mode };\r\n case DEBUG_INFO_ENABLED:\r\n return { ...state, debugInfo: true };\r\n case DEBUG_INFO_DISABLED:\r\n return { ...state, debugInfo: false };\r\n case SET_DISPLAY_IN_THEME_EDITOR:\r\n return { ...state, displayInThemeEditor: action.displayInThemeEditor };\r\n case HIDE_ACCESSIBILITY_PANEL:\r\n return { ...state, hideAccessibilityPanel: action.hideAccessibilityPanel };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { ErrorModel } from \"../../models/ErrorModel\";\r\nimport { LOG_ERROR } from \"../actions\";\r\nimport { ActionTypes } from \"../actions/types\";\r\n\r\nconst INITIAL_STATE: ErrorModel[] = [];\r\n\r\nexport const errorsReducer = (state = INITIAL_STATE, action: ActionTypes) => {\r\n switch (action.type) {\r\n case LOG_ERROR: {\r\n const { error } = action;\r\n if (!state.some((s) => s.error === error)) return state.concat({ error });\r\n return state;\r\n }\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { LookupTableState } from \"../../models/states/LookupTableState\";\r\nimport { ActionTypes } from \"../actions/types\";\r\nimport { LOOKUP_TABLE_FETCH, LOOKUP_TABLE_RECEIVE } from \"../actions\";\r\n\r\nconst INITIAL_STATE: LookupTableState = {\r\n lookupTable: {},\r\n requestId: {},\r\n tableName: \"\",\r\n};\r\n\r\nconst randomId = () => Math.random().toString(36).substr(2, 10);\r\n\r\nexport const lookupTableReducer = (state = INITIAL_STATE, action: ActionTypes) => {\r\n switch (action.type) {\r\n case LOOKUP_TABLE_FETCH:\r\n return {\r\n ...state,\r\n questionName: action.questionName,\r\n requestId: {\r\n ...state.requestId,\r\n [action.questionName]: randomId(),\r\n },\r\n };\r\n case LOOKUP_TABLE_RECEIVE:\r\n if (state.requestId[action.questionName] !== action.requestId) {\r\n return state;\r\n }\r\n return {\r\n ...state,\r\n lookupTable: {\r\n ...state.lookupTable,\r\n [action.questionName]: action.page,\r\n },\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { RecallMode } from \"../../models/enums/RecallMode\";\r\nimport { ActionTypes } from \"../actions/types\";\r\nimport { DEBUG_ENABLED, DEBUG_DISABLED, SET_RECALL_MODE } from \"../actions\";\r\n\r\nexport const recallModeReducer = (state, action: ActionTypes) => {\r\n switch (action.type) {\r\n case DEBUG_ENABLED:\r\n case DEBUG_DISABLED:\r\n return RecallMode.Enabled;\r\n case SET_RECALL_MODE:\r\n return action.mode;\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { ActionTypes } from \"../actions/types\";\r\nimport {\r\n DEBUG_ENABLED,\r\n DEBUG_DISABLED,\r\n MOBILE_PREVIEW_TOGGLE,\r\n MOBILE_PREVIEW_ENABLED,\r\n MOBILE_PREVIEW_DISABLED,\r\n} from \"../actions\";\r\n\r\nconst INITIAL_STATE = false;\r\n\r\nexport const mobilePreviewReducer = (state = INITIAL_STATE, action: ActionTypes) => {\r\n switch (action.type) {\r\n case DEBUG_ENABLED:\r\n case DEBUG_DISABLED:\r\n return INITIAL_STATE;\r\n case MOBILE_PREVIEW_TOGGLE:\r\n return !state;\r\n case MOBILE_PREVIEW_ENABLED:\r\n return true;\r\n case MOBILE_PREVIEW_DISABLED:\r\n return false;\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { ActionTypes } from \"../actions/types\";\r\nimport {\r\n FILE_UPLOAD_STARTED,\r\n FILE_UPLOAD_PROGRESS,\r\n FILE_UPLOAD_COMPLETED,\r\n FILE_UPLOAD_FAILED,\r\n FILE_UPLOAD_CLEARED,\r\n} from \"../actions\";\r\nimport { FilesState } from \"../../models/states/FilesState\";\r\n\r\nconst INITIAL_STATE: FilesState = {\r\n filesByVariableName: {},\r\n};\r\n\r\nexport const filesReducer = (state = INITIAL_STATE, action: ActionTypes): FilesState => {\r\n switch (action.type) {\r\n case FILE_UPLOAD_STARTED: {\r\n const { variableName, matrix, fileName, size, cancellationTokenSource } = action;\r\n const file = (state.filesByVariableName[variableName] || []).find(\r\n (f) => f.matrix === matrix,\r\n );\r\n if (file) {\r\n file.cancellationTokenSource.cancel();\r\n }\r\n return {\r\n ...state,\r\n filesByVariableName: {\r\n ...state.filesByVariableName,\r\n [variableName]: [\r\n ...(state.filesByVariableName[variableName] || []).filter(\r\n (f) => f.matrix !== matrix,\r\n ),\r\n {\r\n matrix,\r\n fileName,\r\n size,\r\n cancellationTokenSource,\r\n status: \"started\",\r\n progress: 0,\r\n },\r\n ],\r\n },\r\n };\r\n }\r\n case FILE_UPLOAD_CLEARED: {\r\n const { variableName, matrix } = action;\r\n const file = (state.filesByVariableName[variableName] || []).find(\r\n (f) => f.matrix === matrix,\r\n );\r\n if (file) {\r\n file.cancellationTokenSource.cancel();\r\n }\r\n return {\r\n ...state,\r\n filesByVariableName: {\r\n ...state.filesByVariableName,\r\n [variableName]: [\r\n ...(state.filesByVariableName[variableName] || []).filter(\r\n (f) => f.matrix !== matrix,\r\n ),\r\n ],\r\n },\r\n };\r\n }\r\n case FILE_UPLOAD_PROGRESS: {\r\n const { variableName, matrix, progress } = action;\r\n const file = (state.filesByVariableName[variableName] || []).find(\r\n (f) => f.matrix === matrix,\r\n );\r\n return {\r\n ...state,\r\n filesByVariableName: {\r\n ...state.filesByVariableName,\r\n [variableName]: [\r\n ...(state.filesByVariableName[variableName] || []).filter(\r\n (f) => f.matrix !== matrix,\r\n ),\r\n { ...file, status: \"ongoing\", progress },\r\n ],\r\n },\r\n };\r\n }\r\n case FILE_UPLOAD_COMPLETED: {\r\n const { variableName, matrix } = action;\r\n const file = (state.filesByVariableName[variableName] || []).find(\r\n (f) => f.matrix === matrix,\r\n );\r\n return {\r\n ...state,\r\n filesByVariableName: {\r\n ...state.filesByVariableName,\r\n [variableName]: [\r\n ...(state.filesByVariableName[variableName] || []).filter(\r\n (f) => f.matrix !== matrix,\r\n ),\r\n { ...file, status: \"completed\", progress: 1 },\r\n ],\r\n },\r\n };\r\n }\r\n case FILE_UPLOAD_FAILED: {\r\n const { variableName, matrix } = action;\r\n const file = (state.filesByVariableName[variableName] || []).find(\r\n (f) => f.matrix === matrix,\r\n );\r\n return {\r\n ...state,\r\n filesByVariableName: {\r\n ...state.filesByVariableName,\r\n [variableName]: [\r\n ...(state.filesByVariableName[variableName] || []).filter(\r\n (f) => f.matrix !== matrix,\r\n ),\r\n { ...file, status: \"failed\" },\r\n ],\r\n },\r\n };\r\n }\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { DefaultFocusStatus } from \"../../models/states/DefaultFocusStatus\";\r\nimport { DEFAULT_FOCUS_STATUS } from \"../actions\";\r\nimport { ActionTypes } from \"../actions/types\";\r\n\r\nexport const INITIAL_STATE: DefaultFocusStatus = {\r\n statuses: [],\r\n};\r\n\r\nexport const defaultFocusStatusReducer = (\r\n state = INITIAL_STATE,\r\n action: ActionTypes,\r\n): DefaultFocusStatus => {\r\n if (action.type === DEFAULT_FOCUS_STATUS) {\r\n return INITIAL_STATE;\r\n }\r\n return state;\r\n};\r\n","import { connectionReducer } from \"./connectionReducer\";\r\nimport { interviewReducer } from \"./interview/interviewReducer\";\r\nimport { applicationReducer } from \"./applicationReducer\";\r\nimport { StoreState } from \"../../models/states/StoreState\";\r\nimport { errorsReducer } from \"./errorsReducer\";\r\nimport { recallReducer } from \"./recallReducer\";\r\nimport { lookupTableReducer } from \"./lookupTableReducer\";\r\nimport { recallModeReducer } from \"./recallModeReducer\";\r\nimport { mobilePreviewReducer } from \"./mobilePreviewReducer\";\r\nimport { filesReducer } from \"./filesReducer\";\r\nimport { ActionTypes } from \"../actions/types\";\r\nimport { SET_IS_INPUT_FOCUSED, SET_PAGE_MESSAGES_ENABLED } from \"../actions\";\r\nimport { RecallMode } from \"../../models/enums/RecallMode\";\r\nimport { defaultFocusStatusReducer } from \"./defaultFocusStatusReducer\";\r\n\r\nconst INITIAL_STATE: StoreState = {\r\n application: undefined,\r\n connection: undefined,\r\n errors: undefined,\r\n interview: undefined,\r\n lookupTable: undefined,\r\n recall: undefined,\r\n recallMode: RecallMode.Enabled,\r\n isPageMessagesEnabled: true,\r\n isFormInputFocused: false,\r\n mobilePreview: false,\r\n files: undefined,\r\n defaultFocusStatus: undefined,\r\n};\r\n\r\nconst isPageMessagesEnabledReducer = (state: boolean, action: ActionTypes) => {\r\n if (action.type === SET_PAGE_MESSAGES_ENABLED) {\r\n return action.isPageMessageEnabled;\r\n }\r\n return state;\r\n};\r\n\r\nconst isFormInputFocusedReducer = (state: boolean, action: ActionTypes) => {\r\n if (action.type === SET_IS_INPUT_FOCUSED) {\r\n return action.isInputFocused;\r\n }\r\n return state;\r\n};\r\n\r\nexport const rootReducer = (state = INITIAL_STATE, action: ActionTypes): StoreState => {\r\n const previousPage =\r\n state.interview !== undefined ? state.interview.navigation.currentPage : undefined;\r\n const interview = interviewReducer(state.interview, action);\r\n return {\r\n interview,\r\n connection: connectionReducer(state.connection, action),\r\n application: applicationReducer(state.application, action),\r\n mobilePreview: mobilePreviewReducer(state.mobilePreview, action),\r\n recallMode: recallModeReducer(state.recallMode, action),\r\n isPageMessagesEnabled: isPageMessagesEnabledReducer(state.isPageMessagesEnabled, action),\r\n errors: errorsReducer(state.errors, action),\r\n lookupTable: lookupTableReducer(state.lookupTable, action),\r\n recall: recallReducer(state.recall, action, interview, previousPage),\r\n files: filesReducer(state.files, action),\r\n isFormInputFocused: isFormInputFocusedReducer(state.isFormInputFocused, action),\r\n defaultFocusStatus: defaultFocusStatusReducer(state.defaultFocusStatus, action),\r\n };\r\n};\r\n","import { filter, map, difference, flatMap, each, isEqual, last, add } from \"../../../utils/lodash\";\r\nimport { BlockModel } from \"../../../models/BlockModel\";\r\nimport { QuestionModel } from \"../../../models/QuestionModel\";\r\nimport { PageModel } from \"../../../models/PageModel\";\r\nimport { NavigationState } from \"../../../models/states/NavigationState\";\r\nimport { InterviewState } from \"../../../models/states/InterviewState\";\r\nimport {\r\n getAllCurrentPageQuestions,\r\n getMaxLoopSize,\r\n isAutoPageBreak,\r\n} from \"../../../models/utilities/blockUtilities\";\r\nimport { Log } from \"../../../utils/logging\";\r\nimport {\r\n getQuestionWithName,\r\n getBlock,\r\n getBlockWithVariable,\r\n} from \"../../../models/utilities/questionnaireUtilities\";\r\nimport { getPageIdentifier } from \"../../../models/utilities/pageUtilities\";\r\nimport { getSettingString } from \"../../../models/utilities/settingUtilities\";\r\nimport { QuestionnaireModel } from \"../../../models/QuestionnaireModel\";\r\nimport { isNullOrEmpty } from \"../../../utils\";\r\nimport { getActiveQuesions } from \"../../../models/utilities/questionUtilities\";\r\nimport { NavigationResultPageModel } from \"../../../models/NavigationResultPageModel\";\r\n\r\nconst TAG = \"navigationUtilities\";\r\n\r\nexport const getCurrentBlock = (state: NavigationState) => {\r\n if (state.randomizedBlocks && state.randomizedBlocks.length > 0) {\r\n return state.randomizedBlocks[state.blockIndex];\r\n }\r\n return undefined;\r\n};\r\n\r\nexport const blockWillChange = (state: NavigationState, newState: NavigationState) =>\r\n state.questionIndex < 0 || state.blockIndex !== newState.blockIndex;\r\n\r\nexport const getCurrentQuestion = (state: NavigationState) => {\r\n const block = getCurrentBlock(state);\r\n if (block === undefined || block.questions.length === 0) {\r\n return undefined;\r\n }\r\n return block.questions[state.questionIndex];\r\n};\r\n\r\nexport const getBlockCurrentLoop = (blockName: string, state: NavigationState) =>\r\n state.loopByBlockName[blockName.toUpperCase()] || 1;\r\n\r\nexport const getCurrentLoop = (state: NavigationState) => {\r\n const block = getCurrentBlock(state);\r\n return getBlockCurrentLoop(block.name, state);\r\n};\r\n\r\nexport const hasNextBlock = (state: NavigationState) =>\r\n state.randomizedBlocks && state.randomizedBlocks.length > state.blockIndex + 1;\r\n\r\nexport const hasNextLoop = (state: NavigationState) => {\r\n const block = getCurrentBlock(state);\r\n return block && getBlockCurrentLoop(block.name, state) < getMaxLoopSize(block);\r\n};\r\n\r\nexport const hasNextQuestion = (state: NavigationState) => {\r\n const block = getCurrentBlock(state);\r\n return block && block.questions.length - 1 > state.questionIndex;\r\n};\r\n\r\nexport const hasPreviousPage = (state: NavigationState) => {\r\n if (state.currentPageOnServer) {\r\n return !state.currentPageOnServer.isFirstPage;\r\n }\r\n return state.history.length > 0;\r\n};\r\n\r\nexport const hasNextPage = (state: NavigationState) => {\r\n if (state.currentPageOnServer) {\r\n return !state.currentPageOnServer.isLastPage;\r\n }\r\n return (\r\n state.exitTo !== undefined ||\r\n hasNextQuestion(state) ||\r\n hasNextLoop(state) ||\r\n hasNextBlock(state)\r\n );\r\n};\r\n\r\nexport const getVariableRow = (\r\n state: NavigationState,\r\n questionnaire: QuestionnaireModel,\r\n variable: string,\r\n) => {\r\n const block = getBlockWithVariable(questionnaire, variable);\r\n if (block == null || state.loopByBlockName == null) return 1;\r\n return state.loopByBlockName[block.name.toUpperCase()] || 1;\r\n};\r\n\r\nexport const nextQuestion = (state: NavigationState) => ({\r\n ...state,\r\n questionIndex: state.questionIndex + 1,\r\n});\r\n\r\nexport const nextLoop = (state: NavigationState) => ({\r\n ...state,\r\n questionIndex: 0,\r\n loopByBlockName: {\r\n ...state.loopByBlockName,\r\n [getCurrentBlock(state).name.toUpperCase()]: getCurrentLoop(state) + 1,\r\n },\r\n});\r\n\r\nexport const nextBlock = (state: NavigationState) => {\r\n const block = state.randomizedBlocks[state.blockIndex + 1];\r\n return {\r\n ...state,\r\n questionIndex: 0,\r\n blockIndex: state.blockIndex + 1,\r\n loopByBlockName: {\r\n ...state.loopByBlockName,\r\n [block.name.toUpperCase()]: 1,\r\n },\r\n };\r\n};\r\n\r\nexport const next = (state: NavigationState) => {\r\n if (!hasNextPage(state)) {\r\n return state;\r\n }\r\n if (hasNextQuestion(state)) {\r\n return nextQuestion(state);\r\n }\r\n if (hasNextLoop(state)) {\r\n return nextLoop(state);\r\n }\r\n if (hasNextBlock(state)) {\r\n return nextBlock(state);\r\n }\r\n return state;\r\n};\r\n\r\nexport function getRandomizedQuestionWithName(state: NavigationState, name: string) {\r\n if (isNullOrEmpty(name)) return undefined;\r\n const ids = state.randomizedQuestionIdByName[name.toUpperCase()];\r\n if (ids == null) return undefined;\r\n const block = state.randomizedBlocks[ids[0]];\r\n if (block == null) return undefined;\r\n return block.questions[ids[1]];\r\n}\r\n\r\nexport const branchToAbsolute = (\r\n state: NavigationState,\r\n questionnaire: QuestionnaireModel,\r\n questionName: string,\r\n loopIndex?: number,\r\n) => {\r\n const dest = getQuestionWithName(questionnaire, questionName);\r\n if (dest === undefined) {\r\n Log.e(TAG, \"BRANCHING_QUESTION_NOT_FOUND\", questionName);\r\n return state;\r\n }\r\n\r\n const [blockIndex, questionIndex] = state.randomizedQuestionIdByName[questionName];\r\n const block = state.randomizedBlocks[blockIndex];\r\n if (!loopIndex) {\r\n loopIndex = blockIndex === state.currentPage.blockIndex ? state.currentPage.loopIndex : 1;\r\n }\r\n\r\n const newState = {\r\n ...state,\r\n blockIndex,\r\n questionIndex,\r\n loopByBlockName: {\r\n ...state.loopByBlockName,\r\n [block.name.toUpperCase()]: loopIndex,\r\n },\r\n };\r\n return newState;\r\n};\r\n\r\nexport const branchToRelative = (\r\n state: NavigationState,\r\n questionnaire: QuestionnaireModel,\r\n originQuestionName: string,\r\n count: number,\r\n) => {\r\n state = branchToAbsolute(state, questionnaire, originQuestionName, getCurrentLoop(state));\r\n for (let i = 0; i < count; i++) {\r\n state = next(state);\r\n }\r\n return state;\r\n};\r\n\r\nexport const branchToBlock = (\r\n state: NavigationState,\r\n questionnaire: QuestionnaireModel,\r\n blockName: string,\r\n) => {\r\n const dest = getBlock(questionnaire, blockName);\r\n if (dest === undefined) {\r\n Log.e(TAG, \"BRANCHING_BLOCK_NOT_FOUND\", blockName);\r\n return undefined;\r\n }\r\n return {\r\n ...state,\r\n questionIndex: 0,\r\n blockIndex: dest.index,\r\n };\r\n};\r\n\r\nexport const updateNavigationButtons = (state: NavigationState): NavigationState => ({\r\n ...state,\r\n hasNextPage: hasNextPage(state),\r\n hasPreviousPage: hasPreviousPage(state),\r\n});\r\n\r\nexport const getProgressBarStartQuestion = (\r\n state: NavigationState,\r\n questionnaire: QuestionnaireModel,\r\n) =>\r\n getRandomizedQuestionWithName(\r\n state,\r\n getSettingString(questionnaire, \"PROGRESSBARSTARTQUESTION\", \"\"),\r\n );\r\n\r\nexport const getProgressBarEndQuestion = (\r\n state: NavigationState,\r\n questionnaire: QuestionnaireModel,\r\n) =>\r\n getRandomizedQuestionWithName(\r\n state,\r\n getSettingString(questionnaire, \"PROGRESSBARENDQUESTION\", \"\"),\r\n );\r\n\r\nconst getProgressBarBlocks = (\r\n blocks: BlockModel[],\r\n state: NavigationState,\r\n questionnaire: QuestionnaireModel,\r\n) => {\r\n let blocksWithProgress = blocks;\r\n const startQuestion = getProgressBarStartQuestion(state, questionnaire);\r\n const endQuestion = getProgressBarEndQuestion(state, questionnaire);\r\n\r\n // Filter blocks according to the start and end questions\r\n if (startQuestion) {\r\n blocksWithProgress = filter(blocksWithProgress, (b) => b.index >= startQuestion.blockIndex);\r\n }\r\n if (endQuestion) {\r\n blocksWithProgress = filter(blocksWithProgress, (b) => b.index <= endQuestion.blockIndex);\r\n }\r\n\r\n return map(blocksWithProgress, (b) => {\r\n let questions = getActiveQuesions(b.questions);\r\n\r\n // Filter questions according to start and end questions\r\n if (startQuestion && b.index === startQuestion.blockIndex) {\r\n questions = filter(questions, (q) => q.index >= startQuestion.index);\r\n }\r\n if (endQuestion && b.index === endQuestion.blockIndex) {\r\n questions = filter(questions, (q) => q.index <= endQuestion.index);\r\n }\r\n return {\r\n ...b,\r\n questions,\r\n };\r\n });\r\n};\r\n\r\nexport const getProgress = (\r\n state: NavigationState,\r\n page: PageModel,\r\n questionnaire: QuestionnaireModel,\r\n blocks: BlockModel[],\r\n) => {\r\n const blocksWithProgress = getProgressBarBlocks(blocks, state, questionnaire);\r\n const pageQuestions = getActiveQuesions(page.questions);\r\n // Check whether some of the current page questions has progress bar\r\n if (\r\n difference(\r\n pageQuestions,\r\n flatMap(blocksWithProgress, (b) => b.questions),\r\n ).length === pageQuestions.length\r\n ) {\r\n return -1;\r\n }\r\n let progress = 0;\r\n each(blocksWithProgress, (block) => {\r\n if (page.blockIndex === block.index) {\r\n progress += block.questions.length * (page.loopIndex - 1);\r\n\r\n // Adjust question index to consider filtered questions\r\n each(block.questions, (q, i) => {\r\n if (isEqual(q, last(pageQuestions))) {\r\n progress += i + 1;\r\n }\r\n });\r\n return false;\r\n }\r\n progress += block.questions.length * getMaxLoopSize(block);\r\n return undefined;\r\n });\r\n const totalQuestions = blocksWithProgress\r\n .map((b) => b.questions.length * getMaxLoopSize(b))\r\n .reduce(add);\r\n return Math.trunc((progress / totalQuestions) * 100);\r\n};\r\n\r\nexport const logPageSeparator = (page: PageModel, block: BlockModel) => {\r\n const pageIdentifier = getPageIdentifier(page, block);\r\n const paddingSize = Math.max(0, (50 - pageIdentifier.length) / 2);\r\n const prefix = \"-\".repeat(Math.floor(paddingSize));\r\n const suffix = \"-\".repeat(Math.ceil(paddingSize));\r\n Log.v(TAG, prefix + pageIdentifier + suffix);\r\n};\r\n\r\nexport const updateHistory = (state: NavigationState) => {\r\n let { history } = state;\r\n if (state.currentPage !== undefined) history = history.concat(state.currentPage);\r\n return {\r\n ...state,\r\n history,\r\n };\r\n};\r\n\r\nexport const setPage = (state: NavigationState, page: PageModel, isPrevious?: boolean) => {\r\n if (!isPrevious && state.currentPage !== undefined && state.currentPage.isReady)\r\n state = updateHistory(state);\r\n const block = state.randomizedBlocks[page.blockIndex];\r\n state = {\r\n ...state,\r\n exitTo: undefined,\r\n questionIndex: page.questions.slice(-1)[0].index,\r\n loopByBlockName: {\r\n ...state.loopByBlockName,\r\n [block.name.toUpperCase()]: page.loopIndex,\r\n },\r\n blockIndex: page.blockIndex,\r\n currentPage: { ...page, isPrevious, isReady: false },\r\n history: isPrevious ? state.history.slice(0, -1) : state.history,\r\n message: undefined,\r\n };\r\n logPageSeparator(page, block);\r\n return updateNavigationButtons(state);\r\n};\r\n\r\nexport const buildPageFromServer = (\r\n state: NavigationState,\r\n interview: InterviewState,\r\n serverPage: NavigationResultPageModel,\r\n): NavigationState => {\r\n const page: PageModel = {\r\n blockIndex: getBlockIndexById(serverPage.blockId, interview.questionnaire?.blocks),\r\n loopIndex: serverPage.matrix,\r\n questions: getServerCurrentQuestions(serverPage, interview.questionnaire),\r\n progress: serverPage.progress,\r\n isPrevious: null,\r\n isReady: false,\r\n isShortcut: null,\r\n };\r\n const newState = {\r\n ...state,\r\n randomizedBlocks: interview.questionnaire?.blocks,\r\n currentPageOnServer: serverPage,\r\n };\r\n return setPage(newState, page);\r\n};\r\n\r\nconst getBlockIndexById = (blockId: number, randomizedBlocks: BlockModel[]) =>\r\n randomizedBlocks.find((b) => b.id === blockId)?.index;\r\n\r\nexport const getServerCurrentQuestions = (\r\n page: NavigationResultPageModel,\r\n questionnaire: QuestionnaireModel,\r\n) => page.questions.map((q) => getQuestionWithName(questionnaire, q.name));\r\n\r\nexport const buildPage = (\r\n state: NavigationState,\r\n interview: InterviewState,\r\n exitTo?: PageModel,\r\n): any => {\r\n const block = getCurrentBlock(state);\r\n\r\n // Generate the list of questions.\r\n const questions: QuestionModel[] = [];\r\n while (true) {\r\n const question = getCurrentQuestion(state);\r\n if (!question) {\r\n break;\r\n }\r\n questions.push(question);\r\n if (!hasNextQuestion(state) || question.isPageBreak || isAutoPageBreak(block)) {\r\n break;\r\n }\r\n state = nextQuestion(state);\r\n }\r\n\r\n // Generate the page.\r\n const page: PageModel = {\r\n blockIndex: state.blockIndex,\r\n loopIndex: getCurrentLoop(state),\r\n questions,\r\n progress: exitTo != null ? state.currentPage.progress : 0,\r\n isPrevious: false,\r\n isReady: false,\r\n isShortcut: exitTo != null,\r\n };\r\n\r\n // Calculate progress if this is not a shortcut.\r\n if (!page.isShortcut)\r\n page.progress = getProgress(state, page, interview.questionnaire, state.randomizedBlocks);\r\n\r\n // Set current page and add to history.\r\n return {\r\n ...setPage(state, page),\r\n exitTo,\r\n };\r\n};\r\n\r\nexport const previous = (state: NavigationState) => {\r\n if (!hasPreviousPage(state)) return state;\r\n if (state.exitTo == null) state.history = state.history.filter((h) => !h.isShortcut);\r\n const previousPage = state.history.slice(-1)[0];\r\n return setPage(state, previousPage, true);\r\n};\r\n\r\nexport const pageReady = (state: NavigationState) => ({\r\n ...state,\r\n currentPage: {\r\n ...state.currentPage,\r\n isReady: true,\r\n },\r\n});\r\n\r\nexport const currentPageVariableDependencies = (state: NavigationState) =>\r\n getAllCurrentPageQuestions(getCurrentBlock(state), state.questionIndex).flatMap(\r\n (q) => q.variableDependencies,\r\n );\r\n","import { PageModel } from \"../PageModel\";\r\nimport { BlockModel } from \"../BlockModel\";\r\nimport { getMaxLoopSize } from \"./blockUtilities\";\r\n\r\nexport const pageEquals = (a: PageModel, b: PageModel) =>\r\n a.blockIndex === b.blockIndex &&\r\n a.loopIndex === b.loopIndex &&\r\n a.questions.length === b.questions.length &&\r\n a.questions[0].index === b.questions[0].index &&\r\n a.isPrevious === b.isPrevious;\r\n\r\nexport function getPageIdentifier(page: PageModel, block: BlockModel) {\r\n const firstQuestion = page.questions[0].index;\r\n const lastQuestion = page.questions[page.questions.length - 1].index;\r\n const questionRange =\r\n firstQuestion === lastQuestion ? firstQuestion : `${firstQuestion}-${lastQuestion}`;\r\n return `${block.name}[q:${questionRange}/${block.questions.length}, m:${\r\n page.loopIndex\r\n }/${getMaxLoopSize(block)}]`;\r\n}\r\n","import { QuotaModel } from \"../../../models/QuotaModel\";\r\nimport { InterviewState } from \"../../../models/states/InterviewState\";\r\nimport { DispositionCode } from \"../../../models/enums/DispositionCode\";\r\nimport { __evaluateSafe__ } from \"../../../expressions/parser\";\r\nimport { QuotaState } from \"../../../models/states/QuotaState\";\r\nimport { QuotaStatus } from \"../../../models/enums/QuotaStatus\";\r\nimport { ActionTypes } from \"../../actions/types\";\r\nimport {\r\n QUOTAS_CHANGED,\r\n NAVIGATION_NEXT_PAGE,\r\n QUOTAS_CLOSE_STRATUM,\r\n QUOTAS_CLOSE_USER_STRATUM,\r\n} from \"../../actions\";\r\n\r\nconst INITIAL_STATE: QuotaState = {\r\n input: [],\r\n output: [],\r\n};\r\n\r\nconst initializeStrata = (input: QuotaModel[]) =>\r\n input.map((quota) => {\r\n const output = {\r\n ...quota,\r\n // Set closed status to half-open for closed strata warning dialogs.\r\n status: quota.status === QuotaStatus.Open ? QuotaStatus.Open : QuotaStatus.HalfOpen,\r\n userStatus:\r\n quota.userStatus === QuotaStatus.Open ? QuotaStatus.Open : QuotaStatus.HalfOpen,\r\n };\r\n // If the quota is global objective, increment right away.\r\n if (quota.stratumId === 0) {\r\n output.frequency += 1;\r\n output.userFrequency += 1;\r\n }\r\n return output;\r\n });\r\n\r\nconst decrementIfResumed = (input: QuotaModel[], interview: InterviewState) =>\r\n input.map((quota) => {\r\n if (interview.respondent.dispositionCode === DispositionCode.Empty) return quota; // New respondent; do not decrement.\r\n if (quota.stratumId > 0 && !__evaluateSafe__(interview, quota.condition).asBoolean())\r\n return quota; // Quota was already false when resumed; do not decrement.\r\n return {\r\n ...quota,\r\n frequency: quota.frequency - 1,\r\n userFrequency: quota.userFrequency - 1,\r\n };\r\n });\r\n\r\nconst calculateStrata = (input: QuotaModel[], output: QuotaModel[], interview: InterviewState) =>\r\n input.map((quota, index) => {\r\n if (quota.stratumId > 0 && !__evaluateSafe__(interview, quota.condition).asBoolean())\r\n return quota; // Only increment quota if it is global or evaluates as true.\r\n return {\r\n ...quota,\r\n frequency: quota.frequency + 1,\r\n userFrequency: quota.userFrequency + 1,\r\n status: output[index].status,\r\n userStatus: output[index].userStatus,\r\n };\r\n });\r\n\r\nconst closeStratum = (input: QuotaModel[], stratumId: number) =>\r\n input.map((quota) => {\r\n if (quota.stratumId !== stratumId) return quota;\r\n return {\r\n ...quota,\r\n status: QuotaStatus.Closed,\r\n userStatus: QuotaStatus.Closed,\r\n };\r\n });\r\n\r\nconst closeUserStratum = (input: QuotaModel[], stratumId: number) =>\r\n input.map((quota) => {\r\n if (quota.stratumId !== stratumId) return quota;\r\n return {\r\n ...quota,\r\n userStatus: QuotaStatus.Closed,\r\n };\r\n });\r\n\r\nexport const quotasReducer = (\r\n state = INITIAL_STATE,\r\n interview: InterviewState,\r\n action: ActionTypes,\r\n): QuotaState => {\r\n switch (action.type) {\r\n case QUOTAS_CHANGED:\r\n return {\r\n input: decrementIfResumed(action.quotas, interview),\r\n output: initializeStrata(action.quotas),\r\n };\r\n case NAVIGATION_NEXT_PAGE:\r\n return {\r\n ...state,\r\n output: calculateStrata(state.input, state.output, interview),\r\n };\r\n case QUOTAS_CLOSE_STRATUM:\r\n return {\r\n ...state,\r\n output: closeStratum(state.input, action.stratumId),\r\n };\r\n case QUOTAS_CLOSE_USER_STRATUM:\r\n return {\r\n ...state,\r\n output: closeUserStratum(state.input, action.stratumId),\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { DateTime } from \"luxon\";\r\nimport { countBy, values } from \"../../../utils/lodash\";\r\nimport { SystemVariableModel } from \"../../../models/SystemVariableModel\";\r\nimport { VariablesState } from \"../../../models/states/VariablesState\";\r\nimport { PageModel } from \"../../../models/PageModel\";\r\nimport { RespondentModel } from \"../../../models/RespondentModel\";\r\nimport { EPOCH, timeZoneOffset } from \"../../../utils/time\";\r\nimport { QuestionnaireModel } from \"../../../models/QuestionnaireModel\";\r\nimport { NavigationState } from \"../../../models/states/NavigationState\";\r\n// eslint-disable-next-line import/no-cycle\r\nimport { getVariableRow } from \"./navigationUtilities\";\r\nimport { MentionBuilder, MentionBuilderDelegate } from \"../../../models/builders/MentionBuilder\";\r\nimport { MentionModel } from \"../../../models/MentionModel\";\r\nimport { getSettingBoolean } from \"../../../models/utilities/settingUtilities\";\r\nimport { getCoordinates } from \"../../../models/utilities/respondentUtilities\";\r\n\r\nexport const getMentions = (state: VariablesState, variableName: string, matrixIndex?: number) => {\r\n return (state.mentionsByVariableName[variableName.toUpperCase()] || []).filter(\r\n (mention) => matrixIndex === undefined || mention.matrix === matrixIndex,\r\n );\r\n};\r\n\r\nexport const getMentionsCount = (\r\n state: VariablesState,\r\n variableName: string,\r\n matrixIndex?: number,\r\n) => {\r\n const mentions = getMentions(state, variableName, matrixIndex);\r\n const count = countBy(mentions, \"matrix\");\r\n return values(count).length;\r\n};\r\n\r\nexport const getMention = (\r\n state: VariablesState,\r\n variableName: string,\r\n matrixIndex: number,\r\n mentionIndex: number,\r\n) =>\r\n getMentions(state, variableName, matrixIndex).find((mention) => mention.index === mentionIndex);\r\n\r\nexport const clearMentions = (\r\n state: VariablesState,\r\n variableName: string,\r\n matrixIndex: number,\r\n questionnaire: QuestionnaireModel,\r\n) => {\r\n const varName = variableName.toUpperCase();\r\n return {\r\n ...state,\r\n mentionsByVariableName: {\r\n ...state.mentionsByVariableName,\r\n [varName]: (state.mentionsByVariableName[varName] || []).filter(\r\n (mention) => mention.matrix !== matrixIndex,\r\n ),\r\n },\r\n };\r\n};\r\n\r\nexport const clearCurrentPageMentions = (\r\n state: VariablesState,\r\n variableNames: string[],\r\n matrixIndex: number,\r\n): VariablesState => {\r\n const updatedMentionsByVariableName: { [variableName: string]: MentionModel[] } = {};\r\n\r\n // Copy mentions for keys that may not be iterated but need to remain\r\n Object.entries(state.mentionsByVariableName).forEach(([varName, mentions]) => {\r\n if (!variableNames.includes(varName)) {\r\n updatedMentionsByVariableName[varName] = mentions;\r\n }\r\n });\r\n\r\n // Iterate over each variable name and its corresponding matrix index\r\n variableNames.forEach((name) => {\r\n const varName = name.toUpperCase();\r\n // Check if mentions exist for the current variable name and if it should be filtered\r\n if (state.mentionsByVariableName[varName]) {\r\n // Filter mentions for the current variable name and matrix index\r\n const filteredMentions = state.mentionsByVariableName[varName].filter(\r\n (mention) => mention.matrix !== matrixIndex,\r\n );\r\n\r\n // Update the mentions for the current variable name\r\n if (filteredMentions.length > 0) {\r\n updatedMentionsByVariableName[varName] = filteredMentions;\r\n }\r\n }\r\n });\r\n\r\n // Return the updated state with cleared mentions\r\n return {\r\n ...state,\r\n mentionsByVariableName: updatedMentionsByVariableName,\r\n };\r\n};\r\n\r\nconst getRow = (currentPage?: PageModel) =>\r\n currentPage === undefined ? \"\" : String(currentPage.loopIndex);\r\n\r\nexport const createSystemVariables = (respondent: RespondentModel, currentPage?: PageModel) => {\r\n const offset = timeZoneOffset(respondent);\r\n const t = DateTime.utc();\r\n const tz = DateTime.local().plus({ minutes: offset });\r\n const d = tz.diff(respondent.sessionStartTime || DateTime.local());\r\n return {\r\n $D: new SystemVariableModel(tz.toFormat(\"DDDD\"), tz.diff(EPOCH, \"days\").toString()),\r\n $UTCDATE: new SystemVariableModel(t.toFormat(\"DDDD\"), t.diff(EPOCH, \"days\").toString()),\r\n $UTCTIME: new SystemVariableModel(\r\n t.toFormat(\"t\"),\r\n (t.second + t.minute * 60 + t.hour * 3600).toString(),\r\n ),\r\n $H: new SystemVariableModel(\r\n tz.toFormat(\"DDDD\"),\r\n (tz.minute + (tz.hour + 1) * 60).toString(),\r\n ),\r\n $J: new SystemVariableModel(tz.toFormat(\"DDDD\"), tz.day.toString()),\r\n $T: new SystemVariableModel(\r\n `${d.hours.toFixed(0)}:${d.minutes}:${d.seconds}`,\r\n d.seconds.toFixed(0),\r\n ),\r\n $GEOLOCATION: new SystemVariableModel(getCoordinates(respondent)),\r\n $Z: new SystemVariableModel(tz.toFormat(\"ZZ\")),\r\n $ROW: new SystemVariableModel(getRow(currentPage)),\r\n $R: new SystemVariableModel(getRow(currentPage)),\r\n };\r\n};\r\n\r\nexport const setVariableMention = (\r\n state: VariablesState,\r\n navigation: NavigationState,\r\n questionnaire: QuestionnaireModel,\r\n variableName: string,\r\n index: number,\r\n builder: MentionBuilderDelegate,\r\n): VariablesState => {\r\n let newState = { ...state };\r\n const varName = variableName.toUpperCase();\r\n const matrixIndex =\r\n index === undefined ? getVariableRow(navigation, questionnaire, varName) : index;\r\n // Get existing mentions for the variable before they are removed.\r\n const mentions = getMentions(newState, varName, matrixIndex);\r\n // Build the mentionBuilder.\r\n const setMentions = builder(new MentionBuilder(mentions)).build();\r\n // Clear and update the state with the new mentions.\r\n newState = clearMentions(newState, varName, matrixIndex, questionnaire);\r\n return {\r\n ...newState,\r\n mentionsByVariableName: {\r\n ...newState.mentionsByVariableName,\r\n [varName]: [\r\n ...(newState.mentionsByVariableName[varName] || []).filter(\r\n (m) => m.matrix !== matrixIndex,\r\n ),\r\n ...setMentions.map((mention: MentionModel, i) => {\r\n const { value, customChoiceIndex } = mention;\r\n let { openEnd } = mention;\r\n if (openEnd && !getSettingBoolean(questionnaire, \"ALLOW_OPEN_END_LOWER_CASE\"))\r\n openEnd = openEnd.toUpperCase();\r\n return { index: i + 1, matrix: matrixIndex, value, openEnd, customChoiceIndex };\r\n }),\r\n ],\r\n },\r\n };\r\n};\r\n","/* eslint-disable guard-for-in */\r\n/* eslint-disable no-case-declarations */\r\n/* eslint-disable no-restricted-syntax */\r\nimport { each } from \"lodash\";\r\nimport { ActionTypes } from \"../actions/types\";\r\nimport {\r\n NAVIGATION_NEXT_PAGE,\r\n ENABLE_MAPPED_VARIABLE_FIELD_STATUS,\r\n RESET_MENTIONS,\r\n SET_VARIABLE_MENTIONS,\r\n UPDATE_QUESTION_FIELD_STATUS,\r\n} from \"../actions\";\r\nimport { QuestionnaireModel } from \"../../models/QuestionnaireModel\";\r\nimport { QuestionType } from \"../../models/enums/QuestionType\";\r\nimport { getQuestionWithVariable } from \"../../models/utilities/questionnaireUtilities\";\r\n\r\nimport { MentionModel } from \"../../models/MentionModel\";\r\nimport { getSettingString } from \"../../models/utilities/settingUtilities\";\r\nimport { AxisModel } from \"../../models/AxisModel\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { VariableModel } from \"../../models/VariableModel\";\r\nconst INITIAL_STATE = {};\r\n\r\nexport const questionFieldStatusReducer = (\r\n state = INITIAL_STATE,\r\n action: ActionTypes,\r\n questionnaire: QuestionnaireModel,\r\n oldMentionsByVariableName: { [variableName: string]: MentionModel[] }, // Previous saved mentions for variables\r\n newMentionsByVariableName: { [variableName: string]: MentionModel[] }, // New changed mentions for variables\r\n) => {\r\n const reducerStates = { ...state };\r\n const changeReducerStateForVariableCells: [string, boolean, any][] = [];\r\n let disableColumnsList = [];\r\n\r\n switch (action.type) {\r\n case NAVIGATION_NEXT_PAGE:\r\n each(oldMentionsByVariableName, (mentions, variableName) => {\r\n if (Object.keys(oldMentionsByVariableName).includes(variableName)) {\r\n const question = getQuestionWithVariable(questionnaire, variableName);\r\n if (question) {\r\n updateStatusForHybridQuestionMapppedVariableCells(\r\n action.type,\r\n question,\r\n reducerStates,\r\n variableName,\r\n disableColumnsList,\r\n changeReducerStateForVariableCells,\r\n oldMentionsByVariableName,\r\n true,\r\n false,\r\n );\r\n }\r\n }\r\n disableColumnsList = []; // For each row reset column might be different\r\n });\r\n\r\n setDisabledStatesForVariables(\r\n NAVIGATION_NEXT_PAGE,\r\n reducerStates,\r\n changeReducerStateForVariableCells,\r\n );\r\n\r\n return reducerStates;\r\n case SET_VARIABLE_MENTIONS:\r\n updateStateAfterMentionsComparison(\r\n SET_VARIABLE_MENTIONS,\r\n reducerStates,\r\n questionnaire,\r\n newMentionsByVariableName, //In set variablemention newmentions is reversed with old due to being newer state on current page\r\n oldMentionsByVariableName,\r\n true,\r\n true,\r\n );\r\n return reducerStates;\r\n case RESET_MENTIONS:\r\n updateStateAfterMentionsComparison(\r\n RESET_MENTIONS,\r\n reducerStates,\r\n questionnaire,\r\n oldMentionsByVariableName,\r\n action.mentions, // this action.mentions contains new mentions for reset case\r\n false,\r\n false,\r\n );\r\n\r\n return reducerStates;\r\n case UPDATE_QUESTION_FIELD_STATUS:\r\n const { fieldIdentifiers, checkAndSetToState, isDisabled } = action;\r\n\r\n if (!checkAndSetToState) {\r\n // If is called when intially the status being set for variable cell\r\n for (const key in fieldIdentifiers) {\r\n const fieldKey = fieldIdentifiers[key];\r\n if (!reducerStates[fieldKey]) {\r\n // Initialize the state for new instanceId\r\n reducerStates[fieldKey] = {\r\n isDisabled: action.isDisabled,\r\n };\r\n } else {\r\n // Update the state for existing instanceId\r\n reducerStates[fieldKey] = {\r\n ...reducerStates[fieldKey],\r\n isDisabled: action.isDisabled,\r\n };\r\n }\r\n }\r\n } else {\r\n const mapperVariable: [string, boolean, any][] = fieldIdentifiers.map((item) => [\r\n item,\r\n isDisabled,\r\n [],\r\n ]);\r\n\r\n updateFieldStatusAndMappedFieldOnSelection(\r\n questionnaire,\r\n mapperVariable,\r\n newMentionsByVariableName,\r\n );\r\n\r\n setDisabledStatesForVariables(\r\n ENABLE_MAPPED_VARIABLE_FIELD_STATUS,\r\n reducerStates,\r\n mapperVariable,\r\n );\r\n }\r\n\r\n return reducerStates;\r\n case ENABLE_MAPPED_VARIABLE_FIELD_STATUS:\r\n const { variableName, mentions } = action;\r\n const question = getQuestionWithVariable(questionnaire, variableName);\r\n\r\n // Trigger when hide logic is associated so check for current row only\r\n if (question) {\r\n enableMappedVariableFieldStatus(\r\n question,\r\n reducerStates,\r\n variableName,\r\n mentions, // current variable latest state\r\n changeReducerStateForVariableCells,\r\n disableColumnsList,\r\n true,\r\n true,\r\n action.type,\r\n );\r\n }\r\n\r\n enableMappedDisabledFields(\r\n reducerStates,\r\n questionnaire,\r\n ENABLE_MAPPED_VARIABLE_FIELD_STATUS,\r\n changeReducerStateForVariableCells,\r\n mentions,\r\n );\r\n\r\n setDisabledStatesForVariables(\r\n ENABLE_MAPPED_VARIABLE_FIELD_STATUS,\r\n reducerStates,\r\n changeReducerStateForVariableCells,\r\n );\r\n return reducerStates;\r\n default:\r\n return reducerStates;\r\n }\r\n};\r\n\r\n/*\r\n updateFieldStatusAndMappedFieldOnSelection: To be used for enabling if linked field is disabled on choice/input value selection for selected variable row only.\r\n*/\r\nfunction updateFieldStatusAndMappedFieldOnSelection(\r\n questionnaire: QuestionnaireModel,\r\n changeReducerStateForVariableCells: [string, boolean, any][],\r\n mentions: any,\r\n) {\r\n let question: QuestionModel;\r\n let row: AxisModel[] = [];\r\n let disableColumnsList: any = [];\r\n changeReducerStateForVariableCells.forEach(([identifierId, isDisabled]) => {\r\n const splitedValues = identifierId.split(\"&\"); // questionId & VariableName\r\n let variableName = splitedValues[1];\r\n\r\n // Fetch details only for the first item as row is same\r\n if (!question) {\r\n question = getQuestionWithVariable(questionnaire, variableName);\r\n if (question) {\r\n row = getFilteredRowsForQuestion(question, variableName, false);\r\n if (row && row.length > 0) {\r\n getDisabledColumnsForRowBasedOnChoiceSelected(\r\n row[0],\r\n disableColumnsList,\r\n mentions,\r\n );\r\n }\r\n }\r\n }\r\n\r\n if (row && row.length > 0) {\r\n getStatusForEntireRowVariableOnSelectionChange(\r\n question,\r\n row[0],\r\n disableColumnsList,\r\n identifierId,\r\n changeReducerStateForVariableCells,\r\n );\r\n }\r\n });\r\n}\r\n\r\n// To be used for enabling if linked field is disabled.\r\nfunction enableMappedDisabledFields(\r\n reducerStates: any,\r\n questionnaire: QuestionnaireModel,\r\n actionType: string,\r\n changeReducerStateForVariableCells: [string, boolean, any][],\r\n mentions: any,\r\n) {\r\n changeReducerStateForVariableCells.forEach(([identifierId, isDisabled, disableColumnsList]) => {\r\n if (\r\n (actionType === ENABLE_MAPPED_VARIABLE_FIELD_STATUS ||\r\n actionType === SET_VARIABLE_MENTIONS) &&\r\n isDisabled &&\r\n reducerStates[identifierId] &&\r\n !reducerStates[identifierId].isDisabled // Earlier was enabled and now field is supposed to be disabled check for those kind of field only\r\n ) {\r\n const splitedValues = identifierId.split(\"&\"); // questionId & VariableName\r\n let variableName = splitedValues[1];\r\n\r\n // execute for enabling only if state of linked field is dis\r\n const question = getQuestionWithVariable(questionnaire, variableName);\r\n if (question) {\r\n const filteredRows = getFilteredRowsForQuestion(question, variableName, false);\r\n if (filteredRows && filteredRows.length > 0) {\r\n each(filteredRows, (filteredRow) => {\r\n enableStatusForDisabledFieldWhichAreReferenced(\r\n question,\r\n reducerStates,\r\n filteredRow,\r\n disableColumnsList,\r\n identifierId,\r\n changeReducerStateForVariableCells,\r\n mentions,\r\n );\r\n });\r\n }\r\n }\r\n }\r\n });\r\n}\r\n\r\n// call when Hidden triggered to Enable field\r\nfunction enableMappedVariableFieldStatus(\r\n question: QuestionModel,\r\n reducerStates: any,\r\n variableName: string,\r\n currentVariableMentions: MentionModel[],\r\n changeReducerStateForVariableCells: [string, boolean, any][],\r\n disableColumnsList: any,\r\n getSingleRow: boolean,\r\n hideGridVariableCall: boolean,\r\n actionType: string,\r\n) {\r\n const result: { [variableName: string]: MentionModel[] } = {};\r\n result[variableName] = currentVariableMentions;\r\n\r\n updateStatusForHybridQuestionMapppedVariableCells(\r\n actionType,\r\n question,\r\n reducerStates,\r\n variableName,\r\n disableColumnsList,\r\n changeReducerStateForVariableCells,\r\n result,\r\n getSingleRow,\r\n hideGridVariableCall,\r\n );\r\n}\r\n\r\nfunction findChangedMentionsForVariableNames(\r\n newMentionsByVariableName: { [variableName: string]: MentionModel[] },\r\n oldMentionsByVariableName: { [variableName: string]: MentionModel[] },\r\n checkForNewMentions: boolean,\r\n): { [variableName: string]: MentionModel[] } {\r\n const result: { [variableName: string]: MentionModel[] } = {};\r\n\r\n // Get old mentions which are removed\r\n Object.keys(oldMentionsByVariableName).forEach((variableName) => {\r\n const oldVariableMentions = oldMentionsByVariableName[variableName] || [];\r\n const newVariableMentions = newMentionsByVariableName[variableName] || [];\r\n\r\n let changeStatusForMentions: any;\r\n /* Required because newmentions is reversed with old due to being newer state on current page\r\n If we stay in same page then mentions are increasing generally if we are selecting new options and \r\n when going back to old page reverse is happening actually as new selected mentions are reseted if not being \r\n saved on server \r\n */\r\n if (checkForNewMentions) {\r\n changeStatusForMentions = findMentionsToResetForVariableNames(\r\n newVariableMentions,\r\n oldVariableMentions,\r\n );\r\n } else {\r\n changeStatusForMentions = findMentionsToResetForVariableNames(\r\n oldVariableMentions,\r\n newVariableMentions,\r\n );\r\n }\r\n\r\n if (changeStatusForMentions.length > 0) {\r\n result[variableName] = changeStatusForMentions;\r\n } else if (\r\n !checkForNewMentions &&\r\n !(newVariableMentions && newVariableMentions.length > 0) &&\r\n oldVariableMentions\r\n ) {\r\n // Set when in current page/question any new variable mention been added\r\n result[variableName] = newVariableMentions;\r\n }\r\n });\r\n\r\n // Get mentions which are added newly and to be removed\r\n Object.keys(newMentionsByVariableName).forEach((variableName) => {\r\n const oldVariableMentions = oldMentionsByVariableName[variableName] || [];\r\n const newVariableMentions = newMentionsByVariableName[variableName] || [];\r\n\r\n let changeStatusForMentions: any;\r\n if (checkForNewMentions) {\r\n changeStatusForMentions = findMentionsToResetForVariableNames(\r\n newVariableMentions,\r\n oldVariableMentions,\r\n );\r\n } else {\r\n changeStatusForMentions = findMentionsToResetForVariableNames(\r\n oldVariableMentions,\r\n newVariableMentions,\r\n );\r\n }\r\n\r\n if (changeStatusForMentions.length > 0) {\r\n result[variableName] = changeStatusForMentions;\r\n } else if (checkForNewMentions && newVariableMentions && !oldVariableMentions) {\r\n // Set when in current page/question any new variable mention been added\r\n result[variableName] = newVariableMentions;\r\n }\r\n });\r\n\r\n return result;\r\n}\r\n\r\nfunction findMentionsToResetForVariableNames(\r\n oldVariableMentions: MentionModel[],\r\n newVariableMentions: MentionModel[],\r\n): MentionModel[] {\r\n const changeStatusForMentions: MentionModel[] = [];\r\n\r\n newVariableMentions.forEach((newMention) => {\r\n const found = oldVariableMentions.find((oldMention) =>\r\n areMentionsEqual(newMention, oldMention),\r\n );\r\n if (!found) {\r\n changeStatusForMentions.push({ ...newMention });\r\n }\r\n });\r\n\r\n return changeStatusForMentions;\r\n}\r\n\r\nfunction areMentionsEqual(mention1: MentionModel, mention2: MentionModel): boolean {\r\n return (\r\n mention1.index === mention2.index &&\r\n mention1.matrix === mention2.matrix &&\r\n mention1.value === mention2.value &&\r\n mention1.openEnd === mention2.openEnd &&\r\n mention1.customChoiceIndex === mention2.customChoiceIndex\r\n );\r\n}\r\n\r\nfunction setDisabledStatesForVariables(\r\n type: string,\r\n reducerStates: any,\r\n variablesCellStatus: [string, boolean, any][],\r\n) {\r\n variablesCellStatus.forEach(([identifierId, newStatus, disabledColumnIndexes]) => {\r\n reducerStates[identifierId] = {\r\n ...reducerStates[identifierId],\r\n isDisabled: newStatus,\r\n };\r\n });\r\n}\r\n\r\nfunction getFilteredRowsForQuestion(\r\n question: QuestionModel,\r\n variableName: string,\r\n getAllRows: boolean,\r\n) {\r\n if (getAllRows) {\r\n return question.rows?.filter((x) => x.variables && x.variables.length > 0);\r\n } else {\r\n return question.rows?.filter(\r\n (x) =>\r\n x.variables &&\r\n x.variables.length > 0 &&\r\n x.variables.find((vb) => vb.name === variableName),\r\n );\r\n }\r\n}\r\n\r\nexport function updateStatusForHybridQuestionMapppedVariableCells(\r\n actionType: string,\r\n question: QuestionModel,\r\n reducerState: any,\r\n variableName: string,\r\n disableColumnsList: any,\r\n changeReducerStateForVariableCells: [string, boolean, any][],\r\n mentions: { [variableName: string]: MentionModel[] },\r\n getSingleRow: boolean,\r\n hideGridVariableCall: boolean,\r\n) {\r\n if (question.type === QuestionType.HybridGrid) {\r\n const mappedFieldIdentifier = `${question.id}&${variableName}`;\r\n\r\n const filteredRows = getFilteredRowsForQuestion(question, variableName, !getSingleRow);\r\n let storedRow: AxisModel;\r\n if (filteredRows && filteredRows.length > 0) {\r\n each(filteredRows, (loopRow) => {\r\n //Fetch disabled column only when row is changes as disable columns remains same\r\n if (loopRow != storedRow) {\r\n storedRow = loopRow;\r\n\r\n // Get columns to be disabled for entire row if there is any mention selected for it.\r\n getDisabledColumnsForRowBasedOnChoiceSelected(\r\n loopRow,\r\n disableColumnsList,\r\n mentions,\r\n );\r\n }\r\n\r\n updateFieldStatusForAllVariablesInAxis(\r\n actionType,\r\n question,\r\n reducerState,\r\n loopRow,\r\n disableColumnsList,\r\n mappedFieldIdentifier,\r\n changeReducerStateForVariableCells,\r\n hideGridVariableCall,\r\n );\r\n\r\n disableColumnsList = []; // For each row reset column might be different\r\n });\r\n }\r\n }\r\n}\r\n\r\n/* \r\n oldMentionsByVariableName & newMentionsByVariableName info\r\n Required because newmentions is reversed with old due to being newer state on current page\r\n If we stay in same page then mentions are increasing generally if we are selecting new options and \r\n when going back to old page reverse is happening actually as new selected mentions are reseted if not \r\n being saved on server \r\n*/\r\nfunction updateStateAfterMentionsComparison(\r\n type: string,\r\n reducerStates: any,\r\n questionnaire: QuestionnaireModel,\r\n oldMentionsByVariableName: { [variableName: string]: MentionModel[] },\r\n newMentionsByVariableName: { [variableName: string]: MentionModel[] },\r\n getSingleRow: boolean,\r\n checkForNewMentions: boolean,\r\n) {\r\n const changeReducerStateForVariableCells: [string, boolean, any][] = [];\r\n let changeStateForMentions: { [variableName: string]: MentionModel[] };\r\n let disableColumnsList = [];\r\n\r\n changeStateForMentions = findChangedMentionsForVariableNames(\r\n newMentionsByVariableName,\r\n oldMentionsByVariableName,\r\n checkForNewMentions,\r\n );\r\n\r\n each(changeStateForMentions, (mentions, variableName) => {\r\n if (Object.keys(changeStateForMentions).includes(variableName)) {\r\n const question = getQuestionWithVariable(questionnaire, variableName);\r\n if (question) {\r\n updateStatusForHybridQuestionMapppedVariableCells(\r\n type,\r\n question,\r\n reducerStates,\r\n variableName,\r\n disableColumnsList,\r\n changeReducerStateForVariableCells,\r\n checkForNewMentions ? oldMentionsByVariableName : newMentionsByVariableName,\r\n getSingleRow,\r\n false,\r\n );\r\n }\r\n }\r\n disableColumnsList = []; // For each row reset column might be different\r\n });\r\n\r\n enableMappedDisabledFields(\r\n reducerStates,\r\n questionnaire,\r\n type,\r\n changeReducerStateForVariableCells,\r\n checkForNewMentions ? oldMentionsByVariableName : newMentionsByVariableName,\r\n );\r\n\r\n setDisabledStatesForVariables(type, reducerStates, changeReducerStateForVariableCells);\r\n}\r\n\r\nexport function getDisabledColumnsForRowBasedOnChoiceSelected(\r\n row: AxisModel,\r\n disableColumnsList: any,\r\n mentions: { [variableName: string]: MentionModel[] },\r\n variableName?: string,\r\n) {\r\n let variables: VariableModel[];\r\n if (variableName) {\r\n variables = row.variables.filter((variable) => variable.name === variableName);\r\n } else {\r\n variables = row.variables;\r\n }\r\n\r\n variables.forEach((loopVariable) => {\r\n if (loopVariable.choiceList?.length > 0) {\r\n const mention = mentions[loopVariable.name];\r\n\r\n if (mention && mention.length > 0) {\r\n loopVariable.choiceList.forEach((choice) => {\r\n if (mention && mention.some((x) => x.value === choice.value)) {\r\n disableColumnsList.push(getSettingString(choice, \"DisableColumns\"));\r\n }\r\n });\r\n }\r\n }\r\n });\r\n}\r\n\r\nexport function enableStatusForDisabledFieldWhichAreReferenced(\r\n question: QuestionModel,\r\n reducerState: any,\r\n row: AxisModel,\r\n disableColumnsList: any,\r\n mappedFieldIdentifier: string,\r\n changeReducerStateForVariableCells: [string, boolean, any][],\r\n mentions: any,\r\n) {\r\n // This disableList is for entire row if for row exist then only check for each variable level inside\r\n if (disableColumnsList && disableColumnsList.length > 0) {\r\n row.variables.forEach((loopVariable, index) => {\r\n let disableListForCurrentVariable: any = [];\r\n getDisabledColumnsForRowBasedOnChoiceSelected(\r\n row,\r\n disableListForCurrentVariable,\r\n mentions,\r\n loopVariable.name,\r\n );\r\n const currentLoopVariableId = `${question.id}&${loopVariable.name}`;\r\n\r\n const fieldIsDisabledInState =\r\n reducerState[currentLoopVariableId] &&\r\n reducerState[currentLoopVariableId].isDisabled;\r\n\r\n const isDisabledFieldWhichIsToBeEnabled = disableListForCurrentVariable\r\n .join(\",\")\r\n .replace(/\\s/g, \"\")\r\n .split(\",\")\r\n .some((c) => c.toString() === index.toString());\r\n\r\n // Field is disabled and to be enabled if is a different field\r\n if (\r\n isDisabledFieldWhichIsToBeEnabled &&\r\n fieldIsDisabledInState &&\r\n mappedFieldIdentifier !== currentLoopVariableId\r\n ) {\r\n checkAndPushIntoListForStateUpdation(\r\n currentLoopVariableId,\r\n changeReducerStateForVariableCells,\r\n false,\r\n [], // set disable list blank as field state is already disabled so no choice can exist\r\n );\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport function getStatusForEntireRowVariableOnSelectionChange(\r\n question: QuestionModel,\r\n row: AxisModel,\r\n disableColumnsList: any,\r\n mappedFieldIdentifier: string,\r\n changeReducerStateForVariableCells: [string, boolean, any][],\r\n) {\r\n row.variables.forEach((loopVariable, index) => {\r\n const currentLoopIdentifier = `${question.id}&${loopVariable.name}`;\r\n let fieldNewStatus = false;\r\n\r\n if (disableColumnsList && disableColumnsList.length > 0) {\r\n fieldNewStatus = disableColumnsList\r\n .join(\",\")\r\n .replace(/\\s/g, \"\")\r\n .split(\",\")\r\n .some((c) => c.toString() === index.toString());\r\n }\r\n\r\n //only update fields if status is changed\r\n if (mappedFieldIdentifier !== currentLoopIdentifier) {\r\n checkAndPushIntoListForStateUpdation(\r\n currentLoopIdentifier,\r\n changeReducerStateForVariableCells,\r\n fieldNewStatus,\r\n [],\r\n );\r\n }\r\n });\r\n}\r\n\r\nexport function updateFieldStatusForAllVariablesInAxis(\r\n actionType: string,\r\n question: QuestionModel,\r\n reducerState: any,\r\n row: AxisModel,\r\n disableColumnsList: any,\r\n mappedFieldIdentifier: string,\r\n changeReducerStateForVariableCells: [string, boolean, any][],\r\n hideGridVariableCall: boolean,\r\n) {\r\n row.variables.forEach((loopVariable, index) => {\r\n const refrencedFieldIdentifier = `${question.id}&${loopVariable.name}`;\r\n let fieldNewStatus = false;\r\n\r\n if (disableColumnsList && disableColumnsList.length > 0) {\r\n const isDisabled = disableColumnsList\r\n .join(\",\")\r\n .replace(/\\s/g, \"\")\r\n .split(\",\")\r\n .some((c) => c.toString() === index.toString());\r\n\r\n if (isDisabled && mappedFieldIdentifier !== refrencedFieldIdentifier) {\r\n fieldNewStatus = true;\r\n }\r\n }\r\n\r\n const fielStatusIsChanged =\r\n reducerState[refrencedFieldIdentifier] &&\r\n reducerState[refrencedFieldIdentifier].isDisabled !== fieldNewStatus;\r\n\r\n /* only update fields if status is changed remaining on current page\r\n or \r\n when moving to next page.\r\n */\r\n if (fielStatusIsChanged || actionType === NAVIGATION_NEXT_PAGE) {\r\n checkAndPushIntoListForStateUpdation(\r\n refrencedFieldIdentifier,\r\n changeReducerStateForVariableCells,\r\n fieldNewStatus,\r\n disableColumnsList,\r\n );\r\n } else if (!fielStatusIsChanged && hideGridVariableCall) {\r\n // Enable disabled cells when variable is hidden\r\n checkAndPushIntoListForStateUpdation(\r\n refrencedFieldIdentifier,\r\n changeReducerStateForVariableCells,\r\n false,\r\n disableColumnsList,\r\n );\r\n }\r\n });\r\n}\r\n\r\nfunction checkAndPushIntoListForStateUpdation(\r\n fieldIdentifier: string,\r\n changeReducerStateForVariableCells: [string, boolean, any][],\r\n status: boolean,\r\n currentDisableList: any,\r\n) {\r\n if (changeReducerStateForVariableCells && changeReducerStateForVariableCells.length > 0) {\r\n const indexToUpdate = changeReducerStateForVariableCells.findIndex(\r\n ([identifier]) => identifier === fieldIdentifier,\r\n );\r\n\r\n if (indexToUpdate !== -1) {\r\n changeReducerStateForVariableCells[indexToUpdate][1] = status;\r\n } else {\r\n changeReducerStateForVariableCells.push([fieldIdentifier, status, currentDisableList]);\r\n }\r\n } else {\r\n changeReducerStateForVariableCells.push([fieldIdentifier, status, currentDisableList]);\r\n }\r\n}\r\n","const indices: { [key: string]: number } = {};\r\n\r\nexport const generateId = (key: string) =>\r\n (indices[key] = indices[key] === undefined ? 1 : indices[key] + 1);\r\nexport const setMinId = (key: string, minId: number) => (indices[key] = minId);\r\n","import { assign, zipObject, map, some, pickBy, flatten, filter, uniq } from \"../../utils/lodash\";\r\nimport * as Evaluator from \"../../expressions/parser\";\r\nimport { RecallState } from \"../../models/states/RecallState\";\r\nimport { InterviewState } from \"../../models/states/InterviewState\";\r\nimport { generateId } from \"./utilities\";\r\nimport { RecallType } from \"../../piping/RecallType\";\r\nimport { PageModel } from \"../../models/PageModel\";\r\nimport { getVariableRange } from \"../../models/utilities/questionnaireUtilities\";\r\nimport { QuestionnaireModel } from \"../../models/QuestionnaireModel\";\r\nimport {\r\n CACHE_RECALL,\r\n SET_VARIABLE_MENTIONS,\r\n QUESTIONNAIRE_CHANGED,\r\n DEVICE_CHANGED,\r\n RESPONDENT_CHANGED,\r\n RESPONDENT_SET_EMAIL,\r\n RESPONDENT_SET_PHONE,\r\n RESPONDENT_SET_TIMEZONE,\r\n SET_LOOP_ROW,\r\n NAVIGATION_NEXT_PAGE,\r\n NAVIGATION_PREVIOUS_PAGE,\r\n NAVIGATION_BRANCH_TO,\r\n NAVIGATION_RESET,\r\n CHANGE_LANGUAGE,\r\n SERVER_PAGE_CHANGED,\r\n LOAD_ANSWERS_DTO,\r\n SET_COORDINATES,\r\n RESPONDENT_SET_DISPOSITIONCODE,\r\n} from \"../actions\";\r\nimport { ActionTypes } from \"../actions/types\";\r\nimport { BranchToOptions } from \"../../models/BranchToOptions\";\r\n\r\nconst INITIAL_STATE: RecallState = {\r\n recalledTextById: {},\r\n recalledTextIdsByVariableName: {},\r\n recalledTextIdByKey: {},\r\n};\r\n\r\nexport const cacheKey = (expression: string, mode: RecallType) => `${mode}|${expression}`;\r\n\r\nexport const getRecall = (\r\n state: RecallState,\r\n expression: string,\r\n mode: RecallType = RecallType.Text,\r\n): string => {\r\n if (expression === undefined) return undefined;\r\n return state.recalledTextById[state.recalledTextIdByKey[cacheKey(expression, mode)]];\r\n};\r\n\r\nconst cacheRecall = (\r\n state: RecallState,\r\n expression: string,\r\n mode: RecallType,\r\n result: string,\r\n variables: string[],\r\n) => {\r\n const key = cacheKey(expression, mode);\r\n // Recall is already in the cache.\r\n if (state.recalledTextIdByKey[key] !== undefined) return state;\r\n // Generate a unique id.\r\n const id = generateId(\"recall\");\r\n // Return new state.\r\n return {\r\n recalledTextById: {\r\n ...state.recalledTextById,\r\n [id]: result,\r\n },\r\n recalledTextIdsByVariableName: assign(\r\n {},\r\n state.recalledTextIdsByVariableName,\r\n zipObject(\r\n variables,\r\n map(variables, (v) => [...(state.recalledTextIdsByVariableName[v] || []), id]),\r\n ),\r\n ),\r\n recalledTextIdByKey: {\r\n ...state.recalledTextIdByKey,\r\n [key]: id,\r\n },\r\n };\r\n};\r\n\r\nconst invalidateVariables = (state: RecallState, ...variables: string[]) => {\r\n Evaluator.invalidateCache(...variables);\r\n const a = map(variables, (v) => state.recalledTextIdsByVariableName[v.toUpperCase()] || []);\r\n const b = flatten(a);\r\n const ids = uniq(b) as number[];\r\n if (ids.length === 0) return state;\r\n return {\r\n recalledTextById: pickBy(\r\n state.recalledTextById,\r\n (value, key) => ids.indexOf(parseInt(key)) === -1,\r\n ),\r\n recalledTextIdsByVariableName: pickBy(\r\n state.recalledTextIdsByVariableName,\r\n (value, key) => !some(variables, (v) => v.toUpperCase() === key.toUpperCase()),\r\n ),\r\n recalledTextIdByKey: pickBy(\r\n state.recalledTextIdByKey,\r\n (value) => ids.indexOf(value) === -1,\r\n ),\r\n };\r\n};\r\n\r\nconst getAutoCleanVariables = (\r\n branchTo: BranchToOptions,\r\n questionnaire: QuestionnaireModel,\r\n previousPage: PageModel,\r\n) => {\r\n if (!branchTo.autoClean || previousPage === undefined) return [];\r\n const variablesToClean = getVariableRange(\r\n questionnaire,\r\n previousPage.questions.slice(-1)[0].name,\r\n branchTo.destination,\r\n );\r\n return variablesToClean.slice(1).map((s) => s.name);\r\n};\r\n\r\nconst getLoopInvalidatedVariables = (\r\n questionnaire: QuestionnaireModel,\r\n currentPage: PageModel,\r\n previousPage: PageModel,\r\n) => {\r\n if (\r\n currentPage.blockIndex === previousPage?.blockIndex &&\r\n currentPage.loopIndex !== previousPage?.loopIndex\r\n ) {\r\n const questionsToClean = questionnaire.blocks[currentPage.blockIndex].questions;\r\n const a = map(questionsToClean, (q) => q.variables.map((v) => v.name));\r\n const b = flatten(a);\r\n const c = filter(b, (v) => v !== undefined);\r\n const d = uniq(c);\r\n return map(d, (s: string) => s);\r\n }\r\n return [];\r\n};\r\n\r\nconst TIME_VARS = [\"$D\", \"$H\", \"$T\", \"$J\"];\r\n\r\nexport const recallReducer = (\r\n state = INITIAL_STATE,\r\n action: ActionTypes,\r\n interview: InterviewState,\r\n previousPage: PageModel,\r\n) => {\r\n switch (action.type) {\r\n case CACHE_RECALL:\r\n return cacheRecall(\r\n state,\r\n action.expression,\r\n action.mode,\r\n action.result,\r\n action.variables,\r\n );\r\n case SET_VARIABLE_MENTIONS:\r\n return invalidateVariables(state, action.variableName);\r\n case LOAD_ANSWERS_DTO:\r\n return invalidateVariables(state, ...action.answers.map((a) => a.variableName));\r\n case QUESTIONNAIRE_CHANGED:\r\n Evaluator.clearCache();\r\n return INITIAL_STATE;\r\n case DEVICE_CHANGED:\r\n return invalidateVariables(\r\n state,\r\n \"$DEVICE\",\r\n \"$DEVICEOS\",\r\n \"$DEVICEOSVERSION\",\r\n \"$DEVICEBROWSER\",\r\n \"$DEVICEBROWSERVERSION\",\r\n );\r\n case RESPONDENT_CHANGED:\r\n return invalidateVariables(state, ...TIME_VARS, \"$Q\", \"$PIN\", \"$EMAIL\", \"$PHONE\", \"$L\");\r\n case RESPONDENT_SET_EMAIL:\r\n return invalidateVariables(state, \"$EMAIL\");\r\n case RESPONDENT_SET_PHONE:\r\n return invalidateVariables(state, \"$PHONE\");\r\n case RESPONDENT_SET_TIMEZONE:\r\n return invalidateVariables(state, ...TIME_VARS);\r\n case RESPONDENT_SET_DISPOSITIONCODE:\r\n return invalidateVariables(state, \"$R\");\r\n case SET_LOOP_ROW:\r\n return invalidateVariables(state, \"$R\", \"$ROW\");\r\n case NAVIGATION_NEXT_PAGE:\r\n case NAVIGATION_PREVIOUS_PAGE:\r\n case SERVER_PAGE_CHANGED:\r\n return invalidateVariables(\r\n state,\r\n ...TIME_VARS,\r\n \"$UTCDATE\",\r\n \"$UTCTIME\",\r\n \"$R\",\r\n \"$ROW\",\r\n ...getLoopInvalidatedVariables(\r\n interview.questionnaire,\r\n interview.navigation.currentPage,\r\n previousPage,\r\n ),\r\n );\r\n case NAVIGATION_BRANCH_TO:\r\n return invalidateVariables(\r\n state,\r\n ...getAutoCleanVariables(action.options, interview.questionnaire, previousPage),\r\n ...getLoopInvalidatedVariables(\r\n interview.questionnaire,\r\n interview.navigation.currentPage,\r\n previousPage,\r\n ),\r\n );\r\n case NAVIGATION_RESET:\r\n if (action.clearAnswers) {\r\n Evaluator.clearCache();\r\n return INITIAL_STATE;\r\n }\r\n return state;\r\n case CHANGE_LANGUAGE:\r\n Evaluator.clearCache();\r\n return INITIAL_STATE;\r\n case SET_COORDINATES:\r\n return invalidateVariables(state, \"$GEOLOCATION\");\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { createSelector } from \"reselect\";\r\nimport { StoreState } from \"../../../models/states/StoreState\";\r\n\r\nexport const selectNavigationMessage = createSelector(\r\n [\r\n (state: StoreState) => state.isPageMessagesEnabled,\r\n (state: StoreState) => state.interview.navigation?.message,\r\n ],\r\n (isPageMessagesEnabled, message) => (isPageMessagesEnabled ? message : undefined),\r\n);\r\n\r\nexport const selectNavigationDisabled = createSelector(\r\n [(state: StoreState) => state.interview.navigation?.disabled, selectNavigationMessage],\r\n (disabled, message) => disabled || (message != null && message !== \"\"),\r\n);\r\n","import { createSelector } from \"reselect\";\r\nimport { StoreState } from \"../../models/states/StoreState\";\r\nimport { isNullOrEmpty } from \"../../utils\";\r\n\r\nexport function makeMentionsSelector(variableName) {\r\n const mentionsByVariableNameSelector = (state: StoreState) =>\r\n state.interview.variables.mentionsByVariableName;\r\n\r\n const currentMatrixSelector = (state: StoreState) =>\r\n state.interview.navigation.currentPage.loopIndex;\r\n\r\n return createSelector(\r\n mentionsByVariableNameSelector,\r\n currentMatrixSelector,\r\n (mentionsByVariableName, matrix) => {\r\n const mentions = mentionsByVariableName[variableName] || [];\r\n return mentions.filter(\r\n (mention) => mention.matrix === matrix && !isNullOrEmpty(mention.value),\r\n );\r\n },\r\n );\r\n}\r\n","import { DispositionCode } from \"../../models/enums/DispositionCode\";\r\nimport { MentionBuilder } from \"../../models/builders/MentionBuilder\";\r\nimport { getMentions } from \"../reducers/interview/variablesUtilities\";\r\nimport { Log } from \"../../utils/logging\";\r\nimport { MentionModel } from \"../../models/MentionModel\";\r\nimport { isNullOrEmpty } from \"../../utils\";\r\nimport { MiddlewareType, StoreType, ActionTypes } from \"../actions/types\";\r\nimport {\r\n AUDIO_RECORDING_START,\r\n AUDIO_RECORDING_STOP,\r\n CACHE_RECALL,\r\n CHANGE_LANGUAGE,\r\n CONNECTION_CONNECTED,\r\n CONNECTION_DISCONNECTED,\r\n CONNECTION_ERROR,\r\n CONNECTION_START,\r\n CONNECTION_PROGRESS,\r\n DEBUG_DISABLED,\r\n DEBUG_ENABLED,\r\n DEVICE_CHANGED,\r\n FILE_UPLOAD_STARTED,\r\n FILE_UPLOAD_COMPLETED,\r\n FILE_UPLOAD_FAILED,\r\n FILE_UPLOAD_CLEARED,\r\n LOG_ERROR,\r\n LOOKUP_TABLE_FETCH,\r\n LOOKUP_TABLE_RECEIVE,\r\n NAVIGATION_BRANCH_TO,\r\n NAVIGATION_NEXT_PAGE,\r\n NAVIGATION_PAGE_READY,\r\n NAVIGATION_PREVIOUS_PAGE,\r\n NAVIGATION_QUIT,\r\n NAVIGATION_RESET,\r\n NAVIGATION_SHORTCUT,\r\n OPEN_UPLOADED_FILE,\r\n QUOTAS_CHANGED,\r\n QUOTAS_CLOSE_STRATUM,\r\n QUOTAS_CLOSE_USER_STRATUM,\r\n SET_NAVIGATION_ENABLED,\r\n RESPONDENT_CHANGED,\r\n RESPONDENT_SET_APPOINTMENT,\r\n RESPONDENT_SET_EMAIL,\r\n RESPONDENT_SET_PHONE,\r\n SET_LOOP_ROW,\r\n SET_VARIABLE_MENTIONS,\r\n QUESTIONNAIRE_CHANGED,\r\n PREVIEW_THEME,\r\n VALIDATION_CLEAR,\r\n VALIDATION_SET_RESULT,\r\n} from \"../actions\";\r\n\r\nconst TAG = \"debugLogger\";\r\n\r\nfunction strvar(str: string, limit?: number, prefix?: string) {\r\n if (limit === undefined) limit = 10;\r\n if (prefix === undefined) prefix = \"\";\r\n if (isNullOrEmpty(str)) return \"\";\r\n str = str.replace(/<[^>]+>/g, \"\");\r\n str = str.replace(/\\s/g, \"˽\");\r\n return prefix + (str.length > limit ? `${str.slice(0, limit - 1)}…` : str);\r\n}\r\n\r\nfunction mentionsToString(mentions: MentionModel[]) {\r\n const values = mentions.map((r) => strvar(r.value, 10, \"\") + strvar(r.openEnd, 10, \"‒\"));\r\n return `[${values.join(\", \")}]`;\r\n}\r\n\r\n/**\r\n * Logs pretty-printed errors to the console.\r\n */\r\nif (typeof window !== \"undefined\") {\r\n window.addEventListener(\"error\", (ev) => {\r\n if (ev.error) Log.e(TAG, \"ERROR\", undefined, ev.error);\r\n else Log.e(TAG, \"ERROR\", \"Error was undefined.\");\r\n });\r\n}\r\n\r\nconst logTypes = {\r\n [AUDIO_RECORDING_START]: (p) =>\r\n Log.i(TAG, \"AUDIO_RECORDING_START\", `for question ${p.questionName}`),\r\n [AUDIO_RECORDING_STOP]: (p) => Log.i(TAG, \"AUDIO_RECORDING_STOP\"),\r\n [CACHE_RECALL]: (p) => {}, // Log.v(TAG, \"CACHE_RECALL\", strvar(p.expression, 32)),\r\n [CHANGE_LANGUAGE]: (p) => Log.i(TAG, \"CHANGE_LANGUAGE\", p),\r\n [CONNECTION_CONNECTED]: (p) => Log.i(TAG, \"CONNECTION_CONNECTED\", p.url),\r\n [CONNECTION_DISCONNECTED]: (p) => Log.w(TAG, \"CONNECTION_DISCONNECTED\", p.reason),\r\n [CONNECTION_ERROR]: (p) => Log.e(TAG, \"CONNECTION_ERROR\", p.error),\r\n [CONNECTION_START]: (p) => Log.i(TAG, \"CONNECTION_START\", p),\r\n [CONNECTION_PROGRESS]: (p) => Log.d(TAG, \"CONNECTION_PROGRESS\", `${Math.ceil(p * 100)}%`),\r\n [DEBUG_DISABLED]: (p) => Log.v(TAG, \"DEBUG_DISABLED\"),\r\n [DEBUG_ENABLED]: (p) => Log.v(TAG, \"DEBUG_ENABLED\"),\r\n [DEVICE_CHANGED]: (p) =>\r\n Log.d(TAG, \"DEVICE_CHANGED\", `${p.OS} ${p.OSVersion} ${p.model} (${p.type})`),\r\n [FILE_UPLOAD_STARTED]: (p) =>\r\n Log.d(TAG, \"FILE_UPLOAD_STARTED\", `${p.variableName}[${p.matrix}]`),\r\n [FILE_UPLOAD_COMPLETED]: (p) =>\r\n Log.d(TAG, \"FILE_UPLOAD_COMPLETED\", `${p.variableName}[${p.matrix}]`),\r\n [FILE_UPLOAD_FAILED]: (p) => Log.d(TAG, \"FILE_UPLOAD_FAILED\", `${p.variableName}[${p.matrix}]`),\r\n [FILE_UPLOAD_CLEARED]: (p) =>\r\n Log.d(TAG, \"FILE_UPLOAD_CLEARED\", `${p.variableName}[${p.matrix}]`),\r\n [LOG_ERROR]: (p) => {},\r\n [LOOKUP_TABLE_FETCH]: (p) => Log.d(TAG, \"LOOKUP_TABLE_FETCH\", `${p.tableId}`),\r\n [LOOKUP_TABLE_RECEIVE]: (p) =>\r\n Log.d(\r\n TAG,\r\n \"LOOKUP_TABLE_RECEIVE\",\r\n `${p.tableId}(${p.requestId}) → ${p.page.rows.length} rows`,\r\n ),\r\n [NAVIGATION_BRANCH_TO]: (p) =>\r\n Log.d(TAG, \"NAVIGATION_BRANCH_TO\", `${p.origin} → ${p.destination}`),\r\n [NAVIGATION_NEXT_PAGE]: (p) => Log.i(TAG, \"NAVIGATION_NEXT_PAGE\"),\r\n [NAVIGATION_PAGE_READY]: (p) => Log.d(TAG, \"NAVIGATION_PAGE_READY\"),\r\n [NAVIGATION_PREVIOUS_PAGE]: (p) => Log.i(TAG, \"NAVIGATION_PREVIOUS_PAGE\"),\r\n [NAVIGATION_QUIT]: (p) =>\r\n Log.i(TAG, \"NAVIGATION_QUIT\", `${DispositionCode[p.dispositionCode]} ${p.options || \"\"}`),\r\n [NAVIGATION_RESET]: (p) =>\r\n Log.d(TAG, \"NAVIGATION_RESET\", `clearAnswers: ${p ? \"TRUE\" : \"FALSE\"}`),\r\n [NAVIGATION_SHORTCUT]: (p) => Log.d(TAG, \"NAVIGATION_SHORTCUT\", p.blockName),\r\n [OPEN_UPLOADED_FILE]: (p) => Log.d(TAG, \"OPEN_UPLOADED_FILE\", p.variableName),\r\n [QUOTAS_CHANGED]: (p) => Log.d(TAG, \"QUOTAS_CHANGED\"),\r\n [QUOTAS_CLOSE_STRATUM]: (p) => Log.d(TAG, \"QUOTAS_CLOSE_STRATUM\", `stratumId: ${p}`),\r\n [QUOTAS_CLOSE_USER_STRATUM]: (p) => Log.d(TAG, \"QUOTAS_CLOSE_USER_STRATUM\", `stratumId: ${p}`),\r\n [SET_NAVIGATION_ENABLED]: (p) =>\r\n Log.d(TAG, \"SET_NAVIGATION_ENABLED\", p.enabled ? \"TRUE\" : \"FALSE\"),\r\n [RESPONDENT_CHANGED]: (p) =>\r\n Log.d(\r\n TAG,\r\n \"RESPONDENT_CHANGED\",\r\n `id: ${p.respondentId} internalId: ${p.id || \"(simulated)\"}`,\r\n ),\r\n [RESPONDENT_SET_APPOINTMENT]: (p) => Log.d(TAG, \"RESPONDENT_SET_APPOINTMENT\", p),\r\n [RESPONDENT_SET_EMAIL]: (p) => Log.d(TAG, \"RESPONDENT_SET_EMAIL\", p),\r\n [RESPONDENT_SET_PHONE]: (p) => Log.d(TAG, \"RESPONDENT_SET_PHONE\", p),\r\n [SET_LOOP_ROW]: (p) => Log.d(TAG, \"SET_LOOP_ROW\", `${p.blockName}.Row = ${p.row}`),\r\n [SET_VARIABLE_MENTIONS]: (p, store) => {\r\n const variableState = store.getState().interview.variables;\r\n const mentions = getMentions(variableState, p.variableName, p.matrixIndex);\r\n const beforeMentions = mentionsToString(mentions);\r\n const afterMentions = mentionsToString(p.builder(new MentionBuilder(mentions)).build());\r\n Log.v(\r\n TAG,\r\n \"SET_VARIABLE_MENTIONS\",\r\n `${p.variableName}: ${beforeMentions} → ${afterMentions}`,\r\n );\r\n },\r\n [QUESTIONNAIRE_CHANGED]: (p) =>\r\n Log.v(TAG, \"QUESTIONNAIRE_CHANGED\", `${p.name} (id: ${p.id} v${p.version || 0})`),\r\n [PREVIEW_THEME]: (p) => Log.v(TAG, \"PREVIEW_THEME\"),\r\n [VALIDATION_CLEAR]: (p) => Log.v(TAG, \"VALIDATION_CLEAR\"),\r\n [VALIDATION_SET_RESULT]: (p) =>\r\n Log.v(TAG, \"VALIDATION_SET_RESULT\", `isValid: ${p.isValid ? \"TRUE\" : \"FALSE\"}`),\r\n};\r\n\r\nfunction logAction(store: StoreType, action: ActionTypes) {\r\n try {\r\n const p = action;\r\n if (logTypes[action.type] != null) return logTypes[action.type](p, store);\r\n } catch (ex) {\r\n Log.e(TAG, \"EVENT_LOGGER_ERROR\", \"An error occurred logging an event.\", ex);\r\n }\r\n return Log._(TAG, action.type);\r\n}\r\n\r\n/**\r\n * Logs state changes to the console.\r\n */\r\nexport const debugLogger: MiddlewareType = (store) => (next) => (action) => {\r\n logAction(store, action);\r\n return next(action);\r\n};\r\n","import { createStore, applyMiddleware, Store, StoreEnhancer, compose } from \"redux\";\r\nimport thunkMiddleware, { ThunkDispatch } from \"redux-thunk\";\r\nimport { rootReducer } from \"./reducers\";\r\nimport { flowLogger } from \"./middleware/flowLogger\";\r\nimport { debugLogger } from \"./middleware/debugLogger\";\r\nimport { LogicModel } from \"../models/LogicModel\";\r\nimport * as Evaluator from \"../expressions/parser\";\r\nimport { EvaluationResult } from \"../expressions/EvaluationResult\";\r\nimport { apiConnector } from \"./middleware/apiConnector\";\r\nimport { publicConnector } from \"./middleware/publicConnector\";\r\nimport { ActionTypes } from \"./actions/types\";\r\nimport { StoreState } from \"../models/states/StoreState\";\r\nimport { flowController } from \"./middleware/flowController\";\r\n\r\nconst middleware = applyMiddleware(\r\n thunkMiddleware,\r\n publicConnector,\r\n flowController,\r\n apiConnector,\r\n flowLogger,\r\n debugLogger,\r\n);\r\n\r\nconst composeEnhancers = (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\r\nconst enhancer: StoreEnhancer = composeEnhancers(middleware);\r\n\r\nexport function configureStore(): Store<StoreState, any> {\r\n return createStore(rootReducer, enhancer);\r\n}\r\n\r\nconst store = configureStore();\r\n\r\nconst dispatch: ThunkDispatch<StoreState, any, ActionTypes> = (action) => store.dispatch(action);\r\n\r\nexport const __getStore__ = () => store;\r\nexport const __dispatch__ = dispatch;\r\n\r\n/**\r\n * @deprecated Use thunk instead.\r\n * @param logic\r\n */\r\nexport function __evaluate__(logic: LogicModel): EvaluationResult;\r\nexport function __evaluate__(logic: string, simple?: boolean): EvaluationResult;\r\nexport function __evaluate__(logic: string | LogicModel, simple?: boolean) {\r\n if (typeof logic === \"object\")\r\n return Evaluator.__evaluateUnsafe__(() => store.getState().interview, dispatch, logic);\r\n return Evaluator.__evaluateUnsafe__(() => store.getState().interview, dispatch, logic, simple);\r\n}\r\n","import { forOwn } from \"../../utils/lodash\";\r\nimport { Voxco, PublicApi } from \"../../public\";\r\nimport {\r\n FileUploadEvent,\r\n SetVariableMentionsEvent,\r\n VoxcoEvent,\r\n SetAppointmentEvent,\r\n SetLoopRowEvent,\r\n NavigationBranchToEvent,\r\n NavigationDisplayMessageEvent,\r\n NavigationQuitEvent,\r\n ConnectionStartEvent,\r\n SetPageMessagesEvent,\r\n SetPhoneEvent,\r\n SetEmailEvent,\r\n VoxcoEventTypes,\r\n SetTimeZoneEvent,\r\n} from \"../../public/events\";\r\nimport { MiddlewareType, StoreType, DispatchType, ActionTypes } from \"../actions/types\";\r\nimport {\r\n SET_VARIABLE_MENTIONS,\r\n NAVIGATION_NEXT_PAGE,\r\n NAVIGATION_PREVIOUS_PAGE,\r\n NAVIGATION_QUIT,\r\n RESPONDENT_SET_APPOINTMENT,\r\n RESPONDENT_SET_EMAIL,\r\n RESPONDENT_SET_PHONE,\r\n RESPONDENT_SET_TIMEZONE,\r\n SET_LOOP_ROW,\r\n connectionStart,\r\n connectionDisconnected,\r\n setVariableMentions,\r\n navigationBranchTo,\r\n navigationDisplayMessage,\r\n navigationNextPage,\r\n navigationPreviousPage,\r\n navigationQuit,\r\n respondentSetPhone,\r\n respondentSetEmail,\r\n respondentSetTimeZone,\r\n setPageMessagesEnabled,\r\n respondentSetAppointment,\r\n setLoopRow,\r\n} from \"../actions\";\r\n\r\n/**\r\n * Voxco event -> Redux dispatcher\r\n * @param store Redux store\r\n * @param next Dispatch actions onto the next middleware.\r\n * Prevents actions being intercepted by voxcoEventDispatcher and creating a loop.\r\n */\r\nconst voxcoEventListener = (store: StoreType, next: DispatchType) => ({\r\n connect: (ev: ConnectionStartEvent) => next(connectionStart(ev.url)),\r\n disconnect: () => next(connectionDisconnected()),\r\n setVariableMentions: (ev: SetVariableMentionsEvent) =>\r\n next(setVariableMentions(ev.variableName, ev.builder, ev.matrixIndex)),\r\n branchTo: (ev: NavigationBranchToEvent) => next(navigationBranchTo(ev)),\r\n displayMessage: (ev: NavigationDisplayMessageEvent) =>\r\n next(navigationDisplayMessage(ev.message)),\r\n nextPage: () => next(navigationNextPage()),\r\n previousPage: () => next(navigationPreviousPage()),\r\n quit: (ev: NavigationQuitEvent) => next(navigationQuit(ev.dispositionCode, ev.options)),\r\n setPhone: (ev: SetPhoneEvent) => next(respondentSetPhone(ev.phone)),\r\n setEmail: (ev: SetEmailEvent) => next(respondentSetEmail(ev.email)),\r\n setTimeZone: (ev: SetTimeZoneEvent) => next(respondentSetTimeZone(ev.timeZone)),\r\n setPageMessages: (ev: SetPageMessagesEvent) => next(setPageMessagesEnabled(ev.enabled)),\r\n setAppointment: (ev: SetAppointmentEvent) => next(respondentSetAppointment(ev.appointment)),\r\n setLoopRow: (ev: SetLoopRowEvent) => next(setLoopRow(ev.blockName, ev.row)),\r\n fileUploadSelected(ev: FileUploadEvent) {\r\n if (ev.file) {\r\n const xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", \"/Upload\", true);\r\n xhr.setRequestHeader(\"Content-type\", \"file\");\r\n const data = new FormData();\r\n data.append(\"file\", ev.file);\r\n xhr.send(data);\r\n }\r\n },\r\n});\r\n\r\n/**\r\n * Redux event -> Voxco event dispatcher\r\n * @param action Action received from redux.\r\n * @param voxco Public api to dispatch events.\r\n */\r\nconst voxcoEventDispatcher = (\r\n action: ActionTypes,\r\n next: DispatchType,\r\n voxco: PublicApi,\r\n): ActionTypes => {\r\n switch (action.type) {\r\n case SET_VARIABLE_MENTIONS:\r\n voxco.trigger(\"setVariableMentions\", action);\r\n return undefined;\r\n case NAVIGATION_NEXT_PAGE:\r\n voxco.trigger(\"nextPage\", {});\r\n return undefined;\r\n case NAVIGATION_PREVIOUS_PAGE:\r\n voxco.trigger(\"previousPage\", {});\r\n return undefined;\r\n case NAVIGATION_QUIT:\r\n voxco.trigger(\"quit\", action);\r\n return undefined;\r\n case RESPONDENT_SET_APPOINTMENT:\r\n voxco.trigger(\"setAppointment\", action);\r\n return undefined;\r\n case RESPONDENT_SET_EMAIL:\r\n voxco.trigger(\"setEmail\", action);\r\n return undefined;\r\n case RESPONDENT_SET_PHONE:\r\n voxco.trigger(\"setPhone\", action);\r\n return undefined;\r\n case RESPONDENT_SET_TIMEZONE:\r\n voxco.trigger(\"setTimeZone\", action);\r\n return undefined;\r\n case SET_LOOP_ROW:\r\n voxco.trigger(\"setLoopRow\", action);\r\n return undefined;\r\n default:\r\n return next(action);\r\n }\r\n};\r\n\r\n/**\r\n * Hooks into redux events to expose them to the custom javascript.\r\n * @param store\r\n */\r\nexport const publicConnector: MiddlewareType = (store) => (next) => {\r\n Voxco.store = store;\r\n Voxco.dispatch = next;\r\n // Listen to Voxco events and dispatch them to the store.\r\n forOwn(voxcoEventListener(store, next), (value, key: keyof VoxcoEventTypes) =>\r\n Voxco.on(key, (ev: VoxcoEvent) => {\r\n // Prevent default behavior if requested.\r\n if (ev.defaultPrevented) return ev;\r\n // Call the dispatcher.\r\n (value as any)(ev);\r\n return ev;\r\n }),\r\n );\r\n // Listen to redux events and trigger Voxco event listeners.\r\n return (action) => voxcoEventDispatcher(action, next, Voxco) as any;\r\n};\r\n","import { DateTime } from \"luxon\";\r\nimport { safeDump } from \"js-yaml\";\r\nimport { isEqual, pick } from \"../../utils/lodash\";\r\nimport { getMentions } from \"../reducers/interview/variablesUtilities\";\r\nimport { MentionBuilder } from \"../../models/builders/MentionBuilder\";\r\nimport { MiddlewareType, StoreType, ActionTypes } from \"../actions/types\";\r\nimport {\r\n SET_VARIABLE_MENTIONS,\r\n AUDIO_RECORDING_START,\r\n AUDIO_RECORDING_STOP,\r\n CACHE_RECALL,\r\n CONNECTION_CONNECTED,\r\n CONNECTION_DISCONNECTED,\r\n CONNECTION_ERROR,\r\n CONNECTION_PROGRESS,\r\n CONNECTION_START,\r\n NAVIGATION_PAGE_READY,\r\n OPEN_UPLOADED_FILE,\r\n QUESTIONNAIRE_CHANGED,\r\n} from \"../actions\";\r\n\r\nfunction getEvent(store: StoreType, action: ActionTypes) {\r\n const time = DateTime.local().toJSDate().toISOString();\r\n switch (action.type) {\r\n case SET_VARIABLE_MENTIONS: {\r\n const { variableName, matrixIndex, builder } = action;\r\n const variableState = store.getState().interview.variables;\r\n const mentions = getMentions(variableState, variableName, matrixIndex);\r\n const newMentions = builder(new MentionBuilder(mentions)).build();\r\n // Check if mentions changed before logging.\r\n if (\r\n isEqual(\r\n mentions.map((m) => pick(m, [\"value\", \"openEnd\"])),\r\n newMentions,\r\n )\r\n )\r\n return null;\r\n return { time, ...action };\r\n }\r\n case AUDIO_RECORDING_START:\r\n case AUDIO_RECORDING_STOP:\r\n case CACHE_RECALL:\r\n case CONNECTION_CONNECTED:\r\n case CONNECTION_DISCONNECTED:\r\n case CONNECTION_ERROR:\r\n case CONNECTION_PROGRESS:\r\n case CONNECTION_START:\r\n case NAVIGATION_PAGE_READY:\r\n case OPEN_UPLOADED_FILE:\r\n case QUESTIONNAIRE_CHANGED:\r\n return null;\r\n default:\r\n return { time, ...action };\r\n }\r\n}\r\n\r\n/**\r\n * Logs state changes to the console.\r\n */\r\nexport const flowLogger: MiddlewareType = (store) => (next) => (action) => {\r\n const event = getEvent(store, action);\r\n // Skip ignored events.\r\n if (!event) return next(action);\r\n // Convert to YAML.\r\n const str = safeDump(event, {\r\n skipInvalid: true,\r\n });\r\n // tslint:disable-next-line:no-console\r\n console.log(`---\\n${str}...`.trim());\r\n return next(action);\r\n};\r\n","import { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { ThunkActionType, ActionTypes } from \"../actions/types\";\r\nimport { StoreState } from \"../../models/states/StoreState\";\r\nimport { hasSetting, getSettingBoolean } from \"../../models/utilities/settingUtilities\";\r\nimport { BlockModel } from \"../../models/BlockModel\";\r\nimport { EvaluationResult } from \"../../expressions/EvaluationResult\";\r\nimport { LogicType } from \"../../models/enums/LogicType\";\r\nimport { ParserState } from \"../../grammar/utils/ParserState\";\r\nimport { parse, cacheEvaluation, findCachedEvaluation } from \"../../expressions/parser\";\r\nimport { Skippable } from \"../../models/Skippable\";\r\nimport { ChoiceModel } from \"../../models/ChoiceModel\";\r\nimport { VariableModel } from \"../../models/VariableModel\";\r\n\r\ninterface EvaluationOptions {\r\n allowUnsafe?: boolean;\r\n}\r\n\r\nconst keyForExpression = (expression: string, type = LogicType.Advanced) =>\r\n type === LogicType.Simple ? `simple:${expression}` : expression;\r\n\r\nexport function evaluate(\r\n { expression, type = LogicType.Advanced },\r\n { allowUnsafe }: EvaluationOptions = {},\r\n): ThunkActionType<EvaluationResult> {\r\n const interviewSelector = (state: StoreState) => state.interview;\r\n\r\n return (dispatch, getState) => {\r\n // Try to find the result in cache.\r\n const key = keyForExpression(expression, type);\r\n const cachedResult = findCachedEvaluation(key);\r\n if (cachedResult) return new EvaluationResult(cachedResult);\r\n // Evaluate the expression.\r\n const variables = [];\r\n let invalidateCache = false;\r\n const state: ParserState = {\r\n interview: interviewSelector(getState()),\r\n didParseVariable: (variable: string) => {\r\n variables.push(variable.toUpperCase());\r\n },\r\n invalidateCache: () => {\r\n invalidateCache = true;\r\n },\r\n dispatch: (action: ActionTypes) => {\r\n if (!allowUnsafe) return;\r\n dispatch(action);\r\n state.interview = interviewSelector(getState());\r\n },\r\n };\r\n const result = parse(expression, state, type);\r\n // The evaluated result is not cacheable.\r\n if (!invalidateCache) {\r\n // Save in cache.\r\n cacheEvaluation(key, result, variables);\r\n }\r\n return new EvaluationResult(result);\r\n };\r\n}\r\n\r\nfunction evaluateIsVisible(skippable: Skippable): ThunkActionType<boolean> {\r\n return (dispatch) => {\r\n const shouldSkip =\r\n skippable.skipLogic && dispatch(evaluate(skippable.skipLogic)).asBoolean();\r\n const shouldDisplay =\r\n !skippable.displayLogic || dispatch(evaluate(skippable.displayLogic)).asBoolean();\r\n return !shouldSkip && shouldDisplay;\r\n };\r\n}\r\n\r\nexport function evaluateIfChoiceVisible(choice: ChoiceModel): ThunkActionType<boolean> {\r\n return (dispatch) => dispatch(evaluateIsVisible(choice));\r\n}\r\n\r\nexport function evaluateIsVariableVisible(variable: VariableModel): ThunkActionType<boolean> {\r\n return (dispatch, getState) => {\r\n const serverPage = getState().interview.navigation?.currentPageOnServer;\r\n\r\n if (serverPage) {\r\n return serverPage.questions\r\n .flatMap((q) => q.variables)\r\n .some((v) => v.name === variable.name);\r\n }\r\n\r\n return dispatch(evaluateIsVisible(variable));\r\n };\r\n}\r\n\r\nexport function evaluateIsQuestionVisible(question: QuestionModel): ThunkActionType<boolean> {\r\n const previewQuestionSelector = (state: StoreState) =>\r\n state.interview.navigation.currentPage?.previewQuestion;\r\n\r\n return (dispatch, getState) => {\r\n if (previewQuestionSelector(getState()) === question.name) return true;\r\n if (hasSetting(question, \"Active\") && !getSettingBoolean(question, \"Active\")) return false;\r\n if (\r\n getState().interview.navigation.currentPageOnServer?.questions?.some(\r\n (q) => q.name === question.name,\r\n )\r\n )\r\n return true;\r\n return dispatch(evaluateIsVisible(question));\r\n };\r\n}\r\n\r\nexport function evaluateIsBlockVisible(block: BlockModel): ThunkActionType<boolean> {\r\n return (dispatch) => block.questions.length && dispatch(evaluateIsVisible(block));\r\n}\r\n","import { useDispatch } from \"react-redux\";\r\nimport { DispatchType } from \"../actions/types\";\r\n\r\nexport const useThunkDispatch = () => useDispatch<DispatchType>();\r\n","import {\r\n BorderStyle,\r\n BorderThickness,\r\n DefaultColorsKeys,\r\n TabBackground,\r\n} from \"../models/DynamicCssModel\";\r\n\r\nexport const DynamicCss = {\r\n HasGridChanges: false,\r\n\r\n TableRowDefaultTabBackground: TabBackground.DuoChrome.toString(),\r\n TableRowActiveTab: \"tab-default\",\r\n\r\n // White 100% + neutral light 100%\r\n TableRowDefaultTabFillPrimaryColor: DefaultColorsKeys.WhiteColor.toString(),\r\n TableRowDefaultTabFillPrimaryColorPercent: \"100\",\r\n TableRowDefaultTabFillSecondaryColor: DefaultColorsKeys.NeutralLightColor.toString(),\r\n TableRowDefaultTabFillSecondaryColorPercent: \"100\",\r\n\r\n // Horizontal Borders\r\n TableRowBorderStyle: BorderStyle.Horizontal,\r\n // If Border is selected, then light border + neutral light 100%\r\n TableRowBorderThickness: BorderThickness.LightSolid,\r\n TableRowBorderColor: DefaultColorsKeys.NeutralLightColor.toString(),\r\n TableRowBorderColorPercent: \"100\",\r\n\r\n // Hover Color field 1 - No color\r\n TableRowHoverTabColor: DefaultColorsKeys.NoColor,\r\n TableRowHoverTabColorPercent: \"100\",\r\n\r\n // Selected Color - Primary 100%\r\n TableRowSelectedTabColor: DefaultColorsKeys.PrimaryColor.toString(),\r\n TableRowSelectedTabColorPercent: \"100\",\r\n\r\n // Table Header Fill - White 100%\r\n TableHeaderFillColor: DefaultColorsKeys.WhiteColor.toString(),\r\n TableHeaderFillColorPercent: \"100\",\r\n TableHeaderBorderStyle: BorderStyle.None,\r\n\r\n // If Border is selected, then light border + Black 100%\r\n TableHeaderBorderThickness: BorderThickness.LightSolid,\r\n TableHeaderBorderColor: DefaultColorsKeys.BlackColor.toString(),\r\n TableHeaderBorderColorPercent: \"100\",\r\n};\r\n\r\nexport default {\r\n ActiveHighlightValue: 0.3,\r\n ActiveBackgroundValue: 2.5,\r\n BackButtonIcon: \"fas caret-left\",\r\n BackButtonIconOnHover: false,\r\n BackButtonType: \"icon\", // icon | text | textAndIcon\r\n BackButtonVisible: true,\r\n BaseFontSize: 18,\r\n BorderRadius: 0,\r\n BorderWidth: 1,\r\n BottomNavigationPosition: \"wrapper\", // wrapper | floating\r\n ButtonBackground: \"#F0EFEF\",\r\n ChoiceHeight: 60,\r\n ChoiceSpacing: 27,\r\n ChoiceListIconAlignment: \"left\", // left | right | none\r\n CheckBoxIconAlignment: \"left\",\r\n CheckBoxIconType: \"default\", // default | custom\r\n ChoiceListBackgroundBorderWidth: 1,\r\n ChoiceListBackgroundBorderRadius: 0,\r\n ChoiceListBackgroundAlpha: 1,\r\n ControlAlpha: 1,\r\n ControlBackground: \"#F0EFEF\",\r\n ControlBorderColor: \"#DBDBDB\",\r\n DisplayChoiceIcon: \"left\", // left | right | none\r\n ErrorColor: \"#F41134\",\r\n EnableBacklink: true,\r\n FieldBorderValue: 0.5,\r\n FontSize: 18,\r\n ForegroundColorDark: \"#555555\",\r\n ForegroundColorLight: \"#FFFFFF\",\r\n GridCellMinHeight: 42,\r\n GridCellMinWidth: 56,\r\n GridCellPadding: 8,\r\n HeaderSizes: { H1: 23 / 18, H2: 1, H3: 16 / 18, H4: 14 / 18 },\r\n TickedImageUrl: \"\",\r\n UntickedImageUrl: \"\",\r\n TickedRadioImageUrl: \"\",\r\n UntickedRadioImageUrl: \"\",\r\n InputBackground: \"#FFFFFF\",\r\n InputHeight: 40,\r\n InputMaxWidths: { XSmall: 80, Small: 130, Medium: 260, Large: 390 },\r\n InputMinWidths: { XSmall: 60, Small: 120, Medium: 190, Large: 300, Full: 120 },\r\n LanguageSelectorVisible: true,\r\n LanguageSelectorLabelActive: true,\r\n LineHeight: 29,\r\n LogoAlign: \"left\", // left | center | right\r\n NextButtonIcon: \"fas caret-right\",\r\n NextButtonIconOnHover: false,\r\n NextButtonType: \"icon\", // icon | text | textAndIcon\r\n NeutralDarkColor: \"#727272\",\r\n NeutralLightColor: \"#F0EFEF\",\r\n BlackColor: \"#000000\",\r\n WhiteColor: \"#FFFFFF\",\r\n NoColor: null,\r\n OptionHeight: 40,\r\n PageBackground: \"#ffffff\",\r\n PageSeparatorsWidth: 1,\r\n PageSeparatorsSpacing: 8,\r\n PageWrapperBackground: \"rgba(255,255,255,0)\",\r\n PageWrapperMaxWidth: 1200,\r\n PrimaryColor: \"#0d67ca\",\r\n ProgressBarFontSize: 11,\r\n ProgressBarHeight: 23,\r\n ProgressBarDisplay: \"top\", // top | bottom | topAndBottom\r\n ProgressBarType: \"basic\", // basic | discrete | floating\r\n ProgressBarShowValue: true,\r\n ProgressBarVisible: true,\r\n QuestionSpacing: { PageHeader: 8, PageFooter: 8, BetweenComponents: 16, WithinComponents: 8 },\r\n QuitButtonIcon: \"fas arrow-from-left\",\r\n QuitButtonIconOnHover: true,\r\n QuitButtonType: \"textAndIcon\", // icon | text | textAndIcon\r\n QuitButtonVisible: true,\r\n SecondaryColor: \"#0b4f99\",\r\n RadioIconType: \"default\", // default | custom\r\n ShowCheckboxSettings: true,\r\n ShowRadioSettings: true,\r\n SliderHandleSizeSmall: 12,\r\n SliderHandleSizeLarge: 38,\r\n SliderRailHeightSmall: 5,\r\n SliderRailHeightLarge: 10,\r\n SubmitButtonIcon: \"fas paper-plane\",\r\n SubmitButtonIconOnHover: true,\r\n SubmitButtonType: \"textAndIcon\", // icon | text | textAndIcon\r\n SubmitButtonVisible: true,\r\n TextFont: \"Open Sans\",\r\n TextFontSize: \"16\",\r\n TextFontVariant: \"regular\",\r\n TextTextAlign: \"left\", // left | center | right\r\n TitleFont: \"Open Sans\",\r\n TitleFontSize: \"18\",\r\n TitleFontVariant: \"600\",\r\n TitleTextAlign: \"left\", // left | center | right\r\n TopNavigationPosition: \"wrapper\", // wrapper | floating\r\n ViewResponsesButtonVisible: false,\r\n ContentResponsivenessOption: \"resize-carousel\",\r\n ShowStatementBackgroundSettings: true,\r\n StatementBorderRadius: 0,\r\n StatementBackgroundAlpha: 1,\r\n LanguageSelectorPlacement: \"top-right\",\r\n ViewResponsesButtonPlacement: \"top-right\",\r\n BackButtonPlacement: \"bottom-left\",\r\n SubmitButtonPlacement: \"bottom-right\",\r\n NextButtonPlacement: \"bottom-right\",\r\n QuitButtonPlacement: \"bottom-center\",\r\n CustomBorderValue: false,\r\n BackButtonDisplayBothTopBottom: false,\r\n SubmitButtonDisplayBothTopBottom: false,\r\n NextButtonDisplayBothTopBottom: false,\r\n QuitButtonDisplayBothTopBottom: false,\r\n DynamicCss,\r\n CarrouselCornerBorderColor: DefaultColorsKeys.NeutralLightColor.toString(),\r\n CarrouselCornerBorderColorPercent: \"100\",\r\n};\r\n","import chroma from \"chroma-js\";\r\n\r\nconst cssColorMatcher = /(#([\\da-f]{3}){1,2}|(rgb|hsl)a\\((\\d{1,3}%?,\\s?){3}(1|0?\\.\\d+)\\)|(rgb|hsl)\\(\\d{1,3}%?(,\\s?\\d{1,3}%?){2}\\))/gi;\r\n\r\nexport function isDark(color) {\r\n if (!color) return false;\r\n const [r, g, b] = chroma(color).rgb();\r\n const yiq = (r * 299 + g * 587 + b * 114) / 1000;\r\n return yiq >= 128;\r\n}\r\n\r\nfunction extractFontWeight(value) {\r\n switch (value) {\r\n case \"100italic\":\r\n return \"100\";\r\n case \"200italic\":\r\n return \"200\";\r\n case \"300italic\":\r\n return \"300\";\r\n case \"regular\":\r\n case \"italic\":\r\n return \"400\";\r\n case \"500italic\":\r\n return \"500\";\r\n case \"600italic\":\r\n return \"600\";\r\n case \"700italic\":\r\n return \"700\";\r\n case \"800italic\":\r\n return \"800\";\r\n case \"900italic\":\r\n return \"900\";\r\n default:\r\n return value;\r\n }\r\n}\r\n\r\nfunction adjustColorIntensity(color, intensityPercentage) {\r\n // Convert intensity percentage to decimal\r\n const intensity = intensityPercentage / 100;\r\n\r\n // Extract RGB components from the color\r\n const r = parseInt(color.slice(1, 3), 16);\r\n const g = parseInt(color.slice(3, 5), 16);\r\n const b = parseInt(color.slice(5, 7), 16);\r\n\r\n // Adjust the intensity of each component\r\n const newR = Math.round(r * intensity);\r\n const newG = Math.round(g * intensity);\r\n const newB = Math.round(b * intensity);\r\n\r\n // Convert back to hexadecimal and ensure 2 digits\r\n const adjustedColor = `#${newR.toString(16).padStart(2, \"0\")}${newG\r\n .toString(16)\r\n .padStart(2, \"0\")}${newB.toString(16).padStart(2, \"0\")}`;\r\n\r\n return adjustedColor;\r\n}\r\n\r\nexport function alpha(color, intensity = 1) {\r\n return chroma(color).alpha(intensity).css();\r\n}\r\n\r\nexport function alphaByPercentage(color: string, percent?: string) {\r\n if (!percent) {\r\n return color;\r\n }\r\n\r\n return adjustColorIntensity(color, percent);\r\n}\r\n\r\nexport function darken(color, intensity = 1) {\r\n return chroma(color).darken(intensity).css();\r\n}\r\n\r\nexport function brighten(color, intensity = 1) {\r\n return chroma(color).brighten(intensity).css();\r\n}\r\n\r\nexport function foregroundColor(theme, background) {\r\n return isDark(background) ? theme.ForegroundColorDark : theme.ForegroundColorLight;\r\n}\r\n\r\nexport function backgroundColor(theme) {\r\n const colors = theme.PageBackground.match(cssColorMatcher);\r\n return colors ? chroma.average(colors, \"rgb\").css() : \"#ffffff\";\r\n}\r\n\r\nexport function wrapperBackgroundColor(theme) {\r\n const bgColor = backgroundColor(theme);\r\n const pageWrapperAlpha = chroma(theme.PageWrapperBackground).alpha();\r\n const pageWrapperColor = chroma(theme.PageWrapperBackground).alpha(0);\r\n return chroma.mix(bgColor, pageWrapperColor, pageWrapperAlpha, \"rgb\");\r\n}\r\n\r\nexport function compoundBackgroundColor(theme, color) {\r\n const bgColor = wrapperBackgroundColor(theme);\r\n return chroma.mix(bgColor, color, theme.ControlAlpha, \"rgb\");\r\n}\r\n\r\nexport function buttonBackgroundColor(theme) {\r\n return compoundBackgroundColor(theme, theme.ButtonBackground);\r\n}\r\n\r\nexport function controlBackgroundColor(theme) {\r\n return compoundBackgroundColor(theme, theme.ControlBackground);\r\n}\r\n\r\nexport function inputBackgroundColor(theme, focused?) {\r\n let color;\r\n\r\n if (\r\n theme.BorderWidth === 0 &&\r\n wrapperBackgroundColor(theme).hex(\"rgb\") === chroma(theme.InputBackground).hex(\"rgb\")\r\n ) {\r\n color = focused\r\n ? darken(theme.ControlBackground, theme.ActiveHighlightValue)\r\n : theme.ControlBackground;\r\n } else {\r\n color = theme.InputBackground;\r\n }\r\n\r\n return alpha(color, theme.ControlAlpha);\r\n}\r\n\r\nexport function borderColor(theme, color) {\r\n return darken(color, theme.FieldBorderValue);\r\n}\r\n\r\nfunction inputWidth(theme, key, size, defaultSize) {\r\n const sizeKey = size || defaultSize;\r\n if (!sizeKey) {\r\n return undefined;\r\n }\r\n const width = theme[key][sizeKey];\r\n if (width) {\r\n return width;\r\n }\r\n return sizeKey;\r\n}\r\n\r\nexport function inputMinWidth(theme, size, defaultSize = undefined) {\r\n return inputWidth(theme, \"InputMinWidths\", size, defaultSize);\r\n}\r\n\r\nexport function inputMaxWidth(theme, size, defaultSize = undefined) {\r\n return inputWidth(theme, \"InputMaxWidths\", size, defaultSize);\r\n}\r\n\r\nexport function getFontWeight(fontVariant, defaultWeight) {\r\n if (!fontVariant) {\r\n return defaultWeight;\r\n }\r\n return extractFontWeight(fontVariant);\r\n}\r\n\r\nexport function getFontStyle(fontVariant) {\r\n if (!fontVariant) {\r\n return \"\";\r\n }\r\n return fontVariant.includes(\"italic\") ? \"italic\" : \"normal\";\r\n}\r\n\r\nexport function getFontSize(fontSize, defaultSize = \"\") {\r\n if (!fontSize) {\r\n return defaultSize;\r\n }\r\n return `${fontSize}px`;\r\n}\r\n\r\nexport function getLineHeight(fontSize, defaultHeight, baseFontSize) {\r\n if (!fontSize) {\r\n return `${defaultHeight}px`;\r\n }\r\n if (parseInt(defaultHeight, 10) > 0) {\r\n return `${fontSize * (defaultHeight / baseFontSize)}px`;\r\n }\r\n return `${fontSize}px`;\r\n}\r\n\r\nexport function getRowCornerBorderRadius(borderRadius: number): number {\r\n return borderRadius > 0 ? Math.round(Math.log(borderRadius) / Math.log(1.2)) : 0;\r\n}\r\n\r\nexport function getTextAlign(align) {\r\n if (!align) {\r\n return \"\";\r\n }\r\n return align;\r\n}\r\n\r\nexport function backgroundless(theme) {\r\n return theme.ControlAlpha === 0 && theme.BorderWidth === 0;\r\n}\r\n\r\nexport function getButtonChoiceMargin(theme, horizontal) {\r\n if (horizontal) {\r\n const margin =\r\n getSpacing(theme, theme.ChoiceSpacing, theme.QuestionSpacing?.WithinComponents) / 2;\r\n return [[0, margin, margin, 0]];\r\n }\r\n return backgroundless(theme)\r\n ? [[0, -13]]\r\n : [\r\n [\r\n getSpacing(theme, theme.ChoiceSpacing, theme.QuestionSpacing?.WithinComponents),\r\n 0,\r\n getSpacing(theme, theme.ChoiceSpacing, 0),\r\n 0,\r\n ],\r\n ];\r\n}\r\n\r\nexport function progressBarValueColor(theme, value) {\r\n if (theme.ProgressBarHeight < theme.ProgressBarFontSize) {\r\n return foregroundColor(theme, wrapperBackgroundColor(theme));\r\n }\r\n if (value > 50) {\r\n return foregroundColor(theme, theme.PrimaryColor);\r\n }\r\n if (theme.ProgressBarType !== \"floating\") {\r\n return foregroundColor(theme, controlBackgroundColor(theme));\r\n }\r\n return foregroundColor(theme, wrapperBackgroundColor(theme));\r\n}\r\n\r\nexport function progressBarVerticalPosition(theme, simulatedBannerVisible?: boolean): number {\r\n if (theme.ProgressBarType !== \"floating\") {\r\n return null;\r\n }\r\n return simulatedBannerVisible ? 38 : 0;\r\n}\r\n\r\n// The function checks the theme.QuestionSpacing property\r\n// We changed this propery to 'object' in the new feature\r\n// if it is a number, the survey was created before feature\r\n// returns old value if it is old\r\nexport function getSpacing(theme, oldValue, newValue) {\r\n const spacing = theme.QuestionSpacing;\r\n if (typeof spacing === \"number\") {\r\n return oldValue;\r\n }\r\n return newValue;\r\n}\r\n","import numeral from \"numeral\";\r\nimport { includes, keys } from \"./lodash\";\r\nimport \"numeral/locales\";\r\nimport { __getStore__ } from \"../redux/store\";\r\nimport { Piping } from \"../piping\";\r\nimport { isNullOrEmpty } from \".\";\r\nimport { InterviewState } from \"../models/states/InterviewState\";\r\n\r\nconst PRECISION = 15;\r\n\r\nif (!numeral.locales.id) {\r\n numeral.register(\"locale\", \"id\", {\r\n delimiters: {\r\n thousands: \".\",\r\n decimal: \",\",\r\n },\r\n abbreviations: {\r\n thousand: \"ribu\",\r\n million: \"juta\",\r\n billion: \"milyar\",\r\n trillion: \"triliun\",\r\n },\r\n ordinal: () => \".\",\r\n currency: {\r\n symbol: \"Rp\",\r\n },\r\n });\r\n}\r\n\r\nif (!numeral.locales.ur) {\r\n numeral.register(\"locale\", \"ur\", {\r\n delimiters: {\r\n thousands: \" \",\r\n decimal: \",\",\r\n },\r\n abbreviations: {\r\n thousand: \"ہزار\",\r\n million: \"دس لاکھ\",\r\n billion: \"ارب\",\r\n trillion: \"ٹریلین\",\r\n },\r\n ordinal: () => \".\",\r\n currency: {\r\n symbol: \"Rs\",\r\n },\r\n });\r\n}\r\n\r\nif (!numeral.locales.ar) {\r\n numeral.register(\"locale\", \"ar\", {\r\n delimiters: {\r\n thousands: \" \",\r\n decimal: \",\",\r\n },\r\n abbreviations: {\r\n thousand: \"k\",\r\n million: \"m\",\r\n billion: \"b\",\r\n trillion: \"t\",\r\n },\r\n ordinal: () => \".\",\r\n currency: {\r\n symbol: \"د.إ\",\r\n },\r\n });\r\n}\r\n\r\nif (!numeral.locales.pt) {\r\n numeral.register(\"locale\", \"pt\", {\r\n delimiters: {\r\n thousands: \" \",\r\n decimal: \",\",\r\n },\r\n abbreviations: {\r\n thousand: \"k\",\r\n million: \"m\",\r\n billion: \"b\",\r\n trillion: \"t\",\r\n },\r\n ordinal: () => \"º\",\r\n currency: {\r\n symbol: \"€\",\r\n },\r\n });\r\n}\r\n\r\n// chinese\r\nif (!numeral.locales.zh) {\r\n numeral.register(\"locale\", \"zh\", {\r\n delimiters: {\r\n thousands: \",\",\r\n decimal: \".\",\r\n },\r\n abbreviations: {\r\n thousand: \"k\",\r\n million: \"m\",\r\n billion: \"b\",\r\n trillion: \"t\",\r\n },\r\n ordinal: () => \"º\",\r\n currency: {\r\n symbol: \"¤\",\r\n },\r\n });\r\n}\r\n\r\n// hindi\r\nif (!numeral.locales.hi) {\r\n numeral.register(\"locale\", \"hi\", {\r\n delimiters: {\r\n thousands: \",\",\r\n decimal: \".\",\r\n },\r\n abbreviations: {\r\n thousand: \"k\",\r\n million: \"m\",\r\n billion: \"b\",\r\n trillion: \"t\",\r\n },\r\n ordinal: () => \"º\",\r\n currency: {\r\n symbol: \"¤\",\r\n },\r\n });\r\n}\r\n\r\n// grec\r\nif (!numeral.locales.el) {\r\n numeral.register(\"locale\", \"el\", {\r\n delimiters: {\r\n thousands: \" \",\r\n decimal: \",\",\r\n },\r\n abbreviations: {\r\n thousand: \"k\",\r\n million: \"m\",\r\n billion: \"b\",\r\n trillion: \"t\",\r\n },\r\n ordinal: () => \"º\",\r\n currency: {\r\n symbol: \"¤\",\r\n },\r\n });\r\n}\r\n\r\n// roumain\r\nif (!numeral.locales.ro) {\r\n numeral.register(\"locale\", \"ro\", {\r\n delimiters: {\r\n thousands: \" \",\r\n decimal: \",\",\r\n },\r\n abbreviations: {\r\n thousand: \"k\",\r\n million: \"m\",\r\n billion: \"b\",\r\n trillion: \"t\",\r\n },\r\n ordinal: () => \"º\",\r\n currency: {\r\n symbol: \"¤\",\r\n },\r\n });\r\n}\r\n\r\n// dutch\r\nif (!numeral.locales.nl) {\r\n numeral.register(\"locale\", \"nl\", {\r\n delimiters: {\r\n thousands: \".\",\r\n decimal: \",\",\r\n },\r\n abbreviations: {\r\n thousand: \"k\",\r\n million: \"m\",\r\n billion: \"b\",\r\n trillion: \"t\",\r\n },\r\n ordinal: () => \"º\",\r\n currency: {\r\n symbol: \"€\",\r\n },\r\n });\r\n}\r\n\r\nconst hasLocale = (language: string) => includes(keys(numeral.locales), language);\r\n\r\nexport const setLocale = (language: string) => {\r\n numeral.locale(hasLocale(language) ? language : \"en\");\r\n};\r\n\r\nexport const getNumeral = (value: string | number, lang?: string) => {\r\n setLocale(lang);\r\n return numeral(value);\r\n};\r\n\r\nexport const isExponential = (value: string | number) => String(value).includes(\"e\");\r\n\r\nexport const getFixedValue = (value: string | number, decimals: number) => {\r\n if (value === \"\") return value;\r\n const num = Number(value);\r\n if (!Number.isNaN(num)) return num.toFixed(decimals);\r\n return value;\r\n};\r\n\r\nexport const decimalSeparator = (language: string) =>\r\n numeral.locales[language]?.delimiters.decimal || \".\";\r\n\r\nexport const formatNumeric = (\r\n value: string | number,\r\n decimals: number,\r\n language: string,\r\n cultureInvariant?: boolean,\r\n autoFormatting?: boolean,\r\n): string => {\r\n setLocale(language);\r\n if (value == null || value === \"\" || isExponential(value)) return \"\";\r\n if (cultureInvariant) return String(getFixedValue(value, decimals));\r\n if (autoFormatting) {\r\n let format = \"0,0\";\r\n if (decimals > 0) format += `.${Array(decimals + 1).join(\"0\")}`;\r\n const numeralValue = getNumeral(value, language);\r\n const formatted = numeralValue.format(format);\r\n if (formatted !== \"NaN\") return formatted;\r\n return numeralValue.value().toString();\r\n }\r\n if (decimalSeparator(numeral.locale()) === \",\") return String(value).replace(\".\", \",\");\r\n return String(value);\r\n};\r\n\r\nexport const round = (v: number) => {\r\n if (isExponential(v)) return v;\r\n return Number(v.toPrecision(PRECISION));\r\n};\r\n\r\nexport const getNumberOfDecimal = (nb: string) => {\r\n const match = nb.match(/(?:\\.(\\d+))?(?:[eE]([+-]?\\d+))?$/);\r\n if (!match) {\r\n return 0;\r\n }\r\n return Math.max(0, (match[1] ? match[1].length : 0) - (match[2] ? +match[2] : 0));\r\n};\r\n\r\nexport const recallNumber = (value: string, interview: InterviewState): number => {\r\n if (isNullOrEmpty(value)) return null;\r\n const p = Piping.evaluateRecalls(interview, value);\r\n return getNumeral(p).value();\r\n};\r\n","import { BorderStyle, BorderThickness, DynamicCssModel } from \"../../../models/DynamicCssModel\";\r\nimport { alphaByPercentage, foregroundColor } from \"../../../theme/Mixins\";\r\n\r\nexport function generateTableRowColors(\r\n dynamicCss: DynamicCssModel,\r\n theme: object,\r\n): {\r\n primaryBgColor: string;\r\n secondaryBgColor: string;\r\n primaryColor: string;\r\n secondaryColor: string;\r\n hoverColor: string;\r\n hoverBgColor: string;\r\n selectedColor: string;\r\n selectedBgColor: string;\r\n} {\r\n const primaryBgColor = alphaByPercentage(\r\n theme[dynamicCss.TableRowDefaultTabFillPrimaryColor],\r\n dynamicCss.TableRowDefaultTabFillPrimaryColorPercent,\r\n );\r\n\r\n const secondaryBgColor = alphaByPercentage(\r\n theme[dynamicCss.TableRowDefaultTabFillSecondaryColor],\r\n dynamicCss.TableRowDefaultTabFillSecondaryColorPercent,\r\n );\r\n\r\n const hoverTabColor = theme[dynamicCss.TableRowHoverTabColor];\r\n\r\n const hoverBgColor = hoverTabColor\r\n ? alphaByPercentage(hoverTabColor, dynamicCss.TableRowHoverTabColorPercent)\r\n : null;\r\n const selectedBgColor = alphaByPercentage(\r\n theme[dynamicCss.TableRowSelectedTabColor],\r\n dynamicCss.TableRowSelectedTabColorPercent,\r\n );\r\n\r\n const primaryColor = foregroundColor(theme, primaryBgColor);\r\n\r\n const secondaryColor = foregroundColor(theme, secondaryBgColor);\r\n return {\r\n primaryBgColor,\r\n secondaryBgColor,\r\n primaryColor,\r\n secondaryColor,\r\n hoverBgColor,\r\n hoverColor: foregroundColor(theme, hoverBgColor),\r\n selectedBgColor,\r\n selectedColor: foregroundColor(theme, selectedBgColor),\r\n };\r\n}\r\n\r\nexport function getBorder(theme: object, dynamicCss: DynamicCssModel) {\r\n return `${\r\n dynamicCss.TableRowBorderThickness === BorderThickness.BoldSolid ? \"3px\" : \"1px\"\r\n } solid ${alphaByPercentage(\r\n theme[dynamicCss.TableRowBorderColor],\r\n dynamicCss.TableRowBorderColorPercent,\r\n )} !important`;\r\n}\r\n\r\nexport function createCssForGridBorder(theme: object, dynamicCss: DynamicCssModel): string {\r\n // eslint-disable-next-line default-case\r\n let css = \"\";\r\n const border = getBorder(theme, dynamicCss);\r\n if (BorderStyle.Outside === dynamicCss.TableRowBorderStyle) {\r\n css += `\r\n .grid-view tr.data-row { border-left: ${border}; border-right: ${border}; }\r\n .grid-view .header-row + .data-row { border-top: ${border}; }\r\n .grid-view tr.data-row:last-child { border-bottom: ${border}; }\r\n `;\r\n }\r\n\r\n if (BorderStyle.Vertical === dynamicCss.TableRowBorderStyle) {\r\n css += `.grid-view tr.data-row td:not(:last-child), .grid-view tr.data-row th.grid__row-header { \r\n border: none;\r\n border-right: ${border}; \r\n }`;\r\n }\r\n\r\n if (BorderStyle.Horizontal === dynamicCss.TableRowBorderStyle) {\r\n css += `.grid-view tr.data-row:not(:last-child) td, .grid-view tr.data-row:not(:last-child) th.grid__row-header { \r\n border: none;\r\n border-bottom: ${border}; \r\n }`;\r\n }\r\n\r\n if (BorderStyle.All === dynamicCss.TableRowBorderStyle) {\r\n css += `.grid-view { border: ${border}; }\r\n .grid-view th, .grid-view td { border: ${border}; }`;\r\n }\r\n\r\n return css;\r\n}\r\n\r\nexport function createCssForGridDataRowBackground(\r\n dynamicCss: DynamicCssModel,\r\n primaryColor: string,\r\n secondaryColor: string,\r\n primaryBg: string,\r\n secondaryBg: string,\r\n hoverColor: string,\r\n hoverBg: string,\r\n selectedColor: string,\r\n selectedBg: string,\r\n): string {\r\n const isDuoChrome = dynamicCss.TableRowDefaultTabBackground === \"duoChrome\";\r\n let hoverStyles = \"\";\r\n if (hoverBg) {\r\n hoverStyles = `\r\n .grid-view tr.data-row:hover { \r\n background-color: ${hoverBg} !important; \r\n color: ${hoverColor} !important; \r\n }`;\r\n }\r\n\r\n return `\r\n .grid-view {\r\n width: 100%;\r\n border-collapse: collapse !important;\r\n margin: 0px !important;\r\n }\r\n .grid-view tr.data-row > :first-child { border-left:none !important; } \r\n .grid-view tr.data-row > :last-child { border-right:none !important; }\r\n .grid-view tr.data-row:nth-child(even) { \r\n background-color: ${isDuoChrome ? secondaryBg : primaryBg} !important; \r\n color: ${isDuoChrome ? secondaryColor : primaryColor} !important; \r\n }\r\n .grid-view tr.data-row:nth-child(odd) { background-color: ${primaryBg} !important; color: ${primaryColor} !important; }\r\n .grid-view tr.data-row.row--selected { background-color: ${selectedBg} !important; color: ${selectedColor} !important; }\r\n .grid-view th,.grid-view td { background-color:transparent !important; color:inherit !important;}\r\n ${hoverStyles} \r\n `;\r\n}\r\n","import { BorderStyle, BorderThickness, DynamicCssModel } from \"../../../models/DynamicCssModel\";\r\nimport { alphaByPercentage, foregroundColor } from \"../../../theme/Mixins\";\r\n\r\nexport function generateTableHeaderColors(\r\n dynamicCss: DynamicCssModel,\r\n theme: object,\r\n): {\r\n bgColor: string;\r\n color: string;\r\n} {\r\n const bgColor = alphaByPercentage(\r\n theme[dynamicCss.TableHeaderFillColor],\r\n dynamicCss.TableHeaderFillColorPercent,\r\n );\r\n\r\n const color = foregroundColor(theme, bgColor);\r\n\r\n return {\r\n bgColor,\r\n color,\r\n };\r\n}\r\n\r\nexport function getBorder(theme: object, dynamicCss: DynamicCssModel) {\r\n return `${\r\n dynamicCss.TableHeaderBorderThickness === BorderThickness.BoldSolid ? \"3px\" : \"1px\"\r\n } solid ${alphaByPercentage(\r\n theme[dynamicCss.TableHeaderBorderColor],\r\n dynamicCss.TableHeaderBorderColorPercent,\r\n )} !important`;\r\n}\r\n\r\nexport function createCssForGridHeader(theme: object, dynamicCss: DynamicCssModel): string {\r\n let css = \"\";\r\n if (dynamicCss.TableRowBorderStyle === BorderStyle.All) {\r\n return css;\r\n }\r\n\r\n const border = getBorder(theme, dynamicCss);\r\n if (BorderStyle.All === dynamicCss.TableHeaderBorderStyle) {\r\n css += `.grid-view tr:not(.data-row) { border: ${border}; }`;\r\n }\r\n\r\n if (BorderStyle.Outside === dynamicCss.TableHeaderBorderStyle) {\r\n css += `\r\n .grid-view tr:not(.data-row) { border-left: ${border}; border-right: ${border}; }\r\n .grid-view tr:not(.data-row):first-child { border-top: ${border}; }\r\n /* To apply the border bottom effect on last header */\r\n .grid-view .header-row + .data-row { border-top: ${border}; } \r\n `;\r\n }\r\n\r\n if (BorderStyle.Vertical === dynamicCss.TableHeaderBorderStyle) {\r\n css += `.grid-view tr:not(.data-row) td:not(:last-child), .grid-view tr:not(.data-row) th:not(:last-child) { \r\n border: none;\r\n border-right: ${border}; \r\n }`;\r\n }\r\n\r\n if (BorderStyle.Horizontal === dynamicCss.TableHeaderBorderStyle) {\r\n css += `.grid-view tr:not(.data-row):not(:last-child) { border-bottom: ${border}; }`;\r\n }\r\n\r\n if (BorderStyle.All === dynamicCss.TableHeaderBorderStyle) {\r\n css += `.grid-view tr:not(.data-row) th, .grid-view tr:not(.data-row) td { \r\n border-left: ${border}; \r\n }`;\r\n }\r\n\r\n return css;\r\n}\r\n\r\nexport function createCssForGridHeaderBackground(bgColor: string, color: string) {\r\n return `\r\n .grid-view tr.header-row, .grid-view tr:not(.data-row) {\r\n background-color: ${bgColor} !important;\r\n color: ${color} !important;\r\n }\r\n .grid-view th, .grid-view td { background-color:transparent !important;}\r\n `;\r\n}\r\n","import {\r\n createCssForGridDataRowBackground,\r\n createCssForGridBorder,\r\n generateTableRowColors,\r\n} from \"./tableRow\";\r\nimport { DynamicCssModel } from \"../../../models/DynamicCssModel\";\r\nimport {\r\n createCssForGridHeaderBackground,\r\n createCssForGridHeader,\r\n generateTableHeaderColors,\r\n} from \"./tableHeader\";\r\n\r\nfunction generateGridRowBackgroundCss(theme: object, dynamicCss: DynamicCssModel) {\r\n const {\r\n primaryColor,\r\n secondaryColor,\r\n secondaryBgColor,\r\n primaryBgColor,\r\n selectedBgColor,\r\n hoverColor,\r\n hoverBgColor,\r\n selectedColor,\r\n } = generateTableRowColors(dynamicCss, theme);\r\n\r\n return createCssForGridDataRowBackground(\r\n dynamicCss,\r\n primaryColor,\r\n secondaryColor,\r\n primaryBgColor,\r\n secondaryBgColor,\r\n hoverColor,\r\n hoverBgColor,\r\n selectedColor,\r\n selectedBgColor,\r\n );\r\n}\r\n\r\nfunction generateGridHeaderCss(theme: object, dynamicCss: DynamicCssModel) {\r\n const { color, bgColor } = generateTableHeaderColors(dynamicCss, theme);\r\n return createCssForGridHeaderBackground(bgColor, color);\r\n}\r\n\r\nexport function generateGridCss(dynamicCss: DynamicCssModel, theme: object): string[] {\r\n return [\r\n generateGridRowBackgroundCss(theme, dynamicCss),\r\n createCssForGridBorder(theme, dynamicCss),\r\n generateGridHeaderCss(theme, dynamicCss),\r\n createCssForGridHeader(theme, dynamicCss),\r\n ];\r\n}\r\n","import { hashCode } from \"../index\";\r\nimport { DynamicCssModel } from \"../../models/DynamicCssModel\";\r\nimport { generateGridCss } from \"./grid/gridCore\";\r\n\r\nexport function getStoredCss(hashKey: string, cssKey: string, newHash: string): string | null {\r\n const cachedHash = localStorage.getItem(hashKey);\r\n if (newHash === cachedHash) {\r\n return localStorage.getItem(cssKey);\r\n }\r\n return null;\r\n}\r\n\r\nexport function storeCss(hashKey: string, cssKey: string, hash: string, css: string): void {\r\n localStorage.setItem(hashKey, hash);\r\n localStorage.setItem(cssKey, css);\r\n}\r\n\r\nexport function generateCSS(theme: object, dynamicCss: DynamicCssModel): string {\r\n const settingCssHashKey = \"settings-css-hash\";\r\n const settingCssKey = \"settings-css\";\r\n const settingsStr = JSON.stringify(dynamicCss);\r\n const hash = hashCode(settingsStr).toString();\r\n\r\n const storedCss = getStoredCss(settingCssHashKey, settingCssKey, hash);\r\n if (storedCss) return storedCss;\r\n\r\n const cssForComponents = [];\r\n\r\n if (dynamicCss.HasGridChanges) {\r\n cssForComponents.push(...generateGridCss(dynamicCss, theme));\r\n }\r\n\r\n // final css\r\n const css = cssForComponents.join(\"\\n\");\r\n storeCss(settingCssHashKey, settingCssKey, hash, css);\r\n return css;\r\n}\r\n\r\nexport function applyCSS(css: string) {\r\n const dynamicStyleId = \"dynamic-style\";\r\n let styleElement = document.getElementById(dynamicStyleId);\r\n if (!styleElement) {\r\n styleElement = document.createElement(\"style\");\r\n styleElement.id = dynamicStyleId;\r\n document.head.append(styleElement);\r\n }\r\n styleElement.innerHTML = css;\r\n}\r\n","import React from \"react\";\r\nimport { VariableModel } from \"../models/VariableModel\";\r\nimport { includes } from \"./lodash\";\r\n\r\n/**\r\n * Returns the scrollable container div for the survey.\r\n */\r\nexport const getContainerDiv = () =>\r\n document.getElementsByClassName(\"survey-engine\")[0] as HTMLDivElement;\r\n\r\n/**\r\n * Strips HTML tags from a string.\r\n */\r\nexport const escapeHtml = (str: string, detectTabs?: boolean) => {\r\n let escaped = str;\r\n escaped = escaped.replace(/[\\u00A0-\\u9999<>\\&]/gi, (m) => `&#${m.charCodeAt(0)};`);\r\n escaped = escaped.replace(/\\n/g, \"<br>\");\r\n if (detectTabs) escaped = escaped.replace(/\\t| /g, \"    \");\r\n return escaped;\r\n};\r\n\r\n/**\r\n * Remove all HTML tags from a string.\r\n */\r\nexport const removeHtmlTags = (str: string) =>\r\n str ? str.replace(/<br>/g, \" \").replace(/<\\/?[^>]*>/g, \"\") : \"\";\r\n\r\n/**\r\n * Returns true if the string is null, undefined or empty.\r\n */\r\nexport const isNullOrEmpty = (str: string) => str == null || str.length === 0;\r\n\r\n/**\r\n * Returns true if the number is null, undefined or NaN.\r\n */\r\nexport const isNullOrNaN = (dec: number) => dec == null || isNaN(dec);\r\n\r\nexport const isEmptyOrNaN = (v: any) => !v || v === \"\" || Number.isNaN(v);\r\n\r\n/**\r\n * Generates a hash code from a string.\r\n */\r\nexport const hashCode = (s: string) => {\r\n if (!s) return \"\";\r\n return s.split(\"\").reduce((a, b) => {\r\n a = (a << 5) - a + b.charCodeAt(0);\r\n return a & a;\r\n }, 0);\r\n};\r\n\r\n/**\r\n * Return color from decimal to hexadecimal.\r\n * @param dec\r\n */\r\nexport const rgbaFromDec = (dec: number) => {\r\n if (dec === -1) return null;\r\n const hex = (dec >>> 0).toString(16);\r\n let rgba = \"rgba(\";\r\n for (let i = 0; i < 3; i++) rgba += `${parseInt(hex.slice((i + 1) * 2, (i + 2) * 2), 16)},`;\r\n rgba += parseInt(hex.slice(0, 2), 16) / 255;\r\n return `${rgba})`;\r\n};\r\n\r\n/**\r\n * Converts a hexadecimal string \"#FFFFFF\" to {r, g, b} with 16 bit values or rgb string value.\r\n */\r\nexport const hexToRgb = (hex: string) => {\r\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\r\n const shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\r\n hex = hex.replace(shorthandRegex, (m, r, g, b) => r + r + g + g + b + b);\r\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\r\n return result\r\n ? {\r\n r: parseInt(result[1], 16),\r\n g: parseInt(result[2], 16),\r\n b: parseInt(result[3], 16),\r\n }\r\n : null;\r\n};\r\n\r\n/**\r\n * Converts a rgb array {r, g, b} with 16 bit values to rgb string value.\r\n */\r\nexport const rgbToRgbString = (rgbArr) => {\r\n return `rgb(${rgbArr.r}, ${rgbArr.g}, ${rgbArr.b})`;\r\n};\r\n\r\n/**\r\n * Converts a rgb string to hexadecimal color string.\r\n */\r\nexport const rgbToHex = (rgb: string) => {\r\n // Splits rgb values into r, g and b array\r\n const rgbArr = rgb.split(\"(\")[1].split(\")\")[0].split(\",\");\r\n\r\n // Converts r, g and b decimals into hex values\r\n const b = rgbArr.map((x) => {\r\n x = parseInt(x).toString(16);\r\n return x.length === 1 ? `0${x}` : x;\r\n });\r\n\r\n return `#${b.join(\"\")}`;\r\n};\r\n\r\n/** Used to trigger blur events on fields. */\r\nlet blurEvent: Event;\r\n\r\n/**\r\n * Triggers blur on the focused field (if any). Used to prevent onMouseDown from preventing blur events.\r\n * Returns the previously focused element.\r\n */\r\nexport const blurFocusedField = () => {\r\n if (blurEvent == null) {\r\n blurEvent = document.createEvent(\"Events\");\r\n blurEvent.initEvent(\"blur\", false, false);\r\n }\r\n const focused = document.activeElement as HTMLElement;\r\n if (focused != null && includes([\"input\", \"textarea\"], focused.tagName.toLowerCase())) {\r\n focused.dispatchEvent(blurEvent);\r\n focused.blur();\r\n return focused;\r\n }\r\n};\r\n\r\nexport const nltobr = (str: string) => {\r\n if (str == null || typeof str !== \"string\") return str;\r\n return str\r\n .replace(\"\\t\", \"tab//\")\r\n .split(\"\\n\")\r\n .map((l, i) => (\r\n <span key={i}>\r\n {i > 0 && <br key={`br_${i}`} />}\r\n {l.startsWith(\" \") && <> </>}\r\n {l}\r\n </span>\r\n ));\r\n};\r\n\r\nexport const xhrPOST = (\r\n url: string,\r\n data: any,\r\n onLoad: (result: string, error?: any) => void,\r\n onProgress?: (ev: ProgressEvent) => void,\r\n) => {\r\n const xhr = new XMLHttpRequest();\r\n if (onProgress) {\r\n xhr.addEventListener(\"progress\", onProgress);\r\n }\r\n xhr.open(\"POST\", url, true);\r\n xhr.addEventListener(\"load\", (e) => {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 200) {\r\n onLoad(xhr.responseText);\r\n } else {\r\n onLoad(null, xhr.statusText);\r\n }\r\n }\r\n });\r\n xhr.addEventListener(\"error\", (e) => {\r\n onLoad(null, xhr.statusText);\r\n });\r\n xhr.send(JSON.parse(data));\r\n};\r\n\r\nexport const xhrGET = (\r\n url: string,\r\n onLoad: (result: string, error?: any) => void,\r\n onProgress?: (ev: ProgressEvent) => void,\r\n) => {\r\n const xhr = new XMLHttpRequest();\r\n if (onProgress) {\r\n xhr.addEventListener(\"progress\", onProgress);\r\n }\r\n xhr.open(\"GET\", url, true);\r\n xhr.addEventListener(\"load\", (e) => {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 200) {\r\n onLoad(xhr.responseText);\r\n } else {\r\n onLoad(null, xhr.statusText);\r\n }\r\n }\r\n });\r\n xhr.addEventListener(\"error\", (e) => {\r\n onLoad(null, xhr.statusText);\r\n });\r\n xhr.send();\r\n};\r\n\r\nexport const getFileSize = (size: number) => {\r\n const units = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"];\r\n let remainingSize = size;\r\n let i = 0;\r\n while (remainingSize >= 1024) {\r\n remainingSize /= 1024;\r\n i += 1;\r\n }\r\n return `${remainingSize.toFixed(0)}${units[i]}`;\r\n};\r\n\r\n/* eslint-disable */\r\n// @ts-ignore\r\nexport const isIE = () => /*@cc_on!@*/ false || !!document.documentMode;\r\n/* eslint-enable */\r\n\r\nexport const isValueInChoiceList = (value: string, variable: VariableModel) => {\r\n return variable.choiceList.some((c) => c.value === value);\r\n};\r\n","import _add from \"lodash/add\";\r\nimport _assign from \"lodash/assign\";\r\nimport _assignWith from \"lodash/assignWith\";\r\nimport _chunk from \"lodash/chunk\";\r\nimport _clamp from \"lodash/clamp\";\r\nimport _cloneDeep from \"lodash/cloneDeep\";\r\nimport _countBy from \"lodash/countBy\";\r\nimport _difference from \"lodash/difference\";\r\nimport _each from \"lodash/each\";\r\nimport _every from \"lodash/every\";\r\nimport _filter from \"lodash/filter\";\r\nimport _find from \"lodash/find\";\r\nimport _findIndex from \"lodash/findIndex\";\r\nimport _first from \"lodash/first\";\r\nimport _flatMap from \"lodash/flatMap\";\r\nimport _flatten from \"lodash/flatten\";\r\nimport _forEach from \"lodash/forEach\";\r\nimport _forOwn from \"lodash/forOwn\";\r\nimport _fromPairs from \"lodash/fromPairs\";\r\nimport _groupBy from \"lodash/groupBy\";\r\nimport _hasIn from \"lodash/hasIn\";\r\nimport _includes from \"lodash/includes\";\r\nimport _intersection from \"lodash/intersection\";\r\nimport _intersectionBy from \"lodash/intersectionBy\";\r\nimport _isEmpty from \"lodash/isEmpty\";\r\nimport _isEqual from \"lodash/isEqual\";\r\nimport _isFinite from \"lodash/isFinite\";\r\nimport _isString from \"lodash/isString\";\r\nimport _isUndefined from \"lodash/isUndefined\";\r\nimport _kebabCase from \"lodash/kebabCase\";\r\nimport _keys from \"lodash/keys\";\r\nimport _last from \"lodash/last\";\r\nimport _map from \"lodash/map\";\r\nimport _mapKeys from \"lodash/mapKeys\";\r\nimport _max from \"lodash/max\";\r\nimport _maxBy from \"lodash/maxBy\";\r\nimport _memoize from \"lodash/memoize\";\r\nimport _min from \"lodash/min\";\r\nimport _omit from \"lodash/omit\";\r\nimport _omitBy from \"lodash/omitBy\";\r\nimport _orderBy from \"lodash/orderBy\";\r\nimport _partialRight from \"lodash/partialRight\";\r\nimport _pick from \"lodash/pick\";\r\nimport _pickBy from \"lodash/pickBy\";\r\nimport _pull from \"lodash/pull\";\r\nimport _pullAll from \"lodash/pullAll\";\r\nimport _range from \"lodash/range\";\r\nimport _reduce from \"lodash/reduce\";\r\nimport _remove from \"lodash/remove\";\r\nimport _reverse from \"lodash/reverse\";\r\nimport _size from \"lodash/size\";\r\nimport _some from \"lodash/some\";\r\nimport _sortBy from \"lodash/sortBy\";\r\nimport _split from \"lodash/split\";\r\nimport _takeRightWhile from \"lodash/takeRightWhile\";\r\nimport _takeWhile from \"lodash/takeWhile\";\r\nimport _times from \"lodash/times\";\r\nimport _toPairs from \"lodash/toPairs\";\r\nimport _toUpper from \"lodash/toUpper\";\r\nimport _trim from \"lodash/trim\";\r\nimport _unescape from \"lodash/unescape\";\r\nimport _union from \"lodash/union\";\r\nimport _uniq from \"lodash/uniq\";\r\nimport _values from \"lodash/values\";\r\nimport _without from \"lodash/without\";\r\nimport _xor from \"lodash/xor\";\r\nimport _zipObject from \"lodash/zipObject\";\r\n\r\nexport const add = _add;\r\nexport const assign = _assign;\r\nexport const assignWith = _assignWith;\r\nexport const chunk = _chunk;\r\nexport const clamp = _clamp;\r\nexport const cloneDeep = _cloneDeep;\r\nexport const countBy = _countBy;\r\nexport const difference = _difference;\r\nexport const each = _each;\r\nexport const every = _every;\r\nexport const filter = _filter;\r\nexport const find = _find;\r\nexport const findIndex = _findIndex;\r\nexport const first = _first;\r\nexport const flatMap = _flatMap;\r\nexport const flatten = _flatten;\r\nexport const forEach = _forEach;\r\nexport const forOwn = _forOwn;\r\nexport const fromPairs = _fromPairs;\r\nexport const groupBy = _groupBy;\r\nexport const hasIn = _hasIn;\r\nexport const includes = _includes;\r\nexport const intersection = _intersection;\r\nexport const intersectionBy = _intersectionBy;\r\nexport const isEmpty = _isEmpty;\r\nexport const isEqual = _isEqual;\r\nexport const isFinite = _isFinite;\r\nexport const isString = _isString;\r\nexport const isUndefined = _isUndefined;\r\nexport const kebabCase = _kebabCase;\r\nexport const keys = _keys;\r\nexport const last = _last;\r\nexport const map = _map;\r\nexport const mapKeys = _mapKeys;\r\nexport const max = _max;\r\nexport const maxBy = _maxBy;\r\nexport const memoize = _memoize;\r\nexport const min = _min;\r\nexport const omit = _omit;\r\nexport const omitBy = _omitBy;\r\nexport const orderBy = _orderBy;\r\nexport const partialRight = _partialRight;\r\nexport const pick = _pick;\r\nexport const pickBy = _pickBy;\r\nexport const pull = _pull;\r\nexport const pullAll = _pullAll;\r\nexport const range = _range;\r\nexport const reduce = _reduce;\r\nexport const remove = _remove;\r\nexport const reverse = _reverse;\r\nexport const size = _size;\r\nexport const some = _some;\r\nexport const sortBy = _sortBy;\r\nexport const split = _split;\r\nexport const takeRightWhile = _takeRightWhile;\r\nexport const takeWhile = _takeWhile;\r\nexport const times = _times;\r\nexport const toPairs = _toPairs;\r\nexport const toUpper = _toUpper;\r\nexport const trim = _trim;\r\nexport const unescape = _unescape;\r\nexport const union = _union;\r\nexport const uniq = _uniq;\r\nexport const values = _values;\r\nexport const without = _without;\r\nexport const xor = _xor;\r\nexport const zipObject = _zipObject;\r\n\r\nfunction customizer(objValue, srcValue) {\r\n return isUndefined(objValue) ? srcValue : objValue;\r\n}\r\nexport const defaults = partialRight(assignWith, customizer) as <T>(...obj: Partial<T>[]) => T;\r\n","import { DateTime } from \"luxon\";\r\nimport StackTrace from \"stacktrace-js\";\r\nimport { without } from \"./lodash\";\r\n\r\ndeclare const Voxco;\r\n\r\nexport const MAX_LINES = 2048;\r\nexport const LOG_BUFFER = [];\r\n\r\nconst DEFAULT_LOG_LEVEL = 3;\r\nconst TEST_LOG_LEVEL = 0;\r\nconst DEV_LOG_LEVEL = 4; // Change to 6 to log everything.\r\nconst LOG_LEVELS = [\"e\", \"w\", \"i\", \"d\", \"v\", \"_\"];\r\n\r\nexport type LogListener = (\r\n date: Date,\r\n severity: string,\r\n tag: string,\r\n event: string,\r\n msg: string,\r\n) => void;\r\n\r\nlet _listeners: LogListener[] = [];\r\nexport const addOnLogListener = (listener: LogListener) => (_listeners = [..._listeners, listener]);\r\nexport const removeOnLogListener = (listener: LogListener) =>\r\n (_listeners = without(_listeners, listener));\r\n\r\n// tslint:disable:no-console\r\nfunction log(date: Date, severity: string, tag: string, event: string, msg: string, error?: any) {\r\n let logLevel = DEFAULT_LOG_LEVEL;\r\n if (process.env.NODE_ENV === \"test\") logLevel = TEST_LOG_LEVEL;\r\n if (process.env.NODE_ENV === \"development\") logLevel = DEV_LOG_LEVEL;\r\n if (error && process.env.NODE_ENV === \"development\") {\r\n StackTrace.fromError(error).then((stackframes) => {\r\n const mapped = `${error.name}: ${error.message}\\n${stackframes\r\n .map((sf) => ` at ${sf.toString()}`)\r\n .join(\"\\n\")}`;\r\n log(date, severity, tag, event, mapped);\r\n });\r\n return;\r\n }\r\n if (LOG_LEVELS.indexOf(severity) >= logLevel) return;\r\n LOG_BUFFER.push({ date, severity, tag, event, msg, error });\r\n console.log(\r\n `${DateTime.fromJSDate(date).toFormat(\"HH:mm:ss\")} ${severity.toUpperCase()}/${tag} ${\r\n event || \"\"\r\n } ${msg || \"\"}`.trim(),\r\n );\r\n if (error) console.error(error.stack);\r\n _listeners.forEach((l) => l(date, severity, tag, event, msg));\r\n}\r\n\r\nexport const Log = {\r\n _: (tag: string, event: string, msg?: string) => log(new Date(), \"_\", tag, event, msg),\r\n v: (tag: string, event: string, msg?: string) => log(new Date(), \"v\", tag, event, msg),\r\n d: (tag: string, event: string, msg?: string) => log(new Date(), \"d\", tag, event, msg),\r\n i: (tag: string, event: string, msg?: string) => log(new Date(), \"i\", tag, event, msg),\r\n w: (tag: string, event: string, msg?: string) => log(new Date(), \"w\", tag, event, msg),\r\n e: (tag: string, event: string, msg?: string, error?: any) =>\r\n log(new Date(), \"e\", tag, event, msg, error),\r\n};\r\n\r\nif (typeof Voxco !== \"undefined\")\r\n Log.i(\"logging\", \"INITIALIZED\", `Initialized SurveyEngineJS v${Voxco.version}`);\r\n","/* Generate this object in a C# .Net environment like https://dotnetfiddle.net/\r\nusing System;\r\nusing System.Linq;\r\n\t\t\t\t\t\r\npublic class Program\r\n{\r\n\tpublic static void Main()\r\n\t{\r\n\t\tvar json = \"{\" + TimeZoneInfo.GetSystemTimeZones()\r\n\t\t\t.GroupBy(t => t.StandardName)\r\n\t\t\t.OrderBy(g => g.Key)\r\n\t\t\t.Select(g => \"\\n\\t\\\"\" + g.Key + \"\\\":\" + new String(' ', 32 - g.Key.Length)\r\n\t\t\t\t+ \"{\"\r\n\t\t\t\t\t+ \"displayName: \\\"\" + g.First().DisplayName + \"\\\", \"\r\n\t\t\t\t\t+ \"offsetInMinutes: \" + g.First().BaseUtcOffset.TotalMinutes\r\n\t\t\t\t\t+ (g.First().SupportsDaylightSavingTime ? \", supportsDaylightSavingTime: true, daylightName: \\\"\" + g.First().DaylightName + \"\\\"\" : \"\")\r\n\t\t\t\t+ \"}\")\r\n\t\t\t.Aggregate((a, b) => a + \", \" + b)+ \"\\n}\";\r\n\t\tConsole.WriteLine(json);\r\n\t}\r\n} */\r\nexport const TIMEZONE_INFO: {\r\n [name: string]: {\r\n displayName: string;\r\n offsetInMinutes: number;\r\n supportsDaylightSavingTime?: boolean;\r\n daylightName?: string;\r\n };\r\n} = {\r\n \"Afghanistan Standard Time\": { displayName: \"(UTC+04:30) Kabul\", offsetInMinutes: 270 },\r\n \"Alaskan Standard Time\": {\r\n displayName: \"(UTC-09:00) Alaska\",\r\n offsetInMinutes: -540,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Alaskan Daylight Time\",\r\n },\r\n \"Aleutian Standard Time\": {\r\n displayName: \"(UTC-10:00) Aleutian Islands\",\r\n offsetInMinutes: -600,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Aleutian Daylight Time\",\r\n },\r\n \"Altai Standard Time\": {\r\n displayName: \"(UTC+07:00) Barnaul, Gorno-Altaysk\",\r\n offsetInMinutes: 420,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Altai Daylight Time\",\r\n },\r\n \"Arab Standard Time\": { displayName: \"(UTC+03:00) Kuwait, Riyadh\", offsetInMinutes: 180 },\r\n \"Arabian Standard Time\": { displayName: \"(UTC+04:00) Abu Dhabi, Muscat\", offsetInMinutes: 240 },\r\n \"Arabic Standard Time\": {\r\n displayName: \"(UTC+03:00) Baghdad\",\r\n offsetInMinutes: 180,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Arabic Daylight Time\",\r\n },\r\n \"Argentina Standard Time\": {\r\n displayName: \"(UTC-03:00) City of Buenos Aires\",\r\n offsetInMinutes: -180,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Argentina Daylight Time\",\r\n },\r\n \"Astrakhan Standard Time\": {\r\n displayName: \"(UTC+04:00) Astrakhan, Ulyanovsk\",\r\n offsetInMinutes: 240,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Astrakhan Daylight Time\",\r\n },\r\n \"Atlantic Standard Time\": {\r\n displayName: \"(UTC-04:00) Atlantic Time (Canada)\",\r\n offsetInMinutes: -240,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Atlantic Daylight Time\",\r\n },\r\n \"AUS Central Standard Time\": { displayName: \"(UTC+09:30) Darwin\", offsetInMinutes: 570 },\r\n \"Aus Central W. Standard Time\": { displayName: \"(UTC+08:45) Eucla\", offsetInMinutes: 525 },\r\n \"AUS Eastern Standard Time\": {\r\n displayName: \"(UTC+10:00) Canberra, Melbourne, Sydney\",\r\n offsetInMinutes: 600,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"AUS Eastern Daylight Time\",\r\n },\r\n \"Azerbaijan Standard Time\": {\r\n displayName: \"(UTC+04:00) Baku\",\r\n offsetInMinutes: 240,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Azerbaijan Daylight Time\",\r\n },\r\n \"Azores Standard Time\": {\r\n displayName: \"(UTC-01:00) Azores\",\r\n offsetInMinutes: -60,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Azores Daylight Time\",\r\n },\r\n \"Bahia Standard Time\": {\r\n displayName: \"(UTC-03:00) Salvador\",\r\n offsetInMinutes: -180,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Bahia Daylight Time\",\r\n },\r\n \"Bangladesh Standard Time\": {\r\n displayName: \"(UTC+06:00) Dhaka\",\r\n offsetInMinutes: 360,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Bangladesh Daylight Time\",\r\n },\r\n \"Belarus Standard Time\": {\r\n displayName: \"(UTC+03:00) Minsk\",\r\n offsetInMinutes: 180,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Belarus Daylight Time\",\r\n },\r\n \"Bougainville Standard Time\": {\r\n displayName: \"(UTC+11:00) Bougainville Island\",\r\n offsetInMinutes: 660,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Bougainville Daylight Time\",\r\n },\r\n \"Cabo Verde Standard Time\": { displayName: \"(UTC-01:00) Cabo Verde Is.\", offsetInMinutes: -60 },\r\n \"Canada Central Standard Time\": {\r\n displayName: \"(UTC-06:00) Saskatchewan\",\r\n offsetInMinutes: -360,\r\n },\r\n \"Caucasus Standard Time\": {\r\n displayName: \"(UTC+04:00) Yerevan\",\r\n offsetInMinutes: 240,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Caucasus Daylight Time\",\r\n },\r\n \"Cen. Australia Standard Time\": {\r\n displayName: \"(UTC+09:30) Adelaide\",\r\n offsetInMinutes: 570,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Cen. Australia Daylight Time\",\r\n },\r\n \"Central America Standard Time\": {\r\n displayName: \"(UTC-06:00) Central America\",\r\n offsetInMinutes: -360,\r\n },\r\n \"Central Asia Standard Time\": { displayName: \"(UTC+06:00) Astana\", offsetInMinutes: 360 },\r\n \"Central Brazilian Standard Time\": {\r\n displayName: \"(UTC-04:00) Cuiaba\",\r\n offsetInMinutes: -240,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Central Brazilian Daylight Time\",\r\n },\r\n \"Central Europe Standard Time\": {\r\n displayName: \"(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague\",\r\n offsetInMinutes: 60,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Central Europe Daylight Time\",\r\n },\r\n \"Central European Standard Time\": {\r\n displayName: \"(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb\",\r\n offsetInMinutes: 60,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Central European Daylight Time\",\r\n },\r\n \"Central Pacific Standard Time\": {\r\n displayName: \"(UTC+11:00) Solomon Is., New Caledonia\",\r\n offsetInMinutes: 660,\r\n },\r\n \"Central Standard Time\": {\r\n displayName: \"(UTC-06:00) Central Time (US & Canada)\",\r\n offsetInMinutes: -360,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Central Daylight Time\",\r\n },\r\n \"Central Standard Time (Mexico)\": {\r\n displayName: \"(UTC-06:00) Guadalajara, Mexico City, Monterrey\",\r\n offsetInMinutes: -360,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Central Daylight Time (Mexico)\",\r\n },\r\n \"Chatham Islands Standard Time\": {\r\n displayName: \"(UTC+12:45) Chatham Islands\",\r\n offsetInMinutes: 765,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Chatham Islands Daylight Time\",\r\n },\r\n \"China Standard Time\": {\r\n displayName: \"(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi\",\r\n offsetInMinutes: 480,\r\n },\r\n \"Coordinated Universal Time\": {\r\n displayName: \"(UTC) Coordinated Universal Time\",\r\n offsetInMinutes: 0,\r\n },\r\n \"Cuba Standard Time\": {\r\n displayName: \"(UTC-05:00) Havana\",\r\n offsetInMinutes: -300,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Cuba Daylight Time\",\r\n },\r\n \"Dateline Standard Time\": {\r\n displayName: \"(UTC-12:00) International Date Line West\",\r\n offsetInMinutes: -720,\r\n },\r\n \"E. Africa Standard Time\": { displayName: \"(UTC+03:00) Nairobi\", offsetInMinutes: 180 },\r\n \"E. Australia Standard Time\": { displayName: \"(UTC+10:00) Brisbane\", offsetInMinutes: 600 },\r\n \"E. Europe Standard Time\": {\r\n displayName: \"(UTC+02:00) Chisinau\",\r\n offsetInMinutes: 120,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"E. Europe Daylight Time\",\r\n },\r\n \"E. South America Standard Time\": {\r\n displayName: \"(UTC-03:00) Brasilia\",\r\n offsetInMinutes: -180,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"E. South America Daylight Time\",\r\n },\r\n \"Easter Island Standard Time\": {\r\n displayName: \"(UTC-06:00) Easter Island\",\r\n offsetInMinutes: -360,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Easter Island Daylight Time\",\r\n },\r\n \"Eastern Standard Time\": {\r\n displayName: \"(UTC-05:00) Eastern Time (US & Canada)\",\r\n offsetInMinutes: -300,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Eastern Daylight Time\",\r\n },\r\n \"Eastern Standard Time (Mexico)\": {\r\n displayName: \"(UTC-05:00) Chetumal\",\r\n offsetInMinutes: -300,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Eastern Daylight Time (Mexico)\",\r\n },\r\n \"Egypt Standard Time\": {\r\n displayName: \"(UTC+02:00) Cairo\",\r\n offsetInMinutes: 120,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Egypt Daylight Time\",\r\n },\r\n \"Fiji Standard Time\": {\r\n displayName: \"(UTC+12:00) Fiji\",\r\n offsetInMinutes: 720,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Fiji Daylight Time\",\r\n },\r\n \"FLE Standard Time\": {\r\n displayName: \"(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius\",\r\n offsetInMinutes: 120,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"FLE Daylight Time\",\r\n },\r\n \"Georgian Standard Time\": { displayName: \"(UTC+04:00) Tbilisi\", offsetInMinutes: 240 },\r\n \"GMT Standard Time\": {\r\n displayName: \"(UTC+00:00) Dublin, Edinburgh, Lisbon, London\",\r\n offsetInMinutes: 0,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"GMT Daylight Time\",\r\n },\r\n \"Greenland Standard Time\": {\r\n displayName: \"(UTC-03:00) Greenland\",\r\n offsetInMinutes: -180,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Greenland Daylight Time\",\r\n },\r\n \"Greenwich Standard Time\": {\r\n displayName: \"(UTC+00:00) Monrovia, Reykjavik\",\r\n offsetInMinutes: 0,\r\n },\r\n \"GTB Standard Time\": {\r\n displayName: \"(UTC+02:00) Athens, Bucharest\",\r\n offsetInMinutes: 120,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"GTB Daylight Time\",\r\n },\r\n \"Haiti Standard Time\": {\r\n displayName: \"(UTC-05:00) Haiti\",\r\n offsetInMinutes: -300,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Haiti Daylight Time\",\r\n },\r\n \"Hawaiian Standard Time\": { displayName: \"(UTC-10:00) Hawaii\", offsetInMinutes: -600 },\r\n \"India Standard Time\": {\r\n displayName: \"(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi\",\r\n offsetInMinutes: 330,\r\n },\r\n \"Iran Standard Time\": {\r\n displayName: \"(UTC+03:30) Tehran\",\r\n offsetInMinutes: 210,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Iran Daylight Time\",\r\n },\r\n \"Jerusalem Standard Time\": {\r\n displayName: \"(UTC+02:00) Jerusalem\",\r\n offsetInMinutes: 120,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Jerusalem Daylight Time\",\r\n },\r\n \"Jordan Standard Time\": {\r\n displayName: \"(UTC+02:00) Amman\",\r\n offsetInMinutes: 120,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Jordan Daylight Time\",\r\n },\r\n \"Kamchatka Standard Time\": {\r\n displayName: \"(UTC+12:00) Petropavlovsk-Kamchatsky - Old\",\r\n offsetInMinutes: 720,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Kamchatka Daylight Time\",\r\n },\r\n \"Korea Standard Time\": { displayName: \"(UTC+09:00) Seoul\", offsetInMinutes: 540 },\r\n \"Libya Standard Time\": {\r\n displayName: \"(UTC+02:00) Tripoli\",\r\n offsetInMinutes: 120,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Libya Daylight Time\",\r\n },\r\n \"Line Islands Standard Time\": {\r\n displayName: \"(UTC+14:00) Kiritimati Island\",\r\n offsetInMinutes: 840,\r\n },\r\n \"Lord Howe Standard Time\": {\r\n displayName: \"(UTC+10:30) Lord Howe Island\",\r\n offsetInMinutes: 630,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Lord Howe Daylight Time\",\r\n },\r\n \"Magadan Standard Time\": {\r\n displayName: \"(UTC+11:00) Magadan\",\r\n offsetInMinutes: 660,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Magadan Daylight Time\",\r\n },\r\n \"Magallanes Standard Time\": {\r\n displayName: \"(UTC-03:00) Punta Arenas\",\r\n offsetInMinutes: -180,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Magallanes Daylight Time\",\r\n },\r\n \"Malay Peninsula Standard Time\": {\r\n displayName: \"(UTC+08:00) Kuala Lumpur, Singapore\",\r\n offsetInMinutes: 480,\r\n },\r\n \"Marquesas Standard Time\": {\r\n displayName: \"(UTC-09:30) Marquesas Islands\",\r\n offsetInMinutes: -570,\r\n },\r\n \"Mauritius Standard Time\": {\r\n displayName: \"(UTC+04:00) Port Louis\",\r\n offsetInMinutes: 240,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Mauritius Daylight Time\",\r\n },\r\n \"Mid-Atlantic Standard Time\": {\r\n displayName: \"(UTC-02:00) Mid-Atlantic - Old\",\r\n offsetInMinutes: -120,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Mid-Atlantic Daylight Time\",\r\n },\r\n \"Middle East Standard Time\": {\r\n displayName: \"(UTC+02:00) Beirut\",\r\n offsetInMinutes: 120,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Middle East Daylight Time\",\r\n },\r\n \"Montevideo Standard Time\": {\r\n displayName: \"(UTC-03:00) Montevideo\",\r\n offsetInMinutes: -180,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Montevideo Daylight Time\",\r\n },\r\n \"Morocco Standard Time\": {\r\n displayName: \"(UTC+00:00) Casablanca\",\r\n offsetInMinutes: 0,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Morocco Daylight Time\",\r\n },\r\n \"Mountain Standard Time\": {\r\n displayName: \"(UTC-07:00) Mountain Time (US & Canada)\",\r\n offsetInMinutes: -420,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Mountain Daylight Time\",\r\n },\r\n \"Mountain Standard Time (Mexico)\": {\r\n displayName: \"(UTC-07:00) Chihuahua, La Paz, Mazatlan\",\r\n offsetInMinutes: -420,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Mountain Daylight Time (Mexico)\",\r\n },\r\n \"Myanmar Standard Time\": { displayName: \"(UTC+06:30) Yangon (Rangoon)\", offsetInMinutes: 390 },\r\n \"Namibia Standard Time\": {\r\n displayName: \"(UTC+01:00) Windhoek\",\r\n offsetInMinutes: 60,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Namibia Daylight Time\",\r\n },\r\n \"Nepal Standard Time\": { displayName: \"(UTC+05:45) Kathmandu\", offsetInMinutes: 345 },\r\n \"New Zealand Standard Time\": {\r\n displayName: \"(UTC+12:00) Auckland, Wellington\",\r\n offsetInMinutes: 720,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"New Zealand Daylight Time\",\r\n },\r\n \"Newfoundland Standard Time\": {\r\n displayName: \"(UTC-03:30) Newfoundland\",\r\n offsetInMinutes: -210,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Newfoundland Daylight Time\",\r\n },\r\n \"Norfolk Standard Time\": {\r\n displayName: \"(UTC+11:00) Norfolk Island\",\r\n offsetInMinutes: 660,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Norfolk Daylight Time\",\r\n },\r\n \"North Korea Standard Time\": {\r\n displayName: \"(UTC+08:30) Pyongyang\",\r\n offsetInMinutes: 510,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"North Korea Daylight Time\",\r\n },\r\n \"Novosibirsk Standard Time\": {\r\n displayName: \"(UTC+07:00) Novosibirsk\",\r\n offsetInMinutes: 420,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Novosibirsk Daylight Time\",\r\n },\r\n \"Omsk Standard Time\": {\r\n displayName: \"(UTC+06:00) Omsk\",\r\n offsetInMinutes: 360,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Omsk Daylight Time\",\r\n },\r\n \"Pacific SA Standard Time\": {\r\n displayName: \"(UTC-04:00) Santiago\",\r\n offsetInMinutes: -240,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Pacific SA Daylight Time\",\r\n },\r\n \"Pacific Standard Time\": {\r\n displayName: \"(UTC-08:00) Pacific Time (US & Canada)\",\r\n offsetInMinutes: -480,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Pacific Daylight Time\",\r\n },\r\n \"Pacific Standard Time (Mexico)\": {\r\n displayName: \"(UTC-08:00) Baja California\",\r\n offsetInMinutes: -480,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Pacific Daylight Time (Mexico)\",\r\n },\r\n \"Pakistan Standard Time\": {\r\n displayName: \"(UTC+05:00) Islamabad, Karachi\",\r\n offsetInMinutes: 300,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Pakistan Daylight Time\",\r\n },\r\n \"Paraguay Standard Time\": {\r\n displayName: \"(UTC-04:00) Asuncion\",\r\n offsetInMinutes: -240,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Paraguay Daylight Time\",\r\n },\r\n \"Romance Standard Time\": {\r\n displayName: \"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris\",\r\n offsetInMinutes: 60,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Romance Daylight Time\",\r\n },\r\n \"Russia TZ 1 Standard Time\": {\r\n displayName: \"(UTC+02:00) Kaliningrad\",\r\n offsetInMinutes: 120,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Russia TZ 1 Daylight Time\",\r\n },\r\n \"Russia TZ 10 Standard Time\": {\r\n displayName: \"(UTC+11:00) Chokurdakh\",\r\n offsetInMinutes: 660,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Russia TZ 10 Daylight Time\",\r\n },\r\n \"Russia TZ 11 Standard Time\": {\r\n displayName: \"(UTC+12:00) Anadyr, Petropavlovsk-Kamchatsky\",\r\n offsetInMinutes: 720,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Russia TZ 11 Daylight Time\",\r\n },\r\n \"Russia TZ 2 Standard Time\": {\r\n displayName: \"(UTC+03:00) Moscow, St. Petersburg, Volgograd\",\r\n offsetInMinutes: 180,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Russia TZ 2 Daylight Time\",\r\n },\r\n \"Russia TZ 3 Standard Time\": {\r\n displayName: \"(UTC+04:00) Izhevsk, Samara\",\r\n offsetInMinutes: 240,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Russia TZ 3 Daylight Time\",\r\n },\r\n \"Russia TZ 4 Standard Time\": {\r\n displayName: \"(UTC+05:00) Ekaterinburg\",\r\n offsetInMinutes: 300,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Russia TZ 4 Daylight Time\",\r\n },\r\n \"Russia TZ 6 Standard Time\": {\r\n displayName: \"(UTC+07:00) Krasnoyarsk\",\r\n offsetInMinutes: 420,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Russia TZ 6 Daylight Time\",\r\n },\r\n \"Russia TZ 7 Standard Time\": {\r\n displayName: \"(UTC+08:00) Irkutsk\",\r\n offsetInMinutes: 480,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Russia TZ 7 Daylight Time\",\r\n },\r\n \"Russia TZ 8 Standard Time\": {\r\n displayName: \"(UTC+09:00) Yakutsk\",\r\n offsetInMinutes: 540,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Russia TZ 8 Daylight Time\",\r\n },\r\n \"Russia TZ 9 Standard Time\": {\r\n displayName: \"(UTC+10:00) Vladivostok\",\r\n offsetInMinutes: 600,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Russia TZ 9 Daylight Time\",\r\n },\r\n \"SA Eastern Standard Time\": {\r\n displayName: \"(UTC-03:00) Cayenne, Fortaleza\",\r\n offsetInMinutes: -180,\r\n },\r\n \"SA Pacific Standard Time\": {\r\n displayName: \"(UTC-05:00) Bogota, Lima, Quito, Rio Branco\",\r\n offsetInMinutes: -300,\r\n },\r\n \"SA Western Standard Time\": {\r\n displayName: \"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan\",\r\n offsetInMinutes: -240,\r\n },\r\n \"Saint Pierre Standard Time\": {\r\n displayName: \"(UTC-03:00) Saint Pierre and Miquelon\",\r\n offsetInMinutes: -180,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Saint Pierre Daylight Time\",\r\n },\r\n \"Sakhalin Standard Time\": {\r\n displayName: \"(UTC+11:00) Sakhalin\",\r\n offsetInMinutes: 660,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Sakhalin Daylight Time\",\r\n },\r\n \"Samoa Standard Time\": {\r\n displayName: \"(UTC+13:00) Samoa\",\r\n offsetInMinutes: 780,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Samoa Daylight Time\",\r\n },\r\n \"Saratov Standard Time\": {\r\n displayName: \"(UTC+04:00) Saratov\",\r\n offsetInMinutes: 240,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Saratov Daylight Time\",\r\n },\r\n \"SE Asia Standard Time\": {\r\n displayName: \"(UTC+07:00) Bangkok, Hanoi, Jakarta\",\r\n offsetInMinutes: 420,\r\n },\r\n \"South Africa Standard Time\": {\r\n displayName: \"(UTC+02:00) Harare, Pretoria\",\r\n offsetInMinutes: 120,\r\n },\r\n \"Sri Lanka Standard Time\": {\r\n displayName: \"(UTC+05:30) Sri Jayawardenepura\",\r\n offsetInMinutes: 330,\r\n },\r\n \"Sudan Standard Time\": {\r\n displayName: \"(UTC+02:00) Khartoum\",\r\n offsetInMinutes: 120,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Sudan Daylight Time\",\r\n },\r\n \"Syria Standard Time\": {\r\n displayName: \"(UTC+02:00) Damascus\",\r\n offsetInMinutes: 120,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Syria Daylight Time\",\r\n },\r\n \"Taipei Standard Time\": { displayName: \"(UTC+08:00) Taipei\", offsetInMinutes: 480 },\r\n \"Tasmania Standard Time\": {\r\n displayName: \"(UTC+10:00) Hobart\",\r\n offsetInMinutes: 600,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Tasmania Daylight Time\",\r\n },\r\n \"Tocantins Standard Time\": {\r\n displayName: \"(UTC-03:00) Araguaina\",\r\n offsetInMinutes: -180,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Tocantins Daylight Time\",\r\n },\r\n \"Tokyo Standard Time\": {\r\n displayName: \"(UTC+09:00) Osaka, Sapporo, Tokyo\",\r\n offsetInMinutes: 540,\r\n },\r\n \"Tomsk Standard Time\": {\r\n displayName: \"(UTC+07:00) Tomsk\",\r\n offsetInMinutes: 420,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Tomsk Daylight Time\",\r\n },\r\n \"Tonga Standard Time\": {\r\n displayName: \"(UTC+13:00) Nuku'alofa\",\r\n offsetInMinutes: 780,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Tonga Daylight Time\",\r\n },\r\n \"Transbaikal Standard Time\": {\r\n displayName: \"(UTC+09:00) Chita\",\r\n offsetInMinutes: 540,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Transbaikal Daylight Time\",\r\n },\r\n \"Turkey Standard Time\": {\r\n displayName: \"(UTC+03:00) Istanbul\",\r\n offsetInMinutes: 180,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Turkey Daylight Time\",\r\n },\r\n \"Turks and Caicos Standard Time\": {\r\n displayName: \"(UTC-04:00) Turks and Caicos\",\r\n offsetInMinutes: -240,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Turks and Caicos Daylight Time\",\r\n },\r\n \"Ulaanbaatar Standard Time\": {\r\n displayName: \"(UTC+08:00) Ulaanbaatar\",\r\n offsetInMinutes: 480,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Ulaanbaatar Daylight Time\",\r\n },\r\n \"US Eastern Standard Time\": {\r\n displayName: \"(UTC-05:00) Indiana (East)\",\r\n offsetInMinutes: -300,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"US Eastern Daylight Time\",\r\n },\r\n \"US Mountain Standard Time\": { displayName: \"(UTC-07:00) Arizona\", offsetInMinutes: -420 },\r\n \"UTC+12\": { displayName: \"(UTC+12:00) Coordinated Universal Time+12\", offsetInMinutes: 720 },\r\n \"UTC+13\": { displayName: \"(UTC+13:00) Coordinated Universal Time+13\", offsetInMinutes: 780 },\r\n \"UTC-02\": { displayName: \"(UTC-02:00) Coordinated Universal Time-02\", offsetInMinutes: -120 },\r\n \"UTC-08\": { displayName: \"(UTC-08:00) Coordinated Universal Time-08\", offsetInMinutes: -480 },\r\n \"UTC-09\": { displayName: \"(UTC-09:00) Coordinated Universal Time-09\", offsetInMinutes: -540 },\r\n \"UTC-11\": { displayName: \"(UTC-11:00) Coordinated Universal Time-11\", offsetInMinutes: -660 },\r\n \"Venezuela Standard Time\": {\r\n displayName: \"(UTC-04:00) Caracas\",\r\n offsetInMinutes: -240,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"Venezuela Daylight Time\",\r\n },\r\n \"W. Australia Standard Time\": {\r\n displayName: \"(UTC+08:00) Perth\",\r\n offsetInMinutes: 480,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"W. Australia Daylight Time\",\r\n },\r\n \"W. Central Africa Standard Time\": {\r\n displayName: \"(UTC+01:00) West Central Africa\",\r\n offsetInMinutes: 60,\r\n },\r\n \"W. Europe Standard Time\": {\r\n displayName: \"(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna\",\r\n offsetInMinutes: 60,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"W. Europe Daylight Time\",\r\n },\r\n \"W. Mongolia Standard Time\": {\r\n displayName: \"(UTC+07:00) Hovd\",\r\n offsetInMinutes: 420,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"W. Mongolia Daylight Time\",\r\n },\r\n \"West Asia Standard Time\": {\r\n displayName: \"(UTC+05:00) Ashgabat, Tashkent\",\r\n offsetInMinutes: 300,\r\n },\r\n \"West Bank Gaza Standard Time\": {\r\n displayName: \"(UTC+02:00) Gaza, Hebron\",\r\n offsetInMinutes: 120,\r\n supportsDaylightSavingTime: true,\r\n daylightName: \"West Bank Gaza Daylight Time\",\r\n },\r\n \"West Pacific Standard Time\": {\r\n displayName: \"(UTC+10:00) Guam, Port Moresby\",\r\n offsetInMinutes: 600,\r\n },\r\n};\r\n","import { DateTime } from \"luxon\";\r\nimport { toPairs, map, sortBy, forEach } from \"./lodash\";\r\nimport { TIMEZONE_INFO } from \"./tz\";\r\nimport { RespondentModel } from \"../models/RespondentModel\";\r\n\r\nexport const EPOCH = DateTime.fromFormat(\"1979-12-31\", \"yyyy-MM-dd\");\r\n\r\nconst applyConversionTable = (text: string, conversionTable: {}) => {\r\n const a = toPairs(conversionTable);\r\n const b = map(a, (p: string[], index: number) => ({ key: p[0], value: p[1], index }));\r\n const c = sortBy(b, (e: any) => -e.key.length);\r\n const d = forEach(c, (e: any) => (text = text.replace(e.key, `{{${e.index}}}`)));\r\n forEach(d, (e: any) => (text = text.replace(`{{${e.index}}}`, e.value)));\r\n return text;\r\n};\r\n\r\n/**\r\n * Convert .Net DateTime format to LuxonJS format. Anything not listed is the same between .Net and LuxonJS.\r\n *\r\n * .Net DateTime Format Reference: https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings\r\n *\r\n * LuxonJS Format Reference: https://github.com/moment/luxon/blob/master/docs/formatting.md\r\n * @param format .Net DateTime format\r\n */\r\nexport const cDateFormatToLuxon = (format: string) =>\r\n applyConversionTable(format, {\r\n ddd: \"ccc\", // Abbrev. name day of the week (Mon-Sun)\r\n dddd: \"cccc\", // Full name day of the week (Monday-Sunday)\r\n f: \"uuu\", // Tenths of a second (0-9)\r\n ff: \"uu\", // Hundreths of a second (00-99)\r\n fff: \"u\", // Milliseconds (000-999)\r\n g: \"G\", // Abbreviated era name\r\n y: \"yy\", // The year, from 0 to 99\r\n yy: \"yy\", // The year, from 00 to 99\r\n yyy: \"yyyy\", // The year, with a minimum of three digits.\r\n yyyy: \"yyyy\", // The year as a four-digit number.\r\n yyyyy: \"yyyy\", // The year as a five-digit number.\r\n gg: \"G\", // Abbreviated era name\r\n K: \"ZZ\", // Time zone information (+05:00)\r\n t: \"a\", // AM/PM (A/P)\r\n tt: \"a\", // AM/PM (AM/PM)\r\n z: \"Z\", // Hours offset (-7)\r\n zz: \"ZZZ\", // Hours offset (-07)\r\n zzz: \"ZZ\", // Hours offset (-07:00)\r\n \":\": \":\", // Time separator\r\n \"/\": \"/\", // Date separator\r\n });\r\n\r\n// Docs:\r\n// https://docs.mobiscroll.com/javascript/calendar#localization-dateFormat\r\n// https://docs.mobiscroll.com/javascript/calendar#localization-timeFormat\r\nexport const cDateFormatToMobiscroll = (format: string) =>\r\n applyConversionTable(format, {\r\n \"yyyy-MM-dd\": \"yy-mm-dd\",\r\n \"yy-MM-dd\": \"y-mm-dd\",\r\n \"dd/MM/yyyy\": \"dd/mm/yy\",\r\n \"dd/MM/yy\": \"dd/mm/y\",\r\n \"d/M/yy\": \"d/m/y\",\r\n \"MM/dd/yyyy\": \"mm/dd/yy\",\r\n \"MM/dd/yy\": \"m/dd/y\",\r\n \"dd.MM.yyyy\": \"dd.mm.yy\",\r\n yyyyMMdd: \"yymmdd\",\r\n MMddyyyy: \"mmddyy\",\r\n \"HH:mm\": \"HH:ii\",\r\n \"hh:mm tt\": \"hh:ii A\",\r\n \"HH-mm\": \"HH-ii\",\r\n \"hh-mm tt\": \"hh-ii A\",\r\n hhmm: \"hhii\",\r\n HHmm: \"HHii\",\r\n hhmmss: \"hhiiss\",\r\n HHmmss: \"HHiiss\",\r\n \"HH:mm:ss\": \"HH:ii:ss\",\r\n });\r\n\r\nexport const timeZoneOffset = (respondent: RespondentModel) => {\r\n const timeZone = respondent && TIMEZONE_INFO[respondent.timeZone];\r\n if (timeZone) {\r\n if (DateTime.local().isInDST) return timeZone.offsetInMinutes + 60;\r\n return timeZone.offsetInMinutes;\r\n }\r\n return DateTime.local().offset;\r\n};\r\n","export function checkIfS2LoadedInsideAgent() {\r\n try {\r\n if (window.parent && typeof (window.parent as any).getCookie === \"function\") {\r\n return (window.parent as any).getCookie(\"VoxcoAgent_SessionToken\") !== \"\";\r\n }\r\n } catch (error) {\r\n // eslint-disable-next-line no-console\r\n console.error(\"Error accessing getCookie method on window.parent:\", error);\r\n return false;\r\n }\r\n return false;\r\n}\r\n\r\nfunction getKeyCombination(event: KeyboardEvent) {\r\n const keys = [];\r\n if (event.ctrlKey) keys.push(\"ctrl\");\r\n if (event.altKey) keys.push(\"alt\");\r\n if (event.shiftKey) keys.push(\"shift\");\r\n\r\n keys.push(event.key.toLowerCase());\r\n\r\n return keys.join(\"+\");\r\n}\r\n\r\nexport function addVoxcoAgentListener() {\r\n if (checkIfS2LoadedInsideAgent()) {\r\n window.addEventListener(\"keydown\", (event: KeyboardEvent) => {\r\n // Ignore keypress if agent is typing in below fields\r\n const isInputFieldType = [\"INPUT\", \"TEXTAREA\", \"SELECT\"].includes(\r\n document.activeElement.tagName,\r\n );\r\n\r\n if (!isInputFieldType) {\r\n window.parent.postMessage(\r\n { type: \"voxcoagentshortcut\", key: getKeyCombination(event) },\r\n \"*\",\r\n );\r\n }\r\n });\r\n\r\n window.addEventListener(\"click\", () => {\r\n window.parent.postMessage({ type: \"voxcoagents2clickeventhandler\" }, \"*\");\r\n });\r\n }\r\n}\r\n","import { StoreState } from \"../../models/states/StoreState\";\r\nimport { VariableErrorModel } from \"../VariableErrorModel\";\r\nimport { VariableType } from \"../../models/enums/VariableType\";\r\nimport { makeMentionsSelector } from \"../../redux/selectors/mentions\";\r\nimport { isNullOrEmpty } from \"../../utils\";\r\nimport { QuestionModel } from \"../../models/QuestionModel\";\r\nimport { getSettingBoolean, getSettingString } from \"../../models/utilities/settingUtilities\";\r\n\r\nconst inputRequiredKey = \"INPUT_REQUIRED\";\r\nconst inputRequiredValueTrue = true;\r\n\r\nconst answerRequiredKey = \"AnswerRequired\";\r\nconst answerRequiredValueSoftPrompt = \"SoftPrompt\";\r\n\r\nconst errorKey = \"IncompleteAnswer\";\r\n\r\nexport function doesVariableExistInErrors(variableName, state) {\r\n const { errorsByVariableName } = state.interview.validation;\r\n if (!errorsByVariableName || typeof errorsByVariableName !== \"object\") {\r\n return false;\r\n }\r\n\r\n return Object.prototype.hasOwnProperty.call(errorsByVariableName, variableName);\r\n}\r\n\r\nexport default function softPrompt(\r\n question: QuestionModel,\r\n variable = question.variables.find((v) => v.type !== VariableType.Computed),\r\n) {\r\n if (!variable) {\r\n return null;\r\n }\r\n const { name: variableName } = variable;\r\n\r\n const mentionsSelector = makeMentionsSelector(variableName);\r\n\r\n return (getState: () => StoreState): VariableErrorModel => {\r\n const {\r\n interview: {\r\n questionnaire,\r\n validation: { errorsByVariableName },\r\n },\r\n } = getState();\r\n\r\n const isInputRequired =\r\n getSettingBoolean(questionnaire, inputRequiredKey) === inputRequiredValueTrue;\r\n const isSoftPrompt =\r\n getSettingString(question, answerRequiredKey) === answerRequiredValueSoftPrompt;\r\n\r\n if (isInputRequired && isSoftPrompt) {\r\n const mentions = mentionsSelector(getState());\r\n const isValid = mentions?.some((m) => !isNullOrEmpty(m.value));\r\n if (!isValid) {\r\n const errors = errorsByVariableName[variableName] || [];\r\n const hasShownSoftPrompt = errors.some((error) => error.softPrompt);\r\n return {\r\n variableName,\r\n error: {\r\n key: errorKey,\r\n softPrompt: true,\r\n isErrorNew: !hasShownSoftPrompt,\r\n },\r\n };\r\n }\r\n }\r\n return null;\r\n };\r\n}\r\n","import { StoreState } from \"../../models/states/StoreState\";\r\nimport { VariableErrorModel } from \"../VariableErrorModel\";\r\nimport { VariableType } from \"../../models/enums/VariableType\";\r\nimport { makeMentionsSelector } from \"../../redux/selectors/mentions\";\r\nimport { isNullOrEmpty } from \"../../utils\";\r\n\r\nconst inputRequiredKey = \"INPUT_REQUIRED\";\r\nconst inputRequiredValueTrue = true;\r\n\r\nconst answerRequiredKey = \"AnswerRequired\";\r\nconst answerRequiredValueTrue = undefined;\r\n\r\nconst errorKey = \"IncompleteAnswer\";\r\n\r\nexport default function answerRequired(question) {\r\n const [variable] = question.variables.filter((v) => v.type !== VariableType.Computed);\r\n if (!variable) {\r\n return null;\r\n }\r\n const { name: variableName } = variable;\r\n\r\n const mentionsSelector = makeMentionsSelector(variableName);\r\n\r\n return (getState: () => StoreState): VariableErrorModel => {\r\n const {\r\n interview: { questionnaire },\r\n } = getState();\r\n\r\n const isInputRequired = questionnaire.settings[inputRequiredKey] === inputRequiredValueTrue;\r\n const isAnswerRequired = question.settings[answerRequiredKey] === answerRequiredValueTrue;\r\n\r\n if (isInputRequired && isAnswerRequired) {\r\n const mentions = mentionsSelector(getState());\r\n const isValid = mentions.length && !isNullOrEmpty(mentions[0].value);\r\n if (!isValid) {\r\n return { variableName, error: { key: errorKey } };\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n}\r\n","import { StoreState } from \"../../models/states/StoreState\";\r\nimport { VariableErrorModel } from \"../VariableErrorModel\";\r\nimport { makeMentionsSelector } from \"../../redux/selectors/mentions\";\r\n\r\nconst errorKey = \"InvalidAnswer\";\r\n\r\nexport default function maxMentions(variable) {\r\n const { name: variableName, maxMention } = variable;\r\n const mentionsSelector = makeMentionsSelector(variableName);\r\n\r\n return (getState: () => StoreState): VariableErrorModel => {\r\n const mentions = mentionsSelector(getState());\r\n const isValid = mentions.length <= maxMention;\r\n\r\n if (!isValid) {\r\n return { variableName, error: { key: errorKey } };\r\n }\r\n\r\n return null;\r\n };\r\n}\r\n","import { StoreState } from \"../../models/states/StoreState\";\r\nimport { VariableErrorModel } from \"../VariableErrorModel\";\r\nimport { VariableModel } from \"../../models/VariableModel\";\r\nimport { makeMentionsSelector } from \"../../redux/selectors/mentions\";\r\n\r\nconst enforceOpenEndKey = \"EnforceOpenEnd\";\r\nconst errorKey = \"IncompleteAnswer\";\r\n\r\nexport default function openEndRequired(variable: VariableModel) {\r\n const { name: variableName, choiceList } = variable;\r\n const mentionsSelector = makeMentionsSelector(variableName);\r\n\r\n return (getState: () => StoreState): VariableErrorModel => {\r\n const mentions = mentionsSelector(getState());\r\n\r\n const hasInvalidMentions = mentions\r\n .filter((mention) => mention.openEnd === undefined || !mention.openEnd.trim().length)\r\n .map((mention) => choiceList.find((choice) => choice.value === mention.value))\r\n .some((choice) => choice && choice.settings[enforceOpenEndKey] === true);\r\n\r\n // TODO: Temporary fix for soft-prompt compatibility with the question types that\r\n // haven't had their validation redesign.\r\n const args = { openEnd: variableName };\r\n\r\n if (hasInvalidMentions) {\r\n return { variableName, error: { key: errorKey, args } };\r\n }\r\n\r\n return null;\r\n };\r\n}\r\n","import { StoreState } from \"../../models/states/StoreState\";\r\nimport { VariableErrorModel } from \"../VariableErrorModel\";\r\nimport { makeMentionsSelector } from \"../../redux/selectors/mentions\";\r\n\r\nconst minOpenEndLengthKey = \"MinOpenEndLength\";\r\nconst errorKey = \"InvalidCharactersMin\";\r\n\r\nexport default function openEndMinimumLength(variable) {\r\n const { name: variableName, choiceList } = variable;\r\n const mentionsSelector = makeMentionsSelector(variableName);\r\n\r\n return (getState: () => StoreState): VariableErrorModel => {\r\n const mentions = mentionsSelector(getState());\r\n\r\n const [minimumViolation] = mentions\r\n .map((mention) => {\r\n const { openEnd = \"\" } = mention;\r\n const { settings = {} } = choiceList.find(\r\n (choice) => choice.value === mention.value,\r\n );\r\n const minimum = settings[minOpenEndLengthKey];\r\n return {\r\n openEnd: openEnd.trim(),\r\n minimum,\r\n };\r\n })\r\n .filter(({ openEnd, minimum }) => openEnd.length && minimum !== undefined)\r\n .map(({ openEnd, minimum }) => (openEnd.length < minimum ? minimum : undefined))\r\n .filter((minimum) => minimum !== undefined);\r\n\r\n if (minimumViolation) {\r\n return {\r\n variableName,\r\n error: { key: errorKey, args: { min: minimumViolation } },\r\n };\r\n }\r\n\r\n return null;\r\n };\r\n}\r\n","import { StoreState } from \"../../models/states/StoreState\";\r\nimport { VariableErrorModel } from \"../VariableErrorModel\";\r\nimport { makeMentionsSelector } from \"../../redux/selectors/mentions\";\r\n\r\nconst maxOpenEndLengthKey = \"MaxOpenEndLength\";\r\nconst errorKey = \"InvalidCharactersMax\";\r\n\r\nexport default function openEndMaximumLength(variable) {\r\n const { name: variableName, choiceList } = variable;\r\n const mentionsSelector = makeMentionsSelector(variableName);\r\n\r\n return (getState: () => StoreState): VariableErrorModel => {\r\n const mentions = mentionsSelector(getState());\r\n\r\n const [maximumViolation] = mentions\r\n .map((mention) => {\r\n const { openEnd = \"\" } = mention;\r\n const { settings = {} } = choiceList.find(\r\n (choice) => choice.value === mention.value,\r\n );\r\n const maximum = settings[maxOpenEndLengthKey];\r\n return {\r\n openEnd: openEnd.trim(),\r\n maximum,\r\n };\r\n })\r\n .filter(({ openEnd, maximum }) => openEnd.length && maximum !== undefined)\r\n .map(({ openEnd, maximum }) => (openEnd.length > maximum ? maximum : undefined))\r\n .filter((maximum) => maximum !== undefined);\r\n\r\n if (maximumViolation) {\r\n return {\r\n variableName,\r\n error: { key: errorKey, args: { max: maximumViolation } },\r\n };\r\n }\r\n\r\n return null;\r\n };\r\n}\r\n","import { makeMentionsSelector } from \"../../redux/selectors/mentions\";\r\nimport { StoreState } from \"../../models/states/StoreState\";\r\nimport { VariableErrorModel } from \"../VariableErrorModel\";\r\nimport { getNumeral } from \"../../utils/Number\";\r\nimport { isNullOrNaN, isValueInChoiceList } from \"../../utils\";\r\n\r\nconst errorKey = \"InvalidNumber\";\r\n\r\nexport function validNumber(variable) {\r\n const { name: variableName } = variable;\r\n const mentionsSelector = makeMentionsSelector(variableName);\r\n\r\n return (getState: () => StoreState): VariableErrorModel => {\r\n const mentions = mentionsSelector(getState());\r\n if (mentions.length) {\r\n const mentionValue = mentions[0].value;\r\n const hasAnswerWithValue = isValueInChoiceList(mentionValue, variable);\r\n\r\n if (!hasAnswerWithValue) {\r\n const { interview } = getState();\r\n const language = interview.respondent.language || interview.language;\r\n\r\n const num = getNumeral(mentionValue, language).value();\r\n const isValid = !isNullOrNaN(num);\r\n if (!isValid) {\r\n return { variableName, error: { key: errorKey } };\r\n }\r\n }\r\n }\r\n return null;\r\n };\r\n}\r\n","import { makeMentionsSelector } from \"../../redux/selectors/mentions\";\r\nimport { StoreState } from \"../../models/states/StoreState\";\r\nimport { VariableErrorModel } from \"../VariableErrorModel\";\r\nimport { getNumberOfDecimal } from \"../../utils/Number\";\r\nimport { isValueInChoiceList } from \"../../utils\";\r\n\r\nconst numberOfDecimalsKey = \"NumberOfDecimals\";\r\nconst errorKey = \"InvalidNumber\";\r\n\r\nexport function numberOfDecimals(question, variable) {\r\n const { name: variableName } = variable;\r\n const mentionsSelector = makeMentionsSelector(variableName);\r\n\r\n return (getState: () => StoreState): VariableErrorModel => {\r\n const mentions = mentionsSelector(getState());\r\n if (mentions.length) {\r\n const mentionValue = mentions[0].value;\r\n const nbDecimal = getNumberOfDecimal(mentionValue);\r\n const nbDecimalDefine = parseInt(question.settings[numberOfDecimalsKey], 10);\r\n\r\n // The number 28 comes from dotnet decimal.Round which is used on server side\r\n if (nbDecimalDefine >= 0 && nbDecimalDefine <= 28) {\r\n const isValid =\r\n isValueInChoiceList(mentionValue, variable) || nbDecimal <= nbDecimalDefine;\r\n\r\n if (!isValid) {\r\n return { variableName, error: { key: errorKey } };\r\n }\r\n }\r\n }\r\n return null;\r\n };\r\n}\r\n","import { makeMentionsSelector } from \"../../redux/selectors/mentions\";\r\nimport { StoreState } from \"../../models/states/StoreState\";\r\nimport { VariableErrorModel } from \"../VariableErrorModel\";\r\nimport { recallNumber } from \"../../utils/Number\";\r\nimport { isNullOrNaN, isValueInChoiceList } from \"../../utils\";\r\n\r\nconst minValueKey = \"MinValue\";\r\nconst errorKey = \"LowerBoundNotFulfilled\";\r\n\r\nexport function minValue(question, variable) {\r\n const { name: variableName } = variable;\r\n const mentionsSelector = makeMentionsSelector(variableName);\r\n\r\n return (getState: () => StoreState): VariableErrorModel => {\r\n const { settings } = question;\r\n const { interview } = getState();\r\n let min = recallNumber(settings[minValueKey], interview);\r\n if (isNullOrNaN(min)) min = Number.MIN_SAFE_INTEGER;\r\n\r\n const mentions = mentionsSelector(getState());\r\n if (mentions.length) {\r\n const mentionValue = mentions[0].value;\r\n const num = recallNumber(mentionValue, interview);\r\n const isValid = isValueInChoiceList(mentionValue, variable) || num >= min;\r\n if (!isValid) {\r\n return { variableName, error: { key: errorKey, args: { min: String(min) } } };\r\n }\r\n }\r\n return null;\r\n };\r\n}\r\n","import { makeMentionsSelector } from \"../../redux/selectors/mentions\";\r\nimport { StoreState } from \"../../models/states/StoreState\";\r\nimport { VariableErrorModel } from \"../VariableErrorModel\";\r\nimport { recallNumber } from \"../../utils/Number\";\r\nimport { isValueInChoiceList } from \"../../utils\";\r\n\r\nconst maxValueKey = \"MaxValue\";\r\nconst errorKey = \"UpperBoundNotFulfilled\";\r\n\r\nexport function maxValue(question, variable) {\r\n const { name: variableName } = variable;\r\n const mentionsSelector = makeMentionsSelector(variableName);\r\n\r\n return (getState: () => StoreState): VariableErrorModel => {\r\n const { settings } = question;\r\n const { interview } = getState();\r\n const max = recallNumber(settings[maxValueKey], interview) || Number.MAX_SAFE_INTEGER;\r\n\r\n const mentions = mentionsSelector(getState());\r\n if (mentions.length) {\r\n const mentionValue = mentions[0].value;\r\n const num = recallNumber(mentionValue, interview);\r\n const isValid = isValueInChoiceList(mentionValue, variable) || num <= max;\r\n if (!isValid) {\r\n return { variableName, error: { key: errorKey, args: { max: String(max) } } };\r\n }\r\n }\r\n return null;\r\n };\r\n}\r\n","import { makeMentionsSelector } from \"../../redux/selectors/mentions\";\r\nimport { StoreState } from \"../../models/states/StoreState\";\r\nimport { VariableErrorModel } from \"../VariableErrorModel\";\r\nimport { recallNumber } from \"../../utils/Number\";\r\nimport { isNullOrNaN, isValueInChoiceList } from \"../../utils\";\r\n\r\nconst maxValueKey = \"MaxValue\";\r\nconst minValueKey = \"MinValue\";\r\nconst errorKey = \"OutOfBounds\";\r\n\r\nexport function bounds(question, variable) {\r\n const { name: variableName } = variable;\r\n const mentionsSelector = makeMentionsSelector(variableName);\r\n\r\n return (getState: () => StoreState): VariableErrorModel => {\r\n const { settings } = question;\r\n const { interview } = getState();\r\n const max = recallNumber(settings[maxValueKey], interview);\r\n const min = recallNumber(settings[minValueKey], interview);\r\n\r\n if (!isNullOrNaN(max) && !isNullOrNaN(min)) {\r\n const mentions = mentionsSelector(getState());\r\n if (mentions.length) {\r\n const mentionValue = mentions[0].value;\r\n const num = recallNumber(mentionValue, interview);\r\n const isValid =\r\n isValueInChoiceList(mentionValue, variable) || (num <= max && num >= min);\r\n if (!isValid) {\r\n return {\r\n variableName,\r\n error: { key: errorKey, args: { max: String(max), min: String(min) } },\r\n };\r\n }\r\n }\r\n }\r\n return null;\r\n };\r\n}\r\n","import { QuestionModel } from \"../models/QuestionModel\";\r\nimport { ValidatorFunction } from \"./VariableErrorModel\";\r\nimport { QuestionType } from \"../models/enums/QuestionType\";\r\nimport answerRequired from \"./rules/answerRequired\";\r\nimport maxMentions from \"./rules/maxMentions\";\r\nimport openEndRequired from \"./rules/openEndRequired\";\r\nimport openEndMinimumLength from \"./rules/openEndMinimumLength\";\r\nimport openEndMaximumLength from \"./rules/openEndMaximumLength\";\r\nimport softPrompt from \"./rules/softPrompt\";\r\nimport { VariableType } from \"../models/enums/VariableType\";\r\nimport { validNumber } from \"./rules/validNumber\";\r\nimport { numberOfDecimals } from \"./rules/numberOfDecimals\";\r\nimport { minValue } from \"./rules/minValue\";\r\nimport { maxValue } from \"./rules/maxValue\";\r\nimport { bounds } from \"./rules/bounds\";\r\nimport { isQuestionValidatedServerSide } from \"../models/utilities/validationUtilities\";\r\n\r\nexport const newValidationQuestionTypes = (): QuestionType[] => [\r\n QuestionType.RadioButton,\r\n QuestionType.DropDownList,\r\n QuestionType.AutoComplete,\r\n QuestionType.Slider,\r\n QuestionType.NetPromoter,\r\n QuestionType.RespondentLanguage,\r\n QuestionType.RespondentTimeZone,\r\n QuestionType.NumericAnswer,\r\n];\r\n\r\nexport function answerRequiredValidators(\r\n question: QuestionModel,\r\n useClientValidation?: boolean,\r\n): ValidatorFunction[] {\r\n if (newValidationQuestionTypes().includes(question.type)) {\r\n const bypassClientValidation = isQuestionValidatedServerSide(\r\n question.type,\r\n useClientValidation,\r\n );\r\n\r\n if (!bypassClientValidation) {\r\n return [answerRequired(question), softPrompt(question)];\r\n }\r\n return [];\r\n }\r\n return [];\r\n}\r\n\r\nexport function questionValidators(\r\n question: QuestionModel,\r\n useClientValidation?: boolean,\r\n): ValidatorFunction[] {\r\n const [variable] = question.variables.filter((v) => v.type !== VariableType.Computed);\r\n\r\n const bypassClientValidation = isQuestionValidatedServerSide(\r\n question.type,\r\n useClientValidation,\r\n );\r\n\r\n if (!variable || bypassClientValidation) {\r\n return [];\r\n }\r\n const { type } = variable;\r\n switch (question.type) {\r\n case QuestionType.RadioButton:\r\n case QuestionType.DropDownList:\r\n return [\r\n maxMentions(variable),\r\n openEndRequired(variable),\r\n openEndMinimumLength(variable),\r\n openEndMaximumLength(variable),\r\n ];\r\n case QuestionType.AutoComplete:\r\n case QuestionType.NetPromoter:\r\n case QuestionType.RespondentLanguage:\r\n case QuestionType.RespondentTimeZone:\r\n return [maxMentions(variable)];\r\n case QuestionType.Slider:\r\n if (type === VariableType.Discrete) {\r\n return [maxMentions(variable)];\r\n }\r\n return [];\r\n case QuestionType.NumericAnswer:\r\n return [\r\n maxMentions(variable),\r\n validNumber(variable),\r\n numberOfDecimals(question, variable),\r\n bounds(question, variable),\r\n minValue(question, variable),\r\n maxValue(question, variable),\r\n ];\r\n default:\r\n return [];\r\n }\r\n}\r\n"],"names":["module","exports","e","t","a","n","y","s","ie","i","r","window","g","matchMedia","matches","o","navigator","userAgent","l","platform","c","maxTouchPoints","d","test","u","match","me","requestAnimationFrame","setTimeout","he","cancelAnimationFrame","clearTimeout","m","x","Te","type","__mbscTouched","xe","getComputedStyle","length","split","st","b","T","getContext","fillStyle","fillRect","getImageData","data","it","addEventListener","fe","removeEventListener","S","nodeType","matchesSelector","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","call","h","CustomEvent","detail","bubbles","cancelable","document","createEvent","initEvent","dispatchEvent","replace","ae","pe","ve","v","createElement","style","toLowerCase","animation","transition","webkit","messageHandlers","touchAction","M","columns","opacity","zoom","w","readonly","D","k","Array","prototype","slice","_","N","C","E","toUpperCase","A","H","F","P","O","ready","trim","indexOf","innerHTML","childNodes","push","querySelectorAll","getElementById","isArray","attachEvent","readyState","this","concat","empty","each","map","apply","arguments","addClass","classList","add","removeClass","remove","hasClass","contains","toggleClass","toggle","closest","DOCUMENT_NODE","parentNode","attr","setAttribute","getAttribute","removeAttr","removeAttribute","prop","val","multiple","find","value","options","selected","on","target","is","DomNameSpaces","namespace","event","listener","capture","bind","DomLiveListeners","liveListener","off","removed","splice","substr","trigger","width","css","innerWidth","documentElement","scrollWidth","parseFloat","height","innerHeight","body","Math","max","scrollHeight","offsetHeight","clientHeight","offsetWidth","forEach","parseInt","offset","getBoundingClientRect","top","pageYOffset","clientTop","left","pageXOffset","clientLeft","hide","display","show","getPropertyValue","clone","cloneNode","styles","removeProperty","cssText","filter","html","text","textContent","not","item","index","parent","children","get","eq","append","firstChild","appendChild","appendTo","prepend","insertBefore","prependTo","insertAfter","nextSibling","next","nextElementSibling","nextAll","prev","previousElementSibling","prevAll","unique","parents","removeChild","before","after","scrollTop","scrollTo","scrollX","scrollLeft","scrollY","contents","nextUntil","prevUntil","detach","fn","L","rt","j","be","ge","ye","min","re","$","inArray","extend","shift","isPlainObject","isFunction","Object","toString","getPrototypeOf","hasOwnProperty","V","z","ot","Se","originalEvent","targetTouches","changedTouches","ne","__mbscOff","I","isMbscTap","nodeName","stopPropagation","preventDefault","lt","mbscChange","uid","J","ct","W","Date","R","B","K","xsmall","small","medium","large","xlarge","dt","Me","f","p","responsive","breakpoint","settings","element","_init","_destroy","_processSettings","_checkResp","_responsive","init","_getRespCont","context","getVal","_hasDef","_defaults","_hasTheme","theme","themeVariant","autoTheme","themes","form","_class","_hasLang","i18n","lang","_presets","preset","setVal","destroy","id","tap","abs","mbscClick","initMouseEvent","screenX","screenY","clientX","clientY","isIonicTap","passive","Y","option","getInst","__ready","ut","getHours","setHours","oe","charAt","ue","getDay","dayNamesShort","dayNames","getTime","getFullYear","getMonth","monthNamesShort","monthNames","getYear","getMinutes","getSeconds","pmText","amText","le","xt","defaultValue","RegExp","shortYearCutoff","getDate","mt","round","ht","Tt","G","tz","ce","moment","returnFormat","isoParts","getMilliseconds","toDate","de","exec","U","ft","getCoord","preventClick","vibrate","version","page","frame","scroller","listview","navigation","progress","card","name","majorVersion","minorVersion","instances","classes","util","setDefaults","customTheme","baseTheme","pt","vt","dayNamesMin","getMaxDayOfMonth","getWeekNumber","setDate","ceil","bt","currentTarget","keyCode","addRipple","clearInterval","removeRipple","setInterval","start","stop","datetime","formatDate","parseDate","se","De","ke","X","Z","q","stopProp","Q","activeInstance","shiftKey","cancel","select","ee","Ee","_activeElm","focus","_e","focusOnClose","_markupRemove","mbscModals","scrollLock","mbscLock","mbscIOSLock","mbscScrollLeft","mbscScrollTop","Ne","te","position","visibility","_isVisible","_hasContent","_markupInserted","closeOnOverlayTap","click","He","focusTrap","buttons","handler","handlers","_attachEvents","_checkSize","zone","ResizeObserver","Symbol","iterator","done","__mbscResize","observe","dir","runOutsideAngular","unobserve","valueText","_tempValue","_fillValue","_value","_isFullScreen","_position","tabs","_isLiquid","maxPopupWidth","popup","hasTabs","oldWidth","oldHeight","windowWidth","windowHeight","anchor","scroll","floor","attachShow","showOnFocus","showOnTap","blur","readOnly","el","lbl","clear","_clearValue","live","enable","disabled","disable","_readValue","animate","Ce","activeElement","cssClass","compClass","showOverlay","Ae","rtl","headerText","_generateContent","btnReverse","parentClass","btnWidth","btnClass","icon","_markup","markup","_markupReady","_isValid","button","_detachEvents","isVisible","__processSettings","__init","__destroy","_updateHeader","touchUi","set","setText","setIcon","cancelText","cancelIcon","close","closeText","closeIcon","clearText","clearIcon","_isInput","layout","skipShow","_preventChange","gt","domEvent","prevDef","lock","scrolled","Fe","thresholdY","thresholdX","momentum","speedUnit","deltaY","wheelDelta","deltaX","deltaMode","posX","posY","originX","originY","direction","snap2","snap1","time","timeUnit","destinationX","destinationY","duration","transitionTiming","sync","refresh","contSize","maxScroll","minScroll","snap","offsetTop","offsetLeft","maxSnapScroll","easing","elastic","initialPos","axis","moveElement","scrollbar","mousewheel","selectedText","Frame","mobiscroll","rows","showLabel","selectedLineBorder","weekDays","checkIcon","btnPlusClass","btnMinusClass","btnCalPrevClass","btnCalNextClass","Pe","CSS","Oe","supports","Le","Ve","_tempSelected","_prevItemTap","_disabled","_$markup","_index","tapSelect","setOnTap","_offset","_array","_map","getIndex","circular","_length","delay","_batch","key","label","_nr","_current","_first","_last","_margin","_refresh","_scroller","invalid","validate","values","valid","_tempWheelArray","_$active","_$scroller","formatValue","_hasValue","_wheelArray","keys","_selected","change","_setVal","parseValue","_getVal","setArrayVal","getArrayVal","changeWheel","_$3d","getValidValue","wheels","maxWidth","minWidth","onStart","onGestureStart","onGestureEnd","onAnimationStart","onAnimationEnd","onMove","onBtnTap","multiline","showScrollArrows","scroll3d","_getItemValue","yt","end","isNaN","dd","tt","yearSuffix","getUTCFullYear","getUTCMonth","getUTCDate","todayText","unshift","dateOrder","format","calendarSystem","ze","dateFormat","separator","timeFormat","dateWheels","timeWheels","dateDisplay","steps","hour","stepHour","minute","stepMinute","second","stepSecond","zeroBased","yearText","monthSuffix","monthText","daySuffix","dayText","hourText","minuteText","secText","ampmText","_format","_order","now","nowText","nowIcon","bootstrap","ios","material","windows","join","Scroller","Ye","Ie","we","Ze","background","color","marked","_getDayProps","qe","_id","_onGenMonth","labels","events","colors","_labels","sort","eventOrder","moreEventsPluralText","moreEventsText","_days","Re","year","month","firstDay","je","$scroller","Be","ariaLabel","dayClass","todayClass","pos","$active","Je","We","_isSetDate","queue","Qe","highlight","_onSetDate","first","$e","date","Ke","_selectDay","Ge","Ue","Xe","buffer","pages","total","genPage","getFirst","callback","load","changing","onAfterChange","onBeforeChange","size","et","_scrollers","at","_onRefresh","nt","St","controls","pageBuffer","weekCounter","weeks","calendarScroll","calendarWidth","disabledClass","selectedTabClass","selectedClass","calendarHeight","calendar","quickNav","yearChange","search","_minDate","_maxDate","redraw","navigate","changeTab","_showDayPicker","tab","_prepareObj","__selectDay","outerMonthChange","_checkBtn","allDay","onMarkupReady","multiLabel","showEventCount","months","showOuterDays","prevMonthText","nextMonthText","prevYearText","nextYearText","calendarClass","tabLink","_multiple","altKey","onShow","onHide","onValidated","control","onPosition","breakPointMd","maxMonthWidth","getJson","src","XMLHttpRequest","open","onload","status","JSON","parse","response","onerror","send","dateText","timeText","fromText","toText","selectType","firstSelectDay","setOnDayTap","onClear","onBeforeShow","counter","selectedPluralText","onCancel","hu","delimiter","eventText","eventsText","allDayText","noEventsText","wholeText","fractionText","unitText","labelsShort","startText","stopText","resetText","lapText","hideText","backText","undoText","offText","onText","decimalSeparator","thousandsSeparator","es","fr","no","zh","nl","tr","ja","sv","cs","sk","ro","pl","jalali","fa","ru","ca","da","hijri","ar","bg","fi","hi","hr","ko","sr","vi","th","today","ua","nth","nul","lexer","as","grammar","Lexer","ParserRules","or","bool","and","neq","eq_algebraic","gte","lte","compare","some","strfind","dncontain","plus","minus","sub","mul","div","exp","pow","vn","sum","smr","sm2","ind","prj","_if","v01","nbr","sgn","cmp","cmr","meq","mnb","rng","rnk","sqr","ln","log","trc","ran","mod","jul","yea","mon","day","wkd","nbc","qta","qtf","qtc","vals","qtisavail","qtareavail","getavailqt","selrandqt","qtisavailresp","qtareavailresp","getavailqtresp","selrandqtresp","rnb","loop","rxy","fsr","dst","nbl","csm","number","reduce","cmx","cmn","cor","can","cin","findIndex","mov","v1","mst","mvc","variable","range","variableSelect","skip","variableList","to","variableRange","choiceRange","choice","int","has","float","uint","word","not_eq","ou","is_empty","is_not_empty","does_not_contain","non","fn_min","fn_max","fn_som","fn_sum","fn_smr","fn_sm2","fn_ind","fn_prj","fn_if","fn_si","fn_v01","fn_nbr","fn_sgn","fn_cmp","fn_cmr","fn_meq","fn_mnb","fn_rng","fn_rnk","fn_sqr","fn_ln","fn_log","fn_abs","fn_trc","fn_ran","fn_mod","fn_exp","fn_jul","fn_yea","fn_mon","fn_day","fn_wkd","fn_qta","fn_qtf","fn_qtc","fn_str","fn_nbc","fn_rnb","fn_rxy","fn_nbl","fn_csm","fn_cmx","fn_cmn","fn_cor","fn_can","fn_cin","fn_mov","fn_mst","fn_mvc","fn_fsr","fn_qtisavail","fn_qtareavail","fn_getavailqt","fn_selrandqt","fn_qtisavailresp","fn_qtareavailresp","fn_getavailqtresp","fn_selrandqtresp","identifier","ws","ParserStart","___CSS_LOADER_URL_IMPORT_0___","URL","___CSS_LOADER_URL_IMPORT_1___","___CSS_LOADER_URL_IMPORT_2___","___CSS_LOADER_EXPORT___","___CSS_LOADER_URL_REPLACEMENT_0___","___CSS_LOADER_URL_REPLACEMENT_1___","___CSS_LOADER_URL_REPLACEMENT_2___","doc","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","Element","parentElement","props","state","componentDidCatch","error","info","setState","console","render","ErrorLog","errors","className","App","interview","currentPage","isReady","debug","application","mode","connection","AppImpl","resources","en","translation","lng","interpolation","escapeValue","fallbackLng","vars","debugLanguage","location","href","dlang","includes","Voxco","store","simulatedBanner","borderBottom","boxSizing","composes","lineHeight","padding","right","zIndex","paddingRight","justifyContent","fontSize","fontStyle","fontWeight","textAlign","fontFamily","TextFont","simulatedBannerMessage","surveyEngine","PrimaryColor","SecondaryColor","fill","flex","cursor","margin","TitleFont","TitleFontVariant","TitleTextAlign","TitleFontSize","HeaderSizes","H1","TextFontSize","BaseFontSize","marginBottom","H2","H3","H4","PageBackground","TextFontVariant","LineHeight","overflow","overflowY","bottom","textSizeAdjust","SimulatedBanner","bounds","questionnaire","previewModeMessage","modalityInformationText","GetModalityInformativeText","role","fixedWidth","modality","languages","SurveyEngine","simulated","respondent","debugPanelVisible","mobilePreview","simulatedBannerVisible","CustomCSS","CustomJavascript","debugPanel","getElementsByClassName","customJs","eval","ex","renderDesktop","isDesktopPreviewView","renderMobile","ThemedSurveyEngine","hasQuestionnaire","Boolean","hasMessage","themeSettings","loading","LoadingEllipsis","count","setCount","interval","marginRight","repeat","pageSelector","startSimulationAsync","initialState","flowController","createSimulatedStore","lastPage","previousPage","getState","dispatch","simulatePages","useScrollToActive","containerRef","center","current","querySelector","scrollIntoView","block","behavior","questionColor","blockStart","backgroundImage","backgroundPosition","backgroundRepeat","pageBreak","flowQuestionContainer","flowQuestion","borderRadius","wordBreak","flowQuestionIcon","flowQuestionActions","flowQuestionAction","paddingLeft","userSelect","flowQuestionActionButton","flowQuestionActionActive","flowQuestionLogic","flowQuestionLogicIcon","flowPage","flowPageSelectArea","questionConnector","QuestionTypeIcon","QuestionType","FontAwesome","transform","ActionTypeIcon","QuestionActionType","FlowQuestion","question","firstOfPage","active","completed","preLoadActions","postAnswerActions","showLogic","setShowLogic","ref","actions","action","condition","evaluated","asBoolean","disposition","DispositionCode","PropertyType","code","destination","autoClean","exitUrl","url","matrix","getActionTitle","getActionConditionText","onClick","FlowPage","showBlockName","isFirst","blockName","randomizedBlocks","blockIndex","hovered","setHovered","questions","questionIndex","onMouseOver","onMouseOut","isPreviewNavigation","historyIndex","pagesFromLast","panelContainer","flexDirection","title","sectionTitle","marginTop","searchIcon","searchInput","border","outline","scrollable","overflowX","scrollbarWidth","scrollbarColor","WidgetPanel","searchable","setSearch","searchPlaceholder","onChange","placeholder","Section","FlowPanel","history","simulating","setSimulating","simulatedPages","setSimulatedPages","onMessage","Worker","postMessage","catch","then","useSimulatedPages","previousPageBlockIndex","pageIndex","renderPages","variableContainer","variablePanelHeader","flexWrap","variablePanelHeaderTitle","variableValue","alignItems","variableName","variableDetails","variableInput","resize","variableInputSmall","marginLeft","variableText","variableOpenEnd","variableDetailsIcon","variableDetailsIconActive","variableTypeButton","getFilteredVariableKeys","variables","Variable","openEnd","isSystemVariable","VariableType","showDetails","setShowDetails","VariablesPanel","showSystemVariables","lowerCaseSearch","system","blocks","mentions","mentionsByVariableName","systemVariables","filteredVariableKeys","orderedVariableKeys","questionVariables","mention","questionSelected","GoToQuestionPanel","pageQuestions","firstQuestion","filteredQuestions","tabIndex","onKeyPress","setting","settingLabel","settingValue","hover","buttonIcon","Button","otherProps","setHover","ToggleButton","radio","Radio","xmlns","viewBox","rx","SettingsPanel","onChangeDockPosition","dockPosition","debugInfo","applicationMode","SurveyMode","dockedContainer","boxShadow","titleRow","titleContainer","subtitle","debugIcon","panel","panelButtonContainer","panelButton","panelButtonSmall","panelButtonIcon","panelButtonActive","toolbar","DockedDebugPanel","panels","onSelectedChanged","useReservedBounds","content","effect","floatingContainer","minHeight","widgetToggleButton","widgetToggleButtonIcon","borderTopRightRadius","borderBottomRightRadius","settingsButton","panelContent","panelIndicatorShadow","borderTopWidth","borderBottomWidth","borderRightColor","panelIndicator","AnimatedFontAwesomeIcon","makeContainerProps","xy","config","immediate","FloatingDebugPanel","setDimensions","calcDimensions","outerWidth","outerHeight","useWindowDimensions","setOpen","containerProps","setContainerProps","buttonRef","gestureStateRef","gs","filterTaps","selectedPanel","panelTransitions","from","enter","leave","panelBtnTransitions","trail","toggleBtnTransitions","initial","mask","exclude","issueContainer","issuePanelHeader","issuePanelHeaderTitle","issueValue","issueLabel","issueDetails","paddingTop","issueElementHtml","issueNodeCount","issueSeverity","severity","issueElements","issueDetailsIcon","issueDetailsIconActive","AccessibilityIssue","details","nodes","severityLabel","toggleShowDetails","Collapsible","expanded","node","onFocus","violations","componentDidMount","runOnly","disableDeduplicate","include","resultTypes","results","impact","localeCompare","componentWillUnmount","violation","help","description","DebugPanel","setSelected","initialValue","useState","Function","localStorage","getItem","storedValue","setStoredValue","valueToStore","setItem","stringify","useLocalStorage","setPosition","displayInThemeEditor","hideAccessibilityPanel","visiblePanelsBySurveyMode","indexOfAccessibility","visiblePanels","AccessibilityPanel","contentRef","springProps","ErrorRenderer","stack","setHtml","stackframes","message","sf","dangerouslySetInnerHTML","__html","FontAwesomeIcon","scale","targetHeight","preview","previewDesktop","previewMobile","alignContent","hpadding","paddingBottom","deviceFrame","deviceFrameContent","pointerEvents","deviceFrameImage","backgroundSize","deviceFrameTime","letterSpacing","MobilePreview","desktopRef","mobileRef","ignoreNextEvent","onScroll","desktop","mobile","scrollsv","sibling","toFormat","EmailRegularExpression","PhoneRegularExpression","QueryParameters","LANGUAGE","PAGE_SESSION_ID","SESSION_KEY","AdvancedSettingsVersion","ErrorLogContainer","ErrorLogContainerImpl","NavigationType","QuitButtonAction","params","result","isValid","errorsByVariableName","build","setValid","fail","args","getErrors","signal","UNSAFE_componentWillReceiveProps","nextProps","eliminateSkippable","skippable","evaluator","skipLogic","displayLogic","eliminateVarsList","elements","eliminateIndexed","prefix","indexed","eliminateIfAnsweredList","eliminateIfNotAnsweredList","eliminableElements","eliminableElementsOrdered","excludedFieldsList","Number","hasMentionWithIndex","choiceList","choicesByVariableName","choiceWithIndex","hasMentions","excludeFromElimination","eliminateAnswered","eliminateNotAnswered","eliminateList","eliminateChoiceList","serverPage","choices","includeInvisible","includeSoftPrompt","c1","flatMap","c2","fixedChoices","putBackFixedChoices","eliminateChoices","openEndActive","isOpenEndActive","openEndDisplayLogic","eliminateVariables","visibleVariables","v2","filterServerAxis","serverQuestion","visibleIndices","AxisType","columnsPositions","rowsPositions","eliminateRows","nthRows","headerRows","bodyRows","repeatHeader","row","openEndDisplayIf","eliminateColumns","makeAxios","instance","baseURL","timeout","interceptors","request","use","psidAxiosRequestInterceptor","psid","skey","getVisibleQuestions","eliminationOptions","visibleQuestions","variableNames","variableDependencies","logic","setSoftPromptChoices","softPromptType","AnswerRequired","mentionsSelector","softPrompt","softPromptCode","setSoftPromptInvisibleChoices","SoftPromptChoiceType","setSoftPromptVisibleDefaultChoices","validationResult","getValidationResults","createValidationResult","variableErrors","acc","compose","validationErrors","validator","useClientValidation","answerRequiredErrors","validateAndNavigateToNextPage","defaultInvisibleChoices","setDefaultInvisibleChoices","supportValidateSoftPrompt","instanceId","hideVariableBackArrow","canLoopVariable","errorVariableIndex","backButtonAlwaysVisible","variableExists","nextVariable","newPrevBtnActive","newNextBtnActive","every","ValidationBuilder","autoAdvanceTimer","setCarrouselActiveVariable","questionId","sequencedVariables","carrouselActiveVariableIndex","carrousel","activeVariableIndex","getLatestMentionsForVariableName","updateMentionsAfterDisablingFields","updateQuestionFieldDisabledStatus","ids","getLatestMentionsFromState","disableAndResetHybridQuestionMapppedCell","currentFieldIdentifier","filteredRows","vb","latestMentions","loopVariable","mappedFieldIdentifier","currentMentions","builder","getMentions","getQuestionVariable","getMention","mentionIndex","getMentionValue","getMentionOpenEnd","axisHasMentions","getFiles","files","file","getFile","isSoftPrompt","onAutoAdvanceTimer","onNavigation","Next","truncateOpenEnd","maxLenght","substring","parentCustomError","language","validateHandler","shouldValidate","isOpenEndRequired","isAxisAnswerRequired","isChoiceVisible","choiceValue","hasChoiceWithValue","isChoiceNoLongerVisible","prevProps","isValidChoice","removeUnavailableMentions","shouldDisplayMentionValue","setMentions","removeValue","defaultChoices","isChoiceDefault","sequencedVariable","isVariableComputed","setChoicesAsMentions","maxValue","UNSAFE_componentWillMount","initializeQuestion","renderedQuestion","questionFirstRender","willUpdateMentions","componentDidUpdate","prevState","sameQuestion","mentionChanged","didUpdateMentions","didUpdateVariables","finalizeQuestion","matrixIndex","preventAutoAdvance","isAnswerRequired","minValue","mentionIsValid","hasOpenEnd","openEndChoices","openEndChoice","isAnswerComplete","firstVariable","defaultPrevented","anyMentionChangedForQuestion","shouldAutoAdvance","silent","failValidation","validationBuilder","validateSoftPrompt","validateOpenEnd","isOpenEndQuestion","customError","minLength","String","required","isSingleOnPage","validateSignal","SignalListener","renderQuestion","getBorderRadius","ControlAlpha","BorderWidth","BorderRadius","InputHeight","backgroundColor","ControlBackground","ControlBorderColor","ForegroundColorDark","verticalAlign","selectExpanded","selectFocused","ActiveHighlightValue","borderColor","selectDisabled","selectContent","textOverflow","WebkitAppearance","whiteSpace","OptionHeight","optionNonInteractive","listbox","listStyleType","maxHeight","listboxExpanded","borderBottomLeftRadius","dropDown","check","hidden","invisible","iconLeft","iconCaret","choiceActive","ActiveBackgroundValue","outlineColor","RecalledText","ariaHidden","recalled","useRecall","inputWrapper","QuestionSpacing","WithinComponents","inputWrapperLabel","inputWrapperLabelLeft","inputWrapperLabelRight","inputWrapperControl","InputWrapper","leftLabel","rightLabel","leftRecalledLabel","rightRecalledLabel","AutoComplete","maxResults","maxResultsMessage","searchMethod","labelId","onBlur","onOptionSelected","dropdownWidth","setDropdownWidth","focusedOption","setFocusedOption","focused","setFocused","setExpanded","autoComplete","measure","rect","selectedOption","focusOption","selectOption","clickOutside","filteredOptions","trimmedLowerValue","recalledLabel","startsWith","displayMaxResultsMessage","limitedFilteredOptions","selectPreviousOption","focusedIndex","previousIndex","selectNextOption","nextIndex","closeListBox","openListBox","relatedTarget","onKeyDown","onOptionKeyDown","setDefaultChoices","firstDefaultVisibleChoice","isDefault","answer","getAutoCompleteAnswer","invalidAsOpenEnd","getChoiceText","updateState","input","hasAnswerWithValue","newState","selectedChoice","getValue","getRecalledLabel","RecallType","translatedLabel","elementId","BaseControl","getRendererProps","gridRendering","mobileOnly","standardOnly","showSoftPrompt","gridRenderedColumnIndex","gridRenderedRowIndex","isRowHeader","displayType","ChoiceListDisplayType","choiceListTableHorizontal","choiceListTableVertical","choiceListGrid","gridAutoFlow","gridGap","ChoiceSpacing","gridTemplateColumns","gridTemplateRows","overflowWrap","checkBoxAlignment","CheckBoxIconAlignment","radioIconAlignment","RadioIconAlignment","backgroundless","ChoiceListBackgroundAlpha","ChoiceListBackgroundBorderWidth","Mixins","ChoiceListBackgroundBorderRadius","ChoiceHeight","DisplayChoiceIcon","ShowCheckboxSettings","ShowRadioSettings","choiceHeader","choiceText","choiceContainer","choiceSelected","choiceHover","controlType","ChoiceContainer","ownProps","ChoiceContainerImpl","openEndError","getHeight","freeform","inputBox","accessoryLeft","accessoryRight","inputBoxFocused","inputBoxAccessory","inputBoxAccessoryLeft","inputBoxAccessoryRight","inputBoxDisabled","InputBox","useAriaLabelledByForQuestionOpenEndChoiceBox","useAriaLabelledByForInputFieldQuestion","getAriaLabelledByFromId","nameOrElementId","fieldWithinQuestionType","gridRenderedChoiceIndex","leftLabelId","OpenEndRenderer","gridTypeLeftLabelOpenEndId","isDisabledRequest","isDisabled","isHidden","onOpenEndBlur","onOpenEndChange","lines","isMouseDownEventPropagation","isClickEventPropagation","useAriaLabelledBy","parentQuestionType","isRowOfGrid","onMouseDown","ChoiceOpenEndRenderer","isSelected","QuestionContext","useQuestion","spacer","ChoiceLabelRenderer","choiceLabel","useTranslatable","openEndSize","horizontal","flexGrow","radioIcon","radioIconChecked","radioIconDisabled","RadioIcon","checked","backgroundLess","RadioIconType","TickedRadioImageUrl","UntickedRadioImageUrl","selectedColor","showDefaultIcon","alt","checkBoxIcon","checkBoxIconChecked","checkBoxIconDisabled","CheckBoxIcon","CheckBoxIconType","TickedImageUrl","UntickedImageUrl","ButtonChoice","choiceElementId","onSelect","renderChoice","renderAfter","carrouselChoiceBackgound","setActive","ChoiceIcon","elementReference","useRef","useEffect","Choice","isLast","choiceRef","ChoiceListItemRenderer","onAfterSelection","defaultFocusStatus","statuses","currentElementInfo","currentButtonChoiceId","variableId","nextFocusableElementInfo","currentElement","eventKey","elementFocusStatus","indexCondition","findNextFocusableElementWithinSameVariable","len","findNextFocusableElementWithinNextVariable","elementWithFocus","focusStatus","updateNewFocusStatus","elementsToUpdate","elementRef","removeFocusForRemainingElementsOfLastQuestion","handleKeyPressEvent","LabelPosition","getMentionValues","isEmpty","checkBox","checkBoxGridCell","GridCellMinHeight","GridCellPadding","checkBoxGridCellChecked","checkBoxInput","CheckBoxRenderer","questionType","useAriaLabel","ariaAttributes","isChoiceOrHybridGridType","choiceOrColumnHasIndexExist","choiceAriaText","updateValue","executeUpdateForIdAfterSelection","isSelectedExclusive","BaseChoice","radioGridCell","radioGridCellChecked","radioInput","RadioRenderer","siblingElement","imageChoice","imageChoiceCollapsed","imageChoiceTarget","imageChoiceOverlay","imageChoiceOverlaySelected","imageChoiceOverlayActive","imageChoiceImage","imageChoiceText","imageChoiceCollapsedText","imageChoiceTextSelected","imageDisabled","getImageDimensions","parentWidth","parentHeight","ImageChoiceRenderer","divRef","imageSrc","inputId","showLabelText","showChoiceTextForQuestion","showChoiceText","No","displayChoiceLabels","showTabIndexIfTextOnlyForImage","collapsedGrid","onChoiceSelected","getChoiceLabel","buttonIconSize","ButtonBackground","buttonActive","buttonHidden","buttonDisabled","buttonSmall","buttonLarge","flexBasis","buttonFull","buttonFlex","buttonTextContainer","buttonBorderNone","buttonTextAnimated","buttonTextAnimatedHover","buttonIconContainer","iconPosition","iconOnHover","textAndIcon","buttonIconAnimated","buttonIconAnimatedHover","buttonIconDisabled","pointer","getSizeClassName","ButtonIcon","imageUrl","displayText","displayIcon","buttonType","renderText","renderIcon","_active","isActive","buttonReference","PageWrapperDimensionsContext","useDimensionContext","renderChoiceListItem","openEndValue","isHorizontalDisplay","maxAnswers","isChoiceDisabled","ResetButton","onReset","defaultClearButtonText","clearButtonText","ChoiceListRenderer","isCarrouselCheckboxActive","dimension","numberOfColumns","numberOfRows","displayAsTable","displayOrder","isDisplayColumns","isDisplayWide","displayAsGrid","getRoleForQuestion","ImageSelect","CheckBox","renderChoices","shouldDisplayResetButton","CaseMode","defaultVisibleChoices","timeZone","pull","softPromptValidationResult","invisibleDefaultChoices","openEndFailedValidation","validation","createDeepEqualSelector","createShallowEqualSelector","aKeys","bKeys","aKL","interviewRef","staticallySafeEvaluator","__evaluateSafe__","getStaticallySafeEvaluator","ControlContainer","getRespondent","getQuestion","_state","getVariableNames","getQuestionnaire","getServerPage","currentPageOnServer","getLanguage","getMentionsByVariableName","getEliminationOptions","getDependenciesMentions","deps","filesByVariableName","getCachedMentions","getCachedDependenciesMentions","getCachedFiles","getRandomizedVariables","getRandomizedRows","getRandomizedColumns","getSequencedVariables","getSequencedRows","getSequencedColumns","getCachedVariables","getCachedRows","getCachedColumns","phone","email","inputAccess","sequencedRows","sequencedColumns","ControlContainerImpl","textAnswer","textAnswerMultiLine","textAnswerNumeric","textAnswerDateTime","TextAnswerRenderer","inputType","inputRef","maxLength","inputMode","questionText","isGridRenderedLabellingInputBox","useAriaLabelByForGridRenderedInputFieldQuestion","isHybridGridRenderedTextFieldTypeQuestion","classNames","inputOnBlur","inputOnFocus","accessory","hasDatePicker","questionAriaText","SelectionDirection","hasMentionsInChoices","firstMention","isKeyPrintable","onTextChanged","caseMode","nbDecimalDefine","parts","wholeNumber","decimalNumber","char","AllCaps","FirstLetterCaps","updateMention","onTextBlur","updateAnswers","displayValue","mentionValue","isValueMentioned","answers","getFilteredAnswers","showAllAnswers","minSearchLength","searchValue","shouldUpdateRespondentFields","formatNumeric","cultureInvariant","shouldFormat","isNumericAnswer","hasMentionInChoices","answerCode","inputtype","MIN_SAFE_INTEGER","MAX_SAFE_INTEGER","ChoiceListControl","regexForValidationMask","regex","replacements","validateFormat","shouldEnforceValidation","hasSelectedAnswer","drillDown","ListBoxOption","typeAhead","onDetectCharacter","onSelectOption","onSelectPreviousOption","onSelectNextOption","onSelectFirstOption","onSelectLastOption","onCloseListBox","isNonInteractive","Select","optionsRef","valueRef","selectedOptions","displayedOptions","defaultFocusedOption","setTypeAhead","toggleContainerStyle","showDropDown","scrollableWindow","scrollbarsDiv","scrollableWindowElement","scrollbarsDivElement","setProperty","lastChild","getAdjacentSelectableOption","isPrevious","Previous","adjacent","selectFirstOption","firstOption","selectLastOption","lastOption","previous","detectCharacter","nextMatchedOption","labelsIds","ariaLabelledForDivIds","listBoxChildren","useMentions","useMentionValues","useSetVariableMentions","loopIndex","useGetVariableMentions","usePickMentions","DrillDownVariable","parentVariable","onVariableChanged","getFirstOpenEndedChoice","surveyTheme","MinRequiredAnswers","MaxAllowedAnswers","varMentions","parentVarMentions","isMultiple","availableChoices","parentMentionValues","parentValue","availableOptions","emptyAnswerOption","DrillDownRenderer","drillDownMentions","HeaderType","dropdown","availableDropdowns","popupX","popupY","updateData","dropdownMentions","parentSelected","dropdowns","selectedChoices","choiceMention","OpenEndType","gridItem","GridCellMinWidth","gridItemError","gridRowHeader","gridColumnHeader","gridChoiceHeader","headerProps","scope","Column","Row","GridCellRenderer","headerClass","headerType","column","isChoiceHeader","isColumnHeader","colSpan","inputSize","errorClass","rowColor","columnColor","choiceColor","isStarRatting","attributes","questionName","columnIndex","CursorPosition","choiceHasOpenEnd","getDropdownText","getOpenEndChoice","handleSize","SliderHandleSizeSmall","SliderHandleSizeLarge","labelContainer","labelLeft","labelMiddle","labelRight","sliderContainer","slider","rail","borderStyle","borderWidth","SliderRailHeightSmall","SliderRailHeightLarge","handleContainer","handle","align","isHybridGrid","outlineStyle","outlineWidth","handleActive","handleLabelContainer","handleLabelContainerRegular","handleLabelContainerHybridGrid","handleLabelText","handleLabelTextDiscrete","handleLabelTextRegular","handleLabelTextHybridGrid","handleLabelImageContainer","handleLabelImage","handleLabelBackground","isDiscrete","handleLabelArrowBorder","borderTopColor","handleLabelArrow","tickContainer","tick","tickLabel","tickLabelRegular","percent","tickLabelHybridGrid","noAnswer","noAnswerLabel","onChoiceKeyDown","onToggleNoAnswer","Handle","domain","hasValueSet","getHandleProps","discreteValues","decimalPlaces","defaultPosition","toFixed","HandleLabel","DiscreteHandleLabel","StandardHandleLabel","DiscreteHandleLabelWithImage","HandleLabelArrow","choiceValueCode","Tick","discreteValue","discreteValueText","Label","positionalClasses","Left","Middle","Right","ClearButton","onClearAnswer","defaultText","CompoundSlider","stepValue","displayTicks","tickValues","stepDecimalPlaces","tickDecimalPlaces","hasImages","sliderSize","step","onUpdate","warnOnChanges","getRailProps","handles","ticks","NoAnswer","displayNoAnswer","hasNoAnswer","SliderRenderer","displayClearButton","middleLabel","SliderType","getDisplayResetButtonSetting","getCursorPositionSetting","getDisplayTicksSetting","getStepValueSetting","stepSetting","getTicksIntervalSetting","intervalSetting","getColumnNoAnswerLabel","parentColumn","getDisplayNoAnswerSetting","defaultChoice","getChoices","isElementDefault","clearMentions","getDefaultValue","noAnswerValue","getNoAnswerValueSetting","getNoAnswerLabel","onChangeNoAnswer","translatedTexts","entry","getSliderType","Discrete","valueDiscrete","Continuous","getStepDecimalPlaces","getTickDecimalPlaces","isValueValid","getBoundaries","isElementVisible","hasChoiceValue","getDiscreteValues","Hidden","getDefaultPosition","getTickValues","increment","reverse","starRating","MsUserSelect","starRatingSpacer","starRatingStar","splitWidth","starHeight","StarRatingRenderer","hoveredStarValue","setHoveredStarValue","setValue","starWidth","starCount","getStars","starValue","isIconHighlighted","reset","down","image","Image","isRequired","controlTypeForColumn","ColumnType","DropDownControl","SliderControl","StarRatingControl","TextBoxControl","grid","borderCollapse","borderSpacing","DynamicCss","HasGridChanges","choiceGrid","gridContainer","gridBody","borderTopStyle","borderBottomStyle","borderBottomColor","borderLeftStyle","borderLeftWidth","borderTopLeftRadius","borderLeftColor","borderRightStyle","borderRightWidth","gridRow","gridRowError","gridSummary","collapsibleGrid","collapsibleGridContainer","borderTop","collapsibleGridHeader","collapsibleGridHeaderCollapse","collapsibleGridArrow","collapsibleGridSeparator","collapsibleGridFooter","columnsWidth","RecalledLabel","translatable","translatableKey","openEndAriaId","cellId","LeftLabel","rowOrChoice","GetCellOpenEndId","openEndName","RightLabel","openEndIdForCell","Title","showColumnHeaderId","Text","ChoiceText","RowOpenEnd","isDisabledIfHidden","OpenEnd","ChoiceColumnOpenEnd","RowLeftLabel","validateRowOpenEnd","RowRightLabel","GetQuestionFieldStatus","fieldIdentifier","questionFieldStatus","stateDisabledStatus","isCollapsible","isChoiceSelected","cellQuestion","isRadioOrCheckbox","ChoiceCells","validateCell","VariableCell","shouldDisableCell","Provider","CellImage","CellItems","isNetPromoter","items","MergedCells","RowType","StandardRow","isScreenSmall","showLeftLabels","showRightLabels","errorClassName","shouldHideCell","shouldSplitColumn","choiceCellsKey","renderVariableCells","questionVariable","validateChoiceOpenEnd","renderChoiceTextCells","cellVariable","variableItem","cellVariableDefaultChoiceListLength","renderTextCells","TotalCell","getColumnRunningTotal","ariaLabelledForTotalCell","ColumnGroup","defaultWidth","defaultColumnsWidth","firstWidth","firstColumnWidth","TotalRow","showLeftLabel","StandardRowTree","standardRows","TransposedHeaderRow","TransposedCells","cells","TransposedRowTree","sequencedColumn","disabledColumns","currentCell","onShouldDisableCell","visibleChoiceMentions","maxAllowedAnswers","isCollapsibleExpanded","expandedRowsIndices","CollapsibleContent","visibleColumns","hasRightLabel","CollapsibleTitleRow","CollapsibleVariableRow","expandRow","addAccordionRef","CollapsibleRow","StandardGrid","isTransposedGrid","isChoiceGrid","CollapsibleGrid","ResponsiveChoiceGrid","testFitElementInitialWidth","setTestFitElementInitialWidth","shouldCollapse","setShouldCollapse","isImageChoiceGrid","onWindowSizeChanged","wrapper","clientWidth","windowsResizeListener","ResponsiveStarRatingGrid","setIsScreenSmall","Grid","hasColumnOpenEnd","hasRowOpenEnd","hasResetButton","Signal","accordionRefs","setOpenEndState","hasMaxAnswers","getMaxAnswers","numberOfChoices","onIsRowSelected","onExpandRow","isRowExpanded","onAddAccordionRef","adjustScrollPosition","rects","bannerHeight","container","getRowPosition","rowIndex","onShouldHideCell","variableAllMentions","isColumnChoiceSelected","onValidateRowOpenEnd","onValidateChoiceOpenEnd","openEndVariable","onValidateCell","isCellDisabled","cellHasMentions","unfilteredVariable","initializeOpenEnd","setDefaultValues","sequencedRow","firstInvalidRow","isRowInvalid","prevMentions","mentionKeys","prevMentionKeys","newMentions","openNextRow","cellErrors","currentRowVariableName","nextRow","isMentionSoftPrompt","mentionHasValue","mentionHasOpenEnd","removeHiddenOrDisabledOpenEndMentions","axisItem","GridRenderer","isRowSelected","imageAreaSelection","imageAreaSelectionSelected","imageAreaSelectionActive","ImageAreaSelectionRenderer","areaCode","imageArea","imageAreaImage","imageAreaLegend","dynamicImageAreaLegend","imageAreaLegendTitle","alignSelf","imageAreaLegendList","initialFlex","imageAreaLegendContainer","imageAreaLegendColor","imageAreaLegendText","Legend","legendLabel","legendItems","ImageAreaRenderer","displayLegend","availableAreas","onSelectArea","getAreaCurrentChoice","onSelectChoice","area","getDimension","renderMapChoice","renderMapArea","renderMap","bypassClientValidation","getRelativeSize","originalSize","fileUploadContainer","fileUploadContainerDrag","fileUploadIcon","fileUploadOptionText","fileUploadButton","fileUploadSelectedFile","fileUploadFileInfo","fileUploadFileContainer","fileUploadFileContainerInner","fileUploadFileIcon","objectFit","fileUploadFileDetails","fileUploadFileName","fileUploadFileSize","fileUploadProgress","fileUploadProgressText","flexShrink","fileUploadValidationError","ErrorColor","fileUploadValidationErrorIcon","fileUploadDeleteButton","FileUploadRenderer","browseBtn","fileName","fileSize","fileMime","fileBlob","fileProgress","onFileOpen","onFileSelection","browseFilesLabel","dragFileLabel","uploadErrorMessage","isDragOver","setIsDragOver","dragCounter","setDragCounter","isFileSelected","onFileSelected","onDragExit","counterValue","onClearFile","func","onDrop","dataTransfer","onDragEnter","onDragLeave","onDragOver","htmlFor","createObjectURL","pop","getFilePreview","source","enableNavigation","saveAs","clearFileSelection","selectedFile","mimeType","Blob","errorMessage","isFileSizeValid","isMimeTypeValid","FormData","cancelToken","cancellationTokenSource","AxiosCancellationTokenSource","post","token","onUploadProgress","lengthComputable","loaded","Error","uploadFile","serverErrorKey","setInvalidState","errorKey","delete","success","clearFile","stateObject","mimType","responseType","dragFilesLabel","fileType","fileStatus","mentionValueObject","maxSize","acceptsMimeTypes","acceptsMimeType","fileExtension","daysRange","hoursRange","minutesRange","isYearType","isMonthType","isDayType","isHourType","isMinuteType","findAnswer","minDate","isMinDateToday","toISOString","startOf","maxDate","endOf","dateValue","shouldShowCalendar","onYearChanged","onMonthChanged","onDayChanged","onHourChanged","onMinuteChanged","onDateBlur","typeBounds","Day","Hours","Minutes","lowerBound","upperBound","setMentionToDate","bindDatePicker","picker","openDatePicker","mobiscrollDisplay","calendarSize","mobiscrollControls","showButtons","dateFormatSetting","pickerDateFormat","timeFormatSetting","pickerTimeFormat","onSet","onSetDate","numberingSystem","disabledDates","weekday","ranges","dates","weekdays","isDateDisabled","isDateType","isDisabledWeekDay","valueOf","isDisabledDay","toJSDate","isDisabledRange","getNormalizedDate","normalizedDate","dateTimeFormat","setLocale","monthArray","dayArray","hourArray","minuteArray","renderYear","renderSelect","renderMonth","renderDay","renderHours","renderMinutes","renderDateTime","inputDivRef","isLowerBoundInvalid","useTime","isUpperBoundInvalid","intValue","hasMinValue","hasMaxValue","Year","Month","minRange","maxRange","group","bucket","BorderValue","makeDimension","useElementDimensions","initialElement","dimensions","setElement","vpadding","observer","MutationObserver","mutations","mutation","attributeName","visualViewport","disconnect","usePrevious","useQuestionnaire","useCustomErrorMessage","useLanguage","useAnswerRequiredValidator","useDiscreteVariadicValidator","mentionsByVariable","useMemo","choiceValues","shouldRemove","isValidMention","answeredVariables","answeredSet","Set","unansweredVariables","answerRequired","failAllVariables","useValidation","useSignal","makeCardSpring","gestureState","movement","mass","tension","friction","CardSortCard","recalledImage","recalledText","prevBounds","drag","spring","boundsChanged","interpolate","CardSortBucket","CardSortGroup","CardSortControl","insertionOrder","setInsertionOrder","bucketPadding","bucketMargin","cardSpacing","bucketWidth","cardSize","cardPadding","cardVariableMentions","getCardGroup","mentionValueForCard","unselectedCards","groups","bucketHeight","bucketsHeight","groupsHeight","containerHeight","insertionOrderSort","cardTop","groupIndex","cardLeft","cards","cardsForChoice","unselectedCardGroup","spacing","choiceIndex","cardIndex","getCurrentChoice","cx","cy","dropBucket","ScrollDirection","scrollbars","scrollTrackHorizontal","scrollThumbHorizontal","scrollThumbHorizontalActive","scrollableChild","indicator","indicatorLeft","indicatorRight","indicatorHidden","ScrollableIndicator","showIndicator","indicatorClass","defaultScrollValues","ScrollableContainer","scrollbarRef","toggleIndicators","isContainerNarrow","setShowLeftScrollIndicator","setShowRightScrollIndicator","showLeftScrollIndicator","showRightScrollIndicator","setScrollValues","scrollBy","view","scrollPage","autoHide","autoHeight","autoHeightMax","renderTrackHorizontal","trackProps","renderThumbHorizontal","thumbProps","renderView","viewProps","paginatedTable","table","tableRow","tableRowAlternate","tableRowSelectable","tableRowSelected","tableRowCheckbox","tableColumn","tableColumnFilter","tableColumnFilterInput","sortedColumn","searchToggleButton","hiddenItem","inputWithButton","gridHeaderButtons","gridSearchZone","formRow","BetweenComponents","inputField","footer","pageInfo","rowsPerPage","buttonGroup","groupButton","groupButtonActive","groupButtonDisabled","groupButtonGrid","groupButtonNoGrid","ButtonGroup","clonedChildren","child","inheritedProps","isGrid","pagination","TablePagination","tableProps","pageCount","onPageChanged","startPage","endPage","showStartEllipsis","showEndEllipsis","navigateToPage","TinySelect","TableFooter","onChangeRowsPerPage","lengthMenuText","isShowRowsPerPage","isShowPageInfo","isAddNewItem","onItemAdd","newItemLabel","isShowPagination","rowsPerPageOptions","itemsText","modalContent","modalHeader","modalTitle","modalBody","modalFooter","closeButton","ModalDialog","setWidth","onOkAction","onCancelAction","cancelActionText","okActionText","isOpen","isDisableConfirm","updateWindowDimensions","newWidth","modalStyles","overlay","ariaHideApp","shouldCloseOnOverlayClick","isSuccess","onSuccess","alert","NewItemAddForm","inputValues","setInputValues","setIsDisableConfirm","cancelNewItemText","saveNewItemText","columnNames","handleInputChange","allFieldsFilled","field","onSave","translatedName","ColumnFilter","prevValue","onChangeRef","timer","PaginatedTableRow","selectable","totalSelected","onChangeRowSelected","PaginatedTable","pageRows","pageStart","totalRows","totalFilteredRows","sortAsc","sortColumn","filterable","advancedSettings","onChangeSort","defaultRowsPerPage","texts","onChangeSearch","onChangeColumnFilter","onChangePage","onSelectedTabChange","initialRowsPerPage","prevRowsPerPage","setRowsPerPage","onChangePageRef","prevSearch","isSearchOn","setIsSearchOn","selectedTab","setSelectedTab","hideTableByDefault","isGridOn","setIsGridOn","isModalOn","setIsModalOn","hasSearchableColumns","updateSelectedTab","resetSearch","newVersion","renderSearchBar","searchBarForAllColumns","renderFilter","displayTabs","lookupTableAll","lookupTableSelected","lookupTableUnselected","hideTableHeader","lengthMenu","lookupTableAddChoiceButtonLabel","hideTablePageNavigation","emptyTable","infoFiltered","selectedItemsLimit","selectedItems","addChoicePopupTitle","cancelButtonLabel","confirmationButtonLabel","tableName","pageLength","searchableColumns","showColumnFilters","maxAnswersReached","getInternalIdVariableName","columnName","includeSelected","excludeSelected","fetchLookupTable","onFirstPageClick","changePage","onLastPageClick","onPrevPageclick","onNextPageClick","onChangeItemCount","onClickHeader","header","onClearColumnFilters","columnFilters","entries","obj","onFieldKeyPress","onSortChanged","getTableTexts","translateKey","translateGlobal","formData","formdata","addChoiceItem","newId","InternalId","shouldDisplayFilters","getSelectedInternalIds","sqlFilter","updateSqlFilter","updateSelected","getMaxAnswer","getAdvancedSettings","respondentActions","allow","access","lookupFilter","expression","idForRow","isVisibleColumn","getColumnNameByIndex","maxAnswer","mentionCount","getSelectedRowCount","softPromptChoice","columnsTranslation","tableColumns","RowNum","isAddItem","LookupTableControl","lookupTable","LookupTableImpl","findScripts","nodeValue","ExecutableHtml","scriptKey","script","supportedSingleValueInputTypes","findHtmlVariables","documentFindValue","getElementsByName","tagName","CustomHtmlControl","variableMentions","contentTemplate","previousValue","answerForMatch","customChoiceIndex","captureAnswers","addMention","elValue","addOpenEndValueByCustomChoiceIndex","firstEmptyVariableName","numericRanking","numericOptionList","numericOption","numericOptionChoiceTextHeader","numericOptionChoiceRankingHeader","numericOptionChoiceHeader","numericOptionChoiceText","numericOptionChoiceRanking","numericOptionChoiceInput","numericOptionChoiceLabel","numericOptionChoiceSelected","RankingHeader","answerHeader","labelsHeader","Header","rankings","NumericRankingRenderer","TimerLocation","TimerType","TimerAction","getSoftPromptChoiceRanking","rankingValue","getRankingValue","sanitizedValue","ranking","setNumericRankingMentions","inputIsEmpty","alreadyHasMaxAnswers","choicesCount","getMinAnswers","minAnswers","rankingsToSet","getRankingIndicesToSet","firstChoiceInRanking","maxRankingInState","maxRanking","incompleteAnswerError","hasValues","hasNonSoftPromptAnswers","hasGapsInRanking","maxRankExceedsMaxLength","hasInvalidValue","axes","getAxesVariablesToClear","prevAxes","currentAxes","prevAxesVariables","currentAxesVariables","getOpenEndVariablesToClear","prevRows","currentRows","prevOpenEnds","OpenEndVariable","currentOpenEnds","getRemovedVariableNames","columnVariablesToClear","rowVariablesToClear","openEndVariablesToClear","onColumnDisplayRunningTotal","columnRunningTotal","validateAnswerRequired","isRowRequired","variableHasMentions","hasValidNumericValue","validateColumnRunningTotal","getColumnValueSetting","hasMax","hasMin","invalidMax","invalidMin","outOfBounds","columnError","hasMentionsSet","rowHasOpenEnd","isRowOpenEndRequired","rowOpenEndVariableName","hasOpenEndMentionSet","decimals","isQuestionRequired","pipedValue","parsedValue","clickCount","moved","totalTimeVar","firstClickVar","lastClickVar","clickCountVar","secondToAction","timerType","timerAction","actionMessage","terminateSurveyActionUrl","terminateSurveyActionDisposition","terminateSurveyActionMessage","setTimerVariables","totalTime","firstClick","lastClick","onWindowClick","navBar","firstClickTime","lastClickTime","clicks","onSecondTimer","updateDisplay","onActionTimeout","AutoAdvance","secondTimerId","DisplayMessage","displayMessage","EnableNavigation","navigationEnabled","TerminateSurvey","redirectUrl","terminationSurveyAction","TerminateSurveyAction","forcedQuit","dateDiffInSeconds","startTime","trunc","diff","seconds","actionTimerId","CountDown","timeToAction","milliseconds","toUTC","TimerControl","TimerControlImpl","dynamicChoice","NetPromoterItemRenderer","acceptedKeyCodes","dynamicChoices","dynamicLabels","mobileLabel","dynamicMobileLabel","dynamicIcon","validationError","dynamicValidationError","ValidationError","messageText","customErrorKey","getSingleColumnCustomErrorMessage","getCustomErrorMessage","replaceArgs","getMessageText","fieldset","minInlineSize","questionLegend","questionTitle","TextTextAlign","wordWrap","questionContent","questionShortText","questionError","questionValidation","questionValidationFocus","dynamicQuestionValidationFocus","DebugInfo","typeClass","ErrorMessageContainer","firstErrorVariable","firstError","QuestionTitle","recalledTitle","RecalledQuestionLabel","setMinHeight","QuestionLabel","shortText","elementNameOrId","device","isIOS","os","QuestionContent","QuestionRenderer","getTitle","getText","getShortText","isTitleVisible","useFieldsetGrouping","isFieldsetGroupingQuestion","questionLabel","legendContent","NpsFeedbackQuestionSettings","NpsScoresBySegment","NetPromoterRenderer","showFeedbackQuestion","feedbackQuestion","feedbackVariable","displayQuestion","isMobileDimension","VariableDataType","npsFeedbackQuestion","oldFeedbackVariable","HasFeedbackQuestion","FeedbackVariable","generateNpsFeedbackQuestionObject","DefaultFeedbackQuestion","FeedbackAnswerRequired","PromotersScore","PromotersVariable","PromotersFeedbackQuestion","PromotersAnswerRequired","DetractorsScore","PassivesVariable","PassivesFeedbackQuestion","PassivesAnswerRequired","DetractorsVariable","DetractorsFeedbackQuestion","DetractorsAnswerRequired","getChoiceList","feedbackAnswerRequired","makeCornerStyle","cornerSize","InputBackground","signatureArea","canvas","undoButton","clearButton","signatureLine","topLeftCorner","cornerWidth","borderLeft","topRightCorner","borderRight","bottomLeftCorner","bottomRightCorner","SignatureControl","canvasRef","signatureRef","hasLines","setHasLines","setInitialValue","ratio","signatureWidth","isSvg","dataType","Base64","toData","prevCanvasWidth","penColor","minDistance","onEnd","toDataURL","pointGroup","points","point","resizeData","fromData","bucketOrigin","bucketOriginNoDrag","bucketDestination","cardNoDrag","DragDropCard","onDrag","setCardRef","isDragAllowed","isLegacyBrowser","CARD_SPACING","DragDropBucket","origin","isCursorNoDrag","DragDropControl","dragging","setDragging","setDropBucket","dropIndex","setDropIndex","imageRatioByCard","setImageRatioByCard","cardsRefs","setCardsRefs","getCardHeight","getCardRefHeight","originChoices","destinationChoices","onChoiceDrag","getDropIndex","originBucketHeight","destinationBucketHeight","getCardTop","list","fl","destinationLeft","BUCKET_DIVIDER_SIZE","opt","validators","composeValidators","useDiscreteAnswerValidator","naturalWidth","naturalHeight","onChoiceDrop","refs","selectedWord","selectedCategory0","selectedCategory1","selectedCategory2","selectedCategory3","selectedCategory4","selectedCategory5","saveButton","saveButtonDisabled","cancelButton","cancelButtonHover","deleteButton","withFormatDisableUserSelection","flexFlow","WebkitTouchCallout","WebkitUserSelect","KhtmlUserSelect","MozUserSelect","msUserSelect","withoutFormatDisableUserSelection","withoutFormatButtonWrapper","choiceTextTextHighlighter","choiceTextHighlighter","FontFace","choiceSelectedTextHighlighter","choiceHoverTextHighlighter","choiceActiveTextHighlighter","ButtonChoiceTextHighlighter","ChoiceListItemTextHighlighterRenderer","highlightedWordsByCategories","selectedChoiceModels","highlightedWords","duplicateWords","toggleIsCategorySelected","onDeleteHighlight","highlightedWord","selectedChoiceModel","choiceModel","ChoiceListTextHighlighterRenderer","isChoiceAlreadyHighlighted","renderChoiceListItemTextHighlighter","TextHighlighterRenderer","highlightFormat","choicePositionIndex","onHighlight","showModal","onCancelModal","modalPositions","showDeleteButton","handleMouseDown","handleMouseMove","selectedButtons","buttonsRef","modalRef","handleTouchStart","handleTouchMove","handleTouchEnd","questionTexts","FormatTemplate","categoriesColors","category0Color","category1Color","category2Color","category3Color","category4Color","category5Color","VariableToChoiceModel","mapVariablesToChoices","isMobilePreview","responsePopUpTitle","responsePopUpText","responsePopUpDelete","getCurrentHighlightedStyle","highlightColor","getClassName","HighlightButton","getOpenEndFromMention","setStateFromMentions","touchEvent","divStyles","onMouseEnter","onMouseLeave","onTouchStart","bordeRadius","onTouchMove","onTouchEnd","domNode","attribs","mappedchoicecode","onRequestClose","firstOpenEndValue","getOpenEndValue","onCloseModal","isCategorySelected","isHighlightedWordsModified","previousHighlightedWordsByCategories","isOpenEndValueModified","previousOpenEndValue","onSaveHighlight","shouldSave","updatedHistory","historyOfHighlighted","updatedHighlightedWordsByCategories","updatedOpenEndValue","highlightedCollection","isDeleting","getMentionsFromCurrentMatrix","filteredMentions","model","getWordPosition","positionStr","touch","touches","initialButton","elementFromPoint","HTMLSpanElement","currentButton","currentButtonIndex","startButton","startButtonIndex","startIndex","endIndex","buttonPosition","hasAttribute","selectedButtonIndices","finalButtonIndex","isMouseDown","getButtonsInRange","handleMouseUp","handleOutsideButtonsClick","targetElement","checkIfSubSelectionByMentions","mentionList","isChoiceAlreadyHighlightedArray","modalPositionId","selectedChoiceValue","freeSelectionEnabled","isChoiceHighlighted","subsetSelection","highlightedSelection","previousButtons","getMatrixIdByChoiceValue","currentChoiceValue","choiceGroupIndex","highlightedGroup","choiceOpenEndValue","removeMentionAcrossMatrices","valueToRemove","newMatrixId","matrixId","currentOpenEndValue","saveCurrentHighlight","newHighlightedSelection","getNumberOfHighlightedChoices","arr","generateHighlightedWords","generateHighlightedWordsByCategories","numberOfHighlightedChoices","highlightedWordsModelList","HeatMapRenderer","onSelectDot","renderHeatMapPreview","onSelectedHeatMapArea","onSelectedHeatMapAreaOnDot","totalVal","selectedMentions","dataPoint","divIndex","dataPoints","gap","isMobileView","isAboveChoiceNavigation","statementsContainer","scrollBehavior","MOBILE_VIEW_GAP","DESKTOP_VIEW_GAP","statement","calDimension","ShowStatementBackgroundSettings","CustomBorderValue","StatementBorderRadius","isActiveItem","isShowLottieGesture","DESKTOP_DIMENSIONS","StatementBackgroundAlpha","choiceAndNavigationContainer","navigationButtonsPanel","navigationButton","bulletNavigationPanel","Statement","statementWidth","contentResponsivenessOption","imageWrapperRef","imageRef","textContainerRef","forceUpdateKey","wrapperContainer","responsiveRender","resizeFont","resizeCarousel","getFontSize","isStatementHasContent","originalWidth","isSmallImage","imageWidth","containerWidth","font","DEFAULT_FONT_SIZE","textWidth","measureText","touchStartX","setTouchStartX","touchEndX","setTouchEndX","handleSwipe","htmlContent","WebkitLineClamp","WebkitBoxOrient","WrapperWithNavigationButtons","isPrevBtnActive","isNextBtnActive","handleNavigationButtonClick","backButtonText","nextButtonText","isNumberNavigation","prevButtonRef","nextButtonRef","isKeyboardNavigation","CounterNavigation","totalLength","BulletNavigation","showFirstEllipse","itemsToDisplay","showLastEllipse","transformValue","setTransformValue","newTransformValue","activeItem","answeredItem","stroke","strokeWidth","CarrouselControl","questionHasAtleastOneVariable","NavigationStyle","advanceAutomatically","choiceListAnswerType","activeStatementMentionsCount","deviceWidth","deviceHeight","backButtonAriaLabelText","nextButtonAriaLabelText","NavigationDisplay","isBelowChoiceNavigation","statementValidation","setStatementValidationCheck","directionSaved","setDirection","errorMonitor","prevErrorMonitorRef","activeVariable","isCarouselVisible","setIsCarouselVisible","isFirstTimeRender","setIsFirstTimeRender","showLottieGesture","setShowLottieGesture","questionContainerHeight","IntersectionObserver","isIntersecting","root","threshold","variableHasChoices","minRequiredAnswers","getMinRequiredAnswers","activeStatementHasRequiredMentions","varInfo","scrollHandler","questionValidationError","canLoop","isPrev","isAfterSelectionAction","notRequiredButMinChoiceIsDefinedValidation","onAfterCarouselChoiceSelection","commonProps","itemWidth","noOfSides","lottie","onValidate","validateControl","hasSoftPromptError","questionReady","isNavigationDisabled","differentQuestion","nextQuestion","getControlType","AutoCompleteControl","GridControl","ImageAreaControl","NetPromoterControl","RunningTotalControl","NumericRankingControl","DateTimeControl","DrillDownControl","FileUploadControl","NullControl","TextHighlighterControl","HeatMapControl","UndefinedControl","getControl","renderControl","InputFocusRenderer","isFormInputFocused","questionToFocus","inputToFocus","scrollToFirstQuestion","validationByQuestion","Question","__isQuestionVisible__","pageQuestion","getIsFormInputFocused","getValidationForQuestion","_validation","QuestionIsMultiVariableType","getValidationByQuestion","QuestionListContainer","QuestionListContainerImpl","BottomNavigationPosition","navigationLeft","navigationCenter","navigationRight","navigationButtonContainer","navigationPlaceHolder","Shortcut","shortcut","getAlignmentClass","placement","displayBothTopBottom","NavigationButton","navButtonProps","types","visibleTypes","placeholderWhenHidden","isSmallScreen","themeButtonKey","showText","showIcon","Back","NavigationBarRenderer","shortcuts","onNavigateShortcut","displayShortcuts","hasPreviousPage","hasNextPage","hideBackButton","BackButtonVisible","QuitButtonVisible","Quit","SubmitButtonVisible","Submit","getButtons","buttonAlignments","BackButtonPlacement","BackButtonDisplayBothTopBottom","SubmitButtonPlacement","SubmitButtonDisplayBothTopBottom","NextButtonPlacement","NextButtonDisplayBothTopBottom","QuitButtonPlacement","QuitButtonDisplayBothTopBottom","getButtonAlignment","submitPosition","buttonsSize","renderButtons","alignment","navigationType","buttonTypes","leftButton","centerButton","rightButton","isRender","isRenderShortCuts","ShortcutExitToType","Navigation","NavigationContainer","NavigationContainerImpl","ProgressBarHeight","ProgressBarType","bar","innerValue","ProgressBarFontSize","innerFillValue","bottomRightValue","bottomValue","floatingValue","floatingValueHover","floatingValueArrowBorder","floatingValueArrow","Progress","boundedValue","progressBarRef","progressBarWidth","setProgressBarWidth","setIsMobilePreview","textPosition","ProgressBarShowValue","progressTextPosition","progressBarPosition","errorContainer","ValidationSummary","PageSeparatorsSpacing","PageSeparatorsWidth","pageWrapper","TopNavigationPosition","PageWrapperBackground","PageWrapperMaxWidth","dynamicPageWrapper","pageContent","pageMessage","pageHeader","pageHeaderLogo","LogoAlign","pageHeaderContent","pageFooter","legacyBrowserWarningFloating","legacyBrowserWarningInline","legacyBrowserWarningIconContainer","legacyBrowserWarningIconBackground","legacyBrowserWarningContent","legacyBrowserWarningEmphasis","legacyBrowserWarningButton","backlinkContainer","backlink","skiplinkContainer","topNavigation","PageHeader","languageSelector","CULTURE_INFO","iv","nativeName","aa","af","agq","ak","am","isRightToLeft","arn","asa","ast","az","ba","bas","bem","bez","bin","bm","bn","bo","br","brx","bs","byn","cgg","chr","co","cu","dav","dje","dsb","dua","dv","dyo","dz","ebu","eo","eu","ewo","ff","fil","fo","fur","fy","ga","gd","gl","gn","gsw","gu","guz","gv","ha","haw","hsb","hy","ia","ibb","ig","ii","iu","jgo","jmc","jv","ka","kab","kam","kde","kea","khq","ki","kk","kkj","kl","kln","km","kn","kok","kr","ks","ksb","ksf","ksh","ku","kw","ky","la","lag","lb","lg","lkt","lo","lrc","lu","luo","luy","lv","mas","mer","mfe","mg","mgh","mgo","mi","mk","ml","mn","mni","moh","mr","ms","mua","my","mzn","naq","nb","nd","nmg","nn","nnh","nqo","nr","nso","nus","nyn","oc","om","pa","pap","prg","prs","ps","quc","quz","rm","rn","rof","rw","rwk","sa","sah","saq","sbp","sd","seh","ses","sg","shi","si","sl","sma","smj","smn","sms","sn","so","sq","ss","ssy","sw","syr","ta","teo","tg","ti","tig","tk","tn","ts","twq","tzm","ug","uk","ur","uz","vai","vo","vun","wae","wal","wo","xh","xog","yav","yi","yo","zgh","zu","yue","mww","ikt","yua","kmr","lzh","ab","an","av","ay","bh","bi","ch","cr","cv","fj","ho","hz","ik","io","kg","kj","kv","li","mh","mo","na","ng","nv","ny","oj","pi","qu","sc","sh","sm","su","tl","tw","ty","wa","za","TopNavigation","LanguageSelectorVisible","ViewResponsesButtonVisible","LanguageSelectorLabelActive","longestLanguageNameCode","longestLanguageNameLength","viewResponsesText","languageSelectorTranslatedText","languageSelectorLabel","win","Page","pageRef","Skiplink","PageWrapper","wrapperRef","ErrorMessage","PageMessage","Logo","logo","LogoDescription","PageFooter","LegacyBrowserWarning","buttonText","sentences","firstSentence","remainingSentences","Backlink","rel","PageContent","showLegacyBrowserWarning","ENABLE_LEGACY_BROWSER_WARNING","ProgressBarDisplay","ProgressBarVisible","topNavigationVisible","showProgress","showProgressTop","showProgressBottom","isProgressFloating","enableBacklink","EnableBacklink","PageRenderer","validationCallback","exitSurvey","dispositionCode","ev","DISABLE_CLIENT_VALIDATION","BranchTo","isQuitButton","resizeImages","setViewportContent","onresize","appVersion","viewport","getElementsByTagName","imgElement","onPageReady","prevPage","PageContainer","PageContainerImpl","asNumber","asString","asAny","advCompiled","Grammar","basicCompiled","clearCache","cache","INITIAL_CACHE_STATE","resultById","resultIdsByVariableName","resultIdByKey","invalidateCache","cacheEvaluation","resultId","findCachedEvaluation","parserState","simple","openingBrackets","closingBrackets","lastIndexOf","compiled","parser","Parser","feed","warn","__evaluateUnsafe__","getInterview","keyForExpression","didParseVariable","findVariables","keywords","previewQuestion","displayLogicEvaluation","skipLogicEvaluation","__isBlockVisible__","TRUE","INVALID","getKeywords","fn_mlb","true","false","validateInput","op","NaN","setVariablesValues","getValidNumber","isInvalid","validateOutput","isFinite","equals","algebraic","vec","v3","num","lower","upper","random","dividend","divisor","sqrt","log2","log10","days","getQuota","quotas","stratumId","quota","objective","frequency","online","isStratumAvailable","useOnlines","stratum","completes","getAvailableStratum","strata","missingCompletes","lastMissingCompletes","hasAvailableStratum","allStrataAvailable","availStrata","getRespondentStrata","respondentStrata","maxLoop","srcVar","dstVar","srcMentions","maxLoopSize","currentLoop","srcMention","moo","compile","lineBreaks","string","epoch","operator","explode","getRow","useVarName","varName","firstVariableWithChoices","numeric","symbol","evaluateRecalls","dependencies","evaluationStack","selectInterview","recall","selectRecall","recalledTextId","recalledTextIdByKey","pickBy","recalledTextIdsByVariableName","pipingRegex","recallResult","ReservedBoundsContext","ReservedBoundsContextProvider","idRef","reservedBounds","setReservedBounds","maxReservedBounds","contextValue","reserveBounds","releaseBounds","translated","BorderStyle","BorderThickness","TabBackground","DefaultColorsKeys","_result","idx","itemIndex","addOpenEndValueByChoiceIndex","predicate","mapValues","mapOpenEnds","LogicType","HybridGrid","RunningTotal","ChoiceGrid","ImageChoiceGrid","StarRatingGrid","isChoiceList","RadioButton","ImageSelector","isImage","ImageAreaEvaluator","ImageAreaSelector","QuotaStatus","RandomizationPattern","convertToSurveyMode","Test","Normal","Simulation","Preview","SurveyQuestionnaireModality","TerminationAction","createElementWithProperties","pairs","properties","createElementWithSettings","sets","createSkippable","createTranslatable","_v","createLogic","OperatorType","createLookupTableFilter","conditions","syntax","parseCondition","formatCondition","isList","Contains","Equals","DifferentThan","LessThan","MoreThan","LessThanOrEqual","MoreThanOrEqual","DoesNotContain","Empty","NotEmpty","In","formatValueList","NotIn","getColumnName","createSelection","priority","score","createAction","isPreload","selections","selectionVariables","getActionVariables","getAllDisplayLogicVariables","createQuestion","choiceLists","elementName","choiceListId","rowOpenEndDisplayLogic","choiceListRandomization","maxMention","createVariable","variableIds","createRow","isPageBreak","variableRandomization","rowRandomization","columnRandomization","createColumn","endsWith","getSettingVariables","areas","lookupColumns","eliminateChoiceVariables","getVariableDependencies","createQuestionnaire","cl","createChoice","_d","randomizations","createTheme","createBlock","defaultLanguage","createShortcut","surveyProperties","isPreview","javascript","head","createRandomization","pattern","createRandomizationBounds","seedAdjust","groupCount","synchronizedQuestion","synchronizedWithId","names","hasNames","startName","endName","createRespondent","respondentId","isNew","seed","pin","ignoreForcedQuit","sessionStartTime","prevSessionFirstAnsweredQuestion","firstAnsweredQuestion","prevSessionLastAnsweredQuestion","lastAnsweredQuestion","appointmentDate","offlineUserId","offlineUserName","ipAddress","panelistId","sampleId","panelistPoints","accessCount","getExitUrl","isAutoPageBreak","getMaxLoopSize","getAllCurrentPageQuestions","currentBlock","foundPage","getChoiceRanking","isHeader","shouldSetSoftPrompt","compareChoices","navigationResultChoice","indexAdjust","navigationResultChoiceIndex","isRowMergeCells","isHeaderRow","getUseChoiceTexts","shouldShowRowLeftLabel","isRowMergeLeftLabel","shouldShowRowRightLabel","isRowMergeRightLabel","isSplitColumn","variableForCell","openEndVariableName","getColumnCount","columnCount","getVariablesCount","isSingleChoice","autoAdvanceCarouselQuestion","carouselIsCheckBoxType","hasMaxAllowedAnswers","hasRightLabels","entitiesWithLabels","entity","hasLeftLabels","choiceNameForCell","controlTypes","questionTypeForColumn","getCellVariableDependencies","getRowVariableDependencies","getColumnVariableDependencies","questionForCell","getCellVariables","openEndVarName","openEndVar","getQuestionVariableWithName","rowHasError","rowVariables","cellHasError","getPropertyString","hasProperty","getPropertyBoolean","trueValue","getPropertyEnum","isImageAreaEvaluator","shouldSetSoftPromptCode","shouldSetDefaultChoice","isQuestionSoftPrompt","isAutoAdvanceCompatible","isAutoAdvanceExcluded","includeTime","dateFromValue","locale","newValue","charCodeAt","getChoiceWithValue","getChoiceWithPredicate","shouldAutoFormat","defaultSize","getActiveQuesions","getSoftPromptCode","getChoiceListDisplayType","AutoAdvanceMode","getDefaultLanguage","shouldExecuteResumeActions","isAutoAdvanceEnabled","autoAdvanceMode","ByBlock","Enabled","isExpired","startDateString","endDateString","startDate","endDate","getTerminationOptions","terminationType","terminationAction","getBlock","getBlockWithVariable","getQuestionWithVariable","getBlockWithQuestion","getQuestionWithName","getQuestionWithId","getVariableWithName","getQuestionTypeByVariableName","getVariableRange","includeFirst","allQuestions","startQuestion","endQuestionIndex","questionsAndVariablesNames","allVariables","getCompletionQuestion","isInputRequired","getCoordinates","latitude","longitude","hasSetting","getSettingString","getSettingNumber","getSettingBoolean","trueValues","getSettingEnum","setDefaultLanguage","translate","translatedText","isQuestionValidatedServerSide","validationErrorConverter","navigationErrorResult","shouldIgnoreValidationErrors","isErrorNew","isVariableValidatedServerSide","currentPageServerSideValidatedQuestions","getDefaultChoices","getChoice","choiceCode","toCode","evaluateProperty","property","parameters","toImage","mentionId","RecalledValue","ChoiceRecalledValue","cIndex","openEndMention","flat","getDuration","hours","minutes","padStart","FORMAT_REGEX_VALUE","VARIABLE_PROPERTY","QUESTION_VARIABLE","SYSTEM_VARIABLE","getProperties","param","recallSystemMatch","DateRecalledValue","TimeRecalledValue","TimeSpanRecalledValue","DayRecalledValue","SystemRecalledValue","recallQuestionMatch","DateTimeRecalledValue","AnswerRecalledValue","evaluateRecalledValue","evaluateVariable","identifyVariables","uniqueVariables","tricklingListeners","capturingListeners","configDefaults","messages","mobileMode","simulatedRespondent","simulatedDevice","browser","getListeners","listeners","lib","LIB_NAME","PublicApi","TAG","setVariableMentions","evaluate","showDebugInfo","validatePage","branchTo","nextPage","quit","onQuestionReady","onValidatePage","onSetVariableMentions","onBranchTo","onNextPage","onPreviousPage","onQuit","setAppointment","appointment","setEmail","setPhone","setTimeZone","setLoopRow","apiUrl","survey","containerHost","previewQuestionId","once","isDynamicCssChanged","previewTheme","api","listenerWrapper","evt","stoppedPropagation","stoppedImmediatePropagation","stopImmediatePropagation","applyRandomization","randomization","baseSeed","flags","randomizer","randomizedRange","groupSize","startingElement","getRandomization","synchronizedWithIndex","rand","randomizeQuestions","pageBreakIndices","getRandomizedBlocks","getRandomizedQuestionIdByName","getRandomizedQuestionIdByVariable","getSynchronizedRandomization","randomizationSelector","randomizeChoiceList","getListRandomization","randomizeVariables","hasOneVariablePerCell","randomized","getVariableRandomization","serverRandomizedAxis","randomizeColumns","getColumnRandomization","randomizeRows","getRowRandomization","fixedRows","MAX_VALUE","MIN_VALUE","getRandomInt","mj","mSeed","seedArray","subtraction","inext","inextp","sample","internalSample","retVal","locINext","locINextp","getSampleForLargeRange","AUDIO_RECORDING_START","AUDIO_RECORDING_STOP","CHANGE_LANGUAGE","CACHE_RECALL","CONNECTION_CONNECTED","CONNECTION_DISCONNECTED","CONNECTION_ERROR","CONNECTION_PROGRESS","CONNECTION_START","DEBUG_DISABLED","DEBUG_ENABLED","DEBUG_INFO_ENABLED","DEBUG_INFO_DISABLED","DEVICE_CHANGED","FILE_UPLOAD_CLEARED","FILE_UPLOAD_COMPLETED","FILE_UPLOAD_FAILED","FILE_UPLOAD_PROGRESS","FILE_UPLOAD_STARTED","LOG_ERROR","LOOKUP_TABLE_FETCH","LOOKUP_TABLE_RECEIVE","MOBILE_PREVIEW_DISABLED","MOBILE_PREVIEW_ENABLED","MOBILE_PREVIEW_TOGGLE","NAVIGATION_BRANCH_TO","NAVIGATION_COMPLETION_QUESTION_REACHED","NAVIGATION_DISPLAY_MESSAGE","NAVIGATION_PAGE_READY","NAVIGATION_NEXT_PAGE","NAVIGATION_PREVIOUS_PAGE","NAVIGATION_PREVIEW_QUESTION","NAVIGATION_QUIT","NAVIGATION_RESET","NAVIGATION_SHORTCUT","OPEN_UPLOADED_FILE","PREVIEW_THEME","QUESTIONNAIRE_CHANGED","QUOTAS_CHANGED","QUOTAS_CLOSE_STRATUM","QUOTAS_CLOSE_USER_STRATUM","RESPONDENT_CHANGED","RESPONDENT_SET_APPOINTMENT","RESPONDENT_SET_EMAIL","RESPONDENT_SET_PHONE","RESPONDENT_SET_TIMEZONE","RESPONDENT_SET_DISPOSITIONCODE","SET_DISPLAY_IN_THEME_EDITOR","SET_LOOP_ROW","SET_NAVIGATION_ENABLED","SET_PAGE_MESSAGES_ENABLED","SET_RECALL_MODE","SET_SURVEY_MODE","SET_VARIABLE_MENTIONS","SET_MULTIPLE_VARIABLES_MENTIONS","VALIDATION_CLEAR","VALIDATION_SET_RESULT","VALIDATION_SET_RESULT_NEXT","RESET_MENTIONS","SERVER_PAGE_CHANGED","SET_SERVER_TRACKED_ANSWERS","INVALIDATE_CLIENT_VARIABLES","USE_CLIENT_VALIDATION","LOAD_ANSWERS_DTO","REFRESH_CURRENT_PAGE_QUESTIONS","SET_IS_INPUT_FOCUSED","VALIDATE_PAGE_ON_SERVER","SET_COORDINATES","HIDE_ACCESSIBILITY_PANEL","UPDATE_QUESTION_FIELD_STATUS","DEFAULT_FOCUS_STATUS","ENABLE_MAPPED_VARIABLE_FIELD_STATUS","audioRecordingStart","audioRecordingStop","cacheRecall","changeLanguage","connectionStart","connectionConnected","connected","connectionDisconnected","reason","debugEnabled","debugInfoDisabled","debugInfoEnabled","setDisplayInThemeEditor","setSurveyMode","deviceChanged","fileUploadStarted","fileUploadCleared","fileUploadCompleted","fileUploadFailed","getFileFailed","lookupTableFetch","tableId","addChoiceItemFailed","lookupTableReceive","requestId","mobilePreviewToggle","navigationCompletionQuestionReached","navigationBranchTo","navigationNextPage","navigationPreviousPage","navigationPageReady","navigationPreviewQuestion","navigationDisplayMessage","navigationQuit","navigationReset","clearAnswers","navigationShortcut","exitToNextQuestion","quotasChanged","quotasCloseStratum","quotasCloseUserStratum","setNavigationEnabled","enabled","respondentChanged","serverPageChanged","respondentSetAppointment","respondentSetEmail","respondentSetPhone","respondentSetTimeZone","respondentSetDispositionCode","setMultipleVariablesMentions","questionnaireChanged","setPageMessagesEnabled","isPageMessageEnabled","validationClear","includeNewValidationResults","keepSoftPromptError","removeValidationForVariables","validationSetResult","validationSetResultNext","resetMentions","setEnableLegacyBrowserWarning","enableWarning","setServerTrackedAnswers","invalidateClientVariables","loadAnswersDto","refreshCurrentPageQuestions","setIsFormFocused","isInputFocused","setCoordinates","setHideAccessibilityPanel","setCarrouselActiveVariableIndex","setQuestionFieldStatus","fieldIdentifiers","checkAndSetToState","setDefaultFocusStatus","enableAllMappedVariablesFieldStatus","createQuota","userStatus","todo","userObjective","userFrequency","QuotaMetOrCloseActions","trackEvent","rg4js","lastScriptNodeIndex","makeApiInterface","method","path","onDone","retry","disableNavigation","performRequest","xhr","responseText","isLoading","statusText","tokenElement","setRequestHeader","json","put","del","answersDto","interviewVariables","getCurrentPageMentions","matrices","currentPageVariables","getPageVariables","_m","pageVariable","toLocaleLowerCase","ApiBroadcaster","fileUploadOpen","openUploadedFile","encodeURI","resume","closedStrata","discard","encodeURIComponent","back","variablesWithErrors","currentPageMatrixIndex","newVariableState","navigateTo","branchOptions","completionQuestion","hasCompletionQuestion","output","completionQuestionReached","matrixByBlockName","loopByBlockName","executeActionForResult","createDispositionCode","termination","apiConnector","getReloadSurveyUrl","replaceState","isSimulated","invalidateCacheArg","surveyVersion","surveyTitle","preventIndexing","noindex","nofollow","customHead","Promise","resolve","nodeScriptReplace","getNewSurveyFromApi","quotasReducer","evaluateLazy","objectiveSurpassed","halfOpen","userObjectiveSurpassed","userHalfOpen","closeStrata","DisplayMessageAndExit","RedirectToUrl","scriptTagName","replaceChild","nodeScriptClone","childNode","attribute","async","surveyId","geolocation","getCurrentPosition","coords","zoneName","cookieEnabled","ValueType","mentionsBackup","respondentInfoBackup","getCurrentPage","getDisplayedQuestions","shouldExecuteAction","prevNavState","navState","isRespondentResumed","questionExists","dispatchAction","transformAction","surveyResult","mobileAudioRecording","valueType","Formula","computeVariable","Randomizer","selectionValues","groupedSelectionVariables","computeSelections","setloopRow","resumeQuestion","resumeLastSession","dispatchQuestionActions","questionActions","skipAdvancedActions","executePostAnswerActions","executeSideEffects","metaData","getResult","browserLanguageVar","ipAddressVar","javaSupportVar","operatingSystemVar","refererVar","userAgentVar","javaEnabled","executePreLoadActions","createInfiniteLoopValidator","pageQuestionIndices","questionIndices","stackContainsPage","navigateToFirstValidPage","loopValidator","pageReady","findQuestion","getStartQuestion","startBlock","startMatrix","displayedQuestions","lastQuestion","didPassLoop","isCurrentBlock","navigateToStartQuestion","RecallMode","INITIAL_STATE","connectionReducer","mentionsToClean","destinationQuestion","endBlock","variableBlock","isMentionOnRange","getMentionsToClean","variablesSliceReducer","$PNAME","SystemVariableModel","$A","$X","$F","currentLoopByBlockName","surveyChanged","$DEVICE","$DEVICEOS","$DEVICEOSVERSION","$DEVICEBROWSER","$DEVICEBROWSERVERSION","$Q","$PIN","$EMAIL","$PHONE","$L","$OFFLINEUSER","$PANELISTID","$SAMPLEID","$PANELISTPOINTS","respondentLanguageChanged","pageChanged","serverSideTrackedAnswers","invalidateClientSideVariables","loadMatrices","hasQuestions","nextState","exitTo","randomizedQuestionIdByName","randomizedQuestionIdByVariable","interviewReducer","questionnaireSliceReducer","terminationOptions","defaultMessage","assign","updateCurrentPageQuestions","setEnabled","branchToOptions","isRelativeBranching","isBlockBranching","branchState","dest","navigatePreviewQuestion","tmpState","navigationReducer","isShortcut","respondentSliceReducer","deviceSliceReducer","oldMentionsByVariableName","newMentionsByVariableName","questionFieldStatusReducer","variablesState","omitVariablesErrors","variablesWithSoftPromptError","validationSliceReducer","languageSliceReducer","navigationState","newTheme","themeSliceReducer","carrouselReducer","applicationReducer","errorsReducer","lookupTableReducer","recallModeReducer","mobilePreviewReducer","filesReducer","defaultFocusStatusReducer","recallMode","isPageMessagesEnabled","isPageMessagesEnabledReducer","isFormInputFocusedReducer","rootReducer","recallReducer","getCurrentBlock","blockWillChange","getCurrentQuestion","getBlockCurrentLoop","getCurrentLoop","hasNextBlock","hasNextLoop","hasNextQuestion","isFirstPage","isLastPage","getVariableRow","nextBlock","nextLoop","getRandomizedQuestionWithName","branchToAbsolute","branchToRelative","originQuestionName","branchToBlock","updateNavigationButtons","setPage","updateHistory","pageIdentifier","questionRange","getPageIdentifier","paddingSize","suffix","logPageSeparator","buildPageFromServer","getBlockIndexById","blockId","getServerCurrentQuestions","buildPage","blocksWithProgress","getProgressBarStartQuestion","endQuestion","getProgressBarEndQuestion","getProgressBarBlocks","totalQuestions","getProgress","currentPageVariableDependencies","decrementIfResumed","calculateStrata","closeStratum","closeUserStratum","getMentionsCount","clearCurrentPageMentions","updatedMentionsByVariableName","createSystemVariables","$D","$UTCDATE","$UTCTIME","$H","$J","$T","$GEOLOCATION","$Z","$ROW","$R","setVariableMention","reducerStates","changeReducerStateForVariableCells","disableColumnsList","updateStatusForHybridQuestionMapppedVariableCells","setDisabledStatesForVariables","updateStateAfterMentionsComparison","mapperVariable","identifierId","getFilteredRowsForQuestion","getDisabledColumnsForRowBasedOnChoiceSelected","currentLoopIdentifier","fieldNewStatus","checkAndPushIntoListForStateUpdation","getStatusForEntireRowVariableOnSelectionChange","updateFieldStatusAndMappedFieldOnSelection","fieldKey","currentVariableMentions","getSingleRow","hideGridVariableCall","actionType","enableMappedVariableFieldStatus","enableMappedDisabledFields","filteredRow","reducerState","disableListForCurrentVariable","currentLoopVariableId","fieldIsDisabledInState","enableStatusForDisabledFieldWhichAreReferenced","findMentionsToResetForVariableNames","oldVariableMentions","newVariableMentions","changeStatusForMentions","newMention","oldMention","mention2","mention1","variablesCellStatus","newStatus","getAllRows","loopRow","refrencedFieldIdentifier","fielStatusIsChanged","updateFieldStatusForAllVariablesInAxis","checkForNewMentions","changeStateForMentions","findChangedMentionsForVariableNames","currentDisableList","indexToUpdate","indices","recalledTextById","cacheKey","getRecall","invalidateVariables","getLoopInvalidatedVariables","questionsToClean","TIME_VARS","generateId","getAutoCleanVariables","selectNavigationMessage","selectNavigationDisabled","makeMentionsSelector","strvar","str","limit","mentionsToString","logTypes","OS","OSVersion","variableState","beforeMentions","afterMentions","MentionBuilder","middleware","connect","setPageMessages","fileUploadSelected","voxcoEventListener","voxco","voxcoEventDispatcher","getEvent","safeDump","skipInvalid","logAction","enhancer","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","__getStore__","allowUnsafe","interviewSelector","cachedResult","evaluateIsVisible","shouldSkip","shouldDisplay","evaluateIfChoiceVisible","evaluateIsVariableVisible","evaluateIsQuestionVisible","previewQuestionSelector","useThunkDispatch","TableRowDefaultTabBackground","TableRowActiveTab","TableRowDefaultTabFillPrimaryColor","TableRowDefaultTabFillPrimaryColorPercent","TableRowDefaultTabFillSecondaryColor","TableRowDefaultTabFillSecondaryColorPercent","TableRowBorderStyle","TableRowBorderThickness","TableRowBorderColor","TableRowBorderColorPercent","TableRowHoverTabColor","TableRowHoverTabColorPercent","TableRowSelectedTabColor","TableRowSelectedTabColorPercent","TableHeaderFillColor","TableHeaderFillColorPercent","TableHeaderBorderStyle","TableHeaderBorderThickness","TableHeaderBorderColor","TableHeaderBorderColorPercent","BackButtonIcon","BackButtonIconOnHover","BackButtonType","ChoiceListIconAlignment","FieldBorderValue","FontSize","ForegroundColorLight","InputMaxWidths","XSmall","Small","Medium","Large","InputMinWidths","Full","NextButtonIcon","NextButtonIconOnHover","NextButtonType","NeutralDarkColor","NeutralLightColor","BlackColor","WhiteColor","NoColor","QuitButtonIcon","QuitButtonIconOnHover","QuitButtonType","SubmitButtonIcon","SubmitButtonIconOnHover","SubmitButtonType","ContentResponsivenessOption","LanguageSelectorPlacement","ViewResponsesButtonPlacement","CarrouselCornerBorderColor","CarrouselCornerBorderColorPercent","cssColorMatcher","alpha","intensity","alphaByPercentage","intensityPercentage","newR","newG","newB","adjustColorIntensity","darken","brighten","foregroundColor","rgb","isDark","wrapperBackgroundColor","bgColor","pageWrapperAlpha","pageWrapperColor","compoundBackgroundColor","buttonBackgroundColor","controlBackgroundColor","inputBackgroundColor","hex","inputWidth","sizeKey","inputMinWidth","inputMaxWidth","getFontWeight","fontVariant","defaultWeight","extractFontWeight","getFontStyle","getLineHeight","defaultHeight","baseFontSize","getRowCornerBorderRadius","getTextAlign","getButtonChoiceMargin","getSpacing","progressBarValueColor","progressBarVerticalPosition","oldValue","delimiters","thousands","decimal","abbreviations","thousand","million","billion","trillion","ordinal","currency","hasLocale","getNumeral","isExponential","autoFormatting","getFixedValue","numeralValue","formatted","toPrecision","getNumberOfDecimal","recallNumber","createCssForGridBorder","dynamicCss","getBorder","createCssForGridHeader","generateGridRowBackgroundCss","primaryBgColor","secondaryBgColor","hoverTabColor","hoverBgColor","selectedBgColor","primaryColor","secondaryColor","hoverColor","generateTableRowColors","primaryBg","secondaryBg","hoverBg","selectedBg","isDuoChrome","hoverStyles","createCssForGridDataRowBackground","generateGridHeaderCss","generateTableHeaderColors","createCssForGridHeaderBackground","generateCSS","settingCssHashKey","settingCssKey","settingsStr","hash","storedCss","cssForComponents","generateGridCss","hashKey","cssKey","storeCss","applyCSS","dynamicStyleId","styleElement","blurEvent","getContainerDiv","removeHtmlTags","isNullOrEmpty","isNullOrNaN","dec","isEmptyOrNaN","hashCode","blurFocusedField","getFileSize","remainingSize","isIE","documentMode","isValueInChoiceList","assignWith","chunk","clamp","cloneDeep","countBy","difference","flatten","forOwn","fromPairs","groupBy","intersection","intersectionBy","isEqual","isString","isUndefined","kebabCase","last","mapKeys","maxBy","memoize","omit","omitBy","orderBy","partialRight","pick","pullAll","sortBy","takeRightWhile","takeWhile","times","toPairs","toUpper","unescape","union","uniq","without","xor","zipObject","objValue","srcValue","LOG_BUFFER","LOG_LEVELS","_listeners","tag","msg","Log","TIMEZONE_INFO","displayName","offsetInMinutes","supportsDaylightSavingTime","daylightName","EPOCH","applyConversionTable","conversionTable","cDateFormatToLuxon","ddd","dddd","fff","yy","yyy","yyyy","yyyyy","gg","zz","zzz","cDateFormatToMobiscroll","yyyyMMdd","MMddyyyy","hhmm","HHmm","hhmmss","HHmmss","timeZoneOffset","isInDST","checkIfS2LoadedInsideAgent","getCookie","getKeyCombination","ctrlKey","addVoxcoAgentListener","doesVariableExistInErrors","hasShownSoftPrompt","maxMentions","openEndRequired","openEndMinimumLength","minimumViolation","minimum","openEndMaximumLength","maximumViolation","maximum","validNumber","numberOfDecimals","nbDecimal","newValidationQuestionTypes","answerRequiredValidators","questionValidators"],"sourceRoot":""}