{"version":3,"file":"sm.portal.vm.application.eu.min.js","names":["jQuery","sm","window","portal","extend","vm","euapplication","InitializeSections","application","coreSections","euSections","languagesModel","LanguagesViewModel","accessibilityNeedModel","AccessibilityNeedViewModel","applicationInformationModel","ApplicationInformationViewModel","push","ApplicationSectionModel","AppearanceOrder","SectionName","SectionTitle","utility","getResourceValue","SectionNavTitle","Applied","Completed","Required","SectionModel","SectionTemplate","LastSectionName","filter","e","concat","MoveToNextSection","nextSectionObj","CurrentSectionName","GetSectionModel","ValidateModel","Active","ExtractATO","submitModel","stdAttempt","stdPerson","languageSecData","accessibilityNeedSecData","applicationInformationSecData","basicContactSecData","LanguagesInformation","ko","toJS","AccessibilityNeedsInformation","applicationInformationData","AdmissionsAttemptEUAdditionalInfo","ApplicationInformation","AdmissionsInformation","PermanentMailingAddress","showPermanentMailingAddress","PersonalInformation","Addresses"],"sources":["assets/js/localization/eu/helpers/viewmodels/admissions/sm.portal.vm.application.eu.js"],"mappings":"CAAA,SAAWA,GACP,IAAIC,EAAKC,OAAOD,GAAKC,OAAOD,IAAM,CAAC,OAIV,IAAdA,EAAGE,QACVH,EAAOI,OAAOH,EAAI,CAAEE,OAAQ,CAAC,SAEL,IAAjBF,EAAGE,OAAOE,IACjBL,EAAOI,OAAOH,EAAGE,OAAQ,CAAEE,GAAI,CAAC,SAEM,IAA/BJ,EAAGE,OAAOE,GAAGC,eACpBN,EAAOI,OAAOH,EAAGE,OAAOE,GAAI,CAAEC,cAAe,CAAC,IA2FlDN,EAAOI,QAAO,EAAMH,EAAGE,OAAOE,GAAGC,cAAe,CAC5CC,mBAzFJ,SAA6BC,EAAaC,GACtC,IAAIC,EAAa,GACbC,EAAiB,IAAIV,EAAGE,OAAOE,GAAGO,mBAClCC,EAAyB,IAAIZ,EAAGE,OAAOE,GAAGS,2BAC1CC,EAA8B,IAAId,EAAGE,OAAOE,GAAGW,gCA6CnD,OA3CAN,EAAWO,KAAK,IAAIhB,EAAGE,OAAOE,GAAGa,wBAAwB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AAYU,8BAAgCF,GAAGC,KAAKL,EAAyBL,cAE7E,IAAIY,EAA6BN,EAA8BN,aAS/D,OARAE,EAAWW,kCAAkCpC,KAAKmC,EAA2BE,wBAE7Eb,EAAYc,sBAAwBN,GAAGC,KAAKR,GAEsB,MAA9DK,EAAoBS,0BAA0BhB,eAA8E,IAAtDO,EAAoBU,+BAC1FhB,EAAYiB,oBAAoBC,UAAU1C,KAAK8B,EAAoBS,0BAA0BhB,cAG1FC,CACX,GASH,CA7GD,CA6GGzC","ignoreList":[],"sourcesContent":["(function (jQuery, undefined) {\r\n var sm = window.sm = window.sm || {};\r\n var windowProxy;\r\n var actionQueue = [];\r\n\r\n if (typeof sm.portal === \"undefined\") {\r\n jQuery.extend(sm, { portal: {} });\r\n }\r\n if (typeof sm.portal.vm === \"undefined\") {\r\n jQuery.extend(sm.portal, { vm: {} });\r\n }\r\n if (typeof sm.portal.vm.euapplication === \"undefined\") {\r\n jQuery.extend(sm.portal.vm, { euapplication: {} });\r\n }\r\n\r\n function InitializeSections (application, coreSections) {\r\n var euSections = [] ;\r\n var languagesModel = new sm.portal.vm.LanguagesViewModel();\r\n var accessibilityNeedModel = new sm.portal.vm.AccessibilityNeedViewModel();\r\n var applicationInformationModel = new sm.portal.vm.ApplicationInformationViewModel();\r\n // Languages\r\n euSections.push(new sm.portal.vm.ApplicationSectionModel({\r\n AppearanceOrder: 61,\r\n SectionName: 'Languages',\r\n SectionTitle: sm.portal.utility.getResourceValue('Languages'),\r\n SectionNavTitle: sm.portal.utility.getResourceValue('Languages'),\r\n Applied: true,\r\n Completed: false,\r\n Required: false,\r\n SectionModel: languagesModel,\r\n SectionTemplate: \"LanguagesTemplate\"\r\n }));\r\n\r\n // Accessibility Needs\r\n euSections.push(new sm.portal.vm.ApplicationSectionModel({\r\n AppearanceOrder: 62,\r\n SectionName: 'AccessibilityNeed',\r\n SectionTitle: sm.portal.utility.getResourceValue('AccessibilityNeeds'),\r\n SectionNavTitle: sm.portal.utility.getResourceValue('Accessibility'),\r\n Applied: true,\r\n Required: false,\r\n SectionModel: accessibilityNeedModel,\r\n SectionTemplate: \"AccessibilityNeedTemplate\"\r\n }));\r\n\r\n // Application Information\r\n euSections.push(new sm.portal.vm.ApplicationSectionModel({\r\n AppearanceOrder: 91,\r\n SectionName: 'ApplicationInformation',\r\n SectionTitle: sm.portal.utility.getResourceValue('ApplicationInformation'),\r\n SectionNavTitle: sm.portal.utility.getResourceValue('ApplicationInformation'),\r\n Applied: true,\r\n Required: false,\r\n Completed: true,\r\n SectionModel: applicationInformationModel,\r\n SectionTemplate: \"ApplicationInformationTemplate\"\r\n }));\r\n\r\n application.LastSectionName('ApplicationInformation');\r\n\r\n coreSections = coreSections.filter(function(e) { \r\n return e.SectionName() !== 'College' && e.SectionName() != 'TestScore';\r\n });\r\n\r\n return coreSections.concat(euSections);\r\n }\r\n\r\n function MoveToNextSection(application, nextSectionObj){\r\n if (nextSectionObj != null) {\r\n if (application.CurrentSectionName() === \"Academic\") {\r\n var isValid = application.GetSectionModel('Academic').ValidateModel();\r\n if (isValid) {\r\n nextSectionObj.Active(true);\r\n }\r\n }\r\n }\r\n }\r\n\r\n function ExtractATO(application, submitModel, stdAttempt, stdPerson){\r\n \r\n var languageSecData = application.GetSectionModel('Languages');\r\n var accessibilityNeedSecData = application.GetSectionModel('AccessibilityNeed');\r\n var applicationInformationSecData = application.GetSectionModel('ApplicationInformation');\r\n var basicContactSecData = application.GetSectionModel('BasicContact');\r\n\r\n // Construct the Language ATO object \r\n submitModel.LanguagesInformation= ko.toJS(languageSecData.ExtractATO());\r\n // Construct the Accessibility Need ATO object \r\n submitModel.AccessibilityNeedsInformation = ko.toJS(accessibilityNeedSecData.ExtractATO());\r\n \r\n var applicationInformationData = applicationInformationSecData.ExtractATO();\r\n stdAttempt.AdmissionsAttemptEUAdditionalInfo.push(applicationInformationData.ApplicationInformation);\r\n\r\n submitModel.AdmissionsInformation = ko.toJS(stdAttempt);\r\n\r\n if (basicContactSecData.PermanentMailingAddress().ExtractATO() != null && basicContactSecData.showPermanentMailingAddress() === true) {\r\n submitModel.PersonalInformation.Addresses.push(basicContactSecData.PermanentMailingAddress().ExtractATO());\r\n }\r\n \r\n return submitModel;\r\n }\r\n\r\n\r\n jQuery.extend(true, sm.portal.vm.euapplication, {\r\n InitializeSections: InitializeSections,\r\n MoveToNextSection: MoveToNextSection,\r\n ExtractATO: ExtractATO\r\n });\r\n\r\n})(jQuery);"]}