PageSourceSearch

https://www.teacherhorizons.com/angular7/406-es5.db42a5d568148f5e1ee8.js

js teacherhorizons.com collected 2026-10-02 18:16:18 UTC 147,103 bytes, 1 lines download raw bytes

1!function(){"use strict";function e(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}function n(e,t){return(n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var o=i(this).constructor;n=Reflect.construct(a,arguments,o)}else n=a.apply(this,arguments);return r(this,n)}}function r(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=l(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var a=0,r=function(){};return{s:r,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){c=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(c)throw i}}}}function l(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function p(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}(self.webpackChunkth_front_end_angular=self.webpackChunkth_front_end_angular||[]).push([[406],{6592:function(n,r,i){i.r(r),i.d(r,{TeacherModule:function(){return nl}});var l,c=i(12057),u=i(24751),d=i(1091),f=i(77079),h=i(51679),m=i(92636),v=i(45435),g=i(93342),b=i(74788),x=i(25917),T=i(35758),Z=i(5304),y=i(88002),A=i(47349),w=i(58497),N=i(634),O=i(30801),C=((l=function(){function e(t,n){s(this,e),this.adapterHelperService=t,this.listAdapterHelperService=n,this.internationalExperiences=[{id:2,name:"IB experience"},{id:3,name:"Taught at an international school"},{id:4,name:"IB and international experience"},{id:1,name:"No IB nor international experience yet"}]}return p(e,[{key:"adapt",value:function(e){if(e){var t=this.listAdapterHelperService.adaptRegionalEntities(e),n=t.regions,a=t.countries,r=t.cities;return{accreditations:e.accreditations.map(function(e){return{id:e.id,name:e.type}}),ageLevels:e.ageLevels,applicationEventTypes:e.applicationEventTypes,applicationStatuses:e.applicationStatuses,applicationThMatchTypes:e.applicationThMatchTypes,badges:e.userTeacherBadges,cities:r,computerSkills:e.skills.filter(function(e){return 1===e.type}),countries:a,documentTypes:e.documentTypes,curriculums:e.curriculums,educationLevels:e.educationLevels,internationalExperiences:this.internationalExperiences,jobSeekingStatuses:e.jobSeekingStatuses,languages:e.languages,maritalStatuses:e.maritalStatuses,nationalities:e.nationalities,nationalitiesAll:e.nationalitiesAll,noteTypes:e.adminNoteTypes,preferenceOptions:e.preferenceOptions,regions:n,roles:e.roles,subjects:e.subjects,teachingSkills:e.skills.filter(function(e){return 2===e.type}),additionalPhotoCategories:e.userTeacherAdditionalPhotoCategoryIds,videoCategories:e.userTeacherVideoUrlCategoryIds,userTypes:e.userTypes,yesNo:e.yesNo}}}},{key:"adaptReferenceLists",value:function(e){return{formFields:e.formFields,referenceTypes:e.referenceTypes,referenceStatuses:e.referenceStatuses}}}]),e}
1()).\u0275fac=function(e){return new(e||l)(b.LFG(N.G),b.LFG(O.M))},l.\u0275prov=b.Yz7({token:l,factory:l.\u0275fac,providedIn:"root"}),l),k=function(){function e(t){s(this,e),this.value=t}return p(e,[{key:"hasValue",value:function(){var e=this.value;return null!=e&&""!==e&&("object"!=typeof e||e instanceof Date||Object.keys(e).length>0)}}]),e}(),q=function(){function e(t){s(this,e),this.fields=t,this.calculatePropertyValues()}return p(e,[{key:"update",value:function(){this.calculatePropertyValues()}},{key:"calculatePropertyValues",value:function(){this.isEmpty=this.fields.every(function(e){return!e.hasValue()})}}]),e}(),I=i(80585),S=i(90702),Y=function(){function e(t){var n=this;s(this,e),this.values=t,this.addFavourite=function(){var e={accessNotPermitted:"You need to sign in to be able to save favourites."};n.httpClient.post("/v2/candidates/favourites/add?member-numbers=".concat(n.memberNumber),{}).pipe((0,Z.K)(function(t){return n.apiErrorService.handleSecondaryApiError(t,e),(0,x.of)(t)})).subscribe(function(e){1==+(null==e?void 0:e.status)&&(n.isFavourite=!0)})},this.removeFavourite=function(){n.httpClient.post("/v2/candidates/favourites/remove?member-numbers=".concat(n.memberNumber),{}).pipe((0,Z.K)(function(e){return n.apiErrorService.handleSecondaryApiError(e),(0,x.of)(e)})).subscribe(function(e){1==+(null==e?void 0:e.status)&&(n.isFavourite=!1)})},Object.assign(this,this.values),this.apiErrorService=S.T.angularInjector.get(I.D),this.httpClient=S.T.angularInjector.get(w.eN)}return p(e,[{key:"updateField",value:function(e,t){}},{key:"createFieldGroup",value:function(e){var t=this,n=e.map(function(e){return new k(t[e])});return new q(n)}}]),e}(),U=i(47315),_=function(){function e(t,n,a,r,i,o,l,c,u,p,d,f,h,m){s(this,e),this.employmentRecordId=t,this.isInternationalSchool=n,this.employerName=a,this.country=r,this.role=i,this.subjects=o,this.startDate=l,this.endDate=c,this.allowDisplay=u,this.schoolId=p,this.schoolUrl=d,this.schoolBadgeImageUrl=f,this.city=h,this.schoolAccreditations=m,this.dateService=new U.Ru,this.setDerivedValues()}return p(e,[{key:"setDerivedValues",value:function(){var e=this.dateService.offsetByPeriods(this.endDate||new Date,1,"day");this.duration=this.dateService.getDuration(this.startDate,e)}}]),e}(),J=function(){var e=function(){function e(t){s(this,e),this.adapterHelper=t}return p(e,[{key:"adapt",value:function(e,t){if(e){var n=this.adapterHelper,a=e.schoolId?e.schoolName:e.employerName,r=e.schoolId?e.schoolCountryId:e.countryId,i=e.schoolSlug?"/schools/"+e.schoolSlug:void 0;return new _(e.employmentRecordId,n.adaptBoolean(e.isInternationalSchool),a,n.getListItemById(t.countries,r),n.getListItemById(t.roles,e.teachingPositionId),n.getListItemsByIds(t.subjects,e.subjectIds||[]),n.adaptDate(e.startDate),n.adaptDate(e.endDate),n.adaptBoolean(e.allowDisplay),e.schoolId,i,e.schoolBadgeImageUrl,n.getListItemById(t.cities,e.schoolCityId),n.filterListByIds(t.accreditations,e.schoolAccreditationIds||[]))}}}]),e}();return e.\u0275fac=function(t){return new(t||e)(b.LFG(N.G))},e.\u0275prov=b.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),Q=p(function e(t,n,a,r,i,o){s(this,e),this.id=t,this.category=n,this.fileExtension=a,this.url=r,this.label=i,this.addedDate=o}),E=function(){var e=function(){function e(t){s(this,e),this.adapterHelper=t}return p(e,[{key:"adapt",value:function(e,t,n){if(e){var a=this.adapterHelper,r=e.materialsId;return new Q(e.id,a.getListItemById(t.documentTypes,e.typeId),e.name.split(".").pop(),"/th/api/teachers/".concat(n,"/download/").concat(r),e.name,a.adaptDate(e.addedDate))}}}]),e}();return e.\u0275fac=function(t){return new(t||e)(b.LFG(N.G))},e.\u0275prov=b.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),F=function(){function e(t,n,a,r){var i=this;s(this,e),this.id=t,this.category=n,this.urlPathComponent=a,this.label=r,this.setDerivedValues=function(){i.derivedCaption=i.deriveCaption(i.category,i.label)},this.setDerivedValues()}return p(e,[{key:"deriveCaption",value:function(e,t){return(e?e.name:"")+(e&&t?" - ":"")+(null!=t?t:"")}}]),e}(),L=function(){var e=function(){function e(t){s(this,e),this.adapterHelper=t}return p(e,[{key:"adapt",value:function(e,t){if(e)return new F(e.teacherImageId,this.adapterHelper.getListItemById(t.additionalPhotoCategories,e.teacherAdditionalPhotoCategoryId),e.urlPathComponent,e.caption)}}]),e}();
1return e.\u0275fac=function(t){return new(t||e)(b.LFG(N.G))},e.\u0275prov=b.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),M=function(){function e(t,n,a,r){var i=this;s(this,e),this.id=t,this.category=n,this.embedUrl=a,this.label=r,this.setDerivedValues=function(){i.derivedCaption=i.deriveCaption(i.category,i.label)},this.setDerivedValues()}return p(e,[{key:"deriveCaption",value:function(e,t){return(e?e.name:"")+(e&&t?" - ":"")+(null!=t?t:"")}}]),e}(),P=function(){var e=function(){function e(t){s(this,e),this.adapterHelper=t}return p(e,[{key:"adapt",value:function(e,t){if(e)return new M(e.videoUrlId,this.adapterHelper.getListItemById(t.videoCategories,e.videoUrlCategoryId),e.url,e.caption)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(b.LFG(N.G))},e.\u0275prov=b.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),R=p(function e(t,n,a,r,i,o,l,c,u,p,d,f){s(this,e),this.referenceId=t,this.referenceType=n,this.refereeName=a,this.refereeOrganisationName=r,this.refereePosition=i,this.refereeEmail=o,this.refereePhone=l,this.referenceFileUri=c,this.status=u,this.completionDate=p,this.score=d,this.formData=f}),j=p(function e(t,n,a){s(this,e),this.name=t,this.headers=n,this.questionResponses=a}),D=p(function e(t,n,a,r){s(this,e),this.question=t,this.response=n,this.index=a,this.type=r}),B=function(){var e=function(){function e(){s(this,e)}return p(e,[{key:"adapt",value:function(e,t,n){var a,r,i=[],l=o(t);try{var c=function(){var t=r.value;if(!(t.rank<=e.rank)){if("table"===t.type)return"break";if("table-headers"===t.type&&(a=t.value.split(",")),["table-row","textarea"].includes(t.type)){var o=n.find(function(e){return e.formFieldId===t.formFieldId});if(o){var l=a.findIndex(function(e){return e===o.value});i.push(new D(t.attribute,o.value,l,t.type))}else i.push(new D(t.attribute,"No",void 0,t.type))}}};for(l.s();!(r=l.n()).done;){if("break"===c())break}}catch(s){l.e(s)}finally{l.f()}return new j(e.value,a,i)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=b.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),V=function(){var e=function(){function e(t,n){s(this,e),this.adapterHelper=t,this.formSectionAdapter=n}return p(e,[{key:"adapt",value:function(e,t){if(e){var n,a=this.adapterHelper,r=a.getListItemById;if(e.formSubmission){var i=e.formSubmission.formId,o=t.formFields.filter(function(e){return e.formId===i}),l=o.sort(function(e,t){return e.rank>t.rank?1:-1}),c=o.filter(function(e){return"table"===e.type});n={sections:a.adaptList(c,this.formSectionAdapter,l,e.formSubmission.formSubmissionData)}}var s=e.refereeInstitution?e.refereeInstitution:e.schoolName;return new R(e.referenceId,r(t.referenceTypes,e.refereeTypeId||e.referenceTypeId),e.refereeName,s,e.refereePosition,e.refereeEmail,e.refereePhone,e.referenceFileUri,r(t.referenceStatuses,e.statusId),a.adaptDate(this.getCompletionDate(e)),e.score,n)}}},{key:"getCompletionDate",value:function(e){return 3!==e.statusId?void 0:e.completionDate?e.completionDate:e.submissionDate}}]),e}();return e.\u0275fac=function(t){return new(t||e)(b.LFG(N.G),b.LFG(B))},e.\u0275prov=b.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),H=p(function e(t){s(this,e),this.values=t,Object.assign(this,this.values)}),G=function(){var e=function(){function e(t){s(this,e),this.adapterHelper=t,this.adaptSaveEvent=function(e,t){return{fullName:"".concat(e.firstName," ").concat(e.lastName),date:t}}}return p(e,[{key:"adapt",value:function(e,t,n){if(e){var a=this.adapterHelper,r={text:e.comment,type:a.getListItemById(t.noteTypes,e.adminNoteTypeId),lastUpdated:this.adaptSaveEvent(e.modifiedByUser,a.adaptDatetime(e.modifiedDate)),created:this.adaptSaveEvent(e.createdByUser,a.adaptDatetime(e.createdDate)),id:e.id,memberNumber:n};return new H(r)}}}]),e}();return e.\u0275fac=function(t){return new(t||e)(b.LFG(N.G))},e.\u0275prov=b.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),W=p(function e(t){s(this,e),this.values=t,Object.assign(this,this.values)}),K=i(57018),$=function(){var e=function(){function e(t,n,a){s(this,e),this.adapterHelper=t,this.httpClient=n,this.jsonApiHelperService=a}return p(e,[{key:"adapt",value:function(e,t){if(e)return new W({id:e.id,date:e.date,notes:e.notes,creationDate:e.creationDate,latestUpdateDate:e.latestUpdateDate,type:e.type,applicationEventStatus:e.applicationEventStatus,email:e.email,creationUser:e.creationUser,latestUpdateUser:e.latestUpdateUser,applicationId:e.applicationId,application:e.application})}}]),e}();
1return e.\u0275fac=function(t){return new(t||e)(b.LFG(N.G),b.LFG(w.eN),b.LFG(K.V))},e.\u0275prov=b.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),z=i(88386),X=function(){var e=function(){function e(t,n,a,r,i,o,l,c,u,p){s(this,e),this.adapterHelper=t,this.employmentRecordAdapter=n,this.documentAdapter=a,this.photoAdapter=r,this.videoAdapter=i,this.referenceAdapter=o,this.adminNoteAdapter=l,this.teacherApplicationEventAdapter=c,this.userService=u,this.jsonApiHelperService=p,this.getIsLookingForChina=function(e){var t,n,a=null===(t=e.lookingForRegionIds)||void 0===t?void 0:t.includes(2),r=null===(n=e.notLookingForCountryIds)||void 0===n?void 0:n.includes(11);return a&&!r},this.cacheBusterTimestamp=function(){return"?"+(new Date).getTime().toString()}}return p(e,[{key:"adapt",value:function(e,t){var n,a,r,i,o;if(t){var l=this.adapterHelper,c=l.filterListByIds,s=l.getListItemById,u=l.getListItemsByIds,p=this.adaptAdminFields(e,t),d={memberNumber:t.memberNumber,firstName:t.firstName,lastName:t.lastName,fullName:t.firstName+" "+t.lastName,photoUrl:"/static/images/member.png"===t.photoUrl?void 0:t.photoUrl+this.cacheBusterTimestamp(),cvUrl:t.cvUrl,email:t.email,phoneNumber:t.phoneNumber,phoneNumberCountry:s(e.countries,t.phoneCodeCountryId),averageReferenceScore:t.averageReferenceScore,numberOfCompletedReferences:t.numberOfCompletedReferences,percentageComplete:t.percentageComplete,latestUpdateDate:l.adaptDate(t.latestUpdateDate),nationalities:c(e.nationalitiesAll,t.nationalityIds),internationalExperience:s(e.internationalExperiences,t.internationalSchoolExperienceId),qualificationCountry:s(e.countries,t.teachingQualificationCountryId),jobSeekingStatus:s(e.jobSeekingStatuses,t.jobSeekingStatusId),availableFromDate:l.adaptDate(t.availableFromDate),partnerMemberNumber:t.partnerMemberNumber,teacherId:t.teacherId,numberOfYearsTeachingExperience:t.numberOfYearsTeachingExperience,discountOnSchoolFeesPreference:s(e.preferenceOptions,null===(n=t.schoolPreferences)||void 0===n?void 0:n.discountOnSchoolFeesPreferenceId),abilityToSavePreference:s(e.preferenceOptions,null===(a=t.schoolPreferences)||void 0===a?void 0:a.abilityToSavePreferenceId),accommodationProvidedPreference:s(e.preferenceOptions,null===(r=t.schoolPreferences)||void 0===r?void 0:r.accommodationProvidedPreferenceId),healthInsuranceProvidedPreference:s(e.preferenceOptions,null===(i=t.schoolPreferences)||void 0===i?void 0:i.healthInsuranceProvidedPreferenceId),professionalDevelopmentSupportPreference:s(e.preferenceOptions,null===(o=t.schoolPreferences)||void 0===o?void 0:o.professionalDevelopmentSupportPreferenceId),neverPotentialRiskToChildren:s(e.yesNo,t.neverPotentialRiskToChildren?t.neverPotentialRiskToChildren:0),neverBehaviouralConcernsTowardsChildren:s(e.yesNo,t.neverBehaviouralConcernsTowardsChildren?t.neverBehaviouralConcernsTowardsChildren:0),curriculumExperience:c(e.curriculums,t.curriculumExperienceIds||[]),completedEducationLevels:c(e.educationLevels,t.completedEducationLevelIds||[]),lookingForRoles:c(e.roles,t.lookingForRoleIds||[]),lookingForSubjects:u(e.subjects,t.lookingForSubjectIds||[]),lookingForCurriculums:c(e.curriculums,t.lookingForCurriculumIds||[]),lookingForAgeLevels:c(e.ageLevels,t.lookingForAgeLevelIds||[]),lookingForRegions:c(e.regions,t.lookingForRegionIds||[]),computerSkills:c(e.computerSkills,t.computerSkillIds||[]),teachingSkills:c(e.teachingSkills,t.teachingSkillIds||[]),fluentLanguages:c(e.languages,t.fluentLanguageIds||[]),currentCountry:s(e.countries,t.currentCountryId),isAvailableForRemoteTeaching:t.availableForRemoteTeaching,lookingForChina:this.getIsLookingForChina(t),badges:this.adaptBadges(e.badges,t.badgeIds),maritalStatus:l.getListItemById(e.maritalStatuses,t.maritalStatusId),birthYear:t.birthYear,numberOfDependentChildren:t.numberOfDependentChildren,isFavourite:l.adaptBoolean(t.isFavourite),admin:p};return new Y(d)}}},{key:"adaptDocumentCategories",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;if(t){var a=this.adapterHelper.adaptList(t,this.documentAdapter,e,n);return[{id:7,label:"University degree certificates",icon:"school"},{id:9,label:"Performance reviews / appraisals",icon:"insert_chart"},{id:8,label:"Police clearances",icon:"security"},{id:16,label:"Reference letters",icon:"check_circle"}
1,{id:6,label:"Teaching certificates / licenses",icon:"assignment_turned_in"},{id:11,label:"Teaching philosophy statements",icon:"format_quote"}].map(function(e){return e.documents=a.filter(function(t){var n;return(null===(n=t.category)||void 0===n?void 0:n.id)===e.id}),e})}}},{key:"adaptPhotos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.adapterHelper.adaptList(t,this.photoAdapter,e)}},{key:"adaptVideos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.adapterHelper.adaptList(t,this.videoAdapter,e)}},{key:"adaptReferences",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.adapterHelper.adaptList(t,this.referenceAdapter,e)}},{key:"adaptEmploymentRecords",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.adapterHelper.adaptList(t,this.employmentRecordAdapter,e).sort(this.adapterHelper.compareFnGenerator([{key:"endDate",reverse:!0,map:function(e){return e||new Date}},{key:"startDate",reverse:!0}]))}},{key:"adaptAdminNotes",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return this.adapterHelper.adaptList(n,this.adminNoteAdapter,t,null==e?void 0:e.memberNumber).sort(this.adapterHelper.compareFnGenerator([{key:"type",reverse:!1,map:function(e){return null==e?void 0:e.rank}},{key:"lastUpdated",reverse:!0,map:function(e){return null==e?void 0:e.date}}]))}},{key:"adaptTeacherApplicationEvents",value:function(e,t,n){if(n){var a=this.jsonApiHelperService,r=this.adapterHelper.compareFnGenerator([{key:"date",reverse:!0}]),i=a.adaptAnyArrayResponse(n,t).sort(r);return this.adapterHelper.adaptList(i,this.teacherApplicationEventAdapter,t,e.memberNumber)}}},{key:"adaptBadges",value:function(e,t){var n=this;return e.map(function(e){return n.adaptBadge(e,t)}).sort(this.adapterHelper.compareFnGenerator(["order"]))}},{key:"adaptBadge",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e;return n.hasAchieved=t.includes(e.id),n}},{key:"adaptAdminFields",value:function(e,t){var n=this.adapterHelper;if(this.userService.user.isAdmin)return{thDoNotContact:n.adaptBoolean(t.thDoNotContact),userType:n.getListItemById(e.userTypes,t.accountStatusId),thPlaceabilityRating:t.thPlaceabilityRating,adminNotes:[],teacherApplicationEvents:[],teacherApplicationEventAccordionList:[],videoInterviewClipUrl:t.videoInterviewClipUrl}}}]),e}();return e.\u0275fac=function(t){return new(t||e)(b.LFG(N.G),b.LFG(J),b.LFG(E),b.LFG(L),b.LFG(P),b.LFG(V),b.LFG(G),b.LFG($),b.LFG(z.K),b.LFG(K.V))},e.\u0275prov=b.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),ee=function(){var e=p(function e(t,n){s(this,e),this.listsAdapter=t,this.teacherAdapter=n});return e.\u0275fac=function(t){return new(t||e)(b.LFG(C),b.LFG(X))},e.\u0275prov=b.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),te=i(77566),ne=i(6652),ae=function(){var e=function(){function e(t,n,a,r,i,o){var l=this;s(this,e),this.httpClient=t,this.mainAdapter=n,this.userService=a,this.windowService=r,this.apiErrorService=i,this.dataService=o,this.getMemberNumber=function(e){var t,n=e.snapshot.paramMap.get("memberNumber");return"me"===n?null===(t=l.userService.user)||void 0===t?void 0:t.memberNumber:+n},this.redirectIfBadData=function(e){if(!e)return console.warn("Bad data => redirected"),l.apiErrorService.navigate("/dashboard"),!0},this.redirectIfNoAccess=function(e){if(l.userService.user.isSchool&&1!==e)return console.warn("No access => redirected"),l.teacher=void 0,l.apiErrorService.navigate("/dashboard"),!0}}return p(e,[{key:"setTeacher",value:function(e){var t=this,n=this.memberNumber=this.getMemberNumber(e);if(this.redirectIfBadData(n))return(0,x.of)(void 0);var a={lists:"/v1/lists?key=accreditations, ageLevels, cities, countries, curriculums, documentTypes, educationLevels, internationalExperiences, jobSeekingStatuses, languages, maritalStatuses, nationalitiesAll, preferenceOptions, regions, roles, skills, subjects, userTypes, yesNo, adminNoteTypes, userTeacherVideoUrlCategoryIds, userTeacherAdditionalPhotoCategoryIds, userTeacherBadges,applicationThMatchTypes, applicationStatuses, applicationEventTypes",teacherCore:"/v3/teacher/member-number/".concat(n,"/core")},r=this.httpClient.get(a.lists).pipe((0,Z.K)(function(e){return t.apiErrorService.handleSecondaryApiError(e),(0,x.of)(void 0)})),i=this.httpClient.get(a.teacherCore).pipe((0,Z.K)(function(e){return t.apiErrorService.handlePrimaryApiError(e),(0,x.of)(void 0)}));return(0,T.D)([r,i]).pipe((0,y.U)(function(e){var n;if(e[1])return t.lists=t.mainAdapter.listsAdapter.adapt(e[0]),t.teacher=t.mainAdapter.teacherAdapter.adapt(t.lists,e[1]),t.redirectIfNoAccess(null===(n=t.teacher.jobSeekingStatus)||void 0===n?void 0:n.id),t.teacher}),(0,A.d)(1))}},{key:"setEmploymentRecords",value:function(){var e=this;if(!this.teacher)return(0,x.of)(void 0);var t=this.httpClient.get("/v1/teacher/member-number/".concat(this.memberNumber,"/employment-records")).pipe((0,Z.K)(function(t){return e.apiErrorService.handleSecondaryApiError(t),(0,x.of)(void 0)}));return null==t?void 0:t.pipe((0,y.U)(function(t){return t?(e.teacher.employmentRecords=e.mainAdapter.teacherAdapter.adaptEmploymentRecords(e.lists,t),e.teacher):e.teacher}))}},{key:"setDocuments",value:function(){var e=this;return this.teacher?this.httpClient.get("/v2/teacher/member-number/".concat(this.memberNumber,"/documents")).pipe((0,Z.K)(function(t){return e.apiErrorService.handleSecondaryApiError(t),(0,x.of)(void 0)})).pipe((0,y.U)(function(t){return e.teacher.documentCategories=e.mainAdapter.teacherAdapter.adaptDocumentCategories(e.lists,t,e.teacher.memberNumber),e.teacher})):(0,x.of)(void 0)}},{key:"setTeacherRelatedMedia",value:function(){var e=this;return this.teacher?this.httpClient.get("/v2/teacher/member-number/".concat(this.memberNumber,"/related")).pipe((0,Z.K)(function(t){return e.apiErrorService.handleSecondaryApiError(t),(0,x.of)(t)})).pipe((0,y.U)(function(t){return e.teacher.photos=e.mainAdapter.teacherAdapter.adaptPhotos(e.lists,t.teacherImages),e.teacher.videos=e.mainAdapter.teacherAdapter.adaptVideos(e.lists,t.videoUrls),e.teacher})):(0,x.of)(void 0)}},{key:"setReferences",value:function(){var e=this;if(!this.teacher)return(0,x.of)(void 0);var t={referenceLists:"/v1/lists?key=formFields,referenceTypes,referenceStatuses",references:""};t.references=this.userService.user.isTeacher?"/v1/teacher/member-number/".concat(this.memberNumber,"/reference-requests?status-ids=3&is-archived=0"):"/v2/teacher/member-number/".concat(this.memberNumber,"/references?status-ids=3&is-archived=0");var n=this.httpClient.get(t.referenceLists).pipe((0,Z.K)(function(t){return e.apiErrorService.handleSecondaryApiError(t),(0,x.of)(t)})),a=this.httpClient.get(t.references).pipe((0,Z.K)(function(t){return e.apiErrorService.handleSecondaryApiError(t),(0,x.of)(t)}));return(0,T.D)([n,a]).pipe((0,y.U)(function(t){return Object.assign(e.lists,e.mainAdapter.listsAdapter.adaptReferenceLists(t[0])),e.teacher.references=e.mainAdapter.teacherAdapter.adaptReferences(e.lists,t[1]),e.teacher}),(0,Z.K)(function(t){return e.apiErrorService.handleSecondaryApiError(t),(0,x.of)(t)}))}},{key:"setWindowTitle",value:function(e){var t,n=(this.userService.user.isTeacher?"":(null===(t=this.teacher)||void 0===t?void 0:t.fullName)+" - ")+e;this.windowService.setTitle(n)}},{key:"setAdminNotes",value:function(){var e=this;return this.teacher?this.httpClient.get("/v1/teacher/member-number/".concat(this.memberNumber,"/admin-notes")).pipe((0,Z.K)(function(t){return e.apiErrorService.handleSecondaryApiError(t),(0,x.of)(t)})).pipe((0,y.U)(function(t){return e.teacher.admin.adminNotes=e.mainAdapter.teacherAdapter.adaptAdminNotes(e.teacher,e.lists,t.notes),e.teacher})):(0,x.of)(void 0)}},{key:"setTeacherApplicationEvents",value:function(){var e=this;return this.teacher?this.httpClient.get("/application-applicationEvents?schema=admin-allApplications&filter[application.teacher.memberNumber]=".concat(this.memberNumber)).pipe((0,Z.K)(function(t){return e.apiErrorService.handleSecondaryApiError(t),(0,x.of)(t)})).pipe((0,y.U)(function(t){return e.teacher.admin.teacherApplicationEvents=e.mainAdapter.teacherAdapter.adaptTeacherApplicationEvents(e.teacher,e.lists,t),e.syncAccordionListToEventTypes(),e.teacher})):(0,x.of)(void 0)}},{key:"syncAccordionListToEventTypes",value:function(e){var t,n,a=this,r=this.teacher.admin.teacherApplicationEvents;(null==e?void 0:e.length)>0&&(r=r.filter(function(t){var n;return e.indexOf(null===(n=t.type)||void 0===n?void 0:n.id)>-1})),this.teacher.admin.teacherApplicationEventAccordionList=r.map(function(e){return a.adaptApplicationEventForAccordionListItem(e)}),(null===(n=null===(t=this.teacher.admin)||void 0===t?void 0:t.teacherApplicationEventAccordionList)||void 0===n?void 0:n.length)>0&&(this.teacher.admin.teacherApplicationEventAccordionList[0].hasBeenOpened=!0)}},{key:"adaptApplicationEventForAccordionListItem",value:function(e){return{headerContext:{data:{applicationEvent:e}},bodyContext:{data:{applicationEvent:e}}}}},{key:"getManualEmailTemplates$",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=this.userService.user;return this.dataService.manualEmailTemplate.getManualEmailTemplates$(t.isAdmin?"admin":t.isSchool?"school":t.isTeacher?"teacher":void 0,e)}},{key:"getSystemTemplates$",value:function(){return this.dataService.system.getTemplates$()}},{key:"getExplorerRecords$",value:function(){return this.dataService.explorer.getExplorerRecords$((0,x.of)(null),"school",["&filter[teacher.memberNumber][contains]="+this.memberNumber])}}]),e}();
1return e.\u0275fac=function(t){return new(t||e)(b.LFG(w.eN),b.LFG(ee),b.LFG(z.K),b.LFG(te.u),b.LFG(I.D),b.LFG(ne.D))},e.\u0275prov=b.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),re=i(21732),ie=i(99004),oe=i(20592),le=i(77888),ce=function(){var e=p(function e(){s(this,e),this.lists={},this.dialog=S.T.angularInjector.get(oe.uw),this.fieldHelperService=S.T.angularInjector.get(le.A),this.adapterHelper=S.T.angularInjector.get(N.G),this.httpClient=S.T.angularInjector.get(w.eN),this.apiErrorService=S.T.angularInjector.get(I.D)});return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=b.lG2({type:e}),e}(),se=p(function e(t,n){var a=this;s(this,e),this.values=t,this.helpers=n,this.updateBackend=function(e,t,n,r){var i=JSON.stringify({data:{type:"explorer-record",attributes:{text:e.text.value,teacher:{memberNumber:a.teacher.memberNumber}}}});return a.httpClient.post("/explorer-records",i,{observe:"response",headers:{"content-type":"application/json"}}).pipe((0,Z.K)(function(e){return console.log("fatal error",e),a.apiErrorService.handleFieldApiError(e,t,r),(0,x.of)(e)}))},this.updateModel=function(e){var t=a.fieldsToValues(e);return Object.assign(a,t),(0,x.of)(!0)},this.validateFields=function(e){var t=a.fieldsToValues(e);return a.getIsValid(t)},this.getIsValid=function(e){return!(null==(t=e.text)||""===t||-1===t);var t},this.fieldsToValues=function(e){return{text:e.text.value}},Object.assign(this,this.values),Object.assign(this,this.helpers),this.userService=S.T.angularInjector.get(z.K),this.apiErrorService=S.T.angularInjector.get(I.D)}),ue=function(){var e=p(function e(){s(this,e),this.createFields=function(e,t){e(t,"text","string",{required:!0})},this.updateFieldValues=function(e,t,n){return e[t].setValue(n),e[t].markAsTouched(),(0,x.of)(!0)},this.validateExplorerRecord_ExplorerRecordFieldValues=function(e,t){return e.validateFields(t)}});return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=b.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),pe=i(20776),de=i(89519),fe=i(46833);function he(e,t){1&e&&b.Hsn(0,0,["*ngTemplateOutlet","textTemplate"])}function me(e,t){1&e&&b.Hsn(0,1,["*ngTemplateOutlet","buttonsTemplate"])}function ve(e,t){if(1&e&&(b.TgZ(0,"mat-error"),b.TgZ(1,"span",11),b._uU(2),b.qZA(),b.qZA()),2&e){var n=b.oxw(2);b.xp6(2),b.hij(" ",n.getDefaultErrorMessage("text"),"")}}function ge(e,t){if(1&e&&(b.TgZ(0,"th-text-area-field",9),b.YNc(1,ve,3,1,"mat-error",10),b.qZA()),2&e){var n=b.oxw();b.Q6J("field",n.fields.text)("showStatus",!1),b.xp6(1),b.Q6J("ngIf",n.fields.text.invalid&&n.fields.text.touched)}}function be(e,t){if(1&e){var n=b.EpF();b.TgZ(0,"div",12),b.TgZ(1,"th-button",13),b.NdJ("click",function(){return b.CHM(n),b.oxw().onCancelClick()}),b._uU(2,"Cancel"),b.qZA(),b.TgZ(3,"th-button",14),b.NdJ("click",function(){return b.CHM(n),b.oxw().onSendClick()}),b._uU(4,"Send"),b.qZA(),b.qZA()}if(2&e){var a=b.oxw();b.xp6(3),b.Q6J("isDisabled",!a.isValid)}}var xe=["*","*"],Te=function(){var e=function(e){t(r,e);var n=a(r);function r(e,t,a,i,o,l,c){var u;return s(this,r),(u=n.call(this)).router=e,u.dialogRef=t,u.teacherService=a,u.explorerRecordService=i,u.interpolationService=o,u.userService=l,u.data=c,u.fields={},u.isProcessing=!1,u.onSendClick=function(){u.isProcessing||(u.isProcessing=!0,u.explorerRecord.updateBackend(u.fields,"add").pipe((0,y.U)(function(e){if(201===(null==e?void 0:e.status))return u.isProcessing=!1,u.dialogRef.close(u.explorerRecord),u.apiErrorService.showToast("Invitation to interview sent",!0),(0,x.of)(!0)})).subscribe())},u.createFields=function(){var e=u.fieldHelperService.composeCreateFieldFunction(u.explorerRecord,{updateFieldValues:u.explorerRecordService.updateFieldValues,validateFieldValues:u.validateFieldValues,getApiUrl:function(){return null},updateBackend:function(){return(0,x.of)(null)},updateModel:function(){return(0,x.of)(null)}});u.explorerRecordService.createFields(e,u.fields)},u.validateFieldValues=function(e){var t=[],n=Object.keys(u.fields).filter(function(e){return!t.includes(e)});return u.allFieldsTouched=n.every(function(e){return u.fields[e].touched}),u.isValid=u.explorerRecord.validateFields(e),(0,x.of)(u.isValid)},u.getNewExplorerRecord_Empty=function(){return new se({},{adapterHelper:u.adapterHelper,httpClient:u.httpClient,lists:u.lists})},u.getDefaultErrorMessage=function(e){return u.fields[e].hasError("required")?"Field is required.":""},u.explorerRecord=u.getNewExplorerRecord_Empty(),u.explorerRecord.teacher={id:null,memberNumber:u.teacherService.teacher.memberNumber,firstName:null,fullName:null},u}return p(r,[{key:"ngOnInit",value:function(){var e=this;this.createFields(),this.teacher=this.teacherService.teacher,this.teacherService.getSystemTemplates$().subscribe(function(t){var n=e.getInterpolatedText(e.userService.user,e.teacher,t);e.fields.text.setValue(n)})}},{key:"getInterpolatedText",value:function(e,t,n){var a={teacher:t,school:{name:e.schools[0].name,slug:e.schools[0].slug,city:{country:{name:"(TODO: country name)"}}}},r=e.schools.length>1?2:1,i=n.find(function(e){return e.id===r});return this.interpolationService.interpolate(i.text,a)}},{key:"onCancelClick",value:function(){var e=this;this.dialog.open(re.$5,{maxWidth:"400px",data:{message:"Are you sure you want to cancel? Any entered data will be lost."}}).afterClosed().subscribe(function(t){t&&e.dialogRef.close()},function(e){return console.log(e)})}}]),r}(ce);return e.\u0275fac=function(t){return new(t||e)(b.Y36(m.F0),b.Y36(oe.so),b.Y36(ae),b.Y36(ue),b.Y36(pe.c),b.Y36(z.K),b.Y36(oe.WI))},e.\u0275cmp=b.Xpm({type:e,selectors:[["ng-component"]],features:[b.qOj],ngContentSelectors:xe,decls:15,vars:5,consts:[[1,"pb-1","mb-1","text-blue"],[3,"heading","isError"],[1,"flex","justify-end"],[1,"text-coral","font-bold"],["
1info","New 'Explorer' system to help lead you through the process.","position","above",1,"ml-2"],[1,"mt-8","mb-5"],[4,"ngTemplateOutlet"],["textTemplate",""],["buttonsTemplate",""],["icon","fas:align-justify","label","Message",1,"field",3,"field","showStatus"],[4,"ngIf"],[1,"text-3xs"],[1,"flex","justify-end","mb-4"],["th-class","h-full btn-transparent-coral",3,"click"],["th-class","ml-3 btn-coral",3,"isDisabled","click"]],template:function(e,t){if(1&e&&(b.F$t(xe),b.TgZ(0,"div",0),b._UZ(1,"th-modal-header",1),b.TgZ(2,"div",2),b.TgZ(3,"span",3),b._uU(4,"New"),b.qZA(),b._UZ(5,"th-info",4),b.qZA(),b.TgZ(6,"div"),b._uU(7),b.qZA(),b.TgZ(8,"div",5),b.YNc(9,he,1,0,"ng-content",6),b.YNc(10,me,1,0,"ng-content",6),b.qZA(),b.qZA(),b.YNc(11,ge,2,3,"ng-template",null,7,b.W1O),b.YNc(13,be,5,1,"ng-template",null,8,b.W1O)),2&e){var n=b.MAs(12),a=b.MAs(14);b.xp6(1),b.Q6J("heading","Invite to interview")("isError",t.allFieldsTouched&&!t.isValid),b.xp6(6),b.hij("To invite ",t.teacher.firstName," to an interview, edit the message below as needed, and click send."),b.xp6(2),b.Q6J("ngTemplateOutlet",n),b.xp6(1),b.Q6J("ngTemplateOutlet",a)}},directives:[de.R,re.Ot,c.tP,re.ul,c.O5,fe.TO,re.r0],styles:[""]}),e}(),Ze=i(72742),ye=i(53002);function Ae(e,t){if(1&e&&b._UZ(0,"th-favourite",19),2&e){var n=b.oxw(2);b.Q6J("isFavourite",n.teacher.isFavourite)("add",n.teacher.addFavourite)("remove",n.teacher.removeFavourite)}}function we(e,t){1&e&&(b.TgZ(0,"th-button",20),b._uU(1,"Edit"),b.qZA())}function Ne(e,t){}function Oe(e,t){1&e&&b.YNc(0,Ne,0,0,"ng-template")}var Ce=function(e){return{teacher:e}};function ke(e,t){if(1&e&&(b.ynx(0),b.YNc(1,Oe,1,0,void 0,15),b.BQk()),2&e){var n=b.oxw(2),a=b.MAs(4);b.xp6(1),b.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",b.VKq(2,Ce,n.teacher))}}function qe(e,t){}function Ie(e,t){1&e&&b.YNc(0,qe,0,0,"ng-template")}function Se(e,t){if(1&e&&(b.ynx(0),b.YNc(1,Ie,1,0,void 0,15),b.BQk()),2&e){var n=b.oxw(2),a=b.MAs(6);b.xp6(1),b.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",b.VKq(2,Ce,n.teacher))}}function Ye(e,t){}function Ue(e,t){1&e&&b.YNc(0,Ye,0,0,"ng-template")}function _e(e,t){}function Je(e,t){1&e&&b.YNc(0,_e,0,0,"ng-template")}var Qe=function(e,t){return{teacher:e,user:t}},Ee=function(e,t,n,a,r){return{teacher:e,hasMessageButton:t,isExplorer:n,latestExplorerRecordId:a,emailTemplateData:r}};function Fe(e,t){if(1&e&&(b.ynx(0),b.TgZ(1,"div",7),b.YNc(2,Ae,1,3,"th-favourite",8),b.YNc(3,we,2,0,"th-button",9),b.qZA(),b.TgZ(4,"div",10),b._UZ(5,"th-circle-image",11),b.qZA(),b.TgZ(6,"div",12),b.TgZ(7,"h2",13),b._uU(8),b.qZA(),b.TgZ(9,"div"),b._uU(10),b.qZA(),b.YNc(11,ke,2,4,"ng-container",0),b.qZA(),b.YNc(12,Se,2,4,"ng-container",0),b._UZ(13,"hr",14),b.YNc(14,Ue,1,0,void 0,15),b.YNc(15,Je,1,0,void 0,15),b._UZ(16,"hr",14),b.TgZ(17,"h5",16),b._uU(18,"Profile strength"),b.qZA(),b.TgZ(19,"div",17),b.TgZ(20,"span"),b._uU(21,"Updated "),b.qZA(),b.TgZ(22,"span"),b._uU(23),b.ALo(24,"date"),b.qZA(),b.qZA(),b._UZ(25,"th-percentage",18),b.BQk()),2&e){var n=b.oxw(),a=b.MAs(8),r=b.MAs(10);b.xp6(2),b.Q6J("ngIf",n.user.isAdmin||n.user.isSchool),b.xp6(1),b.Q6J("ngIf",n.user.isAdmin||n.user.isTeacher),b.xp6(2),b.Q6J("url",n.teacher.photoUrl||"/assets/user/anonymous-profile-photo.jpg"),b.xp6(3),b.AsE("",n.teacher.firstName," ",n.teacher.lastName,""),b.xp6(2),b.hij("Candidate: ",n.teacher.memberNumber,""),b.xp6(1),b.Q6J("ngIf",!n.user.isTeacher),b.xp6(1),b.Q6J("ngIf",n.teacher.cvUrl),b.xp6(2),b.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",b.VKq(17,Ce,n.teacher)),b.xp6(1),b.Q6J("ngTemplateOutlet",r)("ngTemplateOutletContext",b.qbA(22,Ee,n.teacher,n.user.isSchool&&(n.isExplorer||n.teacher.email.length>0),n.isExplorer,n.latestExplorerRecordId,b.WLB(19,Qe,n.teacher,n.user))),b.xp6(8),b.Oqu(b.xi3(24,14,n.teacher.latestUpdateDate,"d MMM yyyy")),b.xp6(2),b.Q6J("value",n.teacher.percentageComplete)}}function Le(e,t){1&e&&(b.ynx(0),b._UZ(1,"th-spinner"),b.BQk())}function Me(e,t){if(1&e&&b._UZ(0,"th-star-rating",24),2&e){var n=b.oxw().teacher;b.MGl("routerLink","/teachers/",n.memberNumber,"/references"),b.Q6J("score",n.averageReferenceScore/20)("outOf",5)}}function Pe(e,t){if(1&e&&(b.TgZ(0,"span",25),b._UZ(1,"th-info",26),b.ALo(2,"number"),b.ALo(3,"thTextForNWithNoun"),b.qZA()),2&e){var n=b.oxw().teacher;b.MGl("routerLink","/teachers/",n.memberNumber,"/references"),b.xp6(1),b.FAE("info","",n.firstName,"'s average reference score","\n\n"," ",b.xi3(2,5,n.averageReferenceScore/20,"1.1-1")," out of 5 stars (from ",b.xi3(3,8,n.numberOfCompletedReferences,"reference"),")")}}function Re(e,t){if(1&e&&(b.TgZ(0,"div",21),b.YNc(1,Me,1,3,"th-star-rating",22),b.YNc(2,Pe,4,11,"span",23),b.qZA()),2&e){var n=t.teacher;b.xp6(1),b.Q6J("ngIf",n.averageReferenceScore),b.xp6(1),b.Q6J("ngIf",n.averageReferenceScore)}}function je(e,t){if(1&e&&(b.TgZ(0,"div",27),b.TgZ(1,"th-button",28),b._uU(2," View CV "),b.qZA(),b.qZA()),2&e){var n=t.teacher;b.xp6(1),b.Q6J("href",n.cvUrl)}}function De(e,t){if(1&e&&(b.ynx(0),b.TgZ(1,"mat-radio-group",32),b.TgZ(2,"mat-radio-button",33),b._uU(3),b.qZA(),b._UZ(4,"th-info",34),b.qZA(),b.BQk()),2&e){var n=b.oxw().teacher;b.xp6(2),b.Tol("c-job-seeking-status-"+n.jobSeekingStatus.id),b.xp6(1),b.hij(" ",n.jobSeekingStatus.name," "),b.xp6(1),b.Q6J("info",n.jobSeekingStatus.description)}}function Be(e,t){if(1&e&&(b.TgZ(0,"span",35),b._uU(1," Joint application with "),b.TgZ(2,"a",36),b._uU(3),b.qZA(),b.qZA()),2&e){var n=b.oxw().teacher,a=b.oxw();b.xp6(2),b.Q6J("href","/teachers/"+n.partnerMemberNumber+(a.isExplorer?"?context=explorer":""),b.LSH),b.xp6(1),b.Oqu(n.partnerMemberNumber)}}function Ve(e,t){if(1&e&&(b.TgZ(0,"div",37),b._uU(1),b.ALo(2,"date"),b.qZA()),2&e){var n=b.oxw().teacher;b.xp6(1),b.hij(" Available from ",b.Dn7(2,1,n.availableFromDate,"d MMM y","UTC")," ")}}function He(e,t){if(1&e&&(b.TgZ(0,"div",29),b.YNc(1,De,5,4,"ng-container",0),b.YNc(2,Be,4,2,"span",30),b.YNc(3,Ve,3,5,"div",31),b.qZA()),2&e){var n=t.teacher;b.xp6(1),b.Q6J("ngIf",n.jobSeekingStatus),b.xp6(1),b.Q6J("ngIf",n.partnerMemberNumber),b.xp6(1),b.Q6J("ngIf",n.availableFromDate)}}function Ge(e,t){}function We(e,t){1&e&&b.YNc(0,Ge,0,0,"ng-template")}function Ke(e,t){}function $e(e,t){1&e&&b.YNc(0,Ke,0,0,"ng-template")}var ze=function(e,t,n,a){return{teacher:e,isExplorer:t,latestExplorerRecordId:n,emailTemplateData:a}};function Xe(e,t){if(1&e&&(b.TgZ(0,"div",40),b.YNc(1,We,1,0,void 0,15),b.YNc(2,$e,1,0,void 0,15),b.qZA()),2&e){var n=b.oxw(),a=n.teacher,r=n.isExplorer,i=n.latestExplorerRecordId,o=n.emailTemplateData;b.oxw();var l=b.MAs(12),c=b.MAs(14);b.xp6(1),b.Q6J("ngTemplateOutlet",l)("ngTemplateOutletContext",b.l5B(4,ze,a,r,i,o)),b.xp6(1),b.Q6J("ngTemplateOutlet",c)("ngTemplateOutletContext",b.VKq(9,Ce,a))}}function et(e,t){}function tt(e,t){1&e&&b.YNc(0,et,0,0,"ng-template")}var nt=function(e,t){return{teacher:e,isExplorer:t}};function at(e,t){if(1&e&&(b.TgZ(0,"div",27),b.YNc(1,tt,1,0,void 0,15),b.qZA()),2&e){var n=b.oxw(),a=n.teacher,r=n.isExplorer;b.oxw();var i=b.MAs(14);b.xp6(1),b.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",b.WLB(2,nt,a,r))}}function rt(e,t){if(1&e&&(b.YNc(0,Xe,3,11,"div",38),b.YNc(1,at,2,5,"div",39)),2&e){var n=t.hasMessageButton;b.Q6J("ngIf",n),b.xp6(1),b.Q6J("ngIf",!n)}}function it(e,t){if(1&e){var n=b.EpF();b.ynx(0),b.TgZ(1,"th-button",41),b.NdJ("click",function(){return b.CHM(n),b.oxw(3).onInviteToInterviewClick()}),b._uU(2),b.qZA(),b.BQk()}if(2&e){var a=b.oxw(2).teacher;b.xp6(2),b.hij(" Invite ",a.firstName," for interview ")}}function ot(e,t){if(1&e&&(b.ynx(0),b.TgZ(1,"th-button",42),b._uU(2,"Vie
1w Explorer record"),b.qZA(),b.BQk()),2&e){var n=b.oxw(2).latestExplorerRecordId;b.xp6(1),b.Q6J("href","/explorer-records/"+n)}}function lt(e,t){if(1&e&&(b.ynx(0),b.YNc(1,it,3,1,"ng-container",0),b.YNc(2,ot,3,1,"ng-container",0),b.BQk()),2&e){var n=b.oxw().latestExplorerRecordId;b.xp6(1),b.Q6J("ngIf",!n),b.xp6(1),b.Q6J("ngIf",n)}}function ct(e,t){if(1&e&&(b.ynx(0),b.TgZ(1,"th-button",43),b.ALo(2,"thHrefFromManualEmailTemplate"),b.ALo(3,"thGetListItemById"),b._uU(4),b.qZA(),b.BQk()),2&e){var n=b.oxw(),a=n.emailTemplateData,r=n.teacher,i=b.oxw();b.xp6(1),b.Q6J("href",b.xi3(2,2,b.xi3(3,5,i.manualEmailTemplateId,i.manualEmailTemplates),a)),b.xp6(3),b.hij(" Message ",r.firstName," ")}}function st(e,t){if(1&e&&(b.YNc(0,lt,3,2,"ng-container",0),b.YNc(1,ct,5,8,"ng-container",0)),2&e){var n=t.isExplorer;b.Q6J("ngIf",n),b.xp6(1),b.Q6J("ngIf",!n)}}function ut(e,t){1&e&&(b.TgZ(0,"th-button",44),b._uU(1," Print summary "),b.qZA()),2&e&&b.MGl("href","/teachers/",t.teacher.memberNumber,"/print-summary")}var pt=function(){var e=function(){function e(t,n,a,r,i){s(this,e),this.userService=t,this.teacherService=n,this.activatedRoute=a,this.router=r,this.dialog=i,this.user=this.userService.user}return p(e,[{key:"ngOnInit",value:function(){var e,t=this;this.isExplorer="explorer"===this.context,this.isExplorer?this.teacherService.getExplorerRecords$().subscribe(function(e){if(e.length>0){var n=e.sort(function(e,t){return e.latestActivity.date<t.latestActivity.date?1:-1});t.latestExplorerRecordId=n[0].id}}):(this.manualEmailTemplateId=1===(null===(e=this.user.schools)||void 0===e?void 0:e.length)?21:22,this.teacherService.getManualEmailTemplates$([this.manualEmailTemplateId]).subscribe(function(e){t.manualEmailTemplates=e}))}},{key:"onInviteToInterviewClick",value:function(){var e=this;this.dialog.open(Te,{width:"90%",maxHeight:"90vh",disableClose:!0}).afterClosed().subscribe(function(t){!t||e.router.navigateByUrl("/explorer-records/"+t.id)})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(b.Y36(z.K),b.Y36(ae),b.Y36(m.gz),b.Y36(m.F0),b.Y36(oe.uw))},e.\u0275cmp=b.Xpm({type:e,selectors:[["th-teacher-summary"]],inputs:{teacher:"teacher",context:"context"},decls:15,vars:2,consts:[[4,"ngIf"],["averageReferenceScoreTemplate",""],["viewCVButtonTemplate",""],["jobSeekingStatusTemplate",""],["messageAndPrintSummaryButtonsTemplate",""],["messageButtonTemplate",""],["printButtonTemplate",""],[1,"flex","justify-end"],["class","inline-block text-lg hover:text-coral text-coral","style","margin-top: 2px","size","lg","icon","star",3,"isFavourite","add","remove",4,"ngIf"],["th-class","btn-3xs ml-1","routerLink","./edit/1",4,"ngIf"],[1,"flex","justify-center","mt-4"],["th-class","object-cover w-48 h-48",2,"min-width","128px",3,"url"],[1,"text-center"],[1,"mb-0","break-all"],[1,"my-6"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"mt-6","mb-0"],[1,"text-sm","text-blue-30"],[3,"value"],["size","lg","icon","star",1,"inline-block","text-lg","hover:text-coral","text-coral",2,"margin-top","2px",3,"isFavourite","add","remove"],["th-class","btn-3xs ml-1","routerLink","./edit/1"],[1,"flex","justify-center","my-1","text-lg"],["class","text-coral",3,"score","outOf","routerLink",4,"ngIf"],["style","margin-top: -2px","class","ml-2",3,"routerLink",4,"ngIf"],[1,"text-coral",3,"score","outOf","routerLink"],[1,"ml-2",2,"margin-top","-2px",3,"routerLink"],["position","above",3,"info"],[1,"flex","justify-center"],["buttonClass","w-full btn-transparent-coral","target","_blank",1,"w-1/2",3,"href"],[1,"flex","flex-col","items-center","p-4","mx-8","mb-8","text-center","bg-white","rounded"],["class","mt-4 text-xs text-blue-50",4,"ngIf"],["class","flex flex-row items-center justify-center w-full p-2 mt-4 text-xl rounded bg-teal-10",4,"ngIf"],[1,"flex","items-center","leading-sm"],["disabled",""],["position","above",2,"top","1px","left","8px",3,"info"],[1,"mt-4","text-xs","text-blue-50"],["target","blank",3,"href"],[1,"flex","flex-row","items-center","justify-center","w-full","p-2","mt-4","text-xl","rounded","bg-teal-10"],["class","grid grid-cols-2 gap-4 px-2 mx-6 my-4",4,"ngIf"],["class","flex justify-center",4,"ngIf"],[1,"grid","grid-cols-2","gap-4","px-2","mx-6","my-4"],["th-class","w-full h-full btn-coral",3,"click"],["th-class","w-full h-full btn-coral",3,"href"],["th-class","w-full h-full btn-coral","target","_blank",3,"href"],["target","_blank",1,"w-full","h-full","btn-trans
1parent-coral",3,"href"]],template:function(e,t){1&e&&(b.TgZ(0,"div"),b.YNc(1,Fe,26,28,"ng-container",0),b.YNc(2,Le,2,0,"ng-container",0),b.qZA(),b.YNc(3,Re,3,2,"ng-template",null,1,b.W1O),b.YNc(5,je,3,1,"ng-template",null,2,b.W1O),b.YNc(7,He,4,3,"ng-template",null,3,b.W1O),b.YNc(9,rt,2,2,"ng-template",null,4,b.W1O),b.YNc(11,st,2,2,"ng-template",null,5,b.W1O),b.YNc(13,ut,2,1,"ng-template",null,6,b.W1O)),2&e&&(b.xp6(1),b.Q6J("ngIf",t.teacher),b.xp6(1),b.Q6J("ngIf",!t.teacher))},directives:[c.O5,re.XC,c.tP,re.Ue,re.IW,re.r0,m.rH,re.OR,re.Te,re.Ot,Ze.VQ,Ze.U0],pipes:[c.uU,c.JJ,re.HI,ye.Y1,ye.q3],styles:["[_nghost-%COMP%]     .mat-radio-button{color:var(--color-blue-50)}[_nghost-%COMP%]     .mat-radio-button .mat-radio-outer-circle{transform:scale(1.3)}[_nghost-%COMP%]     .mat-radio-button.mat-radio-checked .mat-radio-inner-circle{transform:scale(.85)}[_nghost-%COMP%]     .mat-radio-button.c-job-seeking-status-1 .mat-radio-outer-circle{border-color:var(--color-teal)!important}[_nghost-%COMP%]     .mat-radio-button.c-job-seeking-status-1 .mat-radio-inner-circle{background-color:var(--color-teal)!important}[_nghost-%COMP%]     .mat-radio-button.c-job-seeking-status-2 .mat-radio-outer-circle{border-color:var(--color-blue)!important}[_nghost-%COMP%]     .mat-radio-button.c-job-seeking-status-2 .mat-radio-inner-circle{background-color:var(--color-blue)!important}[_nghost-%COMP%]     .mat-radio-button.c-job-seeking-status-3 .mat-radio-outer-circle{border-color:var(--color-coral)!important}[_nghost-%COMP%]     .mat-radio-button.c-job-seeking-status-3 .mat-radio-inner-circle{background-color:var(--color-coral)!important}[_nghost-%COMP%]     .mat-radio-button .mat-radio-label-content{padding-left:16px}[_nghost-%COMP%]     .mat-radio-button.mat-radio-checked{color:var(--color-blue)}[_nghost-%COMP%]     .mat-radio-button.mat-radio-disabled .mat-radio-label-content{color:var(--color-blue)}[_nghost-%COMP%]     .mat-radio-label{white-space:normal!important}"]}),e}(),dt=["thTabs"],ft=function(e){return{template:e}},ht=function(){return{padding:"p-0"}},mt=function(e,t){return{template:e,layout:t}},vt=function(e,t){return[e,t]};function gt(e,t){if(1&e&&b._UZ(0,"th-layout-columns",4),2&e){b.oxw();var n=b.MAs(3),a=b.MAs(5);b.Q6J("columns",b.WLB(7,vt,b.VKq(1,ft,n),b.WLB(4,mt,a,b.DdM(3,ht))))}}function bt(e,t){1&e&&b._UZ(0,"th-page-not-found")}function xt(e,t){if(1&e&&(b._UZ(0,"th-teacher-summary",5),b.ALo(1,"async")),2&e){var n=b.oxw();b.Q6J("teacher",b.lcZ(1,2,n.teacher$))("context",n.context)}}function Tt(e,t){if(1&e&&(b.TgZ(0,"div",7),b._UZ(1,"th-tabs",8,9),b.qZA()),2&e){var n=b.oxw(2);b.xp6(1),b.Q6J("tabs",n.tabs)}}function Zt(e,t){1&e&&b._UZ(0,"router-outlet")}function yt(e,t){if(1&e&&(b.YNc(0,Tt,3,1,"div",6),b.YNc(1,Zt,1,0,"router-outlet",1)),2&e){var n=b.oxw();b.Q6J("ngIf",n.showTabs),b.xp6(1),b.Q6J("ngIf",n.isReady)}}var At=function(){var t=function(){function t(n,a,r,i,o,l){var c=this;s(this,t),this.activatedRoute=n,this.teacherService=a,this.userService=r,this.router=i,this.location=o,this.apiErrorService=l,this.showTabs=!0,this.pageNotFound=!1,this.createTabs=function(){var t;c.tabs=[{label:"Key details",route:"./"},{label:"Supporting information",route:"./supporting-materials"},{label:"References",route:"./references"},{label:"Community",route:"./community"}],(null===(t=c.userService.user)||void 0===t?void 0:t.isAdmin)&&(c.tabs=[{label:"Admin",route:"./admin"}].concat(e(c.tabs)));var n=c.getPathForRoute();c.tabs.find(function(e){return e.route===n}).isSelected=!0}}return p(t,[{key:"ngOnInit",value:function(){var e,t,n=this;this.context=this.router.url.includes("context=explorer")?"explorer":void 0,this.teacher$=this.getTeacher(),this.createTabs(),this.setObservables(),this.pageNotFoundSubscription=null===(t=null===(e=this.apiErrorService)||void 0===e?void 0:e.pageNotFound)||void 0===t?void 0:t.subscribe(function(e){n.pageNotFound=e}),this.showTabs=!this.router.url.includes("print-summary")}},{key:"ngOnDestroy",value:function(){var e,t;null===(e=this.pageNotFoundSubscription)||void 0===e||e.unsubscribe(),null===(t=this.navigationEndSubscription)||void 0===t||t.unsubscribe()}},{key:"setObservables",value:function(){var e=this,t=this.router.events.pipe((0,v.h)(function(e){return e instanceof m.m2}));this.navigationEndSubscription=t.subscribe(function(){var t=e.getPathForRoute();e.thTabs.setTabForPath(t),e.preserveContextQueryParam()})}},{key:"getTeacher",value:function(){var e=this;return this.teacherService.setTeacher(this.activatedRoute).pipe((0,g.b)(function(t){!t||(e.isReady=!0)}))}},{key:"getPathForRoute",value:function(){var e=window.location.pathname.split("/");return"./"+(e.length<4?"":e[3])}},{key:"preserveContextQueryParam",value:function(){if("explorer"===this.context){var e=this.router.createUrlTree([],{relativeTo:this.activatedRoute,queryParams:{context:"explorer"}}).toString();this.location.replaceState(e)}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(b.Y36(m.gz),b.Y36(ae),b.Y36(z.K),b.Y36(m.F0),b.Y36(c.Ye),b.Y36(I.D))},t.\u0275cmp=b.Xpm({type:t,selectors:[["ng-component"]],viewQuery:function(e,t){var n;(1&e&&b.Gf(dt,5),2&e)&&(b.iGM(n=b.CRH())&&(t.thTabs=n.first))},decls:6,vars:2,consts:[[3,"columns",4,"ngIf"],[4,"ngIf"],["column1Template",""],["column2Template",""],[3,"columns"],[3,"teacher","context"],["class","c-tabs-container",4,"ngIf"],[1,"c-tabs-container"],[3,"tabs"],["thTabs",""]],template:function(e,t){1&e&&(b.YNc(0,gt,1,10,"th-layout-columns",0),b.YNc(1,bt,1,0,"th-page-not-found",1),b.YNc(2,xt,2,4,"ng-template",null,2,b.W1O),b.YNc(4,yt,2,2,"ng-template",null,3,b.W1O)),2&e&&(b.Q6J("ngIf",!t.pageNotFound),b.xp6(1),b.Q6J("ngIf",t.pageNotFound))},directives:[c.O5,re.yf,ie.r,pt,re.n4,m.lC],pipes:[c.Ov],styles:["@media (max-width: 768px){.c-tabs-container[_ngcontent-%COMP%]{width:calc(100vw - 24px)}}"]}),t}(),wt=i(46782),Nt=i(45465),Ot=function(){var e=function(){function e(){s(this,e),this.hasExpandAll=!0}return p(e,[{key:"adaptToStandardList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(function(e){return{headerContext:{data:e},bodyContext:{data:e}}})}},{key:"adaptToStandardListByName",value:function(e,t){var n=this,a=e.map(function(e){return n.nameObject(e,t)});return this.adaptToStandardList(a)}},{key:"nameObject",value:function(e,t){var n={};return n[t]=e,n}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=b.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),Ct=i(29667),kt=i(64855),qt=i(8847);function It(e,t){}function St(e,t){1&e&&b.YNc(0,It,0,0,"ng-template")}var Yt=function(e){return{teacher:e}};function Ut(e,t){if(1&e&&(b.TgZ(0,"div",11),b.YNc(1,St,1,0,void 0,12),b.qZA()),2&e){var n=t.ngIf;b.oxw();var a=b.MAs(6);b.xp6(1),b.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",b.VKq(2,Yt,n))}}function _t(e,t){1&e&&b._UZ(0,"th-spinner")}function Jt(e,t){1&e&&(b.TgZ(0,"span",33),b._UZ(1,"th-icon2",34),b._uU(2," Do not contact "),b.qZA())}function Qt(e,t){if(1&e&&(b.TgZ(0,"th-a",38),b.ALo(1,"thSalesforceSearchUrl"),b._UZ(2,"th-icon2",39),b.qZA()),2&e){var n=b.oxw(2).teacher;b.Q6J("href",b.lcZ(1,1,n.email))}}function Et(e,t){if(1&e&&(b.TgZ(0,"th-label-value",35),b.TgZ(1,"a",36),b._uU(2),b.qZA(),b.YNc(3,Qt,3,3,"th-a",37),b.ALo(4,"thSalesforceSearchUrl"),b.qZA()),2&e){var n=b.oxw().teacher;b.xp6(1),b.MGl("href","mailto:",n.email,"",b.LSH),b.xp6(1),b.Oqu(n.email),b.xp6(1),b.Q6J("ngIf",b.lcZ(4,3,n.email))}}function Ft(e,t){if(1&e&&(b.ynx(0),b.TgZ(1,"span",41),b._uU(2),b.qZA(),b.TgZ(3,"span"),b._uU(4," - "),b.qZA(),b.BQk()),2&e){var n=b.oxw(2).teacher;b.xp6(1),b.Q6J("matTooltip","+ "+n.phoneNumberCountry.phoneCode),b.xp6(1),b.Oqu(n.phoneNumberCountry.name)}}function Lt(e,t){if(1&e&&(b.TgZ(0,"th-label-value",40),b.YNc(1,Ft,5,2,"ng-container",32),b.TgZ(2,"span"),b._uU(3),b.qZA(),b.qZA()),2&e){var n=b.oxw().teacher;b.xp6(1),b.Q6J("ngIf",n.phoneNumberCountry),b.xp6(2),b.Oqu(n.phoneNumber)}}function Mt(e,t){if(1&e&&(b.TgZ(0,"th-label-value",42),b.TgZ(1,"th-a",43),b._uU(2),b.qZA(),b.qZA()),2&e){var n=b.oxw().teacher;b.xp6(1),b.Q6J("href","/teachers/"+n.partnerMemberNumber),b.xp6(1),b.Oqu(n.partnerMemberNumber)}}function Pt(e,t){if(1&e&&(b.TgZ(0,"th-label-value",44),b._UZ(1,"th-a",43),b.qZA()),2&e){var n=b.oxw().teacher;b.xp6(1),b.Q6J("href",n.admin.videoInterviewClipUrl)}}function Rt(e,t){}function jt(e,t){1&e&&b.YNc(0,Rt,0,0,"ng-template")}function Dt(e,t){if(1&e&&(b.ynx(0),b.YNc(1,jt,1,0,void 0,12),b.BQk()),2&e){var n=b.oxw().teacher;b.oxw();var a=b.MAs(8);b.xp6(1),b.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",b.VKq(2,Yt,n))}}
1function Bt(e,t){1&e&&b.Hsn(0,0,["*ngTemplateOutlet","applicationEventsTemplate; context: { teacher: teacher }"])}function Vt(e,t){if(1&e&&(b.TgZ(0,"div"),b.YNc(1,Bt,1,0,"ng-content",12),b.qZA()),2&e){var n=b.oxw().teacher;b.oxw();var a=b.MAs(12);b.xp6(1),b.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",b.VKq(2,Yt,n))}}function Ht(e,t){if(1&e&&(b.TgZ(0,"div",13),b.TgZ(1,"h2",14),b._uU(2,"Admin"),b.qZA(),b.TgZ(3,"th-button",15),b._uU(4,"Edit"),b.qZA(),b.qZA(),b.YNc(5,Jt,3,0,"span",16),b._UZ(6,"th-label-value",17),b._UZ(7,"th-label-value",18),b.YNc(8,Et,5,5,"th-label-value",19),b.YNc(9,Lt,4,2,"th-label-value",20),b._UZ(10,"th-label-value",21),b._UZ(11,"th-label-value",22),b.YNc(12,Mt,3,2,"th-label-value",23),b._UZ(13,"th-label-value",24),b._UZ(14,"th-label-value",25),b._UZ(15,"th-label-value",26),b.YNc(16,Pt,2,1,"th-label-value",27),b.TgZ(17,"div",28),b.TgZ(18,"th-button",29),b._uU(19,"Job applications"),b.qZA(),b.TgZ(20,"th-button",30),b._uU(21,"Add application"),b.qZA(),b.TgZ(22,"th-button",31),b._uU(23,"Explorer records"),b.qZA(),b.TgZ(24,"th-button",31),b._uU(25,"School matches"),b.qZA(),b.TgZ(26,"th-button",31),b._uU(27,"Job matches"),b.qZA(),b.qZA(),b.YNc(28,Dt,2,4,"ng-container",32),b.YNc(29,Vt,2,4,"div",32)),2&e){var n=t.teacher;b.xp6(5),b.Q6J("ngIf",n.admin.thDoNotContact),b.xp6(1),b.Q6J("value",null==n.admin.userType?null:n.admin.userType.name),b.xp6(1),b.Q6J("value",n.admin.thPlaceabilityRating),b.xp6(1),b.Q6J("ngIf",n.email),b.xp6(1),b.Q6J("ngIf",n.phoneNumber),b.xp6(1),b.Q6J("value",null==n.maritalStatus?null:n.maritalStatus.name),b.xp6(1),b.Q6J("value",n.birthYear),b.xp6(1),b.Q6J("ngIf",n.partnerMemberNumber),b.xp6(1),b.Q6J("value",n.numberOfDependentChildren),b.xp6(1),b.Q6J("value",null==n.neverPotentialRiskToChildren?null:n.neverPotentialRiskToChildren.name),b.xp6(1),b.Q6J("value",null==n.neverBehaviouralConcernsTowardsChildren?null:n.neverBehaviouralConcernsTowardsChildren.name),b.xp6(1),b.Q6J("ngIf",n.admin.videoInterviewClipUrl),b.xp6(2),b.Q6J("href","/applications?member-numbers="+n.memberNumber),b.xp6(2),b.Q6J("href","/applications?action=add&member-number="+n.memberNumber),b.xp6(2),b.Q6J("href","/explorer-records?candidate-member-numbers="+n.memberNumber),b.xp6(2),b.Q6J("href","/schools?view=list&teacher-member-number="+n.memberNumber),b.xp6(2),b.Q6J("href","/jobs?view=list&teacher-member-number="+n.memberNumber),b.xp6(2),b.Q6J("ngIf",n.admin.adminNotes.length>0),b.xp6(1),b.Q6J("ngIf",(null==n.admin.teacherApplicationEvents?null:n.admin.teacherApplicationEvents.length)>0)}}function Gt(e,t){1&e&&b.Hsn(0,1,["*ngTemplateOutlet","adminNoteTemplate;
1 context: { teacher: teacher, note: note }"])}var Wt=function(e,t){return{teacher:e,note:t}};function Kt(e,t){if(1&e&&(b.TgZ(0,"div",48),b.YNc(1,Gt,1,0,"ng-content",12),b.qZA()),2&e){var n=t.$implicit,a=b.oxw().teacher;b.oxw();var r=b.MAs(10);b.xp6(1),b.Q6J("ngTemplateOutlet",r)("ngTemplateOutletContext",b.WLB(2,Wt,a,n))}}function $t(e,t){if(1&e&&(b.TgZ(0,"div",45),b.TgZ(1,"div"),b.TgZ(2,"h5"),b._uU(3," Notes "),b._UZ(4,"th-info",46),b.ALo(5,"thJoin"),b.ALo(6,"thAdminNotesSummaryPoints"),b.qZA(),b.qZA(),b.qZA(),b.YNc(7,Kt,2,5,"div",47)),2&e){var n=t.teacher;b.xp6(4),b.MGl("info","- ",b.xi3(5,2,b.lcZ(6,5,n.admin.adminNotes),"\n- "),"\n            - Order: Most recent first, but with important, DNC, placements, interview requests and interviews at the top"),b.xp6(3),b.Q6J("ngForOf",null==n.admin?null:n.admin.adminNotes)}}function zt(e,t){if(1&e&&(b.TgZ(0,"div"),b._uU(1),b._UZ(2,"th-date",54),b.qZA()),2&e){var n=b.oxw().note;b.xp6(1),b.hij(" Created by ",n.created.fullName," on "),b.xp6(1),b.Q6J("date",n.created.date)}}function Xt(e,t){if(1&e&&(b.TgZ(0,"div"),b.TgZ(1,"span"),b._uU(2),b._UZ(3,"th-date",54),b.qZA(),b._UZ(4,"th-info",55),b.ALo(5,"date"),b.qZA()),2&e){var n=b.oxw().note;b.xp6(2),b.hij(" Last updated by ",n.lastUpdated.fullName," on "),b.xp6(1),b.Q6J("date",n.lastUpdated.date),b.xp6(1),b.hYB("info","Created by ",n.created.fullName," on ",b.xi3(5,4,n.created.date,"EEE d MMM yyyy HH:mm:ss"),"")}}function en(e,t){if(1&e&&(b.TgZ(0,"div",49),b.TgZ(1,"div"),b.TgZ(2,"div"),b.TgZ(3,"span",50),b._uU(4),b.qZA(),b.qZA(),b.TgZ(5,"div"),b.TgZ(6,"span",51),b._uU(7),b.qZA(),b.qZA(),b.TgZ(8,"div",52),b.YNc(9,zt,3,2,"div",32),b.YNc(10,Xt,6,7,"div",32),b.qZA(),b.qZA(),b.qZA(),b._UZ(11,"hr",53)),2&e){var n=t.note;b.xp6(4),b.hij(" ",null==n.type?null:n.type.name," "),b.xp6(3),b.hij(" ",n.text," "),b.xp6(2),b.Q6J("ngIf",n.lastUpdated.date.getTime()===n.created.date.getTime()),b.xp6(1),b.Q6J("ngIf",n.lastUpdated.date.getTime()!==n.created.date.getTime())}}function tn(e,t){if(1&e){var n=b.EpF();b.TgZ(0,"div",56),b.TgZ(1,"h5",57),b.TgZ(2,"span"),b._uU(3,"Application events"),b.qZA(),b.TgZ(4,"span",58),b._uU(5),b.qZA(),b.qZA(),b.TgZ(6,"div"),b.TgZ(7,"th-button",59),b.NdJ("click",function(){return b.CHM(n),b.oxw().setApplicationEventTypes([])}),b._uU(8,"All"),b.qZA(),b.TgZ(9,"th-button",60),b.NdJ("click",function(){b.CHM(n);var e=b.oxw();return e.setApplicationEventTypes(e.defaultApplicationEventTypeIds)}),b._uU(10,"Default"),b.qZA(),b.qZA(),b.qZA(),b._UZ(11,"th-from-many-field",61),b._UZ(12,"th-accordion",62)}if(2&e){var a=t.teacher,r=b.oxw(),i=b.MAs(14),o=b.MAs(18);b.xp6(5),b.hij("(",a.admin.teacherApplicationEventAccordionList.length,")"),b.xp6(6),b.Q6J("field",r.fields.applicationEventTypes)("list",r.teacherService.lists.applicationEventTypes)("maxItems",null==r.teacherService.lists.applicationEventTypes?null:r.teacherService.lists.applicationEventTypes.length),b.xp6(1),b.Q6J("headerTemplate",i)("bodyTemplate",o)("list",a.admin.teacherApplicationEventAccordionList)("hasExpandAll",r.accordionHelperService.hasExpandAll)}}function nn(e,t){1&e&&b.Hsn(0,2,["*ngTemplateOutlet","applicationEventTitleTemplate; context: { event: data.applicationEvent }"])}var an=function(e){return{event:e}};function rn(e,t){if(1&e&&(b.TgZ(0,"div"),b.YNc(1,nn,1,0,"ng-content",12),b.qZA()),2&e){var n=b.oxw().data;b.oxw();var a=b.MAs(16);b.xp6(1),b.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",b.VKq(2,an,n.applicationEvent))}}function on(e,t){1&e&&b.YNc(0,rn,2,4,"div",32),2&e&&b.Q6J("ngIf",t.data.applicationEvent)}function ln(e,t){if(1&e&&(b.TgZ(0,"div",63),b._UZ(1,"th-date",64),b.TgZ(2,"span",65),b._uU(3),b.qZA(),b.qZA()),2&e){var n=t.event;b.xp6(1),b.Q6J("date",n.date),b.xp6(2),b.Oqu(null==n.type?null:n.type.name)}}function cn(e,t){1&e&&b.Hsn(0,3,["*ngTemplateOutlet","applicationEventBodyDetailTemplate; context: { event: data.applicationEvent }"])}function sn(e,t){if(1&e&&(b.TgZ(0,"div"),b.YNc(1,cn,1,0,"ng-content",12),b.qZA()),2&e){var n=b.oxw().data;b.oxw();var a=b.MAs(20);b.xp6(1),b.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",b.VKq(2,an,n.applicationEvent))}}function un(e,t){1&e&&b.YNc(0,sn,2,4,"div",32),2&e&&b.Q6J("ngIf",t.data.applicationEvent)}function pn(e,t){if(1&e&&(b.TgZ(0,"div",66),b.TgZ(1,"th-a",67),b._uU(2),b.qZA(),b.TgZ(3,"span"),b._uU(4,", "),b.qZA(),b.TgZ(5,"th-a",67),b._uU(6),b.qZA(),b.qZA(),b._UZ(7,"th-label-value2",68),b._UZ(8,"th-label-value2",69),b._UZ(9,"th-label-value2",70),b.TgZ(10,"div",71),b._uU(11),b.qZA(),b.TgZ(12,"div",72),b.TgZ(13,"th-button",73),b._uU(14,"View application"),b.qZA(),b.qZA()),2&e){var n=t.event;b.xp6(1),b.Q6J("href","/schools/"+n.application.job.school.slug),b.xp6(1),b.Oqu(n.application.job.school.name),b.xp6(3),b.Q6J("href","/schools/"+n.application.job.school.slug+"/vacancies/"+n.application.job.id),b.xp6(1),b.Oqu(n.application.job.title),b.xp6(1),b.Q6J("value",null==n.applicationEventStatus?null:n.applicationEventStatus.name),b.xp6(1),b.Q6J("value",n.creationDate),b.xp6(1),b.Q6J("value",null==n.creationUser?null:n.creationUser.fullName),b.xp6(2),b.Oqu(n.notes),b.xp6(2),b.Q6J("href","/applications/"+n.application.id)}}var dn=["*","*","*","*"],fn=function(){var e=function(e){t(r,e);var n=a(r);function r(e,t,a,i,o,l,c){var u;s(this,r),(u=n.call(this)).teacherService=e,u.accordionHelperService=t,u.userService=a,u.router=i,u.activatedRoute=o,u.filterHelperService=l,u.fieldHelperService=c,u.parameters={},u.defaultApplicationEventTypeIds=[3,7,9,18,20],u.fields={},u.getInitialFieldValue=function(e,t,n,a){return"applicationEventTypes"===t?u.defaultApplicationEventTypeIds:null},u.applicationEventTypeChanged=function(e,t,n,a){var r;return u.setApplicationEventsByFilter(null===(r=e.applicationEventTypes)||void 0===r?void 0:r.value),(0,x.of)(null)};var p=u.fieldHelperService.composeCreateFieldFunction({},{getInitialFieldValue:u.getInitialFieldValue,updateBackend:u.applicationEventTypeChanged});u.createField=function(){return p.apply(void 0,arguments)},u.user=u.userService.user;var d=u.filterHelperService;return d.init(u.activatedRoute),d.createParameter(u.parameters,"application-event-ids"),u.createField(u.fields,"applicationEventTypes","listOfIds"),u}return p(r,[{key:"ngOnInit",value:function(){this.teacher$=this.getTeacher(),this.teacherService.setWindowTitle("Admin"),this.setObservables()}},{key:"setObservables",value:function(){this.activatedRoute.queryParams.pipe((0,wt.R)(this.onDestroy$)).subscribe(function(e){})}},{key:"setApplicationEventTypes",value:function(e){this.fields.applicationEventTypes.setValue(e),this.teacherService.syncAccordionListToEventTypes(e)}},{key:"setApplicationEventsByFilter",value:function(e){this.teacherService.syncAccordionListToEventTypes(e)}},{key:"getTeacher",value:function(){var e=this;return this.teacherService.setAdminNotes().pipe((0,g.b)(function(t){!t||e.getTeacherApplicationEvents().subscribe()}))}},{key:"getTeacherApplicationEvents",value:function(){var e=this;return this.teacherService.setTeacherApplicationEvents().pipe((0,g.b)(function(t){!t||e.setApplicationEventsByFilter(e.fields.applicationEventTypes.value)}))}}]),r}(Nt.n);return e.\u0275fac=function(t){return new(t||e)(b.Y36(ae),b.Y36(Ot),b.Y36(z.K),b.Y36(m.F0),b.Y36(m.gz),b.Y36(Ct.s),b.Y36(le.A))},e.\u0275cmp=b.Xpm({type:e,selectors:[["ng-component"]],features:[b.qOj],ngContentSelectors:dn,decls:21,vars:4,consts:[[1,"p-4","xl:p-8"],["class","mb-4",4,"ngIf","ngIfElse"],["loading",""],["adminTemplate",""],["adminNotesTemplate",""],["adminNoteTemplate",""],["applicationEventsTemplate",""],["applicationEventHeaderTemplate",""],["applicationEventTitleTemplate",""],["applicationEventBodyTemplate",""],["applicationEventBodyDetailTemplate",""],[1,"mb-4"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"flex","flex-row","items-center","justify-between"],[1,"h4"],["th-class","btn-3xs","routerLink","../edit/admin"],["class","text-coral",4,"ngIf"],["label","Status","labelClass","w-1/2 lg:w-1/4","valueClass","w-1/2 lg:w-3/4",3,"value"],["label","Placeability rating","labelClass","w-1/2 lg:w-1/4","valueClass","w-1/2 lg:w-3/4",3,"value"],["label","Email","type","ng-content","labelClass","w-1/2 lg:w-1/4","valueClass","w-1/2 lg:w-3/4",4,"ngIf"],["label","Phone","type","ng-content","labelClass","w-1/2 lg:w-1/4","valueClass","w-1/2 lg:w-3/4",4,"ngIf"],["label","Marital status","labelClass","w-1/2 lg:w-1/4","valueClass","w-1/2 lg:w-3/4",3,"value"],["label","Birth year","labelClass","w-1/2 lg:w-1/4","valueClass","w-1/2 lg:w-3/4",3,"value"],["label","Partner member number","type","ng-content","labelClass","w-1/2 lg:w-1/4","valueClass","w-1/2 lg:w-3/4",4,"ngIf"],["label","Number of dependent children","labelClass","w-1/2 lg:w-1/4","valueClass","w-1/2 lg:w-3/4",3,"value"],["label","Risk disclosure","labelClass","w-1/2 lg:w-1/4","valueClass","w-1/2 lg:w-3/4",3,"value"],["label","Disciplinary disclosure","labelClass","w-1/2 lg:w-1/4","valueClass","w-1/2 lg:w-3/4",3,"value"],["label","Video interview clip","type","ng-content","labelClass","w-1/2 lg:w-1/4","valueClass","w-1/2 lg:w-3/4",4,"ngIf"],[1,"mt-8","mb-4"],[1,"btn-3xs","btn-trans
1parent-coral",3,"href"],["th-class","ml-4 btn-3xs btn-transparent-coral",3,"href"],[1,"ml-4","btn-3xs","btn-transparent-coral",3,"href"],[4,"ngIf"],[1,"text-coral"],["name","fas:phone-slash",1,"mr-6","text-xl"],["label","Email","type","ng-content","labelClass","w-1/2 lg:w-1/4","valueClass","w-1/2 lg:w-3/4"],["target","_blank",3,"href"],["class","ml-2 break-all","matTooltip","Search email in Salesforce","matTooltipPosition","above","matTooltipClass","c-tooltip","target","_blank",3,"href",4,"ngIf"],["matTooltip","Search email in Salesforce","matTooltipPosition","above","matTooltipClass","c-tooltip","target","_blank",1,"ml-2","break-all",3,"href"],["name","fab:salesforce",2,"--icon-container-width","20px"],["label","Phone","type","ng-content","labelClass","w-1/2 lg:w-1/4","valueClass","w-1/2 lg:w-3/4"],["matTooltipPosition","above","matTooltipClass","c-tooltip",1,"th-allow-select",3,"matTooltip"],["label","Partner member number","type","ng-content","labelClass","w-1/2 lg:w-1/4","valueClass","w-1/2 lg:w-3/4"],["target","_blank",1,"break-all",3,"href"],["label","Video interview clip","type","ng-content","labelClass","w-1/2 lg:w-1/4","valueClass","w-1/2 lg:w-3/4"],[1,"flex","flex-row","mb-3"],["position","above",3,"info"],["class","mb-3",4,"ngFor","ngForOf"],[1,"mb-3"],[1,"flex","flex-row"],[1,"h6"],[1,"whitespace-pre-line"],[1,"text-2xs"],[1,"mt-3","mb-3"],["format","d MMM yyyy",3,"date"],["position","above",1,"ml-2",3,"info"],[1,"flex","flex-row","items-center","justify-between","mt-8"],[1,"flex","items-center"],[1,"ml-2","text-2xs"],["th-class","btn-3xs btn-transparent-coral",3,"click"],["th-class","ml-2 btn-3xs btn-transparent-coral",3,"click"],["label","Event types","icon","fas:shapes",1,"c-field-mb-0",3,"field","list","maxItems"],[1,"c-accordion",3,"headerTemplate","bodyTemplate","list","hasExpandAll"],[1,"flex","flex-row","items-center","w-full","gap-1","text-blue"],[2,"min-width","8em",3,"date"],[1,"ml-2","font-bold","leading-sm"],[1,"mb-6"],[3,"href"],["label","Status",3,"value"],["label","Added date","type","relativeTime",3,"value"],["label","Added by",3,"value"],[1,"mt-4"],[1,"mt-2","mb-0","text-sm","text-right"],["th-class","btn-3xs",3,"href"]],template:function(e,t){if(1&e&&(b.F$t(dn),b.TgZ(0,"div",0),b.YNc(1,Ut,2,4,"div",1),b.ALo(2,"async"),b.qZA(),b.YNc(3,_t,1,0,"ng-template",null,2,b.W1O),b.YNc(5,Ht,30,19,"ng-template",null,3,b.W1O),b.YNc(7,$t,8,7,"ng-template",null,4,b.W1O),b.YNc(9,en,12,4,"ng-template",null,5,b.W1O),b.YNc(11,tn,13,8,"ng-template",null,6,b.W1O),b.YNc(13,on,1,1,"ng-template",null,7,b.W1O),b.YNc(15,ln,4,2,"ng-template",null,8,b.W1O),b.YNc(17,un,1,1,"ng-template",null,9,b.W1O),b.YNc(19,pn,15,9,"ng-template",null,10,b.W1O)),2&e){var n=b.MAs(4);b.xp6(1),b.Q6J("ngIf",b.lcZ(2,2,t.user.isAdmin&&t.teacher$))("ngIfElse",n)}},directives:[c.O5,c.tP,re.OR,re.r0,m.rH,re.tT,re.bp,re.D7,kt.gM,re.Ot,c.sg,re.Id,re.cS,re.Zf,qt.B],pipes:[c.Ov,re.YK,re.As,ye.a1,c.uU],styles:["[_nghost-%COMP%]     .mat-radio-button{color:var(--color-blue-50)}[_nghost-%COMP%]     .mat-radio-button .mat-radio-outer-circle{transform:scale(1.3)}[_nghost-%COMP%]     .mat-radio-button.mat-radio-checked .mat-radio-inner-circle{transform:scale(.85)}[_nghost-%COMP%]     .mat-radio-button.c-job-seeking-status-1 .mat-radio-outer-circle{border-color:var(--color-teal)!important}[_nghost-%COMP%]     .mat-radio-button.c-job-seeking-status-1 .mat-radio-inner-circle{background-color:var(--color-teal)!important}[_nghost-%COMP%]     .mat-radio-button.c-job-seeking-status-2 .mat-radio-outer-circle{border-color:var(--color-blue)!important}[_nghost-%COMP%]     .mat-radio-button.c-job-seeking-status-2 .mat-radio-inner-circle{background-color:var(--color-blue)!important}[_nghost-%COMP%]     .mat-radio-button.c-job-seeking-status-3 .mat-radio-outer-circle{border-color:var(--color-coral)!important}[_nghost-%COMP%]     .mat-radio-button.c-job-seeking-status-3 .mat-radio-inner-circle{background-color:var(--color-coral)!important}[_nghost-%COMP%]     .mat-radio-button .mat-radio-label-content{padding-left:16px}[_nghost-%COMP%]     .mat-radio-button.mat-radio-checked{color:var(--color-blue)}[_nghost-%COMP%]     .mat-radio-button.mat-radio-disabled .mat-radio-label-content{color:var(--color-blue)}.th-display-field[_ngcontent-%COMP%]{--icon-container-width: 50px}.th-allow-select[_ngcontent-%COMP%]{-webkit-user-select:initial!important;-moz-user-select:initial!important;user-select:initial!important}[_nghost-%COMP%]   .c-field-mb-0[_ngcontent-%COMP%]{--field-margin-bottom: 0}"]}),e}(),hn=i(35463);function mn(e,t){}function vn(e,t){1&e&&b.YNc(0,mn,0,0,"ng-template")}function gn(e,t){}function bn(e,t){1&e&&b.YNc(0,gn,0,0,"ng-template")}function xn(e,t){}function Tn(e,t){1&e&&b.YNc(0,xn,0,0,"ng-template")}var Zn=function(e){return{teacher:e}};function yn(e,t){if(1&e&&(b.TgZ(0,"div",6),b.YNc(1,vn,1,0,void 0,7),b.YNc(2,bn,1,0,void 0,7),b.YNc(3,Tn,1,0,void 0,7),b.qZA()),2&e){var n=t.ngIf;b.oxw();var a=b.MAs(6),r=b.MAs(8),i=b.MAs(10);b.xp6(1),b.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",b.VKq(6,Zn,n)),b.xp6(1),b.Q6J("ngTemplateOutlet",r)("ngTemplateOutletContext",b.VKq(8,Zn,n)),b.xp6(1),b.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",b.VKq(10,Zn,n))}}function An(e,t){1&e&&b._UZ(0,"th-spinner")}function wn(e,t){if(1&e&&(b.ynx(0),b._UZ(1,"th-badge",13),b.BQk()),2&e){var n=t.$implicit;b.xp6(1),b.Q6J("label",n.name)("isActive",n.hasAchieved)("tooltip",n.tooltip)("activeTooltip",n.activeTooltip)}}function Nn(e,t){if(1&e&&(b.TgZ(0,"div",11),b.YNc(1,wn,2,4,"ng-container",12),b.qZA()),2&e){var n=t.ngIf;b.xp6(1),b.Q6J("ngForOf",n)}}function On(e,t){1&e&&(b.TgZ(0,"div",14),b.TgZ(1,"th-button",15),b._uU(2,"Get badges"),b.qZA(),b.qZA())}function Cn(e,t){if(1&e&&(b.TgZ(0,"h2",8),b._uU(1,"Badges"),b.qZA(),b.TgZ(2,"p"),b._uU(3),b.qZA(),b.YNc(4,Nn,2,1,"div",9),b.ALo(5,"async"),b.YNc(6,On,3,0,"div",10)),2&e){var n=t.teacher,a=b.oxw();b.xp6(3),b.hij(" Teacher Horizons is a collaborative community of educators. We encourage our members to participate and contribute towards the information we share on our website. This ensures our community can make informed decisions based on accurate, up-to-date information. The badges below indicate ",n.firstName,"'s contributions and achievements so far. "),b.xp6(1),b.Q6J("ngIf",b.lcZ(5,3,a.badges$)),b.xp6(2),b.Q6J("ngIf",a.user.isTeacher||a.user.isAdmin)}}function kn(e,t){1&e&&b._UZ(0,"th-info",20)}function qn(e,t){if(1&e&&(b.ynx(0),b._UZ(1,"hr",17),b.YNc(2,kn,1,0,"th-info",18),b._UZ(3,"th-teacher-referral",19),b.BQk()),2&e){var n=b.oxw().teacher,a=b.oxw();b.xp6(2),b.Q6J("ngIf",a.user.isAdmin),b.xp6(1),b.Q6J("memberNumber",n.memberNumber)}}function In(e,t){if(1&e&&b.YNc(0,qn,4,2,"ng-container",16),2&e){var n=b.oxw();b.Q6J("ngIf",n.user.isTeacher||n.user.isAdmin)}}function Sn(e,t){1&e&&b._UZ(0,"th-info",24)}function Yn(e,t){if(1&e&&(b.TgZ(0,"div"),b._UZ(1,"hr",17),b.YNc(2,Sn,1,0,"th-info",21),b.TgZ(3,"div",22),b.TgZ(4,"th-button",23),b._uU(5),b.qZA(),b.qZA(),b.qZA()),2&e){var n=b.oxw().teacher,a=b.oxw();b.xp6(2),b.Q6J("ngIf",a.user.isAdmin),b.xp6(2),b.Q6J("href","mailto:"+n.email+"[email protected]&subject=Virtual interview for [INSERT SCHOOL] in [INSERT COUNTRY]&body=Dear "+n.firstName+",%0A%0AI lead on staff recruitment at [INSERT SCHOOL] in [INSERT COUNTRY]. I accessed your profile through Teacher Horizons and I wanted to get in touch.%0A%0AWe are currently looking for a teacher to join our team and your background and experience suggests you would be a good candidate for the role.%0A%0AWould you be available for a virtual interview in the next few days? If so, please could you suggest some times that might work for us both (given the time difference).%0A%0AI look forward to hearing from you either way. I have copied Teacher Horizons in on this email - please 'reply all' to keep them in the loop as well.%0A%0ALet me know if you have any questions in advance.%0A%0ABest wishes,%0A%0A%0A%0A"),b.xp6(1),b.hij(" Message ",n.firstName," ")}}function Un(e,t){if(1&e&&b.YNc(0,Yn,6,3,"div",16),2&e){var n=t.teacher,a=b.oxw();b.Q6J("ngIf",a.user.isSchool&&n.email||a.user.isAdmin)}}var _n=function(){var e=function(){function e(t,n,a){s(this,e),this.teacherService=t,this.userService=n,this.windowService=a,this.user=this.userService.user}return p(e,[{key:"ngOnInit",value:function(){this.teacherService.setWindowTitle("Community"),this.setObservables()}},{key:"ngAfterViewInit",value:function(){this.setScrollPositionForPageHash()}},{key:"setObservables",value:function(){var e=this;this.teacher$=this.getTeacher(),this.badges$=this.teacher$.pipe((0,y.U)(function(t){return t.badges.map(function(n){return e.decorateBadge(n,t.firstName)})}))}},{key:"decorateBadge",value:function(e,t){var n=[{slug:"guest-blogger",tooltip:t+" is yet to write an article on the Teacher Horizons blog",activeTooltip:t+" has written an article on the Teacher Horizons blog"},{slug:"international-school-experience",tooltip:t+" is yet to gain international school experience",activeTooltip:t+" has taught at an international school before"},{slug:"profile-strength-100",tooltip:t+"\u2019s profile is yet to be fully complete",activeTooltip:t+"\u2019s profile is 100% complete"},{slug:"referrer",tooltip:t+" is yet to refer a friend or colleague to Teacher Horizons",activeTooltip:t+" has referred a friend or colleague to Teacher Horizons"},{slug:"school-ambassador",tooltip:t+" has not yet been an ambassador of a Teacher Horizons school",activeTooltip:t+" has been an ambassador of a Teacher Horizons school"},{slug:"school-contributor",tooltip:t+" is yet to contribute to a school\u2019s community page.",activeTooltip:t+" has contributed to a school\u2019s community page."},{slug:"taught-at-a-th-school",tooltip:t+" is yet to teach at a Teacher Horizons school",activeTooltip:t+" has taught at a Teacher Horizons school"}].find(function(t){return t.slug===e.slug});return n&&(e.tooltip=n.tooltip,e.activeTooltip=n.activeTooltip),e}},{key:"setScrollPositionForPageHash",value:function(){var e,t=this,n=null===(e=window.location.hash)||void 0===e?void 0:e.substring(1);setTimeout(function(){t.windowService.scrollElementIntoView(n)},0)}},{key:"getTeacher",value:function(){return(0,x.of)(this.teacherService.teacher)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(b.Y36(ae),b.Y36(z.K),b.Y36(te.u))},e.\u0275cmp=b.Xpm({type:e,selectors:[["ng-component"]],decls:11,vars:4,consts:[[1,"p-4","xl:p-8"],["class","mb-4",4,"ngIf","ngIfElse"],["loading",""],["badgesTemplate",""],["referralTemplate",""],["messageTeacherTemplate",""],[1,"mb-4"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"h4"],["class","flex-wrap gap-6 inline-flex justify-center",4,"ngIf"],["class","flex justify-center mt-8",4,"ngIf"],[1,"flex-wrap","gap-6","inline-flex","justify-center"],[4,"ngFor","ngForOf"],[3,"label","isActive","tooltip","activeTooltip"],[1,"flex","justify-center","mt-8"],["href","/advice/teacher-badges","target","_blank"],[4,"ngIf"],[1,"mt-12","mb-6"],["class","float-right","info","Section visible only to the teacher themselves.","position","above",4,"ngIf"],[3,"memberNumber"],["info","Section visible only to the teacher themselves.","position","above",1,"float-right"],["class","float-right","info","Section visible only to school users and if the teacher has an email.","position","above",4,"ngIf"],[1,"flex","justify-center","mt-10"],["target","_blank",1,"h-full","btn-coral",3,"href"],["info","Section visible only to school users and if the teacher has an email.","position","above",1,"float-right"]],template:function(e,t){if(1&e&&(b.TgZ(0,"div",0),b.YNc(1,yn,4,12,"div",1),b.ALo(2,"async"),b.qZA(),b.YNc(3,An,1,0,"ng-template",null,2,b.W1O),b.YNc(5,Cn,7,5,"ng-template",null,3,b.W1O),b.YNc(7,In,1,1,"ng-template",null,4,b.W1O),b.YNc(9,Un,1,1,"ng-template",null,5,b.W1O)),2&e){var n=b.MAs(4);b.xp6(1),b.Q6J("ngIf",b.lcZ(2,2,t.teacher$))("ngIfElse",n)}},directives:[c.O5,c.tP,re.OR,c.sg,re.FN,re.r0,hn.D,re.Ot],pipes:[c.Ov],encapsulation:2}),e}(),Jn=i(39761),Qn=i(26241),En=function(){var e=function(){function e(t){s(this,e),this.colors=t}return p(e,[{key:"decorate",value:function(e){e.jobSeekingStatus&&(e.jobSeekingStatus.color=[this.colors.green,this.colors.secondary,this.colors.red][e.jobSeekingStatus.id-1])}},{key:"createFieldGroups",value:function(e){return{preferences:e.createFieldGroup(["discountOnSchoolFeesPreference","abilityToSavePreference","accommodationProvidedPreference","healthInsuranceProvidedPreference","professionalDevelopmentSupportPreference"]),lookingFor:e.createFieldGroup(["lookingForRoles","lookingForSubjects","lookingForCurriculums","lookingForAgeLevels","lookingForRegions"]),experienceAndQualifications:e.createFieldGroup(["qualificationCountry","numberOfYearsTeachingExperience","internationalExperience","curriculumExperience","completedEducationLevels"]),currentEmployment:e.createFieldGroup(["currentEmployer","currentJobCountry","currentRole","currentJobStartDate"]),profile:e.createFieldGroup(["jobSeekingStatus","availableFromDate","nationality"])}}}]),e}();
1return e.\u0275fac=function(t){return new(t||e)(b.LFG(Qn.x))},e.\u0275prov=b.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),Fn=i(48743);function Ln(e,t){if(1&e&&(b.TgZ(0,"div"),b.TgZ(1,"th-a",6),b._uU(2),b.qZA(),b.TgZ(3,"p",3),b.TgZ(4,"span",4),b._uU(5,"Location"),b.qZA(),b.TgZ(6,"span"),b._uU(7),b.qZA(),b.qZA(),b.TgZ(8,"p",3),b.TgZ(9,"span",4),b._uU(10,"Accreditation"),b.qZA(),b.TgZ(11,"span"),b._uU(12),b.ALo(13,"thJoin"),b.ALo(14,"thPluck"),b.qZA(),b.qZA(),b.qZA()),2&e){var n=b.oxw(2);b.xp6(1),b.s9C("href",n.er.schoolUrl),b.xp6(1),b.Oqu(n.er.employerName),b.xp6(5),b.AsE("",null==n.er.city?null:n.er.city.name,", ",null==n.er.country?null:n.er.country.name,""),b.xp6(5),b.Oqu(b.lcZ(13,5,b.lcZ(14,7,n.er.schoolAccreditations)))}}function Mn(e,t){if(1&e&&(b.TgZ(0,"div"),b.TgZ(1,"span",7),b._uU(2),b.qZA(),b.TgZ(3,"p",3),b.TgZ(4,"span",4),b._uU(5,"Location"),b.qZA(),b.TgZ(6,"span"),b._uU(7),b.qZA(),b.qZA(),b.qZA()),2&e){var n=b.oxw(2);b.xp6(2),b.Oqu(n.er.employerName),b.xp6(5),b.Oqu(null==n.er.country?null:n.er.country.name)}}function Pn(e,t){if(1&e&&(b.TgZ(0,"div",8),b.TgZ(1,"a",9),b._UZ(2,"img",10),b.qZA(),b.TgZ(3,"a",11),b._uU(4,"(View profile)"),b.qZA(),b.qZA()),2&e){var n=b.oxw(2);b.xp6(1),b.s9C("href",n.er.schoolUrl,b.LSH),b.xp6(1),b.s9C("src",n.er.schoolBadgeImageUrl,b.LSH),b.xp6(1),b.s9C("href",n.er.schoolUrl,b.LSH)}}function Rn(e,t){if(1&e&&(b.TgZ(0,"div",1),b.TgZ(1,"div"),b.YNc(2,Ln,15,9,"div",2),b.YNc(3,Mn,8,2,"div",2),b.TgZ(4,"div"),b.TgZ(5,"p",3),b.TgZ(6,"span",4),b._uU(7,"Role"),b.qZA(),b.TgZ(8,"span"),b._uU(9),b.qZA(),b.qZA(),b.TgZ(10,"p",3),b.TgZ(11,"span",4),b._uU(12,"Subject(s)"),b.qZA(),b.TgZ(13,"span"),b._uU(14),b.ALo(15,"thJoin"),b.ALo(16,"thPluck"),b.qZA(),b.qZA(),b.TgZ(17,"p",3),b.TgZ(18,"span",4),b._uU(19,"Dates"),b.qZA(),b.TgZ(20,"span"),b.TgZ(21,"span"),b._uU(22),b.ALo(23,"date"),b.qZA(),b.TgZ(24,"span"),b._uU(25),b.ALo(26,"date"),b.qZA(),b.qZA(),b.qZA(),b.TgZ(27,"p",3),b.TgZ(28,"span",4),b._uU(29,"Duration"),b.qZA(),b.TgZ(30,"span"),b._uU(31),b.qZA(),b.qZA(),b.qZA(),b.qZA(),b.YNc(32,Pn,5,3,"div",5),b.qZA()),2&e){var n=b.oxw();b.xp6(2),b.Q6J("ngIf",n.er.schoolId),b.xp6(1),b.Q6J("ngIf",!n.er.schoolId),b.xp6(6),b.Oqu(null==n.er.role?null:n.er.role.name),b.xp6(5),b.Oqu(b.lcZ(15,8,b.lcZ(16,10,n.er.subjects))),b.xp6(8),b.hij("",b.xi3(23,12,n.er.startDate,"d MMM y")," to "),b.xp6(3),b.Oqu(n.er.endDate?b.xi3(26,15,n.er.endDate,"d MMM y"):"Current"),b.xp6(6),b.Oqu(n.er.duration),b.xp6(1),b.Q6J("ngIf",n.er.schoolBadgeImageUrl)}}var jn=function(){var e=p(function e(){s(this,e)});return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=b.Xpm({type:e,selectors:[["th-employment-record"]],inputs:{er:["employmentRecord","er"]},decls:1,vars:1,consts:[["class","text-blue flex justify-between items-start mt-4",4,"ngIf"],[1,"text-blue","flex","justify-between","items-start","mt-4"],[4,"ngIf"],[1,"c-key-value"],[1,"font-bold","w-32"],["class","c-school-img-container",4,"ngIf"],[1,"block","text-lg","mb-2","font-bold",3,"href"],[1,"block","text-lg","no-underline","mb-2","font-bold"],[1,"c-school-img-container"],[3,"href"],["alt","School Logo",1,"w-auto","h-auto",2,"max-width","100px","max-height","100px",3,"src"],["target","_blank",1,"block","text-2xs","text-center","-mt-2",3,"href"]],template:function(e,t){1&e&&b.YNc(0,Rn,33,18,"div",0),2&e&&b.Q6J("ngIf",t.er)},directives:[c.O5,re.D7],pipes:[re.As,re.FF,c.uU],styles:[".c-key-value[_ngcontent-%COMP%]{display:flex;font-size:1.1em;font-size:var(--employment-record-font-size, 1.1em);margin-top:0;margin-bottom:0}.c-key-value[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{min-width:128px}@media screen and (max-width: 600px){.c-school-img-container[_ngcontent-%COMP%]{display:none}}"]}),e}();function Dn(e,t){}function Bn(e,t){1&e&&b.YNc(0,Dn,0,0,"ng-template")}function Vn(e,t){}function Hn(e,t){1&e&&b.YNc(0,Vn,0,0,"ng-template")}var Gn=function(e){return{teacher:e}};function Wn(e,t){if(1&e&&(b.TgZ(0,"div",17),b.YNc(1,Hn,1,0,void 0,12),b.qZA()),2&e){var n=b.oxw().ngIf;b.oxw();var a=b.MAs(8);b.xp6(1),b.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",b.VKq(2,Gn,n))}}function Kn(e,t){}function $n(e,t){1&e&&b.YNc(0,Kn,0,0,"ng-template")}function zn(e,t){if(1&e&&(b.TgZ(0,"div",15),b._UZ(1,"hr",16),b.YNc(2,$n,1,0,void 0,12),b.qZA()),2&e){var n=b.oxw().ngIf;b.oxw();var a=b.MAs(14);b.xp6(2),b.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",b.VKq(2,Gn,n))}}function Xn(e,t){}function ea(e,t){1&e&&b.YNc(0,Xn,0,0,"ng-template")}function ta(e,t){if(1&e&&(b.TgZ(0,"div",15),b._UZ(1,"hr",16),b.YNc(2,ea,1,0,void 0,12),b.qZA()),2&e){var n=b.oxw().ngIf;b.oxw();var a=b.MAs(16);b.xp6(2),b.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",b.VKq(2,Gn,n))}}function na(e,t){}function aa(e,t){1&e&&b.YNc(0,na,0,0,"ng-template")}function ra(e,t){if(1&e&&(b.TgZ(0,"div"),b.TgZ(1,"div",11),b.YNc(2,Bn,1,0,void 0,12),b.qZA(),b.YNc(3,Wn,2,4,"div",13),b.YNc(4,zn,3,4,"div",14),b.YNc(5,ta,3,4,"div",14),b.TgZ(6,"div",15),b._UZ(7,"hr",16),b.YNc(8,aa,1,0,void 0,12),b.qZA(),b.qZA()),2&e){var n=t.ngIf,a=b.oxw(),r=b.MAs(6),i=b.MAs(20);b.xp6(2),b.Q6J("ngTemplateOutlet",r)("ngTemplateOutletContext",b.VKq(7,Gn,n)),b.xp6(1),b.Q6J("ngIf",!a.fieldGroups.experienceAndQualifications.isEmpty),b.xp6(1),b.Q6J("ngIf",!a.fieldGroups.lookingFor.isEmpty),b.xp6(1),b.Q6J("ngIf",!a.fieldGroups.preferences.isEmpty),b.xp6(3),b.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",b.VKq(9,Gn,n))}}function ia(e,t){1&e&&b._UZ(0,"th-spinner")}function oa(e,t){if(1&e&&b._UZ(0,"th-icon2",29),2&e){var n=b.oxw().$implicit;b.Q6J("name","flag:"+n.flag)}}function la(e,t){1&e&&(b.TgZ(0,"span",30),b._uU(1,","),b.qZA())}function ca(e,t){if(1&e&&(b.ynx(0),b.YNc(1,oa,1,1,"th-icon2",27),b.TgZ(2,"span"),b._uU(3),b.qZA(),b.YNc(4,la,2,0,"span",28),b.BQk()),2&e){var n=t.$implicit,a=t.last;b.xp6(1),b.Q6J("ngIf",null!==n.flag),b.xp6(2),b.Oqu(n.name),b.xp6(1),b.Q6J("ngIf",!a)}}function sa(e,t){if(1&e&&(b.TgZ(0,"div"),b.TgZ(1,"h2",18),b._uU(2),b.qZA(),b.qZA(),b.TgZ(3,"th-label-value",19),b.TgZ(4,"div",20),b.YNc(5,ca,5,3,"ng-container",21),b.qZA(),b.qZA(),b._UZ(6,"th-label-value",22),b.ALo(7,"thJoin"),b.ALo(8,"thPluck"),b.TgZ(9,"div",23),b._UZ(10,"th-boxed-label-value",24),b._UZ(11,"th-boxed-label-value",25),b.qZA(),b._UZ(12,"hr",26)),2&e){var n=t.teacher;b.xp6(2),b.hij("",n.firstName,"'s background and qualifications"),b.xp6(3),b.Q6J("ngForOf",n.nationalities),b.xp6(1),b.Q6J("value",b.lcZ(7,5,b.lcZ(8,7,n.c
1ompletedEducationLevels))),b.xp6(4),b.Q6J("value",null==n.qualificationCountry?null:n.qualificationCountry.name),b.xp6(1),b.Q6J("value",null==n.currentCountry?null:n.currentCountry.name)}}function ua(e,t){if(1&e&&(b.TgZ(0,"div"),b.TgZ(1,"h2",31),b._uU(2),b.qZA(),b.TgZ(3,"div",32),b.TgZ(4,"div"),b._UZ(5,"th-label-value",33),b._UZ(6,"th-label-value",34),b.ALo(7,"thJoin"),b.ALo(8,"thPluck"),b.qZA(),b._UZ(9,"th-boxed-label-value",35),b.qZA(),b.TgZ(10,"div",36),b._UZ(11,"th-accordion",37),b.ALo(12,"async"),b.qZA(),b.qZA()),2&e){var n=t.teacher,a=b.oxw(),r=b.MAs(10),i=b.MAs(12);b.xp6(2),b.hij("",n.firstName,"'s experience"),b.xp6(3),b.Q6J("value",null==n.internationalExperience?null:n.internationalExperience.name),b.xp6(1),b.Q6J("value",b.lcZ(7,7,b.lcZ(8,9,n.curriculumExperience))),b.xp6(3),b.Q6J("value",n.numberOfYearsTeachingExperience),b.xp6(2),b.Q6J("headerTemplate",r)("bodyTemplate",i)("list",b.lcZ(12,11,a.accordionEmploymentRecords$))}}var pa=function(e){return{"is-current":e}};function da(e,t){if(1&e&&(b.TgZ(0,"div",38),b.TgZ(1,"span"),b.TgZ(2,"span",39),b._uU(3),b.qZA(),b.TgZ(4,"div",40),b.TgZ(5,"span"),b._uU(6),b.ALo(7,"date"),b.qZA(),b.TgZ(8,"span"),b._uU(9),b.ALo(10,"date"),b.qZA(),b.TgZ(11,"span"),b._uU(12),b.qZA(),b.qZA(),b.qZA(),b.qZA()),2&e){var n=t.data;b.xp6(3),b.AsE("",n.employmentRecord.employerName,", ",null==n.employmentRecord.country?null:n.employmentRecord.country.name,""),b.xp6(1),b.Q6J("ngClass",b.VKq(12,pa,!n.employmentRecord.endDate)),b.xp6(2),b.hij("",b.xi3(7,6,n.employmentRecord.startDate,"MMM y")," -\xa0"),b.xp6(3),b.hij("",n.employmentRecord.endDate?b.xi3(10,9,n.employmentRecord.endDate,"MMM y"):"Current","\xa0"),b.xp6(3),b.hij("(",n.employmentRecord.duration,")")}}function fa(e,t){if(1&e&&(b.TgZ(0,"div",41),b._UZ(1,"th-employment-record",42),b.qZA()),2&e){var n=t.data;b.xp6(1),b.Q6J("employmentRecord",n.employmentRecord)}}function ha(e,t){if(1&e&&(b.TgZ(0,"div"),b.TgZ(1,"h2",31),b._uU(2),b.qZA(),b.TgZ(3,"div",43),b.TgZ(4,"div"),b._UZ(5,"th-label-value",44),b.ALo(6,"thJoin"),b.ALo(7,"thPluck"),b._UZ(8,"th-label-value",45),b.ALo(9,"thJoin"),b.ALo(10,"thPluck"),b._UZ(11,"th-label-value",46),b.ALo(12,"thJoin"),b.ALo(13,"thPluck"),b._UZ(14,"th-label-value",47),b.ALo(15,"thJoin"),b.ALo(16,"thPluck"),b._UZ(17,"th-label-value",48),b.ALo(18,"thJoin"),b.ALo(19,"thPluck"),b.qZA(),b.TgZ(20,"div",49),b._UZ(21,"th-boxed-label-value",50),b.ALo(22,"thYesOrNo"),b._UZ(23,"th-boxed-label-value",51),b.ALo(24,"thYesOrNo"),b.qZA(),b.qZA(),b.qZA()),2&e){var n=t.teacher;b.xp6(2),b.hij("",n.firstName,"'s looking for"),b.xp6(3),b.Q6J("value",b.lcZ(6,8,b.lcZ(7,10,n.lookingForRoles))),b.xp6(3),b.Q6J("value",b.lcZ(9,12,b.lcZ(10,14,n.lookingForSubjects))),b.xp6(3),b.Q6J("value",b.lcZ(12,16,b.lcZ(13,18,n.lookingForCurriculums))),b.xp6(3),b.Q6J("value",b.lcZ(15,20,b.lcZ(16,22,n.lookingForAgeLevels))),b.xp6(3),b.Q6J("value",b.lcZ(18,24,b.lcZ(19,26,n.lookingForRegions))),b.xp6(4),b.Q6J("value",b.lcZ(22,28,n.lookingForChina)),b.xp6(2),b.Q6J("value",b.lcZ(24,30,n.isAvailableForRemoteTeaching))}}function ma(e,t){}function va(e,t){1&e&&b.YNc(0,ma,0,0,"ng-template")}function ga(e,t){}function ba(e,t){1&e&&b.YNc(0,ga,0,0,"ng-template")}function xa(e,t){}function Ta(e,t){1&e&&b.YNc(0,xa,0,0,"ng-template")}function Za(e,t){}function ya(e,t){1&e&&b.YNc(0,Za,0,0,"ng-template")}function Aa(e,t){}function wa(e,t){1&e&&b.YNc(0,Aa,0,0,"ng-template")}var Na=function(e){return{label:"Discount on school fees",preference:e}},Oa=function(e){return{label:"Ability to save",preference:e}},Ca=function(e){return{label:"Accommodation provided",preference:e}},ka=function(e){return{label:"Health insurance provided",preference:e}},qa=function(e){return{label:"Professional development support",preference:e}};function Ia(e,t){if(1&e&&(b.TgZ(0,"div"),b.TgZ(1,"h2",31),b._uU(2),b.qZA(),b.YNc(3,va,1,0,void 0,12),b.YNc(4,ba,1,0,void 0,12),b.YNc(5,Ta,1,0,void 0,12),b.YNc(6,ya,1,0,void 0,12),b.YNc(7,wa,1,0,void 0,12),b.qZA()),2&e){var n=t.teacher;b.oxw();var a=b.MAs(18);b.xp6(2),b.hij("",n.firstName,"'s preferences"),b.xp6(1),b.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",b.VKq(11,Na,n.discountOnSchoolFeesPreference)),b.xp6(1),b.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",b.VKq(13,Oa,n.abilityToSavePreference)),b.xp6(1),b.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",b.VKq(15,Ca,n.accommodationProvidedPreference)),b.xp6(1),b.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",b.VKq(17,ka,n.healthInsuranceProvidedPreference)),b.xp6(1),b.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",b.VKq(19,qa,n.professionalDevelopmentSupportPreference))}}function Sa(e,t){if(1&e&&(b.ynx(0),b.TgZ(1,"th-label-value",53),b._UZ(2,"th-percentage",54),b.qZA(),b.BQk()),2&e){var n=b.oxw(),a=n.label,r=n.preference;b.xp6(1),b.Q6J("label",a),b.xp6(1),b.Q6J("value",25*(5-r.order))("text",r.name)}
1}var Ya=function(){return[1,2,3,4]};function Ua(e,t){if(1&e&&b.YNc(0,Sa,3,3,"ng-container",52),2&e){var n=t.preference;b.Q6J("ngIf",n&&b.DdM(1,Ya).includes(n.order))}}function _a(e,t){1&e&&(b.TgZ(0,"div"),b._uU(1,"No"),b.qZA())}function Ja(e,t){if(1&e&&(b.TgZ(0,"div"),b._uU(1," Yes - "),b.TgZ(2,"th-a",61),b._uU(3),b.qZA(),b.qZA()),2&e){var n=b.oxw().teacher,a=b.oxw();b.xp6(2),b.Q6J("href","/teachers/"+n.partnerMemberNumber+(a.isExplorer?"?context=explorer":"")),b.xp6(1),b.Oqu(n.partnerMemberNumber)}}function Qa(e,t){if(1&e&&(b.TgZ(0,"div"),b.TgZ(1,"h2",55),b.TgZ(2,"span"),b._uU(3),b.qZA(),b._UZ(4,"th-info",56),b.qZA(),b._UZ(5,"th-label-value",57),b._UZ(6,"th-label-value",58),b._UZ(7,"th-label-value",59),b.TgZ(8,"th-label-value",60),b.YNc(9,_a,2,0,"div",52),b.YNc(10,Ja,4,2,"div",52),b.qZA(),b.qZA()),2&e){var n=t.teacher;b.xp6(3),b.hij("",n.firstName,"'s personal details"),b.xp6(2),b.Q6J("value",n.birthYear),b.xp6(1),b.Q6J("value",null==n.maritalStatus?null:n.maritalStatus.name),b.xp6(1),b.Q6J("value",n.numberOfDependentChildren),b.xp6(2),b.Q6J("ngIf",!n.partnerMemberNumber),b.xp6(1),b.Q6J("ngIf",n.partnerMemberNumber)}}var Ea=function(){var e=function(){function e(t,n,a,r,i){s(this,e),this.router=t,this.accordionHelperService=n,this.keyDetailsService=a,this.teacherService=r,this.userService=i,this.fieldGroups={},this.user=this.userService.user}return p(e,[{key:"ngOnInit",value:function(){var e=this;this.setObservables(),this.teacher$=this.getTeacher(),this.teacherService.setWindowTitle("Key details"),this.accordionEmploymentRecords$=this.teacher$.pipe((0,y.U)(function(t){return e.accordionHelperService.adaptToStandardListByName(t.employmentRecords,"employmentRecord")}))}},{key:"setObservables",value:function(){var e=this;this.router.events.pipe((0,Jn.O)("Initial load"),(0,v.h)(function(e){return"Initial load"===e||e instanceof m.m2})).subscribe(function(){var t=window.location.search.includes("context=explorer")?"explorer":void 0;e.isExplorer="explorer"===t})}},{key:"getTeacher",value:function(){var e=this;return this.teacherService.setEmploymentRecords().pipe((0,g.b)(function(t){!t||(e.keyDetailsService.decorate(t),e.fieldGroups=e.keyDetailsService.createFieldGroups(t))}))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(b.Y36(m.F0),b.Y36(Ot),b.Y36(En),b.Y36(ae),b.Y36(z.K))},e.\u0275cmp=b.Xpm({type:e,selectors:[["ng-component"]],decls:21,vars:4,consts:[[1,"p-4","xl:p-8"],[4,"ngIf","ngIfElse"],["loading",""],["backgroundAndQualificationsTemplate",""],["experienceTemplate",""],["accordionHeaderTemplate",""],["accordionBodyTemplate",""],["lookingForTemplate",""],["preferencesTemplate",""],["preferenceTemplate",""],["personalDetailsTemplate",""],[1,"my-2"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","my-4",4,"ngIf"],["class","mb-4",4,"ngIf"],[1,"mb-4"],[1,"mt-12","mb-8"],[1,"my-4"],[1,"mb-8","h4"],["label","Nationalities","type","ng-content","labelClass","w-1/3 sm:w-1/4","valueClass","w-2/3 sm:w-3/4"],[1,"flex","flex-wrap","align-middle"],[4,"ngFor","ngForOf"],["label","Education levels","labelClass","w-1/3 sm:w-1/4","valueClass","w-2/3 sm:w-3/4",3,"value"],[1,"grid","grid-cols-1","gap-8","xl:grid-cols-2","mt-8"],["label","Country of teaching qualification / certification",1,"w-full",3,"value"],["label","Current location",1,"w-full",3,"value"],[1,"mt-12"],["class","w-8 mr-2",3,"name",4,"ngIf"],["class","mr-2",4,"ngIf"],[1,"w-8","mr-2",3,"name"],[1,"mr-2"],[1,"h4"],[1,"grid","grid-cols-1","gap-8","xl:grid-cols-2"],["label","International experience",3,"value"],["label","Curriculum experience",3,"value"],["label","Number of years' teaching experience",1,"w-full",3,"value"],[1,"mt-8"],[3,"headerTemplate","bodyTemplate","list"],[1,"flex"],[1,"font-bold","text-blue","text-lg"],[1,"text-teal-70",3,"ngClass"],[2,"margin-left","5%"],[3,"employmentRecord"],[1,"grid","grid-cols-1","gap-4","xl:grid-cols-2"],["label","Role(s)",3,"value"],["label","Subject(s)",3,"value"],["label","Curricula of interest",3,"value"],["label","Age level",3,"value"],["label","Locations considered",3,"value"],[1,"flex","flex-col","gap-6"],["label","Interested in working in China",1,"w-full",3,"value"],["label","Interested in teaching remotely",1,"w-full",3,"value"],[4,"ngIf"],["type","ng-content","labelClass","w-5/12 leading-sm inline-block","valueClass","w-7/12 pr-16",3,"label"],["width","32",3,"value","text"],[1,"h4","flex","items-center"],["info","This section is important for some schools to ensure the candidate meets any key visa requirements for their country.","position","above",1,"ml-2","mb-1","leading-sm"],["label","Birth year","labelClass","w-1/2 lg:w-1/4","valueClass","w-1/2 lg:w-3/4",3,"value"],["label","Marital status","labelClass","w-1/2 lg:w-1/4","valueClass","w-1/2 lg:w-3/4",3,"value"],["label","Number of dependents","labelClass","w-1/2 lg:w-1/4","valueClass","w-1/2 lg:w-3/4",3,"value"],["label","Joint application","type","ng-content","labelClass","w-1/2 lg:w-1/4","valueClass","w-1/2 lg:w-3/4"],["target","_blank",1,"break-all",3,"href"]],template:function(e,t){if(1&e&&(b.TgZ(0,"div",0),b.YNc(1,ra,9,11,"div",1),b.ALo(2,"async"),b.qZA(),b.YNc(3,ia,1,0,"ng-template",null,2,b.W1O),b.YNc(5,sa,13,9,"
1ng-template",null,3,b.W1O),b.YNc(7,ua,13,13,"ng-template",null,4,b.W1O),b.YNc(9,da,13,14,"ng-template",null,5,b.W1O),b.YNc(11,fa,2,1,"ng-template",null,6,b.W1O),b.YNc(13,ha,25,32,"ng-template",null,7,b.W1O),b.YNc(15,Ia,8,21,"ng-template",null,8,b.W1O),b.YNc(17,Ua,1,2,"ng-template",null,9,b.W1O),b.YNc(19,Qa,11,6,"ng-template",null,10,b.W1O)),2&e){var n=b.MAs(4);b.xp6(1),b.Q6J("ngIf",b.lcZ(2,2,t.teacher$))("ngIfElse",n)}},directives:[c.O5,c.tP,re.OR,re.tT,c.sg,re.v_,re.bp,re.Zf,c.mk,Fn.oO,jn,re.Ue,re.Ot,re.D7],pipes:[c.Ov,re.As,re.FF,c.uU,re.Dk],styles:[""]}),e}(),Fa=i(80568),La=function(){var e=function(){function e(){s(this,e)}return p(e,[{key:"createFieldGroups",value:function(e){return{referenceInformation:e.createFieldGroup(["refereeName","refereeEmail","refereePhone","refereePosition","refereeOrganisationName","completionDate"])}}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=b.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}();function Ma(e,t){}function Pa(e,t){1&e&&b.YNc(0,Ma,0,0,"ng-template")}function Ra(e,t){}function ja(e,t){1&e&&b.YNc(0,Ra,0,0,"ng-template")}var Da=function(e){return{section:e}};function Ba(e,t){if(1&e&&(b.TgZ(0,"div"),b.YNc(1,ja,1,0,void 0,4),b.qZA()),2&e){var n=t.$implicit;b.oxw();var a=b.MAs(5);b.xp6(1),b.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",b.VKq(2,Da,n))}}function Va(e,t){if(1&e&&(b.TgZ(0,"th-label-value",13),b._uU(1),b.qZA()),2&e){var n=b.oxw(2);b.xp6(1),b.AsE(" ",n.reference.refereePosition," at ",n.reference.refereeOrganisationName," ")}}function Ha(e,t){if(1&e&&(b.TgZ(0,"fieldset",5),b.TgZ(1,"legend",6),b._uU(2),b.qZA(),b._UZ(3,"th-label-value",7),b._UZ(4,"th-label-value",8),b._UZ(5,"th-label-value",9),b.YNc(6,Va,2,2,"th-label-value",10),b._UZ(7,"th-label-value",11),b.ALo(8,"date"),b.TgZ(9,"th-button",12),b._uU(10,"Print or save as PDF"),b.qZA(),b.qZA()),2&e){var n=b.oxw();b.xp6(2),b.hij("Reference for ",n.fullName,""),b.xp6(1),b.Q6J("value",n.reference.refereeName),b.xp6(1),b.Q6J("value",n.reference.refereeEmail),b.xp6(1),b.Q6J("value",n.reference.refereePhone),b.xp6(1),b.Q6J("ngIf",n.reference.refereePosition&&n.reference.refereeOrganisationName),b.xp6(1),b.Q6J("value",b.Dn7(8,7,n.reference.completionDate,"d MMM y","UTC")),b.xp6(2),b.Q6J("href","/th/api/teachers/print-reference/"+n.reference.referenceId)}}function Ga(e,t){if(1&e&&(b.TgZ(0,"th",19),b._uU(1),b.qZA()),2&e){var n=t.$implicit;b.xp6(1),b.hij(" ",n," ")}}function Wa(e,t){1&e&&b._UZ(0,"th-icon2",24)}function Ka(e,t){1&e&&b._UZ(0,"th-icon2",25)}function $a(e,t){if(1&e&&(b.TgZ(0,"td",21),b.YNc(1,Wa,1,0,"th-icon2",22),b.YNc(2,Ka,1,0,"th-icon2",23),b.qZA()),2&e){var n=t.index,a=b.oxw(2).$implicit;b.xp6(1),b.Q6J("ngIf",a.index!=n),b.xp6(1),b.Q6J("ngIf",a.index==n)}}function za(e,t){if(1&e&&(b.ynx(0),b.TgZ(1,"td"),b._uU(2),b.qZA(),b.YNc(3,$a,3,2,"td",20),b.BQk()),2&e){var n=b.oxw().$implicit,a=b.oxw(2).section;b.xp6(2),b.hij(" ",n.question," "),b.xp6(1),b.Q6J("ngForOf",a.headers)}}function Xa(e,t){if(1&e&&(b.ynx(0),b.TgZ(1,"td",26),b.TgZ(2,"div",27),b._uU(3),b.qZA(),b.TgZ(4,"div",28),b._uU(5),b.qZA(),b.qZA(),b.BQk()),2&e){var n=b.oxw().$implicit,a=b.oxw(2).section;b.xp6(1),b.uIk("colspan",a.headers.length+1),b.xp6(2),b.Oqu(n.question),b.xp6(2),b.Oqu(n.response)}}function er(e,t){if(1&e&&(b.TgZ(0,"tr"),b.YNc(1,za,4,2,"ng-container",16),b.YNc(2,Xa,6,3,"ng-container",16),b.qZA()),2&e){var n=t.$implicit;b.xp6(1),b.Q6J("ngIf","table-row"==n.type),b.xp6(1),b.Q6J("ngIf","textarea"==n.type)}}function tr(e,t){if(1&e&&(b.TgZ(0,"table",17),b.TgZ(1,"thead"),b.TgZ(2,"tr"),b._UZ(3,"th"),b.YNc(4,Ga,2,1,"th",18),b.qZA(),b.qZA(),b.TgZ(5,"tbody"),b.YNc(6,er,3,2,"tr",1),b.qZA(),b.qZA()),2&e){var n=b.oxw().section;b.xp6(4),b.Q6J("ngForOf",n.headers),b.xp6(2),b.Q6J("ngForOf",n.questionResponses)}}function nr(e,t){1&e&&b._UZ(0,"th-icon2",24)}function ar(e,t){1&e&&b._UZ(0,"th-icon2",25)}function rr(e,t){if(1&e&&(b.TgZ(0,"tr"),b.TgZ(1,"td",33),b._uU(2),b.qZA(),b.TgZ(3,"td"),b.YNc(4,nr,1,0,"th-icon2",22),b.YNc(5,ar,1,0,"th-icon2",23),b.qZA(),b.qZA()),2&e){var n=t.$implicit,a=t.index,r=b.oxw(2).$implicit;b.xp6(2),b.Oqu(n),b.xp6(2),b.Q6J("ngIf",r.index!=a),b.xp6(1),b.Q6J("ngIf",r.index==a)}}function ir(e,t){if(1&e&&(b.ynx(0),b.TgZ(1,"thead"),b.TgZ(2,"tr"),b._UZ(3,"th",31),b.TgZ(4,"th",32),b._uU(5),b.qZA(),b.qZA(),b.qZA(),b.TgZ(6,"tbody"),b.YNc(7,rr,6,3,"tr",1),b.qZA(),b.BQk()),2&e){var n=b.oxw().$implicit,a=b.oxw(2).section;b.xp6(5),b.Oqu(n.question),b.xp6(2),b.Q6J("ngForOf",a.headers)}}function or(e,t){if(1&e&&(b.ynx(0),b.TgZ(1,"td",26),b.TgZ(2,"div",27),b._uU(3),b.qZA(),b.TgZ(4,"div",28),b._uU(5),b.qZA(),b.qZA(),b.BQk()),2&e){var n=b.oxw().$implicit,a=b.oxw(2).section;b.xp6(1),b.uIk("colspan",a.headers.length+1),b.xp6(2),b.Oqu(n.question),b.xp6(2),b.Oqu(n.response)}}function lr(e,t){if(1&e&&(b.TgZ(0,"table",30),b.YNc(1,ir,8,2,"ng-container",16),b.YNc(2,or,6,3,"ng-container",16),b.qZA()),2&e){var n=t.$implicit;b.xp6(1),b.Q6J("ngIf","table-row"==n.type),b.xp6(1),b.Q6J("ngIf","textarea"==n.type)}}function cr(e,t){if(1&e&&(b.ynx(0),b.YNc(1,lr,3,2,"table",29),b.BQk()),2&e){var n=b.oxw().section;b.xp6(1),b.Q6J("ngForOf",n.questionResponses)}}function sr(e,t){if(1&e&&(b.TgZ(0,"h3",14),b._uU(1),b.qZA(),b.YNc(2,tr,7,2,"table",15),b.YNc(3,cr,2,1,"ng-container",16)),2&e){var n=t.section,a=b.oxw();b.xp6(1),b.Oqu(n.name),b.xp6(1),b.Q6J("ngIf",a.showTable),b.xp6(1),b.Q6J("ngIf",!a.showTable)}}var ur=function(){var e=p(function e(){s(this,e)});return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=b.Xpm({type:e,selectors:[["th-teacher-reference"]],inputs:{reference:"reference",fullName:"fullName",showTable:"showTable"},decls:6,vars:2,consts:[[4,"ngTemplateOutlet"],[4,"ngFor","ngForOf"],["summaryTemplate",""],["evaluationTemplate",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"c-fieldset","border","border-solid","px-4"],[1,"px-2"],["label","Referee full name","labelClass","w-1/2 lg:w-1/3","valueClass","w-1/2 lg:w-2/3",3,"value"],["label","Referee email","labelClass","w-1/2 lg:w-1/3","valueClass","w-1/2 lg:w-2/3",3,"value"],["label","Referee phone number","labelClass","w-1/2 lg:w-1/3","valueClass","w-1/2 lg:w-2/3",3,"value"],["label","Relationship to candidate","type","ng-content","labelClass","w-1/2 lg:w-1/3","valueClass","w-1/2 lg:w-2/3",4,"ngIf"],["label","Date completed","labelClass","w-1/2 lg:w-1/3","valueClass","w-1/2 lg:w-2/3",3,"value"],["th-class","mb-5 btn-trans
1parent-coral btn-3xs",3,"href"],["label","Relationship to candidate","type","ng-content","labelClass","w-1/2 lg:w-1/3","valueClass","w-1/2 lg:w-2/3"],[1,"h4","mt-8"],["class","border-collapse",4,"ngIf"],[4,"ngIf"],[1,"border-collapse"],["class","font-bold",4,"ngFor","ngForOf"],[1,"font-bold"],["class","text-center",4,"ngFor","ngForOf"],[1,"text-center"],["name","check_box_outline_blank","class","th-icon material-icons",4,"ngIf"],["name","check_box","class","th-icon material-icons",4,"ngIf"],["name","check_box_outline_blank",1,"th-icon","material-icons"],["name","check_box",1,"th-icon","material-icons"],[1,"border-none","text-left"],[1,"font-bold","my-4"],[1,"textarea-response"],["class","border-collapse mt-0",4,"ngFor","ngForOf"],[1,"border-collapse","mt-0"],[2,"width","100px"],[2,"width","400px"],[1,"text-left"]],template:function(e,t){if(1&e&&(b.YNc(0,Pa,1,0,void 0,0),b.YNc(1,Ba,2,4,"div",1),b.YNc(2,Ha,11,11,"ng-template",null,2,b.W1O),b.YNc(4,sr,4,3,"ng-template",null,3,b.W1O)),2&e){var n=b.MAs(3);b.Q6J("ngTemplateOutlet",n),b.xp6(1),b.Q6J("ngForOf",t.reference.formData.sections)}},directives:[c.tP,c.sg,re.tT,c.O5,re.r0,re.bp],pipes:[c.uU],styles:[".mat-expansion-panel-content{color:var(--color-blue)}.c-fieldset[_ngcontent-%COMP%]   .c-info-icon[_ngcontent-%COMP%]{font-size:22px;color:var(--color-blue-30);cursor:pointer;transition:color .25s ease-out}.c-fieldset[_ngcontent-%COMP%]   .c-info-icon[_ngcontent-%COMP%]:hover{color:var(--color-blue)}table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{width:100%;border:1.5px solid var(--color-blue);padding:.1em .5em}"]}),e}();function pr(e,t){if(1&e&&(b.ynx(0),b._UZ(1,"th-accordion",6),b.ALo(2,"async"),b.BQk()),2&e){var n=b.oxw(),a=b.MAs(9),r=b.MAs(11);b.xp6(1),b.Q6J("headerTemplate",a)("bodyTemplate",r)("list",b.lcZ(2,3,n.accordionReferences$))}}function dr(e,t){1&e&&b._UZ(0,"th-spinner")}function fr(e,t){if(1&e&&b._UZ(0,"th-star-rating",11),2&e){var n=b.oxw().data;b.Q6J("score",n.reference.score/20)("outOf",5)}}function hr(e,t){if(1&e&&(b.TgZ(0,"div",7),b.TgZ(1,"div",8),b._uU(2),b.qZA(),b.TgZ(3,"div"),b.TgZ(4,"span",9),b._uU(5),b.ALo(6,"date"),b.qZA(),b.YNc(7,fr,1,2,"th-star-rating",10),b.qZA(),b.qZA()),2&e){var n=t.data;b.xp6(2),b.AsE(" ",n.reference.refereePosition," - ",n.reference.refereeName," "),b.xp6(3),b.Oqu(b.xi3(6,4,n.reference.completionDate,"MMM y")),b.xp6(2),b.Q6J("ngIf",n.reference.score)}}function mr(e,t){1&e&&(b.TgZ(0,"div"),b.TgZ(1,"p"),b._uU(2,"This reference has been completed and can be viewed by schools interested in your profile."),b.qZA(),b.qZA())}function vr(e,t){}function gr(e,t){1&e&&b.YNc(0,vr,0,0,"ng-template")}var br=function(e){return{referenceId:e}};function xr(e,t){if(1&e&&(b.TgZ(0,"div"),b.TgZ(1,"div",13),b._UZ(2,"th-teacher-reference",14),b.qZA(),b.YNc(3,gr,1,0,void 0,15),b.qZA()),2&e){var n=b.oxw().data,a=b.oxw(),r=b.MAs(13);b.xp6(2),b.Q6J("reference",n.reference)("fullName",n.teacher.fullName)("showTable",a.showTable),b.xp6(1),b.Q6J("ngTemplateOutlet",r)("ngTemplateOutletContext",b.VKq(5,br,n.reference.referenceId))}}var Tr=function(){return["admin","school"]};function Zr(e,t){if(1&e&&(b.YNc(0,mr,3,0,"div",12),b.YNc(1,xr,4,7,"div",12)),2&e){var n=t.data;b.Q6J("ngIf",n.user.isTeacher),b.xp6(1),b.Q6J("ngIf",n.user.in(b.DdM(2,Tr)))}}function yr(e,t){1&e&&(b.TgZ(0,"th-button",16),b._uU(1,"Print or save as PDF"),b.qZA()),2&e&&b.Q6J("href","/th/api/teachers/print-reference/"+t.referenceId)}var Ar=function(){var e=function(){function e(t,n,a,r,i){s(this,e),this.breakpointObserver=t,this.teacherService=n,this.referencesService=a,this.userService=r,this.accordionHelperService=i,this.fieldGroups={},this.user=this.userService.user}return p(e,[{key:"ngOnInit",value:function(){var e=this;this.teacher$=this.getTeacher(),this.teacherService.setWindowTitle("References"),this.setObservables(),this.breakpointObserver.observe(["(min-width: 680px) and (max-width: 960px)","(min-width: 1240px)"]).subscribe(function(t){e.showTable=!!t.matches})}},{key:"getTeacher",value:function(){var e=this;return this.teacherService.setReferences().pipe((0,g.b)(function(t){!t||(e.fieldGroups=e.referencesService.createFieldGroups(t))}))}},{key:"setObservables",value:function(){var e=this;this.accordionReferences$=this.teacher$.pipe((0,y.U)(function(t){var n=t.references.map(function(n){return{reference:n,teacher:t,user:e.user}});return e.accordionHelperService.adaptToStandardList(n)}))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(b.Y36(Fa.Yg),b.Y36(ae),b.Y36(La),b.Y36(z.K),b.Y36(Ot))},e.\u0275cmp=b.Xpm({type:e,selectors:[["ng-component"]],decls:14,vars:4,consts:[[1,"p-4","xl:p-8"],[4,"ngIf","ngIfElse"],["loading",""],["accordionHeaderTemplate",""],["accordionBodyTemplate",""],["saveCVTemplate",""],[1,"c-accordion",3,"headerTemplate","bodyTemplate","list"],[1,"flex","flex-col"],[1,"text-lg","text-blue","font-bold"],[1,"text-teal"],["class","ml-4 mr-2 align-middle text-coral",3,"score","outOf",4,"ngIf"],[1,"ml-4","mr-2","align-middle","text-coral",3,"score","outOf"],[4,"ngIf"],[1,"mb-8"],[3,"reference","fullName","showTable"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["th-class","mb-5 btn-coral btn-3xs",3,"href"]],template:function(e,t){if(1&e&&(b.TgZ(0,"div",0),b.TgZ(1,"div"),b.TgZ(2,"p"),b._uU(3,"Below are listed the references completed we hold on record for the candidate."),b.qZA(),b.YNc(4,pr,3,5,"ng-container",1),b.ALo(5,"async"),b.qZA(),b.qZA(),b.YNc(6,dr,1,0,"ng-template",null,2,b.W1O),b.YNc(8,hr,8,7,"ng-template",null,3,b.W1O),b.YNc(10,Zr,2,3,"ng-template",null,4,b.W1O),b.YNc(12,yr,2,1,"ng-template",null,5,b.W1O)),2&e){var n=b.MAs(7);b.xp6(4),b.Q6J("ngIf",b.lcZ(5,2,t.teacher$))("ngIfElse",n)}},directives:[c.O5,re.Zf,re.OR,re.Te,ur,c.tP,re.r0],pipes:[c.Ov,c.uU],encapsulation:2}),e}(),wr=["videoCarouselColumnTemplate"],Nr=["photoCarouselColumnTemplate"];function Or(e,t){1&e&&b.Hsn(0,0,["*ngTemplateOutlet","documentsTemplate; context: { teacher: teacher }"])}function Cr(e,t){1&e&&b.Hsn(0,1,["*ngTemplateOutlet","videosTemplate; context: { teacher: teacher }"])}function kr(e,t){1&e&&b.Hsn(0,2,["*ngTemplateOutlet","photosTemplate; context: { teacher: teacher }"])}var qr=function(e){return{teacher:e}};function Ir(e,t){if(1&e&&(b.TgZ(0,"div",18),b.YNc(1,Cr,1,0,"ng-content",15),b.YNc(2,kr,1,0,"ng-content",15),b.qZA()),2&e){var n=b.oxw().ngIf;b.oxw();var a=b.MAs(12),r=b.MAs(16);b.xp6(1),b.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",b.VKq(4,qr,n
1)),b.xp6(1),b.Q6J("ngTemplateOutlet",r)("ngTemplateOutletContext",b.VKq(6,qr,n))}}function Sr(e,t){}function Yr(e,t){1&e&&b.YNc(0,Sr,0,0,"ng-template")}function Ur(e,t){}function _r(e,t){1&e&&b.YNc(0,Ur,0,0,"ng-template")}function Jr(e,t){}function Qr(e,t){1&e&&b.YNc(0,Jr,0,0,"ng-template")}function Er(e,t){if(1&e&&(b.ynx(0),b.TgZ(1,"div",13),b.TgZ(2,"div",14),b.YNc(3,Or,1,0,"ng-content",15),b.qZA(),b.YNc(4,Ir,3,8,"div",16),b.qZA(),b.TgZ(5,"div",17),b.YNc(6,Yr,1,0,void 0,15),b.TgZ(7,"div"),b.YNc(8,_r,1,0,void 0,15),b.YNc(9,Qr,1,0,void 0,15),b.qZA(),b.qZA(),b.BQk()),2&e){var n=t.ngIf;b.oxw();var a=b.MAs(6),r=b.MAs(20),i=b.MAs(22),o=b.MAs(24);b.xp6(3),b.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",b.VKq(9,qr,n)),b.xp6(1),b.Q6J("ngIf",(null==n.videos?null:n.videos.length)>0||(null==n.photos?null:n.photos.length)>0),b.xp6(2),b.Q6J("ngTemplateOutlet",r)("ngTemplateOutletContext",b.VKq(11,qr,n)),b.xp6(2),b.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",b.VKq(13,qr,n)),b.xp6(1),b.Q6J("ngTemplateOutlet",o)("ngTemplateOutletContext",b.VKq(15,qr,n))}}function Fr(e,t){1&e&&b._UZ(0,"th-spinner")}function Lr(e,t){if(1&e&&(b.TgZ(0,"h2",19),b._uU(1),b.qZA(),b._UZ(2,"th-accordion",20),b.ALo(3,"async")),2&e){var n=t.teacher,a=b.oxw(),r=b.MAs(8),i=b.MAs(10);b.xp6(1),b.hij("",n.firstName,"'s supporting documents"),b.xp6(1),b.Q6J("headerTemplate",r)("bodyTemplate",i)("list",b.lcZ(3,4,a.accordionSupportingDocuments$))}}function Mr(e,t){if(1&e&&(b.TgZ(0,"div",21),b._UZ(1,"th-icon2",22),b.TgZ(2,"span",23),b._uU(3),b.qZA(),b.qZA()),2&e){var n=t.data;b.xp6(1),b.Q6J("name",n.icon),b.xp6(2),b.Oqu(n.label)}}function Pr(e,t){1&e&&b._UZ(0,"th-document-list",24),2&e&&b.Q6J("documents",t.data.documents)}function Rr(e,t){if(1&e&&(b.TgZ(0,"div",26),b._UZ(1,"hr",27),b.TgZ(2,"h2",19),b._uU(3),b.qZA(),b.TgZ(4,"div",28),b._UZ(5,"th-carousel",29),b.qZA(),b.qZA()),2&e){var n=b.oxw().teacher,a=b.oxw();b.xp6(3),b.hij("",n.firstName,"'s videos"),b.xp6(2),b.Q6J("columns",a.videoCarouselColumns)("showLeftRight",!1)("debug",!1)}}function jr(e,t){if(1&e&&b.YNc(0,Rr,6,4,"div",25),2&e){var n=b.oxw();b.Q6J("ngIf",n.videoCarouselColumns.length>0)}}function Dr(e,t){if(1&e&&(b.TgZ(0,"div",30),b.TgZ(1,"div",26),b._UZ(2,"th-video",31),b.TgZ(3,"div",32),b._uU(4),b.qZA(),b.qZA(),b.qZA()),2&e){var n=t.embedUrl,a=t.label;b.xp6(2),b.Q6J("url",n),b.xp6(2),b.Oqu(a)}}function Br(e,t){if(1&e&&(b.TgZ(0,"div",28),b._UZ(1,"th-carousel",29),b.qZA()),2&e){var n=b.oxw(3);b.xp6(1),b.Q6J("columns",n.photoCarouselColumns)("showLeftRight",!1)("debug",!1)}}var Vr=function(e){return{"xl:hidden":e}};function Hr(e,t){if(1&e&&(b.TgZ(0,"div",26),b._UZ(1,"hr",33),b.TgZ(2,"h2",19),b._uU(3),b.qZA(),b.YNc(4,Br,2,3,"div",34),b.qZA()),2&e){var n=b.oxw().teacher,a=b.oxw();b.xp6(1),b.Q6J("ngClass",b.VKq(3,Vr,0===(null==n.videos?null:n.videos.length))),b.xp6(2),b.hij("",n.firstName,"'s photos"),b.xp6(1),b.Q6J("ngIf",a.photoCarouselColumns)}}function Gr(e,t){if(1&e&&b.YNc(0,Hr,5,5,"div",25),2&e){var n=b.oxw();b.Q6J("ngIf",n.photoCarouselColumns.length>0)}}function Wr(e,t){if(1&e&&(b.TgZ(0,"div",35),b.TgZ(1,"div",26),b.TgZ(2,"div",36),b.TgZ(3,"div",37),b._UZ(4,"img",38),b.qZA(),b.qZA(),b.TgZ(5,"div",39),b._uU(6),b.qZA(),b.qZA(),b.qZA()),2&e){var n=t.urlPathComponent,a=t.label;b.xp6(4),b.Q6J("alt",a)("src",n,b.LSH),b.xp6(2),b.Oqu(a)}}function Kr(e,t){if(1&e&&(b.TgZ(0,"li"),b._uU(1),b.qZA()),2&e){var n=t.$implicit;b.xp6(1),b.Oqu(n.name)}}function $r(e,t){if(1&e&&(b.TgZ(0,"section"),b._UZ(1,"hr",41),b.TgZ(2,"h2",19),b._uU(3),b.qZA(),b.TgZ(4,"ul",42),b.YNc(5,Kr,2,1,"li",43),b.qZA(),b.qZA()),2&e){var n=b.oxw().teacher;b.xp6(3),b.hij("",n.firstName,"'s IT and computer skills"),b.xp6(2),b.Q6J("ngForOf",n.computerSkills)}}function zr(e,t){if(1&e&&b.YNc(0,$r,6,2,"section",40),2&e){var n=t.teacher;b.Q6J("ngIf",(null==n.computerSkills?null:n.computerSkills.length)>0)}}function Xr(e,t){if(1&e&&(b.TgZ(0,"li"),b._uU(1),b.qZA()),2&e){var n=t.$implicit;b.xp6(1),b.Oqu(n.name)}}function ei(e,t){if(1&e&&(b.TgZ(0,"section"),b._UZ(1,"hr",41),b.TgZ(2,"h2",19),b._uU(3),b.qZA(),b.TgZ(4,"ul",42),b.YNc(5,Xr,2,1,"li",43),b.qZA(),b.qZA()),2&e){var n=b.oxw().teacher;b.xp6(3),b.hij("",n.firstName,"'s teaching skills and training"),b.xp6(2),b.Q6J("ngForOf",n.teachingSkills)}}function ti(e,t){if(1&e&&b.YNc(0,ei,6,2,"section",40),2&e){var n=t.teacher;b.Q6J("ngIf",(null==n.teachingSkills?null:n.teachingSkills.length)>0)}}function ni(e,t){if(1&e&&(b.TgZ(0,"li"),b._uU(1),b.qZA()),2&e){var n=t.$implicit;b.xp6(1),b.Oqu(n.name)}}function ai(e,t){if(1&e&&(b.TgZ(0,"section"),b._UZ(1,"hr",41),b.TgZ(2,"h2",19),b._uU(3),b.qZA(),b.TgZ(4,"ul",42),b.YNc(5,ni,2,1,"li",43),b.qZA(),b.qZA()),2&e){var n=b.oxw().teacher;b.xp6(3),b.hij("",n.firstName," speaks fluently"),b.xp6(2),b.Q6J("ngForOf",n.fluentLanguages)}}function ri(e,t){if(1&e&&b.YNc(0,ai,6,2,"section",40),2&e){var n=t.teacher;b.Q6J("ngIf",(null==n.fluentLanguages?null:n.fluentLanguages.length)>0)}}var ii=["*","*","*"],oi=function(){var e=function(e){t(r,e);var n=a(r);function r(e,t){var a;
1return s(this,r),(a=n.call(this)).accordionHelperService=e,a.teacherService=t,a.fieldGroups={},a.videoCarouselColumns=[],a.photoCarouselColumns=[],a}return p(r,[{key:"ngOnInit",value:function(){this.teacher$=this.getTeacher(),this.teacherService.setWindowTitle("Supporting information"),this.setTeacherRelatedMedia().subscribe(),this.setObservables()}},{key:"getTeacher",value:function(){return this.teacherService.setDocuments().pipe((0,g.b)(function(e){}))}},{key:"setTeacherRelatedMedia",value:function(){var e=this;return this.teacherService.setTeacherRelatedMedia().pipe((0,g.b)(function(t){if(t){var n=t.videos.map(function(t){return{template:e.videoCarouselColumnTemplate,context:{embedUrl:t.embedUrl,label:t.derivedCaption}}}),a=t.photos.map(function(t){return{template:e.photoCarouselColumnTemplate,context:{urlPathComponent:t.urlPathComponent,label:t.derivedCaption}}});setTimeout(function(){e.videoCarouselColumns=n,e.photoCarouselColumns=a})}}))}},{key:"setObservables",value:function(){var e=this;this.accordionSupportingDocuments$=this.teacher$.pipe((0,y.U)(function(t){var n=t.documentCategories.filter(function(e){var t;return(null===(t=e.documents)||void 0===t?void 0:t.length)>0});return e.accordionHelperService.adaptToStandardList(n)}))}}]),r}(Nt.n);return e.\u0275fac=function(t){return new(t||e)(b.Y36(Ot),b.Y36(ae))},e.\u0275cmp=b.Xpm({type:e,selectors:[["ng-component"]],viewQuery:function(e,t){var n;(1&e&&(b.Gf(wr,5),b.Gf(Nr,5)),2&e)&&(b.iGM(n=b.CRH())&&(t.videoCarouselColumnTemplate=n.first),b.iGM(n=b.CRH())&&(t.photoCarouselColumnTemplate=n.first))},features:[b.qOj],ngContentSelectors:ii,decls:25,vars:4,consts:[[1,"p-4","xl:p-8"],[4,"ngIf","ngIfElse"],["loading",""],["documentsTemplate",""],["accordionHeaderTemplate",""],["accordionBodyTemplate",""],["videosTemplate",""],["videoCarouselColumnTemplate",""],["photosTemplate",""],["photoCarouselColumnTemplate",""],["computerSkillsTemplate",""],["teachingSkillsTemplate",""],["languageSkillsTemplate",""],[1,"flex","flex-wrap","gap-6"],[1,"w-full","xl:flex-1"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","flex flex-col w-full xl:w-1/2",4,"ngIf"],[1,"grid","grid-cols-1","gap-4","xl:grid-cols-2"],[1,"flex","flex-col","w-full","xl:w-1/2"],[1,"h4"],[1,"c-accordion",3,"headerTemplate","bodyTemplate","list"],[1,"flex"],[1,"flex","items-center","justify-center","w-8","text-teal",3,"name"],[1,"flex-1","text-lg","font-bold","leading-sm","text-blue"],[1,"text-blue",3,"documents"],["class","w-full",4,"ngIf"],[1,"w-full"],[1,"my-6","xl:hidden"],[1,"mt-4"],["autoplayIntervalInMs","0",3,"columns","showLeftRight","debug"],[1,"inline-flex","items-center","w-full","whitespace-normal"],["maxWidth","800px",1,"w-full","c-video",3,"url"],[1,"w-full","mt-2","text-center","text-2xs"],[1,"my-6",3,"ngClass"],["class","mt-4",4,"ngIf"],[1,"inline-flex","w-full"],[1,"w-full","aspect-ratio-container","aspect-ratio-container-16/9"],[1,"aspect-ratio-item"],[1,"aspect-ratio-item",3,"alt","src"],[1,"w-full","mt-2","text-center","break-all","text-2xs"],[4,"ngIf"],[1,"my-6"],[1,"ml-4","list-fas-check","list-flex","list-mr-4"],[4,"ngFor","ngForOf"]],template:function(e,t){if(1&e&&(b.F$t(ii),b.TgZ(0,"div",0),b.YNc(1,Er,10,17,"ng-container",1),b.ALo(2,"async"),b.qZA(),b.YNc(3,Fr,1,0,"ng-template",null,2,b.W1O),b.YNc(5,Lr,4,6,"ng-template",null,3,b.W1O),b.YNc(7,Mr,4,2,"ng-template",null,4,b.W1O),b.YNc(9,Pr,1,1,"ng-template",null,5,b.W1O),b.YNc(11,jr,1,1,"ng-template",null,6,b.W1O),b.YNc(13,Dr,5,2,"ng-template",null,7,b.W1O),b.YNc(15,Gr,1,1,"ng-template",null,8,b.W1O),b.YNc(17,Wr,7,3,"ng-template",null,9,b.W1O),b.YNc(19,zr,1,1,"ng-template",null,10,b.W1O),b.YNc(21,ti,1,1,"ng-template",null,11,b.W1O),b.YNc(23,ri,1,1,"ng-template",null,12,b.W1O)),2&e){var n=b.MAs(4);b.xp6(1),b.Q6J("ngIf",b.lcZ(2,2,t.teacher$))("ngIfElse",n)}},directives:[c.O5,c.tP,re.OR,re.Zf,re.bp,re.d0,re.Fy,re.jg,c.mk,Fn.oO,c.sg],pipes:[c.Ov],styles:["[_nghost-%COMP%]     .c-accordion .mat-expansion-panel-header>.mat-content{margin:8px 12px 8px 0!important}"]}),e}(),li=i(87519),ci=i(15257),si=i(83550),ui=i(33637),pi=i(26561);function di(e){var t=e.subscriber,n=e.counter,a=e.period;t.next(n),this.schedule({subscriber:t,counter:n+1,period:a},a)}function fi(e,t){}function hi(e,t){1&e&&b.YNc(0,fi,0,0,"ng-template")}function mi(e,t){}function vi(e,t){1&e&&b.YNc(0,mi,0,0,"ng-template")}function gi(e,t){}function bi(e,t){1&e&&b.YNc(0,gi,0,0,"ng-template")}function xi(e,t){}function Ti(e,t){1&e&&b.YNc(0,xi,0,0,"ng-template")}function Zi(e,t){}function yi(e,t){1&e&&b.YNc(0,Zi,0,0,"ng-template")}function Ai(e,t){}function wi(e,t){1&e&&b.YNc(0,Ai,0,0,"ng-template")}function Ni(e,t){}function Oi(e,t){1&e&&b.YNc(0,Ni,0,0,"ng-template")}function Ci(e,t){}function ki(e,t){1&e&&b.YNc(0,Ci,0,0,"ng-template")}function qi(e,t){}function Ii(e,t){1&e&&b.YNc(0,qi,0,0,"ng-template")}function Si(e,t){}function Yi(e,t){1&e&&b.YNc(0,Si,0,0,"ng-template")}function Ui(e,t){}function _i(e,t){1&e&&b.YNc(0,Ui,0,0,"ng-template")}function Ji(e,t){}function Qi(e,t){1&e&&b.YNc(0,Ji,0,0,"ng-template")}function Ei(e,t){}function Fi(e,t){1&e&&b.YNc(0,Ei,0,0,"ng-template")}function Li(e,t){}function Mi(e,t){1&e&&b.YNc(0,Li,0,0,"ng-template")}var Pi=function(e){return{teacher:e}},Ri=function(e){return{teacher:e,title:"Looking for"}},ji=function(e){return{teacher:e,title:"Preferences"}},Di=function(e){return{teacher:e,title:"Supporting documents* and visual media"}},Bi=function(e){return{teacher:e,title:"IT and computer skills"}},Vi=function(e){return{teacher:e,title:"Teaching skills and training"}},Hi=function(e){return{teacher:e,title:"Speaks fluently"}},Gi=function(e){return{teacher:e,title:"References*"}};function Wi(e,t){if(1&e&&(b.TgZ(0,"div",18),b.YNc(1,hi,1,0,void 0,19),b.YNc(2,vi,1,0,void 0,20),b.YNc(3,bi,1,0,void 0,20),b.YNc(4,Ti,1,0,void 0,20),b.YNc(5,yi,1,0,void 0,20),b.YNc(6,wi,1,0,void 0,20),b.YNc(7,Oi,1,0,void 0,20),b.YNc(8,ki,1,0,void 0,20),b.YNc(9,Ii,1,0,void 0,20),b.YNc(10,Yi,1,0,void 0,20),b.YNc(11,_i,1,0,void 0,20),b.YNc(12,Qi,1,0,void 0,20),b.YNc(13,Fi,1,0,void 0,19),b.YNc(14,Mi,1,0,void 0,19),b.qZA()),2&e){var n=t.ngIf;b.oxw();var a=b.MAs(6),r=b.MAs(8),i=b.MAs(10),o=b.MAs(12),l=b.MAs(14),c=b.MAs(18),s=b.MAs(20),u=b.MAs(24),p=b.MAs(26),d=b.MAs(28),f=b.MAs(30),h=b.MAs(32),m=b.MAs(34);b.xp6(1),b.Q6J("ngTemplateOutlet",a),b.xp6(1),b.Q6J("ngTemplateOutlet",r)("ngTemplateOutletContext",b.VKq(25,Pi,n)),b.xp6(1),b.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",b.VKq(27,Pi,n)),b.xp6(1),b.Q6J("ngTemplateOutlet",o)("ngTemplateOutletContext",b.VKq(29,Pi,n)),b.xp6(1),b.Q6J("ngTemplateOutlet",l)("ngTemplateOutletContext",b.VKq(31,Pi,n)),b.xp6(1),b.Q6J("ngTemplateOutlet",c)("ngTemplateOutletContext",b.VKq(33,Ri,n)),b.xp6(1),b.Q6J("ngTemplateOutlet",s)("ngTemplateOutletContext",b.VKq(35,ji,n)),b.xp6(1),b.Q6J("ngTemplateOutlet",u)("ngTemplateOutletContext",b.VKq(37,Di,n)),b.xp6(1),b.Q6J("ngTemplateOutlet",p)("ngTemplateOutletContext",b.VKq(39,Bi,n)),b.xp6(1),b.Q6J("ngTemplateOutlet",d)("ngTemplateOutletContext",b.VKq(41,Vi,n)),b.xp6(1),b.Q6J("ngTemplateOutlet",f)("ngTemplateOutletContext",b.VKq(43,Hi,n)),b.xp6(1),b.Q6J("ngTemplateOutlet",h)("ngTemplateOutletContext",b.VKq(45,Gi,n)),b.xp6(1),b.Q6J("ngTemplateOutlet",m),b.xp6(1),b.Q6J("ngTemplateOutlet",a)}}function Ki(e,t){1&e&&b._UZ(0,"th-spinner")}function $i(e,t){if(1&e){var n=b.EpF();b.TgZ(0,"div",21),b.TgZ(1,"th-button",22),b.NdJ("click",function(){return b.CHM(n),b.oxw().print()}),b._uU(2,"Print"),b.qZA(),b.qZA()}}function zi(e,t){if(1&e&&(b.TgZ(0,"div",23),b.TgZ(1,"div",24),b._UZ(2,"th-circle-image",25),b.qZA(),b.TgZ(3,"div",26),b._UZ(4,"img",27),b.qZA(),b.qZA()),2&e){var n=t.teacher;b.xp6(2),b.Q6J("url",n.photoUrl||"/assets/user/anonymous-profile-photo.jpg")}}function Xi(e,t){if(1&e&&b._UZ(0,"th-label-value",36),2&e){var n=b.oxw(2);b.Q6J("value",n.averageReferenceScoreText)}}function eo(e,t){if(1&e&&(b.TgZ(0,"div"),b._UZ(1,"th-label-value",37),b.qZA()),2&e){var n=b.oxw().teacher;b.xp6(1),b.Q6J("value","Yes - with candidate "+n.partnerMemberNumber)}}function to(e,t){if(1&e&&(b.TgZ(0,"div"),b._UZ(1,"th-label-value",38),b.ALo(2,"date"),b.qZA()),2&e){var n=b.oxw().teacher;b.xp6(1),b.Q6J("value",b.Dn7(2,1,"Available from "+n.availableFromDate,"d MMM y","UTC"))}}var no=function(){return["admin","school"]}
1;function ao(e,t){if(1&e&&(b.TgZ(0,"div",28),b.TgZ(1,"h1",29),b._uU(2),b.qZA(),b.TgZ(3,"div"),b._UZ(4,"th-label-value",30),b._UZ(5,"th-label-value",31),b.YNc(6,Xi,1,1,"th-label-value",32),b._UZ(7,"th-label-value",33),b.YNc(8,eo,2,1,"div",34),b.YNc(9,to,3,5,"div",34),b.TgZ(10,"th-label-value",35),b.TgZ(11,"div"),b.TgZ(12,"span"),b._uU(13),b.qZA(),b.TgZ(14,"span"),b._uU(15),b.ALo(16,"date"),b.qZA(),b.qZA(),b.qZA(),b.qZA(),b.qZA()),2&e){var n=t.teacher,a=b.oxw();b.xp6(2),b.AsE("",n.firstName," ",n.lastName,"'s profile summary"),b.xp6(2),b.Q6J("value",n.memberNumber),b.xp6(1),b.Q6J("value",null==n.internationalExperience?null:n.internationalExperience.name),b.xp6(1),b.Q6J("ngIf",a.user.in(b.DdM(13,no))),b.xp6(1),b.Q6J("value",null==n.jobSeekingStatus?null:n.jobSeekingStatus.name),b.xp6(1),b.Q6J("ngIf",n.partnerMemberNumber),b.xp6(1),b.Q6J("ngIf",n.availableFromDate),b.xp6(4),b.hij("",n.percentageComplete,"% (updated "),b.xp6(2),b.hij("",b.xi3(16,10,n.latestUpdateDate,"d MMM yyyy"),")")}}function ro(e,t){1&e&&(b.TgZ(0,"span",49),b._uU(1,","),b.qZA())}function io(e,t){if(1&e&&(b.ynx(0),b.TgZ(1,"span"),b._uU(2),b.qZA(),b.YNc(3,ro,2,0,"span",48),b.BQk()),2&e){var n=t.$implicit,a=t.last;b.xp6(2),b.Oqu(n.name),b.xp6(1),b.Q6J("ngIf",!a)}}function oo(e,t){if(1&e&&(b.TgZ(0,"th-label-value",45),b.TgZ(1,"div",46),b.YNc(2,io,4,2,"ng-container",47),b.qZA(),b.qZA()),2&e){var n=b.oxw().teacher;b.xp6(2),b.Q6J("ngForOf",n.nationalities)}}function lo(e,t){if(1&e&&(b.TgZ(0,"div",39),b.TgZ(1,"h4",40),b._uU(2,"Background and qualifications"),b.qZA(),b.YNc(3,oo,3,1,"th-label-value",41),b._UZ(4,"th-label-value",42),b.ALo(5,"thJoin"),b.ALo(6,"thPluck"),b._UZ(7,"th-label-value",43),b._UZ(8,"th-label-value",44),b.qZA()),2&e){var n=t.teacher;b.xp6(3),b.Q6J("ngIf",(null==n.nationalities?null:n.nationalities.length)>0),b.xp6(1),b.Q6J("value",b.lcZ(5,4,b.lcZ(6,6,n.completedEducationLevels))),b.xp6(3),b.Q6J("value",null==n.qualificationCountry?null:n.qualificationCountry.name),b.xp6(1),b.Q6J("value",null==n.currentCountry?null:n.currentCountry.name)}}function co(e,t){}function so(e,t){1&e&&b.YNc(0,co,0,0,"ng-template")}var uo=function(e){return{employmentRecords:e}};function po(e,t){if(1&e&&(b.TgZ(0,"div"),b.YNc(1,so,1,0,void 0,20),b.qZA()),2&e){var n=b.oxw(2).teacher;b.oxw();var a=b.MAs(16);b.xp6(1),b.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",b.VKq(2,uo,n.employmentRecords))}}function fo(e,t){if(1&e&&(b.TgZ(0,"div",28),b.TgZ(1,"div",51),b.TgZ(2,"h4",40),b._uU(3,"Experience"),b.qZA(),b._UZ(4,"th-label-value",31),b._UZ(5,"th-label-value",52),b.ALo(6,"thJoin"),b.ALo(7,"thPluck"),b._UZ(8,"th-label-value",53),b.qZA(),b.YNc(9,po,2,4,"div",34),b.qZA()),2&e){var n=b.oxw().teacher;b.xp6(4),b.Q6J("value",null==n.internationalExperience?null:n.internationalExperience.name),b.xp6(1),b.Q6J("value",b.lcZ(6,4,b.lcZ(7,6,n.curriculumExperience))),b.xp6(3),b.Q6J("value",n.numberOfYearsTeachingExperience),b.xp6(1),b.Q6J("ngIf",n.employmentRecords)}}function ho(e,t){if(1&e&&b.YNc(0,fo,10,8,"div",50),2&e){var n=b.oxw();b.Q6J("ngIf",!n.keyDetailsFieldGroups.experienceAndQualifications.isEmpty)}}function mo(e,t){if(1&e&&(b.TgZ(0,"div",51),b._UZ(1,"th-employment-record",55),b.qZA()),2&e){var n=t.$implicit;b.xp6(1),b.Q6J("employmentRecord",n)}}function vo(e,t){1&e&&b.YNc(0,mo,2,1,"div",54),2&e&&b.Q6J("ngForOf",t.employmentRecords)}function go(e,t){if(1&e&&(b.TgZ(0,"div",39),b.TgZ(1,"h4",40),b._uU(2),b.qZA(),b._UZ(3,"th-label-value",57),b.ALo(4,"thJoin"),b.ALo(5,"thPluck"),b._UZ(6,"th-label-value",58),b.ALo(7,"thJoin"),b.ALo(8,"thPluck"),b._UZ(9,"th-label-value",59),b.ALo(10,"thJoin"),b.ALo(11,"thPluck"),b._UZ(12,"th-label-value",60),b.ALo(13,"thJoin"),b.ALo(14,"thPluck"),b._UZ(15,"th-label-value",61),b.ALo(16,"thJoin"),b.ALo(17,"thPluck"),b._UZ(18,"th-label-value",62),b.ALo(19,"thYesOrNo"),b._UZ(20,"th-label-value",63),b.ALo(21,"thYesOrNo"),b.qZA()),2&e){var n=b.oxw(),a=n.title,r=n.teacher;b.xp6(2),b.Oqu(a),b.xp6(1),b.Q6J("value",b.lcZ(4,8,b.lcZ(5,10,r.lookingForRoles))),b.xp6(3),b.Q6J("value",b.lcZ(7,12,b.lcZ(8,14,r.lookingForSubjects))),b.xp6(3),b.Q6J("value",b.lcZ(10,16,b.lcZ(11,18,r.lookingForCurriculums))),b.xp6(3),b.Q6J("value",b.lcZ(13,20,b.lcZ(14,22,r.lookingForAgeLevels))),b.xp6(3),b.Q6J("value",b.lcZ(16,24,b.lcZ(17,26,r.lookingForRegions))),b.xp6(3),b.Q6J("value",b.lcZ(19,28,r.lookingForChina)),b.xp6(2),b.Q6J("value",b.lcZ(21,30,r.isAvailableForRemoteTeaching))}}function bo(e,t){if(1&e&&b.YNc(0,go,22,32,"div",56),2&e){var n=b.oxw();b.Q6J("ngIf",!n.keyDetailsFieldGroups.lookingFor.isEmpty)}}function xo(e,t){}function To(e,t){1&e&&b.YNc(0,xo,0,0,"ng-template")}function Zo(e,t){}function yo(e,t){1&e&&b.YNc(0,Zo,0,0,"ng-template")}function Ao(e,t){}function wo(e,t){1&e&&b.YNc(0,Ao,0,0,"ng-template")}function No(e,t){}function Oo(e,t){1&e&&b.YNc(0,No,0,0,"ng-template")}function Co(e,t){}function ko(e,t){1&e&&b.YNc(0,Co,0,0,"ng-template")}var qo=function(e){return{label:"Discount on school fees",preference:e}},Io=function(e){return{label:"Ability to save",preference:e}},So=function(e){return{label:"Accommodation provided",preference:e}},Yo=function(e){return{label:"Health insurance provided",preference:e}},Uo=function(e){return{label:"Professional development support",preference:e}};function _o(e,t){if(1&e&&(b.TgZ(0,"div",65),b.TgZ(1,"h4",66),b._uU(2),b.qZA(),b.YNc(3,To,1,0,void 0,20),b.YNc(4,yo,1,0,void 0,20),b.YNc(5,wo,1,0,void 0,20),b.YNc(6,Oo,1,0,void 0,20),b.YNc(7,ko,1,0,void 0,20),b.qZA()),2&e){var n=b.oxw(),a=n.title,r=n.teacher;b.oxw();var i=b.MAs(22);
1b.xp6(2),b.Oqu(a),b.xp6(1),b.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",b.VKq(11,qo,r.discountOnSchoolFeesPreference)),b.xp6(1),b.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",b.VKq(13,Io,r.abilityToSavePreference)),b.xp6(1),b.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",b.VKq(15,So,r.accommodationProvidedPreference)),b.xp6(1),b.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",b.VKq(17,Yo,r.healthInsuranceProvidedPreference)),b.xp6(1),b.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",b.VKq(19,Uo,r.professionalDevelopmentSupportPreference))}}function Jo(e,t){if(1&e&&b.YNc(0,_o,8,21,"div",64),2&e){var n=b.oxw();b.Q6J("ngIf",!n.keyDetailsFieldGroups.preferences.isEmpty)}}function Qo(e,t){if(1&e&&(b.ynx(0),b._UZ(1,"th-label-value",67),b.BQk()),2&e){var n=b.oxw(),a=n.label,r=n.preference;b.xp6(1),b.Q6J("label",a)("value",r.name)}}var Eo=function(){return[1,2,3,4]};function Fo(e,t){if(1&e&&b.YNc(0,Qo,2,2,"ng-container",34),2&e){var n=t.preference;b.Q6J("ngIf",n&&b.DdM(1,Eo).includes(n.order))}}function Lo(e,t){if(1&e&&(b.TgZ(0,"li"),b._uU(1),b.qZA()),2&e){var n=t.$implicit;b.xp6(1),b.AsE(" ",null==n.documents?null:n.documents.length," ",n.label," ")}}function Mo(e,t){if(1&e&&(b.TgZ(0,"li"),b._uU(1),b.ALo(2,"thTextForNWithNoun"),b.qZA()),2&e){var n=b.oxw(2).teacher;b.xp6(1),b.Oqu(b.xi3(2,1,null==n.videos?null:n.videos.length,"video"))}}function Po(e,t){if(1&e&&(b.TgZ(0,"li"),b._uU(1),b.ALo(2,"thTextForNWithNoun"),b.qZA()),2&e){var n=b.oxw(2).teacher;b.xp6(1),b.Oqu(b.xi3(2,1,null==n.photos?null:n.photos.length,"photo"))}}function Ro(e,t){if(1&e&&(b.TgZ(0,"div",39),b.TgZ(1,"h4",68),b._uU(2),b.qZA(),b.TgZ(3,"ul",69),b.YNc(4,Lo,2,2,"li",47),b.YNc(5,Mo,3,4,"li",34),b.YNc(6,Po,3,4,"li",34),b.qZA(),b.qZA()),2&e){var n=b.oxw(),a=n.title,r=n.teacher;b.xp6(2),b.Oqu(a),b.xp6(2),b.Q6J("ngForOf",r.documentCategories),b.xp6(1),b.Q6J("ngIf",(null==r.videos?null:r.videos.length)>0),b.xp6(1),b.Q6J("ngIf",(null==r.photos?null:r.photos.length)>0)}}function jo(e,t){if(1&e&&b.YNc(0,Ro,7,4,"div",56),2&e){var n=t.teacher;b.Q6J("ngIf",(null==n.documentCategories?null:n.documentCategories.length)>0||(null==n.photos?null:n.photos.length)>0||(null==n.videos?null:n.videos.length)>0)}}function Do(e,t){if(1&e&&(b.TgZ(0,"div",51),b.TgZ(1,"h4",71),b._uU(2),b.qZA(),b.TgZ(3,"div"),b._uU(4),b.ALo(5,"thJoin"),b.ALo(6,"thPluck"),b.qZA(),b.qZA()),2&e){var n=b.oxw(),a=n.title,r=n.teacher;b.xp6(2),b.Oqu(a),b.xp6(2),b.hij("",b.lcZ(5,2,b.lcZ(6,4,r.computerSkills)),".")}}function Bo(e,t){if(1&e&&b.YNc(0,Do,7,6,"div",70),2&e){var n=t.teacher;b.Q6J("ngIf",(null==n.computerSkills?null:n.computerSkills.length)>0)}}function Vo(e,t){if(1&e&&(b.TgZ(0,"div",51),b.TgZ(1,"h4",71),b._uU(2),b.qZA(),b.TgZ(3,"div"),b._uU(4),b.ALo(5,"thJoin"),b.ALo(6,"thPluck"),b.qZA(),b.qZA()),2&e){var n=b.oxw(),a=n.title,r=n.teacher;b.xp6(2),b.Oqu(a),b.xp6(2),b.hij("",b.lcZ(5,2,b.lcZ(6,4,r.teachingSkills)),".")}}function Ho(e,t){if(1&e&&b.YNc(0,Vo,7,6,"div",70),2&e){var n=t.teacher;b.Q6J("ngIf",(null==n.teachingSkills?null:n.teachingSkills.length)>0)}}function Go(e,t){if(1&e&&(b.TgZ(0,"div",51),b.TgZ(1,"h4",71),b._uU(2),b.qZA(),b.TgZ(3,"div"),b._uU(4),b.ALo(5,"thJoin"),b.ALo(6,"thPluck"),b.qZA(),b.qZA()),2&e){var n=b.oxw(),a=n.title,r=n.teacher;b.xp6(2),b.Oqu(a),b.xp6(2),b.hij("",b.lcZ(5,2,b.lcZ(6,4,r.fluentLanguages)),".")}}function Wo(e,t){if(1&e&&b.YNc(0,Go,7,6,"div",70),2&e){var n=t.teacher;b.Q6J("ngIf",(null==n.fluentLanguages?null:n.fluentLanguages.length)>0)}}function Ko(e,t){if(1&e&&(b.TgZ(0,"div",51),b.TgZ(1,"h4",71),b._uU(2),b.qZA(),b.TgZ(3,"div"),b._uU(4),b.qZA(),b.qZA()),2&e){var n=b.oxw().title,a=b.oxw();b.xp6(2),b.Oqu(n),b.xp6(2),b.Oqu(a.referenceSummaryText)}}function $o(e,t){if(1&e&&b.YNc(0,Ko,5,2,"div",70),2&e){var n=b.oxw();b.Q6J("ngIf",n.user.in(b.DdM(1,no)))}}function zo(e,t){1&e&&(b.TgZ(0,"div",72),b._uU(1,"* Can be downloaded and printed separately."),b.qZA())}var Xo=[{path:"",component:At,children:[{path:"",component:Ea,data:{title:"Key details"}},{path:"admin",component:fn,data:{title:"Admin"}},{path:"supporting-materials",component:oi,data:{title:"Supporting information"}},{path:"references",component:Ar,data:{title:"References"}},{path:"community",component:_n,data:{title:"Community"}}]},{path:"print-summary",component:function(){var e=function(){function e(t,n,a,r,i,o,l){s(this,e),this.route=t,this.router=n,this._ngZone=a,this.teacherService=r,this.keyDetailsService=i,this.userService=o,this.document=l,this.referenceSummaryText="",this.averageReferenceScoreText="",this.keyDetailsFieldGroups={},this.user=this.userService.user}return p(e,[{key:"ngOnInit",value:function(){this.teacher$=this.getTeacher(),this.runAfterRendered(this.print,2e3)}},{key:"print",value:function(){window.print()}},{key:"getTeacher",value:function(){var e=this;return this.teacherService.setTeacher(this.route).pipe((0,g.b)(function(t){!t||(e.teacherService.setWindowTitle("Teacher Horizons' profile"),e.keyDetailsFieldGroups=e.keyDetailsService.createFieldGroups(t),e.getDocuments().subscribe(),e.getEmploymentRecords().subscribe(),e.getPhotosAndVideos().subscribe(),e.getTeacherReferences().subscribe())}))}},{key:"getDocuments",value:function(){return this.teacherService.setDocuments().pipe((0,g.b)(function(e){!e||(e.documentCategories=e.documentCategories.filter(function(e){return e.documents.length>0}))}))}},{key:"getEmploymentRecords",value:function(){return this.teacherService.setEmploymentRecords().pipe((0,g.b)(function(e){}))}},{key:"getPhotosAndVideos",value:function(){return this.teacherService.setTeacherRelatedMedia().pipe((0,g.b)(function(e){}))}},{key:"getTeacherReferences",value:function(){var e=this;return this.teacherService.setReferences().pipe((0,g.b)(function(t){!t||e.setReferenceText(t)}))}},{key:"setReferenceText",value:function(e){var t,n,a=this;if(0===(null===(t=e.references)||void 0===t?void 0:t.length))return this.averageReferenceScoreText="No references available",void(this.referenceSummaryText="No references available.");var r=null===(n=e.references)||void 0===n?void 0:n.length,i=this.convertScoreToRating(e.references.map(function(e){return e.score}).reduce(function(e,t){return e+t}),r),o="- ".concat(e.references.map(function(e){return a.convertScoreToRating(e.score,1)}).join(", "));this.referenceSummaryText="".concat(i," out of 5 stars (from ").concat(r," references ").concat(o,")"),this.averageReferenceScoreText="".concat(i," out of 5 stars (from ").concat(r," references)")}},{key:"convertScoreToRating",value:function(e,t){return Math.round(e/(100*t)*5*10)/10}},{key:"runAfterRendered",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=this.router.events.pipe((0,v.h)(function(e){return e instanceof m.OD}));this._ngZone.runOutsideAngular(function(){(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ui.P;return(!(0,pi.k)(e)||e<0)&&(e=0),(!t||"function"!=typeof t.schedule)&&(t=ui.P),new si.y(function(n){return n.add(t.schedule(di,e,{subscriber:n,counter:0,peri
1od:e})),n})})(100).pipe((0,Jn.O)(0),(0,wt.R)(a),(0,y.U)(function(){return!t._ngZone.hasPendingMacrotasks}),(0,li.x)(),(0,v.h)(function(e){return e}),(0,ci.q)(1),(0,g.b)(function(t){return setTimeout(e,n)})).subscribe()})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(b.Y36(m.gz),b.Y36(m.F0),b.Y36(b.R0b),b.Y36(ae),b.Y36(En),b.Y36(z.K),b.Y36(c.K0))},e.\u0275cmp=b.Xpm({type:e,selectors:[["ng-component"]],decls:35,vars:4,consts:[[1,"w-full","max-w-5xl","p-2","mx-auto","-mt-6"],["class","mb-4",4,"ngIf","ngIfElse"],["loading",""],["printButtonTemplate",""],["headerTemplate",""],["summaryOverviewTemplate",""],["backgroundAndQualificationsTemplate",""],["experienceTemplate",""],["employmentRecordsTemplate",""],["lookingForTemplate",""],["preferencesTemplate",""],["preferenceTemplate",""],["supportingMediaTemplate",""],["computerSkillsTemplate",""],["teachingSkillsTemplate",""],["languageSkillsTemplate",""],["referencesTemplate",""],["printTextTemplate",""],[1,"mb-4"],[4,"ngTemplateOutlet"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"flex","justify-center","my-4"],["buttonClass","btn-coral",1,"print:hidden",3,"click"],[1,"flex","flex-row","gap-8","mb-3"],[1,"w-1/2"],["th-class","object-cover w-32 h-32",2,"min-width","128px",3,"url"],[1,"flex","justify-end","w-1/2"],["src","../../../../../assets/bird/logo.png","alt","logo",2,"height","96px"],[1,"mt-8"],[1,"h3"],["label","Candidate member number","labelClass","font-bold text-base","containerClass","my-1",3,"value"],["label","International experience","labelClass","font-bold text-base","containerClass","my-1",3,"value"],["label","Average reference score","labelClass","font-bold text-base","containerClass","my-1",3,"value",4,"ngIf"],["label","Job-seeking status","labelClass","font-bold text-base","containerClass","my-1",3,"value"],[4,"ngIf"],["label","Profile strength","type","ng-content","labelClass","font-bold text-base","containerClass","my-1"],["label","Average reference score","labelClass","font-bold text-base","containerClass","my-1",3,"value"],["label","Joint application","labelClass","font-bold text-base","containerClass","my-1",3,"value"],["label","Available from","labelClass","font-bold text-base","containerClass","my-1",3,"value"],[1,"mt-8","print:avoid-break"],[1,"h4","mb-3"],["label","Nationalities","type","ng-content","labelClass","font-bold text-base","containerClass","my-1",4,"ngIf"],["label","Education levels","labelClass","font-bold text-base","containerClass","my-1",3,"value"],["label","Country of teaching qualification / certification","labelClass","font-bold text-base","containerClass","my-1",3,"value"],["label","Current location","labelClass","font-bold text-base","containerClass","my-1",3,"value"],["label","Nationalities","type","ng-content","labelClass","font-bold text-base","containerClass","my-1"],[1,"flex","flex-wrap","align-middle"],[4,"ngFor","ngForOf"],["class","mr-2",4,"ngIf"],[1,"mr-2"],["class","mt-8",4,"ngIf"],[1,"print:avoid-break"],["label","Curriculum experience","labelClass","font-bold text-base","containerClass","my-1",3,"value"],["label","Number of years' teaching experience","labelClass","font-bold text-base","containerClass","my-1",3,"value"],["class","print:avoid-break",4,"ngFor","ngForOf"],[2,"--employment-record-font-size","1em",3,"employmentRecord"],["class","mt-8 print:avoid-break",4,"ngIf"],["label","Role(s)","labelClass","font-bold text-base","containerClass","my-1",3,"value"],["label","Subject(s)","labelClass","font-bold text-base","containerClass","my-1",3,"value"],["label","Curricula of interest","labelClass","font-bold text-base","containerClass","my-1",3,"value"],["label","Age level","labelClass","font-bold text-base","containerClass","my-1",3,"value"],["label","Locations considered","labelClass","font-bold text-base","containerClass","my-1",3,"value"],["label","Interested in working in China","labelClass","font-bold text-base","containerClass","my-1",3,"value"],["label","Interested in teaching remotely","labelClass","font-bold text-base","containerClass","my-1",3,"value"],["class","mb-4 print:avoid-break",4,"ngIf"],[1,"mb-4","print:avoid-break"],[1,"h","mb-3"],["labelClass","font-bold text-base","containerClass","my-1",3,"label","value"],[1,"h4","mb-2"],[1,"ml-4","list-fas-circle","list-flex","list-mr-4"],["class","print:avoid-break",4,"ngIf"],[1,"h4","mb-1"],[1,"mt-12"]],template:function(e,t){if(1&e&&(b.TgZ(0,"div",0),b.YNc(1,Wi,15,47,"div",1),b.ALo(2,"async"),b.qZA(),b.YNc(3,Ki,1,0,"ng-template",null,2,b.W1O),b.YNc(5,$i,3,0,"ng-template",null,3,b.W1O),b.YNc(7,zi,5,1,"ng-template",null,4,b.W1O),b.YNc(9,ao,17,14,"
1ng-template",null,5,b.W1O),b.YNc(11,lo,9,8,"ng-template",null,6,b.W1O),b.YNc(13,ho,1,1,"ng-template",null,7,b.W1O),b.YNc(15,vo,1,1,"ng-template",null,8,b.W1O),b.YNc(17,bo,1,1,"ng-template",null,9,b.W1O),b.YNc(19,Jo,1,1,"ng-template",null,10,b.W1O),b.YNc(21,Fo,1,2,"ng-template",null,11,b.W1O),b.YNc(23,jo,1,1,"ng-template",null,12,b.W1O),b.YNc(25,Bo,1,1,"ng-template",null,13,b.W1O),b.YNc(27,Ho,1,1,"ng-template",null,14,b.W1O),b.YNc(29,Wo,1,1,"ng-template",null,15,b.W1O),b.YNc(31,$o,1,2,"ng-template",null,16,b.W1O),b.YNc(33,zo,2,0,"ng-template",null,17,b.W1O)),2&e){var n=b.MAs(4);b.xp6(1),b.Q6J("ngIf",b.lcZ(2,2,t.teacher$))("ngIfElse",n)}},directives:[c.O5,c.tP,re.OR,re.r0,re.XC,re.tT,c.sg,jn],pipes:[c.Ov,c.uU,re.As,re.FF,re.Dk,re.HI],styles:[""]}),e}(),data:{title:"Print summary"}}],el=[c.ez,u.UX,d.o9,f.q,u.u5,h.m,function(){var e=p(function e(){s(this,e)});return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=b.oAB({type:e}),e.\u0275inj=b.cJS({providers:[],imports:[[m.Bz.forChild(Xo)],m.Bz]}),e}()],tl=[ae,En],nl=function(){var e=p(function e(){s(this,e)});return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=b.oAB({type:e}),e.\u0275inj=b.cJS({providers:[].concat(tl),imports:[[].concat(el)]}),e}()},77888:function(e,n,r){r.d(n,{A:function(){return Z}});var i,l=r(25917),c=r(19773),u=r(93342),d=r(24751),f=r(79765),h=r(5304),m=function(e){t(r,e);var n=a(r);function r(e,t){var a,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],c=arguments.length>5?arguments[5]:void 0;return s(this,r),(a=n.call(this,i)).apiCaller=e,a.valueType=t,a.validationOptions=o,a.restrictionOptions=l,a.formattingOption=c,a.restrictions={keyboardEventIsAllowed:function(e){return!0}},a.isProcessedWithSuccess=new f.xQ,a.hasValue=function(){var e=a.value;return!(void 0===e||""===e||null===e||Array.isArray(e)&&0===e.length)},a.setValidations(o),a.setRestrictions(l),a}return p(r,[{key:"setUserValueToFieldValue",value:function(){var e=this,t=this.value;this.reset(),setTimeout(function(){e.setValue(t)},0)}},{key:"toValueType",value:function(e){return this.toValueType_Dumb(e,this.valueType)}},{key:"update",value:function(e){var t=this;return this.isDirty=!1,this.isBeingProcessed=!0,this.apiCaller(e).pipe((0,c.zg)(function(e){return t.isBeingProcessed=!1,null===e?(0,l.of)(!1):(e&&(t.isRecentlyProcessedWithSuccess=!0,t.isProcessedWithSuccess.next(!0)),e||(t.isRecentlyProcessedWithError=!0),setTimeout(function(){t.isRecentlyProcessedWithSuccess=!1,t.isRecentlyProcessedWithError=!1},3e3),(0,l.of)(!0))}),(0,h.K)(function(e){return console.log("fatal error",e),(0,l.of)(e)})).subscribe(),(0,l.of)("wip")}},{key:"toValueType_Dumb",value:function(e,t){return["id","number"].includes(t)?function(e){return""===e||null==e}(n=e)?null:+n:"boolean"===t?e=!!e:e;var n}},{key:"setValidations",value:function(e){var t=this;if(e&&0!==Object.keys(e).length){var n=[];Object.keys(e).forEach(function(a){"required"===a&&(t.isRequired=!0);var r=["required","email"].includes(a)?d.kI[a]:d.kI[a](e[a]);n.push(r)}),this.setValidators(n)}}},{key:"setRestrictions",value:function(e){if(e&&0!==e.length){e.includes("maxLength")&&(this.restrictions.maxLength=this.validationOptions.maxLength);var t=this.getRestrictionRegEx(),n=this.keyboardEventIsAllowed;this.restrictions.keyboardEventIsAllowed=function(e){return n(e,t)}}}},{key:"getRestrictionRegEx",value:function(){var e,t,n=o(this.restrictionOptions);try{for(n.s();!(t=n.n()).done;){var a=t.value;if("pattern"===a?e=this.validationOptions.pattern:"maxLength"===a||(e=a),e)break}}catch(r){n.e(r)}finally{n.f()}if(e)return new RegExp(e)}},{key:"keyboardEventIsAllowed",value:function(e,t){var n=e.key;return!(t&&!["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Control","Home","End"].includes(n)&&!e.ctrlKey)||t.test(n)}}]),r}(d.NI),v=r(74788),g=r(58497),b=r(3069),x=r(47315),T=r(80585),Z=((i=function(){function e(t,n,a,r){var i=this;s(this,e),this.httpClient=t,this.snackBar=n,this.dateService=a,this.apiErrorService=r,this.composeCreateFieldFunction=function(e,t){return function(n,a){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"any",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],c=arguments.length>5?arguments[5]:void 0,s=i.createEditField(e,n,a,r,o,l,c,t);return n&&(n[a]=s),s}},this.createEditField=function(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"any",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],s=arguments.length>6?arguments[6]:void 0,p=arguments.length>7?arguments[7]:void 0,d=Object.assign(Object.assign({},i.getDefaultFunctions()),p),f=d.getInitialFieldValue(e,n);return new m(function(r){var i=(0,c.zg)(function(){return d.updateFieldValues(t,n,r)}),o=(0,c.zg)(function(e){return d.validateFieldValues(t)}),s=(0,c.zg)(function(e){return e?d.updateBackend(t,n,a,r,d):(0,l.of)(null)}),p=(0,u.b)(function(e){e&&[400,401,403,404,422].includes(e.status)&&d.handleBackendError(t,n,r,e)}),f=(0,c.zg)(function(i){return null===i?(0,l.of)(null):200===i.status||204===i.status?d.updateModel.bind(e)(t,n,a,r,i):(0,l.of)(!1)}),h=(0,u.b)(function(e){!e||d.handleSuccess(t)});return(0,l.of)(1).pipe(i,o,s,p,f,h)},a,f,r,o,s)},this.getDefaultFunctions=function(){return{getInitialFieldValue:i.getInitialFieldValue,updateFieldValues:i.updateFieldValues,validateFieldValues:i.validateFieldValues,updateBackend:i.updateBackend,isBackendUpdateNeeded:i.isBackendUpdateNeeded,getApiUrl:i.getApiUrl,getApiFieldName:i.getApiFieldName,getApiFieldValue:i.getApiFieldValue,getApiBody:i.getApiBody,handleBackendError:i.handleBackendError,updateModel:i.updateModel,handleSuccess:i.handleSuccess}},this.getInitialFieldValue=function(e,t){return e?e[t]:null},this.updateBackend=function(e,t,n,a,r){var o=Object.assign(Object.assign({},i.getDefaultFunctions()),r);if(!o.isBackendUpdateNeeded(e,t,a))return(0,l.of)(null);var c=o.getApiUrl(t),s=o.getApiFieldName(t),u=o.getApiFieldValue(t,n,a),p=o.getApiBody(e,s,u);return i.httpClient.put(c,p,{observe:"response"})},this.isBackendUpdateNeeded=function(e,t,n){return!0},this.getApiUrl=function(e){return"/v1/example/success"},this.getApiFieldName=function(e){return e},this.getApiFieldValue=function(e,t,n){return n},this.getApiBody=function(e,t,n){var a={};return a[t]=n,a},this.updateFieldValues=function(e,t,n){if(e)return e[t].setValue(n),console.log("Updated fields: ",e),(0,l.of)(!0)},this.validateFieldValues=function(e){return(0,l.of)(!0)},this.handleBackendError=function(e,t,n,a){e[t].setUserValueToFieldValue(),e[t].setErrors({apiError:!0}),i.apiErrorService.handleFieldApiError(a,t,n)},this.handleSuccess=function(e){}}return p(e,[{key:"updateModel",value:function(e,t,n,a){return this[t]=a,(0,l.of)(!0)}}]),e}()).\u0275fac=function(e){return new(e||i)(v.LFG(g.eN),v.LFG(b.ux),v.LFG(x.Ru),v.LFG
1(T.D))},i.\u0275prov=v.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i)},30801:function(e,t,n){n.d(t,{M:function(){return u}});var a,r=n(74788),i=n(634),o=n(69954),l=n(60664),c=n(17780),u=((a=function(){function e(t,n,a,r){s(this,e),this.adapterHelperService=t,this.regionAdapter=n,this.countryAdapter=a,this.cityAdapter=r}return p(e,[{key:"adaptRegions",value:function(e,t){return this.adapterHelperService.adaptList(e,this.regionAdapter,t)}},{key:"adaptCountries",value:function(e,t,n){return this.adapterHelperService.adaptList(e,this.countryAdapter,t,n)}},{key:"adaptCities",value:function(e,t,n){return this.adapterHelperService.adaptList(e,this.cityAdapter,t,n)}},{key:"adaptRegionalEntities",value:function(e,t){var n,a,r;if(t){var i=+e.cities.find(function(e){return e.id===t}).country,o=+e.countries.find(function(e){return e.id===i}).region;n=e.regions.filter(function(e){return e.id===o}),a=e.countries.filter(function(e){return e.id===i}),r=e.cities.filter(function(e){return e.id===t})}else n=e.regions,a=e.countries,r=e.cities;var l=this.adapterHelperService.compareFnGenerator(["name"]),c=this.adaptRegions(n,e.regionImages).sort(l),s=this.adaptCountries(a,e.countryImages,c).sort(l);return{regions:c,countries:s,cities:this.adaptCities(r,e.cityImages,s).sort(l)}}}]),e}()).\u0275fac=function(e){return new(e||a)(r.LFG(i.G),r.LFG(o.X),r.LFG(l.R),r.LFG(c.k))},a.\u0275prov=r.Yz7({token:a,factory:a.\u0275fac,providedIn:"root"}),a)}}])}();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.