{"version":3,"sources":["./apps/hyd-web-form/$_lazy_route_resource lazy namespace object","./apps/hyd-web-form/src/environments/environment.ts","./libs/hyd-lib/src/lib/models/environment.ts","./libs/hyd-lib/src/lib/services/app-version/app-version.service.ts","./libs/hyd-lib/src/lib/hyd-lib.module.ts","./libs/hyd-lib/src/lib/helpers/data-helper.ts","./libs/hyd-lib/src/lib/helpers/seededshuffle.ts","./apps/hyd-web-form/src/app/session/session.component.ts","./apps/hyd-web-form/src/app/app.module.ts","./apps/hyd-web-form/src/app/app.component.ts","./libs/hyd-lib-form-ui/src/lib/shared/session-restart/session-restart.component.ts","./hyd.form.provider.ts","./libs/hyd-lib-form-logic/src/lib/services/request-queue.service.ts","./libs/hyd-lib-form-logic/src/lib/controllers/session.controller.ts","./libs/hyd-lib-form-logic/src/lib/services/reload.service.ts","./libs/hyd-lib-form-ui/src/lib/shared/session-restart/session-restart.component.ts.SessionRestartComponent.html","./libs/hyd-lib-form-ui/src/lib/shared/connection-error/connection-error.component.ts","./libs/hyd-lib-form-ui/src/lib/shared/connection-error/connection-error.component.ts.ConnectionErrorComponent.html","./libs/hyd-lib-form-ui/src/lib/elements/action/start/ui/start.component.ts","./libs/hyd-lib-form-ui/src/lib/elements/action/start/ui/start.component.html","./libs/hyd-lib-form-ui/src/lib/elements/action/finish/ui/finish.component.ts","./libs/hyd-lib-form-ui/src/lib/elements/action/finish/ui/finish.component.html","./libs/hyd-lib-form-ui/src/lib/form.icons.ts","./libs/hyd-lib-form-ui/src/lib/elements/action-group/loop/ui/loop.component.ts","./libs/hyd-lib-form-logic/src/lib/services/form/element.service.ts","./libs/hyd-lib-form-logic/src/lib/services/response.service.ts","./libs/hyd-lib/src/lib/pipes/hyd-element-html.pipe.ts","./libs/hyd-lib-form-ui/src/lib/shared/element-text/element-text.component.ts","./libs/hyd-lib-form-ui/src/lib/shared/element-text/element-text.component.ts.ElementTextComponent.html","./libs/hyd-lib-form-ui/src/lib/elements/action-group/loop/ui/loop.component.html","./libs/hyd-lib-form-ui/src/lib/elements/action-group/loop/ui/loop.component.ts.LoopIterationComponent.html","./libs/hyd-lib-form-ui/src/lib/elements/display/info/ui/info.component.ts","./libs/hyd-lib-form-logic/src/lib/services/resource.service.ts","./libs/hyd-lib-form-ui/src/lib/elements/display/info/ui/info.component.html","./libs/hyd-lib-form-ui/src/lib/answers/barcode/ui/barcode.component.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/barcode/ui/barcode.component.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/date/ui/date.component.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/dropdown/ui/dropdown.component.ts","./libs/hyd-lib-form-logic/src/lib/controllers/elements/ElementController.ts","./libs/hyd-lib-form-logic/src/lib/controllers/elements/gps/gps.controller.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/gps/ui/gps.component.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/interval/ui/interval.component.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/matrix/ui/matrix.component.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/photo/ui/photo.component.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/ranking/ui/ranking.component.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/scale/ui/scale.component.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/select/ui/select.component.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/signature/ui/signature.component.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/text/ui/text.component.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/question.component.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/question.component.factory.ts","./libs/hyd-lib-form-ui/src/lib/elements/action/action.component.ts","./libs/hyd-lib-form-ui/src/lib/elements/action/action.component.factory.ts","./libs/hyd-lib-form-ui/src/lib/elements/action-group/action-group.component.ts","./libs/hyd-lib-form-ui/src/lib/elements/action-group/action-group.component.factory.ts","./libs/hyd-lib-form-ui/src/lib/elements/display/display.component.ts","./libs/hyd-lib-form-ui/src/lib/elements/display/display.component.factory.ts","./libs/hyd-lib-form-ui/src/lib/elements/display-group/display-group.component.ts","./libs/hyd-lib-form-ui/src/lib/elements/display-group/display-group.component.factory.ts","./libs/hyd-lib-form-ui/src/lib/elements/element.component.factory.ts","./libs/hyd-lib-form-ui/src/lib/elements/display-group/linked/ui/linked.component.ts","./libs/hyd-lib-form-logic/src/lib/services/form/validation.service.ts","./libs/hyd-lib-form-ui/src/lib/elements/display-group/linked/ui/linked.component.html","./libs/hyd-lib-form-ui/src/lib/elements/display-group/display-group.component.ts.DisplayGroupElementComponent.html","./libs/hyd-lib-form-ui/src/lib/answers/barcode/ui/barcode.component.html","./libs/hyd-lib-form-ui/src/lib/answers/signature/ui/signature.component.ts","./libs/hyd-lib-form-ui/src/lib/answers/signature/ui/signature.component.ts.AnswerSignatureComponent.html","./libs/hyd-lib-form-ui/src/lib/elements/questions/barcode/ui/barcode.component.html","./libs/hyd-lib-form-ui/src/lib/answers/datetime/ui/value-stepper.component.ts","./libs/hyd-lib-form-ui/src/lib/answers/datetime/ui/value-stepper.scss.shim.ngstyle.js","./libs/hyd-lib-form-ui/src/lib/answers/datetime/ui/value-stepper.component.ts.ValueStepperComponent.html","./libs/hyd-lib-form-ui/src/lib/answers/datetime/ui/date.component.ts","./libs/hyd-lib-form-logic/src/lib/services/locale.service.ts","./libs/hyd-lib-form-ui/src/lib/answers/datetime/ui/date.scss.shim.ngstyle.js","./libs/hyd-lib-form-ui/src/lib/answers/datetime/ui/date.component.ts.DateComponent.html","./libs/hyd-lib-form-ui/src/lib/answers/datetime/ui/time.component.ts","./libs/hyd-lib-form-ui/src/lib/answers/datetime/ui/time.scss.shim.ngstyle.js","./libs/hyd-lib-form-ui/src/lib/answers/datetime/ui/time.component.ts.TimeComponent.html","./libs/hyd-lib-form-ui/src/lib/answers/datetime/ui/datetime.component.ts","./libs/hyd-lib-form-ui/src/lib/answers/datetime/ui/datetime.component.ts.AnswerDateTimeComponent.html","./libs/hyd-lib-form-ui/src/lib/elements/questions/date/ui/date.component.html","./libs/hyd-lib-form-ui/src/lib/elements/questions/dropdown/ui/dropdown.component.html","./libs/hyd-lib-form-ui/src/lib/elements/questions/gps/ui/gps.component.html","./libs/hyd-lib-form-ui/src/lib/answers/likert/ui/likert.component.ts","./libs/hyd-lib-theme/src/lib/services/hyd-icon/hyd-icon.service.ts","./libs/hyd-lib-theme/src/lib/services/hyd-theme/hyd-theme.service.ts","./libs/hyd-lib-form-ui/src/lib/answers/likert/ui/likert.component.ts.AnswerLikertComponent.html","./libs/hyd-lib-form-ui/src/lib/answers/text/ui/text.component.ts","./libs/hyd-lib-form-ui/src/lib/answers/text/ui/text.component.ts.AnswerTextComponent.html","./libs/hyd-lib-form-ui/src/lib/answers/select/ui/select.component.ts","./libs/hyd-lib-form-ui/src/lib/answers/select/ui/select.component.ts.AnswerSelectComponent.html","./libs/hyd-lib-form-ui/src/lib/elements/questions/interval/ui/interval.component.html","./libs/hyd-lib-form-ui/src/lib/answers/matrix/ui/matrix-cell.component.ts","./libs/hyd-lib-form-ui/src/lib/answers/matrix/ui/matrix-cell.component.ts.MatrixAnswerCellComponent.html","./libs/hyd-lib-form-ui/src/lib/answers/matrix/ui/matrix.component.ts","./libs/hyd-lib-form-ui/src/lib/answers/matrix/ui/matrix.component.html","./libs/hyd-lib-form-ui/src/lib/elements/questions/matrix/ui/matrix.component.html","./libs/hyd-lib-form-ui/src/lib/answers/camera/ui/camera.component.ts","./libs/hyd-lib-form-ui/src/lib/answers/camera/ui/camera.component.ts.AnswerCameraComponent.html","./libs/hyd-lib-form-ui/src/lib/elements/questions/photo/ui/photo.component.html","./libs/hyd-lib-form-ui/src/lib/elements/questions/ranking/ui/ranking.item.component.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/ranking/ui/ranking.item.component.ts.RankingItemComponent.html","./libs/hyd-lib-form-ui/src/lib/elements/questions/ranking/ui/ranking.component.html","./libs/hyd-lib-form-ui/src/lib/answers/scale/ui/scale.component.ts","./libs/hyd-lib-form-ui/src/lib/answers/scale/ui/scale.component.ts.AnswerScaleComponent.html","./libs/hyd-lib-form-ui/src/lib/elements/questions/scale/ui/scale.component.html","./libs/hyd-lib-form-ui/src/lib/elements/questions/select/ui/select.component.html","./libs/hyd-lib-form-ui/src/lib/elements/questions/signature/ui/signature.component.html","./libs/hyd-lib-form-ui/src/lib/elements/questions/text/ui/text.component.html","./libs/hyd-lib-form-ui/src/lib/shared/shadow-scroll/shadow-scroll.component.ts","./libs/hyd-lib-form-ui/src/lib/shared/shadow-scroll/shadow-scroll.component.ts.ShadowScrollComponent.html","./libs/hyd-lib-form-ui/src/lib/elements/action/action.component.ts.ActionElementComponent.html","./libs/hyd-lib-form-ui/src/lib/elements/action-group/action-group.component.ts.ActionGroupElementComponent.html","./libs/hyd-lib-form-ui/src/lib/elements/display/display.component.ts.DisplayElementComponent.html","./libs/hyd-lib-form-ui/src/lib/shared/validation-message/validation-message-item.component.ts","./libs/hyd-lib-form-ui/src/lib/shared/validation-message/validation-message-item.component.ts.ValidationMessageItemComponent.html","./libs/hyd-lib-form-ui/src/lib/shared/validation-message/validation-message.component.ts","./libs/hyd-lib-form-ui/src/lib/shared/validation-message/validation-message.component.ts.ValidationMessageComponent.html","./libs/hyd-lib-form-ui/src/lib/elements/questions/question.component.ts.QuestionElementComponent.html","./libs/hyd-lib-form-ui/src/lib/shared/footer/footer.component.ts","./libs/hyd-lib-form-ui/src/lib/shared/footer/footer.component.ts.FormFooterComponent.html","./libs/hyd-lib-form-ui/src/lib/elements/element.component.ts","./libs/hyd-lib-form-logic/src/lib/services/form/element-transition.service.ts","./libs/hyd-lib-form-ui/src/lib/elements/element.component.ts.ElementComponent.html","./libs/hyd-lib-form-ui/src/lib/layout/nav/nav-button/nav-button.component.ts","./libs/hyd-lib-form-ui/src/lib/layout/nav/nav-button/nav-button.component.ts.FormNavButtonComponent.html","./libs/hyd-lib-form-ui/src/lib/layout/nav/nav.component.ts","./libs/hyd-lib-form-ui/src/lib/layout/nav/nav.component.ts.FormNavComponent.html","./libs/hyd-lib-form-ui/src/lib/layout/progress-bar/progress-bar.component.ts","./libs/hyd-lib-form-logic/src/lib/data/models/form.viewmodel.ts","./libs/hyd-lib-form-ui/src/lib/layout/progress-bar/progress-bar.component.ts.FormProgressBarComponent.html","./libs/hyd-lib-form-ui/src/lib/layout/form-layout.component.ts","./libs/hyd-lib-form-ui/src/lib/layout/form-layout.component.ts.FormLayoutComponent.html","./libs/hyd-lib-form-ui/src/lib/layout/form-content/form-content.component.ts","./libs/hyd-lib-form-ui/src/lib/layout/form-content/form-content.component.ts.FormContentComponent.html","./libs/hyd-lib-theme/src/lib/ui/brand/animations.ts","./libs/hyd-lib-theme/src/lib/ui/brand/app-icon/app-icon.component.ts","./libs/hyd-lib-theme/src/lib/ui/brand/app-icon/app-icon.component.scss.shim.ngstyle.js","./libs/hyd-lib-theme/src/lib/ui/brand/app-icon/hyd-icon.svg","./libs/hyd-lib-form-ui/src/lib/form.component.ts","./libs/hyd-lib-form-logic/src/lib/controllers/elements/start/start.controller.ts","./libs/hyd-lib-form-logic/src/lib/data/validation/text.validator.ts","./libs/hyd-lib-form-logic/src/lib/controllers/elements/text/text.controller.ts","./libs/hyd-lib-form-logic/src/lib/controllers/elements/finish/finish.controller.ts","./libs/hyd-lib-form-logic/src/lib/controllers/elements/info/info.controller.ts","./libs/hyd-lib-form-logic/src/lib/controllers/elements/select/select.controller.ts","./libs/hyd-lib-form-logic/src/lib/controllers/elements/linked/linked.controller.ts","./libs/hyd-lib-form-logic/src/lib/controllers/elements/scale/scale.controller.ts","./libs/hyd-lib-form-logic/src/lib/controllers/elements/interval/interval.controller.ts","./libs/hyd-lib-form-logic/src/lib/controllers/elements/matrix/matrix.controller.ts","./libs/hyd-lib-form-logic/src/lib/controllers/elements/date/date.controller.ts","./libs/hyd-lib-form-logic/src/lib/controllers/elements/ranking/ranking.controller.ts","./libs/hyd-lib-form-logic/src/lib/controllers/elements/signature/signature.controller.ts","./libs/hyd-lib-form-logic/src/lib/controllers/elements/dropdown/dropdown.controller.ts","./libs/hyd-lib-form-logic/src/lib/controllers/elements/photo/photo.controller.ts","./libs/hyd-lib-form-logic/src/lib/controllers/elements/barcode/barcode.controller.ts","./libs/hyd-lib-form-logic/src/lib/controllers/elements/loop/loop.controller.ts","./libs/hyd-lib-form-logic/src/lib/controllers/form.controller.ts","./libs/hyd-lib-form-logic/src/lib/controllers/elements/ElementControllerFactory.ts","./libs/hyd-lib-form-logic/src/lib/services/loading-indicator.service.ts","./libs/hyd-lib-form-ui/src/lib/form.component.ts.FormComponent.html","./apps/hyd-web-form/src/app/session/session.component.scss.shim.ngstyle.js","./apps/hyd-web-form/src/app/session/session.component.html","./libs/hyd-lib-theme/src/lib/directives/hyd-theme-root.directive.ts","./apps/hyd-web-form/src/app/app.component.html","./apps/hyd-web-form/src/app/i18next.ts","./libs/hyd-lib-form-logic/src/lib/services/data/session-api.service.ts","./libs/hyd-lib-form-logic/src/lib/services/session.service.ts","./libs/hyd-lib-form-logic/src/lib/interceptors/session.interceptor.ts","./libs/hyd-lib-form-logic/src/lib/data/repositories/form-path.repository.ts","./libs/hyd-lib-form-logic/src/lib/data/models/form-path.model.ts","./libs/hyd-lib-form-logic/src/lib/services/form/form-path.service.ts","./libs/hyd-lib-form-logic/src/lib/data/repositories/form.repository.ts","./libs/hyd-lib-form-logic/src/lib/data/models/form-options.model.ts","./libs/hyd-lib-form-logic/src/lib/services/form/form.service.ts","./libs/hyd-lib-form-logic/src/lib/data/repositories/element.repository.ts","./libs/hyd-lib-form-logic/src/lib/data/repositories/conditions.repository.ts","./libs/hyd-lib-form-logic/src/lib/services/form/conditions.service.ts","./libs/hyd-lib-form-logic/src/lib/data/repositories/response.repository.ts","./apps/hyd-web-form/src/app/app.errorhandler.ts","./libs/hyd-lib-theme/src/lib/ui/brand/brand.module.ts","./libs/hyd-lib-theme/src/lib/hyd-lib-theme.module.ts","./libs/hyd-lib-form-logic/src/lib/hyd-lib-form-logic.module.ts","./libs/hyd-lib-form-ui/src/lib/layout/nav/nav.module.ts","./libs/hyd-lib-form-ui/src/lib/layout/form-layout.module.ts","./libs/hyd-lib-form-ui/src/lib/shared/shared.module.ts","./libs/hyd-lib-form-ui/src/lib/elements/action/finish/finish.module.ts","./libs/hyd-lib-form-ui/src/lib/elements/action/start/start.module.ts","./libs/hyd-lib-form-ui/src/lib/elements/action/action.module.ts","./libs/hyd-lib-form-ui/src/lib/elements/action-group/action-group.module.ts","./libs/hyd-lib-form-ui/src/lib/elements/display/info/info.module.ts","./libs/hyd-lib-form-ui/src/lib/elements/display/display.module.ts","./libs/hyd-lib-form-ui/src/lib/elements/display-group/linked/linked.module.ts","./libs/hyd-lib-form-ui/src/lib/elements/display-group/display-group.module.ts","./libs/hyd-lib-form-ui/src/lib/answers/barcode/barcode.module.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/barcode/barcode.module.ts","./libs/hyd-lib-form-ui/src/lib/answers/datetime/datetime.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/date/date.module.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/dropdown/dropdown.module.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/gps/gps.module.ts","./libs/hyd-lib-form-ui/src/lib/answers/likert/likert.module.ts","./libs/hyd-lib-form-ui/src/lib/answers/text/text.module.ts","./libs/hyd-lib-form-ui/src/lib/answers/select/select.module.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/interval/interval.module.ts","./libs/hyd-lib-form-ui/src/lib/answers/scale/scale.module.ts","./libs/hyd-lib-form-ui/src/lib/answers/answers.module.ts","./libs/hyd-lib-form-ui/src/lib/answers/matrix/matrix.module.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/matrix/matrix.module.ts","./libs/hyd-lib-form-ui/src/lib/answers/camera/camera.module.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/photo/photo.module.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/ranking/ranking.module.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/scale/scale.module.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/select/select.module.ts","./libs/hyd-lib-form-ui/src/lib/answers/signature/signature.module.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/signature/signature.module.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/text/text.module.ts","./libs/hyd-lib-form-ui/src/lib/elements/questions/question.module.ts","./libs/hyd-lib-form-ui/src/lib/elements/action-group/loop/loop.module.ts","./libs/hyd-lib-form-ui/src/lib/elements/element.module.ts","./libs/hyd-lib-form-ui/src/lib/menu/menu.module.ts","./libs/hyd-lib-form-ui/src/lib/form.module.ts","./libs/hyd-lib-form-ui/src/lib/hyd-lib-form-ui.module.ts","./apps/hyd-web-form/src/app/app.module.ngfactory.js","./apps/hyd-web-form/src/main.ts"],"names":["webpackEmptyAsyncContext","req","Promise","resolve","then","e","Error","code","keys","module","exports","id","environment","production","loggerLevel","level","ERROR","version","Environment","env","this","AppVersionService","HydLibModule","parseAsNumber","value","defaultValue","parsedValue","parseInt","isNaN","parseAsFloat","parseFloat","parseAsBool","toLowerCase","parseAsString","pad","num","size","s","length","localDateString","includeOffset","now","Date","add","minutes","getTimezoneOffset","date","tzo","dif","dateString","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","toIsoString","getUuid","a","Number","Math","random","toString","replace","makeId","result","characters","charactersLength","i","charAt","floor","SeededShuffle","arr","fixedPositions","seed","copy","fixed","reduce","acc","push","returnArr","shuffle","forEach","item","initialIndex","currentIndex","indexOf","getType","setSeed","shuff","slice","map","genMap","splice","Array","x","__seed","test","String","strSeed","split","charCodeAt","join","obj","Object","prototype","call","match","SessionComponent","route","sessionId","snapshot","paramMap","get","AppModule","AppComponent","themeService","hidden","console","log","onThemeLoaded","subscribe","SessionRestartComponent","reloadService","overrideWarning","location","reload","EAnswerType","EElementType","ERuntimeState","EFormSessionState","ELogicComparator","ELogicOperator","EResultFinishType","EResponseValueType","EFormModeType","EFormOption","EFormProgressBar","RequestQueueService","http","queue","queueLength","$queueLength","$errorState","request","reject","addToQueue","retry","_queue","_activeRequests","BehaviorSubject","pipe","distinctUntilChanged","errorState","error","retrying","errorMessage","asObservable","replaceQueueItem","method","processQueueItem","queueItem","r","processQueue","activeRequest","requestSubscription","unsubscribe","filter","unshift","next","maxConcurrent","queueItemToProcess","shift","url","body","params","headers","responseType","delete","post","put","createRequest","shouldIgnoreError","queueError","currentState","status","message","queueName","sessionService","logger","form","formViewModel","validationService","state","info","activeSessionReset","reset","sessionError","activeElementControllerChanged","newActiveElement","element","changeActiveElement","activeSession","setActiveSessionId","destroy","startResult","StartDate","goNext","finishResult","EndDate","FinishType","Standard","completeSession","startIteration","activeElementController","navigateBack","subType","validation","isValid","navigateNext","flashValidationMessage","ReloadService","requestQueueService","sessionController","session","State","Complete","ConnectionErrorComponent","dialigRef","errorSubscription","close","StartComponent","_sessionController","_elementHTML","changes","controller","Text","event","startForm","FinishComponent","_requestQueueService","finalized","finishForm","formIcons","iconNames","check","iconName","calendarAlt","keyboard","arrows","sortSizeDown","satellite","satelliteDish","globeAfrica","redo","arrowLeft","arrowRight","trash","signature","handPointUp","times","image","camera","barcode","barcodeScan","barcodeRead","qrCode","lightbulbSlash","lightbulbOn","arrowUp","arrowDown","clock","gripVertical","asterisk","plus","digging","ban","responseService","icons","LoopIterationComponent","elementService","label","defaultLabel","defaultIterationLabel","loopIdentityElementId","getElementById","identityElement","getResponseForElement","iterationId","response","Values","Value","catch","elementRepository","_elementCache","elementId","respsonseRepository","_responseCache","newSession","elementCache","Id","getResponseForElementId","createdDate","ParentId","Valid","CreateDate","ModifiedDate","ElementType","updateResponseCache","ContentId","saveContent","saveResponse","fileName","data","getContent","HydElementHtmlPipe","args","text","required","InfoComponent","resourceService","changeRef","options","DisplayImage","DisplayVideo","getPathForResource","Image","ImageAboveText","_elementSubscription","elementChanged","detectChanges","sessionApiService","_resourceCacheMap","Map","resourceId","FormId","FormVersionId","FormCacheId","FormDomainId","contentId","activeSessionId","resourceType","getResource","resources","resourcePromises","resource","has","set","type","all","dialogRef","i18NextService","scannerState","scannerEnabled","keepScanning","desiredDevice","devices","activeDeviceIndex","torch","torchAvailable","barcodeEntry","showScannedResult","allowedFormats","QR_CODE","EAN_13","CODE_128","DATA_MATRIX","EAN_8","barcodeScanned","findIndex","deviceId","scanner","device","isAvailable","$event","t","hasPermission","barcodeData","timeNow","_lastScanTime","overlay","nativeElement","classList","scannedResult","setTimeout","remove","emit","dialogService","animationName","scannedBarcodeCount","maxAnswers","open","closeOnBackdropClick","closeOnEsc","componentRef","instance","newBarcode","scanEnabled","markForCheck","newDate","updateResponse","DropdownComponent","_resourceService","items","_subs","searchFn","bind","updateDropdown","hasResponse","select","writeValue","responseValue","newResultValue","searchTerm","lowerSearchTerm","filterType","some","startsWith","i18nextService","isVisible","validationMessages","disabled","shouldHideBackButton","validationChanged","responseChanged","init","Required","SubType","newElement","newValidation","ELocationStatus","answerMap","_parseAnswers","_parseResponse","validate","updateValidation","newCoords","_createResponseValue","latitude","Decimal","longitude","altitude","accuracy","Ok","resultLocationStatus","resultLocationMessage","resultLocation","PERMISSION_DENIED","DeviceDisabled","POSITION_UNAVAILABLE","TIMEOUT","Failed","NotRequired","Answers","answer","_getResponseValue","undefined","altitudeAccuracy","heading","speed","valueString","AnswerId","StatementId","Type","answerId","find","_changeRef","locating","getLocation","locationKey","_cancelLocationRequest","successCallback","errorCallback","cancelled","navigator","geolocation","getCurrentPosition","position","enableHighAccuracy","_gotPosition","_errorGettingPosition","updateResponseCancelled","coords","updateResponseError","IntervalComponent","selectedAnswer","MatrixComponent","cell","saving","photoContentId","cameraUrl","getPathForContent","dialog","removeCamera","imageAsDataUrl","photoChanged","finally","itemState","rankedPosition","rankedAnswers","ev","timer","index","ScaleComponent","newValue","updateResponseValue","SelectComponent","signatureContentId","signatureUrl","sig","emptySignature","removeSignature","signaturePad","toDataURL","signatureChanged","TextComponent","newResultText","componentFactoryResolver","changeDetection","highlightInvalid","_changeDetection","_validationSubscription","$flashValidationMessage","v","componentFactory","resolver","resolveComponentFactory","getQuestionComponent","content","clear","ref","createComponent","changeDetectorRef","getActionComponent","getActionGroupComponent","getDisplayComponent","getDisplayGroupComponent","getElementComponent","Action","ActionGroup","Display","DisplayGroup","Question","childRefs","childElementControllers","validationSubscription","firstInvalidElement","scrollIntoView","behavior","block","inline","el","focusElement","elementModel","childRef","c","_flashValidationMessage","Subject","AnswerSignatureComponent","_emptySignature","toData","width","window","innerWidth","height","canvas","queryPad","_canvas","ratio","max","devicePixelRatio","offsetWidth","offsetHeight","getContext","scale","fromData","selectedIndexChanged","_isChanging","_count","selectedIndex","startIndex","placeholder","newIndexVal","newIndex","_updateSelectedIndex","_changeValue","delay","_changingTimer","clearTimeout","monthsWithThirtyDays","localeService","dateOptions","monthOptions","yearOptions","dateChanged","dateValue","monthValue","yearValue","yearIndex","parseDateString","updateDateValues","newDateIndex","updateDateString","newMonthIndex","newYearIndex","dayCount","includes","year","newDateOptions","dateParts","month","LocaleService","localeString","toLocaleDateString","language","monthIndex","dateIndex","hourOptions","minuteOptions","periodOptions","timeChanged","hourValues","minuteValues","hourValue","minuteValue","periodValue","time","parseTimeString","newHourIndex","updateTimeString","newMinuteIndex","newPeriodIndex","timeParts","hour","period","minute","showStampButton","valueChanged","Time","selectedDate","selectedTime","DateTime","parts","defaultDate","defaultTime","answerDateTimeChanged","newTime","None","dateRef","clearValue","timeRef","nowString","_dateNowString","substring","offsetMs","msLocal","getTime","toISOString","_themeService","answers","displayLabels","resultValueChanged","onDirectionChanged","newDirection","updateOptions","_defaultAnswer","displayAnswer","ceil","rightToLeft","layoutDirection","animate","showTicks","step","HydIconService","nbIconLib","registerSvgPack","setDefaultPack","newIcons","updatedIcons","getPack","existingIcon","name","newIcon","html","HydThemeService","document","_nbThemeService","_appVersionService","_iconService","_layoutDirectionService","_installedThemes","dark","onThemeChanged","_themeReady","_checkThemeLoaded","requestAnimationFrame","themeStyleEl","createElement","rel","media","head","appendChild","onDirectionChange","direction","setTheme","_activeTheme","iconLibrary","getDirection","themeId","href","changeTheme","setDirection","registerIcons","getComputedStyle","boxSizing","activeTheme","resultValue","resultChanged","answerType","Email","target","selected","radio","showLabel","small","answerClicked","answerValueChanged","textAnswers","AnswerType","_sanitizer","_elRef","firstLoad","selectionChanged","styleString","answerIds","sliderStyle","bypassSecurityTrustStyle","selectedId","sanitizer","elRef","canScrollLeft","canScrollRight","canScrollUp","canScrollDown","subscriptions","matrixEl","mainElRef","clientWidth","scrollWidth","sliderWidth","leftPadding","cellWidth","leftPos","scrollLeft","scrollTo","left","fromEvent","throttleTime","_resized","_scrolled","updateSizes","columns","firstChange","style","setProperty","rows","dir","opts","top","scrollBy","column","row","statementId","cellHeaderRef","clientHeight","scrollTop","scrollHeight","takePhoto","RankingItemComponent","_theme","showImage","smallImage","imageUrl","leftLabel","rightLabel","displayAs","responseValueChanged","updateSliderOptions","responseValueChange","currentValue","translate","scrollRef","topScroll","bottomScroll","leftScroll","rightScroll","topShadow","min","bottomShadow","leftShadow","rightShadow","updateShadows","messageItem","visible","ValidationMessageComponent","shake","FormFooterComponent","footer","viewModel","activeSubType","transitionService","_transitionAction","registerTransitionAction","activeTransitionType","toState","fromState","completeAction","unregisterAction","isComplete","actionCompleted","transitionUpdate","_activeTransitionType","_active","_transitionActions","newAction","_actionCompleted","action","active","enabled","onaction","model","navAction","FormProgressBarComponent","defaultNavModel","backButton","nextButton","title","defaultFooterModel","_form","_transitionService","_sessionService","nav","progressBar","isActive","navViewModel","footerViewModel","getProgress","startFooter","getFormOption","StartFooter","disableBackButton","finishFooter","FinishFooter","Footer","InstructionText","goBack","Top","Bottom","FormContentComponent","viewContainerRef","timing","colors","strokeAnimation","duration","stroke","fillAnimation","fill","PathElement","_builder","_elementRef","animationDone","_player","play","pathName","paths","contains","getTotalLength","bars","filterPath","grainTop","grainBottom","border","borderAnimation","barAnimations","grainTopAnimations","grainBottomAnimations","barFillAnimation","d","grainFillAnimation","topFillAnim","borderFillAnim","build","create","onDone","setPosition","iconService","formController","router","spinnerService","loadingIndicator","newController","activeControllerUpdated","$toggleState","hide","show","formMode","Testing","sessionState","canUnloadSafely","intializeSession","icon","_elementSub","navigateByUrl","newActiveController","activeComponentRef","TextValidator","minChars","maxChars","meetsCharLimit","shouldValidateValue","allowNegatives","decimalPlaces","validations","isValidNumber","isPositiveNumber","decimalPlaceCount","decimalSplit","validDecimalCount","count","validateEmail","parseElementOptions","whitespaceRemoved","MinCharacters","MaxCharacters","answerOptions","charCountValidation","validateCharLength","numericValidation","validateNumericValue","AllowNegatives","DecimalPlaces","emailValidation","validateEmailValue","Options","Prefix","CustomPrefixText","Suffix","CustomSuffixText","_parseOptions","RichText","TEXT_ANSWER_TYPES","exclusiveAnswerIds","_parseElementOptions","isSingleSelect","selectedCount","minAnswers","currentResponseIndex","_updateSelectedAnswers","newResponseValue","_responseValueForAnswer","Exclusive","exclusiveAnswerId","exclusiveResponseIndex","MinAnswers","MaxAnswers","showLabels","ShowLabels","selectableImages","SelectableImages","randomOrder","RandomOrder","smallImages","SmallImages","selectedAnswerIds","fixedAnswerPositions","FixedPosition","fixedShuffle","isTextAnswer","_childValidationSubscriptions","controllers","_resetChildren","child","updateElement","super","_parseResponseValue","parseAseScaleDisplay","DisplayAs","_updateSelectedAnswer","showImagesAsRow","parseCellType","_statementResponses","_updateSelectedCells","answerResponses","existingAnswerId","values","updatedValues","allStatementsHaveResponse","processSliderAnswers","sa","mapCells","statement","cells","sliderAnswers","ViewType","cols","Statements","hasValue","statementResponses","_parseAnswer","dateType","DefaultValue","DateTimeStamp","unrankedAnswers","allItemsRanked","noItemsRanked","answerRequiredValid","newRank","currentPosition","rankedItem","sort","b","Order","answerIndex","ResourceIdentifier","DropdownFilter","hideLoopOverview","iterationResponse","Itteration","validIterations","iteration","MaxResponses","addIterationLabel","AddIterationLabel","continueSurveyLabel","ContinueSurveyLabel","DefaultIterationLabel","LoopIdentityElementId","loopControllerElementId","LoopControllerElementId","HideLoopOverview","_path","_elementService","_conditionsService","_responseService","_logger","_loadingIndicator","_checkFormServicesReady","scheduled","pathChanged","newElementId","_updateActiveElement","activeForm","Mode","Unknown","activeStep","firstElementId","getFirstFormElementNode","pushPath","_cacheElementAndResources","activeIterationId","loopController","loopId","loopNode","getNode","node","Nodes","newIterationId","getFirstInvalidIterationId","creatIteration","_saveResponse","startTransition","saveConditions","thisElement","nextElementId","_getNextElementId","activeIteration","endIteration","_getElementController","conditions","Conditions","invalidateConditions","popPath","FormPathSteps","parentId","markIterationAsInvalid","stopWatchingElementControllers","watchElementController","linkedElementNode","linkedElementControllers","setChildControllers","getNextElementNode","getPreviousElementId","defaultNextElementNodeId","navigationRules","Navigation","activeNavRule","rule","Items","isRuleActive","DestinationId","newElementController","CreateContoller","minResponseCount","controllerElement","controllerResponse","setMinLoopCount","parentLoop","hasControllerElement","shoudHideLoopOverview","elementNode","cacheResources","LoadingIndicatorService","_toggle","elementRef","renderer","platformId","layoutDirectionService","overlayContainer","scrollService","rulerService","_alive","registerAsOverlayContainer","_initNbThemeService","onGetDimensions","takeWhile","listener","getDimensions","complete","onGetPosition","getScrollPosition","_initNbDirectionService","unregisterAsOverlayContainer","fireScrollChange","onThemeChange","theme","getElementsByTagName","previous","removeClass","addClass","onAppendLayoutClass","className","onRemoveLayoutClass","setContainer","clearContainer","container","y","currentX","currentY","scrollable","localeIdFactory","i18next","httpClient","clientId","sessionStorage","getItem","setItem","toPromise","success","failure","isCancelled","tryCount","pollSession","getSessionState","getSession","getSessionDebugTrace","trace","addRequestToQueue","FormDomain","SourceType","FormSourceId","FormSourceRef","resultStartModel","updateResponseBody","key","metaBody","fileData","FormData","dataURI","byteString","atob","ab","ArrayBuffer","ia","Uint8Array","fileType","Blob","b64toBlob","append","formDomainId","formId","formVersion","formCacheId","activeSessionChanged","sessionReady","_activeSession","cancelPoll","pollSessionTillReady","updateActiveSession","startResultModel","setResultStart","finishResultModel","setResultFinish","RuntimeState","clone","setHeaders","handle","tap","FORM_PATH_META_KEY","path","activeIterations","iterations","default","getSessionMeta","newPath","updateSessionMeta","formPathRepository","_reset","_getPath","_getUniqueIterationId","silent","_savePath","newPathStep","quiet","currentIteration","saveFormPath","err","getFormPath","setPath","getForm","formConfig","updateFormOptions","optionMap","DisableBackButton","progressBarOption","ProgressBar","formRepository","_nextNodeMap","_nodeMap","activeFormUpdated","newState","_getForm","option","ElementTree","Root","parentNodeId","round","newForm","_updateNodeCache","_setForm","_updateNodeTreeCache","nodeTree","defaultNextId","thisNode","nextNodeId","getElement","CONDITIONS_CACHE_META_KEY","conditionsRepo","pathService","dirty","_resultSubscriptions","_conditionValueCache","_getConditionCache","getConditions","ec","evaluateConditions","conditionId","iterationCount","evaluateRuleLogicItem","childItems","Operator","And","Or","Lookup","getConditionValue","condition","invalidateCondition","evaluateCondition","conditionValue","Comparator","Selected","_evaluateSelectedCondition","Answered","_evaluateAnsweredCondition","Between","_evaluateBetweenCondition","EqualTo","_evaluateEqualsCondition","GreaterThan","_evaluateGreaterThanCondition","LessThan","_evaluateLessThanCondition","Negate","compareValue","Includes","compareValue2","Value2","responses","getSessionElementResponse","updateElementResponse","uploadContentData","getContentData","dsn","integrations","TryCatch","XMLHttpRequest","release","hostname","ngOriginalError","ErrorEvent","extractedError","extractError","BrandModule","ngModule","providers","provide","useClass","deps","multi","FormNavModule","FormLayoutModule","SharedFormModule","FinishModule","StartModule","ActionElementModule","ActionGroupElementModule","InformationModule","DisplayElementModule","LinkedModule","DisplayGroupElementModule","BarcodeAnswerModule","BarcodeModule","DateTimeAnswerModule","DateModule","DropdownModule","GPSModule","LikertAnswerModule","TextAnswerModule","SelectAnswerModule","IntervalModule","ScaleAnswerModule","AnswersModule","MatrixAnswerModule","MatrixModule","CameraAnswerModule","PhotoModule","RankingModule","ScaleModule","SelectModule","SignatureAnswerModule","SignatureModule","TextModule","QuestionElementModule","LoopModule","FormElementModule","MenuModule","HYDFormModule","HydLibFormUiModule","AppModuleNgFactory","_l","p0_0","p0_1","p0_2","p1_0","p2_0","p2_1","p2_2","p2_3","p1_1","use","lng","whitelist","fallbackLng","debug","returnEmptyString","defaultNS","ns","initialNavigation","relativeLinkResolution","component","hasBackdrop","autoFocus"],"mappings":"mHAAA,SAASA,EAAyBC,GAGjC,OAAOC,QAAQC,UAAUC,KAAK,WAC7B,IAAIC,EAAI,IAAIC,MAAM,uBAAyBL,EAAM,KAEjD,MADAI,EAAEE,KAAO,mBACHF,IAGRL,EAAyBQ,KAAO,WAAa,MAAO,IACpDR,EAAyBG,QAAUH,EACnCS,EAAOC,QAAUV,EACjBA,EAAyBW,GAAK,Q,iFCT9B,MAIaC,EAAc,CACzBC,YAAY,EACZC,YANgC,CAChCC,MAAO,IAAeC,OAMtBC,QAAS,KCHJ,MAAMC,EAMX,YAAoBC,GAAA,KAAAA,MAJpB,iBAAmB,OAAOC,KAAKD,IAAIN,WAEnC,cAAgB,OAAOO,KAAKD,IAAIF,SCH3B,IAAD,Q,MAAOI,EAMX,YACUT,GAAA,KAAAA,cALV,mBACE,OAAOQ,KAAKR,YAAYC,Y,mJAHtB,GCYC,MAAMS,G,gBClBN,SAASC,EAAcC,EAAeC,GAE3C,MAAMC,EAAcC,SAASH,EAAO,IAEpC,OAAII,MAAMF,GACDD,EAGFC,EAGF,SAASG,EAAaL,EAAeC,GAE1C,MAAMC,EAAcI,WAAWN,GAE/B,OAAII,MAAMF,GACDD,EAGFC,EAGF,SAASK,EAAYP,EAAeC,GAEzC,GAAsB,iBAAZ,EACR,OAAOA,EAGT,OAAQD,EAAMQ,eACZ,IAAK,OACH,OAAO,EACT,IAAK,QACH,OAAO,EACT,QACE,OAAOP,GAIN,SAASQ,EAAcT,EAAeC,GAE3C,MAAsB,iBAAZ,EACDD,EAGFC,EAGF,SAASS,EAAIC,EAAaC,EAAe,GAC9C,IAAIC,EAAIF,EAAM,GACd,KAAOE,EAAEC,OAASF,GAAMC,EAAI,IAAMA,EAClC,OAAOA,EAGF,SAASE,EAAgBC,GAAgB,GAC9C,MAAMC,EAAM,IAAIC,KA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,QAAQoC,MAAM+iC,K","file":"main.9620f45ee855e2e4ba72.js","sourcesContent":["function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncaught exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = \"KRjg\";","import { LoggerConfig, NgxLoggerLevel } from 'ngx-logger';\r\nimport { version } from '../../../../package.json';\r\n\r\nconst loggerLevel: LoggerConfig = {\r\n level: NgxLoggerLevel.ERROR\r\n};\r\n\r\nexport const environment = {\r\n production: true,\r\n loggerLevel,\r\n version: version\r\n};\r\n","import { Injectable } from '@angular/core';\r\n\r\nexport interface IEnvironment {\r\n readonly production: boolean;\r\n readonly version: string;\r\n}\r\n\r\nexport class Environment implements IEnvironment {\r\n\r\n get production() { return this.env.production; }\r\n\r\n get version() { return this.env.version; }\r\n\r\n constructor(private env: IEnvironment) { }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\nimport { Environment } from '../../models/environment';\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AppVersionService {\r\n\r\n get isProduction(): boolean {\r\n return this.environment.production;\r\n }\r\n\r\n constructor(\r\n private environment: Environment\r\n ) { }\r\n\r\n // get major() { return this._appVersion.major; }\r\n // get minor() { return this._appVersion.minor; }\r\n // get patch() { return this._appVersion.patch; }\r\n // get commit() { return this._appVersion.commit; }\r\n // get prerelease() { return this._appVersion.prerelease; }\r\n // get branch() { return this._appVersion.branch }\r\n\r\n // get versionString() {\r\n // return `${this.major}.${this.minor}.${this.patch}-${this.prerelease.join('.')} ${this.branch}@${this.commit}`;\r\n // }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AppVersionService } from './services/app-version/app-version.service';\r\nimport { Environment } from './models/environment';\r\nimport { HydElementHtmlPipe } from './pipes/hyd-element-html.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n HydElementHtmlPipe\r\n ],\r\n providers: [\r\n AppVersionService\r\n ],\r\n exports: [\r\n HydElementHtmlPipe\r\n ]\r\n})\r\nexport class HydLibModule {}\r\n\r\nexport { AppVersionService, Environment };\r\n\r\n","import { add } from 'date-fns';\r\n\r\nexport function parseAsNumber(value: string, defaultValue: number): number {\r\n\r\n const parsedValue = parseInt(value, 10);\r\n\r\n if (isNaN(parsedValue)) {\r\n return defaultValue;\r\n }\r\n\r\n return parsedValue;\r\n}\r\n\r\nexport function parseAsFloat(value: string, defaultValue: number | undefined): number | undefined {\r\n\r\n const parsedValue = parseFloat(value);\r\n\r\n if (isNaN(parsedValue)) {\r\n return defaultValue;\r\n }\r\n\r\n return parsedValue;\r\n}\r\n\r\nexport function parseAsBool(value: string, defaultValue: boolean): boolean {\r\n\r\n if (typeof(value) !== 'string') {\r\n return defaultValue;\r\n }\r\n\r\n switch (value.toLowerCase()) {\r\n case 'true':\r\n return true;\r\n case 'false':\r\n return false;\r\n default:\r\n return defaultValue;\r\n }\r\n}\r\n\r\nexport function parseAsString(value: string, defaultValue: string): string {\r\n\r\n if (typeof(value) === 'string') {\r\n return value;\r\n }\r\n\r\n return defaultValue;\r\n}\r\n\r\nexport function pad(num: number, size: number = 2) {\r\n let s = num + '';\r\n while (s.length < size) s = '0' + s;\r\n return s;\r\n}\r\n\r\nexport function localDateString(includeOffset = false): string {\r\n const now = new Date();\r\n add(now, { minutes: now.getTimezoneOffset() });\r\n return toIsoString(now, includeOffset);\r\n}\r\n\r\nexport function toIsoString(date: Date, includeOffset = false): string {\r\n const tzo = -date.getTimezoneOffset();\r\n const dif = tzo >= 0 ? '+' : '-';\r\n\r\n let dateString = date.getFullYear() +\r\n '-' + pad(date.getMonth() + 1) +\r\n '-' + pad(date.getDate()) +\r\n 'T' + pad(date.getHours()) +\r\n ':' + pad(date.getMinutes()) +\r\n ':' + pad(date.getSeconds());\r\n\r\n if (includeOffset) {\r\n dateString = dateString + dif + pad(tzo / 60) +\r\n ':' + pad(tzo % 60);\r\n }\r\n\r\n return dateString;\r\n}\r\n\r\nexport function getUuid(a: string = ''): string {\r\n return a\r\n /* eslint-disable no-bitwise */\r\n // tslint:disable-next-line:no-bitwise\r\n ? ((Number(a) ^ Math.random() * 16) >> Number(a) / 4).toString(16)\r\n : (`${1e7}-${1e3}-${4e3}-${8e3}-${1e11}`).replace(/[018]/g, getUuid);\r\n}\r\n\r\nexport function makeId(length = 5): string {\r\n let result = '';\r\n const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\r\n const charactersLength = characters.length;\r\n for ( let i = 0; i < length; i++ ) {\r\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\r\n }\r\n return result;\r\n}\r\n","export class SeededShuffle {\r\n // tslint:disable-next-line:variable-name\r\n private __seed: number;\r\n private seed: number;\r\n\r\n strSeed: string;\r\n\r\n\r\n fixedShuffle(arr: TType[], fixedPositions: boolean[], seed: string | number, copy = false) {\r\n\r\n const fixed = arr.reduce((acc, e, i) => {\r\n if (fixedPositions[i]) {\r\n acc.push([e, i]);\r\n }\r\n return acc;\r\n }, []);\r\n\r\n const returnArr = this.shuffle(arr, seed, copy);\r\n\r\n fixed.forEach(([item, initialIndex]) => {\r\n const currentIndex = returnArr.indexOf(item);\r\n [returnArr[initialIndex], returnArr[currentIndex]] = [returnArr[currentIndex], returnArr[initialIndex]];\r\n });\r\n\r\n return returnArr;\r\n }\r\n\r\n shuffle(arr: TType[], seed: string | number, copy = false) {\r\n if (this.getType(arr) === 'Array') {\r\n if (this.setSeed(seed)) {\r\n const shuff = copy ? arr.slice(0) : arr;\r\n const size = shuff.length;\r\n const map = this.genMap(size);\r\n\r\n for (let i = size - 1; i > 0; i--) {\r\n shuff[i] = shuff.splice(map[size - 1 - i], 1, shuff[i])[0];\r\n }\r\n return shuff;\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n unshuffle(arr: TType[], seed: string | number, copy = false) {\r\n if (this.getType(arr) === 'Array') {\r\n if (this.setSeed(seed)) {\r\n const shuff = copy ? arr.slice(0) : arr;\r\n const size = shuff.length;\r\n const map = this.genMap(size);\r\n for (let i = 1; i < size; i++) {\r\n shuff[i] = shuff.splice(map[size - 1 - i], 1, shuff[i])[0];\r\n }\r\n return shuff;\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n private genMap(size) {\r\n const map = new Array(size);\r\n for (let x = 0; x < size; x++) {\r\n // Don't change these numbers.\r\n // tslint:disable-next-line:no-bitwise\r\n map[x] = (((this.__seed = (this.__seed * 9301 + 49297) % 233280) / 233280.0) * size) | 0;\r\n }\r\n return map;\r\n }\r\n\r\n private setSeed(seed) {\r\n if (!/(number|string)/i.test(this.getType(seed))) {\r\n return false;\r\n }\r\n if (isNaN(seed)) {\r\n seed = String((this.strSeed = seed))\r\n .split('')\r\n .map(x => {\r\n return x.charCodeAt(0);\r\n })\r\n .join('');\r\n }\r\n return (this.__seed = this.seed = Number(seed));\r\n }\r\n\r\n private getType(obj) {\r\n return Object.prototype.toString\r\n .call(obj)\r\n .match(/^\\[object (.*)\\]$/)[1];\r\n }\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { ActivatedRoute } from '@angular/router';\r\n\r\n@Component({\r\n selector: 'hyd-web-form-session',\r\n templateUrl: './session.component.html',\r\n styleUrls: ['./session.component.scss']\r\n})\r\nexport class SessionComponent implements OnInit {\r\n\r\n sessionId: string;\r\n\r\n constructor(\r\n private route: ActivatedRoute) { }\r\n\r\n ngOnInit() {\r\n this.sessionId = this.route.snapshot.paramMap.get('sessionId');\r\n }\r\n}\r\n","import { BrowserModule } from '@angular/platform-browser';\r\nimport { NgModule, ErrorHandler } from '@angular/core';\r\n\r\nimport { AppComponent } from './app.component';\r\nimport { RouterModule, Routes } from '@angular/router';\r\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\r\nimport { NbDialogModule, NbButtonModule } from '@nebular/theme';\r\n\r\nimport { HydLibFormLogicModule } from '@hyd-lib-form-logic';\r\nimport { HydLibFormUiModule } from '@hyd-lib-form-ui';\r\nimport { HydLibThemeModule } from '@hyd-lib-theme';\r\nimport { Environment } from '@hyd-lib';\r\n\r\nimport { HttpClientModule } from '@angular/common/http';\r\nimport { SessionComponent } from './session/session.component';\r\nimport { environment } from '../environments/environment';\r\nimport { LoggerModule, NgxLoggerLevel } from 'ngx-logger';\r\nimport { SentryErrorHandler } from './app.errorhandler';\r\n\r\nimport { I18NextModule } from 'angular-i18next';\r\nimport { I18N_PROVIDERS } from './i18next';\r\n\r\nimport { polyfill as smoothScrollPolyfill } from 'smoothscroll-polyfill';\r\nimport { SessionController } from '@hyd-lib-form-logic/controllers/session.controller';\r\n\r\nsmoothScrollPolyfill();\r\n\r\nconst appRoutes: Routes = [\r\n { path: ':sessionId', component: SessionComponent }\r\n];\r\n\r\nconst ENVIRONMENT_PROVIDER = {\r\n provide: Environment,\r\n useFactory: () => {\r\n return new Environment(environment);\r\n }\r\n};\r\n\r\n@NgModule({\r\n declarations: [\r\n AppComponent,\r\n SessionComponent,\r\n ],\r\n imports: [\r\n BrowserModule,\r\n RouterModule.forRoot(appRoutes, { initialNavigation: 'enabled', relativeLinkResolution: 'legacy' }),\r\n HttpClientModule,\r\n BrowserAnimationsModule,\r\n HydLibThemeModule.forRoot(),\r\n HydLibFormLogicModule.forRoot(),\r\n HydLibFormUiModule,\r\n NbDialogModule.forRoot({ hasBackdrop: true, autoFocus: true }),\r\n NbButtonModule,\r\n LoggerModule.forRoot(environment.loggerLevel),\r\n I18NextModule.forRoot()\r\n ],\r\n providers: [\r\n ENVIRONMENT_PROVIDER,\r\n { provide: ErrorHandler, useClass: SentryErrorHandler },\r\n I18N_PROVIDERS,\r\n SessionController\r\n ],\r\n bootstrap: [AppComponent]\r\n})\r\nexport class AppModule {\r\n\r\n}\r\n","import { Component, HostBinding } from '@angular/core';\r\nimport { HydThemeService } from '@hyd-lib-theme';\r\nimport { Environment } from '@hyd-lib';\r\n\r\n@Component({\r\n selector: 'hyd-web-form-root',\r\n templateUrl: './app.component.html'\r\n})\r\nexport class AppComponent {\r\n\r\n @HostBinding('class.hidden')\r\n hidden = true;\r\n\r\n constructor(\r\n private themeService: HydThemeService,\r\n private environment: Environment\r\n ) {\r\n\r\n console.log(`HYD Web Form v${environment.version}`);\r\n\r\n this.themeService.onThemeLoaded.subscribe(() => {\r\n this.hidden = false;\r\n });\r\n }\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { ReloadService } from '@hyd-lib-form-logic/services/reload.service';\r\n\r\n@Component({\r\n selector: 'hyd-form-session-restart',\r\n template: `\r\n \r\n \r\n
Session Error
\r\n
\r\n \r\n This form session has been opened in another browser or tab.\r\n
\r\n
\r\n Click the button below to reactivate the session in this tab.\r\n
\r\n \r\n \r\n \r\n
\r\n `\r\n})\r\nexport class SessionRestartComponent {\r\n\r\n constructor(\r\n private reloadService: ReloadService\r\n ) { }\r\n\r\n reloadSession() {\r\n this.reloadService.overrideWarning = true;\r\n location.reload();\r\n }\r\n}\r\n","// This code was generated by a Reinforced.Typings tool. \r\n// Changes to this file may cause incorrect behavior and will be lost if\r\n// the code is regenerated.\r\n\r\nexport enum EAnswerType { \r\n\tNone = 0, \r\n\tText = 1, \r\n\tNumber = 2, \r\n\tEmail = 3, \r\n\tSelector = 4, \r\n\tImage = 5, \r\n\tDate = 6, \r\n\tTime = 7, \r\n\tDateTime = 8, \r\n\tSignature = 9\r\n}\r\nexport enum EElementType { \r\n\tIgnore = 0, \r\n\tDisplay = 1, \r\n\tDisplayGroup = 2, \r\n\tAction = 5, \r\n\tActionGroup = 6, \r\n\tQuestion = 9\r\n}\r\nexport enum ERuntimeState { \r\n\tUnknown = 1, \r\n\tInitializing = 10, \r\n\tOk = 200, \r\n\tComplete = 210, \r\n\tFailed = 400\r\n}\r\nexport enum EFormSessionState { \r\n\tNew = 5, \r\n\tCollecting = 10, \r\n\tComplete = 20, \r\n\tFinalized = 500, \r\n\tSourceFailed = 801, \r\n\tArchived = 900, \r\n\tDeleted = 950\r\n}\r\nexport enum ELogicComparator { \r\n\tLessThan = 1, \r\n\tGreaterThan = 2, \r\n\tEqualTo = 3, \r\n\tSelected = 4, \r\n\tAnswered = 5, \r\n\tBetween = 6\r\n}\r\nexport enum ENavigationAction { \r\n\tGoto = 1\r\n}\r\nexport enum ELogicOperator { \r\n\tAnd = 1, \r\n\tOr = 2, \r\n\tLookup = 3\r\n}\r\nexport enum EResultFinishType { \r\n\tStandard = 1, \r\n\tPartial = 2\r\n}\r\nexport enum EResponseValueType { \r\n\tText = 1, \r\n\tNumber = 2, \r\n\tDecimal = 3, \r\n\tDate = 10, \r\n\tTime = 11, \r\n\tDateTime = 12, \r\n\tImage = 30, \r\n\tJSON = 31, \r\n\tItteration = 50\r\n}\r\nexport enum EFormModeType { \r\n\tUnknown = 0, \r\n\tTesting = 1, \r\n\tPublished = 2\r\n}\r\nexport enum EFormOption { \r\n\tFooter = \"Footer\", \r\n\tStartFooter = \"StartFooter\", \r\n\tFinishFooter = \"FinishFooter\", \r\n\tDisableBackButton = \"DisableBackButton\", \r\n\tProgressBar = \"ProgressBar\"\r\n}\r\nexport enum EFormProgressBar { \r\n\tNone = \"None\", \r\n\tTop = \"Top\", \r\n\tBottom = \"Bottom\"\r\n}\r\nexport interface INavRuleModel\r\n{\r\n\tId: number;\r\n\tDestinationId: number;\r\n\tOrder: number;\r\n\tAction: ENavigationAction;\r\n\tItems: ILogicItemModel[];\r\n}\r\nexport interface IConditionModel\r\n{\r\n\tId: number;\r\n\tAnswerId: number;\r\n\tComparator: ELogicComparator;\r\n\tValue: string;\r\n\tValue2: string;\r\n\tNegate: boolean;\r\n\tIncludes: boolean;\r\n}\r\nexport interface IStatementModel\r\n{\r\n\tId: number;\r\n\tText: string;\r\n}\r\nexport interface IAnswerModel\r\n{\r\n\tId: number;\r\n\tAnswerType: EAnswerType;\r\n\tText: string;\r\n\tScore: number;\r\n\tResourceIdentifier: string;\r\n\tExclusive: boolean;\r\n\tFixedPosition: boolean;\r\n\tOrder: number;\r\n\tImage: string;\r\n\tOptions: { [key:string]: string };\r\n}\r\nexport interface IElementTreeModel\r\n{\r\n\tVersion: number;\r\n\tRoot: IElementTreeNodeModel[];\r\n}\r\nexport interface IElementModel\r\n{\r\n\tId: number;\r\n\tElementType: EElementType;\r\n\tSubType: string;\r\n\tText: string;\r\n\tInstructionText: string;\r\n\tAnswers: IAnswerModel[];\r\n\tStatements: IStatementModel[];\r\n\tFixedPosition: boolean;\r\n\tRequired: boolean;\r\n\tImage: string;\r\n\tOptions: { [key:string]: string };\r\n\tConditions: IConditionModel[];\r\n\tNavigation: INavRuleModel[];\r\n}\r\nexport interface IFormConfigModel\r\n{\r\n\tId: number;\r\n\tVersion: number;\r\n\tName: string;\r\n\tDescription: string;\r\n\tMode: EFormModeType;\r\n\tOptions: { [key:string]: string };\r\n\tElementTree: IElementTreeModel;\r\n}\r\nexport interface IElementTreeNodeModel\r\n{\r\n\tId: number;\r\n\tType: EElementType;\r\n\tNodes: IElementTreeNodeModel[];\r\n}\r\nexport interface IResponseModel\r\n{\r\n\tId: string;\r\n\tParentId: string;\r\n\tElementType: EElementType;\r\n\tValid: boolean;\r\n\tCreateDate: any;\r\n\tModifiedDate: any;\r\n\tValues: IResponseValueModel[];\r\n}\r\nexport interface IResponseValueModel\r\n{\r\n\tAnswerId: number;\r\n\tStatementId: number;\r\n\tType: EResponseValueType;\r\n\tValue: string;\r\n\tContentId: string;\r\n\tValid: boolean;\r\n}\r\nexport interface ILogicItemModel\r\n{\r\n\tId: number;\r\n\tOperator: ELogicOperator;\r\n\tItems: ILogicItemModel[];\r\n}\r\nexport interface IFormSessionCreateModel\r\n{\r\n\tFormId: number;\r\n\tSourceType: number;\r\n\tFormSourceId: string;\r\n\tFormSourceRef: string;\r\n\tFormDomain: string;\r\n}\r\nexport interface IFormSessionModel\r\n{\r\n\tSessionId: string;\r\n\tCreateDate: any;\r\n\tModifiedDate: any;\r\n\tState: EFormSessionState;\r\n\tResultStart: IResultStartModel;\r\n\tResultFinish: IResultFinishModel;\r\n\tFormId: number;\r\n\tFormVersionId: number;\r\n\tFormDomainId: string;\r\n\tFormCacheId: string;\r\n\tDebugTrace: string;\r\n\tRuntimeState: ERuntimeState;\r\n}\r\nexport interface IResultStartModel\r\n{\r\n\tStartDate: any;\r\n}\r\nexport interface IResultFinishModel\r\n{\r\n\tEndDate: any;\r\n\tFinishType: EResultFinishType;\r\n}\r\nexport interface IFormSessionInfoModel\r\n{\r\n\tSessionId: string;\r\n\tCreateDate: any;\r\n\tModifiedDate: any;\r\n\tState: EFormSessionState;\r\n\tFormId: number;\r\n\tFormVersionId: number;\r\n\tFormDomainId: string;\r\n\tFormName: string;\r\n}\r\nexport interface IFormDownloadInfoModel\r\n{\r\n\tFormId: number;\r\n\tName: string;\r\n\tCurrentVersionId: number;\r\n\tCurrentMode: EFormModeType;\r\n\tCreateDateUTC: any;\r\n\tUpdateDateUTC: any;\r\n}\r\n","import { HttpHeaders, HttpClient, HttpErrorResponse } from '@angular/common/http';\r\nimport { Subscription, Observable, BehaviorSubject } from 'rxjs';\r\nimport { Injectable } from '@angular/core';\r\nimport { distinctUntilChanged } from 'rxjs/operators';\r\n\r\nexport interface Request {\r\n id: string;\r\n queueName?: string;\r\n method: 'PUT' | 'POST' | 'GET' | 'DELETE';\r\n url: string;\r\n headers?: HttpHeaders;\r\n params?: { [id: string]: string};\r\n body?: any;\r\n responseType?: any;\r\n}\r\n\r\nexport interface QueueErrorState {\r\n error: boolean;\r\n retrying: boolean;\r\n errorMessage: string;\r\n}\r\n\r\n@Injectable()\r\nexport class RequestQueueService {\r\n\r\n private queue = new RequestQueue(this.http);\r\n\r\n get queueLength() {\r\n return this.queue.queueLength;\r\n }\r\n\r\n get $queueLength() {\r\n return this.queue.$queueLength;\r\n }\r\n\r\n get $errorState() {\r\n return this.queue.$errorState;\r\n }\r\n\r\n constructor(private http: HttpClient) {}\r\n\r\n addRequestToQueue(request: Request) {\r\n\r\n return new Promise((resolve, reject) => {\r\n\r\n this.queue.addToQueue(request, resolve, reject);\r\n });\r\n }\r\n\r\n retry() {\r\n this.queue.retry();\r\n }\r\n}\r\n\r\nexport interface RequestQueueItem {\r\n request: Request;\r\n reject: ((error?: any) => void)[];\r\n resolve: ((value?: any) => void)[];\r\n}\r\n\r\nexport interface ActiveRequestItem {\r\n queueItem: RequestQueueItem;\r\n requestSubscription: Subscription;\r\n}\r\n\r\nclass RequestQueue {\r\n\r\n get maxConcurrent() {\r\n return this.errorState.value.error ? 1 : 5;\r\n }\r\n\r\n private _queue: RequestQueueItem[] = [];\r\n private _activeRequests: ActiveRequestItem[] = [];\r\n\r\n queueLength = new BehaviorSubject(0);\r\n $queueLength = this.queueLength.pipe(distinctUntilChanged());\r\n\r\n errorState = new BehaviorSubject({\r\n error: false, retrying: false, errorMessage: ''\r\n });\r\n $errorState = this.errorState.asObservable();\r\n\r\n constructor(private http: HttpClient) {\r\n\r\n }\r\n\r\n addToQueue(\r\n request: Request,\r\n resolve: (value: TRequestReturnType) => void,\r\n reject: () => void) {\r\n\r\n const replaceQueueItem = request.method === 'POST' || request.method === 'PUT';\r\n\r\n const processQueueItem = (queueItem: RequestQueueItem) => {\r\n if (replaceQueueItem) {\r\n queueItem.reject.forEach(r => r());\r\n this._queue.push({ request, resolve: [resolve], reject: [reject] });\r\n this.processQueue();\r\n } else {\r\n queueItem.reject.push(reject);\r\n queueItem.resolve.push(resolve);\r\n }\r\n };\r\n\r\n for (const activeRequest of this._activeRequests) {\r\n\r\n if (activeRequest.queueItem.request.id === request.id) {\r\n\r\n if (replaceQueueItem) {\r\n activeRequest.requestSubscription.unsubscribe();\r\n this._activeRequests = this._activeRequests.filter(x => x !== activeRequest);\r\n }\r\n\r\n processQueueItem(activeRequest.queueItem);\r\n\r\n return;\r\n }\r\n }\r\n\r\n for (const queueItem of this._queue) {\r\n\r\n if (queueItem.request.id === request.id) {\r\n if (replaceQueueItem) {\r\n queueItem.reject.forEach(r => r());\r\n this._queue = this._queue.filter(x => x !== queueItem);\r\n }\r\n\r\n processQueueItem(queueItem);\r\n\r\n return;\r\n }\r\n }\r\n\r\n if (request.method === 'GET') {\r\n this._queue.unshift({ request, resolve: [resolve], reject: [reject] });\r\n } else {\r\n this._queue.push({ request, resolve: [resolve], reject: [reject] });\r\n }\r\n\r\n this.processQueue();\r\n }\r\n\r\n processQueue() {\r\n\r\n this.queueLength.next(this._activeRequests.length + this._queue.length);\r\n\r\n if (this.queueLength.value === 0 && this.errorState.value.error) {\r\n if (this.errorState.error) {\r\n this.errorState.next({ errorMessage: '', error: false, retrying: false });\r\n }\r\n }\r\n\r\n if (this._activeRequests.length >= this.maxConcurrent || this._queue.length === 0) {\r\n return;\r\n }\r\n\r\n const queueItemToProcess = this._queue.shift();\r\n\r\n const { url, body, params, headers, method, responseType } = queueItemToProcess.request;\r\n\r\n const createRequest = () => {\r\n\r\n switch (method) {\r\n case 'DELETE':\r\n return this.http.delete(url, { headers, params });\r\n case 'GET':\r\n return this.http.get(url, { headers, params, responseType });\r\n case 'POST':\r\n return this.http.post(url, body, { headers, params });\r\n case 'PUT':\r\n return this.http.put(url, body, { headers, params });\r\n }\r\n };\r\n\r\n const request = createRequest();\r\n\r\n const requestSubscription = request.subscribe(value => {\r\n\r\n queueItemToProcess.resolve.forEach(r => r(value));\r\n\r\n requestSubscription.unsubscribe();\r\n this._activeRequests = this._activeRequests.filter(x => x.requestSubscription !== requestSubscription);\r\n this.processQueue();\r\n\r\n }, (error) => {\r\n\r\n if (this.shouldIgnoreError(queueItemToProcess, error)) {\r\n requestSubscription.unsubscribe();\r\n queueItemToProcess.reject.forEach(r => r());\r\n this._activeRequests = this._activeRequests.filter(x => x.requestSubscription !== requestSubscription);\r\n this.processQueue();\r\n } else {\r\n this.queueError(error as any);\r\n }\r\n });\r\n\r\n this._activeRequests.push({\r\n queueItem: queueItemToProcess,\r\n requestSubscription\r\n });\r\n\r\n this.processQueue();\r\n }\r\n\r\n retry() {\r\n\r\n const currentState = this.errorState.value;\r\n if (currentState.error) {\r\n\r\n this.processQueue();\r\n\r\n currentState.retrying = true;\r\n this.errorState.next(currentState);\r\n }\r\n }\r\n\r\n queueError(error: HttpErrorResponse) {\r\n\r\n this._activeRequests.forEach(activeRequest => {\r\n activeRequest.requestSubscription.unsubscribe();\r\n this._queue.unshift(activeRequest.queueItem);\r\n });\r\n\r\n this._activeRequests = [];\r\n\r\n if (error?.status !== 418) {\r\n this.errorState.next({\r\n error: true,\r\n retrying: false,\r\n errorMessage: error.message\r\n });\r\n }\r\n }\r\n\r\n shouldIgnoreError(item: RequestQueueItem, error: HttpErrorResponse) {\r\n\r\n if (item.request?.queueName === 'meta' && error?.status === 404) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n}\r\n","import { NGXLogger } from 'ngx-logger';\r\nimport { EResultFinishType, } from '@hyd-form-provider';\r\nimport { FormController } from './form.controller';\r\nimport { FormViewModel, IFormViewModel } from '@hyd-lib-form-logic/data/models/form.viewmodel';\r\nimport { Injectable, InjectionToken } from '@angular/core';\r\nimport { SessionService } from '@hyd-lib-form-logic/services/session.service';\r\nimport { LoopElementController } from './elements/loop/loop.controller';\r\nimport { ValidationService } from '@hyd-lib-form-logic/services/form/validation.service';\r\nimport { localDateString } from '@hyd-lib';\r\n\r\nconst SESSION_CONTROLLER = new InjectionToken('SessionController');\r\n\r\nexport type SessionState = 'loading' | 'error' | 'running';\r\n\r\nexport interface ISessionController {\r\n state: SessionState;\r\n form: FormController;\r\n formViewModel: IFormViewModel;\r\n\r\n intializeSession(sessionId: string): void;\r\n\r\n goBack(): void;\r\n goNext(): void;\r\n}\r\n\r\n@Injectable()\r\nexport class SessionController implements ISessionController {\r\n state: SessionState = 'loading';\r\n\r\n sessionId: string;\r\n\r\n get session() {\r\n return this.sessionService.activeSession\r\n }\r\n\r\n get errorMessage() {\r\n return this.sessionService.errorMessage;\r\n }\r\n\r\n cancelPoll: () => void;\r\n\r\n constructor(\r\n private sessionService: SessionService,\r\n private logger: NGXLogger,\r\n public form: FormController,\r\n public formViewModel: FormViewModel,\r\n private validationService: ValidationService\r\n ) {\r\n\r\n logger.info('Session Controller');\r\n\r\n this.sessionService.activeSessionReset.subscribe(() => {\r\n this.state = 'loading';\r\n this.formViewModel.reset();\r\n });\r\n\r\n this.form.state.subscribe(state => {\r\n switch (state) {\r\n case 'ready':\r\n this.state = 'running';\r\n break;\r\n case 'error':\r\n this.state = 'error';\r\n break;\r\n }\r\n });\r\n\r\n this.sessionService.sessionError.subscribe(error => {\r\n this.state = 'error';\r\n });\r\n\r\n this.form.activeElementControllerChanged.subscribe(newActiveElement => {\r\n this.logger.info(\r\n 'Active Element Controller Changed',\r\n newActiveElement.element\r\n );\r\n this.formViewModel.changeActiveElement(newActiveElement);\r\n });\r\n }\r\n\r\n intializeSession(sessionId: string) {\r\n this.logger.info('Initializing session', sessionId);\r\n\r\n this.state = 'loading';\r\n\r\n this.sessionService.setActiveSessionId(sessionId);\r\n }\r\n\r\n destroy() {\r\n this.sessionService.destroy();\r\n }\r\n\r\n async startForm() {\r\n this.sessionService.startResult({\r\n StartDate: localDateString()\r\n });\r\n\r\n this.goNext();\r\n }\r\n\r\n async finishForm() {\r\n\r\n const sessionId = this.sessionId;\r\n\r\n await this.sessionService.finishResult({\r\n EndDate: localDateString(),\r\n FinishType: EResultFinishType.Standard\r\n });\r\n\r\n this.sessionService.completeSession();\r\n }\r\n\r\n startIteration() {\r\n this.form.startIteration(this.form.activeElementController as LoopElementController);\r\n }\r\n\r\n goBack() {\r\n this.form.navigateBack();\r\n }\r\n\r\n goNext() {\r\n\r\n if (this.form.activeElementController.subType === 'Finish') {\r\n return;\r\n }\r\n\r\n const validation = this.form.activeElementController.validation;\r\n\r\n if (!validation.isValid) {\r\n\r\n this.validationService.flashValidationMessage();\r\n return;\r\n }\r\n\r\n this.form.navigateNext();\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { RequestQueueService } from './request-queue.service';\r\nimport { SessionController } from '@hyd-lib-form-logic/controllers/session.controller';\r\nimport { EFormSessionState } from '@hyd-form-provider';\r\n\r\n@Injectable({providedIn: 'any'})\r\nexport class ReloadService {\r\n\r\n overrideWarning = false;\r\n\r\n constructor(\r\n private requestQueueService: RequestQueueService,\r\n private sessionController: SessionController) {\r\n\r\n }\r\n\r\n canUnloadSafely() {\r\n\r\n if (this.overrideWarning) {\r\n return true;\r\n }\r\n\r\n return this.requestQueueService.queueLength.value === 0\r\n && this.sessionController.session.State === EFormSessionState.Complete\r\n }\r\n}\r\n","\n \n \n
Session Error
\n
\n \n This form session has been opened in another browser or tab.\n
\n
\n Click the button below to reactivate the session in this tab.\n
\n \n \n \n
\n ","import { Component, OnInit, OnDestroy } from '@angular/core';\r\nimport { ReloadService } from '@hyd-lib-form-logic/services/reload.service';\r\nimport { NbDialogRef } from '@nebular/theme';\r\nimport { RequestQueueService } from '@hyd-lib-form-logic/services/request-queue.service';\r\nimport { Subscription } from 'rxjs';\r\n\r\n@Component({\r\n selector: 'hyd-form-connection-error',\r\n template: `\r\n \r\n \r\n
Connection Error
\r\n
\r\n \r\n There was an error contacting the server\r\n
\r\n
\r\n Please check that your browser has internet connectivity and try again\r\n
\r\n \r\n \r\n \r\n
\r\n `\r\n})\r\nexport class ConnectionErrorComponent implements OnDestroy {\r\n\r\n private errorSubscription: Subscription;\r\n retrying = false;\r\n message = '';\r\n\r\n constructor(\r\n private requestQueueService: RequestQueueService,\r\n private dialigRef: NbDialogRef\r\n ) {\r\n\r\n this.errorSubscription = this.requestQueueService.$errorState.subscribe(errorState => {\r\n if (errorState.error) {\r\n this.retrying = errorState.retrying;\r\n this.message = errorState.errorMessage;\r\n } else {\r\n this.dialigRef.close();\r\n }\r\n });\r\n }\r\n\r\n ngOnDestroy() {\r\n this.errorSubscription.unsubscribe();\r\n }\r\n\r\n retryRequestQueue() {\r\n this.requestQueueService.retry();\r\n }\r\n}\r\n","\n \n \n
Connection Error
\n
\n \n There was an error contacting the server\n
\n
\n Please check that your browser has internet connectivity and try again\n
\n \n \n \n
\n ","import { Component, OnInit, OnChanges, Input, SimpleChanges } from '@angular/core';\r\n\r\nimport { SessionController } from '@hyd-lib-form-logic/controllers/session.controller';\r\nimport { StartElementController } from '@hyd-lib-form-logic/controllers/elements/start/start.controller';\r\n\r\n@Component({\r\n selector: 'hyd-form-action-start',\r\n templateUrl: './start.component.html'\r\n})\r\nexport class StartComponent implements OnInit, OnChanges {\r\n\r\n @Input() controller: StartElementController;\r\n\r\n private _elementHTML = '';\r\n get elementHTML() { return this._elementHTML; }\r\n\r\n constructor(\r\n private _sessionController: SessionController\r\n ) { }\r\n\r\n ngOnInit() {\r\n\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n\r\n this._elementHTML = this.controller.element.Text.replace(/(?:\\r\\n|\\r|\\n)/g, '
');\r\n }\r\n\r\n buttonClicked(event: MouseEvent) {\r\n\r\n this._sessionController.startForm();\r\n }\r\n}\r\n","\r\n","import { Component, OnInit, Input } from '@angular/core';\r\n\r\nimport { FinishElementController } from '@hyd-lib-form-logic/controllers/elements/finish/finish.controller';\r\nimport { SessionController } from '@hyd-lib-form-logic/controllers/session.controller';\r\n\r\nimport { RequestQueueService } from '@hyd-lib-form-logic/services/request-queue.service';\r\n\r\n@Component({\r\n selector: 'hyd-form-action-finish',\r\n templateUrl: './finish.component.html'\r\n})\r\nexport class FinishComponent implements OnInit {\r\n\r\n @Input() controller: FinishElementController;\r\n finalized = false;\r\n\r\n get q() {\r\n return this._requestQueueService.$queueLength;\r\n }\r\n\r\n constructor(\r\n private _sessionController: SessionController,\r\n private _requestQueueService: RequestQueueService\r\n ) {\r\n }\r\n\r\n ngOnInit() {\r\n\r\n }\r\n\r\n buttonClicked(event: MouseEvent) {\r\n\r\n this._sessionController.finishForm().then(() => {\r\n this.finalized = true;\r\n });\r\n }\r\n}\r\n","\r\n","// https://fontawesome.com/icons\r\nimport {\r\n faCheck,\r\n faCalendarAlt,\r\n faKeyboard,\r\n faArrows,\r\n faSortSizeDown,\r\n faSatellite,\r\n faSatelliteDish,\r\n faGlobeAfrica,\r\n faRedo,\r\n faArrowLeft,\r\n faTrash,\r\n faSignature,\r\n faHandPointUp,\r\n faTimes,\r\n faImage,\r\n faCamera,\r\n faBarcodeScan,\r\n faBarcodeRead,\r\n faBarcode,\r\n faQrcode,\r\n faLightbulbSlash,\r\n faLightbulbOn,\r\n faArrowUp,\r\n faArrowDown,\r\n faClock,\r\n faGripVertical,\r\n faAsterisk,\r\n faPlus,\r\n faArrowRight,\r\n faDigging,\r\n faBan\r\n} from '@fortawesome/pro-regular-svg-icons';\r\n\r\nexport const formIcons = [\r\n faCheck,\r\n faCalendarAlt,\r\n faKeyboard,\r\n faArrows,\r\n faSortSizeDown,\r\n faSatelliteDish,\r\n faSatellite,\r\n faGlobeAfrica,\r\n faRedo,\r\n faArrowLeft,\r\n faArrowRight,\r\n faArrowUp,\r\n faArrowDown,\r\n faTrash,\r\n faSignature,\r\n faHandPointUp,\r\n faTimes,\r\n faImage,\r\n faCamera,\r\n faBarcodeScan,\r\n faBarcodeRead,\r\n faBarcode,\r\n faQrcode,\r\n faLightbulbSlash,\r\n faLightbulbOn,\r\n faClock,\r\n faGripVertical,\r\n faAsterisk,\r\n faPlus,\r\n faDigging,\r\n faBan\r\n];\r\n\r\nexport const iconNames = {\r\n check: faCheck.iconName,\r\n calendarAlt: faCalendarAlt.iconName,\r\n keyboard: faKeyboard.iconName,\r\n arrows: faArrows.iconName,\r\n sortSizeDown: faSortSizeDown.iconName,\r\n satellite: faSatellite.iconName,\r\n satelliteDish: faSatelliteDish.iconName,\r\n globeAfrica: faGlobeAfrica.iconName,\r\n redo: faRedo.iconName,\r\n arrowLeft: faArrowLeft.iconName,\r\n arrowRight: faArrowRight.iconName,\r\n trash: faTrash.iconName,\r\n signature: faSignature.iconName,\r\n handPointUp: faHandPointUp.iconName,\r\n times: faTimes.iconName,\r\n image: faImage.iconName,\r\n camera: faCamera.iconName,\r\n barcode: faBarcode.iconName,\r\n barcodeScan: faBarcodeScan.iconName,\r\n barcodeRead: faBarcodeRead.iconName,\r\n qrCode: faQrcode.iconName,\r\n lightbulbSlash: faLightbulbSlash.iconName,\r\n lightbulbOn: faLightbulbOn.iconName,\r\n arrowUp: faArrowUp.iconName,\r\n arrowDown: faArrowDown.iconName,\r\n clock: faClock.iconName,\r\n gripVertical: faGripVertical.iconName,\r\n asterisk: faAsterisk.iconName,\r\n plus: faPlus.iconName,\r\n digging: faDigging.iconName,\r\n ban: faBan.iconName\r\n};\r\n","import { Component, OnInit, Input } from '@angular/core';\r\nimport { LoopElementController } from '@hyd-lib-form-logic/controllers/elements/loop/loop.controller';\r\nimport { SessionController } from '@hyd-lib-form-logic/controllers/session.controller';\r\nimport { ResponseService } from '@hyd-lib-form-logic/services/response.service';\r\nimport { IterationId } from '@hyd-lib-form-logic/data/models/form-path.model';\r\nimport { iconNames } from '@hyd-lib-form-ui/form.icons';\r\nimport { ElementService } from '@hyd-lib-form-logic/services/form/element.service';\r\n\r\n@Component({\r\n selector: 'hyd-form-element-loop',\r\n templateUrl: './loop.component.html',\r\n styleUrls: []\r\n})\r\nexport class LoopComponent implements OnInit {\r\n\r\n @Input() controller: LoopElementController;\r\n\r\n icons = iconNames;\r\n\r\n constructor(\r\n private sessionController: SessionController,\r\n private responseService: ResponseService) { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n addIteration() {\r\n this.sessionController.startIteration();\r\n }\r\n\r\n continueSurvey() {\r\n this.sessionController.goNext();\r\n }\r\n}\r\n\r\n@Component({\r\n selector: 'hyd-form-element-loop-iteration',\r\n template: '({{ iterationCount + 1}}) - {{ label | async }}',\r\n styles: [':host {display:block}']\r\n})\r\nexport class LoopIterationComponent implements OnInit {\r\n\r\n @Input() controller: LoopElementController;\r\n @Input() iterationCount: number;\r\n @Input() iterationId: IterationId;\r\n\r\n label: Promise;\r\n\r\n constructor(\r\n private elementService: ElementService,\r\n private responseService: ResponseService) { }\r\n\r\n ngOnInit() {\r\n\r\n this.label = new Promise((resolve, reject) => {\r\n\r\n const defaultLabel = this.controller.defaultIterationLabel;\r\n\r\n if (this.controller.loopIdentityElementId) {\r\n this.elementService.getElementById(this.controller.loopIdentityElementId).then(identityElement => {\r\n this.responseService.getResponseForElement(identityElement, this.iterationId).then(response => {\r\n if (response && response.Values.length > 0) {\r\n resolve(response.Values[0].Value);\r\n } else {\r\n resolve(defaultLabel);\r\n }\r\n }).catch(e => {\r\n resolve(defaultLabel);\r\n });\r\n }).catch(e => {\r\n resolve(defaultLabel);\r\n });\r\n } else {\r\n resolve(defaultLabel);\r\n }\r\n });\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\nimport { IElementModel } from '@hyd-form-provider';\r\nimport { ElementRepository } from '@hyd-lib-form-logic/data/repositories/element.repository';\r\nimport { SessionService } from '../session.service';\r\n\r\nexport interface IElementService {\r\n getElementById(elementId: number): Promise;\r\n}\r\n\r\n@Injectable()\r\nexport class ElementService implements IElementService {\r\n\r\n\r\n private _elementCache: { [id: number]: IElementModel } = {};\r\n\r\n constructor(\r\n private sessionService: SessionService,\r\n private elementRepository: ElementRepository) {\r\n this.sessionService.activeSessionReset.subscribe(() => {\r\n this.reset();\r\n });\r\n }\r\n\r\n async getElementById(elementId: number): Promise {\r\n\r\n if (!this._elementCache[elementId]) {\r\n\r\n const element = await this.elementRepository.getElementById(elementId);\r\n this._elementCache[elementId] = element;\r\n }\r\n\r\n return Promise.resolve(this._elementCache[elementId]);\r\n }\r\n\r\n reset() {\r\n this._elementCache = {};\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ResponseRepository } from '@hyd-lib-form-logic/data/repositories/response.repository';\r\nimport { IResponseModel, IElementModel } from '@hyd-form-provider';\r\nimport { localDateString, getUuid } from '@hyd-lib';\r\nimport { SessionService } from './session.service';\r\nimport { IterationId } from '@hyd-lib-form-logic/data/models/form-path.model';\r\n\r\nexport interface ResponseCache { [id: number]: ElementResponseCache; }\r\nexport interface ElementResponseCache { [iterationId: string]: IResponseModel; }\r\n\r\nexport interface IResponseService {\r\n getResponseForElement(element: IElementModel, iterationId: IterationId): Promise;\r\n saveResponse(response: IResponseModel, elementId: number): Promise;\r\n saveContent(fileName: string, data: string | Blob): Promise;\r\n getContent(fileName: string): Promise\r\n}\r\n\r\n@Injectable()\r\nexport class ResponseService implements IResponseService {\r\n private _responseCache: ResponseCache = {};\r\n\r\n constructor(\r\n private sessionService: SessionService,\r\n private respsonseRepository: ResponseRepository) {\r\n\r\n this.sessionService.activeSessionReset.subscribe(newSession => {\r\n this.reset();\r\n });\r\n }\r\n\r\n async getResponseForElement(element: IElementModel, iterationId: IterationId): Promise {\r\n\r\n let elementCache = this._responseCache[element.Id];\r\n\r\n if (!elementCache) {\r\n elementCache = {};\r\n }\r\n\r\n let response: IResponseModel;\r\n\r\n if (iterationId in elementCache) {\r\n response = elementCache[iterationId];\r\n } else {\r\n response = await this.respsonseRepository.getResponseForElementId(\r\n element.Id,\r\n iterationId\r\n );\r\n }\r\n\r\n if (!response) {\r\n\r\n const createdDate = localDateString();\r\n response = {\r\n Id: getUuid(),\r\n ParentId: iterationId === 'default' ? null : iterationId,\r\n Valid: true,\r\n CreateDate: createdDate,\r\n ModifiedDate: createdDate,\r\n Values: [],\r\n ElementType: element.ElementType\r\n };\r\n }\r\n\r\n elementCache[iterationId] = response;\r\n\r\n this.updateResponseCache(elementCache, element.Id);\r\n\r\n return response;\r\n }\r\n\r\n updateResponseCache(response: ElementResponseCache, elementId: number) {\r\n if (response) {\r\n this._responseCache[elementId] = response;\r\n }\r\n }\r\n\r\n reset() {\r\n this._responseCache = {};\r\n }\r\n\r\n async saveResponse(response: IResponseModel, elementId: number): Promise {\r\n\r\n let elementCache = this._responseCache[elementId];\r\n\r\n response.ModifiedDate = localDateString();\r\n\r\n if (!elementCache) {\r\n elementCache = {};\r\n this._responseCache[elementId] = elementCache;\r\n }\r\n\r\n let iterationId = response.ParentId;\r\n\r\n if (!iterationId) {\r\n iterationId = 'default';\r\n }\r\n\r\n elementCache[iterationId] = response;\r\n\r\n response.Values.forEach(r => {\r\n if (r.ContentId && r.Value) {\r\n this.respsonseRepository.saveContent(r.ContentId, r.Value);\r\n delete r.Value;\r\n }\r\n });\r\n\r\n this.updateResponseCache(elementCache, elementId);\r\n\r\n return await this.respsonseRepository.saveResponse(response, elementId);\r\n }\r\n\r\n async saveContent(fileName: string, data: string | Blob): Promise {\r\n return this.respsonseRepository.saveContent(fileName, data);\r\n }\r\n\r\n\r\n async getContent(fileName: string): Promise {\r\n return this.respsonseRepository.getContent(fileName);\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'hydHtml'\r\n})\r\nexport class HydElementHtmlPipe implements PipeTransform {\r\n\r\n transform(value: string, args?: any): any {\r\n if (typeof(value) !== 'string') {\r\n value = '';\r\n }\r\n return value.replace(/(?:\\r\\n|\\r|\\n)/g, '
');\r\n }\r\n\r\n}\r\n","import { Component, OnInit, Input, ChangeDetectionStrategy } from '@angular/core';\r\nimport { iconNames } from '@hyd-lib-form-ui/form.icons';\r\n\r\n@Component({\r\n selector: 'hyd-form-element-displaytext',\r\n template: `\r\n *\r\n \r\n `\r\n})\r\nexport class ElementTextComponent implements OnInit {\r\n\r\n @Input() text = '';\r\n @Input() required = false;\r\n\r\n icons = iconNames;\r\n\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","\n *\n \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\n","({{ iterationCount + 1}}) - {{ label | async }}","import { Component, OnInit, Input, ChangeDetectionStrategy, HostBinding, OnDestroy, ChangeDetectorRef } from '@angular/core';\r\nimport { InfoElementController } from '@hyd-lib-form-logic/controllers/elements/info/info.controller';\r\nimport { ResourceService } from '@hyd-lib-form-logic/services/resource.service';\r\nimport { Subscription } from 'rxjs';\r\n\r\n@Component({\r\n selector: 'hyd-form-element-info',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n templateUrl: './info.component.html'\r\n})\r\nexport class InfoComponent implements OnInit, OnDestroy {\r\n\r\n @Input() controller: InfoElementController;\r\n\r\n private _elementSubscription: Subscription;\r\n\r\n get hasMedia() {\r\n return this.controller.options.DisplayImage || this.controller.options.DisplayVideo;\r\n }\r\n\r\n get mediaResource() {\r\n\r\n if (typeof(this.controller.element.Image) === 'string') {\r\n return this.resourceService.getPathForResource(this.controller.element.Image);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n @HostBinding('class.image-above-text') get imageAboveText() {\r\n return this.controller.options.ImageAboveText;\r\n }\r\n\r\n constructor(\r\n private resourceService: ResourceService,\r\n private changeRef: ChangeDetectorRef\r\n ) { }\r\n\r\n ngOnInit() {\r\n this._elementSubscription = this.controller.elementChanged.subscribe(() => {\r\n this.changeRef.detectChanges();\r\n })\r\n }\r\n\r\n ngOnDestroy() {\r\n this._elementSubscription.unsubscribe();\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { SessionService } from './session.service';\r\nimport { SessionApiService, ResponseType } from './data/session-api.service';\r\n\r\nexport interface Resource {\r\n id: string;\r\n type: ResponseType;\r\n}\r\n\r\n@Injectable()\r\nexport class ResourceService {\r\n\r\n private _resourceCacheMap = new Map();\r\n\r\n constructor(\r\n private sessionService: SessionService,\r\n private sessionApiService: SessionApiService) { }\r\n\r\n getPathForResource(resourceId: string): string {\r\n\r\n const { FormId, FormVersionId, FormCacheId, FormDomainId } = this.sessionService.activeSession;\r\n\r\n return `/api/forms/${FormDomainId}/${FormId}/${FormVersionId}/${FormCacheId}/resources/${resourceId}`;\r\n }\r\n\r\n getPathForContent(contentId: string): string {\r\n\r\n const sessionId = this.sessionService.activeSessionId;\r\n\r\n return `/api/sessions/${sessionId}/content/${contentId}`;\r\n }\r\n\r\n async getResource(resourceId: string, resourceType: ResponseType = 'json'): Promise {\r\n\r\n const { FormId, FormVersionId, FormCacheId, FormDomainId } = this.sessionService.activeSession;\r\n\r\n return await this.sessionApiService.getResource(FormDomainId, FormId, FormVersionId, FormCacheId, resourceId, resourceType);\r\n }\r\n\r\n async cacheResources(resources: Resource[]): Promise {\r\n\r\n const resourcePromises = resources.map(resource => {\r\n if (typeof(resource.id) !== 'string' || this._resourceCacheMap.has(resource.id)) {\r\n return Promise.resolve();\r\n } else {\r\n this._resourceCacheMap.set(resource.id, true);\r\n return this.getResource(resource.id, resource.type);\r\n }\r\n });\r\n\r\n return Promise.all(resourcePromises);\r\n }\r\n}\r\n","\r\n\r\n
\r\n \r\n \r\n
\r\n","import { Component, ViewChild, Output, EventEmitter, ElementRef, Inject } from '@angular/core';\r\nimport { BarcodeFormat } from '@zxing/library';\r\nimport { iconNames } from '@hyd-lib-form-ui/form.icons';\r\nimport { ZXingScannerComponent } from '@zxing/ngx-scanner';\r\nimport { trigger, transition, style, animate } from '@angular/animations';\r\nimport { NbDialogRef } from '@nebular/theme';\r\nimport { I18NEXT_SERVICE, ITranslationService } from 'angular-i18next';\r\n\r\nexport type ScannerState = 'barcode' | 'keyboard';\r\n\r\n@Component({\r\n selector: 'hyd-form-answer-barcode',\r\n templateUrl: './barcode.component.html',\r\n animations: [\r\n trigger('scannedAnim', [\r\n transition('* => void', [\r\n animate('.6s 2s ease-in-out', style({ opacity: 0, transform: 'translateY(-2rem)' }))\r\n ])\r\n ])\r\n ]\r\n})\r\nexport class AnswerBarcodeComponent {\r\n\r\n errorMessage: string;\r\n\r\n scannerState: ScannerState = 'barcode';\r\n scannerEnabled = true;\r\n keepScanning = false;\r\n\r\n desiredDevice: MediaDeviceInfo = null;\r\n devices: MediaDeviceInfo[] = [];\r\n private activeDeviceIndex = 0;\r\n\r\n torch = false;\r\n torchAvailable = false;\r\n\r\n barcodeEntry = '';\r\n\r\n showScannedResult = false;\r\n scannedResult: string;\r\n private _lastScanTime: number;\r\n\r\n allowedFormats = [\r\n BarcodeFormat.QR_CODE,\r\n BarcodeFormat.EAN_13,\r\n BarcodeFormat.CODE_128,\r\n BarcodeFormat.DATA_MATRIX,\r\n BarcodeFormat.EAN_8\r\n ];\r\n\r\n icons = iconNames;\r\n\r\n @ViewChild('scanner') scanner: ZXingScannerComponent;\r\n @ViewChild('overlay') overlay: ElementRef;\r\n\r\n @Output() barcodeScanned = new EventEmitter();\r\n\r\n constructor(\r\n protected dialogRef: NbDialogRef,\r\n @Inject(I18NEXT_SERVICE) private i18NextService: ITranslationService) {}\r\n\r\n toggleScanning() {\r\n this.scannerEnabled = !this.scannerEnabled;\r\n }\r\n\r\n toggleTorch() {\r\n this.torch = !this.torch;\r\n }\r\n\r\n toggleDevice() {\r\n\r\n if (this.desiredDevice) {\r\n this.activeDeviceIndex = this.devices.findIndex(x => x.deviceId === this.desiredDevice.deviceId);\r\n }\r\n\r\n this.activeDeviceIndex++;\r\n\r\n if (this.devices.length === this.activeDeviceIndex) {\r\n this.activeDeviceIndex = 0;\r\n }\r\n\r\n this.scanner.device = this.devices[this.activeDeviceIndex];\r\n }\r\n\r\n onTorchCompatible(isAvailable = false) {\r\n this.torchAvailable = isAvailable;\r\n }\r\n\r\n camerasFoundHandler(devices: MediaDeviceInfo[]) {\r\n this.devices = devices;\r\n }\r\n\r\n camerasNotFoundHandler($event) {\r\n this.errorMessage = this.i18NextService.t('Barcode.Error.CameraNotAvailable');\r\n }\r\n\r\n permissionsResponse(hasPermission: boolean) {\r\n if (!hasPermission) {\r\n this.errorMessage = this.i18NextService.t('Barcode.Error.PermissionDenied');\r\n }\r\n }\r\n\r\n scanSuccessHandler(barcodeData: string) {\r\n\r\n const timeNow = Date.now();\r\n\r\n if (this._lastScanTime && timeNow - this._lastScanTime < 2000) {\r\n return;\r\n }\r\n\r\n if (this.scannerEnabled) {\r\n\r\n this._lastScanTime = timeNow;\r\n\r\n this.overlay.nativeElement.classList.add('scanned');\r\n\r\n this.scannedResult = barcodeData;\r\n this.showScannedResult = true;\r\n\r\n setTimeout(() => {\r\n this.overlay.nativeElement.classList.remove('scanned');\r\n this.showScannedResult = false;\r\n }, 0);\r\n\r\n this.barcodeScanned.emit(barcodeData);\r\n\r\n if (!this.keepScanning) {\r\n this.scannerEnabled = false;\r\n }\r\n }\r\n }\r\n\r\n scanErrorHandler($event) {\r\n this.errorMessage = this.i18NextService.t('Barcode.Error.ScanError');\r\n }\r\n\r\n toggleState() {\r\n this.scannerState = this.scannerState === 'barcode' ? 'keyboard' : 'barcode';\r\n }\r\n\r\n barcodeManuallyEntered(element: HTMLInputElement) {\r\n\r\n if (element.value.length > 0) {\r\n this.barcodeScanned.emit(element.value);\r\n element.value = '';\r\n }\r\n }\r\n\r\n closeDialog() {\r\n this.dialogRef.close();\r\n }\r\n}\r\n","import { Component, Input, ChangeDetectorRef, AfterViewInit } from '@angular/core';\r\n\r\nimport { BarcodeElementController } from '@hyd-lib-form-logic/controllers/elements/barcode/barcode.controller';\r\nimport { iconNames } from '@hyd-lib-form-ui/form.icons';\r\nimport { NbDialogRef, NbDialogService } from '@nebular/theme';\r\nimport { AnswerBarcodeComponent } from '@hyd-lib-form-ui/answers/barcode/ui/barcode.component';\r\nimport { trigger, transition, animate, style } from '@angular/animations';\r\n\r\n@Component({\r\n selector: 'hyd-form-element-barcode',\r\n templateUrl: './barcode.component.html',\r\n animations: [\r\n trigger('scannedItemAnim', [\r\n transition('void => loaded', [\r\n style({ height: 0, opacity: 0 }),\r\n animate('.3s ease-in-out', style({ opacity: 1, height: '*' }))\r\n ]),\r\n transition('loaded => void', [\r\n animate('.3s ease-in-out', style({ opacity: 0, height: 0, paddingTop: 0, paddingBottom: 0 }))\r\n ])\r\n ])\r\n ]\r\n})\r\nexport class BarcodeComponent implements AfterViewInit {\r\n\r\n @Input() controller: BarcodeElementController;\r\n\r\n icons = iconNames;\r\n\r\n private dialogRef: NbDialogRef;\r\n\r\n animationName = '';\r\n\r\n get scanEnabled() {\r\n const {options, scannedBarcodeCount} = this.controller;\r\n return options.maxAnswers <= 0 || scannedBarcodeCount < options.maxAnswers;\r\n }\r\n\r\n constructor(\r\n private dialogService: NbDialogService,\r\n private changeRef: ChangeDetectorRef) {\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.animationName = 'loaded';\r\n }\r\n\r\n openBarcodeDialog() {\r\n\r\n this.dialogRef = this.dialogService.open(AnswerBarcodeComponent, {\r\n closeOnBackdropClick: true,\r\n closeOnEsc: true,\r\n });\r\n\r\n this.dialogRef.componentRef.instance.barcodeScanned.subscribe(newBarcode => {\r\n this.barcodeScanned(newBarcode);\r\n });\r\n }\r\n\r\n barcodeScanned(newBarcode: string) {\r\n\r\n this.controller.barcodeScanned(newBarcode);\r\n\r\n if (!this.scanEnabled) {\r\n this.dialogRef.close();\r\n }\r\n\r\n this.changeRef.markForCheck();\r\n }\r\n}\r\n","import { Component, OnInit, Input } from '@angular/core';\r\nimport { DateElementController } from '@hyd-lib-form-logic/controllers/elements/date/date.controller';\r\n\r\n@Component({\r\n selector: 'hyd-form-element-date',\r\n templateUrl: './date.component.html',\r\n styleUrls: []\r\n})\r\nexport class DateComponent implements OnInit {\r\n\r\n @Input() controller: DateElementController;\r\n\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n dateChanged(newDate: string) {\r\n this.controller.updateResponse(newDate);\r\n }\r\n}\r\n","import { Component, OnInit, Input, ViewChild, OnDestroy } from '@angular/core';\r\nimport { DropdownElementController } from '@hyd-lib-form-logic/controllers/elements/dropdown/dropdown.controller';\r\nimport { ResourceService } from '@hyd-lib-form-logic/services/resource.service';\r\nimport { NgSelectComponent } from '@ng-select/ng-select';\r\nimport { Subscription } from 'rxjs';\r\n\r\n@Component({\r\n selector: 'hyd-form-element-dropdown',\r\n templateUrl: './dropdown.component.html',\r\n styleUrls: []\r\n})\r\nexport class DropdownComponent implements OnInit, OnDestroy {\r\n\r\n @Input() controller: DropdownElementController;\r\n\r\n @ViewChild('select') select: NgSelectComponent;\r\n items: string[] = [];\r\n\r\n private _subs: Subscription[] = [];\r\n\r\n constructor(\r\n private _resourceService: ResourceService\r\n ) {\r\n this.searchFn = this.searchFn.bind(this);\r\n }\r\n\r\n ngOnInit() {\r\n\r\n this.updateDropdown();\r\n this._subs.push(this.controller.elementChanged.subscribe(() => {\r\n this.updateDropdown();\r\n }));\r\n }\r\n\r\n ngOnDestroy() {\r\n this._subs.forEach(x => x.unsubscribe());\r\n }\r\n\r\n updateDropdown() {\r\n this._resourceService.getResource(this.controller.resourceId).then(items => {\r\n this.items = items;\r\n if (this.controller.hasResponse()) {\r\n this.select.writeValue(this.controller.responseValue);\r\n }\r\n });\r\n }\r\n\r\n valueChanged(newResultValue: string) {\r\n this.controller.updateResponse(newResultValue);\r\n }\r\n\r\n searchFn(searchTerm: string, item: string): boolean {\r\n const lowerSearchTerm = searchTerm.toLowerCase();\r\n switch(this.controller.filterType) {\r\n case 'Contains':\r\n const split = item.toLowerCase().split(' ');\r\n return split.some(x => x.startsWith(lowerSearchTerm));\r\n case 'StartsWith':\r\n default:\r\n return item.toLowerCase().startsWith(lowerSearchTerm);\r\n }\r\n }\r\n}\r\n","import { EventEmitter } from '@angular/core';\r\nimport { IElementModel, IResponseModel } from '@hyd-form-provider';\r\n\r\nimport { IElementValidation } from '@hyd-lib-form-logic/data/interfaces/validation';\r\nimport { ITranslationService } from 'angular-i18next';\r\n\r\nexport type ElementSubType =\r\n | 'Start'\r\n | 'Finish'\r\n | 'Information'\r\n | 'Text'\r\n | 'Select'\r\n | 'Linked'\r\n | 'Scale'\r\n | 'Interval'\r\n | 'Matrix'\r\n | 'Date'\r\n | 'Ranking'\r\n | 'Signature'\r\n | 'DropDown'\r\n | 'GPS'\r\n | 'Photo'\r\n | 'Barcode'\r\n | 'LoopContainer';\r\n\r\nexport abstract class ElementController {\r\n validation: IElementValidation = {\r\n isVisible: false,\r\n isValid: true,\r\n validationMessages: []\r\n };\r\n\r\n get text() {\r\n return this.element.Text;\r\n }\r\n get required() {\r\n return this.element.Required;\r\n }\r\n get subType() {\r\n return this.element.SubType as ElementSubType;\r\n }\r\n\r\n disabled = false;\r\n shouldHideBackButton = false;\r\n\r\n validationChanged = new EventEmitter();\r\n responseChanged = new EventEmitter();\r\n elementChanged = new EventEmitter();\r\n\r\n constructor(\r\n public element: IElementModel,\r\n public response: IResponseModel,\r\n public i18nextService: ITranslationService\r\n ) {\r\n this.init();\r\n }\r\n\r\n /**\r\n * @desc Checks to see if the element has a current response object or any response values\r\n */\r\n hasResponse(): boolean {\r\n return typeof this.response === 'object';\r\n }\r\n\r\n abstract validate(): void;\r\n\r\n abstract init(): void;\r\n\r\n updateElement(newElement: IElementModel) {\r\n this.element = newElement;\r\n this.init();\r\n this.elementChanged.emit();\r\n }\r\n\r\n updateValidation(newValidation: IElementValidation) {\r\n const validationChanged = this.validation.isValid !== newValidation.isValid;\r\n\r\n this.validation = newValidation;\r\n\r\n if (validationChanged) {\r\n this.validationChanged.emit(this.validation);\r\n }\r\n }\r\n\r\n destroy() {\r\n\r\n }\r\n}\r\n","import { ElementController } from '../ElementController';\r\nimport {\r\n IAnswerModel,\r\n IElementModel,\r\n IResponseModel,\r\n IResponseValueModel,\r\n EResponseValueType\r\n} from '@hyd-form-provider';\r\nimport { parseAsFloat, parseAsNumber, parseAsString } from '@hyd-lib';\r\nimport { IElementValidation } from '@hyd-lib-form-logic/data/interfaces/validation';\r\nimport { ITranslationService } from 'angular-i18next';\r\n\r\nexport type GPSAnswerType =\r\n | 'Latitude'\r\n | 'Longitude'\r\n | 'Altitude'\r\n | 'Accuracy'\r\n | 'LocationStatus'\r\n | 'ExtraInformation';\r\n\r\nexport enum ELocationStatus {\r\n NotRequired = 1,\r\n DeviceDisabled = 2,\r\n AccuracyNotMet = 3,\r\n Failed = 4,\r\n Ok = 5\r\n}\r\n\r\nexport class GPSElementController extends ElementController {\r\n answerMap: Map;\r\n resultLocation?: Coordinates;\r\n resultLocationStatus?: ELocationStatus;\r\n resultLocationMessage?: string;\r\n\r\n init() {\r\n this.answerMap = new Map();\r\n this._parseAnswers();\r\n this._parseResponse();\r\n this.validate();\r\n }\r\n\r\n validate() {\r\n\r\n const newValidation: IElementValidation = {\r\n isVisible: this.required,\r\n isValid: true,\r\n validationMessages: []\r\n };\r\n\r\n if (this.required) {\r\n newValidation.validationMessages.push({\r\n isValid: this.response.Values.length !== 0,\r\n message: this.i18nextService.t('Validation.Required')\r\n })\r\n }\r\n\r\n newValidation.isValid = !newValidation.validationMessages.some(x => !x.isValid);\r\n\r\n this.updateValidation(newValidation);\r\n }\r\n\r\n updateResponse(newCoords?: Coordinates) {\r\n this.response.Values.length = 0;\r\n\r\n if (newCoords) {\r\n this.response.Values.push(\r\n this._createResponseValue('Latitude', newCoords.latitude, EResponseValueType.Decimal)\r\n );\r\n this.response.Values.push(\r\n this._createResponseValue('Longitude', newCoords.longitude, EResponseValueType.Decimal)\r\n );\r\n this.response.Values.push(\r\n this._createResponseValue('Altitude', newCoords.altitude, EResponseValueType.Decimal)\r\n );\r\n this.response.Values.push(\r\n this._createResponseValue('Accuracy', newCoords.accuracy, EResponseValueType.Decimal)\r\n );\r\n this.response.Values.push(\r\n this._createResponseValue('LocationStatus', ELocationStatus.Ok, EResponseValueType.Number)\r\n );\r\n this.response.Values.push(\r\n this._createResponseValue('ExtraInformation', '', EResponseValueType.Text)\r\n );\r\n\r\n this.resultLocationStatus = ELocationStatus.Ok;\r\n this.resultLocationMessage = '';\r\n this.resultLocation = newCoords;\r\n } else {\r\n delete this.resultLocation;\r\n }\r\n\r\n this.validate();\r\n this.responseChanged.emit(this.response);\r\n }\r\n\r\n updateResponseError(error: PositionError) {\r\n\r\n this.response.Values.length = 0;\r\n\r\n switch (error.code) {\r\n case error.PERMISSION_DENIED:\r\n this.response.Values.push(\r\n this._createResponseValue('LocationStatus', ELocationStatus.DeviceDisabled, EResponseValueType.Number)\r\n );\r\n this.resultLocationStatus = ELocationStatus.DeviceDisabled;\r\n break;\r\n case error.POSITION_UNAVAILABLE:\r\n case error.TIMEOUT:\r\n this.response.Values.push(\r\n this._createResponseValue('LocationStatus', ELocationStatus.Failed, EResponseValueType.Number)\r\n );\r\n this.resultLocationStatus = ELocationStatus.Failed;\r\n break;\r\n }\r\n this.response.Values.push(\r\n this._createResponseValue('ExtraInformation', error.message, EResponseValueType.Text)\r\n );\r\n this.resultLocationMessage = error.message;\r\n\r\n delete this.resultLocation;\r\n this.validate();\r\n this.responseChanged.emit(this.response);\r\n }\r\n\r\n updateResponseCancelled() {\r\n\r\n this.response.Values.length = 0;\r\n this.response.Values.push(\r\n this._createResponseValue('LocationStatus', ELocationStatus.NotRequired, EResponseValueType.Number)\r\n );\r\n\r\n delete this.resultLocation;\r\n this.resultLocationStatus = ELocationStatus.NotRequired;\r\n this.resultLocationMessage = 'User Cancelled';\r\n this.validate();\r\n this.responseChanged.emit(this.response);\r\n }\r\n\r\n private _parseAnswers() {\r\n this.element.Answers.forEach(answer => {\r\n this.answerMap.set(answer.Text as GPSAnswerType, answer);\r\n });\r\n }\r\n\r\n private _parseResponse() {\r\n if (this.response.Values.length !== 0) {\r\n this.resultLocation = {\r\n accuracy: parseAsFloat(this._getResponseValue('Accuracy'), undefined),\r\n altitude: parseAsFloat(this._getResponseValue('Altitude'), undefined),\r\n longitude: parseAsFloat(this._getResponseValue('Longitude'), undefined),\r\n latitude: parseAsFloat(this._getResponseValue('Latitude'), undefined),\r\n altitudeAccuracy: null,\r\n heading: null,\r\n speed: null\r\n };\r\n\r\n this.resultLocationStatus = parseAsNumber(this._getResponseValue('LocationStatus'), ELocationStatus.NotRequired);\r\n this.resultLocationMessage = this._getResponseValue('ExtraInformation');\r\n }\r\n }\r\n\r\n private _createResponseValue(\r\n answer: GPSAnswerType,\r\n value: number | string,\r\n type: EResponseValueType\r\n ): IResponseValueModel {\r\n let valueString = '';\r\n try {\r\n valueString = value.toString();\r\n } catch {}\r\n\r\n return {\r\n AnswerId: this.answerMap.get(answer).Id,\r\n StatementId: -1,\r\n Valid: true,\r\n Value: valueString,\r\n ContentId: null,\r\n Type: type\r\n };\r\n }\r\n\r\n private _getResponseValue(answer: GPSAnswerType): string {\r\n const answerId = this.answerMap.get(answer).Id;\r\n const responseValue = this.response.Values.find(x => x.AnswerId === answerId);\r\n if (responseValue) {\r\n return responseValue.Value;\r\n } else {\r\n return '';\r\n }\r\n }\r\n}\r\n","import { Component, OnInit, Input, ChangeDetectorRef, Inject } from '@angular/core';\r\nimport { GPSElementController, ELocationStatus } from '@hyd-lib-form-logic/controllers/elements/gps/gps.controller';\r\nimport { I18NEXT_SERVICE, ITranslationService } from 'angular-i18next';\r\n\r\nfunction getLocation(successCallback: (position: Position) => void, errorCallback: (error: PositionError) => void) {\r\n\r\n let cancelled = false;\r\n\r\n function cancel() {\r\n cancelled = true;\r\n }\r\n\r\n navigator.geolocation.getCurrentPosition(position => {\r\n if (!cancelled) {\r\n successCallback(position);\r\n }\r\n }, error => {\r\n if (!cancelled) {\r\n errorCallback(error);\r\n }\r\n }, {\r\n enableHighAccuracy: true\r\n });\r\n\r\n return cancel;\r\n}\r\n\r\n@Component({\r\n selector: 'hyd-form-element-gps',\r\n templateUrl: './gps.component.html'\r\n})\r\nexport class GPSComponent implements OnInit {\r\n\r\n @Input() controller: GPSElementController;\r\n\r\n locating = false;\r\n\r\n get status() {\r\n if (this.locating) {\r\n return this.i18NextService.t('GPS.GettingLocation');\r\n }\r\n\r\n if (this.controller.resultLocationStatus) {\r\n switch (this.controller.resultLocationStatus) {\r\n case ELocationStatus.Failed:\r\n return this.i18NextService.t('GPS.Error.Failed');\r\n case ELocationStatus.DeviceDisabled:\r\n return this.i18NextService.t('GPS.Error.DeviceDisabled');\r\n case ELocationStatus.NotRequired:\r\n return this.i18NextService.t('GPS.Error.Canceled');\r\n }\r\n }\r\n\r\n return '';\r\n }\r\n\r\n private _cancelLocationRequest: () => void;\r\n\r\n constructor(\r\n private _changeRef: ChangeDetectorRef,\r\n @Inject(I18NEXT_SERVICE) private i18NextService: ITranslationService\r\n ) { }\r\n\r\n ngOnInit() {\r\n if (!this.controller.resultLocation) {\r\n this.getLocation();\r\n }\r\n }\r\n\r\n locationLabel(locationKey: string = '') {\r\n if (this.controller.resultLocation && this.controller.resultLocation[locationKey]) {\r\n return this.controller.resultLocation[locationKey];\r\n }\r\n\r\n return '';\r\n }\r\n\r\n getLocation() {\r\n\r\n this.locating = true;\r\n\r\n this._cancelLocationRequest = getLocation(position => {\r\n this._gotPosition(position);\r\n this._changeRef.markForCheck();\r\n }, error => {\r\n this._errorGettingPosition(error);\r\n this._changeRef.markForCheck();\r\n });\r\n }\r\n\r\n cancelLocation() {\r\n\r\n if (this._cancelLocationRequest) {\r\n this._cancelLocationRequest();\r\n delete this._cancelLocationRequest;\r\n }\r\n\r\n this.controller.updateResponseCancelled();\r\n this.locating = false;\r\n }\r\n\r\n clearLocation() {\r\n if (!this.locating) {\r\n this.controller.updateResponse();\r\n }\r\n }\r\n\r\n private _gotPosition(position: Position) {\r\n this.controller.updateResponse(position.coords);\r\n this.locating = false;\r\n }\r\n\r\n private _errorGettingPosition(error: PositionError) {\r\n\r\n this.controller.updateResponseError(error);\r\n this.locating = false;\r\n }\r\n}\r\n","import { Component, OnInit, Input } from '@angular/core';\r\nimport { IntervalElementController, ILikertAnswer } from '@hyd-lib-form-logic/controllers/elements/interval/interval.controller';\r\nimport { IAnswerModel } from '@hyd-form-provider';\r\n\r\n@Component({\r\n selector: 'hyd-form-element-interval',\r\n templateUrl: './interval.component.html'\r\n})\r\nexport class IntervalComponent implements OnInit {\r\n\r\n @Input() controller: IntervalElementController;\r\n\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n likertValueChanged(selectedAnswer: IAnswerModel) {\r\n this.controller.updateResponse(selectedAnswer);\r\n }\r\n}\r\n","import { Component, OnInit, Input } from '@angular/core';\r\nimport { MatrixElementController, MatrixCell } from '@hyd-lib-form-logic/controllers/elements/matrix/matrix.controller';\r\n\r\n@Component({\r\n selector: 'hyd-form-element-matrix',\r\n templateUrl: './matrix.component.html',\r\n styleUrls: []\r\n})\r\nexport class MatrixComponent implements OnInit {\r\n\r\n @Input() controller: MatrixElementController;\r\n\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n\r\n }\r\n\r\n selectionChanged(cell: MatrixCell) {\r\n this.controller.updateResponse(cell);\r\n }\r\n}\r\n","import { Component, Input, OnInit, ChangeDetectorRef, TemplateRef } from '@angular/core';\r\nimport { PhotoElementController } from '@hyd-lib-form-logic/controllers/elements/photo/photo.controller';\r\nimport { NbDialogRef, NbDialogService } from '@nebular/theme';\r\nimport { iconNames } from '@hyd-lib-form-ui/form.icons';\r\nimport { ResponseService } from '@hyd-lib-form-logic/services/response.service';\r\nimport { ResourceService } from '@hyd-lib-form-logic/services/resource.service';\r\nimport { getUuid } from '@hyd-lib';\r\nimport { AnswerCameraComponent } from '@hyd-lib-form-ui/answers/camera/ui/camera.component';\r\n\r\n@Component({\r\n selector: 'hyd-form-element-photo',\r\n templateUrl: './photo.component.html',\r\n styleUrls: []\r\n})\r\nexport class PhotoComponent implements OnInit {\r\n\r\n @Input() controller: PhotoElementController;\r\n\r\n saving = false;\r\n\r\n cameraUrl: string;\r\n\r\n private dialogRef: NbDialogRef;\r\n\r\n icons = iconNames;\r\n\r\n constructor(\r\n private dialogService: NbDialogService,\r\n private responseService: ResponseService,\r\n private resourceService: ResourceService,\r\n private changeRef: ChangeDetectorRef) {\r\n }\r\n\r\n ngOnInit() {\r\n if (this.controller && this.controller.photoContentId) {\r\n this.cameraUrl = this.resourceService.getPathForContent(this.controller.photoContentId);\r\n this.changeRef.markForCheck();\r\n }\r\n }\r\n\r\n openCameraDialog(dialog: TemplateRef) {\r\n this.dialogRef = this.dialogService.open(dialog, {\r\n closeOnBackdropClick: false,\r\n closeOnEsc: false,\r\n });\r\n }\r\n\r\n cameraDone(camera: AnswerCameraComponent) {\r\n\r\n if (!camera.image) {\r\n this.removeCamera();\r\n this.dialogRef.close();\r\n return;\r\n }\r\n\r\n const data = camera.image.imageAsDataUrl;\r\n\r\n const fileName = getUuid();\r\n this.saving = true;\r\n\r\n this.responseService.saveContent(fileName, data).then(() => {\r\n this.cameraUrl = data;\r\n this.controller.photoChanged(fileName);\r\n this.changeRef.markForCheck();\r\n this.dialogRef.close();\r\n }).finally(() => {\r\n this.saving = false;\r\n });\r\n }\r\n\r\n removeCamera() {\r\n this.controller.photoChanged('');\r\n delete this.cameraUrl;\r\n this.changeRef.markForCheck();\r\n }\r\n}\r\n","import { Component, Input, AfterContentInit, ChangeDetectorRef } from '@angular/core';\r\nimport { CdkDragDrop, CdkDragStart, CdkDragEnter, CdkDragEnd } from '@angular/cdk/drag-drop';\r\nimport { RankingElementController, RankingItem } from '@hyd-lib-form-logic/controllers/elements/ranking/ranking.controller';\r\n\r\nimport { trigger, transition, style, animate } from '@angular/animations';\r\nimport { iconNames } from '@hyd-lib-form-ui/form.icons';\r\n\r\nexport type ItemState = 'none' | 'active' | 'dragging';\r\n\r\n@Component({\r\n selector: 'hyd-form-element-ranking',\r\n templateUrl: './ranking.component.html',\r\n animations: [\r\n trigger('itemAnim', [\r\n transition('void => active', [\r\n style({ opacity: 0, height: 0, paddingTop: 0, paddingBottom: 0, marginBottom: 0 }),\r\n animate('.3s ease-in-out', style({ opacity: 1, height: '*', paddingTop: '.5rem', paddingBottom: '.5rem', marginBottom: '.5rem'}))\r\n ]),\r\n transition('active => void', [\r\n animate('.3s ease-in-out', style({ opacity: 0, height: 0, paddingTop: 0, paddingBottom: 0, marginBottom: 0 }))\r\n ])\r\n ])\r\n ]\r\n})\r\nexport class RankingComponent implements AfterContentInit {\r\n\r\n @Input() controller: RankingElementController;\r\n\r\n icons = iconNames;\r\n\r\n itemState: ItemState = 'none';\r\n timer: any;\r\n\r\n constructor(private changeRef: ChangeDetectorRef) { }\r\n\r\n ngAfterContentInit() {\r\n this.itemState = 'active';\r\n }\r\n\r\n answerDroppedRanked(event: CdkDragDrop) {\r\n this.controller.updateResponse(event.item.data as RankingItem, event.currentIndex);\r\n }\r\n\r\n answerDroppedUnRanked(event: CdkDragDrop) {\r\n this.controller.updateResponse(event.item.data as RankingItem);\r\n }\r\n\r\n answerClicked(answer: RankingItem) {\r\n\r\n if (isNaN(answer.rankedPosition)) {\r\n this.controller.updateResponse(answer, this.controller.rankedAnswers.length);\r\n } else {\r\n this.controller.updateResponse(answer);\r\n }\r\n }\r\n\r\n dragStart(ev: CdkDragStart) {\r\n // ev.source._dragRef.withDirection('rtl');\r\n this.itemState = 'dragging';\r\n }\r\n\r\n dragEnded(ev: CdkDragEnd) {\r\n this.timer = setTimeout(() => {\r\n this.itemState = 'active';\r\n }, 310);\r\n }\r\n\r\n trackAnswer(index: number, item: RankingItem) {\r\n return item.answer.Id;\r\n }\r\n}\r\n","import { Component, OnInit, Input } from '@angular/core';\r\nimport { ScaleElementController } from '@hyd-lib-form-logic/controllers/elements/scale/scale.controller';\r\n\r\n@Component({\r\n selector: 'hyd-form-element-scale',\r\n templateUrl: './scale.component.html',\r\n styleUrls: []\r\n})\r\nexport class ScaleComponent implements OnInit {\r\n\r\n @Input() controller: ScaleElementController;\r\n\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n scaleValueChanged(newValue: number) {\r\n this.controller.updateResponseValue(newValue);\r\n }\r\n}\r\n","import { Component, OnInit, Input } from '@angular/core';\r\nimport { SelectElementController } from '@hyd-lib-form-logic/controllers/elements/select/select.controller';\r\nimport { IAnswerModel } from '@hyd-form-provider';\r\n\r\n@Component({\r\n selector: 'hyd-form-element-select',\r\n templateUrl: './select.component.html',\r\n styleUrls: []\r\n})\r\nexport class SelectComponent implements OnInit {\r\n\r\n @Input() controller: SelectElementController;\r\n\r\n constructor(\r\n ) { }\r\n\r\n ngOnInit() {}\r\n\r\n answerClicked(answer: IAnswerModel) {\r\n this.controller.updateResponse(answer);\r\n }\r\n\r\n answerValueChanged(answer: IAnswerModel, newValue: string) {\r\n this.controller.updateResponseValue(answer, newValue);\r\n }\r\n}\r\n","import { Component, Input, TemplateRef, ChangeDetectionStrategy, ChangeDetectorRef, OnInit } from '@angular/core';\r\n\r\nimport { SignatureElementController } from '@hyd-lib-form-logic/controllers/elements/signature/signature.controller';\r\nimport { ResponseService } from '@hyd-lib-form-logic/services/response.service';\r\nimport { ResourceService } from '@hyd-lib-form-logic/services/resource.service';\r\nimport { NbDialogService, NbDialogRef } from '@nebular/theme';\r\nimport { AnswerSignatureComponent } from '@hyd-lib-form-ui/answers/signature/ui/signature.component';\r\nimport { getUuid } from '@hyd-lib';\r\nimport { iconNames } from '@hyd-lib-form-ui/form.icons';\r\n\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n selector: 'hyd-form-element-signature',\r\n templateUrl: './signature.component.html',\r\n styleUrls: []\r\n})\r\nexport class SignatureComponent implements OnInit {\r\n\r\n @Input() controller: SignatureElementController;\r\n\r\n saving = false;\r\n\r\n signatureUrl: string;\r\n\r\n private dialogRef: NbDialogRef;\r\n\r\n icons = iconNames;\r\n\r\n constructor(\r\n private dialogService: NbDialogService,\r\n private responseService: ResponseService,\r\n private resourceService: ResourceService,\r\n private changeRef: ChangeDetectorRef) {\r\n }\r\n\r\n ngOnInit() {\r\n if (this.controller && this.controller.signatureContentId) {\r\n this.signatureUrl = this.resourceService.getPathForContent(this.controller.signatureContentId);\r\n this.changeRef.markForCheck();\r\n }\r\n }\r\n\r\n openSignatureDialog(dialog: TemplateRef) {\r\n this.dialogRef = this.dialogService.open(dialog, {\r\n closeOnBackdropClick: false,\r\n closeOnEsc: false,\r\n });\r\n }\r\n\r\n signatureDone(sig: AnswerSignatureComponent) {\r\n\r\n if (sig.emptySignature) {\r\n this.removeSignature();\r\n this.dialogRef.close();\r\n return;\r\n }\r\n\r\n const data = sig.signaturePad.toDataURL();\r\n\r\n const fileName = getUuid();\r\n this.saving = true;\r\n\r\n this.responseService.saveContent(fileName, data).then(() => {\r\n this.signatureUrl = data;\r\n this.controller.signatureChanged(fileName);\r\n this.changeRef.markForCheck();\r\n this.dialogRef.close();\r\n }).finally(() => {\r\n this.saving = false;\r\n });\r\n }\r\n\r\n removeSignature() {\r\n this.controller.signatureChanged('');\r\n delete this.signatureUrl;\r\n this.changeRef.markForCheck();\r\n }\r\n\r\n}\r\n","import { Component, Input } from '@angular/core';\r\nimport { TextElementController } from '@hyd-lib-form-logic/controllers/elements/text/text.controller';\r\n\r\n\r\n@Component({\r\n selector: 'hyd-form-element-text',\r\n templateUrl: './text.component.html',\r\n styleUrls: []\r\n})\r\nexport class TextComponent {\r\n\r\n @Input() controller: TextElementController;\r\n\r\n constructor() { }\r\n\r\n resultChanged(newResultText: string) {\r\n this.controller.updateResponse(newResultText);\r\n }\r\n}\r\n","import {\r\n Component,\r\n Input,\r\n ComponentFactoryResolver,\r\n AfterViewInit,\r\n ViewChild,\r\n ViewContainerRef,\r\n ChangeDetectionStrategy,\r\n OnDestroy,\r\n ChangeDetectorRef,\r\n HostBinding,\r\n} from '@angular/core';\r\nimport { ElementController } from '@hyd-lib-form-logic/controllers/elements/ElementController';\r\n\r\nimport { getQuestionComponent } from './question.component.factory';\r\nimport { ValidationService } from '@hyd-lib-form-logic/services/form/validation.service';\r\nimport { Subscription } from 'rxjs';\r\n\r\n\r\n@Component({\r\n selector: 'hyd-form-element-question',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n template: `\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n `\r\n})\r\nexport class QuestionElementComponent implements OnDestroy, AfterViewInit {\r\n\r\n @Input() controller: ElementController;\r\n\r\n @ViewChild('contentRef', { read: ViewContainerRef }) content: ViewContainerRef;\r\n\r\n @HostBinding('class.invalid')\r\n get invalid() { return !this.controller.validation.isValid }\r\n\r\n @HostBinding('class.highlight-invalid')\r\n highlightInvalid = false;\r\n\r\n private _validationSubscription: Subscription;\r\n private _elementSubscription: Subscription;\r\n private _changeDetection: ChangeDetectorRef;\r\n\r\n constructor(\r\n private componentFactoryResolver: ComponentFactoryResolver,\r\n private validationService: ValidationService,\r\n changeDetection: ChangeDetectorRef) {\r\n\r\n this._changeDetection = changeDetection;\r\n this._validationSubscription = this.validationService.$flashValidationMessage.subscribe(v => {\r\n this.highlightInvalid = true;\r\n changeDetection.markForCheck();\r\n });\r\n }\r\n\r\n ngAfterViewInit() {\r\n\r\n const componentFactory = getQuestionComponent(this.controller, this.componentFactoryResolver);\r\n\r\n if (componentFactory) {\r\n\r\n if (this.content) {\r\n this.content.clear();\r\n }\r\n\r\n const ref = this.content.createComponent(componentFactory);\r\n ref.instance.controller = this.controller;\r\n ref.changeDetectorRef.detectChanges();\r\n\r\n this._elementSubscription = this.controller.elementChanged.subscribe(() => {\r\n this._changeDetection.markForCheck();\r\n ref.changeDetectorRef.detectChanges();\r\n });\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n this._validationSubscription.unsubscribe();\r\n this._elementSubscription.unsubscribe();\r\n }\r\n}\r\n","\r\nimport { ComponentFactoryResolver, ComponentFactory } from '@angular/core';\r\n\r\nimport { ElementController } from '@hyd-lib-form-logic/controllers/elements/ElementController';\r\n\r\nimport { BarcodeComponent } from './barcode/ui/barcode.component';\r\nimport { DateComponent } from './date/ui/date.component';\r\nimport { DropdownComponent } from './dropdown/ui/dropdown.component';\r\nimport { GPSComponent } from './gps/ui/gps.component';\r\nimport { IntervalComponent } from './interval/ui/interval.component';\r\nimport { MatrixComponent } from './matrix/ui/matrix.component';\r\nimport { PhotoComponent } from './photo/ui/photo.component';\r\nimport { RankingComponent } from './ranking/ui/ranking.component';\r\nimport { ScaleComponent } from './scale/ui/scale.component';\r\nimport { SelectComponent } from './select/ui/select.component';\r\nimport { SignatureComponent } from './signature/ui/signature.component';\r\nimport { TextComponent } from './text/ui/text.component';\r\nimport { IElementComponent } from '../element.interface';\r\n\r\nexport function getQuestionComponent(\r\n controller: ElementController,\r\n resolver: ComponentFactoryResolver): ComponentFactory {\r\n\r\n switch (controller.subType) {\r\n case 'Barcode':\r\n return resolver.resolveComponentFactory(BarcodeComponent);\r\n case 'Date':\r\n return resolver.resolveComponentFactory(DateComponent);\r\n case 'DropDown':\r\n return resolver.resolveComponentFactory(DropdownComponent);\r\n case 'GPS':\r\n return resolver.resolveComponentFactory(GPSComponent);\r\n case 'Interval':\r\n return resolver.resolveComponentFactory(IntervalComponent);\r\n case 'Matrix':\r\n return resolver.resolveComponentFactory(MatrixComponent);\r\n case 'Photo':\r\n return resolver.resolveComponentFactory(PhotoComponent);\r\n case 'Ranking':\r\n return resolver.resolveComponentFactory(RankingComponent);\r\n case 'Scale':\r\n return resolver.resolveComponentFactory(ScaleComponent);\r\n case 'Select':\r\n return resolver.resolveComponentFactory(SelectComponent);\r\n case 'Signature':\r\n return resolver.resolveComponentFactory(SignatureComponent);\r\n case 'Text':\r\n return resolver.resolveComponentFactory(TextComponent);\r\n }\r\n}\r\n","import { Component, OnInit, Input, ComponentFactoryResolver, ViewChild, ViewContainerRef, AfterViewInit } from '@angular/core';\r\nimport { ElementController } from '@hyd-lib-form-logic/controllers/elements/ElementController';\r\nimport { getActionComponent } from './action.component.factory';\r\n\r\n@Component({\r\n selector: 'hyd-form-element-action',\r\n template: `\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n `\r\n})\r\nexport class ActionElementComponent implements OnInit, AfterViewInit {\r\n\r\n @Input() controller: ElementController;\r\n\r\n @ViewChild('contentRef', { read: ViewContainerRef }) content: ViewContainerRef;\r\n\r\n constructor(private componentFactoryResolver: ComponentFactoryResolver) { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n ngAfterViewInit() {\r\n\r\n const componentFactory = getActionComponent(this.controller, this.componentFactoryResolver);\r\n\r\n if (componentFactory) {\r\n\r\n if (this.content) {\r\n this.content.clear();\r\n }\r\n\r\n const ref = this.content.createComponent(componentFactory);\r\n ref.instance.controller = this.controller;\r\n ref.changeDetectorRef.detectChanges();\r\n }\r\n }\r\n}\r\n","import { FinishComponent } from './finish/ui/finish.component';\r\nimport { StartComponent } from './start/ui/start.component';\r\nimport { ElementController } from '@hyd-lib-form-logic/controllers/elements/ElementController';\r\nimport { ComponentFactoryResolver, ComponentFactory } from '@angular/core';\r\nimport { IElementComponent } from '../element.interface';\r\n\r\nexport function getActionComponent(controller: ElementController, resolver: ComponentFactoryResolver): ComponentFactory {\r\n\r\n switch (controller.subType) {\r\n case 'Finish':\r\n return resolver.resolveComponentFactory(FinishComponent);\r\n case 'Start':\r\n return resolver.resolveComponentFactory(StartComponent);\r\n }\r\n}\r\n","import { Component, OnInit, Input, ComponentFactoryResolver, ViewChild, ViewContainerRef, AfterViewInit } from '@angular/core';\r\nimport { ElementController } from '@hyd-lib-form-logic/controllers/elements/ElementController';\r\nimport { getActionGroupComponent } from './action-group.component.factory';\r\n\r\n@Component({\r\n selector: 'hyd-form-element-action-group',\r\n template: `\r\n \r\n `\r\n})\r\nexport class ActionGroupElementComponent implements OnInit, AfterViewInit {\r\n\r\n @Input() controller: ElementController;\r\n\r\n @ViewChild('contentRef', { read: ViewContainerRef }) content: ViewContainerRef;\r\n\r\n constructor(private componentFactoryResolver: ComponentFactoryResolver) { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n ngAfterViewInit() {\r\n\r\n const componentFactory = getActionGroupComponent(this.controller, this.componentFactoryResolver);\r\n\r\n if (componentFactory) {\r\n\r\n if (this.content) {\r\n this.content.clear();\r\n }\r\n\r\n const ref = this.content.createComponent(componentFactory);\r\n ref.instance.controller = this.controller;\r\n ref.changeDetectorRef.detectChanges();\r\n }\r\n }\r\n}\r\n","\r\nimport { ElementController } from '@hyd-lib-form-logic/controllers/elements/ElementController';\r\nimport { ComponentFactoryResolver, ComponentFactory } from '@angular/core';\r\nimport { LoopComponent } from './loop/ui/loop.component';\r\nimport { IElementComponent } from '../element.interface';\r\n\r\nexport function getActionGroupComponent(\r\n controller: ElementController,\r\n resolver: ComponentFactoryResolver): ComponentFactory {\r\n\r\n switch (controller.subType) {\r\n case 'LoopContainer':\r\n return resolver.resolveComponentFactory(LoopComponent);\r\n }\r\n}\r\n","import { Component, OnInit, Input, ComponentFactoryResolver, ViewChild, ViewContainerRef, AfterViewInit } from '@angular/core';\r\nimport { InfoElementController } from '@hyd-lib-form-logic/controllers/elements/info/info.controller';\r\nimport { getDisplayComponent } from './display.component.factory';\r\n\r\n@Component({\r\n selector: 'hyd-form-element-display',\r\n template: `\r\n \r\n `\r\n})\r\nexport class DisplayElementComponent implements OnInit, AfterViewInit {\r\n\r\n @Input() controller: InfoElementController;\r\n\r\n @ViewChild('contentRef', { read: ViewContainerRef }) content: ViewContainerRef;\r\n\r\n constructor(private componentFactoryResolver: ComponentFactoryResolver) { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n ngAfterViewInit() {\r\n\r\n const componentFactory = getDisplayComponent(this.controller, this.componentFactoryResolver);\r\n\r\n if (componentFactory) {\r\n\r\n if (this.content) {\r\n this.content.clear();\r\n }\r\n\r\n const ref = this.content.createComponent(componentFactory);\r\n ref.instance.controller = this.controller;\r\n ref.changeDetectorRef.detectChanges();\r\n }\r\n }\r\n}\r\n","\r\nimport { ElementController } from '@hyd-lib-form-logic/controllers/elements/ElementController';\r\nimport { ComponentFactoryResolver, ComponentFactory } from '@angular/core';\r\nimport { InfoComponent } from './info/ui/info.component';\r\nimport { IElementComponent } from '../element.interface';\r\n\r\nexport function getDisplayComponent(\r\n controller: ElementController,\r\n resolver: ComponentFactoryResolver): ComponentFactory {\r\n\r\n switch (controller.subType) {\r\n case 'Information':\r\n return resolver.resolveComponentFactory(InfoComponent);\r\n }\r\n}\r\n","import { Component, OnInit, Input, ComponentFactoryResolver, ViewChild, ViewContainerRef, AfterViewInit } from '@angular/core';\r\nimport { InfoElementController } from '@hyd-lib-form-logic/controllers/elements/info/info.controller';\r\nimport { getDisplayGroupComponent } from './display-group.component.factory';\r\n\r\n@Component({\r\n selector: 'hyd-form-element-display-group',\r\n template: `\r\n \r\n `\r\n})\r\nexport class DisplayGroupElementComponent implements OnInit, AfterViewInit {\r\n\r\n @Input() controller: InfoElementController;\r\n\r\n @ViewChild('contentRef', { read: ViewContainerRef }) content: ViewContainerRef;\r\n\r\n constructor(private componentFactoryResolver: ComponentFactoryResolver) { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n ngAfterViewInit() {\r\n\r\n const componentFactory = getDisplayGroupComponent(this.controller, this.componentFactoryResolver);\r\n\r\n if (componentFactory) {\r\n\r\n if (this.content) {\r\n this.content.clear();\r\n }\r\n\r\n const ref = this.content.createComponent(componentFactory);\r\n ref.instance.controller = this.controller;\r\n ref.changeDetectorRef.detectChanges();\r\n }\r\n }\r\n}\r\n","\r\nimport { ElementController } from '@hyd-lib-form-logic/controllers/elements/ElementController';\r\nimport { ComponentFactoryResolver, ComponentFactory } from '@angular/core';\r\nimport { IElementComponent } from '../element.interface';\r\nimport { LinkedComponent } from './linked/ui/linked.component';\r\n\r\nexport function getDisplayGroupComponent(\r\n controller: ElementController,\r\n resolver: ComponentFactoryResolver): ComponentFactory {\r\n\r\n switch (controller.subType) {\r\n case 'Linked':\r\n return resolver.resolveComponentFactory(LinkedComponent);\r\n }\r\n}\r\n","import { ElementController } from '@hyd-lib-form-logic/controllers/elements/ElementController';\r\nimport { ComponentFactoryResolver, ComponentFactory } from '@angular/core';\r\nimport { QuestionElementComponent } from './questions/question.component';\r\nimport { EElementType } from '@hyd-form-provider';\r\nimport { ActionElementComponent } from './action/action.component';\r\n\r\nimport { ActionGroupElementComponent } from './action-group/action-group.component';\r\nimport { IElementComponent } from './element.interface';\r\nimport { DisplayElementComponent } from './display/display.component';\r\nimport { DisplayGroupElementComponent } from './display-group/display-group.component';\r\n\r\nexport function getElementComponent(\r\n controller: ElementController,\r\n resolver: ComponentFactoryResolver): ComponentFactory {\r\n\r\n switch (controller.element.ElementType) {\r\n case EElementType.Action:\r\n return resolver.resolveComponentFactory(ActionElementComponent);\r\n case EElementType.ActionGroup:\r\n return resolver.resolveComponentFactory(ActionGroupElementComponent);\r\n case EElementType.Display:\r\n return resolver.resolveComponentFactory(DisplayElementComponent);\r\n case EElementType.DisplayGroup:\r\n return resolver.resolveComponentFactory(DisplayGroupElementComponent);\r\n case EElementType.Question:\r\n return resolver.resolveComponentFactory(QuestionElementComponent);\r\n }\r\n}\r\n","import { Component, Input, AfterViewInit, ViewChild, ViewContainerRef, ComponentFactoryResolver, OnDestroy, ComponentRef } from '@angular/core';\r\nimport { LinkedElementController } from '@hyd-lib-form-logic/controllers/elements/linked/linked.controller';\r\nimport { getElementComponent } from '@hyd-lib-form-ui/elements/element.component.factory';\r\nimport { ValidationService } from '@hyd-lib-form-logic/services/form/validation.service';\r\nimport { Subscription } from 'rxjs';\r\nimport { IElementComponent } from '@hyd-lib-form-ui/elements/element.interface';\r\n\r\n@Component({\r\n selector: 'hyd-form-element-linked',\r\n templateUrl: './linked.component.html'\r\n})\r\nexport class LinkedComponent implements OnDestroy, AfterViewInit {\r\n\r\n @Input() controller: LinkedElementController;\r\n\r\n @ViewChild('contentRef', { read: ViewContainerRef }) content: ViewContainerRef;\r\n\r\n private childRefs: ComponentRef[] = [];\r\n private _subs: Subscription[] = [];\r\n\r\n constructor(\r\n private componentFactoryResolver: ComponentFactoryResolver,\r\n private validationService: ValidationService) {\r\n\r\n }\r\n\r\n ngAfterViewInit() {\r\n\r\n if (this.content) {\r\n this.content.clear();\r\n }\r\n\r\n this.controller.childElementControllers.forEach(controller => {\r\n\r\n const componentFactory = getElementComponent(controller, this.componentFactoryResolver);\r\n\r\n if (componentFactory) {\r\n const ref = this.content.createComponent(componentFactory);\r\n ref.instance.controller = controller;\r\n ref.changeDetectorRef.detectChanges();\r\n this.childRefs.push(ref);\r\n\r\n this._subs.push(controller.elementChanged.subscribe(() => {\r\n ref.changeDetectorRef.detectChanges();\r\n }));\r\n }\r\n });\r\n\r\n const validationSubscription = this.validationService.$flashValidationMessage.subscribe(v => {\r\n\r\n const firstInvalidElement = this.childRefs.findIndex(ref => {\r\n return !ref.instance.controller.validation.isValid\r\n });\r\n\r\n if (firstInvalidElement > -1) {\r\n const l = this.childRefs[firstInvalidElement].location.nativeElement;\r\n l.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });\r\n }\r\n });\r\n\r\n this._subs.push(validationSubscription);\r\n\r\n this._subs.push(this.controller.elementChanged.subscribe(() => {\r\n this.childRefs.forEach(el => {\r\n el.instance.controller.elementChanged.next();\r\n });\r\n }));\r\n\r\n this._subs.push(this.controller.focusElement.subscribe(elementModel => {\r\n const childRef = this.childRefs.find(c => c.instance.controller.element.Id === elementModel.Id);\r\n if (childRef) {\r\n childRef.location.nativeElement.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });\r\n }\r\n }));\r\n }\r\n\r\n ngOnDestroy() {\r\n this._subs.forEach(x => x.unsubscribe());\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Subject, Observable } from 'rxjs';\r\n\r\nexport interface IValidationService {\r\n $flashValidationMessage: Observable;\r\n flashValidationMessage();\r\n}\r\n\r\n@Injectable()\r\nexport class ValidationService implements IValidationService {\r\n\r\n private _flashValidationMessage = new Subject();\r\n $flashValidationMessage = this._flashValidationMessage.asObservable();\r\n\r\n constructor() {\r\n }\r\n\r\n flashValidationMessage() {\r\n this._flashValidationMessage.next();\r\n }\r\n}\r\n","\r\n","\n \n ","\r\n \r\n
{{ 'Barcode.ScanTitle' | i18next }}
\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n {{ scannedResult }}\r\n
\r\n\r\n \r\n\r\n \r\n\r\n
\r\n \r\n
\r\n \r\n {{ 'Barcode.Scanning' | i18next }}\r\n
\r\n
\r\n\r\n
\r\n\r\n \r\n \r\n\r\n \r\n {{ errorMessage }}\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n {{ 'Barcode.KeepScanning' | i18next }}\r\n
\r\n \r\n
\r\n
\r\n","import { Component, ChangeDetectionStrategy, Output, ViewChild, ElementRef, AfterViewInit } from '@angular/core';\r\nimport { SignaturePad } from 'angular2-signaturepad';\r\n\r\n@Component({\r\n selector: 'hyd-form-answer-signature',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n template: `\r\n \r\n `\r\n})\r\nexport class AnswerSignatureComponent implements AfterViewInit {\r\n\r\n private _emptySignature = true;\r\n get emptySignature() { return this._emptySignature; }\r\n\r\n @ViewChild(SignaturePad) signaturePad: SignaturePad;\r\n @ViewChild(SignaturePad, { read: ElementRef }) signaturePadElRef: ElementRef;\r\n\r\n constructor() {}\r\n\r\n ngAfterViewInit() {\r\n\r\n }\r\n\r\n drawComplete() {\r\n this._emptySignature = false;\r\n }\r\n\r\n clear() {\r\n this.signaturePad.clear();\r\n this._emptySignature = true;\r\n }\r\n\r\n private _resizeCanvas() {\r\n\r\n const data = this.signaturePad.toData();\r\n const width = window.innerWidth - 100;\r\n const height = width * (9 / 16);\r\n\r\n this.signaturePad.set('canvasWidth', width);\r\n this.signaturePad.set('canvasHeight', height);\r\n\r\n const canvas = this.signaturePad.queryPad()._canvas;\r\n\r\n const ratio = Math.max(window.devicePixelRatio || 1, 1);\r\n canvas.width = canvas.offsetWidth * ratio;\r\n canvas.height = canvas.offsetHeight * ratio;\r\n canvas.getContext('2d').scale(ratio, ratio);\r\n\r\n this.signaturePad.fromData(data);\r\n }\r\n}\r\n","\n \n ","
\r\n
\r\n \r\n
\r\n \r\n \r\n
{{ value.Value }}
\r\n \r\n
\r\n
\r\n
\r\n","import { Component, ChangeDetectionStrategy, OnInit, Input, Output, EventEmitter, ChangeDetectorRef } from '@angular/core';\r\nimport { iconNames } from '@hyd-lib-form-ui/form.icons';\r\n\r\ntype ValueChangeType = 'increment' | 'decrement';\r\n\r\n@Component({\r\n selector: 'hyd-form-value-stepper',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrls: ['./value-stepper.scss'],\r\n template: `\r\n \r\n \r\n \r\n `\r\n})\r\nexport class ValueStepperComponent implements OnInit {\r\n\r\n @Input()\r\n selectedIndex: number;\r\n\r\n get defaultSelectedIndex() {\r\n if (this.selectedIndex !== undefined) {\r\n return this.selectedIndex;\r\n }\r\n return this.startIndex;\r\n }\r\n\r\n @Input()\r\n placeholder: string;\r\n\r\n @Input()\r\n options: string[] = [];\r\n\r\n @Input()\r\n startIndex: number;\r\n\r\n @Output()\r\n selectedIndexChanged = new EventEmitter();\r\n\r\n icons = iconNames;\r\n\r\n private _changingTimer: any;\r\n private _isChanging = false;\r\n private _count = 0;\r\n\r\n get selectedValue() {\r\n if (this.selectedIndex === undefined) {\r\n return this.placeholder;\r\n } else {\r\n return this.options[this.selectedIndex];\r\n }\r\n }\r\n\r\n get isValid() {\r\n return this.selectedIndex !== undefined;\r\n }\r\n constructor(private changeRef: ChangeDetectorRef) {}\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n selectChanged(newIndexVal: string) {\r\n\r\n const newIndex = parseInt(newIndexVal, 10);\r\n if (!isNaN(newIndex)) {\r\n this._updateSelectedIndex(newIndex);\r\n }\r\n }\r\n\r\n changeValueStart(type: ValueChangeType) {\r\n\r\n this._isChanging = true;\r\n this._changeValue(type);\r\n }\r\n\r\n private _changeValue(type: ValueChangeType) {\r\n\r\n let newIndex = this.selectedIndex;\r\n\r\n if (isNaN(newIndex)) {\r\n if (this.startIndex !== undefined) {\r\n newIndex = this.startIndex;\r\n } else {\r\n if (type === 'increment') {\r\n newIndex = 0;\r\n } else {\r\n newIndex = this.options.length - 1;\r\n }\r\n }\r\n } else {\r\n if (type === 'increment') {\r\n newIndex++;\r\n } else {\r\n newIndex--;\r\n }\r\n\r\n if (newIndex < 0) {\r\n newIndex = this.options.length - 1;\r\n } else if (newIndex >= this.options.length) {\r\n newIndex = 0;\r\n }\r\n }\r\n\r\n this._updateSelectedIndex(newIndex);\r\n this.changeRef.markForCheck();\r\n\r\n const delay = Math.max(400 - (Math.max(this._count - 2, 0) * 50), 80);\r\n this._changingTimer = setTimeout(() => {\r\n if (this._isChanging) {\r\n this._changeValue(type);\r\n }\r\n }, delay);\r\n\r\n this._count++;\r\n }\r\n\r\n changeValueEnd() {\r\n this._isChanging = false;\r\n if (this._changingTimer) {\r\n clearTimeout(this._changingTimer);\r\n delete this._changingTimer;\r\n this._count = 0;\r\n }\r\n }\r\n\r\n private _updateSelectedIndex(newIndex: number) {\r\n this.selectedIndex = newIndex;\r\n this.selectedIndexChanged.emit(this.selectedIndex);\r\n }\r\n}\r\n","/**\n * @fileoverview This file was generated by the Angular template compiler. Do not edit.\n *\n * @suppress {suspiciousCode,uselessCode,missingProperties,missingOverride,checkTypes,extraRequire}\n * tslint:disable\n */\nvar styles = [\"[_nghost-%COMP%]{display:inline-flex;flex-direction:column;cursor:pointer;font-size:1.2rem}[_nghost-%COMP%] button[_ngcontent-%COMP%]{cursor:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;border:none}[_nghost-%COMP%] button[_ngcontent-%COMP%] nbIcon[_ngcontent-%COMP%]{font-size:1rem}[_nghost-%COMP%] button[_ngcontent-%COMP%]:focus{z-index:1}[_nghost-%COMP%] button.hyd-stepper-increment[_ngcontent-%COMP%]{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}[_nghost-%COMP%] button.hyd-stepper-decrement[_ngcontent-%COMP%]{border-top-left-radius:0!important;border-top-right-radius:0!important}[_nghost-%COMP%] select[_ngcontent-%COMP%]{opacity:0;border-radius:0;padding:1rem;cursor:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:center;box-sizing:border-box;border:none}[_nghost-%COMP%] .hyd-stepper-select[_ngcontent-%COMP%]{position:relative;cursor:inherit}[_nghost-%COMP%] .hyd-stepper-select[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{position:absolute;left:0;top:0;bottom:0;right:0;cursor:inherit;pointer-events:none}[_nghost-%COMP%] .hyd-stepper-select[_ngcontent-%COMP%] > span[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{pointer-events:inherit;width:100%;height:100%;border-radius:0;cursor:inherit}\"];\nexport { styles as styles };\n\n","\n \n \n \n ","import {\r\n Component,\r\n ChangeDetectionStrategy,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n SimpleChanges,\r\n Output,\r\n ChangeDetectorRef\r\n} from '@angular/core';\r\nimport { iconNames } from '@hyd-lib-form-ui/form.icons';\r\nimport { pad } from '@hyd-lib';\r\nimport { LocaleService } from '@hyd-lib-form-logic/services/locale.service';\r\n\r\nconst monthsWithThirtyDays = [4, 6, 9, 11];\r\n\r\n@Component({\r\n selector: 'hyd-form-date',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrls: ['./date.scss'],\r\n template: `\r\n \r\n \r\n \r\n `\r\n})\r\nexport class DateComponent implements OnChanges {\r\n icons = iconNames;\r\n\r\n @Input() date: string;\r\n @Input() defaultDate: string;\r\n\r\n dateOptions: string[] = [];\r\n monthOptions: string[] = [\r\n 'January',\r\n 'February',\r\n 'March',\r\n 'April',\r\n 'May',\r\n 'June',\r\n 'July',\r\n 'August',\r\n 'September',\r\n 'October',\r\n 'November',\r\n 'December'\r\n ];\r\n yearOptions: string[] = [];\r\n\r\n dateValue: number;\r\n get dateIndex() {\r\n if (this.dateValue !== undefined) {\r\n return this.dateValue - 1;\r\n }\r\n return;\r\n }\r\n\r\n monthValue: number;\r\n get monthIndex() {\r\n if (this.monthValue !== undefined) {\r\n return this.monthValue - 1;\r\n }\r\n return;\r\n }\r\n\r\n yearValue: number;\r\n get yearIndex() {\r\n if (this.yearValue !== undefined) {\r\n return this.yearValue - 1800;\r\n }\r\n return;\r\n }\r\n\r\n @Output()\r\n dateChanged = new EventEmitter();\r\n\r\n constructor(\r\n private changeRef: ChangeDetectorRef,\r\n public localeService: LocaleService\r\n ) {\r\n for (let i = 1800; i <= 2200; i++) {\r\n this.yearOptions.push(`${i}`);\r\n }\r\n }\r\n\r\n updateDateString() {\r\n if (\r\n this.dateValue !== undefined &&\r\n this.monthValue !== undefined &&\r\n this.yearIndex !== undefined\r\n ) {\r\n this.date = `${this.yearValue}-${pad(this.monthValue)}-${pad(\r\n this.dateValue\r\n )}`;\r\n this.dateChanged.emit(this.date);\r\n }\r\n }\r\n\r\n clearValue() {\r\n this.date = undefined;\r\n this.parseDateString();\r\n this.updateDateValues();\r\n this.changeRef.markForCheck();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['date']) {\r\n this.parseDateString();\r\n this.updateDateValues();\r\n }\r\n }\r\n\r\n dateValueChanged(newDateIndex: number) {\r\n this.dateValue = newDateIndex + 1;\r\n this.updateDateString();\r\n }\r\n\r\n monthChanged(newMonthIndex: number) {\r\n this.monthValue = newMonthIndex + 1;\r\n this.updateDateValues();\r\n this.updateDateString();\r\n }\r\n\r\n yearChanged(newYearIndex: number) {\r\n this.yearValue = newYearIndex + 1800;\r\n this.updateDateValues();\r\n this.updateDateString();\r\n }\r\n\r\n private updateDateValues() {\r\n let dayCount = 31;\r\n\r\n if (this.monthValue) {\r\n if (monthsWithThirtyDays.includes(this.monthValue)) {\r\n dayCount = 30;\r\n } else if (this.monthValue === 2) {\r\n dayCount = 28;\r\n\r\n if (this.yearValue) {\r\n const year = this.yearValue;\r\n const hasLeapYear =\r\n (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\r\n\r\n if (hasLeapYear) {\r\n dayCount = 29;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (dayCount !== this.dateOptions.length) {\r\n const newDateOptions = [];\r\n\r\n for (let i = 1; i <= dayCount; i++) {\r\n newDateOptions.push(i);\r\n }\r\n\r\n if (this.dateValue > dayCount) {\r\n this.dateValue = dayCount;\r\n }\r\n\r\n this.dateOptions = newDateOptions;\r\n }\r\n }\r\n\r\n private parseDateString() {\r\n if (this.date === undefined) {\r\n this.dateValue = undefined;\r\n this.monthValue = undefined;\r\n this.yearValue = undefined;\r\n return;\r\n }\r\n\r\n const dateParts = this.date.split('-');\r\n\r\n const date = parseInt(dateParts[2], 10);\r\n const month = parseInt(dateParts[1], 10);\r\n const year = parseInt(dateParts[0], 10);\r\n\r\n this.dateValue = date;\r\n this.monthValue = month;\r\n this.yearValue = year;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({providedIn: 'any'})\r\nexport class LocaleService {\r\n\r\n yearIndex: number;\r\n monthIndex: number;\r\n dateIndex: number;\r\n\r\n constructor() {\r\n const d = new Date(2000, 6, 9);\r\n const localeString = d.toLocaleDateString(navigator.language);\r\n this.yearIndex = localeString.indexOf('2000');\r\n this.monthIndex = localeString.indexOf('7');\r\n this.dateIndex = localeString.indexOf('9');\r\n }\r\n}\r\n","/**\n * @fileoverview This file was generated by the Angular template compiler. Do not edit.\n *\n * @suppress {suspiciousCode,uselessCode,missingProperties,missingOverride,checkTypes,extraRequire}\n * tslint:disable\n */\nvar styles = [\"[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center}[_nghost-%COMP%] hyd-form-value-stepper[_ngcontent-%COMP%]{margin:0 .3rem}\"];\nexport { styles as styles };\n\n","\n \n \n \n ","import { Component, ChangeDetectionStrategy, Input, OnChanges, SimpleChanges, EventEmitter, Output, ChangeDetectorRef } from '@angular/core';\r\nimport { iconNames } from '@hyd-lib-form-ui/form.icons';\r\nimport { pad } from '@hyd-lib';\r\n\r\n@Component({\r\n selector: 'hyd-form-time',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrls: ['./time.scss'],\r\n template: `\r\n \r\n :\r\n \r\n \r\n `\r\n})\r\nexport class TimeComponent implements OnChanges {\r\n\r\n icons = iconNames;\r\n\r\n @Input() time: string;\r\n @Input() defaultTime: string;\r\n\r\n hourOptions: string[] = [];\r\n minuteOptions: string[] = [];\r\n periodOptions = ['AM', 'PM'];\r\n\r\n hourValue: number;\r\n get hourIndex() {\r\n if (this.hourValue !== undefined) {\r\n return this.hourValue - 1;\r\n }\r\n return;\r\n }\r\n\r\n minuteValue: number;\r\n get minuteIndex() {\r\n if (this.minuteValue !== undefined) {\r\n return this.minuteValue;\r\n }\r\n return;\r\n }\r\n\r\n periodValue: number;\r\n get periodIndex() {\r\n return this.periodValue;\r\n }\r\n\r\n @Output()\r\n timeChanged = new EventEmitter();\r\n\r\n constructor(private changeRef: ChangeDetectorRef) {\r\n\r\n const hourValues = [];\r\n for (let i = 1; i <= 12; i++) {\r\n hourValues.push(i.toString());\r\n }\r\n this.hourOptions = hourValues;\r\n\r\n const minuteValues = [];\r\n for (let i = 0; i <= 59; i++) {\r\n let v = i.toString();\r\n if (i < 10) {\r\n v = '0' + v;\r\n }\r\n\r\n minuteValues.push(v);\r\n }\r\n\r\n this.minuteOptions = minuteValues;\r\n }\r\n\r\n clearValue() {\r\n this.time = undefined;\r\n this.parseTimeString();\r\n this.changeRef.markForCheck();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['time']) {\r\n this.parseTimeString();\r\n }\r\n }\r\n\r\n hourChanged(newHourIndex: number) {\r\n this.hourValue = newHourIndex + 1;\r\n this.updateTimeString();\r\n }\r\n\r\n minuteChanged(newMinuteIndex: number) {\r\n this.minuteValue = newMinuteIndex;\r\n this.updateTimeString();\r\n }\r\n\r\n periodChanged(newPeriodIndex: number) {\r\n this.periodValue = newPeriodIndex;\r\n this.updateTimeString();\r\n }\r\n\r\n updateTimeString() {\r\n if (this.hourValue !== undefined && this.minuteValue !== undefined && this.periodValue !== undefined) {\r\n const hour = this.periodValue === 0 ? this.hourValue : this.hourValue + 12;\r\n this.time = `${pad(hour)}:${pad(this.minuteValue)}`;\r\n this.timeChanged.emit(this.time);\r\n }\r\n }\r\n\r\n private parseTimeString() {\r\n\r\n if (this.time === undefined) {\r\n this.hourValue = undefined;\r\n this.minuteValue = undefined;\r\n this.periodValue = undefined;\r\n return;\r\n }\r\n\r\n const timeParts = this.time.split(':');\r\n\r\n let hour = parseInt(timeParts[0], 10);\r\n let period = 0;\r\n const minute = parseInt(timeParts[1], 10);\r\n\r\n if (hour > 12) {\r\n hour = hour - 12;\r\n period = 1;\r\n }\r\n\r\n this.hourValue = hour;\r\n this.minuteValue = minute;\r\n this.periodValue = period;\r\n }\r\n}\r\n","/**\n * @fileoverview This file was generated by the Angular template compiler. Do not edit.\n *\n * @suppress {suspiciousCode,uselessCode,missingProperties,missingOverride,checkTypes,extraRequire}\n * tslint:disable\n */\nvar styles = [\"[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center}[_nghost-%COMP%] .hyd-time-seperator[_ngcontent-%COMP%]{font-size:1.2rem}[_nghost-%COMP%] hyd-form-value-stepper[_ngcontent-%COMP%]{margin:0 .3rem}\"];\nexport { styles as styles };\n\n","\n \n :\n \n \n ","import { Component, Input, ChangeDetectionStrategy, EventEmitter, Output, OnInit, ViewChild } from '@angular/core';\r\nimport { EAnswerType } from '@hyd-form-provider';\r\nimport { TimeComponent } from './time.component';\r\nimport { DateComponent } from './date.component';\r\nimport { iconNames } from '@hyd-lib-form-ui/form.icons';\r\n\r\ntype DateInputType = EAnswerType.Date | EAnswerType.Time | EAnswerType.DateTime | EAnswerType.None;\r\n\r\n@Component({\r\n selector: 'hyd-form-answer-datetime',\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n template: `\r\n
\r\n
\r\n {{ 'DateTime.TapToSelect' | i18next }}\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\nexport class AnswerDateTimeComponent implements OnInit {\r\n\r\n @Input() type: DateInputType;\r\n @Input() value: string;\r\n @Input() defaultValue: string;\r\n @Input() showStampButton = false;\r\n\r\n @Output() valueChanged = new EventEmitter();\r\n\r\n get showDate() { return this.type !== EAnswerType.Time; }\r\n get showTime() { return this.type !== EAnswerType.Date; }\r\n\r\n selectedDate: string;\r\n selectedTime: string;\r\n defaultDate: string;\r\n defaultTime: string;\r\n\r\n icons = iconNames;\r\n\r\n @ViewChild('time', { read: TimeComponent }) timeRef: TimeComponent;\r\n @ViewChild('date', { read: DateComponent }) dateRef: DateComponent;\r\n\r\n ngOnInit(): void {\r\n if (this.value) {\r\n switch (this.type) {\r\n case EAnswerType.Date:\r\n this.selectedDate = this.value;\r\n break;\r\n case EAnswerType.Time:\r\n this.selectedTime = this.value;\r\n break;\r\n case EAnswerType.DateTime:\r\n const parts = this.value.split('T');\r\n this.selectedDate = parts[0];\r\n this.selectedTime = parts[1];\r\n break;\r\n }\r\n }\r\n\r\n if (this.defaultValue) {\r\n switch (this.type) {\r\n case EAnswerType.Date:\r\n this.defaultDate = this.defaultValue;\r\n break;\r\n case EAnswerType.Time:\r\n this.defaultTime = this.defaultValue;\r\n break;\r\n case EAnswerType.DateTime:\r\n const parts = this.defaultValue.split('T');\r\n this.defaultDate = parts[0];\r\n this.defaultTime = parts[1];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n dateChanged(newDate: string) {\r\n this.selectedDate = newDate;\r\n this.answerDateTimeChanged();\r\n }\r\n\r\n timeChanged(newTime: string) {\r\n this.selectedTime = newTime;\r\n this.answerDateTimeChanged();\r\n }\r\n\r\n answerDateTimeChanged() {\r\n\r\n switch (this.type) {\r\n case EAnswerType.Date:\r\n if (this.selectedDate !== undefined) {\r\n this.valueChanged.emit(this.selectedDate);\r\n }\r\n break;\r\n case EAnswerType.Time:\r\n if (this.selectedTime !== undefined) {\r\n this.valueChanged.emit(this.selectedTime);\r\n }\r\n break;\r\n case EAnswerType.DateTime:\r\n case EAnswerType.None:\r\n if (this.selectedTime !== undefined && this.selectedDate !== undefined) {\r\n this.valueChanged.emit(`${this.selectedDate}T${this.selectedTime}`);\r\n }\r\n break;\r\n }\r\n }\r\n\r\n clearDate() {\r\n this.selectedDate = undefined;\r\n this.selectedTime = undefined;\r\n\r\n if (this.dateRef) {\r\n this.dateRef.clearValue();\r\n }\r\n\r\n\r\n if (this.timeRef) {\r\n this.timeRef.clearValue();\r\n }\r\n this.valueChanged.emit();\r\n }\r\n\r\n stampDate() {\r\n\r\n // returns date in format:\r\n // YYYY-mm-ddThh:mm:ss:mmmmmmmz\r\n\r\n if (this.defaultValue) {\r\n this.selectedDate = this.defaultDate;\r\n this.selectedTime = this.defaultTime;\r\n } else {\r\n const nowString = this._dateNowString();\r\n\r\n this.selectedDate = nowString.substring(0, 10);\r\n this.selectedTime = nowString.substring(11, 16);\r\n }\r\n this.answerDateTimeChanged();\r\n }\r\n\r\n _dateNowString(): string {\r\n\r\n const date = new Date();\r\n const offsetMs = date.getTimezoneOffset() * 60 * 1000;\r\n const msLocal = date.getTime() - offsetMs;\r\n const dateLocal = new Date(msLocal);\r\n const iso = dateLocal.toISOString();\r\n\r\n return iso;\r\n }\r\n}\r\n","\n
\n
\n {{ 'DateTime.TapToSelect' | i18next }}\n
\n \n \n \n \n
\n
\n \n \n
\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\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
{{ 'GPS.Lat' | i18next }}{{ locationLabel('latitude') }}
{{ 'GPS.Lat' | i18next }}{{ locationLabel('longitude') }}
{{ 'GPS.Alt' | i18next }}{{ locationLabel('altitude') }}
{{ 'GPS.Acc' | i18next }}{{ locationLabel('accuracy') }}
\r\n\r\n
{{ status }}
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n","import { Component, OnInit, Input, HostBinding, EventEmitter, Output, ChangeDetectionStrategy } from '@angular/core';\r\nimport { Options, ChangeContext } from 'ng5-slider';\r\nimport { HydThemeService } from '@hyd-lib-theme';\r\nimport { ResourceService } from '@hyd-lib-form-logic/services/resource.service';\r\nimport { IAnswerModel } from '@hyd-form-provider';\r\n\r\n@Component({\r\n selector: 'hyd-form-answer-likert',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n template: `\r\n
\r\n
\r\n \r\n
\r\n
{{ selectedLabel }}
\r\n
\r\n
\r\n \r\n \r\n
\r\n {{ leftLabel }}\r\n {{ rightLabel }}\r\n
\r\n
\r\n `\r\n})\r\nexport class AnswerLikertComponent implements OnInit {\r\n\r\n @Input() answers: IAnswerModel[] = [];\r\n @Input() selectedAnswer: IAnswerModel;\r\n @Input() displayLabels = true;\r\n\r\n @Output() resultValueChanged = new EventEmitter();\r\n\r\n @HostBinding('class.has-value') get hasValue() {\r\n return this.selectedAnswer;\r\n }\r\n\r\n value = 0;\r\n\r\n get leftLabel() {\r\n return this.answers.length > 0 ? this.answers[0].Text : '';\r\n }\r\n\r\n get rightLabel() {\r\n return this.answers.length > 0 ? this.answers[this.answers.length - 1].Text : '';\r\n }\r\n\r\n get selectedLabel() {\r\n if (this.selectedAnswer) {\r\n return this.selectedAnswer.Text;\r\n }\r\n return this._defaultAnswer.Text;\r\n }\r\n\r\n get displayAnswer() {\r\n if (this.selectedAnswer) {\r\n return this.selectedAnswer;\r\n }\r\n return this._defaultAnswer;\r\n }\r\n\r\n get selectedImageUrl() {\r\n return this._resourceService.getPathForResource(this.displayAnswer.Image);\r\n }\r\n\r\n get displayImage() {\r\n return typeof(this.displayAnswer.Image) === 'string';\r\n }\r\n\r\n options: Options = { };\r\n\r\n private _defaultAnswer: IAnswerModel;\r\n\r\n constructor(\r\n private _themeService: HydThemeService,\r\n private _resourceService: ResourceService\r\n ) {\r\n\r\n this._themeService.onDirectionChanged.subscribe(newDirection => {\r\n this.updateOptions();\r\n });\r\n }\r\n\r\n ngOnInit() {\r\n if (this.answers.length > 0) {\r\n this._defaultAnswer = this.answers[Math.floor(this.answers.length / 2)];\r\n if (!this.selectedAnswer) {\r\n this.value = Math.floor(this.answers.length / 2);\r\n } else {\r\n this.value = this.answers.findIndex(x => x.Id === this.selectedAnswer.Id);\r\n }\r\n }\r\n this.updateOptions();\r\n }\r\n\r\n updateOptions() {\r\n\r\n this.options = {\r\n floor: 0,\r\n ceil: this.answers.length - 1,\r\n rightToLeft: this._themeService.layoutDirection === 'rtl',\r\n animate: true,\r\n showTicks: true,\r\n step: 1\r\n };\r\n }\r\n\r\n valueChanged(event: ChangeContext) {\r\n\r\n this.resultValueChanged.emit(this.answers[event.value]);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { NbIconLibraries, NbIcons, NbSvgIcon } from '@nebular/theme';\r\nimport { icon } from '@fortawesome/fontawesome-svg-core';\r\nimport { IconDefinition } from '@fortawesome/pro-regular-svg-icons';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class HydIconService {\r\n\r\n get iconLibrary(): NbIconLibraries {\r\n return this.nbIconLib;\r\n }\r\n\r\n constructor(private nbIconLib: NbIconLibraries) {\r\n\r\n const icons: NbIcons = {};\r\n this.nbIconLib.registerSvgPack('fa', icons);\r\n\r\n this.nbIconLib.setDefaultPack('fa');\r\n }\r\n\r\n registerIcons(newIcons: IconDefinition[]) {\r\n\r\n const updatedIcons: NbIcons = {};\r\n const existingIcons = this.nbIconLib.getPack('fa');\r\n\r\n existingIcons.icons.forEach((existingIcon, name) => {\r\n updatedIcons[name] = existingIcon;\r\n });\r\n\r\n newIcons.forEach(newIcon => {\r\n if (updatedIcons[newIcon.iconName]) return;\r\n\r\n updatedIcons[newIcon.iconName] = new NbSvgIcon(newIcon.iconName, icon(newIcon as any).html);\r\n });\r\n\r\n this.nbIconLib.registerSvgPack('fa', updatedIcons);\r\n this.nbIconLib.setDefaultPack('fa');\r\n }\r\n}\r\n","import { Injectable, EventEmitter, Inject } from '@angular/core';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { NbThemeService, NbIconLibraries, NbLayoutDirectionService, NbLayoutDirection } from '@nebular/theme';\r\n\r\nimport { AppVersionService } from '@hyd-lib';\r\nimport { IconDefinition } from '@fortawesome/pro-regular-svg-icons';\r\nimport { AppTheme, AppThemeId } from '../../models/app-theme';\r\nimport { HydIconService } from '../hyd-icon/hyd-icon.service';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class HydThemeService {\r\n\r\n private _activeTheme: AppTheme;\r\n public get activeTheme(): AppTheme { return this._activeTheme; }\r\n\r\n private _installedThemes: AppTheme[] = [\r\n {\r\n id: 'default',\r\n label: 'Default',\r\n dark: false\r\n },\r\n {\r\n id: 'dark',\r\n label: 'Dark',\r\n dark: true\r\n }\r\n ];\r\n\r\n public get installedThemes() {\r\n return this._installedThemes;\r\n }\r\n\r\n public get iconLibrary(): NbIconLibraries {\r\n return this._iconService.iconLibrary;\r\n }\r\n\r\n public get layoutDirection() {\r\n return this._layoutDirectionService.getDirection();\r\n }\r\n\r\n private themeStyleEl: HTMLLinkElement;\r\n private themeScriptEl: HTMLScriptElement;\r\n\r\n onThemeChanged = new EventEmitter();\r\n onThemeLoaded = new EventEmitter();\r\n onDirectionChanged = new EventEmitter();\r\n\r\n private _cssCheckWatcher: any;\r\n\r\n private _themeReady = false;\r\n get themeReady() { return this._themeReady; }\r\n\r\n constructor(\r\n @Inject(DOCUMENT) private document: Document,\r\n private _nbThemeService: NbThemeService,\r\n private _appVersionService: AppVersionService,\r\n private _iconService: HydIconService,\r\n private _layoutDirectionService: NbLayoutDirectionService) {\r\n\r\n this._checkThemeLoaded = this._checkThemeLoaded.bind(this);\r\n\r\n requestAnimationFrame(this._checkThemeLoaded);\r\n\r\n //if (this._appVersionService.isProduction) {\r\n\r\n this.themeStyleEl = document.createElement('link');\r\n this.themeStyleEl.rel = 'stylesheet';\r\n this.themeStyleEl.type = 'text/css';\r\n this.themeStyleEl.media = 'all';\r\n document.head.appendChild(this.themeStyleEl);\r\n\r\n\r\n this._layoutDirectionService.onDirectionChange().subscribe(direction => {\r\n this.onDirectionChanged.emit(direction);\r\n });\r\n\r\n this.setTheme('default');\r\n }\r\n\r\n setTheme(themeId: AppThemeId) {\r\n\r\n this._activeTheme = this._installedThemes.find(x => x.id === themeId);\r\n\r\n this.themeStyleEl.href = `${this._activeTheme.id}.css`;\r\n\r\n this._nbThemeService.changeTheme(this._activeTheme.id);\r\n\r\n this.onThemeChanged.emit(this._activeTheme);\r\n }\r\n\r\n setLayoutDirection(direction: NbLayoutDirection) {\r\n this._layoutDirectionService.setDirection(direction);\r\n }\r\n\r\n registerIcons(icons: IconDefinition[]) {\r\n this._iconService.registerIcons(icons);\r\n }\r\n\r\n private _checkThemeLoaded() {\r\n\r\n if(getComputedStyle(this.document.body).boxSizing === 'border-box') {\r\n\r\n this._themeReady = true;\r\n\r\n this.onThemeLoaded.emit(this.activeTheme);\r\n this.onThemeChanged.emit(this.activeTheme);\r\n\r\n } else {\r\n requestAnimationFrame(this._checkThemeLoaded);\r\n }\r\n }\r\n}\r\n","\n
\n
\n \n
\n
{{ selectedLabel }}
\n
\n
\n \n \n
\n {{ leftLabel }}\n {{ rightLabel }}\n
\n
\n ","import { Component, Input, ChangeDetectionStrategy, EventEmitter, Output } from '@angular/core';\r\nimport { EAnswerType } from '@hyd-form-provider';\r\n\r\n@Component({\r\n selector: 'hyd-form-answer-text',\r\n template: `\r\n \r\n\r\n \r\n\r\n
\r\n
{{ this.prefix }}
\r\n \r\n
{{ this.suffix }}
\r\n
\r\n `\r\n})\r\nexport class AnswerTextComponent {\r\n\r\n @Input() answerType: EAnswerType;\r\n @Input() prefix: string;\r\n @Input() suffix: string;\r\n\r\n @Input() resultValue = '';\r\n\r\n @Output() resultChanged = new EventEmitter();\r\n\r\n get isText() { return this.answerType === EAnswerType.Text; }\r\n get isEmail() { return this.answerType === EAnswerType.Email; }\r\n get isNumeric() { return this.answerType === EAnswerType.Number; }\r\n\r\n constructor() {}\r\n\r\n answerTextChanged(event: KeyboardEvent) {\r\n\r\n const value = (event.target as any).value;\r\n this.resultChanged.emit(value);\r\n }\r\n}\r\n","\n \n\n \n\n
\n
{{ this.prefix }}
\n \n
{{ this.suffix }}
\n
\n ","import { Component, Input, HostBinding, OnInit, Output, EventEmitter } from '@angular/core';\r\nimport { IAnswerModel, EAnswerType } from '@hyd-form-provider';\r\nimport { ResourceService } from '@hyd-lib-form-logic/services/resource.service';\r\n\r\n\r\n@Component({\r\n selector: 'hyd-form-select-answer',\r\n template: `\r\n \r\n\r\n \r\n\r\n
\r\n\r\n \r\n \r\n
\r\n `\r\n})\r\nexport class AnswerSelectComponent {\r\n\r\n @Input() answer: IAnswerModel;\r\n @Input() responseValue: string;\r\n\r\n @HostBinding('class.selected')\r\n @Input() selected = false;\r\n\r\n @HostBinding('class.disabled')\r\n @Input() disabled = false;\r\n\r\n @HostBinding('class.exclusive')\r\n @Input() radio = true;\r\n\r\n @HostBinding('class.show-label')\r\n @Input() showLabel = true;\r\n\r\n @HostBinding('class.small')\r\n @Input() small = false;\r\n\r\n @HostBinding('class.has-image') get hasImage() { return this.answer && this.answer.Image; }\r\n\r\n @Output() answerClicked = new EventEmitter();\r\n @Output() answerValueChanged = new EventEmitter();\r\n\r\n private textAnswers = [EAnswerType.Text, EAnswerType.Number, EAnswerType.Email];\r\n get isTextAnswer() {\r\n return this.answer && this.textAnswers.includes(this.answer.AnswerType);\r\n }\r\n\r\n get imagePath() {\r\n return this._resourceService.getPathForResource(this.answer.Image);\r\n }\r\n\r\n constructor(\r\n private _resourceService: ResourceService\r\n ) { }\r\n\r\n textInputChanged(newValue: any) {\r\n this.answerValueChanged.emit(newValue);\r\n }\r\n\r\n answerLabelClicked(event: any) {\r\n this.answerClicked.emit(this.answer);\r\n }\r\n}\r\n","\n \n\n \n\n
\n\n \n \n
\n ","\r\n\r\n\r\n
\r\n \r\n\r\n \r\n
\r\n","import { Component, Input, ChangeDetectionStrategy, Output, EventEmitter, HostBinding, OnInit, ElementRef } from '@angular/core';\r\nimport { MatrixCell, IMatrixSliderCell, IMatrixRadioCell } from '@hyd-lib-form-logic/controllers/elements/matrix/matrix.controller';\r\nimport { DomSanitizer, SafeStyle } from '@angular/platform-browser';\r\nimport { Options } from 'ng5-slider';\r\nimport { HydThemeService } from '@hyd-lib-theme';\r\n\r\nexport interface MatrixCellChangeEvent {\r\n el: HTMLElement;\r\n cell: MatrixCell;\r\n}\r\n\r\n@Component({\r\n selector: 'hyd-form-answer-matrix-cell',\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n template: `\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `\r\n})\r\nexport class MatrixAnswerCellComponent implements OnInit {\r\n\r\n options: Options;\r\n\r\n sliderStyle: SafeStyle;\r\n firstLoad = true;\r\n\r\n @Input() cell: MatrixCell;\r\n\r\n get sliderCell(): IMatrixSliderCell { return this.cell as IMatrixSliderCell; }\r\n get radioCell(): IMatrixRadioCell { return this.cell as IMatrixRadioCell; }\r\n\r\n @Output() selectionChanged = new EventEmitter();\r\n\r\n @HostBinding('class')\r\n get classes() {\r\n let styleString = `${this.cell.type.toLowerCase()}-cell`;\r\n if (this.cell.type === 'Slider') {\r\n if (this.cell.selectedIndex === -1) {\r\n styleString += ' has-no-value';\r\n }\r\n }\r\n return styleString;\r\n }\r\n\r\n constructor(\r\n private _themeService: HydThemeService,\r\n private _sanitizer: DomSanitizer,\r\n private _elRef: ElementRef) {}\r\n\r\n ngOnInit() {\r\n\r\n if (this.cell.type === 'Slider') {\r\n this.options = {\r\n floor: 0,\r\n ceil: this.cell.answerIds.length - 1,\r\n rightToLeft: this._themeService.layoutDirection === 'rtl',\r\n animate: true,\r\n showTicks: true,\r\n step: 1\r\n };\r\n\r\n const sliderWidth = (this.cell.answerIds.length - 1) / this.cell.answerIds.length * 100;\r\n this.sliderStyle = this._sanitizer.bypassSecurityTrustStyle(`width: calc(${sliderWidth}% + 48px)`)\r\n }\r\n }\r\n\r\n clicked(ev: Event) {\r\n\r\n this.selectionChanged.next({\r\n el: this._elRef.nativeElement,\r\n cell: this.cell\r\n });\r\n }\r\n\r\n sliderChanged(newIndex: number) {\r\n if (!this.firstLoad && this.cell.type === 'Slider') {\r\n this.cell.selectedIndex = newIndex;\r\n this.cell.selectedId = this.cell.answerIds[newIndex];\r\n\r\n this.selectionChanged.emit({\r\n el: this._elRef.nativeElement,\r\n cell: this.cell\r\n });\r\n } else {\r\n this.firstLoad = false;\r\n }\r\n }\r\n}\r\n","\n \n \n \n \n \n \n \n ","import {\r\n Component,\r\n Input,\r\n ChangeDetectionStrategy,\r\n Output,\r\n EventEmitter,\r\n ElementRef,\r\n OnDestroy,\r\n OnChanges,\r\n AfterViewInit,\r\n ViewChild,\r\n ChangeDetectorRef,\r\n SimpleChanges,\r\n SimpleChange,\r\n} from '@angular/core';\r\nimport { iconNames } from '../../../form.icons';\r\nimport {\r\n MatrixColumn,\r\n MatrixRow,\r\n MatrixCell,\r\n} from '@hyd-lib-form-logic/controllers/elements/matrix/matrix.controller';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\n\r\nimport { MatrixCellChangeEvent } from './matrix-cell.component';\r\nimport { trigger, style, transition, animate } from '@angular/animations';\r\nimport { fromEvent, Subscription } from 'rxjs';\r\nimport { throttleTime } from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: 'hyd-form-answer-matrix',\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n templateUrl: './matrix.component.html',\r\n animations: [\r\n trigger('fadeWidth', [\r\n transition(':enter', [\r\n style({ opacity: 0, width: '0px' }),\r\n animate('.3s ease-in', style({ opacity: 1, width: '*' }))\r\n ]),\r\n transition(':leave', [\r\n animate('.3s ease-out', style({ opacity: 0, width: '0px' }))\r\n ]),\r\n ]),\r\n trigger('fadeHeight', [\r\n transition(':enter', [\r\n style({ opacity: 0, height: '0px' }),\r\n animate('.3s ease-in', style({ opacity: 1, height: '*' }))\r\n ]),\r\n transition(':leave', [\r\n animate('.3s ease-out', style({ opacity: 0, height: '0px' }))\r\n ]),\r\n ])\r\n ]\r\n})\r\nexport class MatrixAnswerComponent implements AfterViewInit, OnDestroy, OnChanges {\r\n\r\n @Input() columns: MatrixColumn[];\r\n @Input() rows: MatrixRow[];\r\n\r\n @Output() selectionChanged = new EventEmitter();\r\n\r\n canScrollLeft = false;\r\n canScrollRight = false;\r\n canScrollUp = false;\r\n canScrollDown = false;\r\n\r\n @ViewChild('mainRef', { read: ElementRef })\r\n mainElRef: ElementRef;\r\n\r\n @ViewChild('cellRef', { read: ElementRef })\r\n cellHeaderRef: ElementRef;\r\n\r\n icons = iconNames;\r\n\r\n private subscriptions: Subscription[] = [];\r\n\r\n constructor(\r\n private sanitizer: DomSanitizer,\r\n private elRef: ElementRef,\r\n private changeRef: ChangeDetectorRef) {\r\n\r\n }\r\n\r\n cellSpan(cell: MatrixCell) {\r\n if (cell.type === 'Slider') {\r\n return this.sanitizer.bypassSecurityTrustStyle(\r\n `--column-span: ${cell.answerIds.length}`\r\n );\r\n }\r\n }\r\n\r\n toggleSelected(ev: MatrixCellChangeEvent) {\r\n\r\n const { cell, el } = ev;\r\n\r\n if (cell.type === 'Slider') {\r\n const matrixEl = this.mainElRef.nativeElement;\r\n\r\n if (matrixEl.clientWidth !== matrixEl.scrollWidth) {\r\n const sliderWidth = el.clientWidth;\r\n const leftPadding = matrixEl.scrollWidth - sliderWidth;\r\n const cellWidth = (1 / cell.answerIds.length) * sliderWidth;\r\n const leftPos = cellWidth * cell.selectedIndex;\r\n\r\n if (leftPos < matrixEl.scrollLeft) {\r\n matrixEl.scrollTo({\r\n left: leftPos - (cellWidth * .25),\r\n behavior: 'smooth',\r\n });\r\n } else if (\r\n leftPos + cellWidth + leftPadding >\r\n matrixEl.clientWidth + matrixEl.scrollLeft\r\n ) {\r\n matrixEl.scrollTo({\r\n left: leftPos + cellWidth + leftPadding - matrixEl.clientWidth + (cellWidth * .25),\r\n behavior: 'smooth',\r\n });\r\n }\r\n }\r\n }\r\n\r\n this.selectionChanged.emit(cell);\r\n }\r\n\r\n ngAfterViewInit() {\r\n\r\n this.subscriptions.push(fromEvent(window, 'resize').pipe(throttleTime(100)).subscribe(() => {\r\n this._resized();\r\n }));\r\n\r\n this.subscriptions.push(\r\n fromEvent(this.mainElRef.nativeElement, 'scroll')\r\n .subscribe(() => {\r\n this._scrolled();\r\n }\r\n ));\r\n\r\n this._scrolled();\r\n this.updateSizes();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n\r\n if (changes.columns && !changes.columns.firstChange) {\r\n this.updateSizes();\r\n };\r\n }\r\n\r\n updateSizes() {\r\n this.mainElRef.nativeElement.style.setProperty('--rowNum', `${this.rows.length + 1}`);\r\n this.mainElRef.nativeElement.style.setProperty('--colNum', `${this.columns.length}`);\r\n this._resized();\r\n }\r\n\r\n scroll(dir: 'left' | 'right' | 'up' | 'down') {\r\n\r\n const opts: ScrollToOptions = {\r\n behavior: 'smooth'\r\n }\r\n\r\n switch (dir) {\r\n case 'left':\r\n opts.left = -100;\r\n break;\r\n case 'right':\r\n opts.left = 100;\r\n break;\r\n case 'up':\r\n opts.top = -100;\r\n break;\r\n case 'down':\r\n opts.top = 100;\r\n break;\r\n }\r\n\r\n this.mainElRef.nativeElement.scrollBy(opts);\r\n }\r\n\r\n ngOnDestroy() {\r\n this.subscriptions.forEach(s => s.unsubscribe());\r\n }\r\n\r\n trackColumn(index: number, column: MatrixColumn) {\r\n return column.id;\r\n }\r\n\r\n trackRow(index: number, row: MatrixRow) {\r\n return row.id;\r\n }\r\n\r\n trackCell(index: number, cell: MatrixCell) {\r\n if (cell.type === 'Slider') {\r\n return `${cell.answerIds[0]}-${cell.statementId}`;\r\n } else {\r\n return `${cell.answerId}-${cell.statementId}`;\r\n }\r\n }\r\n\r\n private _resized() {\r\n this.elRef.nativeElement.style.setProperty('--headerHeight', `${this.cellHeaderRef.nativeElement.clientHeight}px`);\r\n this.elRef.nativeElement.style.setProperty('--headerWidth', `${this.cellHeaderRef.nativeElement.clientWidth}px`);\r\n this._scrolled();\r\n }\r\n\r\n private _scrolled() {\r\n\r\n const {\r\n scrollLeft,\r\n scrollTop,\r\n scrollWidth,\r\n scrollHeight,\r\n clientWidth,\r\n clientHeight\r\n } = this.mainElRef.nativeElement;\r\n\r\n this.canScrollLeft = scrollLeft > 0;\r\n this.canScrollRight = scrollWidth - scrollLeft - clientWidth > 1;\r\n\r\n this.canScrollUp = scrollTop > 0;\r\n this.canScrollDown = scrollHeight - scrollTop - clientHeight > 1;\r\n\r\n this.changeRef.detectChanges();\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\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\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\n\r\n","\r\n","import { Component, ChangeDetectionStrategy, ViewChild, ElementRef, AfterViewInit } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\nimport { WebcamInitError, WebcamImage } from 'ngx-webcam';\r\nimport { iconNames } from '@hyd-lib-form-ui/form.icons';\r\n\r\n\r\n@Component({\r\n selector: 'hyd-form-answer-camera',\r\n template: `\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n {{ errorMessage }}\r\n \r\n `\r\n})\r\nexport class AnswerCameraComponent implements AfterViewInit {\r\n\r\n takePhoto = new Subject();\r\n\r\n image: WebcamImage;\r\n\r\n errorMessage: string;\r\n\r\n width = 640;\r\n height = 480;\r\n\r\n icons = iconNames;\r\n\r\n get empty() { return this.image === undefined; }\r\n\r\n constructor() {}\r\n\r\n ngAfterViewInit() {\r\n\r\n }\r\n\r\n\r\n clear() {\r\n delete this.image;\r\n }\r\n\r\n handleInitError(error: WebcamInitError): void {\r\n this.errorMessage = error.message;\r\n // if (error.mediaStreamError) {\r\n // if (error.mediaStreamError.name === 'NotAllowedError') {\r\n // this.errorMessage = 'Camera access was not allowed by user!';\r\n // } else {\r\n // this.errorMessage = error.;\r\n // }\r\n // }\r\n }\r\n\r\n imageCaptured(image: WebcamImage) {\r\n this.image = image;\r\n }\r\n}\r\n","\n \n
\n \n \n
\n \n
\n
\n \n {{ errorMessage }}\n \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\n\r\n\r\n \r\n \r\n
{{ 'Photo.TakePhotoTitle' | i18next }}
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n","import { Component, OnInit, Input, HostBinding, OnChanges, SimpleChanges } from '@angular/core';\r\n\r\nimport { HydThemeService } from '@hyd-lib-theme';\r\nimport { IAnswerModel } from '@hyd-form-provider';\r\nimport { ResourceService } from '@hyd-lib-form-logic/services/resource.service';\r\n\r\n@Component({\r\n selector: 'hyd-form-element-ranking-item',\r\n template: `\r\n
\r\n
{{ answer.Text }}
\r\n \r\n `\r\n})\r\nexport class RankingItemComponent implements OnInit, OnChanges {\r\n\r\n @Input() answer: IAnswerModel;\r\n @Input() showLabel = true;\r\n @Input() showImage = false;\r\n @Input() smallImage = false;\r\n\r\n imageUrl: string;\r\n\r\n @HostBinding('attr.dir')\r\n get direction() { return this._theme.layoutDirection; }\r\n\r\n @HostBinding('style.order')\r\n @Input() position: number;\r\n\r\n constructor(\r\n private _theme: HydThemeService,\r\n private _resourceService: ResourceService) { }\r\n\r\n ngOnInit() {\r\n\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes['answer']) {\r\n this.imageUrl = this._resourceService.getPathForResource(this.answer.Image);\r\n }\r\n }\r\n\r\n}\r\n","\n
\n
{{ answer.Text }}
\n \n ","
\r\n
\r\n
{{ 'Ranking.UnrankedTitle' | i18next }}
\r\n \r\n
\r\n \r\n {{ 'Ranking.AllItemsRanked' | i18next }}\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
{{ 'Ranking.RankedTitle' | i18next }}
\r\n \r\n
\r\n \r\n {{ 'Ranking.DropItemsHere' | i18next }}\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n\r\n","import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, OnChanges, SimpleChange, SimpleChanges } from '@angular/core';\r\nimport { Options, ChangeContext } from 'ng5-slider';\r\nimport { HydThemeService } from '@hyd-lib-theme';\r\nimport { ScaleDisplay } from '@hyd-lib-form-logic/controllers/elements/scale/scale.controller';\r\n\r\n\r\n@Component({\r\n selector: 'hyd-form-answer-scale',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n template: `\r\n \r\n
\r\n {{ leftLabel }}\r\n {{ rightLabel }}\r\n
\r\n `\r\n})\r\nexport class AnswerScaleComponent implements OnChanges {\r\n\r\n @Input() leftLabel = '';\r\n @Input() rightLabel = '';\r\n @Input() displayAs: ScaleDisplay = 'value';\r\n\r\n value = 50;\r\n @Input() responseValue: number;\r\n\r\n @Output() responseValueChanged = new EventEmitter();\r\n\r\n get highValue() {\r\n return 'this.answer.suffix';\r\n }\r\n\r\n options: Options = {};\r\n\r\n constructor(\r\n private _themeService: HydThemeService) {\r\n\r\n this.updateSliderOptions();\r\n\r\n this._themeService.onDirectionChanged.subscribe(newDirection => {\r\n this.updateSliderOptions();\r\n });\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n\r\n const responseValueChange = changes['responseValue'];\r\n\r\n if (responseValueChange) {\r\n this.value = responseValueChange.currentValue;\r\n }\r\n\r\n if (changes['displayAs'] && !changes['displayAs'].firstChange) {\r\n this.updateSliderOptions();\r\n }\r\n }\r\n\r\n updateSliderOptions() {\r\n\r\n this.options = {\r\n floor: 0,\r\n ceil: 100,\r\n animate: true,\r\n rightToLeft: this._themeService.layoutDirection === 'rtl',\r\n translate: (value: number): string => {\r\n switch (this.displayAs) {\r\n case 'value':\r\n return `${value}`;\r\n case 'percentage':\r\n return `${value}%`;\r\n }\r\n return ``;\r\n }\r\n };\r\n }\r\n\r\n valueChanged(event: ChangeContext) {\r\n\r\n this.responseValueChanged.emit(event.value);\r\n }\r\n}\r\n","\n \n
\n {{ leftLabel }}\n {{ rightLabel }}\n
\n ","\r\n\r\n","
\r\n \r\n \r\n
\r\n","
\r\n
\r\n \r\n
\r\n \r\n {{ 'Signature.TapToSign' | i18next }}\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n \r\n \r\n
{{ 'Signature.Sign' | i18next }}
\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\n","import { Component, OnInit, OnDestroy, ChangeDetectionStrategy, ElementRef, ViewChild, AfterViewInit } from '@angular/core';\r\nimport { Subscription, fromEvent } from 'rxjs';\r\nimport { throttleTime } from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: 'hyd-form-shadow-scroll',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n template: `\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n `\r\n})\r\nexport class ShadowScrollComponent implements AfterViewInit, OnDestroy {\r\n\r\n private subscriptions: Subscription[] = [];\r\n\r\n @ViewChild('top') topShadow: ElementRef;\r\n @ViewChild('bottom') bottomShadow: ElementRef;\r\n @ViewChild('left') leftShadow: ElementRef;\r\n @ViewChild('right') rightShadow: ElementRef;\r\n\r\n @ViewChild('scrollRef') scrollRef: ElementRef;\r\n\r\n constructor(private elRef: ElementRef) {\r\n\r\n }\r\n\r\n updateShadows() {\r\n const {\r\n clientHeight,\r\n clientWidth,\r\n scrollHeight,\r\n scrollWidth,\r\n scrollLeft,\r\n scrollTop\r\n } = this.scrollRef.nativeElement;\r\n\r\n const topScroll = Math.max(0, scrollTop);\r\n const bottomScroll = Math.max(0, scrollHeight - (scrollTop + clientHeight));\r\n const leftScroll = Math.max(0, scrollLeft);\r\n const rightScroll = Math.max(0, scrollWidth - (scrollLeft + clientWidth));\r\n\r\n this.topShadow.nativeElement.style.height = `${Math.min(topScroll * .25, 15)}px`;\r\n this.bottomShadow.nativeElement.style.height = `${Math.min(bottomScroll * .25, 15)}px`;\r\n\r\n this.leftShadow.nativeElement.style.width = `${Math.min(leftScroll * .25, 15)}px`;\r\n this.rightShadow.nativeElement.style.width = `${Math.min(rightScroll * .25, 15)}px`;\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.subscriptions.push(fromEvent(window, 'scroll').pipe(throttleTime(200)).subscribe(ev => {\r\n this.updateShadows();\r\n }));\r\n this.subscriptions.push(fromEvent(this.scrollRef.nativeElement, 'scroll').subscribe(ev => {\r\n this.updateShadows();\r\n }));\r\n\r\n setTimeout(() => {\r\n this.updateShadows();\r\n }, 0);\r\n }\r\n\r\n ngOnDestroy() {\r\n this.subscriptions.forEach(x => x.unsubscribe());\r\n }\r\n}\r\n","\n
\n
\n
\n
\n
\n \n
\n ","\n \n \n \n \n
\n \n
\n ","\n \n ","\n \n ","import { Component, OnInit, Input, OnChanges } from '@angular/core';\r\nimport { trigger, transition, style, animate, sequence, state, query, animateChild, group } from '@angular/animations';\r\nimport { IValidationMessage } from '@hyd-lib-form-logic/data/interfaces/validation';\r\nimport { iconNames } from '@hyd-lib-form-ui/form.icons';\r\n\r\n@Component({\r\n selector: 'hyd-form-validation-message-item',\r\n template: `\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n {{ this.messageItem.message }}\r\n
\r\n
\r\n `,\r\n animations: [\r\n trigger('validationAnim', [\r\n // state('invalid', style({ opacity: 1, height: '*' })),\r\n // state('valid', style({ opacity: 0, height: 0 })),\r\n // transition('valid => invalid', [\r\n // group([\r\n // query('@*', [animateChild({})]),\r\n // animate('.3s')\r\n // ])\r\n // ]),\r\n transition('invalid => valid', [\r\n group([\r\n query('@*', [animateChild()]),\r\n animate('.3s 1s ease-out')\r\n ])\r\n ])\r\n ]),\r\n trigger('iconAnim', [\r\n transition(':enter', [\r\n style({ opacity: 0, transform: 'scale(.8)' }),\r\n sequence([\r\n animate('.1s', style({ opacity: 1, transform: 'scale(1.2)' })),\r\n animate('.1s', style({ transform: 'scale(1)' })),\r\n ])\r\n ]),\r\n transition(':leave', [\r\n style({ position: 'absolute', top: 0 }),\r\n animate('.3s ease-out', style({\r\n opacity: 0, transform: 'translateY(1rem)'\r\n }))\r\n ])\r\n ]),\r\n ]\r\n})\r\nexport class ValidationMessageItemComponent implements OnInit, OnChanges {\r\n\r\n @Input() messageItem: IValidationMessage;\r\n\r\n get validationState() {\r\n return this.messageItem.isValid ? 'valid' : 'invalid';\r\n }\r\n\r\n visible: boolean;\r\n\r\n icons = iconNames;\r\n\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n this.visible = !this.messageItem.isValid;\r\n }\r\n\r\n ngOnChanges() {\r\n if (!this.visible) {\r\n this.visible = !this.messageItem.isValid;\r\n }\r\n }\r\n}\r\n","\n
\n
\n \n \n
\n
\n {{ this.messageItem.message }}\n
\n
\n ","import { Component, Input, OnDestroy, ChangeDetectorRef, ChangeDetectionStrategy, OnChanges, OnInit, ViewChildren, QueryList } from '@angular/core';\r\nimport { NbComponentStatus } from '@nebular/theme';\r\nimport { trigger, transition, style, animate } from '@angular/animations';\r\nimport { IElementValidation, IValidationMessage } from '@hyd-lib-form-logic/data/interfaces/validation';\r\nimport { Subscription } from 'rxjs';\r\nimport { ValidationService } from '@hyd-lib-form-logic/services/form/validation.service';\r\nimport { flashAnimation } from 'angular-animations';\r\nimport { ValidationMessageItemComponent } from './validation-message-item.component';\r\n\r\n@Component({\r\n selector: 'hyd-form-validation-message',\r\n template: `\r\n \r\n \r\n \r\n \r\n `,\r\n\r\n animations: [\r\n trigger('visibleAnim', [\r\n transition(':enter', [\r\n style({ opacity: 0, height: '0', marginTop: '0' }),\r\n animate('.3s ease', style({ opacity: .9, height: '*', marginTop: '1rem' }))\r\n ])\r\n ]),\r\n flashAnimation()\r\n ]\r\n})\r\nexport class ValidationMessageComponent implements OnInit, OnChanges, OnDestroy {\r\n\r\n shake = false;\r\n visible: boolean;\r\n\r\n private _validationSubscription: Subscription;\r\n\r\n @Input() validation: IElementValidation;\r\n\r\n @Input() get accent(): NbComponentStatus {\r\n if (this.validation.isValid) {\r\n return 'success';\r\n } else {\r\n return 'danger';\r\n }\r\n }\r\n\r\n @ViewChildren(ValidationMessageItemComponent) items: QueryList;\r\n\r\n // @HostBinding('@alertAnim')\r\n // get isValid() {\r\n // return this.validation.isValid ? 'valid' : 'invalid';\r\n // }\r\n\r\n constructor(\r\n private validationService: ValidationService,\r\n private changeRef: ChangeDetectorRef) {\r\n\r\n this._validationSubscription = this.validationService.$flashValidationMessage.subscribe(() => {\r\n if (!this.validation.isValid) {\r\n this.shake = !this.shake;\r\n changeRef.detectChanges();\r\n }\r\n });\r\n }\r\n\r\n ngOnInit() {\r\n this.visible = !this.validation.isValid;\r\n }\r\n\r\n ngOnChanges() {\r\n if (!this.visible) {\r\n this.visible = !this.validation.isValid;\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n this._validationSubscription.unsubscribe();\r\n }\r\n\r\n trackMessages(index: number, item: IValidationMessage) {\r\n return item.message;\r\n }\r\n}\r\n","\n \n \n \n \n ","\n \n \n
\n \n
\n \n ","import { Component, OnInit, Input, ChangeDetectionStrategy, HostBinding } from '@angular/core';\r\nimport { IFooterViewModel} from '@hyd-lib-form-logic/data/interfaces/footer.viewmodel';\r\nimport { ResourceService } from '@hyd-lib-form-logic/services/resource.service';\r\nimport { SessionController } from '@hyd-lib-form-logic/controllers/session.controller';\r\n\r\n@Component({\r\n selector: 'hyd-form-footer',\r\n template: ``,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormFooterComponent implements OnInit {\r\n\r\n get viewModel() {\r\n return this._sessionController?.formViewModel?.footer;\r\n }\r\n\r\n get imagePath() {\r\n return this._resourceService.getPathForResource(this.viewModel.image);\r\n }\r\n\r\n @HostBinding('class.small-footer')\r\n get smallFooter() {\r\n const activeSubType = this._sessionController?.formViewModel?.activeElementController?.subType;\r\n return activeSubType !== 'Start' && activeSubType !== 'Finish';\r\n }\r\n\r\n\r\n constructor(\r\n private _resourceService: ResourceService,\r\n private _sessionController: SessionController) {}\r\n\r\n ngOnInit() {\r\n }\r\n}\r\n","","import { Component, Input, HostBinding, ChangeDetectionStrategy, HostListener, OnDestroy, OnInit, AfterViewInit, ViewChild, ViewContainerRef, ComponentFactoryResolver } from '@angular/core';\r\nimport { ElementController } from '@hyd-lib-form-logic/controllers/elements/ElementController';\r\nimport { trigger, transition, style, animate } from '@angular/animations';\r\n\r\nimport { ElementTransitionService, TransitionAction } from '@hyd-lib-form-logic/services/form/element-transition.service';\r\nimport { getElementComponent } from './element.component.factory';\r\nimport { Subscription } from 'rxjs';\r\n\r\n@Component({\r\n selector: 'hyd-form-element',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n template: `\r\n \r\n \r\n \r\n \r\n `,\r\n animations: [\r\n trigger('alertAnim', [\r\n transition('void => next', [\r\n style({ opacity: 0, transform: 'translateX(100%)' }),\r\n animate('.3s ease-in-out', style({ opacity: 1, transform: 'translateX(0)' }))\r\n ]),\r\n transition('next => void', [\r\n animate('.3s ease-in-out', style({ opacity: 0, transform: 'translateX(-100%)' }))\r\n ]),\r\n transition('void => back', [\r\n style({ opacity: 0, transform: 'translateX(-100%)' }),\r\n animate('.3s ease-in-out', style({ opacity: 1, transform: 'translateX(0)' }))\r\n ]),\r\n transition('back => void', [\r\n animate('.3s ease-in-out', style({ opacity: 0, transform: 'translateX(100%)' }))\r\n ])\r\n ])\r\n ]\r\n})\r\nexport class ElementComponent implements OnInit, OnDestroy, AfterViewInit {\r\n\r\n @HostBinding('class.highlight-invalid')\r\n highlightInvalid = false;\r\n\r\n @HostBinding('@alertAnim') get animation() { return this.transitionService.activeTransitionType; }\r\n\r\n @ViewChild('contentRef', { read: ViewContainerRef }) content: ViewContainerRef;\r\n\r\n constructor(\r\n private transitionService: ElementTransitionService,\r\n private componentFactoryResolver: ComponentFactoryResolver) {\r\n\r\n this._transitionAction = this.transitionService.registerTransitionAction();\r\n }\r\n\r\n private _transitionAction: TransitionAction;\r\n private _elementSubscription: Subscription;\r\n\r\n @Input() controller: ElementController;\r\n\r\n @HostListener('@alertAnim.done', ['$event']) animationDone(event: any) {\r\n\r\n if (event.toState === 'void' || event.fromState === 'void') {\r\n this._transitionAction.completeAction();\r\n }\r\n\r\n setTimeout(() => {\r\n if (event.toState === 'void') {\r\n this.transitionService.unregisterAction(this._transitionAction);\r\n delete this._transitionAction;\r\n }\r\n }, 0);\r\n }\r\n\r\n ngOnInit() {\r\n\r\n }\r\n\r\n ngAfterViewInit() {\r\n\r\n if (this.content) {\r\n this.content.clear();\r\n }\r\n\r\n const componentFactory = getElementComponent(this.controller, this.componentFactoryResolver);\r\n\r\n if (componentFactory) {\r\n const ref = this.content.createComponent(componentFactory);\r\n ref.instance.controller = this.controller;\r\n ref.changeDetectorRef.detectChanges();\r\n\r\n this._elementSubscription = this.controller.elementChanged.subscribe(() => {\r\n ref.changeDetectorRef.detectChanges();\r\n });\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n this._elementSubscription.unsubscribe();\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\nimport { SessionService } from '../session.service';\r\n\r\nexport type TransitionType = 'next' | 'back' | 'none';\r\n\r\nexport class TransitionAction {\r\n\r\n isComplete = true;\r\n\r\n actionCompleted = new Subject();\r\n\r\n completeAction() {\r\n this.isComplete = true;\r\n this.actionCompleted.next();\r\n }\r\n}\r\n\r\n@Injectable()\r\nexport class ElementTransitionService {\r\n\r\n transitionUpdate = new Subject();\r\n\r\n private _activeTransitionType: TransitionType = 'none';\r\n get activeTransitionType(): TransitionType { return this._activeTransitionType; }\r\n\r\n private _active = false;\r\n get active() { return this._active; }\r\n\r\n private _transitionActions: TransitionAction[] = [];\r\n\r\n constructor(private sessionService: SessionService) {\r\n this.sessionService.activeSessionReset.subscribe(() => {\r\n this._transitionActions.forEach(x => this.unregisterAction(x));\r\n });\r\n }\r\n\r\n registerTransitionAction(): TransitionAction {\r\n\r\n const newAction = new TransitionAction();\r\n\r\n newAction.isComplete = !this._active;\r\n\r\n newAction.actionCompleted.subscribe(() => {\r\n this._actionCompleted();\r\n });\r\n\r\n this._transitionActions.push(newAction);\r\n\r\n return newAction;\r\n }\r\n\r\n unregisterAction(action: TransitionAction) {\r\n\r\n //action.actionCompleted.unsubscribe();\r\n\r\n this._transitionActions = this._transitionActions.filter(x => x !== action);\r\n\r\n if (this.active) {\r\n this._actionCompleted();\r\n }\r\n }\r\n\r\n startTransition(type: TransitionType = 'none') {\r\n\r\n this._transitionActions.forEach(x => x.isComplete = false);\r\n\r\n this._activeTransitionType = type;\r\n this._active = true;\r\n\r\n this.transitionUpdate.next(this._active);\r\n }\r\n\r\n private _actionCompleted() {\r\n\r\n if (this._active && this._transitionActions.findIndex(x => !x.isComplete) === -1) {\r\n\r\n this._active = false;\r\n this.transitionUpdate.next(this._active);\r\n }\r\n }\r\n}\r\n","\n \n \n \n \n ","import { Component, Input, Output, EventEmitter, HostListener, HostBinding, ChangeDetectionStrategy } from '@angular/core';\r\nimport { IButtonViewModel} from '@hyd-lib-form-logic/data/interfaces/nav-button.viewmodel';\r\n\r\n@Component({\r\n selector: 'hyd-form-nav-button',\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n template: `\r\n \r\n `\r\n})\r\nexport class FormNavButtonComponent {\r\n\r\n @Input() model: IButtonViewModel;\r\n\r\n @Input() enabled = true;\r\n\r\n @Output() onaction = new EventEmitter();\r\n\r\n get appearance() {\r\n if (this.model) {\r\n return this.model.enabled ? 'filled' : 'ghost';\r\n }\r\n return 'filled';\r\n }\r\n\r\n @HostListener('click')\r\n clickInside() {\r\n if (this.enabled) {\r\n this.onaction.emit();\r\n }\r\n }\r\n\r\n @HostBinding('class.hidden') get hidden() {\r\n return !(this.model && this.model.visible);\r\n }\r\n\r\n get disabled() {\r\n return !this.enabled;\r\n }\r\n}\r\n","\n \n ","import { Component, Input, Output, EventEmitter, HostBinding } from '@angular/core';\r\nimport { INavigationViewModel} from '@hyd-lib-form-logic/data/interfaces/nav.viewmodel';\r\n\r\n@Component({\r\n selector: 'hyd-form-nav',\r\n template: `\r\n
\r\n \r\n \r\n
\r\n {{ model.title }}\r\n
\r\n \r\n \r\n
`\r\n})\r\nexport class FormNavComponent {\r\n\r\n @Input() model: INavigationViewModel;\r\n\r\n @Output() onaction = new EventEmitter();\r\n\r\n @HostBinding('class.nav-hidden')\r\n get navHidden() {\r\n return this.model ? !this.model.visible : true;\r\n }\r\n\r\n emitAction(navAction: string) {\r\n this.onaction.emit(navAction);\r\n }\r\n}\r\n","\n
\n \n \n
\n {{ model.title }}\n
\n \n \n
","import { Component, OnInit, ChangeDetectionStrategy, Input } from '@angular/core';\r\nimport { FormViewModel } from '@hyd-lib-form-logic/data/models/form.viewmodel';\r\n\r\n@Component({\r\n selector: 'hyd-form-progress-bar',\r\n template: `\r\n \r\n `,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormProgressBarComponent implements OnInit {\r\n\r\n @Input() value = 0;\r\n\r\n constructor(public formViewModel: FormViewModel) { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","import { INavigationViewModel } from '@hyd-lib-form-logic/data/interfaces/nav.viewmodel';\r\n\r\nimport { IElementValidation } from '@hyd-lib-form-logic/data/interfaces/validation';\r\nimport { EFormOption, EFormProgressBar } from '@hyd-form-provider';\r\nimport { ElementController } from '@hyd-lib-form-logic/controllers/elements/ElementController';\r\nimport { FormService } from '@hyd-lib-form-logic/services/form/form.service';\r\nimport { Injectable } from '@angular/core';\r\nimport { ElementTransitionService } from '@hyd-lib-form-logic/services/form/element-transition.service';\r\nimport { SessionService } from '@hyd-lib-form-logic/services/session.service';\r\nimport { IFooterViewModel } from '@hyd-lib-form-logic/data/interfaces/footer.viewmodel';\r\n\r\nexport interface IProgressBarViewModel {\r\n type: EFormProgressBar;\r\n value: number;\r\n}\r\n\r\nexport interface IFormViewModel {\r\n nav: INavigationViewModel;\r\n footer: IFooterViewModel;\r\n progressBar: IProgressBarViewModel;\r\n activeElementController: ElementController;\r\n changeActiveElement(newElement: ElementController): void;\r\n}\r\n\r\nconst defaultNavModel: INavigationViewModel = {\r\n backButton: {\r\n enabled: true,\r\n label: 'Back',\r\n visible: true\r\n },\r\n nextButton: {\r\n enabled: true,\r\n label: 'Next',\r\n visible: true\r\n },\r\n title: '',\r\n visible: false,\r\n enabled: true\r\n};\r\n\r\nconst defaultFooterModel: IFooterViewModel = {\r\n image: '',\r\n visible: false\r\n};\r\n\r\n@Injectable()\r\nexport class FormViewModel implements IFormViewModel {\r\n\r\n nav = defaultNavModel;\r\n footer = defaultFooterModel;\r\n\r\n progressBar: IProgressBarViewModel = {\r\n type: EFormProgressBar.None,\r\n value: 0\r\n };\r\n\r\n activeElementController: ElementController;\r\n\r\n constructor(\r\n private _form: FormService,\r\n private _transitionService: ElementTransitionService,\r\n private _sessionService: SessionService) {\r\n\r\n this._transitionService.transitionUpdate.subscribe(isActive => {\r\n this.nav.enabled = !isActive;\r\n });\r\n }\r\n\r\n reset() {\r\n this.nav = defaultNavModel;\r\n this.footer = defaultFooterModel;\r\n this.progressBar.value = 0;\r\n }\r\n\r\n changeActiveElement(newElement: ElementController) {\r\n\r\n const navViewModel = { ...this.nav };\r\n const footerViewModel = { ...this.footer };\r\n\r\n this.progressBar.type = this._form.options.progressBar;\r\n this.progressBar.value = this._form.getProgress(newElement.element.Id);\r\n\r\n if (newElement.subType === 'Start') {\r\n navViewModel.backButton.visible = false;\r\n navViewModel.nextButton.visible = false;\r\n navViewModel.enabled = false;\r\n\r\n const startFooter = this._form.getFormOption(EFormOption.StartFooter);\r\n\r\n if (startFooter) {\r\n footerViewModel.visible = true;\r\n footerViewModel.image = startFooter;\r\n } else {\r\n footerViewModel.visible = false;\r\n }\r\n } else if (newElement.subType === 'Finish') {\r\n navViewModel.backButton.visible = !this._form.options.disableBackButton;\r\n navViewModel.nextButton.visible = false;\r\n\r\n const finishFooter = this._form.getFormOption(EFormOption.FinishFooter);\r\n if (finishFooter) {\r\n footerViewModel.visible = true;\r\n footerViewModel.image = finishFooter;\r\n } else {\r\n footerViewModel.visible = false;\r\n }\r\n } else {\r\n navViewModel.backButton.visible = !this._form.options.disableBackButton;\r\n navViewModel.nextButton.visible = true;\r\n const footer = this._form.getFormOption(EFormOption.Footer);\r\n if (footer) {\r\n footerViewModel.visible = true;\r\n footerViewModel.image = footer;\r\n } else {\r\n footerViewModel.visible = false;\r\n }\r\n }\r\n\r\n navViewModel.title = newElement.element.InstructionText;\r\n\r\n const activeTransition = this._transitionService.active;\r\n navViewModel.enabled = !activeTransition;\r\n\r\n this.footer = footerViewModel;\r\n this.nav = navViewModel;\r\n this.nav.backButton.visible = this.nav.backButton.visible && !newElement.shouldHideBackButton;\r\n this.activeElementController = newElement;\r\n\r\n this.activeElementController.validationChanged.subscribe(\r\n (v: IElementValidation) => {\r\n this.nav.nextButton.enabled = v.isValid;\r\n }\r\n );\r\n\r\n this.nav.nextButton.enabled = newElement.validation.isValid;\r\n }\r\n}\r\n","\n \n ","import {\r\n Component\r\n} from '@angular/core';\r\nimport { FormViewModel } from '@hyd-lib-form-logic/data/models/form.viewmodel';\r\nimport { SessionController } from '@hyd-lib-form-logic/controllers/session.controller';\r\nimport { EFormProgressBar } from '@hyd-form-provider';\r\n\r\n@Component({\r\n selector: 'hyd-form-layout',\r\n template: `\r\n \r\n \r\n \r\n \r\n `\r\n})\r\nexport class FormLayoutComponent {\r\n\r\n constructor(\r\n public formViewModel: FormViewModel,\r\n private sessionController: SessionController\r\n ) {\r\n\r\n }\r\n\r\n onNavAction(navAction: string) {\r\n if (navAction === 'next') {\r\n this.sessionController.goNext();\r\n } else {\r\n this.sessionController.goBack();\r\n }\r\n }\r\n\r\n topProgressVisible() {\r\n return this.formViewModel.progressBar.type === EFormProgressBar.Top;\r\n }\r\n\r\n bottomProgressVisible() {\r\n return this.formViewModel.progressBar.type === EFormProgressBar.Bottom;\r\n }\r\n}\r\n","\n \n \n \n \n ","import { Component, OnInit, ViewContainerRef } from '@angular/core';\r\n\r\n\r\n@Component({\r\n selector: 'hyd-form-content',\r\n template: ``\r\n})\r\nexport class FormContentComponent implements OnInit {\r\n\r\n constructor(private viewContainerRef: ViewContainerRef) {\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n}\r\n","","import { animation, query, style, animate } from '@angular/animations';\r\n\r\n\r\nexport const d = 1200, timing = 'ease-in-out';\r\n\r\nexport interface ItemRef {\r\n length: number;\r\n index: number;\r\n}\r\n\r\nexport const colors = {\r\n red: '#be1e2d',\r\n black: '#231f20'\r\n}\r\n\r\nexport const strokeAnimation = (item: ItemRef, duration: string, stroke: string) => animation(query(`path:nth-child(${item.index + 1})`, [\r\n style({\r\n 'stroke-dasharray': item.length,\r\n 'stroke-dashoffset': item.length,\r\n 'stroke': 'transparent'\r\n }),\r\n animate(\r\n `${duration}`,\r\n style({\r\n 'stroke-dashoffset': 0,\r\n 'stroke': stroke\r\n })\r\n )\r\n]));\r\n\r\nexport const fillAnimation = (item: ItemRef, duration: string, fill: string) => animation(query(`path:nth-child(${item.index + 1})`, [\r\n style({\r\n 'fill': 'transparent'\r\n }),\r\n animate(\r\n `${duration}`,\r\n style({ fill })\r\n )\r\n]));\r\n","import { Component, ViewChildren, ElementRef, AfterViewInit, QueryList, Directive, EventEmitter, Output, Input } from '@angular/core';\r\nimport { AnimationBuilder, AnimationPlayer,group } from '@angular/animations';\r\nimport { ItemRef, strokeAnimation, fillAnimation, colors, d, timing } from '../animations';\r\n\r\n@Directive({ selector: 'path' })\r\nexport class PathElement {\r\n}\r\n\r\n\r\n@Component({\r\n selector: 'hyd-lib-app-icon',\r\n templateUrl: './hyd-icon.svg',\r\n styleUrls: ['./app-icon.component.scss']\r\n})\r\nexport class AppIconComponent implements AfterViewInit {\r\n\r\n constructor(\r\n private _builder: AnimationBuilder,\r\n private _elementRef: ElementRef\r\n ) { }\r\n\r\n _player: AnimationPlayer;\r\n\r\n @Input() animate = true;\r\n\r\n @Output() animationDone = new EventEmitter();\r\n\r\n @ViewChildren(PathElement, {read: ElementRef}) paths: QueryList>;\r\n\r\n play() {\r\n this._player.play();\r\n }\r\n\r\n filterPath(pathName: string): ItemRef[] {\r\n const items: ItemRef[] = [];\r\n this.paths.forEach((x, i) => {\r\n if (x.nativeElement.classList.contains(pathName)) {\r\n items.push({\r\n length: x.nativeElement.getTotalLength(),\r\n index: i\r\n })\r\n }\r\n });\r\n return items;\r\n }\r\n\r\n ngAfterViewInit() {\r\n\r\n const bars = this.filterPath('bar');\r\n const grainTop = this.filterPath('grain-top');\r\n const grainBottom = this.filterPath('grain-bottom');\r\n const border = this.filterPath('top-border');\r\n\r\n const borderAnimation = strokeAnimation(border[0], `${d}ms ${timing}`, colors.red);\r\n\r\n const barAnimations = group(bars.map((x, i) => {\r\n return strokeAnimation(x, `${d - (i * 50)}ms ${i * 150}ms ${timing}`, colors.black);\r\n }));\r\n\r\n const grainTopAnimations = strokeAnimation(grainTop[0], `${d}ms ${timing}`, colors.red);\r\n\r\n const grainBottomAnimations = group(grainBottom.map((x, i) => {\r\n return strokeAnimation(x, `${d - (i * 50)}ms ${i * 50}ms ${timing}`, colors.red);\r\n }));\r\n\r\n const barFillAnimation = group(bars.map((x, i) => {\r\n return fillAnimation(x, `${1000 - (i * 100)}ms ${d - 300 + (i * 100)}ms ${timing}`, colors.black);\r\n }));\r\n\r\n const grainFillAnimation = group(grainBottom.map((x, i) => {\r\n return fillAnimation(x, `${1000 - (i * 50)}ms ${d - 300 + (i * 50)}ms ${timing}`, colors.red);\r\n }));\r\n\r\n const topFillAnim = fillAnimation(grainTop[0], `${1000}ms ${d - 100}ms ${timing}`, colors.red);\r\n\r\n const borderFillAnim = fillAnimation(border[0], `${1000}ms ${d - 400}ms ${timing}`, colors.red);\r\n\r\n this._player = this._builder.build(\r\n [group([\r\n borderAnimation,\r\n barAnimations,\r\n grainBottomAnimations,\r\n grainTopAnimations,\r\n barFillAnimation,\r\n grainFillAnimation,\r\n topFillAnim,\r\n borderFillAnim\r\n ])]\r\n ).create(this._elementRef.nativeElement);\r\n\r\n this._player.onDone(() => {\r\n this.animationDone.emit();\r\n });\r\n\r\n setTimeout(() => {\r\n this.play();\r\n\r\n if (!this.animate) {\r\n this._player.setPosition(1000);\r\n }\r\n }, 300);\r\n }\r\n}\r\n","/**\n * @fileoverview This file was generated by the Angular template compiler. Do not edit.\n *\n * @suppress {suspiciousCode,uselessCode,missingProperties,missingOverride,checkTypes,extraRequire}\n * tslint:disable\n */\nvar styles = [\"[_nghost-%COMP%]{display:inline-flex;width:200px;height:200px;justify-content:center;align-items:center}[_nghost-%COMP%] svg[_ngcontent-%COMP%]{max-height:100%;max-width:100%;width:100%}[_nghost-%COMP%] path[_ngcontent-%COMP%]{stroke-linecap:round}[_nghost-%COMP%] .bar[_ngcontent-%COMP%], [_nghost-%COMP%] .grain[_ngcontent-%COMP%], [_nghost-%COMP%] .top-border[_ngcontent-%COMP%]{fill:transparent;stroke:transparent;stroke-width:1}\"];\nexport { styles as styles };\n\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","import {\r\n Component,\r\n OnInit,\r\n ViewChild,\r\n AfterViewInit,\r\n Input,\r\n ViewContainerRef,\r\n ComponentFactoryResolver,\r\n ComponentRef,\r\n OnDestroy,\r\n HostBinding,\r\n HostListener\r\n} from '@angular/core';\r\n\r\nimport { HydIconService, AppIconComponent } from '@hyd-lib-theme';\r\nimport { formIcons, iconNames } from './form.icons';\r\nimport { INavigationViewModel} from '@hyd-lib-form-logic/data/interfaces/nav.viewmodel';\r\n\r\nimport {\r\n SessionController,\r\n SessionState\r\n} from '@hyd-lib-form-logic/controllers/session.controller';\r\nimport { trigger, style, transition, animate } from '@angular/animations';\r\nimport { ElementController } from '@hyd-lib-form-logic/controllers/elements/ElementController';\r\nimport { Router } from '@angular/router';\r\nimport { FormController } from '@hyd-lib-form-logic/controllers/form.controller';\r\nimport { IProgressBarViewModel } from '@hyd-lib-form-logic/data/models/form.viewmodel';\r\nimport { EFormModeType, EFormSessionState } from '@hyd-form-provider';\r\nimport { NgxSpinnerService } from 'ngx-spinner';\r\nimport { LoadingIndicatorService } from '@hyd-lib-form-logic/services/loading-indicator.service';\r\nimport { ReloadService } from '@hyd-lib-form-logic/services/reload.service';\r\nimport { ElementComponent } from './elements/element.component';\r\nimport { Subscription } from 'rxjs';\r\n\r\n@Component({\r\n selector: 'hyd-form',\r\n animations: [\r\n trigger('fadeOut', [\r\n transition('* => void', [animate(300, style({ opacity: 0 }))])\r\n ])\r\n ],\r\n template: `\r\n
\r\n \r\n Testing\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Error\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\nexport class FormComponent implements OnInit, AfterViewInit, OnDestroy {\r\n\r\n @Input() sessionId: string;\r\n\r\n @HostBinding('class.testing')\r\n get isTestMode() { return this.formController.formMode === EFormModeType.Testing; }\r\n\r\n get nav(): INavigationViewModel {\r\n return this.sessionController.formViewModel.nav;\r\n }\r\n\r\n get progressBar(): IProgressBarViewModel {\r\n return this.sessionController.formViewModel.progressBar;\r\n }\r\n\r\n get sessionState(): SessionState {\r\n return this.sessionController.state;\r\n }\r\n\r\n get errorMessage(): string {\r\n return this.sessionController.errorMessage;\r\n }\r\n\r\n get showLoadingScreen(): boolean {\r\n return (\r\n !this.animationDone ||\r\n this.sessionState === 'loading' ||\r\n this.sessionState === 'error'\r\n );\r\n }\r\n\r\n animationDone = false;\r\n\r\n @ViewChild('icon') icon: AppIconComponent;\r\n icons = iconNames;\r\n\r\n @ViewChild('content', { read: ViewContainerRef }) content: ViewContainerRef;\r\n\r\n private activeComponentRef: ComponentRef;\r\n private _elementSub: Subscription;\r\n\r\n constructor(\r\n private iconService: HydIconService,\r\n private sessionController: SessionController,\r\n private formController: FormController,\r\n private router: Router,\r\n private componentFactoryResolver: ComponentFactoryResolver,\r\n private spinnerService: NgxSpinnerService,\r\n private loadingIndicator: LoadingIndicatorService,\r\n private reloadService: ReloadService\r\n ) {\r\n\r\n this.iconService.registerIcons(formIcons);\r\n\r\n this.formController.activeElementControllerChanged.subscribe(\r\n newController => {\r\n this.activeControllerUpdated(newController);\r\n }\r\n );\r\n\r\n this.loadingIndicator.$toggleState.subscribe(state => {\r\n if (state === 'hide') {\r\n this.spinnerService.hide();\r\n } else {\r\n this.spinnerService.show();\r\n }\r\n })\r\n }\r\n\r\n @HostListener('window:beforeunload', ['$event'])\r\n onBeforeUnload(ev: Event) {\r\n return this.reloadService.canUnloadSafely();\r\n }\r\n\r\n ngOnInit() {\r\n this.sessionController.intializeSession(this.sessionId);\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.icon.animationDone.subscribe(() => {\r\n this.animationDone = true;\r\n });\r\n\r\n if (this.formController.activeElementController) {\r\n this.activeControllerUpdated(this.formController.activeElementController);\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n this.sessionController.destroy();\r\n this._elementSub.unsubscribe();\r\n }\r\n\r\n menuClicked() {\r\n this.router.navigateByUrl('/');\r\n }\r\n\r\n retrySession() {\r\n this.sessionController.intializeSession(this.sessionId);\r\n }\r\n\r\n private activeControllerUpdated(newActiveController: ElementController) {\r\n\r\n if (!newActiveController) {\r\n return;\r\n }\r\n\r\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(\r\n ElementComponent\r\n );\r\n\r\n if (this.content) {\r\n this.content.clear();\r\n }\r\n\r\n if (this._elementSub) {\r\n this._elementSub.unsubscribe();\r\n }\r\n\r\n this.activeComponentRef = this.content.createComponent(componentFactory);\r\n this.activeComponentRef.instance.controller = newActiveController;\r\n this.activeComponentRef.changeDetectorRef.detectChanges();\r\n this._elementSub = newActiveController.elementChanged.subscribe(() => {\r\n this.activeComponentRef.changeDetectorRef.detectChanges();\r\n })\r\n }\r\n}\r\n","import { ElementController } from '../ElementController';\r\n\r\nexport class StartElementController extends ElementController {\r\n\r\n init() {}\r\n\r\n validate() { }\r\n\r\n parseElementOptions() { }\r\n}\r\n","import { IElementValidation, IValidationMessage } from '../interfaces/validation';\r\nimport { ITranslationService } from 'angular-i18next';\r\n\r\nexport class TextValidator {\r\n\r\n static validateCharLength(\r\n value: string,\r\n minChars: number,\r\n maxChars: number,\r\n required: boolean,\r\n i18nextService: ITranslationService\r\n ): IValidationMessage {\r\n\r\n if (typeof(value) !== 'string') {\r\n value = '';\r\n }\r\n\r\n const meetsCharLimit = value.length <= maxChars && value.length >= minChars;\r\n const isValid = this.shouldValidateValue(value, required) ? meetsCharLimit : true;\r\n\r\n return {\r\n isValid,\r\n message: i18nextService.t('Validation.MinMaxChars', { minChars, maxChars })\r\n }\r\n }\r\n\r\n static validateNumericValue(\r\n value: string,\r\n allowNegatives = false,\r\n decimalPlaces = -1,\r\n required = false,\r\n i18nextService: ITranslationService): IValidationMessage[] {\r\n\r\n const validations: IValidationMessage[] = [];\r\n\r\n const numericRegex = /^[+-]?(?=.)(?:\\d+,)*\\d*(?:\\.\\d+)?$/;\r\n\r\n const isValidNumber = this.shouldValidateValue(value, required) ? numericRegex.test(value) : true;\r\n validations.push({\r\n isValid: isValidNumber,\r\n message: i18nextService.t('Validation.Number')\r\n });\r\n\r\n if (!allowNegatives) {\r\n\r\n const isPositiveNumber = this.shouldValidateValue(value, required) ? value[0] !== '-' : true;\r\n validations.push({\r\n isValid: isPositiveNumber,\r\n message: i18nextService.t('Validation.NumberPositive')\r\n });\r\n }\r\n\r\n if (decimalPlaces >= 0) {\r\n\r\n let decimalPlaceCount = 0;\r\n const decimalSplit = value.split('.');\r\n\r\n if (decimalSplit.length > 1) {\r\n decimalPlaceCount = decimalSplit[1].length;\r\n }\r\n\r\n const validDecimalCount = this.shouldValidateValue(value, required) ? decimalPlaceCount === decimalPlaces : true;\r\n validations.push({\r\n isValid: validDecimalCount,\r\n message: i18nextService.t('Validation.DecimalPlaces', { count: decimalPlaces })\r\n });\r\n }\r\n\r\n return validations;\r\n }\r\n\r\n static validateEmailValue(value: string, required = false, i18nextService: ITranslationService): IValidationMessage {\r\n\r\n if (typeof(value) !== 'string') {\r\n value = '';\r\n }\r\n\r\n const isValidEmail = this.shouldValidateValue(value, required) ? this.validateEmail(value) : true;\r\n\r\n const newValidation: IValidationMessage = {\r\n isValid: isValidEmail,\r\n message: i18nextService.t('Validation.Email')\r\n };\r\n\r\n return newValidation;\r\n }\r\n\r\n static validateEmail(value: string) {\r\n return /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,63}$/.test(value);\r\n }\r\n\r\n static shouldValidateValue(value: string = '', required: boolean): boolean {\r\n return required || value.length > 0;\r\n }\r\n}\r\n","import { ElementController } from '../ElementController';\r\nimport { IElementModel, IAnswerModel, IFormSessionModel, IResponseModel, EResponseValueType, EAnswerType } from '@hyd-form-provider';\r\nimport { IElementValidation } from '@hyd-lib-form-logic/data/interfaces/validation';\r\nimport { parseAsBool } from '@hyd-lib';\r\nimport { TextValidator } from '@hyd-lib-form-logic/data/validation/text.validator';\r\nimport { ITranslationService } from 'angular-i18next';\r\n\r\nexport interface ITextElementOptions {\r\n\r\n}\r\n\r\nexport interface ITextAnswerOptions {\r\n Prefix?: string;\r\n Suffix?: string;\r\n MaxCharacters: number;\r\n MinCharacters: number;\r\n DecimalPlaces?: number;\r\n AllowNegatives?: boolean;\r\n}\r\n\r\nexport class TextElementController extends ElementController {\r\n\r\n options: ITextElementOptions;\r\n answer: IAnswerModel;\r\n answerOptions: ITextAnswerOptions;\r\n\r\n init() {\r\n this.parseElementOptions();\r\n this.validate();\r\n }\r\n\r\n updateResponse(newValue: string) {\r\n\r\n if (this.response.Values.length === 0) {\r\n\r\n this.response.Values.push({\r\n AnswerId: -1,\r\n StatementId: null,\r\n Valid: true,\r\n Value: newValue,\r\n ContentId: null,\r\n Type: EResponseValueType.Text\r\n });\r\n } else {\r\n this.response.Values[0].Value = newValue;\r\n }\r\n\r\n this.validate();\r\n\r\n this.responseChanged.emit(this.response);\r\n }\r\n\r\n responseValue(): string {\r\n return this.response.Values.length > 0 ? this.response.Values[0].Value : '';\r\n }\r\n\r\n validate() {\r\n\r\n const newValidation: IElementValidation = {\r\n isVisible: true,\r\n isValid: true,\r\n validationMessages: []\r\n };\r\n\r\n let responseValue = this.responseValue();\r\n\r\n if (typeof(responseValue) !== 'string') responseValue = '';\r\n\r\n const whitespaceRemoved = responseValue.replace(/\\s+/g, '');\r\n\r\n // Answer Required\r\n if (this.required) {\r\n newValidation.validationMessages.push({\r\n isValid: whitespaceRemoved.length > 0,\r\n message: this.i18nextService.t('Validation.Required')\r\n });\r\n } else {\r\n newValidation.isVisible = responseValue.length > 0;\r\n }\r\n\r\n // Min/Max Chars\r\n const { MinCharacters, MaxCharacters } = this.answerOptions;\r\n const charCountValidation = TextValidator.validateCharLength(responseValue,\r\n MinCharacters,\r\n MaxCharacters,\r\n this.required,\r\n this.i18nextService);\r\n\r\n newValidation.validationMessages.push(charCountValidation);\r\n\r\n // Numeric validation\r\n if (this.answer.AnswerType === EAnswerType.Number) {\r\n\r\n const numericValidation = TextValidator.validateNumericValue(responseValue,\r\n this.answerOptions.AllowNegatives,\r\n this.answerOptions.DecimalPlaces,\r\n this.required,\r\n this.i18nextService);\r\n\r\n newValidation.validationMessages.push(...numericValidation);\r\n }\r\n\r\n // Email validation\r\n if (this.answer.AnswerType === EAnswerType.Email) {\r\n\r\n const emailValidation = TextValidator.validateEmailValue(responseValue, this.required, this.i18nextService);\r\n newValidation.validationMessages.push(emailValidation);\r\n }\r\n\r\n newValidation.isValid = !newValidation.validationMessages.some(x => !x.isValid);\r\n\r\n if (!newValidation.isVisible) {\r\n newValidation.isVisible = !newValidation.isValid;\r\n }\r\n\r\n this.updateValidation(newValidation);\r\n }\r\n\r\n parseElementOptions() {\r\n\r\n this.options = {\r\n\r\n };\r\n\r\n this.answer = this.element.Answers[0];\r\n\r\n this.answerOptions = {\r\n MaxCharacters: parseInt(this.answer.Options.MaxCharacters, 10),\r\n MinCharacters: parseInt(this.answer.Options.MinCharacters, 10),\r\n Prefix: this.answer.Options.CustomPrefixText,\r\n Suffix: this.answer.Options.CustomSuffixText,\r\n DecimalPlaces: parseInt(this.answer.Options.DecimalPlaces, 0),\r\n AllowNegatives: parseAsBool(this.answer.Options.AllowNegatives, false)\r\n };\r\n }\r\n}\r\n","import { ElementController } from '../ElementController';\r\n\r\nexport class FinishElementController extends ElementController {\r\n init() {}\r\n validate() {}\r\n}\r\n","import { ElementController } from '../ElementController';\r\nimport { parseAsBool } from '@hyd-lib';\r\nimport { IElementModel, IResponseModel } from '@hyd-form-provider';\r\nimport { ITranslationService } from 'angular-i18next';\r\n\r\nexport interface ITextElementOptions {\r\n DisplayImage: boolean;\r\n DisplayVideo: boolean;\r\n RichText: boolean;\r\n ImageAboveText: boolean;\r\n}\r\n\r\nexport class InfoElementController extends ElementController {\r\n\r\n options: ITextElementOptions;\r\n\r\n init() {\r\n this._parseOptions();\r\n }\r\n\r\n validate() {\r\n\r\n }\r\n\r\n private _parseOptions() {\r\n\r\n const opts = this.element.Options;\r\n\r\n this.options = {\r\n DisplayImage: parseAsBool(opts.DisplayImage, false),\r\n DisplayVideo: parseAsBool(opts.DisplayVideo, false),\r\n RichText: parseAsBool(opts.RichText, false),\r\n ImageAboveText: parseAsBool(opts.ImageAboveText, false)\r\n };\r\n }\r\n}\r\n","import {\r\n IElementModel,\r\n IAnswerModel,\r\n IResponseValueModel,\r\n IResponseModel,\r\n EAnswerType,\r\n EResponseValueType\r\n} from '@hyd-form-provider';\r\nimport { ElementController } from '../ElementController';\r\nimport { parseAsNumber, parseAsBool, SeededShuffle } from '@hyd-lib';\r\nimport { IElementValidation } from '@hyd-lib-form-logic/data/interfaces/validation';\r\nimport { TextValidator } from '@hyd-lib-form-logic/data/validation/text.validator';\r\nimport { ITranslationService } from 'angular-i18next';\r\nimport i18next from 'i18next';\r\n\r\nexport class ISelectElementOptions {\r\n minAnswers: number;\r\n maxAnswers: number;\r\n showLabels: boolean;\r\n selectableImages: boolean;\r\n randomOrder: boolean;\r\n smallImages: boolean;\r\n}\r\n\r\nexport interface ISelectAnswerViewModel {\r\n answer: IAnswerModel;\r\n selected: boolean;\r\n responseValue: string;\r\n}\r\n\r\nconst TEXT_ANSWER_TYPES = [EAnswerType.Number, EAnswerType.Email, EAnswerType.Text];\r\n\r\nconst textAnswers = [EAnswerType.Email, EAnswerType.Number, EAnswerType.Text];\r\nfunction isTextAnswer(answer: IAnswerModel) {\r\n return answer && textAnswers.includes(answer.AnswerType);\r\n}\r\n\r\nexport class SelectElementController extends ElementController {\r\n\r\n options: ISelectElementOptions;\r\n answers: ISelectAnswerViewModel[];\r\n isSingleSelect: boolean;\r\n exclusiveAnswerIds: number[];\r\n\r\n init() {\r\n this.answers = [];\r\n this.exclusiveAnswerIds = [];\r\n\r\n this._parseElementOptions();\r\n this._parseAnswers();\r\n\r\n this.isSingleSelect = this.options.maxAnswers === 1;\r\n\r\n this.validate();\r\n }\r\n\r\n validate() {\r\n const newValidation: IElementValidation = {\r\n isVisible: this.required,\r\n isValid: true,\r\n validationMessages: []\r\n };\r\n\r\n const selectedCount = this.response.Values.length;\r\n const { minAnswers, maxAnswers } = this.options;\r\n\r\n if (minAnswers > 0) {\r\n newValidation.validationMessages.push({\r\n isValid: selectedCount >= minAnswers,\r\n message: this.i18nextService.t('Validation.MinAnswers', { count: minAnswers })\r\n });\r\n }\r\n\r\n if (maxAnswers > 0) {\r\n newValidation.validationMessages.push({\r\n isValid: selectedCount <= maxAnswers,\r\n message: this.i18nextService.t('Validation.MaxAnswers', { count: maxAnswers })\r\n });\r\n }\r\n\r\n this.answers.forEach(x => {\r\n if (x.selected && TEXT_ANSWER_TYPES.includes(x.answer.AnswerType)) {\r\n\r\n const whitespaceRemoved = x.responseValue.replace(/\\s+/g, '');\r\n\r\n if (this.required) {\r\n newValidation.validationMessages.push({\r\n isValid: whitespaceRemoved.length >= 0,\r\n message: this.i18nextService.t('Validation.Required')\r\n });\r\n }\r\n\r\n switch (x.answer.AnswerType) {\r\n case EAnswerType.Number:\r\n newValidation.isVisible = true;\r\n const numericValidation = TextValidator.validateNumericValue(x.responseValue, true, -1, this.required, this.i18nextService);\r\n newValidation.validationMessages.push(...numericValidation);\r\n break;\r\n case EAnswerType.Email:\r\n newValidation.isVisible = true;\r\n const emailValidation = TextValidator.validateEmailValue(x.responseValue, this.required, this.i18nextService);\r\n newValidation.validationMessages.push(emailValidation);\r\n break;\r\n }\r\n }\r\n });\r\n\r\n newValidation.isValid = !newValidation.validationMessages.some(x => !x.isValid);\r\n\r\n this.updateValidation(newValidation);\r\n }\r\n\r\n updateResponseValue(answer: IAnswerModel, value: string) {\r\n const currentResponseIndex = this.response.Values.findIndex(\r\n r => r.AnswerId === answer.Id\r\n );\r\n\r\n if (currentResponseIndex !== -1) {\r\n this.response.Values[currentResponseIndex].Value = value;\r\n }\r\n\r\n this._updateSelectedAnswers();\r\n this.validate();\r\n this.responseChanged.emit(this.response);\r\n }\r\n\r\n updateResponse(answer: IAnswerModel) {\r\n\r\n const currentResponseIndex = this.response.Values.findIndex(\r\n r => r.AnswerId === answer.Id\r\n );\r\n\r\n if (currentResponseIndex === -1) {\r\n const newResponseValue: IResponseValueModel = {\r\n AnswerId: answer.Id,\r\n StatementId: null,\r\n Value: this._responseValueForAnswer(answer),\r\n Valid: true,\r\n ContentId: null,\r\n Type: EResponseValueType.Text\r\n };\r\n\r\n if (this.isSingleSelect || answer.Exclusive) {\r\n this.response.Values = [];\r\n }\r\n\r\n if (!this.isSingleSelect && this.exclusiveAnswerIds.length > 0) {\r\n\r\n this.exclusiveAnswerIds.forEach(exclusiveAnswerId => {\r\n if (exclusiveAnswerId !== answer.Id) {\r\n const exclusiveResponseIndex = this.response.Values.findIndex(\r\n r => r.AnswerId === exclusiveAnswerId\r\n );\r\n if (exclusiveResponseIndex >= 0) {\r\n this.response.Values.splice(exclusiveResponseIndex, 1);\r\n }\r\n }\r\n });\r\n }\r\n\r\n this.response.Values.push(newResponseValue);\r\n } else {\r\n this.response.Values.splice(currentResponseIndex, 1);\r\n }\r\n\r\n this._updateSelectedAnswers();\r\n this.validate();\r\n this.responseChanged.emit(this.response);\r\n }\r\n\r\n private _parseElementOptions() {\r\n const options = this.element.Options;\r\n\r\n this.options = {\r\n minAnswers: parseAsNumber(options.MinAnswers, 0),\r\n maxAnswers: parseAsNumber(options.MaxAnswers, 0),\r\n showLabels: parseAsBool(options.ShowLabels, true),\r\n selectableImages: parseAsBool(options.SelectableImages, false),\r\n randomOrder: parseAsBool(options.RandomOrder, false),\r\n smallImages: parseAsBool(options.SmallImages, false)\r\n };\r\n }\r\n\r\n private _parseAnswers() {\r\n let selectedAnswerIds = [];\r\n\r\n if (this.hasResponse()) {\r\n selectedAnswerIds = this.response.Values.map(a => a.AnswerId);\r\n }\r\n\r\n this.answers = this.element.Answers.map(answer => {\r\n\r\n if (answer.Exclusive) {\r\n this.exclusiveAnswerIds.push(answer.Id);\r\n }\r\n\r\n return {\r\n answer,\r\n selected: selectedAnswerIds.indexOf(answer.Id) !== -1,\r\n responseValue: this._responseValueForAnswer(answer)\r\n };\r\n });\r\n\r\n if (this.options.randomOrder) {\r\n const shuffle = new SeededShuffle();\r\n\r\n const fixedAnswerPositions = this.answers.map(x => x.answer.FixedPosition);\r\n\r\n shuffle.fixedShuffle(this.answers, fixedAnswerPositions, this.response.Id + this.element.Id + this.response.ParentId);\r\n }\r\n }\r\n\r\n private _updateSelectedAnswers() {\r\n const selectedAnswerIds = this.response.Values.map(r => r.AnswerId);\r\n\r\n this.answers.forEach(answer => {\r\n answer.selected = selectedAnswerIds.indexOf(answer.answer.Id) !== -1;\r\n answer.responseValue = this._responseValueForAnswer(answer.answer);\r\n });\r\n }\r\n\r\n private _responseValueForAnswer(answer: IAnswerModel): string {\r\n if (isTextAnswer(answer)) {\r\n const response = this.response.Values.find(x => x.AnswerId === answer.Id);\r\n\r\n if (response) {\r\n return response.Value;\r\n } else {\r\n return '';\r\n }\r\n } else {\r\n return answer.Text;\r\n }\r\n }\r\n}\r\n","import { ElementController } from '../ElementController';\r\nimport { IElementValidation } from '@hyd-lib-form-logic/data/interfaces/validation';\r\nimport { Subscription } from 'rxjs';\r\nimport { IElementModel } from '@hyd-form-provider';\r\nimport { EventEmitter } from '@angular/core';\r\n\r\nexport class LinkedElementController extends ElementController {\r\n\r\n private _childValidationSubscriptions: Subscription[] = [];\r\n childElementControllers: ElementController[] = [];\r\n\r\n focusElement = new EventEmitter()\r\n\r\n init() {}\r\n\r\n validate(): void {\r\n\r\n const newValidation: IElementValidation = {\r\n isVisible: true,\r\n isValid: true,\r\n validationMessages: []\r\n };\r\n\r\n this.childElementControllers.forEach(controller => {\r\n if (newValidation.isValid && !controller.validation.isValid) {\r\n newValidation.isValid = false;\r\n newValidation.validationMessages.push(...controller.validation.validationMessages);\r\n }\r\n });\r\n\r\n this.updateValidation(newValidation);\r\n }\r\n\r\n setChildControllers(controllers: ElementController[]) {\r\n\r\n this._resetChildren();\r\n\r\n this.childElementControllers = controllers;\r\n\r\n controllers.forEach(controller => {\r\n this._childValidationSubscriptions.push(controller.responseChanged.subscribe(r => {\r\n this.validate();\r\n this.responseChanged.emit(r);\r\n }));\r\n });\r\n }\r\n\r\n updateChildController(model: IElementModel) {\r\n const child = this.childElementControllers.find(c => c.element.Id === model.Id);\r\n if (child) {\r\n child.updateElement(model);\r\n this.focusElement.emit(model);\r\n }\r\n }\r\n\r\n destroy() {\r\n\r\n this._resetChildren()\r\n super.destroy();\r\n }\r\n\r\n private _resetChildren() {\r\n this._childValidationSubscriptions.forEach(s => s.unsubscribe());\r\n this._childValidationSubscriptions = [];\r\n this.childElementControllers.forEach(c => c.destroy());\r\n this.childElementControllers = [];\r\n }\r\n}\r\n","import { ElementController } from '../ElementController';\r\nimport { parseAsString } from '@hyd-lib';\r\nimport { IElementValidation } from '@hyd-lib-form-logic/data/interfaces/validation';\r\nimport { EResponseValueType, IElementModel, IResponseModel } from '@hyd-form-provider';\r\nimport { ITranslationService } from 'angular-i18next';\r\n\r\nexport type ScaleDisplay = 'none' | 'percentage' | 'value';\r\n\r\nfunction parseAseScaleDisplay(value: string, defaultValue: ScaleDisplay): ScaleDisplay {\r\n if (typeof(value) === 'string') {\r\n switch (value) {\r\n case 'none':\r\n case 'percentage':\r\n case 'value':\r\n return value as ScaleDisplay;\r\n }\r\n }\r\n return defaultValue;\r\n}\r\n\r\nexport interface IScaleAnswerOptions {\r\n CustomPrefixText?: string;\r\n CustomSuffixText?: string;\r\n DisplayAs: ScaleDisplay;\r\n}\r\n\r\n\r\nexport class ScaleElementController extends ElementController {\r\n\r\n leftLabel = '';\r\n rightLabel = '';\r\n displayAs: ScaleDisplay = 'value';\r\n\r\n responseValue: number;\r\n\r\n init() {\r\n this._parseOptions();\r\n this._parseResponseValue();\r\n }\r\n\r\n updateResponseValue(newValue: number) {\r\n\r\n this.responseValue = newValue;\r\n\r\n if (this.response.Values.length === 0) {\r\n this.response.Values.push({\r\n AnswerId: -1,\r\n StatementId: null,\r\n Valid: true,\r\n Value: newValue.toString(),\r\n ContentId: null,\r\n Type: EResponseValueType.Number\r\n });\r\n } else {\r\n this.response.Values[0].Value = newValue.toString()\r\n }\r\n\r\n this.validate();\r\n this.responseChanged.emit(this.response);\r\n }\r\n\r\n validate() {\r\n\r\n const newValidation: IElementValidation = {\r\n isVisible: this.required,\r\n isValid: true,\r\n validationMessages: []\r\n };\r\n\r\n if (this.required) {\r\n newValidation.validationMessages.push({\r\n isValid: this.response.Values.length !== 0,\r\n message: this.i18nextService.t('Validation.Required')\r\n })\r\n }\r\n\r\n newValidation.isValid = !newValidation.validationMessages.some(x => !x.isValid);\r\n\r\n this.updateValidation(newValidation);\r\n }\r\n\r\n _parseOptions() {\r\n\r\n const answer = this.element.Answers[0];\r\n\r\n this.leftLabel = parseAsString(answer.Options.CustomPrefixText, '');\r\n this.rightLabel = parseAsString(answer.Options.CustomSuffixText, '');\r\n this.displayAs = parseAseScaleDisplay(answer.Options.DisplayAs, 'value');\r\n }\r\n\r\n\r\n\r\n _parseResponseValue() {\r\n\r\n const valueString = this.response.Values.length > 0 ? this.response.Values[0].Value : '';\r\n let value = parseInt(valueString, 10);\r\n\r\n if (isNaN(value)) {\r\n value = 50;\r\n }\r\n\r\n this.responseValue = value;\r\n }\r\n}\r\n","import { ElementController } from '../ElementController';\r\nimport { IElementModel, IResponseModel, EResponseValueType, IAnswerModel } from '@hyd-form-provider';\r\nimport { IElementValidation } from '@hyd-lib-form-logic/data/interfaces/validation';\r\nimport { parseAsBool, parseAsNumber } from '@hyd-lib';\r\nimport { ITranslationService } from 'angular-i18next';\r\n\r\nexport interface ILikertAnswer {\r\n answerId: number;\r\n label: string;\r\n imageUrl?: string;\r\n}\r\n\r\nexport interface IIntervalElementOptions {\r\n showLabels: boolean;\r\n showImagesAsRow: boolean;\r\n minAnswers: number;\r\n}\r\n\r\nexport class IntervalElementController extends ElementController {\r\n\r\n options: IIntervalElementOptions;\r\n answers: IAnswerModel[];\r\n selectedAnswer: IAnswerModel;\r\n\r\n init() {\r\n this._parseOptions();\r\n this._parseAnswers();\r\n this._updateSelectedAnswer();\r\n this.validate();\r\n }\r\n\r\n updateResponse(selectedAnswer: IAnswerModel) {\r\n\r\n if (this.response.Values.length > 0\r\n && this.response.Values[0].AnswerId === selectedAnswer.Id) {\r\n\r\n this.response.Values.length = 0;\r\n delete this.selectedAnswer;\r\n } else {\r\n\r\n this.response.Values[0] = {\r\n AnswerId: selectedAnswer.Id,\r\n StatementId: null,\r\n Valid: true,\r\n Value: selectedAnswer.Text,\r\n ContentId: null,\r\n Type: EResponseValueType.Text\r\n };\r\n\r\n this.selectedAnswer = selectedAnswer;\r\n }\r\n\r\n this.validate();\r\n\r\n this.responseChanged.emit(this.response);\r\n }\r\n\r\n validate() {\r\n\r\n const newValidation: IElementValidation = {\r\n isVisible: this.required,\r\n isValid: true,\r\n validationMessages: []\r\n };\r\n\r\n if (this.required) {\r\n newValidation.validationMessages.push({\r\n isValid: this.response.Values.length !== 0,\r\n message: this.i18nextService.t('Validation.Required')\r\n })\r\n }\r\n\r\n newValidation.isValid = !newValidation.validationMessages.some(x => !x.isValid);\r\n\r\n this.updateValidation(newValidation);\r\n }\r\n\r\n _parseOptions() {\r\n\r\n this.options = {\r\n showLabels: parseAsBool(this.element.Options.showLabels, true),\r\n showImagesAsRow: parseAsBool(this.element.Options.showImagesAsRow, false),\r\n minAnswers: parseAsNumber(this.element.Options.MinAnswers, 0)\r\n };\r\n }\r\n\r\n _parseAnswers() {\r\n this.answers = this.element.Answers;\r\n }\r\n\r\n _updateSelectedAnswer() {\r\n\r\n if (this.response.Values.length > 0) {\r\n const selectedId = this.response.Values[0].AnswerId;\r\n this.selectedAnswer = this.answers.find(x => x.Id === selectedId);\r\n }\r\n }\r\n}\r\n","import { ElementController } from '../ElementController';\r\nimport { IElementModel, IResponseModel, IResponseValueModel, EResponseValueType, IStatementModel, IAnswerModel } from '@hyd-form-provider';\r\nimport { IElementValidation } from '@hyd-lib-form-logic/data/interfaces/validation';\r\nimport { parseAsBool, SeededShuffle } from '@hyd-lib';\r\nimport { ITranslationService } from 'angular-i18next';\r\n\r\nexport type MatrixCellType = 'Radio' | 'CheckBox' | 'Slider';\r\n\r\nfunction parseCellType(value: string): MatrixCellType {\r\n if (typeof(value) === 'string') {\r\n switch (value) {\r\n case 'Radio':\r\n case 'CheckBox':\r\n case 'Slider':\r\n return value;\r\n }\r\n }\r\n return 'CheckBox';\r\n}\r\n\r\nexport interface MatrixColumn {\r\n id: number;\r\n label: string;\r\n}\r\n\r\nexport interface MatrixRow {\r\n id: number;\r\n hasValue: boolean;\r\n label: string;\r\n cells: MatrixCell[];\r\n}\r\n\r\nexport type MatrixCell = IMatrixCheckBoxCell | IMatrixRadioCell | IMatrixSliderCell;\r\n\r\nexport interface IMatrixCell {\r\n statementId: number;\r\n type: MatrixCellType;\r\n}\r\n\r\nexport interface IMatrixSliderCell extends IMatrixCell {\r\n answerIds: number[];\r\n selectedId: number;\r\n selectedIndex: number;\r\n type: 'Slider';\r\n values: string[];\r\n}\r\n\r\nexport interface IMatrixRadioCell extends IMatrixCell {\r\n answerId: number;\r\n selected: boolean;\r\n type: 'Radio';\r\n value: string;\r\n}\r\n\r\nexport interface IMatrixCheckBoxCell extends IMatrixCell {\r\n answerId: number;\r\n selected: boolean;\r\n type: 'CheckBox';\r\n value: string;\r\n}\r\n\r\nexport interface IMatrixElementOptions {\r\n randomOrder: boolean;\r\n}\r\n\r\ntype AnswerResponseMap = Map;\r\ntype StatementResponseMap = Map;\r\n\r\nexport class MatrixElementController extends ElementController {\r\n\r\n options: IMatrixElementOptions;\r\n\r\n rows: MatrixRow[];\r\n cols: MatrixColumn[];\r\n cells: MatrixCell[][];\r\n\r\n private _statementResponses: StatementResponseMap;\r\n\r\n init() {\r\n this._statementResponses = new Map();\r\n this._parseOptions();\r\n this._parseResponse();\r\n this._parseAnswers();\r\n this._updateSelectedCells();\r\n this.validate();\r\n }\r\n\r\n updateResponse(selectedAnswer: MatrixCell) {\r\n\r\n if (!this._statementResponses.has(selectedAnswer.statementId)) {\r\n this._statementResponses.set(selectedAnswer.statementId, new Map());\r\n }\r\n\r\n const answerResponses = this._statementResponses.get(selectedAnswer.statementId);\r\n\r\n if (selectedAnswer.type === 'Slider') {\r\n\r\n const existingAnswerId = selectedAnswer.answerIds.find(id => answerResponses.has(id));\r\n\r\n if (existingAnswerId) {\r\n answerResponses.delete(existingAnswerId);\r\n }\r\n\r\n answerResponses.set(selectedAnswer.selectedId, {\r\n AnswerId: selectedAnswer.selectedId,\r\n ContentId: null,\r\n StatementId: selectedAnswer.statementId,\r\n Type: EResponseValueType.Number,\r\n Valid: true,\r\n Value: selectedAnswer.values[selectedAnswer.selectedIndex]\r\n })\r\n\r\n } else {\r\n\r\n if (answerResponses.has(selectedAnswer.answerId)) {\r\n answerResponses.delete(selectedAnswer.answerId);\r\n } else {\r\n\r\n if (selectedAnswer.type === 'Radio') {\r\n answerResponses.clear();\r\n }\r\n\r\n answerResponses.set(selectedAnswer.answerId, {\r\n AnswerId: selectedAnswer.answerId,\r\n ContentId: null,\r\n StatementId: selectedAnswer.statementId,\r\n Type: EResponseValueType.Number,\r\n Valid: true,\r\n Value: selectedAnswer.value\r\n })\r\n }\r\n\r\n }\r\n\r\n const updatedValues: IResponseValueModel[] = [];\r\n this._statementResponses.forEach(x => {\r\n x.forEach(v => updatedValues.push(v));\r\n });\r\n this.response.Values = updatedValues;\r\n\r\n this._updateSelectedCells();\r\n\r\n this.validate();\r\n\r\n this.responseChanged.emit(this.response);\r\n }\r\n\r\n validate() {\r\n\r\n const newValidation: IElementValidation = {\r\n isVisible: this.required,\r\n isValid: true,\r\n validationMessages: []\r\n };\r\n\r\n if (this.required) {\r\n\r\n let allStatementsHaveResponse = true;\r\n\r\n this.rows.forEach(x => {\r\n\r\n if (!this._statementResponses.has(x.id) || this._statementResponses.get(x.id).size === 0) {\r\n allStatementsHaveResponse = false;\r\n }\r\n });\r\n\r\n newValidation.validationMessages.push({\r\n isValid: allStatementsHaveResponse,\r\n message: this.i18nextService.t('Validation.Required')\r\n })\r\n }\r\n\r\n newValidation.isValid = !newValidation.validationMessages.some(x => !x.isValid);\r\n\r\n this.updateValidation(newValidation);\r\n }\r\n\r\n _parseOptions() {\r\n\r\n const options = this.element.Options;\r\n\r\n this.options = {\r\n randomOrder: parseAsBool(options.RandomOrder, false)\r\n };\r\n }\r\n\r\n _parseAnswers() {\r\n\r\n this.cols = this.element.Answers.map(a => ({\r\n id: a.Id,\r\n label: a.Text\r\n }));\r\n\r\n function processSliderAnswers(s: IStatementModel, sa: IAnswerModel[]): IMatrixSliderCell {\r\n return {\r\n answerIds: sa.map(x => x.Id),\r\n selectedId: -1,\r\n selectedIndex: -1,\r\n statementId: s.Id,\r\n type: 'Slider',\r\n values: sa.map(x => x.Text)\r\n }\r\n }\r\n\r\n function mapCells(statement: IStatementModel, answers: IAnswerModel[]): MatrixCell[] {\r\n\r\n const cells: MatrixCell[] = [];\r\n let sliderAnswers: IAnswerModel[];\r\n\r\n for (const answer of answers) {\r\n\r\n const type = parseCellType(answer.Options.ViewType);\r\n\r\n if (type === 'Slider') {\r\n\r\n if (!sliderAnswers) {\r\n sliderAnswers = [];\r\n }\r\n\r\n sliderAnswers.push(answer);\r\n\r\n } else if (type === 'CheckBox' || type === 'Radio') {\r\n\r\n if (sliderAnswers) {\r\n cells.push(processSliderAnswers(statement, sliderAnswers));\r\n sliderAnswers = undefined;\r\n }\r\n\r\n cells.push({\r\n answerId: answer.Id,\r\n statementId: statement.Id,\r\n selected: false,\r\n type,\r\n value: answer.Text\r\n })\r\n }\r\n }\r\n\r\n if (sliderAnswers) {\r\n cells.push(processSliderAnswers(statement, sliderAnswers));\r\n sliderAnswers = undefined;\r\n }\r\n\r\n return cells;\r\n }\r\n\r\n this.rows = this.element.Statements.map(s => ({\r\n id: s.Id,\r\n label: s.Text,\r\n hasValue: false,\r\n cells: mapCells(s, this.element.Answers)\r\n }));\r\n\r\n if (this.options.randomOrder) {\r\n const shuffle = new SeededShuffle();\r\n shuffle.shuffle(this.rows, this.response.Id + this.element.Id + this.response.ParentId);\r\n }\r\n }\r\n\r\n _parseResponse() {\r\n this.response.Values.forEach(x => {\r\n\r\n if (!this._statementResponses.has(x.StatementId)) {\r\n this._statementResponses.set(x.StatementId, new Map());\r\n }\r\n const answerResponseMap = this._statementResponses.get(x.StatementId);\r\n answerResponseMap.set(x.AnswerId, x);\r\n });\r\n }\r\n\r\n _updateSelectedCells() {\r\n\r\n this.rows.forEach(r => {\r\n const statementResponses = this._statementResponses.get(r.id);\r\n r.hasValue = statementResponses ? statementResponses.size > 0 : false;\r\n if (statementResponses) {\r\n r.cells.forEach(c => {\r\n if (c.type === 'Slider') {\r\n c.selectedIndex = c.answerIds.findIndex(a => statementResponses.has(a));\r\n c.selectedId = c.selectedIndex === -1 ? -1 : c.answerIds[c.selectedIndex];\r\n } else {\r\n c.selected = statementResponses.has(c.answerId);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n}\r\n","import { ElementController } from '../ElementController';\r\nimport { EAnswerType, IAnswerModel, EResponseValueType, IElementModel, IResponseModel } from '@hyd-form-provider';\r\nimport { parseAsBool } from '@hyd-lib';\r\nimport { IElementValidation } from '@hyd-lib-form-logic/data/interfaces/validation';\r\nimport { ITranslationService } from 'angular-i18next';\r\n\r\nexport class DateElementController extends ElementController {\r\n\r\n dateType: EAnswerType;\r\n defaultValue: string;\r\n showStampButton = false;\r\n answer: IAnswerModel;\r\n\r\n get currentValue() {\r\n if (this.response.Values.length > 0) {\r\n return this.response.Values[0].Value;\r\n }\r\n return;\r\n }\r\n\r\n init() {\r\n this._parseAnswer();\r\n this.validate();\r\n }\r\n\r\n validate() {\r\n\r\n const newValidation: IElementValidation = {\r\n isVisible: this.required,\r\n isValid: true,\r\n validationMessages: []\r\n };\r\n\r\n if (this.required) {\r\n newValidation.validationMessages.push({\r\n isValid: this.response.Values.length !== 0,\r\n message: this.i18nextService.t('Validation.Required')\r\n })\r\n }\r\n\r\n newValidation.isValid = !newValidation.validationMessages.some(x => !x.isValid);\r\n\r\n this.updateValidation(newValidation);\r\n }\r\n\r\n updateResponse(newDate: string) {\r\n\r\n if (newDate === undefined) {\r\n this.response.Values.length = 0;\r\n } else {\r\n\r\n if (this.response.Values.length === 0) {\r\n\r\n let type = EResponseValueType.Text;\r\n\r\n switch (this.dateType) {\r\n case EAnswerType.Date:\r\n type = EResponseValueType.Date;\r\n break;\r\n case EAnswerType.DateTime:\r\n type = EResponseValueType.DateTime;\r\n break;\r\n case EAnswerType.Time:\r\n type = EResponseValueType.Time;\r\n break;\r\n }\r\n\r\n this.response.Values.push({\r\n AnswerId: this.answer.Id,\r\n StatementId: null,\r\n Valid: true,\r\n Value: newDate,\r\n ContentId: null,\r\n Type: type\r\n });\r\n } else {\r\n this.response.Values[0].Value = newDate;\r\n }\r\n }\r\n\r\n this.validate();\r\n\r\n this.responseChanged.emit(this.response);\r\n }\r\n\r\n _parseAnswer() {\r\n this.answer = this.element.Answers[0];\r\n\r\n this.dateType = this.answer.AnswerType;\r\n const defaultValue = this.answer.Options.DefaultValue;\r\n\r\n if (defaultValue) {\r\n switch (this.dateType) {\r\n case EAnswerType.Date:\r\n this.defaultValue = defaultValue.substring(0, 10);\r\n break;\r\n case EAnswerType.DateTime:\r\n this.defaultValue = defaultValue.substring(0, 16);\r\n break;\r\n case EAnswerType.Time:\r\n this.defaultValue = defaultValue.substring(11, 16);\r\n break;\r\n }\r\n }\r\n\r\n this.showStampButton = parseAsBool(\r\n this.answer.Options.DateTimeStamp,\r\n false\r\n );\r\n }\r\n}\r\n","import { ElementController } from '../ElementController';\r\nimport { IAnswerModel, IElementModel, IResponseModel, EResponseValueType } from '@hyd-form-provider';\r\nimport { IElementValidation } from '@hyd-lib-form-logic/data/interfaces/validation';\r\nimport { moveItemInArray, transferArrayItem } from '@angular/cdk/drag-drop';\r\nimport { parseAsBool, SeededShuffle } from '@hyd-lib';\r\nimport { ITranslationService } from 'angular-i18next';\r\n\r\nexport interface RankingItem {\r\n answer: IAnswerModel;\r\n position: number;\r\n rankedPosition?: number;\r\n}\r\n\r\nexport interface RankingOptions {\r\n showLabels: boolean;\r\n selectableImages: boolean;\r\n randomOrder: boolean;\r\n smallImages: boolean;\r\n}\r\n\r\nexport class RankingElementController extends ElementController {\r\n\r\n options: RankingOptions;\r\n rankedAnswers: RankingItem[];\r\n unrankedAnswers: RankingItem[];\r\n\r\n init() {\r\n\r\n this.rankedAnswers = [];\r\n this.unrankedAnswers = [];\r\n this._parseOptions();\r\n this._parseAnswers();\r\n this._parseResponse();\r\n\r\n this.validate();\r\n }\r\n\r\n validate() {\r\n const newValidation: IElementValidation = {\r\n isVisible: false,\r\n isValid: true,\r\n validationMessages: []\r\n };\r\n\r\n const allItemsRanked = this.response.Values.length === this.element.Answers.length;\r\n const noItemsRanked = this.response.Values.length === 0;\r\n\r\n let answerRequiredValid = true;\r\n if (this.element.Required) {\r\n newValidation.isValid = answerRequiredValid = allItemsRanked;\r\n newValidation.isVisible = true;\r\n } else {\r\n newValidation.isValid = answerRequiredValid = allItemsRanked || noItemsRanked;\r\n newValidation.isVisible = !noItemsRanked;\r\n }\r\n\r\n newValidation.validationMessages.push({\r\n isValid: answerRequiredValid,\r\n message: answerRequiredValid ? this.i18nextService.t('Validation.Ranking.AllRanked') : this.i18nextService.t('Validation.Ranking.Required')\r\n });\r\n\r\n this.updateValidation(newValidation);\r\n }\r\n\r\n updateResponse(item: RankingItem, newRank?: number) {\r\n\r\n if (isNaN(newRank)) {\r\n\r\n if (!isNaN(item.rankedPosition)) {\r\n delete item.rankedPosition;\r\n this.rankedAnswers = this.rankedAnswers.filter(x => x.answer.Id !== item.answer.Id);\r\n this.unrankedAnswers.push(item);\r\n }\r\n } else {\r\n\r\n if (isNaN(item.rankedPosition)) {\r\n const currentPosition = this.unrankedAnswers.findIndex(x => x.answer.Id === item.answer.Id);\r\n transferArrayItem(this.unrankedAnswers, this.rankedAnswers, currentPosition, newRank);\r\n } else {\r\n moveItemInArray(this.rankedAnswers, item.rankedPosition, newRank);\r\n }\r\n }\r\n\r\n this.response.Values.length = 0;\r\n\r\n this.rankedAnswers.forEach((rankedItem, index) => {\r\n rankedItem.rankedPosition = index;\r\n this.response.Values.push({\r\n AnswerId: rankedItem.answer.Id,\r\n StatementId: -1,\r\n Valid: true,\r\n Value: index.toString(),\r\n ContentId: null,\r\n Type: EResponseValueType.Number\r\n });\r\n });\r\n\r\n this.unrankedAnswers.sort((a, b) => a.position - b.position);\r\n\r\n this.validate();\r\n this.responseChanged.emit(this.response);\r\n }\r\n\r\n private _parseOptions() {\r\n const options = this.element.Options;\r\n\r\n this.options = {\r\n showLabels: parseAsBool(options.ShowLabels, true),\r\n selectableImages: parseAsBool(options.SelectableImages, false),\r\n randomOrder: parseAsBool(options.RandomOrder, false),\r\n smallImages: parseAsBool(options.SmallImages, false)\r\n };\r\n }\r\n\r\n _parseAnswers() {\r\n\r\n this.unrankedAnswers = this.element.Answers.map(a => ({\r\n answer: a,\r\n position: a.Order\r\n }));\r\n\r\n if (this.options.randomOrder) {\r\n const shuffle = new SeededShuffle();\r\n\r\n shuffle.shuffle(this.unrankedAnswers, this.response.Id + this.element.Id + this.response.ParentId);\r\n\r\n this.unrankedAnswers.forEach((answer, i) => {\r\n answer.position = i;\r\n });\r\n }\r\n }\r\n\r\n _parseResponse() {\r\n\r\n this.response.Values.forEach(r => {\r\n const position = parseInt(r.Value, 10);\r\n\r\n if (!isNaN(position)) {\r\n const answerIndex = this.unrankedAnswers.findIndex(x => x.answer.Id === r.AnswerId);\r\n const answer = this.unrankedAnswers[answerIndex];\r\n\r\n answer.rankedPosition = position;\r\n\r\n this.rankedAnswers.push(answer);\r\n this.unrankedAnswers.splice(answerIndex, 1);\r\n }\r\n });\r\n\r\n this.rankedAnswers.sort((a, b) => a.rankedPosition - b.rankedPosition);\r\n }\r\n}\r\n","import { ElementController } from '../ElementController';\r\nimport { IElementValidation } from '@hyd-lib-form-logic/data/interfaces/validation';\r\nimport { EResponseValueType } from '@hyd-form-provider';\r\n\r\nexport class SignatureElementController extends ElementController {\r\n\r\n get signatureContentId() {\r\n if (this.response.Values.length > 0) {\r\n return this.response.Values[0].ContentId;\r\n }\r\n }\r\n\r\n init() {}\r\n\r\n validate() {\r\n\r\n const newValidation: IElementValidation = {\r\n isVisible: this.required,\r\n isValid: true,\r\n validationMessages: []\r\n };\r\n\r\n if (this.required) {\r\n newValidation.validationMessages.push({\r\n isValid: this.response.Values.length !== 0,\r\n message: this.i18nextService.t('Validation.Required')\r\n })\r\n }\r\n\r\n newValidation.isValid = !newValidation.validationMessages.some(x => !x.isValid);\r\n\r\n this.updateValidation(newValidation);\r\n }\r\n\r\n signatureChanged(contentId: string) {\r\n\r\n if (contentId && contentId.length !== 0) {\r\n if (this.response.Values.length === 0) {\r\n this.response.Values.push({\r\n AnswerId: -1,\r\n StatementId: -1,\r\n Valid: true,\r\n Value: null,\r\n ContentId: contentId,\r\n Type: EResponseValueType.Image\r\n });\r\n } else {\r\n this.response.Values[0].ContentId = contentId;\r\n }\r\n } else {\r\n this.response.Values.length = 0;\r\n }\r\n\r\n this.validate();\r\n this.responseChanged.emit(this.response);\r\n }\r\n}\r\n","import { ElementController } from '../ElementController';\r\nimport { IElementModel, IResponseModel, EResponseValueType } from '@hyd-form-provider';\r\nimport { IElementValidation } from '@hyd-lib-form-logic/data/interfaces/validation';\r\nimport { ITranslationService } from 'angular-i18next';\r\n\r\nexport type DropdownFilterType = 'StartsWith' | 'Contains';\r\n\r\nexport class DropdownElementController extends ElementController {\r\n\r\n resourceId: string;\r\n filterType: DropdownFilterType;\r\n\r\n get responseValue(): string {\r\n return this.response.Values.length > 0 ? this.response.Values[0].Value : '';\r\n }\r\n\r\n init() {\r\n this._parseElementOptions();\r\n this._parseAnswer();\r\n this.validate();\r\n }\r\n\r\n validate() {\r\n\r\n const newValidation: IElementValidation = {\r\n isVisible: this.required,\r\n isValid: true,\r\n validationMessages: []\r\n };\r\n\r\n if (this.required) {\r\n newValidation.validationMessages.push({\r\n isValid: this.response.Values.length !== 0,\r\n message: this.i18nextService.t('Validation.Required')\r\n })\r\n }\r\n\r\n newValidation.isValid = !newValidation.validationMessages.some(x => !x.isValid);\r\n\r\n this.updateValidation(newValidation);\r\n }\r\n\r\n updateResponse(newResponseValue: string) {\r\n\r\n if (typeof(newResponseValue) === 'string') {\r\n\r\n if (this.response.Values.length === 0) {\r\n this.response.Values.push({\r\n AnswerId: -1,\r\n StatementId: -1,\r\n Valid: true,\r\n Value: newResponseValue,\r\n ContentId: null,\r\n Type: EResponseValueType.Text\r\n });\r\n } else {\r\n this.response.Values[0].Value = newResponseValue;\r\n }\r\n } else {\r\n this.response.Values.length = 0;\r\n }\r\n\r\n this.validate();\r\n this.responseChanged.emit(this.response);\r\n }\r\n\r\n private _parseAnswer() {\r\n\r\n this.resourceId = this.element.Answers[0].ResourceIdentifier;\r\n }\r\n\r\n private _parseElementOptions() {\r\n\r\n const filterType = this.element.Options.DropdownFilter;\r\n if (typeof(filterType) === 'string') {\r\n switch(filterType) {\r\n case 'Contains':\r\n this.filterType = 'Contains';\r\n break;\r\n case 'StartsWith':\r\n default:\r\n this.filterType = 'StartsWith';\r\n break;\r\n }\r\n }\r\n }\r\n}\r\n","import { ElementController } from '../ElementController';\r\nimport { IElementValidation } from '@hyd-lib-form-logic/data/interfaces/validation';\r\nimport { EResponseValueType } from '@hyd-form-provider';\r\n\r\nexport class PhotoElementController extends ElementController {\r\n\r\n get photoContentId() {\r\n if (this.response.Values.length > 0) {\r\n return this.response.Values[0].ContentId;\r\n }\r\n }\r\n\r\n get responseData() {\r\n return this.response.Values.length === 0 ? '' : this.response.Values[0].Value;\r\n }\r\n\r\n init() {}\r\n\r\n validate() {\r\n\r\n const newValidation: IElementValidation = {\r\n isVisible: this.required,\r\n isValid: true,\r\n validationMessages: []\r\n };\r\n\r\n if (this.required) {\r\n newValidation.validationMessages.push({\r\n isValid: this.response.Values.length !== 0,\r\n message: this.i18nextService.t('Validation.Required')\r\n })\r\n }\r\n\r\n newValidation.isValid = !newValidation.validationMessages.some(x => !x.isValid);\r\n\r\n this.updateValidation(newValidation);\r\n }\r\n\r\n photoChanged(contentId: string) {\r\n\r\n if (contentId && contentId.length !== 0) {\r\n if (this.response.Values.length === 0) {\r\n this.response.Values.push({\r\n AnswerId: -1,\r\n StatementId: -1,\r\n Valid: true,\r\n Value: null,\r\n ContentId: contentId,\r\n Type: EResponseValueType.Image\r\n });\r\n } else {\r\n this.response.Values[0].ContentId = contentId;\r\n }\r\n } else {\r\n this.response.Values.length = 0;\r\n }\r\n\r\n this.validate();\r\n this.responseChanged.emit(this.response);\r\n }\r\n}\r\n","import { ElementController } from '../ElementController';\r\nimport { IElementValidation } from '@hyd-lib-form-logic/data/interfaces/validation';\r\nimport { EResponseValueType, IElementModel, IResponseModel } from '@hyd-form-provider';\r\nimport { parseAsNumber } from '@hyd-lib';\r\nimport { ITranslationService } from 'angular-i18next';\r\n\r\nexport interface IBarcodeOptions {\r\n maxAnswers: number;\r\n}\r\n\r\nexport class BarcodeElementController extends ElementController {\r\n\r\n options: IBarcodeOptions = {\r\n maxAnswers: 0\r\n };\r\n\r\n get scannedBarcodeCount() {\r\n return this.response.Values.length;\r\n }\r\n\r\n init() {\r\n this._parseElementOptions();\r\n }\r\n\r\n validate() {\r\n\r\n const newValidation: IElementValidation = {\r\n isVisible: this.required,\r\n isValid: true,\r\n validationMessages: []\r\n };\r\n\r\n if (this.required) {\r\n newValidation.validationMessages.push({\r\n isValid: this.response.Values.length !== 0,\r\n message: this.i18nextService.t('Validation.Required')\r\n })\r\n }\r\n\r\n newValidation.isValid = !newValidation.validationMessages.some(x => !x.isValid);\r\n\r\n this.updateValidation(newValidation);\r\n }\r\n\r\n barcodeScanned(barcodeData: string) {\r\n\r\n this.response.Values.push({\r\n AnswerId: -1,\r\n StatementId: -1,\r\n Valid: true,\r\n Value: barcodeData,\r\n ContentId: null,\r\n Type: EResponseValueType.Text\r\n });\r\n\r\n this.validate();\r\n this.responseChanged.emit(this.response);\r\n }\r\n\r\n removeBarcode(index: number) {\r\n this.response.Values.splice(index, 1);\r\n\r\n this.validate();\r\n this.responseChanged.emit(this.response);\r\n }\r\n\r\n private _parseElementOptions() {\r\n this.options = {\r\n maxAnswers: parseAsNumber(this.element.Options.MaxAnswers, 10)\r\n };\r\n }\r\n}\r\n","import { ElementController } from '../ElementController';\r\nimport { IElementModel, IResponseModel, EResponseValueType } from '@hyd-form-provider';\r\nimport { parseAsNumber, parseAsString, parseAsBool } from '@hyd-lib';\r\n\r\nimport { IElementValidation } from '@hyd-lib-form-logic/data/interfaces/validation';\r\nimport { IterationId } from '@hyd-lib-form-logic/data/models/form-path.model';\r\nimport { ITranslationService } from 'angular-i18next';\r\n\r\nexport class LoopElementController extends ElementController {\r\n\r\n minAnswers: number;\r\n maxAnswers: number;\r\n addIterationLabel: string;\r\n continueSurveyLabel: string;\r\n defaultIterationLabel: string;\r\n\r\n loopIdentityElementId?: number;\r\n loopControllerElementId?: number;\r\n\r\n hideLoopOverview = false;\r\n\r\n get iterations() {\r\n\r\n return this.response.Values;\r\n }\r\n\r\n get iterationCount() {\r\n return this.response.Values.length;\r\n }\r\n\r\n get validIterations() {\r\n return this.response.Values.filter(x => x.Valid === true);\r\n }\r\n\r\n init() {\r\n\r\n this._parseOptions();\r\n }\r\n\r\n creatIteration(iterationId: IterationId) {\r\n\r\n let iterationResponse = this.response.Values.find(x => x.Value === iterationId);\r\n\r\n if (!iterationResponse) {\r\n\r\n iterationResponse = {\r\n AnswerId: -1,\r\n StatementId: -1,\r\n Valid: true,\r\n Value: iterationId,\r\n ContentId: null,\r\n Type: EResponseValueType.Itteration\r\n };\r\n\r\n this.response.Values.push(iterationResponse);\r\n }\r\n\r\n iterationResponse.Valid = true;\r\n\r\n this.validate();\r\n\r\n this.responseChanged.emit(this.response);\r\n\r\n return iterationResponse.Value;\r\n }\r\n\r\n validate() {\r\n\r\n const { minAnswers } = this;\r\n\r\n const newValidation: IElementValidation = {\r\n isVisible: minAnswers > 0,\r\n isValid: true,\r\n validationMessages: []\r\n };\r\n\r\n if (minAnswers > 0) {\r\n newValidation.validationMessages.push({\r\n isValid: this.validIterations.length >= minAnswers,\r\n message: this.i18nextService.t('Validation.LoopIterations', { count: minAnswers })\r\n })\r\n }\r\n\r\n newValidation.isValid = !newValidation.validationMessages.some(x => !x.isValid);\r\n\r\n this.updateValidation(newValidation);\r\n }\r\n\r\n markIterationAsInvalid(iterationId: string) {\r\n this.response.Values.forEach(x => {\r\n if (x.Value === iterationId) {\r\n x.Valid = false;\r\n }\r\n });\r\n }\r\n\r\n getFirstInvalidIterationId() {\r\n\r\n const iteration = this.response.Values.find(x => !x.Valid);\r\n if (iteration) {\r\n return iteration.Value;\r\n }\r\n return;\r\n }\r\n\r\n setMinLoopCount(count = 0) {\r\n this.minAnswers = count;\r\n this.validate();\r\n }\r\n\r\n private _parseOptions() {\r\n\r\n const options = this.element.Options;\r\n this.minAnswers = parseAsNumber(options.MinAnswers, 0);\r\n this.maxAnswers = parseAsNumber(options.MaxResponses, 10);\r\n\r\n this.addIterationLabel = parseAsString(options.AddIterationLabel, 'Add Question Set');\r\n this.continueSurveyLabel = parseAsString(options.ContinueSurveyLabel, 'Continue Survey');\r\n this.defaultIterationLabel = parseAsString(options.DefaultIterationLabel, 'Question Set');\r\n\r\n this.loopIdentityElementId = parseAsNumber(options.LoopIdentityElementId, undefined);\r\n this.loopControllerElementId = parseAsNumber(options.LoopControllerElementId, undefined);\r\n\r\n this.hideLoopOverview = parseAsBool(options.HideLoopOverview, false);\r\n }\r\n}\r\n","import { Subject, asyncScheduler, of, scheduled, BehaviorSubject, Subscription } from 'rxjs';\r\nimport { INavRuleModel, IElementModel, EFormOption, EElementType, EFormModeType } from '@hyd-form-provider';\r\nimport { FormPathService } from '@hyd-lib-form-logic/services/form/form-path.service';\r\nimport { ElementController } from './elements/ElementController';\r\nimport { ElementControllerFactory } from './elements/ElementControllerFactory';\r\nimport { ConditionsService } from '@hyd-lib-form-logic/services/form/conditions.service';\r\nimport { LinkedElementController } from './elements/linked/linked.controller';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { Injectable, Inject } from '@angular/core';\r\nimport { FormService } from '@hyd-lib-form-logic/services/form/form.service';\r\nimport { ResponseService } from '@hyd-lib-form-logic/services/response.service';\r\nimport { ElementService } from '@hyd-lib-form-logic/services/form/element.service';\r\nimport { LoopElementController } from './elements/loop/loop.controller';\r\nimport { FormPathStep, IterationId } from '@hyd-lib-form-logic/data/models/form-path.model';\r\nimport { ElementTransitionService, TransitionAction } from '@hyd-lib-form-logic/services/form/element-transition.service';\r\nimport { SessionService } from '@hyd-lib-form-logic/services/session.service';\r\nimport { IServiceState, ServiceState } from '@hyd-lib-form-logic/services/form/IServiceState';\r\nimport { ResourceService, Resource } from '@hyd-lib-form-logic/services/resource.service';\r\nimport { parseAsNumber, parseAsBool } from '@hyd-lib';\r\nimport { I18NEXT_SERVICE, ITranslationService } from 'angular-i18next';\r\nimport { LoadingIndicatorService } from '@hyd-lib-form-logic/services/loading-indicator.service';\r\n\r\nexport interface IFormController {\r\n\r\n activeElementController: ElementController;\r\n activeElementControllerChanged: Subject;\r\n\r\n navigateNext(): void;\r\n navigateBack(): void;\r\n}\r\n\r\n@Injectable()\r\nexport class FormController implements IFormController, IServiceState {\r\n\r\n /**\r\n * @desc The activeElementController is updated when the activeElement on the FormPath changes\r\n */\r\n activeElementController: ElementController;\r\n activeElementControllerChanged = new Subject();\r\n state = new BehaviorSubject('new');\r\n\r\n private _transitionAction: TransitionAction;\r\n\r\n get formMode(): EFormModeType {\r\n if (this._form.activeForm) {\r\n return this._form.activeForm.Mode;\r\n }\r\n\r\n return EFormModeType.Unknown;\r\n }\r\n\r\n constructor(\r\n private _path: FormPathService,\r\n private _form: FormService,\r\n private _elementService: ElementService,\r\n private _conditionsService: ConditionsService,\r\n private _responseService: ResponseService,\r\n private _transitionService: ElementTransitionService,\r\n private _sessionService: SessionService,\r\n private _resourceService: ResourceService,\r\n @Inject(I18NEXT_SERVICE) private i18NextService: ITranslationService,\r\n private _logger: NGXLogger,\r\n private _loadingIndicator: LoadingIndicatorService) {\r\n\r\n this._conditionsService.state.subscribe(this._checkFormServicesReady.bind(this));\r\n this._form.state.subscribe(this._checkFormServicesReady.bind(this));\r\n this._path.state.subscribe(this._checkFormServicesReady.bind(this));\r\n\r\n scheduled(this._path.pathChanged, asyncScheduler).subscribe((newElementId: FormPathStep) => {\r\n if (this.state.value === 'ready' && newElementId) {\r\n this._updateActiveElement(newElementId);\r\n }\r\n });\r\n\r\n this._transitionAction = this._transitionService.registerTransitionAction();\r\n\r\n this._sessionService.activeSessionReset.subscribe(() => {\r\n delete this.activeElementController;\r\n this.state.next('new');\r\n });\r\n }\r\n\r\n private async _checkFormServicesReady() {\r\n\r\n if (this._path.state.value === 'error'\r\n || this._form.state.value === 'error'\r\n || this._conditionsService.state.value === 'error') {\r\n\r\n if (this.state.value !== 'error') {\r\n this.state.next('error');\r\n }\r\n return;\r\n }\r\n\r\n if (this._path.state.value === 'ready'\r\n && this._form.state.value === 'ready'\r\n && this._conditionsService.state.value === 'ready') {\r\n\r\n if (!this._path.activeStep) {\r\n\r\n const firstElementId = this._form.getFirstFormElementNode().Id;\r\n this._path.pushPath(firstElementId, true);\r\n }\r\n\r\n await this._cacheElementAndResources(this._path.activeStep, this._path.activeIterationId);\r\n\r\n this.state.next('ready');\r\n\r\n setTimeout(() => {\r\n\r\n this._updateActiveElement(this._path.activeStep);\r\n }, 0);\r\n }\r\n }\r\n\r\n startIteration(loopController: LoopElementController) {\r\n\r\n const loopId = loopController.element.Id;\r\n const loopNode = this._form.getNode(loopId);\r\n\r\n // If there are no elements inside the loop, do nothing\r\n // TODO: Raise an error/alert the user\r\n if (!loopNode.node.Nodes || loopNode.node.Nodes.length === 0) {\r\n return;\r\n }\r\n\r\n let newIterationId: IterationId;\r\n\r\n // If we are doing a seamless loop, we may have stepped back through iterations that were then made invalid\r\n // When we step forward through we should use these iterations before starting new ones\r\n if (loopController.hideLoopOverview) {\r\n newIterationId = loopController.getFirstInvalidIterationId();\r\n }\r\n\r\n // Enter a new iteration on the path\r\n // If the newIterationId is undefined when passed in, a new iterationId will be generated\r\n newIterationId = this._path.startIteration(loopId, newIterationId, loopController.hideLoopOverview);\r\n\r\n // Create (or updated) the iteration on the loop controller response\r\n loopController.creatIteration(newIterationId);\r\n this._saveResponse(loopController, true);\r\n\r\n // Push the first element of the loop into the active iterations path\r\n this._path.pushPath(loopNode.node.Nodes[0].Id);\r\n }\r\n\r\n async navigateNext() {\r\n\r\n this._loadingIndicator.show();\r\n\r\n this._transitionService.startTransition('next');\r\n\r\n // If the currently active element has a response, mark it as valid and save to server\r\n this._saveResponse(this.activeElementController, true);\r\n\r\n // Save the Conditions Cache if it has changed\r\n this._conditionsService.saveConditions();\r\n\r\n const thisElement = await this._elementService.getElementById(this._path.activeStep as number);\r\n\r\n // Getting the next element id, this\r\n let nextElementId = this._getNextElementId(thisElement);\r\n\r\n if (this._path.activeIteration.loopId === nextElementId) {\r\n this._path.endIteration();\r\n }\r\n\r\n const nextElement = await this._elementService.getElementById(nextElementId);\r\n\r\n if (nextElement.SubType === 'LoopContainer') {\r\n\r\n const loopController = await this._getElementController(nextElementId, this._path.activeIterationId) as LoopElementController;\r\n\r\n // If it is a seamless loop, we don't show the loop controller\r\n // Either start a loop or skip to the next element\r\n if (loopController.hideLoopOverview) {\r\n\r\n if (loopController.minAnswers > 0 && loopController.validIterations.length < loopController.minAnswers) {\r\n this.startIteration(loopController);\r\n // The path will be updated in the startIteration() method\r\n return;\r\n } else {\r\n // The number of iterations specififed by the controlling question have been completed\r\n nextElementId = this._getNextElementId(loopController.element);\r\n }\r\n }\r\n }\r\n\r\n this._path.pushPath(nextElementId);\r\n }\r\n\r\n async navigateBack() {\r\n\r\n this._loadingIndicator.show();\r\n\r\n this._transitionService.startTransition('back');\r\n\r\n // Remove any condition values for the current active element\r\n const conditions = this.activeElementController.element.Conditions;\r\n const activeIterationId = this._path.activeIterationId;\r\n\r\n if (conditions) {\r\n this._conditionsService.invalidateConditions(conditions, activeIterationId);\r\n }\r\n\r\n // Save the current active element response as invalid\r\n this._saveResponse(this.activeElementController, false);\r\n\r\n // Update the form path\r\n this._path.popPath();\r\n\r\n // We need to end an active iteration if we have stepped back to it's start (no more steps in it's path)\r\n if (this._path.activeIterationId !== 'default' && this._path.activeIteration.FormPathSteps.length === 0) {\r\n const iteration = this._path.activeIteration;\r\n\r\n // End the iteration and remove it's reference from the parent path\r\n this._path.endIteration('remove');\r\n\r\n // Set that particular iteration as invalid on the main iteration response\r\n const loopController = await this._getElementController(iteration.loopId, iteration.parentId) as LoopElementController;\r\n\r\n loopController.markIterationAsInvalid(iteration.iterationId);\r\n this._responseService.saveResponse(loopController.response, loopController.element.Id).catch(e => {console.log(e)});\r\n }\r\n\r\n // Check if the conditions manager has dirtied it's cache\r\n // If it has, save the updated cache to the server\r\n this._conditionsService.saveConditions();\r\n }\r\n\r\n private async _updateActiveElement(step: FormPathStep) {\r\n\r\n this._transitionAction.completeAction();\r\n\r\n if (typeof(step) === 'string') {\r\n return;\r\n }\r\n\r\n // End the current iteration if going back to the currently active loop controller\r\n if (this._path.activeIteration.loopId === step) {\r\n this._path.endIteration();\r\n }\r\n\r\n // Destroy existing element controller allowing it to clean up any subscriptions\r\n if (this.activeElementController) {\r\n this.activeElementController.destroy();\r\n }\r\n\r\n // Stop the condition service watching any previous active conditions\r\n this._conditionsService.stopWatchingElementControllers();\r\n\r\n\r\n // Create element controller for active element\r\n this.activeElementController = await this._getElementController(step, this._path.activeIterationId);\r\n\r\n // Watch the active element for any conditions will need to be updated when the response changes\r\n this._conditionsService.watchElementController(this.activeElementController);\r\n\r\n\r\n // Popuplate children elements for linked element\r\n if (this.activeElementController.subType === 'Linked') {\r\n\r\n const linkedElementNode = this._form.getNode(this.activeElementController.element.Id);\r\n\r\n const linkedElementControllers = await Promise.all(linkedElementNode.node.Nodes.map(async (node) => {\r\n return this._getElementController(node.Id, this._path.activeIterationId);\r\n }));\r\n\r\n // Validate all child controllers and watch them for conditions that might need to update\r\n linkedElementControllers.forEach(c => {\r\n c.validate();\r\n this._conditionsService.watchElementController(c);\r\n });\r\n\r\n (this.activeElementController as LinkedElementController).setChildControllers(linkedElementControllers);\r\n }\r\n\r\n this.activeElementController.validate();\r\n\r\n // Send out notifcation the active elementcontroller has been updated\r\n this.activeElementControllerChanged.next(this.activeElementController);\r\n\r\n // Start caching next/previous elements if they haven't been cached yet\r\n const nextElementId = this._form.getNextElementNode(this.activeElementController.element.Id);\r\n\r\n if (nextElementId !== -1) {\r\n this._cacheElementAndResources(nextElementId, this._path.activeIterationId);\r\n }\r\n\r\n const { elementId, iterationId } = this._path.getPreviousElementId();\r\n if (elementId !== -1) {\r\n this._cacheElementAndResources(elementId, iterationId);\r\n }\r\n\r\n this._loadingIndicator.hide();\r\n }\r\n\r\n private _getNextElementId(element: IElementModel): number {\r\n\r\n // Get the next element from the node tree\r\n const defaultNextElementNodeId = this._form.getNextElementNode(element.Id);\r\n\r\n // Evaluate any navigation rules on the active element\r\n const navigationRules = element.Navigation;\r\n let activeNavRule: INavRuleModel;\r\n\r\n if (navigationRules) {\r\n // Iterate over all navigation rules and use the first one that evaluates to true\r\n navigationRules.forEach(rule => {\r\n\r\n // An active rule has been found, no need to check the rest of the rules\r\n if (activeNavRule) { return; }\r\n\r\n // If a rule has no conditions/items to check then it is considered true\r\n // An example is the default flow from an element\r\n // Otherwise have the ConditionsManager check if the rule is active\r\n if (!rule.Items) {\r\n activeNavRule = rule;\r\n } else {\r\n if (this._conditionsService.isRuleActive(rule)) {\r\n activeNavRule = rule;\r\n }\r\n }\r\n });\r\n }\r\n\r\n let nextElementId = defaultNextElementNodeId;\r\n\r\n if (activeNavRule) {\r\n nextElementId = activeNavRule.DestinationId;\r\n }\r\n\r\n return nextElementId;\r\n }\r\n\r\n private async _getElementController(elementId: number, iterationId: IterationId) {\r\n\r\n const newElement = await this._elementService.getElementById(elementId);\r\n const response = await this._responseService.getResponseForElement(newElement, iterationId);\r\n const newElementController = ElementControllerFactory.CreateContoller(newElement, response, this.i18NextService);\r\n\r\n if (newElementController.subType === 'LoopContainer') {\r\n\r\n const loopController = newElementController as LoopElementController;\r\n let minResponseCount = 0;\r\n\r\n // If we have a loop controller with a controlling element\r\n // We need to get the response value from that element\r\n if (loopController.loopControllerElementId) {\r\n\r\n const controllerElement = await this._elementService.getElementById(loopController.loopControllerElementId);\r\n const controllerResponse = await this._responseService.getResponseForElement(controllerElement, this._path.activeIterationId);\r\n\r\n if (controllerResponse && controllerResponse.Values.length > 0) {\r\n minResponseCount = parseInt(controllerResponse.Values[0].Value, 10);\r\n\r\n if (isNaN(minResponseCount)) {\r\n minResponseCount = 0;\r\n }\r\n }\r\n\r\n loopController.setMinLoopCount(minResponseCount);\r\n }\r\n }\r\n\r\n if (this._path.activeIteration.iterationId !== 'default'\r\n && this._path.activeIteration.FormPathSteps.length <= 1) {\r\n\r\n const parentLoop = await this._elementService.getElementById(this._path.activeIteration.loopId);\r\n\r\n const hasControllerElement = parseAsNumber(parentLoop.Options.LoopControllerElementId, -1) !== -1;\r\n const shoudHideLoopOverview = parseAsBool(parentLoop.Options.HideLoopOverview, false);\r\n\r\n if (hasControllerElement && shoudHideLoopOverview) {\r\n newElementController.shouldHideBackButton = false;\r\n } else {\r\n newElementController.shouldHideBackButton = true;\r\n }\r\n }\r\n\r\n return Promise.resolve(newElementController);\r\n }\r\n\r\n private _saveResponse(controller: ElementController, isValid = true) {\r\n\r\n // Save all the responses of child element controllers\r\n if (controller.subType === 'Linked') {\r\n\r\n const childControllers = (controller as LinkedElementController).childElementControllers;\r\n\r\n childControllers.forEach(c => {\r\n this._saveResponse(c, isValid);\r\n });\r\n } else {\r\n const response = controller.response;\r\n\r\n if (response) {\r\n response.Valid = isValid;\r\n this._responseService.saveResponse(response, controller.element.Id).catch(e => {console.log(e)});\r\n }\r\n }\r\n }\r\n\r\n private async _cacheElementAndResources(elementId: number, iterationId: string) {\r\n\r\n const elementNode = this._form.getNode(elementId).node;\r\n\r\n const element = await this._elementService.getElementById(elementId);\r\n\r\n await this._responseService.getResponseForElement(element, iterationId);\r\n\r\n const resources: Resource[] = [];\r\n\r\n if (element.SubType === 'Start') {\r\n resources.push({\r\n id: this._form.getFormOption(EFormOption.StartFooter),\r\n type: 'blob'\r\n });\r\n } else if (element.SubType === 'Finish') {\r\n resources.push({\r\n id: this._form.getFormOption(EFormOption.FinishFooter),\r\n type: 'blob'\r\n });\r\n } else {\r\n resources.push({\r\n id: this._form.getFormOption(EFormOption.Footer),\r\n type: 'blob'\r\n });\r\n }\r\n\r\n if (element.Answers) {\r\n\r\n element.Answers.forEach(answer => {\r\n\r\n if (typeof(answer.ResourceIdentifier) === 'string') {\r\n resources.push({\r\n id: answer.ResourceIdentifier,\r\n type: 'json'\r\n });\r\n }\r\n\r\n if (typeof(answer.Image) === 'string') {\r\n resources.push({\r\n id: answer.Image,\r\n type: 'blob'\r\n });\r\n }\r\n });\r\n }\r\n\r\n\r\n if (typeof(element.Image) === 'string') {\r\n resources.push({\r\n id: element.Image,\r\n type: 'blob'\r\n });\r\n }\r\n\r\n if (elementNode && elementNode.Type === EElementType.DisplayGroup && elementNode.Nodes) {\r\n await Promise.all(elementNode.Nodes.map(x => this._cacheElementAndResources(x.Id, iterationId)));\r\n }\r\n\r\n return this._resourceService.cacheResources(resources);\r\n }\r\n}\r\n","import { IElementModel, IResponseModel } from '@hyd-form-provider';\r\nimport { ElementController } from './ElementController';\r\n\r\nimport { StartElementController } from './start/start.controller';\r\nimport { TextElementController } from './text/text.controller';\r\nimport { FinishElementController } from './finish/finish.controller';\r\nimport { InfoElementController } from './info/info.controller';\r\nimport { SelectElementController } from './select/select.controller';\r\nimport { LinkedElementController } from './linked/linked.controller';\r\nimport { ScaleElementController } from './scale/scale.controller';\r\nimport { IntervalElementController } from './interval/interval.controller';\r\nimport { MatrixElementController } from './matrix/matrix.controller';\r\nimport { DateElementController } from './date/date.controller';\r\nimport { RankingElementController } from './ranking/ranking.controller';\r\nimport { SignatureElementController } from './signature/signature.controller';\r\nimport { DropdownElementController } from './dropdown/dropdown.controller';\r\nimport { GPSElementController } from './gps/gps.controller';\r\nimport { PhotoElementController } from './photo/photo.controller';\r\nimport { BarcodeElementController } from './barcode/barcode.controller';\r\nimport { LoopElementController } from './loop/loop.controller';\r\nimport { ITranslationService } from 'angular-i18next';\r\n\r\nexport class ElementControllerFactory {\r\n static CreateContoller(element: IElementModel, response: IResponseModel, i18nextService: ITranslationService): ElementController {\r\n switch (element.SubType) {\r\n case 'Start':\r\n return new StartElementController(element, response, i18nextService);\r\n case 'Scale':\r\n return new ScaleElementController(element, response, i18nextService);\r\n case 'Text':\r\n return new TextElementController(element, response, i18nextService);\r\n case 'Select':\r\n return new SelectElementController(element, response, i18nextService);\r\n case 'Information':\r\n return new InfoElementController(element, response, i18nextService);\r\n case 'Finish':\r\n return new FinishElementController(element, response, i18nextService);\r\n case 'Linked':\r\n return new LinkedElementController(element, response, i18nextService);\r\n case 'Interval':\r\n return new IntervalElementController(element, response, i18nextService);\r\n case 'Matrix':\r\n return new MatrixElementController(element, response, i18nextService);\r\n case 'Date':\r\n return new DateElementController(element, response, i18nextService);\r\n case 'Ranking':\r\n return new RankingElementController(element, response, i18nextService);\r\n case 'Signature':\r\n return new SignatureElementController(element, response, i18nextService);\r\n case 'DropDown':\r\n return new DropdownElementController(element, response, i18nextService);\r\n case 'GPS':\r\n return new GPSElementController(element, response, i18nextService);\r\n case 'Photo':\r\n return new PhotoElementController(element, response, i18nextService);\r\n case 'Barcode':\r\n return new BarcodeElementController(element, response, i18nextService);\r\n case 'LoopContainer':\r\n return new LoopElementController(element, response, i18nextService);\r\n default:\r\n return new InfoElementController(element, response, i18nextService);\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Subject, Observable } from 'rxjs';\r\nimport { distinctUntilChanged } from 'rxjs/operators';\r\n\r\nexport type SpinnerState = 'show' | 'hide';\r\n\r\n@Injectable({providedIn: 'any'})\r\nexport class LoadingIndicatorService {\r\n\r\n private _toggle: Subject;\r\n $toggleState: Observable;\r\n\r\n constructor() {\r\n this._toggle = new Subject();\r\n this.$toggleState = this._toggle.asObservable().pipe(distinctUntilChanged());\r\n }\r\n\r\n show() {\r\n this._toggle.next('show');\r\n }\r\n\r\n hide() {\r\n this._toggle.next('hide');\r\n }\r\n}\r\n","\n
\n \n Testing\n
\n \n \n \n \n \n \n \n \n \n \n Error\n \n \n \n \n \n \n \n \n \n \n ","/**\n * @fileoverview This file was generated by the Angular template compiler. Do not edit.\n *\n * @suppress {suspiciousCode,uselessCode,missingProperties,missingOverride,checkTypes,extraRequire}\n * tslint:disable\n */\nvar styles = [\"[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center;height:100%}\"];\nexport { styles as styles };\n\n","\r\n","import {\r\n Directive,\r\n ElementRef,\r\n Renderer2,\r\n Inject,\r\n PLATFORM_ID,\r\n OnDestroy,\r\n AfterViewInit,\r\n HostListener\r\n} from \"@angular/core\";\r\n\r\nimport {\r\n NbThemeService,\r\n NbLayoutDirectionService,\r\n NB_WINDOW,\r\n NB_DOCUMENT,\r\n NbOverlayContainerAdapter,\r\n NbLayoutScrollService,\r\n NbLayoutRulerService,\r\n NbLayoutDimensions,\r\n NbScrollPosition\r\n} from \"@nebular/theme\";\r\n\r\nimport { takeWhile } from 'rxjs/operators';\r\nimport { isPlatformBrowser } from '@angular/common';\r\n\r\n@Directive({\r\n selector: \"[hydThemeRoot]\"\r\n})\r\nexport class HydThemeRootDirective implements OnDestroy, AfterViewInit {\r\n\r\n private _alive = true;\r\n\r\n constructor(\r\n protected themeService: NbThemeService,\r\n protected elementRef: ElementRef,\r\n protected renderer: Renderer2,\r\n @Inject(NB_WINDOW) protected window,\r\n @Inject(NB_DOCUMENT) protected document,\r\n @Inject(PLATFORM_ID) protected platformId: Object,\r\n protected layoutDirectionService: NbLayoutDirectionService,\r\n protected overlayContainer: NbOverlayContainerAdapter,\r\n protected scrollService: NbLayoutScrollService,\r\n protected rulerService: NbLayoutRulerService,\r\n ) {\r\n\r\n this.registerAsOverlayContainer();\r\n\r\n this._initNbThemeService();\r\n\r\n this.rulerService\r\n .onGetDimensions()\r\n .pipe(takeWhile(() => this._alive))\r\n .subscribe(({ listener }) => {\r\n listener.next(this.getDimensions());\r\n listener.complete();\r\n });\r\n\r\n this.scrollService\r\n .onGetPosition()\r\n .pipe(takeWhile(() => this._alive))\r\n .subscribe(({ listener }) => {\r\n listener.next(this.getScrollPosition());\r\n listener.complete();\r\n });\r\n }\r\n\r\n ngAfterViewInit() {\r\n\r\n this._initNbDirectionService();\r\n }\r\n\r\n ngOnDestroy() {\r\n\r\n this._alive = false;\r\n this.unregisterAsOverlayContainer();\r\n }\r\n\r\n @HostListener(\"window:scroll\", [\"$event\"])\r\n onScroll($event) {\r\n this.scrollService.fireScrollChange($event);\r\n }\r\n\r\n _initNbThemeService() {\r\n\r\n this.themeService\r\n .onThemeChange()\r\n .pipe(takeWhile(() => this._alive))\r\n .subscribe((theme: any) => {\r\n const body = this.document.getElementsByTagName(\"body\")[0];\r\n if (theme.previous) {\r\n this.renderer.removeClass(body, `nb-theme-${theme.previous}`);\r\n }\r\n this.renderer.addClass(body, `nb-theme-${theme.name}`);\r\n });\r\n\r\n this.themeService\r\n .onAppendLayoutClass()\r\n .pipe(takeWhile(() => this._alive))\r\n .subscribe((className: string) => {\r\n this.renderer.addClass(this.elementRef.nativeElement, className);\r\n });\r\n\r\n this.themeService\r\n .onRemoveLayoutClass()\r\n .pipe(takeWhile(() => this._alive))\r\n .subscribe((className: string) => {\r\n this.renderer.removeClass(this.elementRef.nativeElement, className);\r\n });\r\n }\r\n\r\n _initNbDirectionService() {\r\n\r\n this.layoutDirectionService.onDirectionChange()\r\n .pipe(takeWhile(() => this._alive))\r\n .subscribe(direction => this.document.dir = direction);\r\n }\r\n\r\n registerAsOverlayContainer() {\r\n if (this.overlayContainer.setContainer) {\r\n this.overlayContainer.setContainer(this.elementRef.nativeElement);\r\n }\r\n }\r\n\r\n unregisterAsOverlayContainer() {\r\n if (this.overlayContainer.clearContainer) {\r\n this.overlayContainer.clearContainer();\r\n }\r\n }\r\n\r\n getDimensions(): NbLayoutDimensions {\r\n let clientWidth,\r\n clientHeight,\r\n scrollWidth,\r\n scrollHeight = 0;\r\n const container = this.elementRef.nativeElement;\r\n clientWidth = container.clientWidth;\r\n clientHeight = container.clientHeight;\r\n scrollWidth = container.scrollWidth;\r\n scrollHeight = container.scrollHeight;\r\n\r\n return {\r\n clientWidth,\r\n clientHeight,\r\n scrollWidth,\r\n scrollHeight\r\n };\r\n }\r\n\r\n getScrollPosition(): NbScrollPosition {\r\n if (!isPlatformBrowser(this.platformId)) {\r\n return { x: 0, y: 0 };\r\n }\r\n\r\n const container = this.elementRef.nativeElement;\r\n return { x: container.scrollLeft, y: container.scrollTop };\r\n }\r\n\r\n private scroll(x: number = null, y: number = null) {\r\n const { x: currentX, y: currentY } = this.getScrollPosition();\r\n x = x == null ? currentX : x;\r\n y = y == null ? currentY : y;\r\n\r\n if (!isPlatformBrowser(this.platformId)) {\r\n return;\r\n }\r\n const scrollable = this.elementRef.nativeElement;\r\n if (scrollable.scrollTo) {\r\n scrollable.scrollTo(x, y);\r\n } else {\r\n scrollable.scrollLeft = x;\r\n scrollable.scrollTop = y;\r\n }\r\n }\r\n}\r\n","
\r\n \r\n
\r\n","import { ITranslationService, I18NEXT_SERVICE } from 'angular-i18next';\r\nimport HttpApi from 'i18next-http-backend';\r\nimport { APP_INITIALIZER, LOCALE_ID } from '@angular/core';\r\nimport { Environment } from '@hyd-lib';\r\n\r\nexport function appInit(i18next: ITranslationService, env: Environment) {\r\n return () => i18next.use(HttpApi).init({\r\n lng: 'en',\r\n whitelist: ['en', 'fr'],\r\n fallbackLng: 'en',\r\n debug: !env.production,\r\n returnEmptyString: false,\r\n defaultNS: 'form',\r\n ns: [\r\n 'form'\r\n ]\r\n });\r\n}\r\n\r\nexport function localeIdFactory(i18next: ITranslationService) {\r\n return i18next.language;\r\n}\r\n\r\nexport const I18N_PROVIDERS = [\r\n {\r\n provide: APP_INITIALIZER,\r\n useFactory: appInit,\r\n deps: [I18NEXT_SERVICE, Environment],\r\n multi: true\r\n },\r\n {\r\n provide: LOCALE_ID,\r\n deps: [I18NEXT_SERVICE],\r\n useFactory: localeIdFactory\r\n }\r\n];\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\r\nimport {\r\n IFormSessionModel,\r\n IElementModel,\r\n IResponseModel,\r\n IFormSessionCreateModel,\r\n IFormConfigModel,\r\n ERuntimeState,\r\n IResultStartModel,\r\n IResultFinishModel,\r\n IFormSessionInfoModel\r\n} from '@hyd-form-provider';\r\nimport { getUuid } from '@hyd-lib';\r\nimport { RequestQueueService } from '../request-queue.service';\r\n\r\nconst sessionUrl = '/api/sessions';\r\nconst formUrl = '/api/forms';\r\n\r\nexport type ResponseType = 'arraybuffer' | 'blob' | 'json' | 'text';\r\n\r\nexport interface ISessionApiService {\r\n getSessions(): Promise;\r\n getSession(sessionId: string): Promise;\r\n getSessionState(sessionId: string): Promise;\r\n getSessionDebugTrace(sessionId: string): Promise;\r\n getSessionElementResponse(sessionId: string, elementId: number, parentId?: string): Promise;\r\n createNewSession(FormId: number, FormDomain: string): Promise;\r\n setResultStart(sessionId: string, resultStartModel: IResultStartModel): Promise;\r\n setResultFinish(sessionId: string, resultStartModel: IResultFinishModel): Promise;\r\n completeSession(sessionId: string);\r\n updateElementResponse(sessionId: string, elementId: number, updateResponseBody: IResponseModel): Promise;\r\n getSessionMeta(sessionId: string, key: string): Promise;\r\n updateSessionMeta(sessionId: string, key: string, metaBody: TSessionMeta): Promise;\r\n uploadContentData(sessionId: string, fileName: string, fileData: string | Blob): Promise;\r\n getContentData(sessionId: string, fileName: string): Promise;\r\n getForm(formDomainId: string, formId: number, formVersion: number, formCacheId: string): Promise;\r\n getElement(formDomainId: string, formId: number, formVersion: number, formCacheId: string, elementId: number): Promise;\r\n getResource(\r\n formDomainId: string, formId: number, formVersion: number, formCacheId: string, resourceId: string, responseType: ResponseType\r\n ): Promise\r\n}\r\n\r\n@Injectable()\r\nexport class SessionApiService implements ISessionApiService {\r\n\r\n constructor(\r\n private httpClient: HttpClient,\r\n private requestQueueService: RequestQueueService\r\n ) {\r\n\r\n let clientId = sessionStorage.getItem('client-id');\r\n\r\n if (!clientId) {\r\n clientId = getUuid();\r\n sessionStorage.setItem('client-id', clientId);\r\n }\r\n }\r\n\r\n async getSessions(): Promise {\r\n\r\n return this.httpClient.get(sessionUrl).toPromise();\r\n }\r\n\r\n async getSession(sessionId: string): Promise {\r\n\r\n const params = { 'client-action': 'resume' };\r\n return this.httpClient.get(`${sessionUrl}/${sessionId}`, { params }).toPromise();\r\n }\r\n\r\n async getSessionState(sessionId: string): Promise {\r\n\r\n return this.httpClient.get(`${sessionUrl}/${sessionId}/runtimestate`).toPromise();\r\n }\r\n\r\n async getSessionDebugTrace(sessionId: string): Promise {\r\n\r\n return this.httpClient.get(`${sessionUrl}/${sessionId}/debugtrace`).toPromise();\r\n }\r\n\r\n pollSessionTillReady(\r\n sessionId: string,\r\n success: (session: IFormSessionModel) => void, failure: ({ state: ERuntimeState, message: string}) => void) {\r\n\r\n let isCancelled = false;\r\n const cancel = () => {\r\n isCancelled = true;\r\n };\r\n\r\n let tryCount = 0;\r\n const maxTries = 120;\r\n const pollDelay = 500;\r\n\r\n const pollSession = () => {\r\n\r\n if (isCancelled) {\r\n return;\r\n }\r\n\r\n if (tryCount > maxTries) {\r\n failure({ state: ERuntimeState.Failed, message: 'Session Timeout' });\r\n return;\r\n }\r\n\r\n tryCount++;\r\n\r\n this.getSessionState(sessionId).then(sessionState => {\r\n\r\n if (sessionState === ERuntimeState.Failed) {\r\n\r\n this.getSessionDebugTrace(sessionId).then(trace => {\r\n failure({ state: ERuntimeState.Failed, message: trace });\r\n }).catch(e => {\r\n failure({ state: ERuntimeState.Failed, message: 'Session failed - unable to get debug trace' });\r\n });\r\n return;\r\n }\r\n\r\n if (!isCancelled) {\r\n if (sessionState === ERuntimeState.Ok) {\r\n\r\n this.getSession(sessionId).then(session => {\r\n success(session);\r\n }).catch(e => {\r\n failure({ state: ERuntimeState.Failed, message: 'Error getting session' });\r\n });\r\n } else if (sessionState === ERuntimeState.Complete) {\r\n failure({ state: ERuntimeState.Complete, message: 'Session Complete' });\r\n } else {\r\n setTimeout(pollSession, pollDelay);\r\n }\r\n }\r\n }).catch((e) => {\r\n failure({ state: ERuntimeState.Failed, message: 'Error getting session runtime state' });\r\n });\r\n };\r\n\r\n pollSession();\r\n\r\n return cancel;\r\n }\r\n\r\n async getSessionElementResponse(sessionId: string, elementId: number, parentId?: string): Promise {\r\n\r\n const params = {};\r\n\r\n if (parentId) {\r\n params['parentId'] = parentId;\r\n }\r\n\r\n return this.requestQueueService.addRequestToQueue({\r\n id: `response-${elementId}-${parentId}`,\r\n method: 'GET',\r\n url: `${sessionUrl}/${sessionId}/elements/${elementId}/responses`,\r\n params\r\n });\r\n }\r\n\r\n async createNewSession(FormId: number, FormDomain: string): Promise {\r\n\r\n if (isNaN(FormId)) {\r\n FormId = parseInt(FormId.toString(), 10);\r\n }\r\n\r\n const newSessionBody: IFormSessionCreateModel = {\r\n FormId, SourceType: 1, FormDomain, FormSourceId: 'EC42A64D-4691-414C-A9A5-B3259B8CD74B', FormSourceRef: 'Collector'\r\n };\r\n\r\n return this.requestQueueService.addRequestToQueue({\r\n id: 'session-create',\r\n method: 'POST',\r\n url: `${sessionUrl}/`,\r\n body: newSessionBody\r\n });\r\n }\r\n\r\n async setResultStart(sessionId: string, resultStartModel: IResultStartModel): Promise {\r\n\r\n return this.requestQueueService.addRequestToQueue({\r\n queueName: 'response',\r\n id: 'result-start',\r\n method: 'PUT',\r\n url: `${sessionUrl}/${sessionId}/resultstart`,\r\n body: resultStartModel\r\n });\r\n }\r\n\r\n async setResultFinish(sessionId: string, resultStartModel: IResultFinishModel): Promise {\r\n\r\n return this.requestQueueService.addRequestToQueue({\r\n queueName: 'response',\r\n id: 'result-finish',\r\n method: 'PUT',\r\n url: `${sessionUrl}/${sessionId}/resultfinish`,\r\n body: resultStartModel\r\n });\r\n }\r\n\r\n completeSession(sessionId: string) {\r\n window.location.href = `/api/sessions/${sessionId}/complete`;\r\n }\r\n\r\n async updateElementResponse(sessionId: string, elementId: number, updateResponseBody: IResponseModel): Promise {\r\n\r\n return this.requestQueueService.addRequestToQueue({\r\n queueName: 'response',\r\n id: `${elementId}-${updateResponseBody.ParentId}`,\r\n method: 'PUT',\r\n url: `${sessionUrl}/${sessionId}/elements/${elementId}/responses`,\r\n body: updateResponseBody\r\n });\r\n }\r\n\r\n async getSessionMeta(sessionId: string, key: string): Promise {\r\n\r\n return this.requestQueueService.addRequestToQueue({\r\n queueName: 'meta',\r\n id: `meta-${key}-get`,\r\n method: 'GET',\r\n url: `${sessionUrl}/${sessionId}/meta/${key}`\r\n });\r\n }\r\n\r\n async updateSessionMeta(sessionId: string, key: string, metaBody: TSessionMeta): Promise {\r\n\r\n return this.requestQueueService.addRequestToQueue({\r\n id: `${key}-put`,\r\n method: 'PUT',\r\n url: `${sessionUrl}/${sessionId}/meta/${key}`,\r\n body: metaBody\r\n });\r\n }\r\n\r\n async uploadContentData(sessionId: string, fileName: string, fileData: string | Blob): Promise {\r\n\r\n const data = new FormData();\r\n\r\n function b64toBlob(dataURI: string) {\r\n const d = dataURI.split(',');\r\n const byteString = atob(d[1]);\r\n const ab = new ArrayBuffer(byteString.length);\r\n const ia = new Uint8Array(ab);\r\n\r\n for (let i = 0; i < byteString.length; i++) {\r\n ia[i] = byteString.charCodeAt(i);\r\n }\r\n const fileType = d[0].replace('data:', '').replace(';base64', '');\r\n\r\n return new Blob([ab], { type: fileType });\r\n }\r\n\r\n if (typeof(fileData) === 'string') {\r\n fileData = b64toBlob(fileData);\r\n }\r\n\r\n data.append('file', fileData, fileName);\r\n\r\n return this.requestQueueService.addRequestToQueue({\r\n id: `${fileName}-post`,\r\n method: 'POST',\r\n url: `${sessionUrl}/${sessionId}/content`,\r\n body: data\r\n });\r\n }\r\n\r\n async getContentData(sessionId: string, fileName: string): Promise {\r\n return this.requestQueueService.addRequestToQueue({\r\n id: `${fileName}-get`,\r\n method: 'GET',\r\n url: `${sessionUrl}/${sessionId}/content/${fileName}`,\r\n responseType: 'blob'\r\n });\r\n }\r\n\r\n //\r\n //\r\n //\r\n async getForm(\r\n formDomainId: string,\r\n formId: number,\r\n formVersion: number,\r\n formCacheId: string): Promise {\r\n\r\n return this.requestQueueService.addRequestToQueue({\r\n id: 'form-get',\r\n method: 'GET',\r\n url: `${formUrl}/${formDomainId}/${formId}/${formVersion}/${formCacheId}`\r\n });\r\n }\r\n\r\n async getElement(\r\n formDomainId: string,\r\n formId: number,\r\n formVersion: number,\r\n formCacheId: string,\r\n elementId: number): Promise {\r\n\r\n return this.requestQueueService.addRequestToQueue({\r\n id: `element-${elementId}`,\r\n method: 'GET',\r\n url: `${formUrl}/${formDomainId}/${formId}/${formVersion}/${formCacheId}/elements/${elementId}`\r\n });\r\n }\r\n\r\n async getResource(\r\n formDomainId: string,\r\n formId: number,\r\n formVersion: number,\r\n formCacheId: string,\r\n resourceId: string,\r\n responseType: ResponseType = 'text'): Promise {\r\n\r\n return this.requestQueueService.addRequestToQueue({\r\n id: `resource-${resourceId}`,\r\n method: 'GET',\r\n responseType,\r\n url: `${formUrl}/${formDomainId}/${formId}/${formVersion}/${formCacheId}/resources/${resourceId}`\r\n });\r\n }\r\n}\r\n","import { IFormSessionModel, ERuntimeState, IResultStartModel, IResultFinishModel, EFormSessionState } from '@hyd-form-provider';\r\nimport { SessionApiService } from './data/session-api.service';\r\nimport { EventEmitter, Injectable } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\nimport { Environment } from '@hyd-lib';\r\n\r\n\r\n@Injectable()\r\nexport class SessionService {\r\n\r\n private _activeSession: IFormSessionModel;\r\n get activeSession() { return this._activeSession; }\r\n\r\n activeSessionId: string;\r\n\r\n activeSessionChanged = new EventEmitter();\r\n sessionError = new EventEmitter();\r\n sessionReady = new Subject();\r\n activeSessionReset = new Subject();\r\n\r\n errorMessage: string;\r\n\r\n cancelPoll: () => void;\r\n\r\n constructor(\r\n private sessionApiService: SessionApiService,\r\n private env: Environment) {\r\n\r\n }\r\n\r\n setActiveSessionId(sessionId: string) {\r\n\r\n this.activeSessionId = sessionId;\r\n delete this._activeSession;\r\n\r\n this.activeSessionReset.next();\r\n delete this.errorMessage;\r\n\r\n this.cancelPoll = this.sessionApiService.pollSessionTillReady(sessionId, (newSession) => {\r\n\r\n this.updateActiveSession(newSession);\r\n delete this.cancelPoll;\r\n }, (error) => {\r\n\r\n if (error.state === ERuntimeState.Complete) {\r\n this.completeSession();\r\n } else {\r\n if (this.env.production) {\r\n this.errorMessage = 'There was an error starting the form session';\r\n } else {\r\n this.errorMessage = error.message;\r\n }\r\n this.sessionError.emit(this.errorMessage);\r\n delete this.cancelPoll;\r\n }\r\n });\r\n }\r\n\r\n async startResult(startResultModel: IResultStartModel) {\r\n\r\n await this.sessionApiService.setResultStart(this.activeSessionId, startResultModel);\r\n this.activeSessionChanged.emit(this.activeSession);\r\n\r\n return Promise.resolve(this.activeSession);\r\n }\r\n\r\n async finishResult(finishResultModel: IResultFinishModel) {\r\n\r\n await this.sessionApiService.setResultFinish(this.activeSessionId, finishResultModel);\r\n this.activeSession.State = EFormSessionState.Complete;\r\n\r\n this.activeSessionChanged.emit(this.activeSession);\r\n\r\n return Promise.resolve(this.activeSession);\r\n }\r\n\r\n completeSession() {\r\n this.sessionApiService.completeSession(this.activeSessionId);\r\n }\r\n\r\n destroy() {\r\n if (this.cancelPoll) {\r\n this.cancelPoll();\r\n }\r\n }\r\n\r\n public updateActiveSession(newSession: IFormSessionModel) {\r\n\r\n this._activeSession = newSession;\r\n\r\n this.activeSessionChanged.emit(this._activeSession);\r\n\r\n if (newSession.RuntimeState === ERuntimeState.Ok) {\r\n this.sessionReady.next(this.activeSession);\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport {\r\n HttpRequest,\r\n HttpHandler,\r\n HttpEvent,\r\n HttpInterceptor,\r\n HttpErrorResponse\r\n} from '@angular/common/http';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport { tap } from 'rxjs/operators';\r\n\r\nimport { SessionService } from '@hyd-lib-form-logic/services/session.service';\r\nimport { LoadingIndicatorService } from '@hyd-lib-form-logic/services/loading-indicator.service';\r\n\r\n@Injectable()\r\nexport class SessionInterceptor implements HttpInterceptor {\r\n\r\n constructor(\r\n public sessionService: SessionService,\r\n private loadingIndicator: LoadingIndicatorService) {\r\n\r\n }\r\n\r\n intercept(request: HttpRequest, next: HttpHandler): Observable> {\r\n\r\n const clientId = sessionStorage.getItem('client-id');\r\n\r\n if (clientId) {\r\n request = request.clone({\r\n setHeaders: {\r\n 'Client-Id': `${clientId}`\r\n }\r\n });\r\n }\r\n\r\n return next.handle(request).pipe(\r\n tap((event: HttpEvent) => {\r\n return event;\r\n }, (error: HttpErrorResponse) => {\r\n if (error.status === 418) {\r\n this.loadingIndicator.hide();\r\n }\r\n })\r\n );\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { SessionService } from '@hyd-lib-form-logic/services/session.service';\r\nimport { SessionApiService } from '@hyd-lib-form-logic/services/data/session-api.service';\r\nimport { FormPath, EMPTY_FORM_PATH } from '../models/form-path.model';\r\n\r\n\r\nexport const FORM_PATH_META_KEY = 'path';\r\n\r\nexport interface IFormPathRepository {\r\n getFormPath(): Promise;\r\n saveFormPath(newPath: FormPath): Promise;\r\n}\r\n\r\n@Injectable()\r\nexport class FormPathRepository implements IFormPathRepository {\r\n\r\n constructor(\r\n private sessionService: SessionService,\r\n private sessionApiService: SessionApiService) { }\r\n\r\n async getFormPath() {\r\n\r\n let path: FormPath = EMPTY_FORM_PATH();\r\n try {\r\n path = await this.sessionApiService.getSessionMeta(this.sessionService.activeSessionId, FORM_PATH_META_KEY);\r\n } catch {}\r\n\r\n return path;\r\n }\r\n\r\n async saveFormPath(newPath: FormPath): Promise {\r\n try {\r\n await this.sessionApiService.updateSessionMeta(this.sessionService.activeSessionId, FORM_PATH_META_KEY, newPath);\r\n } catch {}\r\n\r\n return;\r\n }\r\n}\r\n","export type FormPathStep = number | string;\r\n\r\nexport type IterationId = string;\r\n\r\nexport interface Iteration {\r\n loopId: number;\r\n inline: boolean;\r\n iterationId: IterationId;\r\n parentId: IterationId;\r\n FormPathSteps: FormPathStep[];\r\n}\r\n\r\nexport interface FormPath {\r\n activeIterations: IterationId[];\r\n iterations: { [iterationId: string]: Iteration };\r\n}\r\n\r\nexport function EMPTY_FORM_PATH(): FormPath {\r\n return {\r\n activeIterations: [],\r\n iterations: {\r\n default: { FormPathSteps: [], iterationId: 'default', loopId: -1, parentId: 'default', inline: false }\r\n }\r\n }\r\n};\r\n","import { FormPathRepository } from '@hyd-lib-form-logic/data/repositories/form-path.repository';\r\nimport { SessionService } from '../session.service';\r\nimport { EventEmitter, Injectable } from '@angular/core';\r\nimport { makeId } from '@hyd-lib';\r\nimport { EMPTY_FORM_PATH, FormPathStep, IterationId, Iteration, FormPath } from '@hyd-lib-form-logic/data/models/form-path.model';\r\nimport { IServiceState, ServiceState } from './IServiceState';\r\nimport { BehaviorSubject } from 'rxjs';\r\n\r\n// A formpath containes an array of numbers or strings. If it is a number it points to an element\r\n// If it is a string it points to a loop iteration. That loop iterations path is then found by looking up the iteration map.\r\n//\r\n// All arrays in the form path are 'backwards'. Using unshift/shift to add/remove from the start of the array\r\n// This makes it easier to get the head of the path - it's always at position [0]\r\n\r\n\r\n@Injectable()\r\nexport class FormPathService implements IServiceState {\r\n\r\n private _path = EMPTY_FORM_PATH();\r\n\r\n state = new BehaviorSubject('new');\r\n\r\n get activeStep(): number {\r\n return this._path.iterations[this.activeIterationId].FormPathSteps[0] as number;\r\n }\r\n\r\n get activeIterations(): IterationId[] {\r\n return this._path.activeIterations;\r\n }\r\n\r\n get activeIterationId(): IterationId {\r\n if (this._path.activeIterations.length > 0) {\r\n return this._path.activeIterations[0];\r\n }\r\n\r\n return 'default';\r\n }\r\n\r\n get activeIteration(): Iteration {\r\n return this._path.iterations[this.activeIterationId];\r\n }\r\n\r\n pathChanged: EventEmitter = new EventEmitter();\r\n\r\n constructor(\r\n private sessionService: SessionService,\r\n private formPathRepository: FormPathRepository\r\n ) {\r\n\r\n this.sessionService.activeSessionReset.subscribe(() => {\r\n this._reset();\r\n });\r\n\r\n this.sessionService.sessionReady.subscribe(newSession => {\r\n this._getPath();\r\n });\r\n }\r\n\r\n getIteration(iterationId: IterationId): Iteration {\r\n return this._path.iterations[iterationId];\r\n }\r\n\r\n setPath(newPath: FormPath) {\r\n if (newPath) {\r\n this._path = newPath;\r\n this.pathChanged.emit(this.activeStep);\r\n }\r\n this.state.next('ready');\r\n }\r\n\r\n startIteration(loopId: number, iterationId: IterationId, inline = false): IterationId {\r\n\r\n if (!iterationId) {\r\n iterationId = this._getUniqueIterationId();\r\n }\r\n\r\n this._path.iterations[iterationId] = {\r\n FormPathSteps: [],\r\n iterationId,\r\n loopId,\r\n parentId: this.activeIterationId,\r\n inline\r\n };\r\n\r\n this.pushPath(iterationId);\r\n\r\n return iterationId;\r\n }\r\n\r\n endIteration(action?: 'keep' | 'remove') {\r\n\r\n const iterationId = this._path.activeIterations.shift();\r\n const iteration = this._path.iterations[iterationId];\r\n\r\n // An iteration can be marked as 'inline' so that it stays in the path when completed - This happens with a seamless loop\r\n // When a loop controller is displayed, iterations it creates will be removed from the path once comleted\r\n //\r\n // Except when stepping back through a form - the action will be passed in as a parameter\r\n if (!action) {\r\n action = iteration.inline ? 'keep' : 'remove';\r\n }\r\n\r\n if (action === 'remove') {\r\n this.popPath();\r\n }\r\n }\r\n\r\n popPath(silent = false): FormPathStep {\r\n\r\n if (this.activeIteration.FormPathSteps.length > 0) {\r\n this.activeIteration.FormPathSteps.shift();\r\n }\r\n\r\n // Check to see if the active step is an iterationId\r\n // If it is then it needs to be insterted into the activeIterations array\r\n let i = 0;\r\n while (typeof(this.activeStep) === 'string') {\r\n this._path.activeIterations.splice(i, 0, this.activeStep);\r\n i++;\r\n }\r\n\r\n if (!silent) {\r\n this.pathChanged.emit(this.activeStep);\r\n this._savePath();\r\n }\r\n\r\n return this.activeStep;\r\n }\r\n\r\n pushPath(newPathStep: FormPathStep, quiet = false) {\r\n\r\n if (this.activeStep !== newPathStep) {\r\n\r\n // Put the new path step into the current iteration path\r\n this.activeIteration.FormPathSteps.unshift(newPathStep);\r\n\r\n // If we are starting a new iteration then we need to add it to the activeIterationsArray\r\n let i = 0;\r\n while (typeof(this.activeStep) === 'string') {\r\n this._path.activeIterations.splice(i, 0, this.activeStep);\r\n i++;\r\n }\r\n }\r\n\r\n if (!quiet) {\r\n this.pathChanged.emit(this.activeStep);\r\n }\r\n\r\n this._savePath();\r\n }\r\n\r\n getPreviousElementId(): { elementId: number, iterationId: string } {\r\n\r\n const currentIteration = this._path.iterations[this.activeIterationId];\r\n let elementId: number | string;\r\n let iterationId = this.activeIterationId;\r\n\r\n if (currentIteration.FormPathSteps.length >= 2) {\r\n elementId = currentIteration.FormPathSteps[1];\r\n } else {\r\n elementId = currentIteration.parentId;\r\n }\r\n\r\n while (typeof(elementId) === 'string') {\r\n\r\n const iteration = this._path.iterations[elementId];\r\n iterationId = iteration.iterationId;\r\n\r\n if (!iteration || iteration.FormPathSteps.length === 0) {\r\n elementId = -1;\r\n } else {\r\n elementId = iteration.FormPathSteps[0];\r\n }\r\n }\r\n\r\n return { elementId, iterationId };\r\n }\r\n\r\n private _getUniqueIterationId(): IterationId {\r\n\r\n let iterationId = makeId();\r\n\r\n // Just to make sure we have a unique iterationId\r\n // If we find it's already in use, loop until we get a unique iterationId\r\n while (this._path.iterations[iterationId]) {\r\n iterationId = makeId();\r\n }\r\n\r\n return iterationId;\r\n }\r\n\r\n async _savePath() {\r\n try {\r\n await this.formPathRepository.saveFormPath(this._path);\r\n } catch(err) {\r\n // Ignore any errors saving the path - these are handled by the request queue\r\n }\r\n }\r\n\r\n _reset() {\r\n this._path = EMPTY_FORM_PATH();\r\n this.state.next('new');\r\n }\r\n\r\n _getPath() {\r\n this.state.next('loading');\r\n this.formPathRepository.getFormPath().then(newPath => {\r\n this.setPath(newPath);\r\n this.state.next('ready');\r\n }).catch(e => {\r\n this.setPath(null);\r\n this.state.next('error');\r\n });\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { SessionService } from '@hyd-lib-form-logic/services/session.service';\r\nimport { SessionApiService } from '@hyd-lib-form-logic/services/data/session-api.service';\r\nimport { IFormConfigModel, IElementModel } from '@hyd-form-provider';\r\n\r\nexport interface IFormRepository {\r\n getForm(): Promise;\r\n}\r\n\r\n@Injectable()\r\nexport class FormRepository implements IFormRepository {\r\n\r\n constructor(\r\n private sessionService: SessionService,\r\n private sessionApiService: SessionApiService) { }\r\n\r\n async getForm(): Promise {\r\n\r\n const { FormId, FormVersionId, FormCacheId, FormDomainId } = this.sessionService.activeSession;\r\n\r\n const form = await this.sessionApiService.getForm(FormDomainId, FormId, FormVersionId, FormCacheId);\r\n\r\n return Promise.resolve(form);\r\n }\r\n\r\n async getResource(resourceId: string): Promise {\r\n\r\n }\r\n}\r\n","import { IFormConfigModel, EFormProgressBar, EFormOption } from 'hyd.form.provider';\r\nimport { parseAsBool } from '@hyd-lib';\r\n\r\nexport class FormOptions {\r\n\r\n disableBackButton = false;\r\n progressBar = EFormProgressBar.None;\r\n\r\n constructor(formConfig?: IFormConfigModel) {\r\n if (formConfig) {\r\n this.updateFormOptions(formConfig.Options);\r\n }\r\n }\r\n\r\n updateFormOptions(optionMap: { [key: string]: string }) {\r\n\r\n this.disableBackButton = parseAsBool(optionMap[EFormOption.DisableBackButton], false);\r\n\r\n const progressBarOption = optionMap[EFormOption.ProgressBar] as EFormProgressBar;\r\n if (progressBarOption) {\r\n this.progressBar = progressBarOption;\r\n }\r\n }\r\n}\r\n","import { SessionService } from '../session.service';\r\nimport { FormRepository } from '@hyd-lib-form-logic/data/repositories/form.repository';\r\nimport { IFormConfigModel, EFormOption, IElementTreeNodeModel, EElementType } from '@hyd-form-provider';\r\nimport { EventEmitter, Injectable } from '@angular/core';\r\nimport { IServiceState, ServiceState } from './IServiceState';\r\nimport { BehaviorSubject } from 'rxjs';\r\nimport { FormOptions } from '@hyd-lib-form-logic/data/models/form-options.model';\r\n\r\ninterface INodeInfo {\r\n node: IElementTreeNodeModel;\r\n index: number;\r\n parentNodeId: number;\r\n}\r\n\r\n@Injectable()\r\nexport class FormService implements IServiceState {\r\n\r\n private _form: IFormConfigModel;\r\n get activeForm() { return this._form; }\r\n\r\n // Map for easy lookup to get the next nodeId for a given nodeId\r\n private _nextNodeMap = new Map();\r\n // Map for easy lookup of a node given a nodeId, saves having to traverse tree looking for it\r\n private _nodeMap = new Map();\r\n\r\n state = new BehaviorSubject('new');\r\n\r\n activeFormUpdated = new EventEmitter();\r\n\r\n options = new FormOptions();\r\n\r\n constructor(\r\n private sessionService: SessionService,\r\n private formRepository: FormRepository\r\n ) {\r\n\r\n // Listen for session reset\r\n this.sessionService.activeSessionReset.subscribe(() => {\r\n this._reset();\r\n });\r\n\r\n // listen for session ready\r\n this.sessionService.sessionReady.subscribe(newState => {\r\n this._getForm();\r\n });\r\n }\r\n\r\n getFormOption(option: EFormOption) {\r\n return this._form.Options[option];\r\n }\r\n\r\n getFirstFormElementNode() {\r\n\r\n if (!this._form) {\r\n throw new Error('Form not ready');\r\n }\r\n\r\n if (this._form.ElementTree.Root.length === 0) {\r\n throw new Error('Form has no elements');\r\n }\r\n\r\n return this._form.ElementTree.Root[0];\r\n }\r\n\r\n getNextElementNode(elementId: number) {\r\n return this._nextNodeMap.get(elementId);\r\n }\r\n\r\n getNode(elementId: number) {\r\n return this._nodeMap.get(elementId);\r\n }\r\n\r\n getProgress(elementId: number): number {\r\n\r\n let node = this.getNode(elementId);\r\n while (node.parentNodeId !== -1) {\r\n node = this.getNode(node.parentNodeId);\r\n }\r\n\r\n if (node.index === 0) {\r\n return 0;\r\n }\r\n\r\n const progress = Math.round(node.index / (this._form.ElementTree.Root.length - 1) * 100);\r\n return progress;\r\n }\r\n\r\n private _setForm(newForm: IFormConfigModel) {\r\n\r\n this._form = newForm;\r\n this._updateNodeCache();\r\n\r\n this.options.updateFormOptions(this._form.Options);\r\n\r\n this.state.next('ready');\r\n\r\n this.activeFormUpdated.emit(newForm);\r\n }\r\n\r\n private _reset() {\r\n this._nextNodeMap = new Map();\r\n this._nodeMap = new Map();\r\n delete this._form;\r\n this.state.next('new');\r\n }\r\n\r\n private _getForm() {\r\n\r\n this.state.next('loading');\r\n\r\n this.formRepository.getForm().then(newForm => {\r\n this._setForm(newForm);\r\n }).catch(() => {\r\n this.state.next('error');\r\n });\r\n }\r\n\r\n // Populates the node cache lookup maps\r\n private _updateNodeCache() {\r\n\r\n this._updateNodeTreeCache(this._form.ElementTree.Root, -1);\r\n }\r\n\r\n // Recursive function to populate the node cache lookup maps\r\n private _updateNodeTreeCache(nodeTree: IElementTreeNodeModel[], defaultNextId: number) {\r\n\r\n for (let i = 0; i < nodeTree.length; i++) {\r\n\r\n const thisNode = nodeTree[i];\r\n let nextNodeId = defaultNextId;\r\n\r\n // add node to the lookup map\r\n this._nodeMap.set(thisNode.Id, {\r\n node: thisNode,\r\n index: i,\r\n parentNodeId: defaultNextId\r\n });\r\n\r\n // If there is a next node sequentially, that will become the nextNodeId\r\n // Otherwise it will use the defaultNextId that was passed in\r\n if (i < nodeTree.length - 1) {\r\n nextNodeId = nodeTree[i + 1].Id;\r\n }\r\n\r\n this._nextNodeMap.set(thisNode.Id, nextNodeId);\r\n\r\n // If the node has children, cache their tree too\r\n // The last ndoe in the tree will point back to the parent node\r\n if (thisNode.Nodes) {\r\n this._updateNodeTreeCache(thisNode.Nodes, thisNode.Id);\r\n }\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { SessionApiService } from '@hyd-lib-form-logic/services/data/session-api.service';\r\nimport { SessionService } from '@hyd-lib-form-logic/services/session.service';\r\nimport { IElementModel } from '@hyd-form-provider';\r\n\r\nexport interface IElementRepository {\r\n getElementById(elementId: number): Promise;\r\n}\r\n\r\n@Injectable()\r\nexport class ElementRepository implements IElementRepository {\r\n\r\n constructor(\r\n private sessionService: SessionService,\r\n private sessionApiService: SessionApiService) { }\r\n\r\n async getElementById(elementId: number): Promise {\r\n\r\n const { FormId, FormVersionId, FormCacheId, FormDomainId } = this.sessionService.activeSession;\r\n\r\n return await this.sessionApiService.getElement(FormDomainId, FormId, FormVersionId, FormCacheId, elementId);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { SessionService } from '@hyd-lib-form-logic/services/session.service';\r\nimport { SessionApiService } from '@hyd-lib-form-logic/services/data/session-api.service';\r\nimport { ConditionCache } from '@hyd-lib-form-logic/services/form/conditions.service';\r\n\r\nexport const CONDITIONS_CACHE_META_KEY = 'conditionCache';\r\n\r\nexport interface IConditionsRepository {\r\n getConditions(): Promise;\r\n saveConditions(conditions: ConditionCache): Promise;\r\n}\r\n\r\n@Injectable()\r\nexport class ConditionsRepository implements IConditionsRepository {\r\n\r\n constructor(\r\n private sessionService: SessionService,\r\n private sessionApiService: SessionApiService\r\n ) {\r\n\r\n }\r\n\r\n async getConditions() {\r\n\r\n let conditions: ConditionCache = {};\r\n try {\r\n conditions = await this.sessionApiService.getSessionMeta(this.sessionService.activeSessionId, CONDITIONS_CACHE_META_KEY);\r\n } catch {}\r\n\r\n return conditions;\r\n }\r\n\r\n async saveConditions(conditions: ConditionCache): Promise {\r\n\r\n return await this.sessionApiService.updateSessionMeta(this.sessionService.activeSessionId, CONDITIONS_CACHE_META_KEY, conditions);\r\n }\r\n}\r\n","import {\r\n IConditionModel,\r\n IResponseModel,\r\n ELogicComparator,\r\n INavRuleModel,\r\n ELogicOperator,\r\n ILogicItemModel\r\n} from '@hyd-form-provider';\r\nimport { ConditionsRepository } from '@hyd-lib-form-logic/data/repositories/conditions.repository';\r\nimport { Injectable } from '@angular/core';\r\nimport { SessionService } from '../session.service';\r\nimport { FormPathService } from './form-path.service';\r\nimport { IServiceState, ServiceState } from './IServiceState';\r\nimport { BehaviorSubject, Subscription } from 'rxjs';\r\nimport { ElementController } from '@hyd-lib-form-logic/controllers/elements/ElementController';\r\n\r\n\r\nexport interface ConditionCache {\r\n [id: string]: boolean;\r\n}\r\n\r\n@Injectable()\r\nexport class ConditionsService implements IServiceState {\r\n\r\n dirty = false;\r\n\r\n private _resultSubscriptions: Subscription[] = [];\r\n\r\n private _conditionValueCache: ConditionCache = {};\r\n get conditionValueCache(): ConditionCache {\r\n return this._conditionValueCache;\r\n }\r\n\r\n state = new BehaviorSubject('new');\r\n\r\n constructor(\r\n private sessionService: SessionService,\r\n private conditionsRepo: ConditionsRepository,\r\n private pathService: FormPathService\r\n ) {\r\n\r\n this.sessionService.activeSessionReset.subscribe(newSession => {\r\n this._reset();\r\n });\r\n\r\n this.sessionService.sessionReady.subscribe(newSession => {\r\n this._getConditionCache();\r\n });\r\n }\r\n\r\n private _reset() {\r\n\r\n this.stopWatchingElementControllers();\r\n this._conditionValueCache = {};\r\n this.state.next('new');\r\n }\r\n\r\n private _getConditionCache() {\r\n\r\n this.state.next('loading');\r\n\r\n this.conditionsRepo.getConditions().then((conditions) => {\r\n this._conditionValueCache = conditions;\r\n this.state.next('ready');\r\n }).catch(() => {\r\n this.state.next('error');\r\n });\r\n }\r\n\r\n async saveConditions() {\r\n if (this.dirty) {\r\n\r\n try {\r\n await this.conditionsRepo.saveConditions(this._conditionValueCache);\r\n this.dirty = false;\r\n } catch (err) {\r\n // Ignore any save errors - the request queue will take care of them\r\n }\r\n }\r\n return Promise.resolve();\r\n }\r\n\r\n stopWatchingElementControllers() {\r\n this._resultSubscriptions.forEach(s => s.unsubscribe());\r\n this._resultSubscriptions = [];\r\n }\r\n\r\n watchElementController(ec: ElementController) {\r\n\r\n const { Conditions } = ec.element;\r\n\r\n if ( Conditions ) {\r\n this.evaluateConditions(Conditions, ec.response);\r\n this._resultSubscriptions.push(ec.responseChanged.subscribe(result => {\r\n this.evaluateConditions(Conditions, result);\r\n }))\r\n }\r\n }\r\n\r\n getConditionValue(conditionId: number): boolean | undefined {\r\n\r\n const iterationCount = this.pathService.activeIterations.length;\r\n let currentIteration = 0;\r\n let value: boolean;\r\n\r\n while (currentIteration < iterationCount && typeof(value) === 'undefined') {\r\n const iterationId = this.pathService.activeIterations[currentIteration];\r\n value = this._conditionValueCache[`${conditionId}-${iterationId}`];\r\n currentIteration++;\r\n }\r\n\r\n if (typeof(value) === 'undefined') {\r\n value = this._conditionValueCache[`${conditionId}-default`];\r\n }\r\n\r\n return value;\r\n }\r\n\r\n isRuleActive(rule: INavRuleModel): boolean {\r\n const itemValues = rule.Items.map(i => this.evaluateRuleLogicItem(i));\r\n return itemValues.indexOf(true) !== -1;\r\n }\r\n\r\n evaluateRuleLogicItem(item: ILogicItemModel): boolean {\r\n let childItems: boolean[] = [];\r\n\r\n try {\r\n childItems = item.Items.map(i => this.evaluateRuleLogicItem(i));\r\n } catch {}\r\n\r\n switch (item.Operator) {\r\n case ELogicOperator.And:\r\n return childItems.indexOf(false) === -1;\r\n case ELogicOperator.Or:\r\n return childItems.indexOf(true) !== -1;\r\n case ELogicOperator.Lookup:\r\n return this.getConditionValue(item.Id);\r\n }\r\n }\r\n\r\n invalidateConditions(conditions: IConditionModel[], iterationId = 'default') {\r\n conditions.forEach(condition => {\r\n this.invalidateCondition(condition, iterationId);\r\n });\r\n }\r\n\r\n invalidateCondition(condition: IConditionModel, iterationId = 'default') {\r\n delete this._conditionValueCache[`${condition.Id}-${iterationId}`];\r\n this.dirty = true;\r\n }\r\n\r\n evaluateConditions(\r\n conditions: IConditionModel[],\r\n response: IResponseModel\r\n ) {\r\n conditions.forEach(condition => {\r\n this.evaluateCondition(condition, response);\r\n });\r\n }\r\n\r\n evaluateCondition(condition: IConditionModel, response: IResponseModel) {\r\n let conditionValue = false;\r\n\r\n if (response && response.Values) {\r\n switch (condition.Comparator) {\r\n case ELogicComparator.Selected:\r\n conditionValue = this._evaluateSelectedCondition(condition, response);\r\n break;\r\n case ELogicComparator.Answered:\r\n conditionValue = this._evaluateAnsweredCondition(response);\r\n break;\r\n case ELogicComparator.Between:\r\n conditionValue = this._evaluateBetweenCondition(condition, response);\r\n break;\r\n case ELogicComparator.EqualTo:\r\n conditionValue = this._evaluateEqualsCondition(condition, response);\r\n break;\r\n case ELogicComparator.GreaterThan:\r\n conditionValue = this._evaluateGreaterThanCondition(\r\n condition,\r\n response\r\n );\r\n break;\r\n case ELogicComparator.LessThan:\r\n conditionValue = this._evaluateLessThanCondition(condition, response);\r\n break;\r\n }\r\n\r\n if (condition.Negate) {\r\n conditionValue = !conditionValue;\r\n }\r\n }\r\n\r\n const iterationId = response.ParentId ? response.ParentId : 'default';\r\n\r\n const exisitingValue = this._conditionValueCache[`${condition.Id}-${iterationId}`];\r\n\r\n if (exisitingValue !== conditionValue) {\r\n this.dirty = true;\r\n this._conditionValueCache[`${condition.Id}-${iterationId}`] = conditionValue;\r\n }\r\n }\r\n\r\n private _evaluateSelectedCondition(\r\n condition: IConditionModel,\r\n response: IResponseModel\r\n ): boolean {\r\n const selectedAnswerIds = response.Values.map(r => r.AnswerId);\r\n\r\n return selectedAnswerIds.indexOf(condition.AnswerId) !== -1;\r\n }\r\n\r\n private _evaluateAnsweredCondition(response: IResponseModel): boolean {\r\n return response && response.Values && response.Values.length > 0;\r\n }\r\n\r\n private _evaluateLessThanCondition(\r\n condition: IConditionModel,\r\n response: IResponseModel\r\n ) {\r\n let responseValue: number;\r\n try {\r\n responseValue = parseInt(response.Values[0].Value, 10);\r\n } catch {}\r\n\r\n const compareValue = parseInt(condition.Value, 10);\r\n\r\n if (isNaN(responseValue) || isNaN(compareValue)) {\r\n return false;\r\n }\r\n\r\n if (condition.Includes) {\r\n return responseValue <= compareValue;\r\n } else {\r\n return responseValue < compareValue;\r\n }\r\n }\r\n\r\n private _evaluateGreaterThanCondition(\r\n condition: IConditionModel,\r\n response: IResponseModel\r\n ) {\r\n let responseValue: number;\r\n try {\r\n responseValue = parseInt(response.Values[0].Value, 10);\r\n } catch {}\r\n\r\n const compareValue = parseInt(condition.Value, 10);\r\n\r\n if (isNaN(responseValue) || isNaN(compareValue)) {\r\n return false;\r\n }\r\n\r\n if (condition.Includes) {\r\n return responseValue >= compareValue;\r\n } else {\r\n return responseValue > compareValue;\r\n }\r\n }\r\n\r\n private _evaluateEqualsCondition(\r\n condition: IConditionModel,\r\n response: IResponseModel\r\n ) {\r\n let responseValue: number;\r\n try {\r\n responseValue = parseInt(response.Values[0].Value, 10);\r\n } catch {}\r\n\r\n const compareValue = parseInt(condition.Value, 10);\r\n\r\n if (isNaN(responseValue) || isNaN(compareValue)) {\r\n return false;\r\n }\r\n\r\n return responseValue === compareValue;\r\n }\r\n\r\n private _evaluateBetweenCondition(\r\n condition: IConditionModel,\r\n response: IResponseModel\r\n ) {\r\n let responseValue: number;\r\n try {\r\n responseValue = parseInt(response.Values[0].Value, 10);\r\n } catch {}\r\n\r\n const compareValue = parseInt(condition.Value, 10);\r\n const compareValue2 = parseInt(condition.Value2, 10);\r\n\r\n if (isNaN(responseValue) || isNaN(compareValue) || isNaN(compareValue2)) {\r\n return false;\r\n }\r\n\r\n if (condition.Includes) {\r\n return compareValue <= responseValue && compareValue2 >= responseValue;\r\n } else {\r\n return compareValue < responseValue && compareValue2 > responseValue;\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\nimport { IResponseModel } from '@hyd-form-provider';\r\nimport { SessionApiService } from '../../services/data/session-api.service';\r\nimport { SessionService } from '../../services/session.service';\r\n\r\nexport interface IResponseRepository {\r\n getResponseForElementId(elementId: number, parentId?: string): Promise;\r\n saveResponse(response: IResponseModel, elementId: number): Promise;\r\n}\r\n\r\n@Injectable()\r\nexport class ResponseRepository implements IResponseRepository {\r\n constructor(\r\n private sessionService: SessionService,\r\n private sessionApiService: SessionApiService) {}\r\n\r\n async getResponseForElementId(elementId: number, parentId?: string): Promise {\r\n if (parentId === 'default') {\r\n parentId = undefined;\r\n }\r\n\r\n const responses = await this.sessionApiService.getSessionElementResponse(\r\n this.sessionService.activeSessionId,\r\n elementId,\r\n parentId\r\n );\r\n\r\n return Promise.resolve(responses[0]);\r\n }\r\n\r\n async saveResponse(response: IResponseModel, elementId: number): Promise {\r\n return await this.sessionApiService.updateElementResponse(\r\n this.sessionService.activeSessionId,\r\n elementId,\r\n response\r\n );\r\n }\r\n\r\n async saveContent(fileName: string, fileData: string | Blob): Promise {\r\n return await this.sessionApiService.uploadContentData(\r\n this.sessionService.activeSessionId,\r\n fileName,\r\n fileData\r\n );\r\n }\r\n\r\n async getContent(fileName: string): Promise {\r\n return await this.sessionApiService.getContentData(\r\n this.sessionService.activeSessionId,\r\n fileName\r\n );\r\n }\r\n}\r\n","import { ErrorHandler, Injectable } from '@angular/core';\r\nimport { HttpErrorResponse } from '@angular/common/http';\r\n\r\nimport { environment } from '../environments/environment';\r\n\r\nimport * as Sentry from '@sentry/browser';\r\n\r\nif (environment.production) {\r\n Sentry.init({\r\n dsn: 'https://2b102d18943845b2a268bbbbd3228af0@o71479.ingest.sentry.io/5262396',\r\n // TryCatch has to be configured to disable XMLHttpRequest wrapping, as we are going to handle\r\n // http module exceptions manually in Angular's ErrorHandler and we don't want it to capture the same error twice.\r\n // Please note that TryCatch configuration requires at least @sentry/browser v5.16.0.\r\n integrations: [new Sentry.Integrations.TryCatch({\r\n XMLHttpRequest: false,\r\n })],\r\n release: environment.version,\r\n environment: location.hostname\r\n });\r\n}\r\n\r\n@Injectable()\r\nexport class SentryErrorHandler implements ErrorHandler {\r\n constructor() {}\r\n\r\n extractError(error) {\r\n // Try to unwrap zone.js error.\r\n // https://github.com/angular/angular/blob/master/packages/core/src/util/errors.ts\r\n if (error && error.ngOriginalError) {\r\n error = error.ngOriginalError;\r\n }\r\n\r\n // We can handle messages and Error objects directly.\r\n if (typeof error === 'string' || error instanceof Error) {\r\n return error;\r\n }\r\n\r\n // If it's http module error, extract as much information from it as we can.\r\n if (error instanceof HttpErrorResponse) {\r\n // The `error` property of http exception can be either an `Error` object, which we can use directly...\r\n if (error.error instanceof Error) {\r\n return error.error;\r\n }\r\n\r\n // ... or an`ErrorEvent`, which can provide us with the message but no stack...\r\n if (error.error instanceof ErrorEvent) {\r\n return error.error.message;\r\n }\r\n\r\n // ...or the request body itself, which we can use as a message instead.\r\n if (typeof error.error === 'string') {\r\n return `Server returned code ${error.status} with body \"${error.error}\"`;\r\n }\r\n\r\n // If we don't have any detailed information, fallback to the request message itself.\r\n return error.message;\r\n }\r\n\r\n // Skip if there's no error, and let user decide what to do with it.\r\n return null;\r\n }\r\n\r\n handleError(error) {\r\n const extractedError = this.extractError(error) || 'Handled unknown error';\r\n\r\n // When in development mode, log the error to console for immediate feedback.\r\n if (!environment.production) {\r\n console.error(extractedError);\r\n } else {\r\n // Capture handled exception and send it to Sentry.\r\n const eventId = Sentry.captureException(extractedError);\r\n\r\n // Optionally show user dialog to provide details on what happened.\r\n // Sentry.showReportDialog({ eventId });\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AppBrandComponent } from './app-brand/app-brand.component';\r\nimport { AppIconComponent, PathElement } from './app-icon/app-icon.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n AppBrandComponent,\r\n AppIconComponent,\r\n PathElement\r\n ],\r\n exports: [\r\n AppBrandComponent,\r\n AppIconComponent\r\n ]\r\n})\r\nexport class BrandModule { }\r\n","import { NgModule, ModuleWithProviders } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { HydIconService } from './services/hyd-icon/hyd-icon.service';\r\nimport { BrandModule } from './ui/brand/brand.module';\r\nimport { NbThemeModule, NbIconModule } from '@nebular/theme';\r\nimport { HydThemeRootDirective } from './directives/hyd-theme-root.directive';\r\nimport { HydThemeService } from './services/hyd-theme/hyd-theme.service';\r\nimport { AppIconComponent } from './ui/brand/app-icon/app-icon.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n BrandModule,\r\n NbThemeModule.forRoot({ name: 'default' }),\r\n NbIconModule,\r\n BrandModule\r\n ],\r\n declarations: [\r\n HydThemeRootDirective\r\n ],\r\n exports: [\r\n HydThemeRootDirective,\r\n BrandModule\r\n ],\r\n providers: [\r\n ]\r\n})\r\nexport class HydLibThemeModule {\r\n static forRoot(): ModuleWithProviders {\r\n\r\n return {\r\n ngModule: HydLibThemeModule,\r\n providers: [\r\n HydThemeService,\r\n HydIconService\r\n ]\r\n };\r\n }\r\n}\r\n\r\nexport { AppIconComponent }\r\n","import { ModuleWithProviders, NgModule } from '@angular/core';\r\nimport { HTTP_INTERCEPTORS } from '@angular/common/http';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { HydLibModule } from '@hyd-lib';\r\nimport { FormController } from './controllers/form.controller';\r\nimport { FormViewModel } from './data/models/form.viewmodel';\r\nimport { ConditionsRepository } from './data/repositories/conditions.repository';\r\nimport { ElementRepository } from './data/repositories/element.repository';\r\nimport { FormPathRepository } from './data/repositories/form-path.repository';\r\nimport { FormRepository } from './data/repositories/form.repository';\r\nimport { ResponseRepository } from './data/repositories/response.repository';\r\nimport { ConditionsService } from './services/form/conditions.service';\r\nimport { ElementTransitionService } from './services/form/element-transition.service';\r\nimport { ElementService } from './services/form/element.service';\r\nimport { FormPathService } from './services/form/form-path.service';\r\nimport { FormService } from './services/form/form.service';\r\nimport { ValidationService } from './services/form/validation.service';\r\nimport { LoadingIndicatorService } from './services/loading-indicator.service';\r\nimport { RequestQueueService } from './services/request-queue.service';\r\nimport { ResourceService } from './services/resource.service';\r\nimport { ResponseService } from './services/response.service';\r\nimport { SessionService } from './services/session.service';\r\nimport { SessionApiService } from './services/data/session-api.service';\r\nimport { SessionInterceptor } from './interceptors/session.interceptor';\r\nimport { SessionController } from './controllers/session.controller';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n HydLibModule\r\n ],\r\n providers: [\r\n ]\r\n})\r\nexport class HydLibFormLogicModule {\r\n static forRoot(): ModuleWithProviders {\r\n\r\n return {\r\n ngModule: HydLibFormLogicModule,\r\n providers: [\r\n SessionController,\r\n SessionService,\r\n SessionApiService,\r\n ResourceService,\r\n FormController,\r\n FormViewModel,\r\n FormPathService,\r\n FormPathRepository,\r\n ElementRepository,\r\n FormService,\r\n FormRepository,\r\n ConditionsService,\r\n ConditionsRepository,\r\n ResponseService,\r\n ResponseRepository,\r\n ElementService,\r\n RequestQueueService,\r\n ValidationService,\r\n LoadingIndicatorService,\r\n ElementTransitionService,\r\n {\r\n provide: HTTP_INTERCEPTORS,\r\n useClass: SessionInterceptor,\r\n deps: [SessionService, LoadingIndicatorService],\r\n multi: true\r\n }\r\n ]\r\n };\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormNavComponent } from './nav.component';\r\nimport { FormNavButtonComponent } from './nav-button/nav-button.component';\r\nimport { NbButtonModule } from '@nebular/theme';\r\nimport { I18NextModule } from 'angular-i18next';\r\n\r\n@NgModule({\r\n declarations: [\r\n FormNavComponent,\r\n FormNavButtonComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n NbButtonModule,\r\n I18NextModule\r\n ],\r\n exports: [\r\n FormNavComponent,\r\n FormNavButtonComponent\r\n ]\r\n})\r\nexport class FormNavModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormLayoutComponent } from './form-layout.component';\r\nimport { FormContentComponent } from './form-content/form-content.component';\r\nimport { FormNavModule } from './nav/nav.module';\r\nimport { FormProgressBarComponent } from './progress-bar/progress-bar.component';\r\nimport { NbProgressBarModule } from '@nebular/theme';\r\n\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormNavModule,\r\n NbProgressBarModule\r\n ],\r\n declarations: [\r\n FormLayoutComponent,\r\n FormContentComponent,\r\n FormProgressBarComponent\r\n ],\r\n exports: [\r\n FormLayoutComponent,\r\n FormContentComponent,\r\n FormProgressBarComponent,\r\n FormNavModule\r\n ]\r\n})\r\nexport class FormLayoutModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { NbAlertModule, NbIconModule, NbCardModule, NbButtonModule, NbSpinnerModule } from '@nebular/theme';\r\nimport { ElementTextComponent } from './element-text/element-text.component';\r\nimport { HydLibModule } from '@hyd-lib';\r\nimport { ValidationMessageComponent } from './validation-message/validation-message.component';\r\nimport { SessionRestartComponent } from './session-restart/session-restart.component';\r\nimport { ValidationMessageItemComponent } from './validation-message/validation-message-item.component';\r\nimport { ValidationService } from '@hyd-lib-form-logic/services/form/validation.service';\r\nimport { FormFooterComponent } from './footer/footer.component';\r\nimport { ConnectionErrorComponent } from './connection-error/connection-error.component';\r\nimport { ShadowScrollComponent } from './shadow-scroll/shadow-scroll.component';\r\n\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n HydLibModule,\r\n NbAlertModule,\r\n NbIconModule,\r\n NbCardModule,\r\n NbButtonModule,\r\n NbSpinnerModule\r\n ],\r\n declarations: [\r\n ElementTextComponent,\r\n ValidationMessageComponent,\r\n ValidationMessageItemComponent,\r\n SessionRestartComponent,\r\n ConnectionErrorComponent,\r\n FormFooterComponent,\r\n ShadowScrollComponent\r\n ],\r\n exports: [\r\n ElementTextComponent,\r\n ValidationMessageComponent,\r\n SessionRestartComponent,\r\n ConnectionErrorComponent,\r\n FormFooterComponent,\r\n ShadowScrollComponent\r\n ],\r\n entryComponents: [\r\n SessionRestartComponent,\r\n ConnectionErrorComponent\r\n ],\r\n providers: [\r\n ValidationService\r\n ]\r\n})\r\nexport class SharedFormModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { HydLibModule } from '@hyd-lib';\r\n\r\nimport { FinishComponent } from './ui/finish.component';\r\nimport { NbButtonModule, NbSpinnerModule } from '@nebular/theme';\r\nimport { I18NextModule } from 'angular-i18next';\r\n\r\n@NgModule({\r\n declarations: [\r\n FinishComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n HydLibModule,\r\n NbButtonModule,\r\n I18NextModule,\r\n NbSpinnerModule\r\n ],\r\n exports: [\r\n FinishComponent\r\n ]\r\n})\r\nexport class FinishModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { HydLibModule } from '@hyd-lib';\r\n\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\n\r\nimport { StartComponent } from './ui/start.component';\r\nimport { NbButtonModule } from '@nebular/theme';\r\n\r\nimport { I18NextModule } from 'angular-i18next';\r\n\r\n@NgModule({\r\n declarations: [\r\n StartComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n HydLibModule,\r\n NbButtonModule,\r\n I18NextModule\r\n ],\r\n exports: [\r\n StartComponent\r\n ],\r\n entryComponents: [\r\n StartComponent\r\n ]\r\n})\r\nexport class StartModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ActionElementComponent } from './action.component';\r\nimport { StartModule } from './start/start.module';\r\nimport { FinishModule } from './finish/finish.module';\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\nimport { FinishComponent } from './finish/ui/finish.component';\r\nimport { StartComponent } from './start/ui/start.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n ActionElementComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n FinishModule,\r\n StartModule\r\n ],\r\n exports: [\r\n ActionElementComponent\r\n ],\r\n entryComponents: [\r\n FinishComponent,\r\n StartComponent\r\n ]\r\n})\r\nexport class ActionElementModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\nimport { LoopComponent } from './loop/ui/loop.component';\r\nimport { ActionGroupElementComponent } from './action-group.component';\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n ActionGroupElementComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n SharedFormModule\r\n ],\r\n exports: [\r\n ActionGroupElementComponent\r\n ],\r\n entryComponents: [\r\n LoopComponent\r\n ]\r\n})\r\nexport class ActionGroupElementModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { InfoComponent } from './ui/info.component';\r\nimport { HydLibModule } from '@hyd-lib';\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n InfoComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n HydLibModule\r\n ],\r\n exports: [\r\n InfoComponent\r\n ]\r\n})\r\nexport class InformationModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\nimport { DisplayElementComponent } from './display.component';\r\nimport { InfoComponent } from './info/ui/info.component';\r\nimport { InformationModule } from './info/info.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n DisplayElementComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n InformationModule\r\n ],\r\n exports: [\r\n DisplayElementComponent\r\n ],\r\n entryComponents: [\r\n InfoComponent\r\n ]\r\n})\r\nexport class DisplayElementModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\n\r\nimport { LinkedComponent } from './ui/linked.component';\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n LinkedComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n SharedFormModule\r\n ],\r\n exports: [\r\n LinkedComponent\r\n ],\r\n entryComponents: [\r\n LinkedComponent\r\n ]\r\n})\r\nexport class LinkedModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\nimport { DisplayGroupElementComponent } from './display-group.component';\r\nimport { LinkedModule } from './linked/linked.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n DisplayGroupElementComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n LinkedModule\r\n ],\r\n exports: [\r\n DisplayGroupElementComponent\r\n ],\r\n entryComponents: [\r\n DisplayGroupElementComponent\r\n ]\r\n})\r\nexport class DisplayGroupElementModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AnswerBarcodeComponent } from './ui/barcode.component';\r\nimport { NbButtonModule, NbIconModule, NbAlertModule, NbCardModule, NbCheckboxModule, NbInputModule } from '@nebular/theme';\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\nimport { ZXingScannerModule } from '@zxing/ngx-scanner';\r\nimport { I18NextModule } from 'angular-i18next';\r\n\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n NbIconModule,\r\n NbButtonModule,\r\n NbAlertModule,\r\n ZXingScannerModule,\r\n NbCheckboxModule,\r\n NbCardModule,\r\n NbInputModule,\r\n I18NextModule\r\n ],\r\n declarations: [\r\n AnswerBarcodeComponent\r\n ],\r\n exports: [\r\n AnswerBarcodeComponent\r\n ],\r\n entryComponents: [\r\n AnswerBarcodeComponent\r\n ]\r\n})\r\nexport class BarcodeAnswerModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ZXingScannerModule } from '@zxing/ngx-scanner';\r\nimport { BarcodeComponent } from './ui/barcode.component';\r\nimport { HydLibModule } from '@hyd-lib';\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\nimport { NbButtonModule, NbInputModule, NbCardModule, NbIconModule, NbSpinnerModule, NbListModule } from '@nebular/theme';\r\nimport { BarcodeAnswerModule } from '@hyd-lib-form-ui/answers/barcode/barcode.module';\r\nimport { AnswerBarcodeComponent } from '@hyd-lib-form-ui/answers/barcode/ui/barcode.component';\r\nimport { I18NextModule } from 'angular-i18next';\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n BarcodeComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n HydLibModule,\r\n ZXingScannerModule,\r\n NbButtonModule,\r\n NbInputModule,\r\n NbCardModule,\r\n NbIconModule,\r\n NbSpinnerModule,\r\n NbListModule,\r\n BarcodeAnswerModule,\r\n I18NextModule\r\n ],\r\n exports: [\r\n BarcodeComponent\r\n ],\r\n entryComponents: [\r\n AnswerBarcodeComponent\r\n ]\r\n})\r\nexport class BarcodeModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AnswerDateTimeComponent } from './ui/datetime.component';\r\nimport { NbButtonModule, NbIconModule } from '@nebular/theme';\r\n\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\nimport { ValueStepperComponent } from './ui/value-stepper.component';\r\nimport { I18NextModule } from 'angular-i18next';\r\nimport { DateComponent } from './ui/date.component';\r\nimport { TimeComponent } from './ui/time.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n NbButtonModule,\r\n NbIconModule,\r\n I18NextModule\r\n ],\r\n declarations: [\r\n AnswerDateTimeComponent,\r\n ValueStepperComponent,\r\n DateComponent,\r\n TimeComponent\r\n ],\r\n exports: [\r\n AnswerDateTimeComponent\r\n ]\r\n})\r\nexport class DateTimeAnswerModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { DateComponent } from './ui/date.component';\r\nimport { HydLibModule } from '@hyd-lib';\r\nimport { DateTimeAnswerModule } from '@hyd-lib-form-ui/answers/datetime/datetime';\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\n\r\n@NgModule({\r\n declarations: [\r\n DateComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n DateTimeAnswerModule,\r\n HydLibModule\r\n ],\r\n exports: [\r\n DateComponent\r\n ]\r\n})\r\nexport class DateModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { NgSelectModule } from '@ng-select/ng-select';\r\nimport { DropdownComponent } from './ui/dropdown.component';\r\nimport { HydLibModule } from '@hyd-lib';\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\nimport { NbInputModule } from '@nebular/theme';\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n DropdownComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n HydLibModule,\r\n NbInputModule,\r\n NgSelectModule\r\n ],\r\n exports: [\r\n DropdownComponent\r\n ]\r\n})\r\nexport class DropdownModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { GPSComponent } from './ui/gps.component';\r\nimport { HydLibModule } from '@hyd-lib';\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\nimport { NbIconModule, NbButtonModule } from '@nebular/theme';\r\nimport { I18NextModule } from 'angular-i18next';\r\n\r\n@NgModule({\r\n declarations: [\r\n GPSComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n HydLibModule,\r\n NbIconModule,\r\n NbButtonModule,\r\n I18NextModule\r\n ],\r\n exports: [\r\n GPSComponent\r\n ]\r\n})\r\nexport class GPSModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AnswerLikertComponent } from './ui/likert.component';\r\nimport { Ng5SliderModule } from 'ng5-slider';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n Ng5SliderModule\r\n ],\r\n declarations: [\r\n AnswerLikertComponent\r\n ],\r\n exports: [\r\n AnswerLikertComponent\r\n ]\r\n})\r\nexport class LikertAnswerModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AnswerTextComponent } from './ui/text.component';\r\nimport { NbInputModule, NbAlertModule, NbButtonModule, NbIconModule } from '@nebular/theme';\r\n\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { I18NextModule } from 'angular-i18next';\r\nimport { AutosizeModule } from 'ngx-autosize';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n NbIconModule,\r\n NbInputModule,\r\n NbAlertModule,\r\n NbButtonModule,\r\n FormsModule,\r\n I18NextModule,\r\n AutosizeModule\r\n ],\r\n declarations: [\r\n AnswerTextComponent\r\n ],\r\n exports: [\r\n AnswerTextComponent\r\n ]\r\n})\r\nexport class TextAnswerModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AnswerSelectComponent } from './ui/select.component';\r\nimport { NbInputModule, NbAlertModule, NbCheckboxModule, NbRadioModule, NbIconModule } from '@nebular/theme';\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\nimport { TextAnswerModule } from '../text/text.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n NbInputModule,\r\n NbCheckboxModule,\r\n NbRadioModule,\r\n NbAlertModule,\r\n NbIconModule,\r\n TextAnswerModule\r\n ],\r\n declarations: [\r\n AnswerSelectComponent\r\n ],\r\n exports: [\r\n AnswerSelectComponent\r\n ]\r\n})\r\nexport class SelectAnswerModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { IntervalComponent } from './ui/interval.component';\r\nimport { HydLibModule } from '@hyd-lib';\r\n\r\nimport { LikertAnswerModule } from '@hyd-lib-form-ui/answers/likert/likert.module';\r\nimport { SelectAnswerModule } from '@hyd-lib-form-ui/answers/select/select.module';\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\n\r\n@NgModule({\r\n declarations: [\r\n IntervalComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n LikertAnswerModule,\r\n SelectAnswerModule,\r\n HydLibModule\r\n ],\r\n exports: [\r\n IntervalComponent\r\n ]\r\n})\r\nexport class IntervalModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AnswerScaleComponent } from './ui/scale.component';\r\nimport { Ng5SliderModule } from 'ng5-slider';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n Ng5SliderModule\r\n ],\r\n declarations: [\r\n AnswerScaleComponent\r\n ],\r\n exports: [\r\n AnswerScaleComponent\r\n ]\r\n})\r\nexport class ScaleAnswerModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { TextAnswerModule } from './text/text.module';\r\nimport { SelectAnswerModule } from './select/select.module';\r\nimport { ScaleAnswerModule } from './scale/scale.module';\r\n// import { LikertAnswerModule } from './likert/likert.module';\r\n// import { MatrixAnswerModule } from './matrix/matrix.module';\r\n\r\n@NgModule({\r\n declarations: [\r\n ],\r\n imports: [\r\n CommonModule,\r\n TextAnswerModule,\r\n SelectAnswerModule,\r\n ScaleAnswerModule,\r\n // LikertAnswerModule,\r\n // MatrixAnswerModule\r\n ],\r\n exports: [\r\n TextAnswerModule\r\n ]\r\n})\r\nexport class AnswersModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { NbIconModule } from '@nebular/theme';\r\n\r\nimport { SharedFormModule } from '../../shared/shared.module';\r\n\r\nimport { MatrixAnswerComponent } from './ui/matrix.component';\r\nimport { MatrixAnswerCellComponent } from './ui/matrix-cell.component';\r\nimport { Ng5SliderModule } from 'ng5-slider';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n NbIconModule,\r\n NbIconModule,\r\n Ng5SliderModule\r\n ],\r\n declarations: [\r\n MatrixAnswerComponent,\r\n MatrixAnswerCellComponent\r\n ],\r\n exports: [\r\n MatrixAnswerComponent\r\n ]\r\n})\r\nexport class MatrixAnswerModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatrixComponent } from './ui/matrix.component';\r\nimport { HydLibModule } from '@hyd-lib';\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\nimport { AnswersModule } from '@hyd-lib-form-ui/answers/answers.module';\r\nimport { MatrixAnswerModule } from '@hyd-lib-form-ui/answers/matrix/matrix.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n MatrixComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n AnswersModule,\r\n HydLibModule,\r\n MatrixAnswerModule\r\n ],\r\n exports: [\r\n MatrixComponent\r\n ]\r\n})\r\nexport class MatrixModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AnswerCameraComponent } from './ui/camera.component';\r\nimport { NbButtonModule, NbIconModule, NbAlertModule } from '@nebular/theme';\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\nimport { WebcamModule } from 'ngx-webcam';\r\n\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n NbIconModule,\r\n NbButtonModule,\r\n NbAlertModule,\r\n WebcamModule\r\n ],\r\n declarations: [\r\n AnswerCameraComponent\r\n ],\r\n exports: [\r\n AnswerCameraComponent\r\n ]\r\n})\r\nexport class CameraAnswerModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { PhotoComponent } from './ui/photo.component';\r\nimport { HydLibModule } from '@hyd-lib';\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\nimport { NbButtonModule, NbCardModule, NbIconModule, NbSpinnerModule } from '@nebular/theme';\r\nimport { CameraAnswerModule } from '@hyd-lib-form-ui/answers/camera/camera.module';\r\nimport { I18NextModule } from 'angular-i18next';\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n PhotoComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n HydLibModule,\r\n NbButtonModule,\r\n NbCardModule,\r\n NbIconModule,\r\n NbSpinnerModule,\r\n CameraAnswerModule,\r\n I18NextModule\r\n ],\r\n exports: [\r\n PhotoComponent\r\n ]\r\n})\r\nexport class PhotoModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { DragDropModule } from '@angular/cdk/drag-drop';\r\n\r\n\r\nimport { NbInputModule, NbIconModule } from '@nebular/theme';\r\n\r\nimport { RankingComponent } from './ui/ranking.component';\r\nimport { HydLibModule } from '@hyd-lib';\r\n\r\nimport { RankingItemComponent } from './ui/ranking.item.component';\r\nimport { I18NextModule } from 'angular-i18next';\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\n\r\n@NgModule({\r\n declarations: [\r\n RankingComponent,\r\n RankingItemComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n HydLibModule,\r\n NbInputModule,\r\n NbIconModule,\r\n DragDropModule,\r\n I18NextModule\r\n ],\r\n exports: [\r\n RankingComponent\r\n ]\r\n})\r\nexport class RankingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ScaleComponent } from './ui/scale.component';\r\nimport { HydLibModule } from '@hyd-lib';\r\n\r\nimport { ScaleAnswerModule } from '@hyd-lib-form-ui/answers/scale/scale.module';\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\n\r\n@NgModule({\r\n declarations: [\r\n ScaleComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n ScaleAnswerModule,\r\n HydLibModule\r\n ],\r\n exports: [\r\n ScaleComponent\r\n ]\r\n})\r\nexport class ScaleModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { NbAlertModule } from '@nebular/theme';\r\n\r\nimport { SelectComponent } from './ui/select.component';\r\nimport { HydLibModule } from '@hyd-lib';\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\nimport { SelectAnswerModule } from '@hyd-lib-form-ui/answers/select/select.module';\r\n\r\n@NgModule({\r\n declarations: [\r\n SelectComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n HydLibModule,\r\n NbAlertModule,\r\n SelectAnswerModule\r\n ],\r\n exports: [\r\n SelectComponent\r\n ]\r\n})\r\nexport class SelectModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AnswerSignatureComponent } from './ui/signature.component';\r\nimport { NbButtonModule, NbIconModule } from '@nebular/theme';\r\nimport { SignaturePadModule } from 'angular2-signaturepad';\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\n\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n NbIconModule,\r\n NbButtonModule,\r\n SignaturePadModule\r\n ],\r\n declarations: [\r\n AnswerSignatureComponent\r\n ],\r\n exports: [\r\n AnswerSignatureComponent\r\n ]\r\n})\r\nexport class SignatureAnswerModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SignatureComponent } from './ui/signature.component';\r\nimport { HydLibModule } from '@hyd-lib';\r\n\r\n\r\nimport { NbButtonModule, NbSpinnerModule, NbCardModule, NbIconModule } from '@nebular/theme';\r\nimport { AnswerSignatureComponent } from '@hyd-lib-form-ui/answers/signature/ui/signature.component';\r\nimport { I18NextModule } from 'angular-i18next';\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\nimport { SignatureAnswerModule } from '@hyd-lib-form-ui/answers/signature/signature.module';\r\n\r\n@NgModule({\r\n declarations: [\r\n SignatureComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n HydLibModule,\r\n NbButtonModule,\r\n NbCardModule,\r\n NbSpinnerModule,\r\n NbIconModule,\r\n SignatureAnswerModule,\r\n I18NextModule\r\n ],\r\n exports: [\r\n SignatureComponent\r\n ],\r\n entryComponents: [\r\n AnswerSignatureComponent\r\n ]\r\n})\r\nexport class SignatureModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { TextComponent } from './ui/text.component';\r\nimport { HydLibModule } from '@hyd-lib';\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\nimport { TextAnswerModule } from '@hyd-lib-form-ui/answers/text/text.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n TextComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n TextAnswerModule,\r\n HydLibModule\r\n ],\r\n exports: [\r\n TextComponent\r\n ]\r\n})\r\nexport class TextModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\nimport { QuestionElementComponent } from './question.component';\r\nimport { BarcodeComponent } from './barcode/ui/barcode.component';\r\nimport { BarcodeModule } from './barcode/barcode.module';\r\nimport { DateModule } from './date/date.module';\r\nimport { DateComponent } from './date/ui/date.component';\r\nimport { GPSModule } from './gps/gps.module';\r\nimport { GPSComponent } from './gps/ui/gps.component';\r\nimport { IntervalModule } from './interval/interval.module';\r\nimport { IntervalComponent } from './interval/ui/interval.component';\r\nimport { MatrixModule } from './matrix/matrix.module';\r\nimport { MatrixComponent } from './matrix/ui/matrix.component';\r\nimport { PhotoModule } from './photo/photo.module';\r\nimport { PhotoComponent } from './photo/ui/photo.component';\r\nimport { RankingModule } from './ranking/ranking.module';\r\nimport { RankingComponent } from './ranking/ui/ranking.component';\r\nimport { ScaleModule } from './scale/scale.module';\r\nimport { ScaleComponent } from './scale/ui/scale.component';\r\nimport { SelectModule } from './select/select.module';\r\nimport { SelectComponent } from './select/ui/select.component';\r\nimport { SignatureModule } from './signature/signature.module';\r\nimport { SignatureComponent } from './signature/ui/signature.component';\r\nimport { TextModule } from './text/text.module';\r\nimport { TextComponent } from './text/ui/text.component';\r\nimport { DropdownModule } from './dropdown/dropdown.module';\r\nimport { DropdownComponent } from './dropdown/ui/dropdown.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n QuestionElementComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n BarcodeModule,\r\n DateModule,\r\n DropdownModule,\r\n GPSModule,\r\n IntervalModule,\r\n MatrixModule,\r\n PhotoModule,\r\n RankingModule,\r\n ScaleModule,\r\n SelectModule,\r\n SignatureModule,\r\n TextModule\r\n ],\r\n exports: [\r\n QuestionElementComponent\r\n ],\r\n entryComponents: [\r\n BarcodeComponent,\r\n DateComponent,\r\n DropdownComponent,\r\n GPSComponent,\r\n IntervalComponent,\r\n MatrixComponent,\r\n PhotoComponent,\r\n RankingComponent,\r\n ScaleComponent,\r\n SelectComponent,\r\n SignatureComponent,\r\n TextComponent\r\n ]\r\n})\r\nexport class QuestionElementModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { LoopComponent, LoopIterationComponent } from './ui/loop.component';\r\nimport { HydLibModule } from '@hyd-lib';\r\nimport { SharedFormModule } from '@hyd-lib-form-ui/shared/shared.module';\r\nimport { NbButtonModule, NbListModule, NbIconModule } from '@nebular/theme';\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n LoopComponent,\r\n LoopIterationComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n SharedFormModule,\r\n HydLibModule,\r\n NbButtonModule,\r\n NbListModule,\r\n NbIconModule\r\n ],\r\n exports: [\r\n LoopComponent\r\n ]\r\n})\r\nexport class LoopModule { }\r\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\n\r\nimport { ElementComponent } from './element.component';\r\nimport { SharedFormModule } from '../shared/shared.module';\r\nimport { InformationModule } from './display/info/info.module';\r\nimport { LoopModule } from './action-group/loop/loop.module';\r\nimport { ActionElementModule } from './action/action.module';\r\nimport { QuestionElementModule } from './questions/question.module';\r\nimport { ActionElementComponent } from './action/action.component';\r\nimport { QuestionElementComponent } from './questions/question.component';\r\nimport { ActionGroupElementModule } from './action-group/action-group.module';\r\nimport { DisplayElementModule } from './display/display.module';\r\nimport { ActionGroupElementComponent } from './action-group/action-group.component';\r\nimport { DisplayElementComponent } from './display/display.component';\r\nimport { DisplayGroupElementComponent } from './display-group/display-group.component';\r\nimport { LinkedComponent } from './display-group/linked/ui/linked.component';\r\nimport { DisplayGroupElementModule } from './display-group/display-group.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n ActionElementModule,\r\n ActionGroupElementModule,\r\n DisplayElementModule,\r\n DisplayGroupElementModule,\r\n QuestionElementModule,\r\n InformationModule,\r\n LoopModule,\r\n SharedFormModule\r\n ],\r\n declarations: [\r\n ElementComponent\r\n ],\r\n exports: [\r\n ElementComponent\r\n ],\r\n entryComponents: [\r\n ActionElementComponent,\r\n ActionGroupElementComponent,\r\n DisplayElementComponent,\r\n QuestionElementComponent,\r\n DisplayGroupElementComponent,\r\n LinkedComponent\r\n ]\r\n})\r\nexport class FormElementModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MenuComponent } from './ui/menu.component';\r\nimport { HydLibThemeModule } from '@hyd-lib-theme';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n HydLibThemeModule\r\n ],\r\n declarations: [\r\n MenuComponent\r\n ],\r\n exports: [\r\n MenuComponent\r\n ]\r\n})\r\nexport class MenuModule { }\r\n","import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\r\nimport { FormLayoutModule } from './layout/form-layout.module';\r\nimport { FormComponent } from './form.component';\r\nimport { SharedFormModule } from './shared/shared.module';\r\nimport { NbIconModule, NbButtonModule, NbCardModule } from '@nebular/theme';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SessionApiService } from '@hyd-lib-form-logic/services/data/session-api.service';\r\nimport { MenuModule } from './menu/menu.module';\r\nimport { HydLibThemeModule } from '@hyd-lib-theme';\r\nimport { FormElementModule } from './elements/element.module';\r\nimport { RouterModule } from '@angular/router';\r\nimport { SessionController } from '@hyd-lib-form-logic/controllers/session.controller';\r\nimport { HydLibModule } from '@hyd-lib';\r\nimport { ElementComponent } from './elements/element.component';\r\nimport { ScrollingModule } from '@angular/cdk/scrolling';\r\nimport { NgxSpinnerModule } from 'ngx-spinner';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n FormLayoutModule,\r\n HydLibModule,\r\n HydLibThemeModule,\r\n FormElementModule,\r\n SharedFormModule,\r\n MenuModule,\r\n NbIconModule,\r\n NbButtonModule,\r\n NbCardModule,\r\n ScrollingModule,\r\n NgxSpinnerModule\r\n ],\r\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\r\n providers: [\r\n SessionApiService,\r\n SessionController\r\n ],\r\n declarations: [\r\n FormComponent\r\n ],\r\n exports: [\r\n FormComponent\r\n ],\r\n entryComponents: [\r\n ElementComponent\r\n ]\r\n})\r\nexport class HYDFormModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { HYDFormModule } from './form.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n HYDFormModule\r\n ],\r\n exports: [\r\n HYDFormModule\r\n ]\r\n})\r\nexport class HydLibFormUiModule {}\r\n","/**\n * @fileoverview This file was generated by the Angular template compiler. Do not edit.\n *\n * @suppress {suspiciousCode,uselessCode,missingProperties,missingOverride,checkTypes,extraRequire}\n * tslint:disable\n */\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"./app.module\";\nimport * as i2 from \"./app.component\";\nimport * as i3 from \"../../../../node_modules/@angular/router/router.ngfactory\";\nimport * as i4 from \"../../../../node_modules/@nebular/theme/index.ngfactory\";\nimport * as i5 from \"../../../../libs/hyd-lib-form-ui/src/lib/shared/session-restart/session-restart.component.ngfactory\";\nimport * as i6 from \"../../../../libs/hyd-lib-form-ui/src/lib/shared/connection-error/connection-error.component.ngfactory\";\nimport * as i7 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/action/start/ui/start.component.ngfactory\";\nimport * as i8 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/action/finish/ui/finish.component.ngfactory\";\nimport * as i9 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/action-group/loop/ui/loop.component.ngfactory\";\nimport * as i10 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/display/info/ui/info.component.ngfactory\";\nimport * as i11 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/display-group/linked/ui/linked.component.ngfactory\";\nimport * as i12 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/display-group/display-group.component.ngfactory\";\nimport * as i13 from \"../../../../libs/hyd-lib-form-ui/src/lib/answers/barcode/ui/barcode.component.ngfactory\";\nimport * as i14 from \"../../../../libs/hyd-lib-form-ui/src/lib/answers/signature/ui/signature.component.ngfactory\";\nimport * as i15 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/barcode/ui/barcode.component.ngfactory\";\nimport * as i16 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/date/ui/date.component.ngfactory\";\nimport * as i17 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/dropdown/ui/dropdown.component.ngfactory\";\nimport * as i18 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/gps/ui/gps.component.ngfactory\";\nimport * as i19 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/interval/ui/interval.component.ngfactory\";\nimport * as i20 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/matrix/ui/matrix.component.ngfactory\";\nimport * as i21 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/photo/ui/photo.component.ngfactory\";\nimport * as i22 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/ranking/ui/ranking.component.ngfactory\";\nimport * as i23 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/scale/ui/scale.component.ngfactory\";\nimport * as i24 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/select/ui/select.component.ngfactory\";\nimport * as i25 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/signature/ui/signature.component.ngfactory\";\nimport * as i26 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/text/ui/text.component.ngfactory\";\nimport * as i27 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/action/action.component.ngfactory\";\nimport * as i28 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/action-group/action-group.component.ngfactory\";\nimport * as i29 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/display/display.component.ngfactory\";\nimport * as i30 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/question.component.ngfactory\";\nimport * as i31 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/element.component.ngfactory\";\nimport * as i32 from \"./session/session.component.ngfactory\";\nimport * as i33 from \"./app.component.ngfactory\";\nimport * as i34 from \"./i18next\";\nimport * as i35 from \"angular-i18next\";\nimport * as i36 from \"@angular/common\";\nimport * as i37 from \"@angular/platform-browser\";\nimport * as i38 from \"@angular/animations/browser\";\nimport * as i39 from \"@angular/platform-browser/animations\";\nimport * as i40 from \"@angular/common/http\";\nimport * as i41 from \"../../../../libs/hyd-lib-form-logic/src/lib/services/request-queue.service\";\nimport * as i42 from \"../../../../libs/hyd-lib-form-logic/src/lib/services/data/session-api.service\";\nimport * as i43 from \"../../../../libs/hyd-lib-form-logic/src/lib/services/session.service\";\nimport * as i44 from \"../../../../libs/hyd-lib/src/lib/models/environment\";\nimport * as i45 from \"../../../../libs/hyd-lib-form-logic/src/lib/services/loading-indicator.service\";\nimport * as i46 from \"../../../../libs/hyd-lib-form-logic/src/lib/interceptors/session.interceptor\";\nimport * as i47 from \"@angular/animations\";\nimport * as i48 from \"@nebular/theme\";\nimport * as i49 from \"@angular/cdk/platform\";\nimport * as i50 from \"@angular/cdk/overlay\";\nimport * as i51 from \"@angular/cdk/scrolling\";\nimport * as i52 from \"@angular/cdk/bidi\";\nimport * as i53 from \"@angular/cdk/a11y\";\nimport * as i54 from \"../../../../libs/hyd-lib/src/lib/services/app-version/app-version.service\";\nimport * as i55 from \"@angular/forms\";\nimport * as i56 from \"../../../../libs/hyd-lib-form-logic/src/lib/services/form/validation.service\";\nimport * as i57 from \"@angular/cdk/drag-drop\";\nimport * as i58 from \"ngx-logger\";\nimport * as i59 from \"../../../../libs/hyd-lib-form-logic/src/lib/data/repositories/form-path.repository\";\nimport * as i60 from \"../../../../libs/hyd-lib-form-logic/src/lib/services/form/form-path.service\";\nimport * as i61 from \"../../../../libs/hyd-lib-form-logic/src/lib/data/repositories/form.repository\";\nimport * as i62 from \"../../../../libs/hyd-lib-form-logic/src/lib/services/form/form.service\";\nimport * as i63 from \"../../../../libs/hyd-lib-form-logic/src/lib/data/repositories/element.repository\";\nimport * as i64 from \"../../../../libs/hyd-lib-form-logic/src/lib/services/form/element.service\";\nimport * as i65 from \"../../../../libs/hyd-lib-form-logic/src/lib/data/repositories/conditions.repository\";\nimport * as i66 from \"../../../../libs/hyd-lib-form-logic/src/lib/services/form/conditions.service\";\nimport * as i67 from \"../../../../libs/hyd-lib-form-logic/src/lib/data/repositories/response.repository\";\nimport * as i68 from \"../../../../libs/hyd-lib-form-logic/src/lib/services/response.service\";\nimport * as i69 from \"../../../../libs/hyd-lib-form-logic/src/lib/services/form/element-transition.service\";\nimport * as i70 from \"../../../../libs/hyd-lib-form-logic/src/lib/services/resource.service\";\nimport * as i71 from \"../../../../libs/hyd-lib-form-logic/src/lib/controllers/form.controller\";\nimport * as i72 from \"../../../../libs/hyd-lib-form-logic/src/lib/data/models/form.viewmodel\";\nimport * as i73 from \"../../../../libs/hyd-lib-form-logic/src/lib/controllers/session.controller\";\nimport * as i74 from \"@angular/router\";\nimport * as i75 from \"../../../../libs/hyd-lib-theme/src/lib/services/hyd-icon/hyd-icon.service\";\nimport * as i76 from \"../../../../libs/hyd-lib-theme/src/lib/services/hyd-theme/hyd-theme.service\";\nimport * as i77 from \"./app.errorhandler\";\nimport * as i78 from \"./session/session.component\";\nimport * as i79 from \"../../../../libs/hyd-lib-theme/src/lib/ui/brand/brand.module\";\nimport * as i80 from \"../../../../libs/hyd-lib-theme/src/lib/hyd-lib-theme.module\";\nimport * as i81 from \"../../../../libs/hyd-lib/src/lib/hyd-lib.module\";\nimport * as i82 from \"../../../../libs/hyd-lib-form-logic/src/lib/hyd-lib-form-logic.module\";\nimport * as i83 from \"../../../../libs/hyd-lib-form-ui/src/lib/layout/nav/nav.module\";\nimport * as i84 from \"../../../../libs/hyd-lib-form-ui/src/lib/layout/form-layout.module\";\nimport * as i85 from \"../../../../libs/hyd-lib-form-ui/src/lib/shared/shared.module\";\nimport * as i86 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/action/finish/finish.module\";\nimport * as i87 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/action/start/start.module\";\nimport * as i88 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/action/action.module\";\nimport * as i89 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/action-group/action-group.module\";\nimport * as i90 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/display/info/info.module\";\nimport * as i91 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/display/display.module\";\nimport * as i92 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/display-group/linked/linked.module\";\nimport * as i93 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/display-group/display-group.module\";\nimport * as i94 from \"@zxing/ngx-scanner\";\nimport * as i95 from \"../../../../libs/hyd-lib-form-ui/src/lib/answers/barcode/barcode.module\";\nimport * as i96 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/barcode/barcode.module\";\nimport * as i97 from \"../../../../libs/hyd-lib-form-ui/src/lib/answers/datetime/datetime\";\nimport * as i98 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/date/date.module\";\nimport * as i99 from \"@ng-select/ng-select\";\nimport * as i100 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/dropdown/dropdown.module\";\nimport * as i101 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/gps/gps.module\";\nimport * as i102 from \"ng5-slider\";\nimport * as i103 from \"../../../../libs/hyd-lib-form-ui/src/lib/answers/likert/likert.module\";\nimport * as i104 from \"ngx-autosize\";\nimport * as i105 from \"../../../../libs/hyd-lib-form-ui/src/lib/answers/text/text.module\";\nimport * as i106 from \"../../../../libs/hyd-lib-form-ui/src/lib/answers/select/select.module\";\nimport * as i107 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/interval/interval.module\";\nimport * as i108 from \"../../../../libs/hyd-lib-form-ui/src/lib/answers/scale/scale.module\";\nimport * as i109 from \"../../../../libs/hyd-lib-form-ui/src/lib/answers/answers.module\";\nimport * as i110 from \"../../../../libs/hyd-lib-form-ui/src/lib/answers/matrix/matrix.module\";\nimport * as i111 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/matrix/matrix.module\";\nimport * as i112 from \"ngx-webcam\";\nimport * as i113 from \"../../../../libs/hyd-lib-form-ui/src/lib/answers/camera/camera.module\";\nimport * as i114 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/photo/photo.module\";\nimport * as i115 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/ranking/ranking.module\";\nimport * as i116 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/scale/scale.module\";\nimport * as i117 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/select/select.module\";\nimport * as i118 from \"angular2-signaturepad\";\nimport * as i119 from \"../../../../libs/hyd-lib-form-ui/src/lib/answers/signature/signature.module\";\nimport * as i120 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/signature/signature.module\";\nimport * as i121 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/text/text.module\";\nimport * as i122 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/questions/question.module\";\nimport * as i123 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/action-group/loop/loop.module\";\nimport * as i124 from \"../../../../libs/hyd-lib-form-ui/src/lib/elements/element.module\";\nimport * as i125 from \"../../../../libs/hyd-lib-form-ui/src/lib/menu/menu.module\";\nimport * as i126 from \"ngx-spinner\";\nimport * as i127 from \"../../../../libs/hyd-lib-form-ui/src/lib/form.module\";\nimport * as i128 from \"../../../../libs/hyd-lib-form-ui/src/lib/hyd-lib-form-ui.module\";\nimport * as i129 from \"@angular/cdk/portal\";\nvar AppModuleNgFactory = /*@__PURE__*/ i0.ɵcmf(i1.AppModule, [i2.AppComponent], function (_l) { return i0.ɵmod([i0.ɵmpd(512, i0.ComponentFactoryResolver, i0.ɵCodegenComponentFactoryResolver, [[8, [i3.ɵangular_packages_router_router_lNgFactory, i4.NbSpinnerComponentNgFactory, i5.SessionRestartComponentNgFactory, i6.ConnectionErrorComponentNgFactory, i7.StartComponentNgFactory, i8.FinishComponentNgFactory, i9.LoopComponentNgFactory, i10.InfoComponentNgFactory, i11.LinkedComponentNgFactory, i12.DisplayGroupElementComponentNgFactory, i13.AnswerBarcodeComponentNgFactory, i14.AnswerSignatureComponentNgFactory, i15.BarcodeComponentNgFactory, i16.DateComponentNgFactory, i17.DropdownComponentNgFactory, i18.GPSComponentNgFactory, i19.IntervalComponentNgFactory, i20.MatrixComponentNgFactory, i21.PhotoComponentNgFactory, i22.RankingComponentNgFactory, i23.ScaleComponentNgFactory, i24.SelectComponentNgFactory, i25.SignatureComponentNgFactory, i26.TextComponentNgFactory, i27.ActionElementComponentNgFactory, i28.ActionGroupElementComponentNgFactory, i29.DisplayElementComponentNgFactory, i30.QuestionElementComponentNgFactory, i31.ElementComponentNgFactory, i4.NbDialogContainerComponentNgFactory, i32.SessionComponentNgFactory, i33.AppComponentNgFactory]], [3, i0.ComponentFactoryResolver], i0.NgModuleRef]), i0.ɵmpd(5120, i0.LOCALE_ID, i34.localeIdFactory, [i35.I18NEXT_SERVICE]), i0.ɵmpd(4608, i36.NgLocalization, i36.NgLocaleLocalization, [i0.LOCALE_ID]), i0.ɵmpd(5120, i0.ɵangular_packages_core_core_bf, i0.ɵangular_packages_core_core_ba, [i0.NgZone]), i0.ɵmpd(5120, i0.APP_ID, i0.ɵangular_packages_core_core_g, []), i0.ɵmpd(5120, i0.IterableDiffers, i0.ɵangular_packages_core_core_w, []), i0.ɵmpd(5120, i0.KeyValueDiffers, i0.ɵangular_packages_core_core_x, []), i0.ɵmpd(4608, i37.DomSanitizer, i37.ɵDomSanitizerImpl, [i36.DOCUMENT]), i0.ɵmpd(6144, i0.Sanitizer, null, [i37.DomSanitizer]), i0.ɵmpd(4608, i37.HAMMER_GESTURE_CONFIG, i37.HammerGestureConfig, []), i0.ɵmpd(5120, i37.EVENT_MANAGER_PLUGINS, function (p0_0, p0_1, p0_2, p1_0, p2_0, p2_1, p2_2, p2_3) { return [new i37.ɵDomEventsPlugin(p0_0, p0_1, p0_2), new i37.ɵKeyEventsPlugin(p1_0), new i37.ɵHammerGesturesPlugin(p2_0, p2_1, p2_2, p2_3)]; }, [i36.DOCUMENT, i0.NgZone, i0.PLATFORM_ID, i36.DOCUMENT, i36.DOCUMENT, i37.HAMMER_GESTURE_CONFIG, i0.ɵConsole, [2, i37.HAMMER_LOADER]]), i0.ɵmpd(4608, i37.EventManager, i37.EventManager, [i37.EVENT_MANAGER_PLUGINS, i0.NgZone]), i0.ɵmpd(135680, i37.ɵDomSharedStylesHost, i37.ɵDomSharedStylesHost, [i36.DOCUMENT]), i0.ɵmpd(4608, i37.ɵDomRendererFactory2, i37.ɵDomRendererFactory2, [i37.EventManager, i37.ɵDomSharedStylesHost, i0.APP_ID]), i0.ɵmpd(5120, i38.AnimationDriver, i39.ɵangular_packages_platform_browser_animations_animations_a, []), i0.ɵmpd(5120, i38.ɵAnimationStyleNormalizer, i39.ɵangular_packages_platform_browser_animations_animations_b, []), i0.ɵmpd(4608, i38.ɵAnimationEngine, i39.ɵInjectableAnimationEngine, [i36.DOCUMENT, i38.AnimationDriver, i38.ɵAnimationStyleNormalizer]), i0.ɵmpd(5120, i0.RendererFactory2, i39.ɵangular_packages_platform_browser_animations_animations_c, [i37.ɵDomRendererFactory2, i38.ɵAnimationEngine, i0.NgZone]), i0.ɵmpd(6144, i37.ɵSharedStylesHost, null, [i37.ɵDomSharedStylesHost]), i0.ɵmpd(4608, i0.Testability, i0.Testability, [i0.NgZone]), i0.ɵmpd(4608, i40.HttpXsrfTokenExtractor, i40.ɵangular_packages_common_http_http_g, [i36.DOCUMENT, i0.PLATFORM_ID, i40.ɵangular_packages_common_http_http_e]), i0.ɵmpd(4608, i40.ɵangular_packages_common_http_http_h, i40.ɵangular_packages_common_http_http_h, [i40.HttpXsrfTokenExtractor, i40.ɵangular_packages_common_http_http_f]), i0.ɵmpd(4608, i40.ɵangular_packages_common_http_http_d, i40.ɵangular_packages_common_http_http_d, []), i0.ɵmpd(6144, i40.XhrFactory, null, [i40.ɵangular_packages_common_http_http_d]), i0.ɵmpd(4608, i40.HttpXhrBackend, i40.HttpXhrBackend, [i40.XhrFactory]), i0.ɵmpd(6144, i40.HttpBackend, null, [i40.HttpXhrBackend]), i0.ɵmpd(4608, i40.HttpHandler, i40.ɵHttpInterceptingHandler, [i40.HttpBackend, i0.Injector]), i0.ɵmpd(4608, i40.HttpClient, i40.HttpClient, [i40.HttpHandler]), i0.ɵmpd(4608, i41.RequestQueueService, i41.RequestQueueService, [i40.HttpClient]), i0.ɵmpd(4608, i42.SessionApiService, i42.SessionApiService, [i40.HttpClient, i41.RequestQueueService]), i0.ɵmpd(4608, i43.SessionService, i43.SessionService, [i42.SessionApiService, i44.Environment]), i0.ɵmpd(4608, i45.LoadingIndicatorService, i45.LoadingIndicatorService, []), i0.ɵmpd(5120, i40.HTTP_INTERCEPTORS, function (p0_0, p1_0, p1_1) { return [p0_0, new i46.SessionInterceptor(p1_0, p1_1)]; }, [i40.ɵangular_packages_common_http_http_h, i43.SessionService, i45.LoadingIndicatorService]), i0.ɵmpd(4608, i47.AnimationBuilder, i39.ɵBrowserAnimationBuilder, [i0.RendererFactory2, i36.DOCUMENT]), i0.ɵmpd(6144, i48.NB_DOCUMENT, null, [i36.DOCUMENT]), i0.ɵmpd(5120, i48.NB_WINDOW, i48.windowFactory, [i0.PLATFORM_ID]), i0.ɵmpd(4608, i48.NbJSThemesRegistry, i48.NbJSThemesRegistry, [i48.NB_BUILT_IN_JS_THEMES, i48.NB_JS_THEMES]), i0.ɵmpd(4608, i48.NbMediaBreakpointsService, i48.NbMediaBreakpointsService, [i48.NB_MEDIA_BREAKPOINTS]), i0.ɵmpd(4608, i48.NbThemeService, i48.NbThemeService, [i48.NB_THEME_OPTIONS, i48.NbMediaBreakpointsService, i48.NbJSThemesRegistry]), i0.ɵmpd(4608, i48.NbSpinnerService, i48.NbSpinnerService, [i48.NB_DOCUMENT]), i0.ɵmpd(4608, i48.NbLayoutDirectionService, i48.NbLayoutDirectionService, [[2, i48.NB_LAYOUT_DIRECTION]]), i0.ɵmpd(4608, i48.NbLayoutScrollService, i48.NbLayoutScrollService, []), i0.ɵmpd(4608, i48.NbLayoutRulerService, i48.NbLayoutRulerService, []), i0.ɵmpd(135680, i48.NbViewportRulerAdapter, i48.NbViewportRulerAdapter, [i48.NbPlatform, i0.NgZone, i48.NbLayoutRulerService, i48.NbLayoutScrollService]), i0.ɵmpd(135680, i48.NbOverlayContainerAdapter, i48.NbOverlayContainerAdapter, [i36.DOCUMENT, i49.Platform]), i0.ɵmpd(6144, i50.OverlayContainer, null, [i48.NbOverlayContainerAdapter]), i0.ɵmpd(4608, i48.NbOverlayPositionBuilder, i48.NbOverlayPositionBuilder, [i51.ViewportRuler, i36.DOCUMENT, i49.Platform, i50.OverlayContainer]), i0.ɵmpd(4608, i48.NbPositionBuilderService, i48.NbPositionBuilderService, [i48.NB_DOCUMENT, i48.NbViewportRulerAdapter, i48.NbPlatform, i48.NbOverlayPositionBuilder, i48.NbOverlayContainerAdapter]), i0.ɵmpd(4608, i48.NbTriggerStrategyBuilderService, i48.NbTriggerStrategyBuilderService, [i48.NB_DOCUMENT]), i0.ɵmpd(135680, i48.NbScrollDispatcherAdapter, i48.NbScrollDispatcherAdapter, [i0.NgZone, i48.NbPlatform, i48.NbLayoutScrollService]), i0.ɵmpd(6144, i51.ScrollDispatcher, null, [i48.NbScrollDispatcherAdapter]), i0.ɵmpd(4608, i48.NbScrollStrategyOptions, i48.NbScrollStrategyOptions, [i48.NbLayoutScrollService, i51.ScrollDispatcher, i48.NbViewportRulerAdapter, i0.NgZone, i48.NB_DOCUMENT]), i0.ɵmpd(6144, i50.ScrollStrategyOptions, null, [i48.NbScrollStrategyOptions]), i0.ɵmpd(4608, i48.NbOverlay, i48.NbOverlay, [i50.ScrollStrategyOptions, i50.OverlayContainer, i0.ComponentFactoryResolver, i50.OverlayPositionBuilder, i50.OverlayKeyboardDispatcher, i0.Injector, i0.NgZone, i36.DOCUMENT, i52.Directionality, i36.Location, i50.OverlayOutsideClickDispatcher]), i0.ɵmpd(4608, i48.NbOverlayService, i48.NbOverlayService, [i48.NbOverlay, i48.NbLayoutDirectionService]), i0.ɵmpd(4608, i48.NbPositionHelper, i48.NbPositionHelper, [i48.NbLayoutDirectionService]), i0.ɵmpd(4608, i48.NbBlockScrollStrategyAdapter, i48.NbBlockScrollStrategyAdapter, [i48.NB_DOCUMENT, i48.NbViewportRulerAdapter, i48.NbLayoutScrollService]), i0.ɵmpd(6144, i48.NbOverlayContainer, null, [i48.NbOverlayContainerAdapter]), i0.ɵmpd(4608, i48.NbFocusTrapFactoryService, i48.NbFocusTrapFactoryService, [i53.InteractivityChecker, i0.NgZone, i48.NB_DOCUMENT]), i0.ɵmpd(4608, i48.ɵc, i48.ɵc, []), i0.ɵmpd(4608, i48.ɵd, i48.ɵd, []), i0.ɵmpd(4608, i48.NbFocusMonitor, i53.FocusMonitor, [i0.NgZone, i49.Platform, [2, i36.DOCUMENT], [2, i53.FOCUS_MONITOR_DEFAULT_OPTIONS]]), i0.ɵmpd(4608, i54.AppVersionService, i54.AppVersionService, [i44.Environment]), i0.ɵmpd(4608, i55.ɵangular_packages_forms_forms_n, i55.ɵangular_packages_forms_forms_n, []), i0.ɵmpd(4608, i35.I18NextPipe, i35.I18NextPipe, [i35.I18NEXT_SERVICE, i35.I18NEXT_NAMESPACE, i35.I18NEXT_SCOPE]), i0.ɵmpd(4608, i35.I18NextCapPipe, i35.I18NextCapPipe, [i35.I18NEXT_SERVICE, i35.I18NEXT_NAMESPACE, i35.I18NEXT_SCOPE]), i0.ɵmpd(4608, i35.I18NextFormatPipe, i35.I18NextFormatPipe, [i35.I18NEXT_SERVICE]), i0.ɵmpd(4608, i35.I18NextTitle, i35.I18NextTitle, [i35.I18NextPipe, i36.DOCUMENT]), i0.ɵmpd(135680, i35.I18NextEagerPipe, i35.I18NextEagerPipe, [i35.I18NEXT_SERVICE, i35.I18NEXT_NAMESPACE, i35.I18NEXT_SCOPE, i0.ChangeDetectorRef]), i0.ɵmpd(4608, i56.ValidationService, i56.ValidationService, []), i0.ɵmpd(4608, i57.DragDrop, i57.DragDrop, [i36.DOCUMENT, i0.NgZone, i51.ViewportRuler, i57.DragDropRegistry]), i0.ɵmpd(4608, i58.NGXMapperService, i58.NGXMapperService, [i40.HttpBackend]), i0.ɵmpd(4608, i58.NGXLoggerHttpService, i58.NGXLoggerHttpService, [i40.HttpBackend]), i0.ɵmpd(4608, i36.DatePipe, i36.DatePipe, [i0.LOCALE_ID]), i0.ɵmpd(4608, i58.NGXLogger, i58.NGXLogger, [i58.NGXMapperService, i58.NGXLoggerHttpService, i58.LoggerConfig, i0.PLATFORM_ID, i36.DatePipe]), i0.ɵmpd(4608, i59.FormPathRepository, i59.FormPathRepository, [i43.SessionService, i42.SessionApiService]), i0.ɵmpd(4608, i60.FormPathService, i60.FormPathService, [i43.SessionService, i59.FormPathRepository]), i0.ɵmpd(4608, i61.FormRepository, i61.FormRepository, [i43.SessionService, i42.SessionApiService]), i0.ɵmpd(4608, i62.FormService, i62.FormService, [i43.SessionService, i61.FormRepository]), i0.ɵmpd(4608, i63.ElementRepository, i63.ElementRepository, [i43.SessionService, i42.SessionApiService]), i0.ɵmpd(4608, i64.ElementService, i64.ElementService, [i43.SessionService, i63.ElementRepository]), i0.ɵmpd(4608, i65.ConditionsRepository, i65.ConditionsRepository, [i43.SessionService, i42.SessionApiService]), i0.ɵmpd(4608, i66.ConditionsService, i66.ConditionsService, [i43.SessionService, i65.ConditionsRepository, i60.FormPathService]), i0.ɵmpd(4608, i67.ResponseRepository, i67.ResponseRepository, [i43.SessionService, i42.SessionApiService]), i0.ɵmpd(4608, i68.ResponseService, i68.ResponseService, [i43.SessionService, i67.ResponseRepository]), i0.ɵmpd(4608, i69.ElementTransitionService, i69.ElementTransitionService, [i43.SessionService]), i0.ɵmpd(4608, i70.ResourceService, i70.ResourceService, [i43.SessionService, i42.SessionApiService]), i0.ɵmpd(4608, i71.FormController, i71.FormController, [i60.FormPathService, i62.FormService, i64.ElementService, i66.ConditionsService, i68.ResponseService, i69.ElementTransitionService, i43.SessionService, i70.ResourceService, i35.I18NEXT_SERVICE, i58.NGXLogger, i45.LoadingIndicatorService]), i0.ɵmpd(4608, i72.FormViewModel, i72.FormViewModel, [i62.FormService, i69.ElementTransitionService, i43.SessionService]), i0.ɵmpd(4608, i73.SessionController, i73.SessionController, [i43.SessionService, i58.NGXLogger, i71.FormController, i72.FormViewModel, i56.ValidationService]), i0.ɵmpd(4608, i50.Overlay, i50.Overlay, [i50.ScrollStrategyOptions, i50.OverlayContainer, i0.ComponentFactoryResolver, i50.OverlayPositionBuilder, i50.OverlayKeyboardDispatcher, i0.Injector, i0.NgZone, i36.DOCUMENT, i52.Directionality, i36.Location, i50.OverlayOutsideClickDispatcher]), i0.ɵmpd(5120, i50.ɵangular_material_src_cdk_overlay_overlay_e, i50.ɵangular_material_src_cdk_overlay_overlay_f, [i50.Overlay]), i0.ɵmpd(4608, i58.CustomNGXLoggerService, i58.CustomNGXLoggerService, [i58.NGXMapperService, i58.NGXLoggerHttpService, i0.PLATFORM_ID, i36.DatePipe]), i0.ɵmpd(5120, i74.ActivatedRoute, i74.ɵangular_packages_router_router_g, [i74.Router]), i0.ɵmpd(4608, i74.NoPreloading, i74.NoPreloading, []), i0.ɵmpd(6144, i74.PreloadingStrategy, null, [i74.NoPreloading]), i0.ɵmpd(135680, i74.RouterPreloader, i74.RouterPreloader, [i74.Router, i0.NgModuleFactoryLoader, i0.Compiler, i0.Injector, i74.PreloadingStrategy]), i0.ɵmpd(4608, i74.PreloadAllModules, i74.PreloadAllModules, []), i0.ɵmpd(5120, i74.ɵangular_packages_router_router_o, i74.ɵangular_packages_router_router_c, [i74.Router, i36.ViewportScroller, i74.ROUTER_CONFIGURATION]), i0.ɵmpd(5120, i74.ROUTER_INITIALIZER, i74.ɵangular_packages_router_router_j, [i74.ɵangular_packages_router_router_h]), i0.ɵmpd(5120, i0.APP_BOOTSTRAP_LISTENER, function (p0_0) { return [p0_0]; }, [i74.ROUTER_INITIALIZER]), i0.ɵmpd(4608, i75.HydIconService, i75.HydIconService, [i48.NbIconLibraries]), i0.ɵmpd(4608, i76.HydThemeService, i76.HydThemeService, [i36.DOCUMENT, i48.NbThemeService, i54.AppVersionService, i75.HydIconService, i48.NbLayoutDirectionService]), i0.ɵmpd(4608, i48.NbDialogService, i48.NbDialogService, [i48.NB_DOCUMENT, i48.NB_DIALOG_CONFIG, i48.NbPositionBuilderService, i48.NbOverlayService, i0.Injector, i0.ComponentFactoryResolver]), i0.ɵmpd(4608, i35.I18NextService, i35.I18NextService, [i35.I18NEXT_ERROR_HANDLING_STRATEGY]), i0.ɵmpd(5120, i35.I18NEXT_NAMESPACE_RESOLVER, i35.i18nextNamespaceResolverFactory, [i35.I18NEXT_SERVICE]), i0.ɵmpd(1073742336, i36.CommonModule, i36.CommonModule, []), i0.ɵmpd(512, i0.ErrorHandler, i77.SentryErrorHandler, []), i0.ɵmpd(1024, i0.NgProbeToken, function () { return [i74.ɵangular_packages_router_router_b()]; }, []), i0.ɵmpd(512, i74.ɵangular_packages_router_router_h, i74.ɵangular_packages_router_router_h, [i0.Injector]), i0.ɵmpd(512, i35.I18NEXT_ERROR_HANDLING_STRATEGY, i35.NativeErrorHandlingStrategy, []), i0.ɵmpd(512, i35.I18NEXT_SERVICE, i35.I18NextService, [i35.I18NEXT_ERROR_HANDLING_STRATEGY]), i0.ɵmpd(1024, i44.Environment, i1.ɵ0, []), i0.ɵmpd(1024, i0.APP_INITIALIZER, function (p0_0, p1_0, p2_0, p2_1) { return [i37.ɵangular_packages_platform_browser_platform_browser_m(p0_0), i74.ɵangular_packages_router_router_i(p1_0), i34.appInit(p2_0, p2_1)]; }, [[2, i0.NgProbeToken], i74.ɵangular_packages_router_router_h, i35.I18NEXT_SERVICE, i44.Environment]), i0.ɵmpd(512, i0.ApplicationInitStatus, i0.ApplicationInitStatus, [[2, i0.APP_INITIALIZER]]), i0.ɵmpd(131584, i0.ApplicationRef, i0.ApplicationRef, [i0.NgZone, i0.ɵConsole, i0.Injector, i0.ErrorHandler, i0.ComponentFactoryResolver, i0.ApplicationInitStatus]), i0.ɵmpd(1073742336, i0.ApplicationModule, i0.ApplicationModule, [i0.ApplicationRef]), i0.ɵmpd(1073742336, i37.BrowserModule, i37.BrowserModule, [[3, i37.BrowserModule]]), i0.ɵmpd(1024, i74.ɵangular_packages_router_router_a, i74.ɵangular_packages_router_router_e, [[3, i74.Router]]), i0.ɵmpd(512, i74.UrlSerializer, i74.DefaultUrlSerializer, []), i0.ɵmpd(512, i74.ChildrenOutletContexts, i74.ChildrenOutletContexts, []), i0.ɵmpd(256, i74.ROUTER_CONFIGURATION, { initialNavigation: \"enabled\", relativeLinkResolution: \"legacy\" }, []), i0.ɵmpd(1024, i36.LocationStrategy, i74.ɵangular_packages_router_router_d, [i36.PlatformLocation, [2, i36.APP_BASE_HREF], i74.ROUTER_CONFIGURATION]), i0.ɵmpd(512, i36.Location, i36.Location, [i36.LocationStrategy, i36.PlatformLocation]), i0.ɵmpd(512, i0.Compiler, i0.Compiler, []), i0.ɵmpd(512, i0.NgModuleFactoryLoader, i0.SystemJsNgModuleLoader, [i0.Compiler, [2, i0.SystemJsNgModuleLoaderConfig]]), i0.ɵmpd(1024, i74.ROUTES, function () { return [[{ path: \":sessionId\", component: i78.SessionComponent }]]; }, []), i0.ɵmpd(1024, i74.Router, i74.ɵangular_packages_router_router_f, [i74.UrlSerializer, i74.ChildrenOutletContexts, i36.Location, i0.Injector, i0.NgModuleFactoryLoader, i0.Compiler, i74.ROUTES, i74.ROUTER_CONFIGURATION, [2, i74.UrlHandlingStrategy], [2, i74.RouteReuseStrategy]]), i0.ɵmpd(1073742336, i74.RouterModule, i74.RouterModule, [[2, i74.ɵangular_packages_router_router_a], [2, i74.Router]]), i0.ɵmpd(1073742336, i40.HttpClientXsrfModule, i40.HttpClientXsrfModule, []), i0.ɵmpd(1073742336, i40.HttpClientModule, i40.HttpClientModule, []), i0.ɵmpd(1073742336, i39.BrowserAnimationsModule, i39.BrowserAnimationsModule, []), i0.ɵmpd(1073742336, i79.BrandModule, i79.BrandModule, []), i0.ɵmpd(1073742336, i48.NbThemeModule, i48.NbThemeModule, []), i0.ɵmpd(1073742336, i48.NbIconModule, i48.NbIconModule, [i48.NbIconLibraries]), i0.ɵmpd(1073742336, i80.HydLibThemeModule, i80.HydLibThemeModule, []), i0.ɵmpd(1073742336, i81.HydLibModule, i81.HydLibModule, []), i0.ɵmpd(1073742336, i82.HydLibFormLogicModule, i82.HydLibFormLogicModule, []), i0.ɵmpd(1073742336, i55.ɵangular_packages_forms_forms_d, i55.ɵangular_packages_forms_forms_d, []), i0.ɵmpd(1073742336, i55.FormsModule, i55.FormsModule, []), i0.ɵmpd(1073742336, i48.ɵb, i48.ɵb, []), i0.ɵmpd(1073742336, i48.NbButtonModule, i48.NbButtonModule, []), i0.ɵmpd(1073742336, i35.I18NextModule, i35.I18NextModule, []), i0.ɵmpd(1073742336, i83.FormNavModule, i83.FormNavModule, []), i0.ɵmpd(1073742336, i48.NbProgressBarModule, i48.NbProgressBarModule, []), i0.ɵmpd(1073742336, i84.FormLayoutModule, i84.FormLayoutModule, []), i0.ɵmpd(1073742336, i48.NbAlertModule, i48.NbAlertModule, []), i0.ɵmpd(1073742336, i48.NbCardModule, i48.NbCardModule, []), i0.ɵmpd(1073742336, i48.NbSpinnerModule, i48.NbSpinnerModule, []), i0.ɵmpd(1073742336, i85.SharedFormModule, i85.SharedFormModule, []), i0.ɵmpd(1073742336, i86.FinishModule, i86.FinishModule, []), i0.ɵmpd(1073742336, i87.StartModule, i87.StartModule, []), i0.ɵmpd(1073742336, i88.ActionElementModule, i88.ActionElementModule, []), i0.ɵmpd(1073742336, i89.ActionGroupElementModule, i89.ActionGroupElementModule, []), i0.ɵmpd(1073742336, i90.InformationModule, i90.InformationModule, []), i0.ɵmpd(1073742336, i91.DisplayElementModule, i91.DisplayElementModule, []), i0.ɵmpd(1073742336, i92.LinkedModule, i92.LinkedModule, []), i0.ɵmpd(1073742336, i93.DisplayGroupElementModule, i93.DisplayGroupElementModule, []), i0.ɵmpd(1073742336, i94.ZXingScannerModule, i94.ZXingScannerModule, []), i0.ɵmpd(1073742336, i48.NbInputModule, i48.NbInputModule, []), i0.ɵmpd(1073742336, i48.NbListModule, i48.NbListModule, []), i0.ɵmpd(1073742336, i48.NbCheckboxModule, i48.NbCheckboxModule, []), i0.ɵmpd(1073742336, i95.BarcodeAnswerModule, i95.BarcodeAnswerModule, []), i0.ɵmpd(1073742336, i96.BarcodeModule, i96.BarcodeModule, []), i0.ɵmpd(1073742336, i97.DateTimeAnswerModule, i97.DateTimeAnswerModule, []), i0.ɵmpd(1073742336, i98.DateModule, i98.DateModule, []), i0.ɵmpd(1073742336, i99.NgSelectModule, i99.NgSelectModule, []), i0.ɵmpd(1073742336, i100.DropdownModule, i100.DropdownModule, []), i0.ɵmpd(1073742336, i101.GPSModule, i101.GPSModule, []), i0.ɵmpd(1073742336, i102.Ng5SliderModule, i102.Ng5SliderModule, []), i0.ɵmpd(1073742336, i103.LikertAnswerModule, i103.LikertAnswerModule, []), i0.ɵmpd(1073742336, i48.NbRadioModule, i48.NbRadioModule, []), i0.ɵmpd(1073742336, i104.AutosizeModule, i104.AutosizeModule, []), i0.ɵmpd(1073742336, i105.TextAnswerModule, i105.TextAnswerModule, []), i0.ɵmpd(1073742336, i106.SelectAnswerModule, i106.SelectAnswerModule, []), i0.ɵmpd(1073742336, i107.IntervalModule, i107.IntervalModule, []), i0.ɵmpd(1073742336, i108.ScaleAnswerModule, i108.ScaleAnswerModule, []), i0.ɵmpd(1073742336, i109.AnswersModule, i109.AnswersModule, []), i0.ɵmpd(1073742336, i110.MatrixAnswerModule, i110.MatrixAnswerModule, []), i0.ɵmpd(1073742336, i111.MatrixModule, i111.MatrixModule, []), i0.ɵmpd(1073742336, i112.WebcamModule, i112.WebcamModule, []), i0.ɵmpd(1073742336, i113.CameraAnswerModule, i113.CameraAnswerModule, []), i0.ɵmpd(1073742336, i114.PhotoModule, i114.PhotoModule, []), i0.ɵmpd(1073742336, i51.CdkScrollableModule, i51.CdkScrollableModule, []), i0.ɵmpd(1073742336, i57.DragDropModule, i57.DragDropModule, []), i0.ɵmpd(1073742336, i115.RankingModule, i115.RankingModule, []), i0.ɵmpd(1073742336, i116.ScaleModule, i116.ScaleModule, []), i0.ɵmpd(1073742336, i117.SelectModule, i117.SelectModule, []), i0.ɵmpd(1073742336, i118.SignaturePadModule, i118.SignaturePadModule, []), i0.ɵmpd(1073742336, i119.SignatureAnswerModule, i119.SignatureAnswerModule, []), i0.ɵmpd(1073742336, i120.SignatureModule, i120.SignatureModule, []), i0.ɵmpd(1073742336, i121.TextModule, i121.TextModule, []), i0.ɵmpd(1073742336, i122.QuestionElementModule, i122.QuestionElementModule, []), i0.ɵmpd(1073742336, i123.LoopModule, i123.LoopModule, []), i0.ɵmpd(1073742336, i124.FormElementModule, i124.FormElementModule, []), i0.ɵmpd(1073742336, i125.MenuModule, i125.MenuModule, []), i0.ɵmpd(1073742336, i52.BidiModule, i52.BidiModule, []), i0.ɵmpd(1073742336, i49.PlatformModule, i49.PlatformModule, []), i0.ɵmpd(1073742336, i51.ScrollingModule, i51.ScrollingModule, []), i0.ɵmpd(1073742336, i126.NgxSpinnerModule, i126.NgxSpinnerModule, []), i0.ɵmpd(1073742336, i127.HYDFormModule, i127.HYDFormModule, []), i0.ɵmpd(1073742336, i128.HydLibFormUiModule, i128.HydLibFormUiModule, []), i0.ɵmpd(1073742336, i129.PortalModule, i129.PortalModule, []), i0.ɵmpd(1073742336, i50.OverlayModule, i50.OverlayModule, []), i0.ɵmpd(1073742336, i48.NbCdkMappingModule, i48.NbCdkMappingModule, []), i0.ɵmpd(1073742336, i48.NbCdkAdapterModule, i48.NbCdkAdapterModule, []), i0.ɵmpd(1073742336, i48.NbOverlayModule, i48.NbOverlayModule, []), i0.ɵmpd(1073742336, i48.NbDialogModule, i48.NbDialogModule, []), i0.ɵmpd(1073742336, i58.LoggerModule, i58.LoggerModule, []), i0.ɵmpd(1073742336, i1.AppModule, i1.AppModule, []), i0.ɵmpd(256, i0.DEFAULT_CURRENCY_CODE, i0.ɵangular_packages_core_core_bb, []), i0.ɵmpd(256, i0.ɵINJECTOR_SCOPE, \"root\", []), i0.ɵmpd(256, i40.ɵangular_packages_common_http_http_e, \"XSRF-TOKEN\", []), i0.ɵmpd(256, i40.ɵangular_packages_common_http_http_f, \"X-XSRF-TOKEN\", []), i0.ɵmpd(256, i39.ANIMATION_MODULE_TYPE, \"BrowserAnimations\", []), i0.ɵmpd(256, i48.NB_THEME_OPTIONS, { name: \"default\" }, []), i0.ɵmpd(256, i48.NB_BUILT_IN_JS_THEMES, i48.BUILT_IN_THEMES, []), i0.ɵmpd(256, i48.NB_JS_THEMES, [], []), i0.ɵmpd(256, i48.NB_MEDIA_BREAKPOINTS, i48.DEFAULT_MEDIA_BREAKPOINTS, []), i0.ɵmpd(256, i48.NB_LAYOUT_DIRECTION, \"ltr\", []), i0.ɵmpd(256, i35.I18NEXT_NAMESPACE, \"\", []), i0.ɵmpd(256, i35.I18NEXT_SCOPE, \"\", []), i0.ɵmpd(256, i99.SELECTION_MODEL_FACTORY, i99.ɵb, []), i0.ɵmpd(256, i58.LoggerConfig, { level: 5 }, []), i0.ɵmpd(256, i48.NB_DIALOG_CONFIG, { hasBackdrop: true, autoFocus: true }, [])]); });\nexport { AppModuleNgFactory as AppModuleNgFactory };\n\n","import { enableProdMode } from '@angular/core';\r\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\r\n\r\nimport { AppModule } from './app/app.module';\r\nimport { environment } from './environments/environment';\r\n\r\nif (environment.production) {\r\n enableProdMode();\r\n}\r\n\r\nplatformBrowserDynamic()\r\n .bootstrapModule(AppModule)\r\n .catch(err => console.error(err));\r\n"],"sourceRoot":"webpack:///"}