namespace("awardsCommon.widgets.submissionForm.frontendApi");awardsCommon.widgets.submissionForm.frontendApi.ApplicationNameField=awardsCommon.widgets.formBuilderForm.frontendApi.StatefulFieldBase({_init:function(n){this.isOneTextField=n.model.get("isOneTextField")},_getReadOnlyValueInternal:function(){var t=this.model,n={firstValue:t.get("firstValue")};return this.isOneTextField?n.firstValue:(n.secondValue=t.get("secondValue"),n)},_attachChangeListener:function(n){if(!this.isOneTextField)throw"Change is not supported for Application name with two text fields.";var t=this._getComponent();t.firstValue.on("blur",n)},_detachChangeListener:function(n){if(!this.isOneTextField)throw"Change is not supported for Application name with two text fields.";var t=this._getComponent();t.firstValue.off("blur",n)}});namespace("awardsCommon.widgets.submissionForm.frontendApi");awardsCommon.widgets.submissionForm.frontendApi.ApplicationCategoryField=awardsCommon.widgets.formBuilderForm.frontendApi.StatefulFieldBase({onChange:function(){this._throwMethodIsNotSupported("Change")},offChange:function(){this._throwMethodIsNotSupported("Change")},_prepareValue:function(n){return _.isArray(n)&&(n=this._getView().getCategoryCodeByPath(n)),n},_getReadOnlyValueInternal:function(){return this._getView().getCategoryCodeByPath(this.model.get("selectedPath"))}});namespace("awardsCommon.widgets.submissionForm.frontendApi");awardsCommon.widgets.submissionForm.frontendApi.LetterOfRecommendationField=awardsCommon.widgets.formBuilderForm.frontendApi.StatefulFieldBase({onChange:function(){this._throwMethodIsNotSupported("Change")},offChange:function(){this._throwMethodIsNotSupported("Change")},_getReadOnlyValueInternal:function(){var n=this.model.get("recommendationRequest");return{fullName:n.get("fullName"),email:n.get("email")}},_throwIfValueCantBeSet:function(){if(this.model.get("recommendationRequest").sentHash&&!this._$(".cancelRecommendatorChange").is(":visible"))throw"Recommendator can't be changed because recommendation is already sent.";}});namespace("awardsCommon.widgets.submissionForm.frontendApi");awardsCommon.widgets.submissionForm.frontendApi.FieldFactory=awardsCommon.widgets.formBuilderForm.frontendApi.FieldFactory({_createFieldApi:function(n,t){if(n.isApplicationName())return new awardsCommon.widgets.submissionForm.frontendApi.ApplicationNameField(t);if(n.isApplicationCategory()){if(this.formBuilderForm.model.get("multiCategoryMode")!="None")throw"Frontend API for Application Category field is not supported when multi-category mode is on.";return new awardsCommon.widgets.submissionForm.frontendApi.ApplicationCategoryField(t)}return n.isLetterOfRecommendation()?new awardsCommon.widgets.submissionForm.frontendApi.LetterOfRecommendationField(t):this._super("_createFieldApi",n,t)}});namespace("awardsCommon.widgets.submissionForm.frontendApi");awardsCommon.widgets.submissionForm.frontendApi.Api=awardsCommon.widgets.formBuilderForm.frontendApi.ApiBase({_createFieldFactory:function(){return new awardsCommon.widgets.submissionForm.frontendApi.FieldFactory(this.formBuilderForm)}})